From e5ec37cae6d273db30c898caf01cfac41519a5ca Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Sun, 29 Sep 2024 10:18:56 +0800 Subject: [PATCH 1/8] upgrade @interchain-kit to 0.0.1-beta.23 --- examples/injective/package.json | 8 +++--- examples/injective/yarn.lock | 46 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/examples/injective/package.json b/examples/injective/package.json index 8820f109..83d181f7 100644 --- a/examples/injective/package.json +++ b/examples/injective/package.json @@ -31,10 +31,10 @@ "@cosmos-kit/react": "2.17.0", "@emotion/react": "11.10.6", "@emotion/styled": "11.10.6", - "@interchain-kit/core": "0.0.1-beta.20", - "@interchain-kit/keplr-extension": "0.0.1-beta.20", - "@interchain-kit/leap-extension": "0.0.1-beta.20", - "@interchain-kit/react": "0.0.1-beta.20", + "@interchain-kit/core": "0.0.1-beta.23", + "@interchain-kit/keplr-extension": "0.0.1-beta.23", + "@interchain-kit/leap-extension": "0.0.1-beta.23", + "@interchain-kit/react": "0.0.1-beta.23", "@interchain-ui/react": "^1.24.0", "@interchain-ui/react-no-ssr": "^0.1.6", "@interchainjs/cosmos-types": "0.0.1-beta.9", diff --git a/examples/injective/yarn.lock b/examples/injective/yarn.lock index fa3d85a6..60b2dcfa 100644 --- a/examples/injective/yarn.lock +++ b/examples/injective/yarn.lock @@ -3822,10 +3822,10 @@ __metadata: "@cosmos-kit/react": "npm:2.17.0" "@emotion/react": "npm:11.10.6" "@emotion/styled": "npm:11.10.6" - "@interchain-kit/core": "npm:0.0.1-beta.20" - "@interchain-kit/keplr-extension": "npm:0.0.1-beta.20" - "@interchain-kit/leap-extension": "npm:0.0.1-beta.20" - "@interchain-kit/react": "npm:0.0.1-beta.20" + "@interchain-kit/core": "npm:0.0.1-beta.23" + "@interchain-kit/keplr-extension": "npm:0.0.1-beta.23" + "@interchain-kit/leap-extension": "npm:0.0.1-beta.23" + "@interchain-kit/react": "npm:0.0.1-beta.23" "@interchain-ui/react": "npm:^1.24.0" "@interchain-ui/react-no-ssr": "npm:^0.1.6" "@interchainjs/cosmos-types": "npm:0.0.1-beta.9" @@ -5470,9 +5470,9 @@ __metadata: languageName: node linkType: hard -"@interchain-kit/core@npm:0.0.1-beta.20": - version: 0.0.1-beta.20 - resolution: "@interchain-kit/core@npm:0.0.1-beta.20" +"@interchain-kit/core@npm:0.0.1-beta.23": + version: 0.0.1-beta.23 + resolution: "@interchain-kit/core@npm:0.0.1-beta.23" dependencies: "@chain-registry/v2": "npm:^1.65.20" "@chain-registry/v2-types": "npm:^0.49.6" @@ -5491,35 +5491,35 @@ __metadata: buffer: "npm:^6.0.3" interchainjs: "npm:0.0.1-beta.14" long: "npm:^5.2.3" - checksum: 10c0/e068f8cc501b289499d5b7e55710bd44064c2389e04b49e8573f213bf53a60141ffd538375aa5196e9510939862af9461732c41d828ac3b2fa807422d041b7af + checksum: 10c0/2cb5a5364b7dba430217988e6bc9830e145ab3f48ddf4d6beb76225930da1a6a6403d7ce67135e85cdf4f156e9e5458c57fdda61f9edace1ccbd243ae90417b5 languageName: node linkType: hard -"@interchain-kit/keplr-extension@npm:0.0.1-beta.20": - version: 0.0.1-beta.20 - resolution: "@interchain-kit/keplr-extension@npm:0.0.1-beta.20" +"@interchain-kit/keplr-extension@npm:0.0.1-beta.23": + version: 0.0.1-beta.23 + resolution: "@interchain-kit/keplr-extension@npm:0.0.1-beta.23" dependencies: - "@interchain-kit/core": "npm:0.0.1-beta.20" + "@interchain-kit/core": "npm:0.0.1-beta.23" "@keplr-wallet/provider-extension": "npm:^0.12.102" - checksum: 10c0/f8bd11131754c8deb262df7c188e01831169f644832c12c07952a198ba9f2b18b87ff8c1e3127c51a23eaf9b00d8dc466dd0f58cd1270a54357d42c8936ad86a + checksum: 10c0/d432b9dbb850bdd436fbcb26b834eb7db4809b47992b52dc35094ab2493c88fa0b83f432dd46c0520064d0925786c058947f2b5caf06c883f22b15fa2759e1b2 languageName: node linkType: hard -"@interchain-kit/leap-extension@npm:0.0.1-beta.20": - version: 0.0.1-beta.20 - resolution: "@interchain-kit/leap-extension@npm:0.0.1-beta.20" +"@interchain-kit/leap-extension@npm:0.0.1-beta.23": + version: 0.0.1-beta.23 + resolution: "@interchain-kit/leap-extension@npm:0.0.1-beta.23" dependencies: - "@interchain-kit/core": "npm:0.0.1-beta.20" - checksum: 10c0/10f251990d63abee30d37383c96eb2b18fa973077e64f5b898963790213797dc9fd1fe39c44b101468e12466425bbfeae571efe9f003e3d986c3149658fd973c + "@interchain-kit/core": "npm:0.0.1-beta.23" + checksum: 10c0/fd23b06123e1e95753c8b13d59bf370dc5b06368608b57d2acba791018f25c5f1341b7f629a47823b2453812b29aa4feb2891956dfa9b3b92244d1d7aec61496 languageName: node linkType: hard -"@interchain-kit/react@npm:0.0.1-beta.20": - version: 0.0.1-beta.20 - resolution: "@interchain-kit/react@npm:0.0.1-beta.20" +"@interchain-kit/react@npm:0.0.1-beta.23": + version: 0.0.1-beta.23 + resolution: "@interchain-kit/react@npm:0.0.1-beta.23" dependencies: "@chain-registry/v2-types": "npm:^0.49.6" - "@interchain-kit/core": "npm:0.0.1-beta.20" + "@interchain-kit/core": "npm:0.0.1-beta.23" "@interchain-ui/react": "npm:1.24.0" "@interchainjs/cosmos-types": "npm:0.0.1-beta.9" "@interchainjs/injective": "npm:0.0.1-beta.13" @@ -5528,7 +5528,7 @@ __metadata: interchainjs: "npm:0.0.1-beta.14" react: "npm:^18.3.1" react-dom: "npm:^18.3.1" - checksum: 10c0/5ee420a1a7d40ccc7e25c9ea3eb85916a7edcb579fc998d0b6be8bd242473a33bb7a9d08d29764e20c9a6fb8a297138d47d4eb10e204dadc428781c5011e498d + checksum: 10c0/cad31588c95b3b6d1c6eaf392aa6a672d73ec26792e0930f5822b01983d6f2e0a86b849f1902c021c50853ae3ab3220c98985448e350224bc63e78e29e8315af languageName: node linkType: hard From ef672a96593cf1d656eaa266a11e9f5cc0adc235 Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Sun, 29 Sep 2024 10:40:53 +0800 Subject: [PATCH 2/8] ignore some warnings --- examples/telescope/components/wallet.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/telescope/components/wallet.tsx b/examples/telescope/components/wallet.tsx index 5cd3bb60..e186681e 100644 --- a/examples/telescope/components/wallet.tsx +++ b/examples/telescope/components/wallet.tsx @@ -109,6 +109,7 @@ export const WalletSection = () => { return (
+ {/* @ts-ignore */} Date: Sun, 29 Sep 2024 10:41:08 +0800 Subject: [PATCH 3/8] use WalletState of interChain-kit --- .../components/react/address-card.tsx | 4 +- .../components/react/wallet-connect.tsx | 10 ++-- .../injective/components/react/warn-block.tsx | 11 +++-- examples/injective/components/wallet.tsx | 49 +++++++++++-------- 4 files changed, 41 insertions(+), 33 deletions(-) diff --git a/examples/injective/components/react/address-card.tsx b/examples/injective/components/react/address-card.tsx index 795d5ec3..f1dfdebe 100644 --- a/examples/injective/components/react/address-card.tsx +++ b/examples/injective/components/react/address-card.tsx @@ -7,7 +7,8 @@ import { useColorMode, Image } from "@chakra-ui/react"; -import { WalletStatus } from 'cosmos-kit'; +// import { WalletStatus } from 'cosmos-kit'; +import { WalletState as WalletStatus } from '@interChain-kit/core' import { FaCheckCircle } from 'react-icons/fa'; import { FiCopy } from 'react-icons/fi'; import React, { ReactNode, useEffect, useState } from "react"; @@ -90,6 +91,7 @@ export const ConnectedShowAddress = ({ }, [address]); return ( + // @ts-ignore - ); -}; - -export const CopyAddressBtn = ({ - walletStatus, - connected, -}: { - walletStatus: WalletStatus; - connected: ReactNode; -}) => { - switch (walletStatus) { - case WalletStatus.Connected: - return <>{connected}; - default: - return <>; - } -}; diff --git a/examples/interchainjs/components/react/astronaut.tsx b/examples/interchainjs/components/react/astronaut.tsx deleted file mode 100644 index 0704133a..00000000 --- a/examples/interchainjs/components/react/astronaut.tsx +++ /dev/null @@ -1,156 +0,0 @@ -export const Astronaut = (props: any) => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -); diff --git a/examples/interchainjs/components/react/chain-card.tsx b/examples/interchainjs/components/react/chain-card.tsx deleted file mode 100644 index e8d56a0e..00000000 --- a/examples/interchainjs/components/react/chain-card.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { Box, Stack, useColorModeValue, Image, Text } from '@chakra-ui/react'; -import { ChainCardProps } from '../types'; - -export const ChainCard = (props: ChainCardProps) => { - return ( - - - - - - {props.prettyName} - - - ); -}; diff --git a/examples/interchainjs/components/react/chain-dropdown.tsx b/examples/interchainjs/components/react/chain-dropdown.tsx deleted file mode 100644 index d9f4b29a..00000000 --- a/examples/interchainjs/components/react/chain-dropdown.tsx +++ /dev/null @@ -1,277 +0,0 @@ -/* eslint-disable react-hooks/rules-of-hooks */ -import React from 'react'; -import { - Box, - Text, - Stack, - useColorModeValue, - Image, - Icon, - useBreakpointValue, - SystemStyleObject, - SkeletonCircle, - Skeleton -} from '@chakra-ui/react'; -import { Searcher } from 'fast-fuzzy'; -import { FiChevronDown } from 'react-icons/fi'; -import { - AsyncSelect, - OptionProps, - chakraComponents, - GroupBase, - DropdownIndicatorProps, - PlaceholderProps -} from 'chakra-react-select'; -import { - ChainOption, - ChangeChainDropdownType, - ChangeChainMenuType -} from '../types'; - -const SkeletonOptions = () => { - return ( - - - - - ); -}; - -const SelectOptions = ({ data, value, onChange }: ChangeChainMenuType) => { - const menuHeight = useBreakpointValue({ base: 60, md: 56 }); - const customStyles = { - control: (provided: SystemStyleObject) => ({ - ...provided, - height: 12 - }), - menu: (provided: SystemStyleObject) => ({ - ...provided, - h: menuHeight, - mt: 4, - mb: 0, - bg: useColorModeValue('white', 'gray.900'), - boxShadow: useColorModeValue('0 1px 5px #e3e3e3', '0 0px 4px #4b4b4b'), - borderRadius: '0.3rem' - }), - menuList: (provided: SystemStyleObject) => ({ - ...provided, - h: menuHeight, - bg: 'transparent', - border: 'none', - borderRadius: 'none', - p: 2, - // For Firefox - scrollbarWidth: 'auto', - scrollbarColor: useColorModeValue( - 'rgba(0,0,0,0.3) rgba(0,0,0,0.2)', - 'rgba(255,255,255,0.2) rgba(255,255,255,0.1)' - ), - // For Chrome and other browsers except Firefox - '&::-webkit-scrollbar': { - width: '14px', - background: useColorModeValue( - 'rgba(220,220,220,0.1)', - 'rgba(60,60,60,0.1)' - ), - borderRadius: '3px' - }, - '&::-webkit-scrollbar-thumb': { - background: useColorModeValue( - 'rgba(0,0,0,0.1)', - 'rgba(255,255,255,0.1)' - ), - borderRadius: '10px', - border: '3px solid transparent', - backgroundClip: 'content-box' - } - }), - clearIndicator: (provided: SystemStyleObject) => ({ - ...provided, - borderRadius: 'full', - color: useColorModeValue('blackAlpha.600', 'whiteAlpha.600') - }), - dropdownIndicator: (provided: SystemStyleObject) => ({ - ...provided, - bg: 'transparent', - pl: 1.5 - }), - option: ( - provided: SystemStyleObject, - state: { isSelected: boolean; isFocused: boolean } - ) => { - return { - ...provided, - borderRadius: 'lg', - h: 14, - color: 'inherit', - bg: useColorModeValue( - state.isSelected - ? state.isFocused - ? 'primary.200' - : 'primary.100' - : state.isFocused - ? 'blackAlpha.200' - : 'transparent', - state.isSelected - ? state.isFocused - ? 'primary.600' - : 'primary.500' - : state.isFocused - ? 'whiteAlpha.200' - : 'transparent' - ), - _notFirst: { - mt: 2 - }, - _active: { - bg: 'primary.50' - }, - _disabled: { bg: 'transparent', _hover: { bg: 'transparent' } } - }; - } - }; - const IndicatorSeparator = () => { - return null; - }; - const DropdownIndicator = ({ - ...props - }: DropdownIndicatorProps>) => { - return ( - - - - ); - }; - const Placeholder = (props: PlaceholderProps) => { - if (props.hasValue) { - return ( - - - - - - - {props.getValue()[0].label} - - - - ); - } - return ; - }; - const CustomOption = ({ - children, - ...props - }: OptionProps>) => { - return ( - - - - - - - {children} - - - - ); - }; - - return ( - option.isDisabled || false} - blurInputOnSelect={true} - controlShouldRenderValue={false} - loadingMessage={() => } - value={value} - defaultOptions={data} - loadOptions={(inputValue, callback) => { - const searcher = new Searcher(data, { - keySelector: (obj) => obj.label - }); - callback(searcher.search(inputValue)); - }} - onChange={onChange} - components={{ - DropdownIndicator, - IndicatorSeparator, - Placeholder, - Option: CustomOption - }} - /> - ); -}; - -export const ChangeChainDropdown = ({ - data, - selectedItem, - onChange -}: ChangeChainDropdownType) => { - return ( - - - - ); -}; diff --git a/examples/interchainjs/components/react/choose-chain.tsx b/examples/interchainjs/components/react/choose-chain.tsx deleted file mode 100644 index 2d4685fd..00000000 --- a/examples/interchainjs/components/react/choose-chain.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { useState, useEffect } from 'react'; -import { ChangeChainDropdown } from './chain-dropdown'; -import { - ChooseChainInfo, - ChainOption, - handleSelectChainDropdown, -} from '../types'; - -export function ChooseChain({ - chainName, - chainInfos, - onChange, -}: { - chainName?: string; - chainInfos: ChooseChainInfo[]; - onChange: handleSelectChainDropdown; -}) { - const [selectedItem, setSelectedItem] = useState(); - useEffect(() => { - if (chainName && chainInfos.length > 0) - setSelectedItem( - chainInfos.filter((options) => options.chainName === chainName)[0] - ); - if (!chainName) setSelectedItem(undefined); - }, [chainInfos, chainName]); - return ( - - ); -} diff --git a/examples/interchainjs/components/react/handleChangeColor.tsx b/examples/interchainjs/components/react/handleChangeColor.tsx deleted file mode 100644 index c1f46bc5..00000000 --- a/examples/interchainjs/components/react/handleChangeColor.tsx +++ /dev/null @@ -1,9 +0,0 @@ -// use for let color mode value fit Rules of Hooks -export function handleChangeColorModeValue( - colorMode: string, - light: any, - dark: any -) { - if (colorMode === "light") return light; - if (colorMode === "dark") return dark; -} diff --git a/examples/interchainjs/components/react/index.ts b/examples/interchainjs/components/react/index.ts deleted file mode 100644 index 266abf4e..00000000 --- a/examples/interchainjs/components/react/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from "./astronaut"; -export * from "./wallet-connect"; -export * from "./warn-block"; -export * from "./user-card"; -export * from "./address-card"; -export * from "./chain-card"; -export * from "./send-tokens-card"; -export * from "./vote"; -export * from "./proposal-card"; -export * from "./proposal-modal"; -export * from './choose-chain'; -export * from "./liquidity"; diff --git a/examples/interchainjs/components/react/liquidity/add-liquidity-modal.tsx b/examples/interchainjs/components/react/liquidity/add-liquidity-modal.tsx deleted file mode 100644 index d2d39504..00000000 --- a/examples/interchainjs/components/react/liquidity/add-liquidity-modal.tsx +++ /dev/null @@ -1,284 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalBody, - ModalCloseButton, - Text, - Box, - Center, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { Pool } from './provide-liquidity'; -import { useChain } from '@cosmos-kit/react'; -import { osmosis } from '../../../src/codegen/osmosis/bundle'; -import { Coin } from 'osmojs/dist/codegen/cosmos/base/v1beta1/coin'; -import { chainName } from '../../../config/liquidity/defaults'; -import { LargeButton } from './modal-components'; -import { - getSymbolForDenom, - prettyPool, - baseUnitsToDisplayUnits, - getExponentByDenom, - calcShareOutAmount, - getOsmoDenomForSymbol, - baseUnitsToDollarValue, - convertDollarValueToCoins, -} from '../../../utils/liquidity'; -import { PriceHash } from '../../../utils/liquidity/types'; -import BigNumber from 'bignumber.js'; -import { TransactionResult } from './types'; -import { coin, coins as aminoCoins } from '@cosmjs/amino'; -import { useTransactionToast } from './hooks'; -import { TokenInput } from './token-input'; - -type InputToken = { - denom: string; - inputAmount: string; -}; - -const DEFAULT_SLIPPAGE = 2.5; - -export const calcAmountWithSlippage = ( - amount: string, - slippage: number | string -) => { - const remainingPercentage = new BigNumber(100).minus(slippage).div(100); - return new BigNumber(amount) - .multipliedBy(remainingPercentage) - .decimalPlaces(0) - .toString(); -}; - -const { joinPool, joinSwapExternAmountIn } = - osmosis.gamm.v1beta1.MessageComposer.withTypeUrl; - -const AddLiquidityModal = ({ - isOpen, - onClose, - currentPool, - balances, - prices, - updatePoolsData, - closeDetailModal, -}: { - isOpen: boolean; - onClose: () => void; - currentPool: Pool; - balances: Coin[]; - prices: PriceHash; - updatePoolsData: () => void; - closeDetailModal: () => void; -}) => { - const [isLoading, setIsLoading] = useState(false); - const [singleToken, setSingleToken] = useState(null); - const [inputTokens, setInputTokens] = useState( - currentPool.poolAssets.map((asset) => ({ - denom: asset.token!.denom, - inputAmount: '', - })) - ); - - const { showToast } = useTransactionToast(); - const [isMobile] = useMediaQuery('(max-width: 480px)'); - - useEffect(() => { - setInputTokens( - currentPool.poolAssets.map((asset) => ({ - denom: asset.token!.denom, - inputAmount: '', - })) - ); - }, [currentPool]); - - const { getSigningStargateClient, address } = useChain(chainName); - - const poolName = currentPool?.poolAssets.map(({ token }) => - getSymbolForDenom(token!.denom) - ); - - const pool = prettyPool(currentPool); - - const currentInputTokens = singleToken - ? [ - inputTokens.find( - ({ denom }) => denom === getOsmoDenomForSymbol(singleToken) - )!, - ] - : inputTokens; - - const hasEmptyAmount = currentInputTokens.some((t) => !t.inputAmount); - - const hasZeroAmount = currentInputTokens.some((t) => - new BigNumber(t.inputAmount).lte(0) - ); - - const hasInsufficientAmount = currentInputTokens.some((t) => { - const balance = balances.find((b) => b.denom === t.denom)?.amount || 0; - const symbol = getSymbolForDenom(t.denom); - return new BigNumber(t.inputAmount).gt( - baseUnitsToDisplayUnits(symbol, balance) - ); - }); - - const btnText = hasEmptyAmount - ? 'Amount is empty' - : hasInsufficientAmount - ? 'Insufficient amount' - : hasZeroAmount - ? 'Amount is Zero' - : 'Add liquidity'; - - const closeModal = () => { - setInputTokens( - currentPool.poolAssets.map((asset) => ({ - denom: asset.token!.denom, - inputAmount: '', - })) - ); - setIsLoading(false); - setSingleToken(null); - onClose(); - }; - - const handleClick = async () => { - setIsLoading(true); - - const stargateClient = await getSigningStargateClient(); - - if (!stargateClient || !address) { - console.error('stargateClient undefined or address undefined.'); - return; - } - - const allCoins = inputTokens.map(({ denom, inputAmount }) => ({ - denom, - amount: new BigNumber(inputAmount) - .shiftedBy(getExponentByDenom(denom)) - .toString(), - })); - - let msg = []; - - if (singleToken) { - const inputCoin = allCoins.find( - (coin) => coin.denom === getOsmoDenomForSymbol(singleToken) - )!; - const coinSymbol = getSymbolForDenom(inputCoin.denom); - const inputValue = baseUnitsToDollarValue( - prices, - coinSymbol, - inputCoin.amount - ); - const coinsNeeded = convertDollarValueToCoins(inputValue, pool, prices); - const shareOutAmount = calcShareOutAmount(pool, coinsNeeded); - const joinSwapExternAmountInMsg = joinSwapExternAmountIn({ - poolId: currentPool.id, - sender: address, - tokenIn: inputCoin, - shareOutMinAmount: calcAmountWithSlippage( - shareOutAmount, - DEFAULT_SLIPPAGE - ), - }); - msg.push(joinSwapExternAmountInMsg); - } else { - const shareOutAmount = calcShareOutAmount(pool, allCoins); - const tokenInMaxs = allCoins.map((c: Coin) => { - return coin(c.amount, c.denom); - }); - const joinPoolMsg = joinPool({ - poolId: currentPool.id, - sender: address, - shareOutAmount: calcAmountWithSlippage( - shareOutAmount, - DEFAULT_SLIPPAGE - ), - tokenInMaxs, - }); - msg.push(joinPoolMsg); - } - - const fee = { - amount: aminoCoins(0, 'uosmo'), - gas: '240000', - }; - - try { - const res = await stargateClient.signAndBroadcast(address, msg, fee); - if (res?.code !== TransactionResult.Success) throw res; - stargateClient.disconnect(); - setIsLoading(false); - showToast(res.code); - closeModal(); - closeDetailModal(); - updatePoolsData(); - } catch (error) { - console.error(error); - stargateClient.disconnect(); - setIsLoading(false); - showToast(TransactionResult.Failed, error); - } - }; - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const statColor = useColorModeValue('#2C3137', '#EEF2F8'); - - return ( - - - - - - Add liquidity - - - {poolName?.join(' / ')} - - - - - {pool.poolAssetsPretty.map((token, i) => ( - - - - ))} -
- -
-
-
-
- ); -}; - -export default AddLiquidityModal; diff --git a/examples/interchainjs/components/react/liquidity/bond-shares-modal.tsx b/examples/interchainjs/components/react/liquidity/bond-shares-modal.tsx deleted file mode 100644 index 36c8d700..00000000 --- a/examples/interchainjs/components/react/liquidity/bond-shares-modal.tsx +++ /dev/null @@ -1,230 +0,0 @@ -import React, { useState } from 'react'; -import { - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalBody, - ModalCloseButton, - Text, - Flex, - Center, - NumberInput, - NumberInputField, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { Pool } from './provide-liquidity'; -import { LargeButton } from './modal-components'; -import { useTransactionToast } from './hooks'; -import { - convertDollarValueToShares, - getSymbolForDenom, -} from '../../../utils/liquidity'; -import { PriceHash } from '../../../utils/liquidity/types'; -import { truncDecimals } from './pool-detail-modal'; -import BigNumber from 'bignumber.js'; -import { osmosis } from '../../../src/codegen/osmosis/bundle'; -import { useChain } from '@cosmos-kit/react'; -import { chainName } from '../../../config/liquidity/defaults'; -import { Peroid, TransactionResult } from './types'; -import { coins as aminoCoins } from '@cosmjs/amino'; - -const { lockTokens } = osmosis.lockup.MessageComposer.withTypeUrl; - -export const daysToSeconds = (days: string) => { - return (Number(days) * 24 * 60 * 60).toString(); -}; - -const BondSharesModal = ({ - isOpen, - onClose, - currentPool, - prices, - updatePoolsData, - period, - closeDetailModal, -}: { - isOpen: boolean; - onClose: () => void; - currentPool: Pool; - prices: PriceHash; - updatePoolsData: () => void; - period: Peroid; - closeDetailModal: () => void; -}) => { - const [inputShares, setInputShares] = useState(''); - const [isLoading, setIsLoading] = useState(false); - - const { getSigningStargateClient, address } = useChain(chainName); - const { showToast } = useTransactionToast(); - const [isMobile] = useMediaQuery('(max-width: 480px)'); - - const poolName = currentPool?.poolAssets.map(({ token }) => - getSymbolForDenom(token!.denom) - ); - - const unbondedShares = convertDollarValueToShares( - currentPool?.myLiquidity || 0, - currentPool, - prices - ); - - const unbondedSharesDisplay = new BigNumber(unbondedShares) - .decimalPlaces(18, BigNumber.ROUND_DOWN) - .toString(); - - const isAmountEmpty = new BigNumber(inputShares || 0).lte(0); - const isAmountInsufficient = new BigNumber(inputShares || 0).gt( - unbondedSharesDisplay - ); - - const btnText = isAmountEmpty - ? 'Amount is empty' - : isAmountInsufficient - ? 'Insufficient amount' - : 'Bond'; - - const closeModal = () => { - onClose(); - setInputShares(''); - }; - - const handleClick = async () => { - setIsLoading(true); - - const stargateClient = await getSigningStargateClient(); - - if (!stargateClient || !address) { - console.error('stargateClient undefined or address undefined.'); - return; - } - - const coins = [ - { - amount: new BigNumber(inputShares).shiftedBy(18).toString(), - denom: `gamm/pool/${currentPool.id}`, - }, - ]; - - const msg = lockTokens({ - coins, - owner: address, - duration: { - seconds: BigInt(daysToSeconds(period)), - nanos: 0, - }, - }); - - const fee = { - amount: aminoCoins(0, 'uosmo'), - gas: '450000', - }; - - try { - const res = await stargateClient.signAndBroadcast(address, [msg], fee); - if (res?.code !== TransactionResult.Success) throw res; - stargateClient.disconnect(); - setIsLoading(false); - showToast(res.code); - closeModal(); - closeDetailModal(); - updatePoolsData(); - } catch (error) { - console.error(error); - stargateClient.disconnect(); - setIsLoading(false); - showToast(TransactionResult.Failed, error); - } - }; - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const statColor = useColorModeValue('#2C3137', '#EEF2F8'); - const bgColor = useColorModeValue('#EEF2F8', '#1D2024'); - const borderColor = useColorModeValue('#D1D6DD', '#434B55'); - - return ( - - - - - - Bond LP Tokens - - - {poolName?.join(' / ')} - - - - - - - Amount to bond - - - Available {isMobile && 'shares'} - setInputShares(unbondedSharesDisplay)} - > - {unbondedSharesDisplay} {!isMobile && 'shares'} - - - - - - setInputShares(val)} - > - - - - -
- -
-
-
-
- ); -}; - -export default BondSharesModal; diff --git a/examples/interchainjs/components/react/liquidity/hooks.tsx b/examples/interchainjs/components/react/liquidity/hooks.tsx deleted file mode 100644 index aa600dcd..00000000 --- a/examples/interchainjs/components/react/liquidity/hooks.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { useToast, Text, Box } from '@chakra-ui/react'; -import { TransactionResult } from './types'; - -export const useTransactionToast = () => { - const toast = useToast({ - position: 'top-right', - containerStyle: { - maxWidth: '150px', - }, - }); - - const showToast = (code: number, res?: any) => { - toast({ - title: `Transaction ${ - code === TransactionResult.Success ? 'successful' : 'failed' - }`, - status: code === TransactionResult.Success ? 'success' : 'error', - duration: code === TransactionResult.Success ? 5000 : 20000, - isClosable: true, - description: ( - - {res?.message} - {res?.rawLog} - - ), - }); - }; - - return { showToast }; -}; diff --git a/examples/interchainjs/components/react/liquidity/index.ts b/examples/interchainjs/components/react/liquidity/index.ts deleted file mode 100644 index 3328f2c9..00000000 --- a/examples/interchainjs/components/react/liquidity/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './provide-liquidity'; diff --git a/examples/interchainjs/components/react/liquidity/modal-components.tsx b/examples/interchainjs/components/react/liquidity/modal-components.tsx deleted file mode 100644 index 37654ccc..00000000 --- a/examples/interchainjs/components/react/liquidity/modal-components.tsx +++ /dev/null @@ -1,326 +0,0 @@ -import { - Box, - Button, - Flex, - Text, - useColorModeValue, - useMediaQuery, - useRadio, - UseRadioProps, -} from '@chakra-ui/react'; -import BigNumber from 'bignumber.js'; -import { ChainLogo } from './pool-card'; -import { truncDecimals } from './pool-detail-modal'; - -export const NormalButton = ({ - type, - size, - onClick, - text, - mr, - disabled, - isLoading = false, -}: { - type: 'solid' | 'outline'; - size: { w: string; h: string }; - onClick: () => void; - text: string; - mr?: string; - disabled?: boolean; - isLoading?: boolean; -}) => { - const baseStyle = { - solid: { - color: useColorModeValue('#FFF', '#1D2024'), - backgroundColor: useColorModeValue('#2C3137', '#EEF2F8'), - }, - outline: { - color: useColorModeValue('#2C3137', '#EEF2F8'), - border: `2px solid ${useColorModeValue('#2C3137', '#EEF2F8')}`, - backgroundColor: 'transparent', - }, - }; - - const isDisabledState = isLoading || disabled; - - return ( - - ); -}; - -export const LargeButton = ({ - width, - btnText, - isLoading, - handleClick, - disabled, -}: { - width: string; - btnText: string; - isLoading: boolean; - handleClick: () => void; - disabled?: boolean; -}) => { - return ( - - ); -}; - -export const PoolAssetDisplay = ({ - logoUrl, - amount, - token, - mt, -}: { - logoUrl: string | undefined; - amount: number | string; - token: string; - mt?: string; -}) => { - const textColor = useColorModeValue('#697584', '#A7B4C2'); - - return ( - - - - {amount} - - - {token} - - - ); -}; - -export const BondLiquidityCard = ({ - duration, - openBondModal, - apr, - bondedShares, - bondedValue, - onUnbondClick, - isUnbonding, -}: { - duration: string; - openBondModal: () => void; - apr: number | string; - bondedValue: number | string; - bondedShares: number | string; - onUnbondClick: () => void; - isUnbonding: boolean; -}) => { - const val = new BigNumber(bondedValue); - const isValueTooSmall = val.lt(0.01) && val.gt(0); - const [isMobile] = useMediaQuery('(max-width: 480px)'); - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const statColor = useColorModeValue('#2C3137', '#EEF2F8'); - - return ( - - - - Bonded {duration} day - - - - APR - - - {truncDecimals(apr, 2)} - - - % - - - - {isValueTooSmall && ( - - {'<'} - - )} - - $ - - - {isValueTooSmall ? '0.01' : truncDecimals(bondedValue, 2)} - - - - - {truncDecimals(bondedShares, 4)} - - - pool shares - - - - - - - - - ); -}; - -export const RadioCard = ( - props: UseRadioProps & { title: string; apr: string } -) => { - const { getInputProps, getCheckboxProps } = useRadio(props); - const { apr, title } = props; - - const input = getInputProps(); - const checkbox = getCheckboxProps(); - - return ( - - - - - - - - {title} - - {apr} - - - - - ); -}; - -export const RewardText = ({ reward }: { reward: number }) => { - const rewardDisplay = truncDecimals(reward, 2); - const rewardNum = new BigNumber(reward); - const isRewardEqualsToZero = rewardNum.isEqualTo(0); - const isRewardTooSmall = rewardNum.lt(0.01) && rewardNum.gt(0); - - return ( - - {isRewardTooSmall && ( - - {'<'} - - )} - - $ - {!isRewardEqualsToZero - ? isRewardTooSmall - ? '0.01' - : rewardDisplay - : '0'} - - / - day - - ); -}; diff --git a/examples/interchainjs/components/react/liquidity/pool-card.tsx b/examples/interchainjs/components/react/liquidity/pool-card.tsx deleted file mode 100644 index 19a24f3a..00000000 --- a/examples/interchainjs/components/react/liquidity/pool-card.tsx +++ /dev/null @@ -1,170 +0,0 @@ -import React from 'react'; -import { - Box, - Divider, - Flex, - Text, - Image, - Skeleton, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { Pool } from './provide-liquidity'; -import { getLogoUrlFromDenom } from './pool-list'; -import BigNumber from 'bignumber.js'; -import { truncDecimals } from './pool-detail-modal'; -import { getSymbolForDenom } from '../../../utils/liquidity'; - -const formatNumber = (number: number | string) => { - const formatter = Intl.NumberFormat('en', { - notation: 'compact', - maximumFractionDigits: 1, - }); - return formatter.format(new BigNumber(number).toNumber()); -}; - -export const ChainLogo = ({ - isAtRight = false, - url, - width, -}: { - isAtRight?: boolean; - url: string | undefined; - width?: string; -}) => { - const leftOffset = isAtRight ? '-10px' : 0; - if (!url) - return ( - - ? - - ); - return ( - - ); -}; - -const PoolCard = ({ - pool, - setPool, - openPoolDetailModal, - isFetchingApr, -}: { - pool: Pool; - setPool: (pool: Pool) => void; - openPoolDetailModal: () => void; - isFetchingApr: boolean; -}) => { - const [isMobile] = useMediaQuery('(max-width: 680px)'); - const poolNameColor = useColorModeValue('#2C3137', '#EEF2F8'); - const poolIdColor = useColorModeValue('#697584', '#A7B4C2'); - const aprTextColor = useColorModeValue('#2C3137', '#EEF2F8'); - - return ( - { - setPool(pool); - openPoolDetailModal(); - }} - transition="all 0.1s linear" - _hover={{ - bg: useColorModeValue('#DDE3EB', '#24282E'), - }} - > - - - - - - {pool.poolAssets - .map(({ token }) => getSymbolForDenom(token!.denom)) - .join('/')} - - - Pool #{pool.id} - - - - - - APR - - {isFetchingApr ? ( - - ) : ( - - - {truncDecimals(pool.apr['14'].totalApr, 2)} - - % - - )} - - - Liquidity - ${formatNumber(pool.liquidity)} - - - 7D Fees - ${pool.fees7D.toLocaleString()} - - {/* */} - {/* - Your Liquidity - $1329.32 - - - Bonded - $600.00 - */} - - ); -}; - -export default PoolCard; diff --git a/examples/interchainjs/components/react/liquidity/pool-detail-modal.tsx b/examples/interchainjs/components/react/liquidity/pool-detail-modal.tsx deleted file mode 100644 index 8b36033c..00000000 --- a/examples/interchainjs/components/react/liquidity/pool-detail-modal.tsx +++ /dev/null @@ -1,427 +0,0 @@ -import React, { useState } from 'react'; -import { - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalCloseButton, - ModalBody, - Text, - Flex, - Box, - Heading, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { Pool } from './provide-liquidity'; -import { getLogoUrlFromDenom } from './pool-list'; -import { ChainLogo } from './pool-card'; -import { Coin } from 'osmojs/dist/codegen/cosmos/base/v1beta1/coin'; -import { - NormalButton, - PoolAssetDisplay, - BondLiquidityCard, - RewardText, -} from './modal-components'; -import { useTransactionToast } from './hooks'; -import BigNumber from 'bignumber.js'; -import { - convertDollarValueToShares, - convertDollarValueToCoins, - convertGammTokenToDollarValue, - getSymbolForDenom, -} from '../../../utils/liquidity'; -import { PriceHash } from '../../../utils/liquidity/types'; -import { osmosis } from '../../../src/codegen/osmosis/bundle'; -import { useChain } from '@cosmos-kit/react'; -import { chainName } from '../../../config/liquidity/defaults'; -import { PeriodLock } from '../../../src/codegen/osmosis/lockup/lock'; -import { daysToSeconds } from './bond-shares-modal'; -import Long from 'long'; -import dayjs from 'dayjs'; -import { coins as aminoCoins } from '@cosmjs/amino'; -import { Peroid, TransactionResult } from './types'; - -export const truncDecimals = ( - val: string | number | undefined, - decimals: number -) => { - return new BigNumber(val || 0).decimalPlaces(decimals).toString(); -}; - -const { beginUnlocking } = osmosis.lockup.MessageComposer.withTypeUrl; -const { superfluidUnbondLock, superfluidUndelegate } = - osmosis.superfluid.MessageComposer.withTypeUrl; - -const durations = ['1', '7', '14'] as const; - -export const PoolDetailModal = ({ - isOpen, - onClose, - pool, - prices, - openModals, - delegatedCoins, - updatePoolsData, - rewardPerDay, - setPeroid, - locks, -}: { - isOpen: boolean; - onClose: () => void; - pool: Pool; - prices: PriceHash; - locks: PeriodLock[]; - delegatedCoins: Coin[]; - updatePoolsData: () => void; - rewardPerDay: number; - setPeroid: (peroid: Peroid) => void; - openModals: { - onAddLiquidityOpen: () => void; - onRemoveLiquidityOpen: () => void; - onBondSharesOpen: () => void; - }; -}) => { - const [unbondingStatus, setUnbondingStatus] = useState<{ - [key: string]: boolean; - }>(); - - const { getSigningStargateClient, address } = useChain(chainName); - const { showToast } = useTransactionToast(); - const [isMobile] = useMediaQuery('(max-width: 480px)'); - - const poolId = pool?.id.toString(); - - const poolName = pool?.poolAssets.map(({ token }) => - getSymbolForDenom(token!.denom) - ); - - const swapFee = new BigNumber(pool!.poolParams!.swapFee) - .shiftedBy(-16) - .toString(); - - const totalBalance = new BigNumber(pool?.myLiquidity || 0).plus( - pool?.bonded || 0 - ); - - const totalShares = convertDollarValueToShares( - totalBalance.toString(), - pool, - prices - ); - - const coins = convertDollarValueToCoins( - totalBalance.toString(), - pool, - prices - ); - - const unbondedShares = convertDollarValueToShares( - pool?.myLiquidity || 0, - pool, - prices - ); - - const bondedData = durations - .filter((duration) => { - const gaugeAprs = pool.apr[duration].gaugeAprs; - return gaugeAprs && gaugeAprs.length > 0; - }) - .map((duration) => { - const lock = locks.find( - (l) => - l.coins[0].denom === pool.totalShares?.denom && - BigInt(daysToSeconds(duration)) === l.duration?.seconds && - dayjs().isAfter(l.endTime) - ); - - if (!lock) { - return { - ID: '', - apr: pool.apr[duration], - value: '0', - shares: '0', - duration, - }; - } - - const value = convertGammTokenToDollarValue(lock.coins[0], pool, prices); - const shares = convertDollarValueToShares(value, pool, prices); - - return { - ID: lock.ID.toString(), - apr: pool.apr[duration], - value, - shares, - duration, - }; - }); - - const handleUnbondClick = async (ID: string | null, duration: string) => { - if (!ID) return; - setUnbondingStatus((prev) => ({ ...prev, [ID]: true })); - - const stargateClient = await getSigningStargateClient(); - - if (!stargateClient || !address) { - console.error('stargateClient undefined or address undefined.'); - return; - } - - const hasOsmoToken = pool.poolAssets.some( - ({ token }) => token?.denom === 'uosmo' - ); - const hasDelegatedCoin = delegatedCoins.some( - ({ denom }) => denom === pool.totalShares?.denom - ); - const isSuperfluidBonded = - hasOsmoToken && duration === '14' && hasDelegatedCoin; - - let msg = []; - - if (isSuperfluidBonded) { - const superfluidUndelegateMsg = superfluidUndelegate({ - lockId: BigInt(ID), - sender: address, - }); - const superfluidUnbondLockMsg = superfluidUnbondLock({ - lockId: BigInt(ID), - sender: address, - }); - msg = [superfluidUndelegateMsg, superfluidUnbondLockMsg]; - } else { - const beginUnlockingMsg = beginUnlocking({ - ID: BigInt(ID), - coins: [], - owner: address, - }); - msg.push(beginUnlockingMsg); - } - - const fee = { - amount: aminoCoins(0, 'uosmo'), - gas: '600000', - }; - - try { - const res = await stargateClient.signAndBroadcast(address, msg, fee); - if (res?.code !== TransactionResult.Success) throw res; - stargateClient.disconnect(); - setUnbondingStatus((prev) => ({ ...prev, [ID]: false })); - showToast(res.code); - onClose(); - updatePoolsData(); - } catch (error) { - console.error(error); - stargateClient.disconnect(); - setUnbondingStatus((prev) => ({ ...prev, [ID]: false })); - showToast(TransactionResult.Failed, error); - } - }; - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const statColor = useColorModeValue('#2C3137', '#EEF2F8'); - - return ( - <> - - - - - - {poolName?.join(' / ')} - - - Pool #{poolId} - - - - - - - - - - - Pool liquidity - - - ${pool?.liquidity.toLocaleString()} - - - - - - - Swap fee - - - {swapFee}% - - - - - 24h trading volume - - - ${pool?.volume24H.toLocaleString()} - - - - - - - - Your pool balance - - - - - ${totalBalance.decimalPlaces(2).toString()} - - - {truncDecimals(totalShares, 6)} pool shares - - - - {coins.map((coin) => ( - - ))} - - - - - - - - - - Currently earning - - - - - - - - Bond your liquidity  - {bondedData.length === 0 && (unavailable)} - - - Bond your tokens to earn additional OSMO rewards to the swap - fees. - - - - - Unbonded - - - ${truncDecimals(pool?.myLiquidity, 2)} - - - - {truncDecimals(unbondedShares, 4)} - - - pool shares - - - - - - {bondedData.map((bonded) => ( - { - setPeroid(bonded.duration); - openModals.onBondSharesOpen(); - }} - onUnbondClick={() => - handleUnbondClick(bonded.ID, bonded.duration) - } - key={bonded.duration} - isUnbonding={ - !!unbondingStatus && !!unbondingStatus[bonded.ID] - } - /> - ))} - - - - - - ); -}; diff --git a/examples/interchainjs/components/react/liquidity/pool-list.tsx b/examples/interchainjs/components/react/liquidity/pool-list.tsx deleted file mode 100644 index 6b22ebd1..00000000 --- a/examples/interchainjs/components/react/liquidity/pool-list.tsx +++ /dev/null @@ -1,489 +0,0 @@ -import React from 'react'; -import { - Icon, - Image, - Flex, - TableContainer, - Table, - Tr, - Th, - Thead, - Tbody, - Td, - Text, - Center, - Box, - Popover, - PopoverArrow, - PopoverBody, - PopoverContent, - PopoverTrigger, - Portal, - Grid, - GridItem, - Skeleton, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { SlOptionsVertical } from 'react-icons/sl'; -import { Pool } from './provide-liquidity'; -import BigNumber from 'bignumber.js'; -import { truncDecimals } from './pool-detail-modal'; -import { - getOsmoAssetByDenom, - getSymbolForDenom, -} from '../../../utils/liquidity'; - -export const getLogoUrlFromDenom = (denom: string | undefined) => { - if (!denom) return ''; - const asset = getOsmoAssetByDenom(denom); - return asset?.logo_URIs?.png; -}; - -export const ChainLogo = ({ - index, - logoWidth, - url, -}: { - index: number; - logoWidth: number; - url: string | undefined; -}) => { - if (!url) - return ( -
- ? -
- ); - return ( - - ); -}; - -const PoolName = ({ isMyPools, pool }: { isMyPools: boolean; pool: Pool }) => { - const myPoolsColor = useColorModeValue('#2C3137', '#EEF2F8'); - const allPoolsColor = useColorModeValue('#697584', '#A7B4C2'); - const poolIdColor = useColorModeValue('#697584', '#A7B4C2'); - - return ( - - - {pool.poolAssets.length > 2 - ? `${pool.poolAssets.length} Token Pool` - : pool.poolAssets - .map(({ token }) => getSymbolForDenom(token!.denom)) - .join('/')} - - - Pool #{pool.id.toString()} - - - ); -}; - -const ChainLogoGroup = ({ - pool, - style, - logoWidth, -}: { - pool: Pool; - logoWidth: number; - style?: React.CSSProperties; -}) => { - return ( - - {pool.poolAssets.slice(0, 3).map(({ token }, i) => { - const denom = token!.denom; - return ( - - ); - })} - {pool.poolAssets.length > 3 && ( - - +{pool.poolAssets.length - 3} - - )} - - ); -}; - -const PoolStat = ({ - name, - amount, - isMyPools, -}: { - name: string; - amount: string; - isMyPools: boolean; -}) => { - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const myPoolsStatColor = useColorModeValue('#2C3137', '#EEF2F8'); - const allPoolsStatColor = useColorModeValue('#697584', '#A7B4C2'); - return ( - - - {name} - - - {amount} - - - ); -}; - -const MenuPopover = ({ - pool, - handleAddLiquidityClick, - handleRemoveLiquidityClick, - handleViewDetailClick, -}: { - pool: Pool; - handleAddLiquidityClick: () => void; - handleRemoveLiquidityClick: () => void; - handleViewDetailClick: () => void; -}) => { - const hoverBgColor = useColorModeValue('#EEF2F8', '#1D2024'); - return ( - - -
e.stopPropagation()} - > - -
-
- - - - - { - e.stopPropagation(); - handleAddLiquidityClick(); - }} - > - Add liquidity - - {new BigNumber(pool.myLiquidity || 0).gt(0) && ( - { - e.stopPropagation(); - handleRemoveLiquidityClick(); - }} - > - Remove liquidity - - )} - { - e.stopPropagation(); - handleViewDetailClick(); - }} - > - View pool detail - - - - -
- ); -}; - -const PoolList = ({ - pools, - isMyPools = false, - setPool, - openPoolDetailModal, - isFetchingApr, - openModals, -}: { - pools: Pool[]; - isMyPools?: boolean; - setPool: (pool: Pool) => void; - openPoolDetailModal: () => void; - isFetchingApr: boolean; - openModals: { - onAddLiquidityOpen: () => void; - onRemoveLiquidityOpen: () => void; - }; -}) => { - const poolProperties = isMyPools - ? ['My Liquidity', 'Bonded'] - : ['24H Volume', '7D Fees']; - - const tableHeaders: string[] = [ - '', - 'Pool', - 'Liquidity', - ...poolProperties, - 'APR', - '', - ]; - - const mobileHeaders = tableHeaders.slice(2, 5); - - const hasMultiTokens = pools.some(({ poolAssets }) => poolAssets.length > 2); - const [isMobile] = useMediaQuery('(max-width: 780px)'); - - const transformData = (isMyPools: boolean, pool: Pool) => { - const dataSource = isMyPools - ? [pool.myLiquidity, pool.bonded] - : [pool.volume24H, pool.fees7D]; - - const poolData = dataSource.map((data) => { - if (isMyPools) - return new BigNumber(data || 0).decimalPlaces(3).toString(); - return data; - }); - - const allData = [pool.liquidity, ...poolData]; - - const formattedData = allData.map((item) => { - return '$' + (item ?? 0).toLocaleString(); - }); - - return formattedData; - }; - - const tableHeaderColor = useColorModeValue('#697584', '#A7B4C2'); - const myPoolsStatColor = useColorModeValue('#2C3137', '#EEF2F8'); - const allPoolsStatColor = useColorModeValue('#697584', '#A7B4C2'); - const rowHoverBgColor = useColorModeValue('#DDE3EB', '#1D2024'); - - return ( - <> - {isMobile ? ( - - {pools.map((pool) => { - const formattedData = transformData(isMyPools, pool); - - return ( - - - - - - - - - - - { - setPool(pool); - openPoolDetailModal(); - }} - handleAddLiquidityClick={() => { - setPool(pool); - openModals.onAddLiquidityOpen(); - }} - handleRemoveLiquidityClick={() => { - setPool(pool); - openModals.onRemoveLiquidityOpen(); - }} - pool={pool} - /> - - - {mobileHeaders.map((header, i) => ( - - - - ))} - - ); - })} - - ) : ( - - - - - {tableHeaders.map((header, i) => ( - - ))} - - - - {pools.map((pool) => { - const formattedData = transformData(isMyPools, pool); - - return ( - { - setPool(pool); - openPoolDetailModal(); - }} - cursor="pointer" - _hover={{ - backgroundColor: rowHoverBgColor, - }} - > - - - {formattedData.map((stat, i) => ( - - ))} - - - - ); - })} - -
- {header} -
- - - - - - {stat} - - - - - {truncDecimals(pool.apr['14'].totalApr, 2) + '%'} - - - - { - setPool(pool); - openPoolDetailModal(); - }} - handleAddLiquidityClick={() => { - setPool(pool); - openModals.onAddLiquidityOpen(); - }} - handleRemoveLiquidityClick={() => { - setPool(pool); - openModals.onRemoveLiquidityOpen(); - }} - pool={pool} - /> -
-
- )} - - ); -}; - -export default PoolList; diff --git a/examples/interchainjs/components/react/liquidity/pools-overview.tsx b/examples/interchainjs/components/react/liquidity/pools-overview.tsx deleted file mode 100644 index c2b75e2b..00000000 --- a/examples/interchainjs/components/react/liquidity/pools-overview.tsx +++ /dev/null @@ -1,194 +0,0 @@ -import { - Grid, - GridItem, - Flex, - Image, - Text, - useMediaQuery, - Box, - useColorModeValue, -} from '@chakra-ui/react'; -import { useChain, useManager } from '@cosmos-kit/react'; -import { EpochInfo } from 'osmojs/types/codegen/osmosis/epochs/genesis'; -import { ReactElement, useCallback, useEffect, useRef, useState } from 'react'; -import { chainName } from '../../../config/liquidity'; -import { RewardText } from './modal-components'; -import dayjs from 'dayjs'; -import duration from 'dayjs/plugin/duration'; -import { osmosis } from '../../../src/codegen/osmosis/bundle'; - -dayjs.extend(duration); - -const Colon = () => ( - - : - -); - -const StatBox = ({ - children, - bgColor, - width, -}: { - bgColor?: string; - children: ReactElement; - width: { [key: string]: string } | string; -}) => { - const defaultBgColor = useColorModeValue('#F5F7FB', '#1D2024'); - - return ( - - {children} - - ); -}; - -export const PoolsOverview = ({ - osmoPrice, - totalRewardPerDay, -}: { - osmoPrice: string | number; - totalRewardPerDay: number; -}) => { - const [countdown, setCountdown] = useState(['00', '00', '00']); - const isMountedRef = useRef(false); - - const { getRpcEndpoint } = useChain(chainName); - const { getChainLogo } = useManager(); - - const [isMobile] = useMediaQuery('(max-width: 660px)'); - - const getEpoch = useCallback(async () => { - let rpcEndpoint = await getRpcEndpoint(); - - if (!rpcEndpoint) { - console.log('no rpc endpoint — using a fallback'); - rpcEndpoint = `https://rpc.cosmos.directory/${chainName}`; - } - - const client = await osmosis.ClientFactory.createRPCQueryClient({ - rpcEndpoint, - }); - - const { epochs } = await client.osmosis.epochs.v1beta1.epochInfos(); - - const currentEpoch = epochs.find((epoch) => epoch.identifier === 'day'); - - const startTime = currentEpoch?.currentEpochStartTime; - const duration = currentEpoch?.duration?.seconds || 60 * 60 * 24; - const endTime = startTime - ? dayjs(startTime).add(Number(duration), 'second') - : null; - - const countdownInterval = setInterval(async () => { - if (dayjs().isAfter(endTime)) clearInterval(countdownInterval); - - const leftTime = endTime - ? dayjs.duration(endTime.diff(dayjs())).format('HH:mm:ss') - : null; - setCountdown(leftTime ? leftTime.split(':') : ['']); - }, 1000); - }, [getRpcEndpoint]); - - useEffect(() => { - if (!isMountedRef.current) { - getEpoch(); - isMountedRef.current = true; - } - }, [getEpoch]); - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const amountColor = useColorModeValue('#2C3137', '#EEF2F8'); - - return ( - - - - - Osmosis - - - OSMO Price - - - - $ - - - {Number(osmoPrice).toFixed(2)} - - - - - - - - - - - - Reward distribution in - - - {countdown[0]} - - {countdown[1]} - - {countdown[2]} - - - - - - - - - Currently earning - - - - - - - ); -}; diff --git a/examples/interchainjs/components/react/liquidity/provide-liquidity.tsx b/examples/interchainjs/components/react/liquidity/provide-liquidity.tsx deleted file mode 100644 index 51a74bec..00000000 --- a/examples/interchainjs/components/react/liquidity/provide-liquidity.tsx +++ /dev/null @@ -1,508 +0,0 @@ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { useChain } from '@cosmos-kit/react'; -import { - Box, - Center, - Flex, - Heading, - Spinner, - Text, - useColorMode, - useColorModeValue, - useDisclosure, -} from '@chakra-ui/react'; -import { ChevronDownIcon, ChevronUpIcon } from '@chakra-ui/icons'; -import { Pool as OsmosisPool } from '../../../src/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; -import { Coin } from 'osmojs/types/codegen/cosmos/base/v1beta1/coin'; -import BigNumber from 'bignumber.js'; -import { chainName } from '../../../config/liquidity'; -import PoolList from './pool-list'; -import PoolCard from './pool-card'; -import { PoolDetailModal } from './pool-detail-modal'; -import AddLiquidityModal from './add-liquidity-modal'; -import RemoveLiquidityModal from './remove-liquidity-modal'; -import BondSharesModal from './bond-shares-modal'; -import { - ExtraPoolProperties, - GaugeQueryResult, - Peroid, - PoolApr, -} from './types'; -import { - convertGammTokenToDollarValue, - calcPoolAprs, - calcPoolLiquidity, -} from '../../../utils/liquidity'; -import { PriceHash } from '../../../utils/liquidity/types'; -import { PoolsOverview } from './pools-overview'; -import * as api from '../../../api'; -import { - useOsmosisRequests, - useQueuedRequests, - useRequest, -} from '../../../hooks'; - -export type Pool = OsmosisPool & ExtraPoolProperties; - -const addPropertiesToPool = ( - pool: OsmosisPool, - fees: api.Fee[], - balances: Coin[], - lockedCoins: Coin[], - prices: PriceHash -) => { - const liquidity = new BigNumber(calcPoolLiquidity(pool, prices)) - .decimalPlaces(0) - .toNumber(); - - const feeData = fees.find((fee) => fee.pool_id === pool.id.toString()); - const volume24H = Math.round(Number(feeData?.volume_24h || 0)); - const volume7d = Math.round(Number(feeData?.volume_7d || 0)); - const fees7D = Math.round(Number(feeData?.fees_spent_7d || 0)); - - const balanceCoin = balances.find( - ({ denom }) => denom === pool.totalShares?.denom - ); - const myLiquidity = balanceCoin - ? convertGammTokenToDollarValue(balanceCoin, pool, prices) - : 0; - - const lockedCoin = lockedCoins.find( - ({ denom }) => denom === pool.totalShares?.denom - ); - const bonded = lockedCoin - ? convertGammTokenToDollarValue(lockedCoin, pool, prices) - : 0; - - const apr = { - 1: { totalApr: '0' }, - 7: { totalApr: '0' }, - 14: { totalApr: '0' }, - }; - - return { - ...pool, - liquidity, - volume24H, - fees7D, - volume7d, - apr, - myLiquidity, - bonded, - }; -}; - -export const ProvideLiquidity = () => { - const [showAll, setShowAll] = useState(false); - const [period, setPeriod] = useState('14'); - const [pool, setPool] = useState(); - - const bondSharesModal = useDisclosure(); - const poolDetailModal = useDisclosure(); - const addLiquidityModal = useDisclosure(); - const removeLiquidityModal = useDisclosure(); - - const { address, assets } = useChain(chainName); - const { colorMode } = useColorMode(); - - const getFees = useRequest(api.getFees); - const getTokens = useRequest(api.getTokens); - const getRewards = useRequest(api.getRewards); - const getSuperfluidApr = useRequest( - api.getSuperfluidApr - ); - - const getGaugesRequest = useQueuedRequests({ - queueLength: 10, - queueGap: 1000, - }); - - const { - getAllBalances, - getAllPools, - getLockedCoins, - getLockableDurations, - getLocks, - getSuperfluidAssets, - getSuperfluidDelegations, - getActiveGauges, - } = useOsmosisRequests(chainName); - - const prices = useMemo(() => { - if (!getTokens.data) return; - const prices: PriceHash = getTokens.data.reduce( - (prev, cur) => ({ - ...prev, - [cur.denom]: cur.price, - }), - {} - ); - return prices; - }, [getTokens.data]); - - useEffect(() => { - getFees.request(); - getTokens.request(); - getSuperfluidApr.request(); - getLockableDurations.request(); - getSuperfluidAssets.request(); - - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - useEffect(() => { - if (!address) return; - getRewards.request(address); - getAllBalances.request({ address }); - getLockedCoins.request({ owner: address }); - getLocks.request({ owner: address }); - getSuperfluidDelegations.request({ delegatorAddress: address }); - - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [address]); - - useEffect(() => { - if (!prices) return; - getAllPools.request(prices); - - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [prices]); - - const osmoPrice = useMemo(() => { - if (!getTokens.data) return 0; - return ( - getTokens.data.find((token) => token.denom === assets?.assets[0].base) - ?.price || 0 - ); - }, [assets, getTokens.data]); - - const prettyPools = useMemo(() => { - const fees = getFees.data; - const allPools = getAllPools.data; - const balances = getAllBalances.data; - const lockedCoins = getLockedCoins.data; - - if (!allPools || !prices || !fees || !balances || !lockedCoins) return; - - return allPools.map((pool) => - addPropertiesToPool(pool, fees, balances, lockedCoins, prices) - ); - }, [ - prices, - getFees.data, - getAllPools.data, - getLockedCoins.data, - getAllBalances.data, - ]); - - const allPoolAprs = useMemo(() => { - if ( - !prices || - !prettyPools || - !getSuperfluidApr.data || - !getSuperfluidAssets.data || - !getLockableDurations.data || - getGaugesRequest.data.length === 0 - ) - return; - - const allPoolAprs: { [key: number]: PoolApr } = - getGaugesRequest.data.reduce((prev, cur) => { - const pool = prettyPools.find( - ({ id }) => id.toString() === cur.poolId.toString() - )!; - const swapFee = new BigNumber(pool.poolParams!.swapFee) - .shiftedBy(-18) - .toString(); - const apr = ['1', '7', '14'].reduce((aprs, duration) => { - return { - ...aprs, - [duration]: calcPoolAprs({ - pool, - prices, - swapFee, - activeGauges: cur.gauges, - aprSuperfluid: getSuperfluidApr.data!, - lockupDurations: getLockableDurations.data!, - superfluidPools: getSuperfluidAssets.data!, - volume7d: pool.volume7d, - lockup: duration, - }), - }; - }, {}); - return { ...prev, [cur.poolId]: apr }; - }, {}); - - return allPoolAprs; - }, [ - getGaugesRequest.data, - getLockableDurations.data, - getSuperfluidApr.data, - getSuperfluidAssets.data, - prettyPools, - prices, - ]); - - const addAprToPool = useCallback( - (pool: Pool) => { - if (!pool || !allPoolAprs || !allPoolAprs[Number(pool.id)]) return pool; - return { - ...pool, - apr: allPoolAprs[Number(pool.id)], - }; - }, - [allPoolAprs] - ); - - const allPools = useMemo(() => { - if (!prettyPools) return; - return prettyPools - .sort((a, b) => (new BigNumber(a.liquidity).lt(b.liquidity) ? 1 : -1)) - .slice(0, 20) - .map(addAprToPool); - }, [addAprToPool, prettyPools]); - - const highlightedPools = useMemo(() => { - if (!getSuperfluidAssets.data || !prettyPools) return; - const poolsData = getSuperfluidAssets.data - .map(({ denom }) => { - const poolId = parseInt(denom.match(/\d+/)![0]); - const poolData = prettyPools.find( - ({ id }) => id.toString() === poolId.toString() - ); - if (!poolData) return; - return poolData; - }) - .filter(Boolean) as Pool[]; - - return poolsData - .sort((a, b) => (new BigNumber(a!.liquidity).lt(b!.liquidity) ? 1 : -1)) - .slice(0, 3) - .map(addAprToPool); - }, [addAprToPool, getSuperfluidAssets.data, prettyPools]); - - const myPools = useMemo(() => { - if (!getAllBalances.data || !prettyPools || !address) return; - const poolsData = getAllBalances.data - .filter(({ denom }) => denom.startsWith('gamm/pool')) - .map((coin) => { - const poolId = parseInt(coin.denom.match(/\d+/)![0]); - const poolData = prettyPools.find( - ({ id }) => id.toString() === poolId.toString() - ); - if (!poolData) return; - return poolData; - }) - .filter(Boolean) as Pool[]; - - return poolsData.map(addAprToPool); - }, [addAprToPool, getAllBalances.data, prettyPools, address]); - - useEffect(() => { - if (!allPools || !highlightedPools || !myPools || !prettyPools) return; - - const poolIds = [...allPools, ...highlightedPools, ...myPools].map( - (pool) => pool.id - ); - - const poolIdsWithDenom: { id: number; denom: string }[] = [ - ...new Set(poolIds), - ] - .map((id) => prettyPools.find((pool) => pool.id === id)!) - .map((pool) => ({ - id: Number(pool.id), - denom: pool.totalShares!.denom, - })) - .filter(({ id }) => !allPoolAprs || !allPoolAprs[id]); - - if (poolIdsWithDenom.length === 0) return; - - const activeGaugesQueries = poolIdsWithDenom.map(({ id, denom }) => { - return getActiveGauges({ denom }).then((res) => ({ - poolId: id, - gauges: res.data, - })); - }); - - getGaugesRequest.sendQueuedRequests(activeGaugesQueries); - - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [allPools, highlightedPools, myPools, prettyPools]); - - const updatePoolsData = () => { - if (!address) return; - getLockedCoins.request({ owner: address }); - getAllBalances.request({ address }); - }; - - const headingColor = useColorModeValue('#697584', '#A7B4C2'); - - const isLoading = - getLocks.loading || - getRewards.loading || - getAllBalances.loading || - getLockedCoins.loading || - getSuperfluidDelegations.loading; - - return ( - - - Liquidity Pools - - - - - {/* MY POOLS */} - - My Pools - - - {isLoading ? ( -
- -
- ) : ( - <> - {myPools && myPools.length > 0 && ( - - )} - - )} -
- - {/* HIGHLIGHTED POOLS */} - - Highlighted Pools - - - {highlightedPools?.map((pool) => ( - - ))} - - - {/* ALL POOLS */} - - All Pools - - - {allPools && allPools.length > 0 && ( - - )} - {allPools && allPools.length > 6 && ( - - setShowAll(!showAll)} - > - {`Show ${showAll ? 'less' : 'more'}`} - {showAll ? ( - - ) : ( - - )} - - - )} - - - {pool && prices && getLocks.data && getSuperfluidDelegations.data && ( - - )} - - {pool && prices && getAllBalances.data && ( - - )} - - {pool && prices && ( - - )} - - {pool && prices && ( - - )} -
- ); -}; diff --git a/examples/interchainjs/components/react/liquidity/remove-liquidity-modal.tsx b/examples/interchainjs/components/react/liquidity/remove-liquidity-modal.tsx deleted file mode 100644 index cfad9f50..00000000 --- a/examples/interchainjs/components/react/liquidity/remove-liquidity-modal.tsx +++ /dev/null @@ -1,268 +0,0 @@ -import React, { useState } from 'react'; -import { - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalBody, - ModalCloseButton, - Text, - Flex, - Slider, - SliderFilledTrack, - SliderThumb, - SliderTrack, - Box, - Center, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { Pool } from './provide-liquidity'; -import { LargeButton, PoolAssetDisplay } from './modal-components'; -import { useTransactionToast } from './hooks'; -import { - convertDollarValueToCoins, - convertDollarValueToShares, - getSymbolForDenom, - noDecimals, -} from '../../../utils/liquidity'; -import { truncDecimals } from './pool-detail-modal'; -import { Coin } from 'osmojs/types/codegen/cosmos/base/v1beta1/coin'; -import { PriceHash } from '../../../utils/liquidity/types'; -import { getLogoUrlFromDenom } from './pool-list'; -import BigNumber from 'bignumber.js'; -import { osmosis } from '../../../src/codegen/osmosis/bundle'; -import { chainName } from '../../../config/liquidity/defaults'; -import { useChain } from '@cosmos-kit/react'; -import { TransactionResult } from './types'; -import { coin, coins as aminoCoins } from '@cosmjs/amino'; - -const { exitPool } = osmosis.gamm.v1beta1.MessageComposer.withTypeUrl; - -const RemoveLiquidityModal = ({ - isOpen, - onClose, - currentPool, - prices, - updatePoolsData, - closeDetailModal, -}: { - isOpen: boolean; - onClose: () => void; - currentPool: Pool; - prices: PriceHash; - updatePoolsData: () => void; - closeDetailModal: () => void; -}) => { - const [percent, setPercent] = useState(50); - const [isLoading, setIsLoading] = useState(false); - const { getSigningStargateClient, address } = useChain(chainName); - const { showToast } = useTransactionToast(); - const [isMobile] = useMediaQuery('(max-width: 480px)'); - - const myLiquidity = new BigNumber(currentPool.myLiquidity || 0) - .multipliedBy(percent) - .div(100) - .toString(); - - const unbondedShares = convertDollarValueToShares( - myLiquidity || 0, - currentPool, - prices - ); - - const coins = convertDollarValueToCoins( - myLiquidity || 0, - currentPool, - prices - ); - - const poolName = currentPool?.poolAssets.map(({ token }) => - getSymbolForDenom(token!.denom) - ); - - const closeModal = () => { - onClose(); - setPercent(50); - }; - - const handleClick = async () => { - setIsLoading(true); - - const stargateClient = await getSigningStargateClient(); - - if (!stargateClient || !address) { - console.error('stargateClient undefined or address undefined.'); - return; - } - - const coinsNeeded = coins.map(({ denom, amount }) => { - const slippage = 2.5; - const amountWithSlippage = new BigNumber(amount) - .multipliedBy(new BigNumber(100).minus(slippage)) - .div(100) - .toString(); - - return { - denom, - amount: noDecimals(amountWithSlippage), - }; - }); - - const shareInAmount = new BigNumber(unbondedShares) - .shiftedBy(18) - .decimalPlaces(0) - .toString(); - - const tokenOutMins = coinsNeeded.map((c: Coin) => { - return coin(c.amount, c.denom); - }); - - const msg = exitPool({ - poolId: currentPool.id, - sender: address, - shareInAmount, - tokenOutMins, - }); - - const fee = { - amount: aminoCoins(0, 'uosmo'), - gas: '280000', - }; - - try { - const res = await stargateClient.signAndBroadcast(address, [msg], fee); - if (res?.code !== TransactionResult.Success) throw res; - stargateClient.disconnect(); - setIsLoading(false); - showToast(res.code); - closeModal(); - closeDetailModal(); - updatePoolsData(); - } catch (error) { - console.error(error); - stargateClient.disconnect(); - setIsLoading(false); - showToast(TransactionResult.Failed, error); - } - }; - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const statColor = useColorModeValue('#2C3137', '#EEF2F8'); - const bgColor = useColorModeValue('#EEF2F8', '#1D2024'); - - return ( - - - - - - Remove liquidity - - - {poolName?.join(' / ')} - - - - - - {new BigNumber(myLiquidity).gt(0.01) ? ( - - $ - {truncDecimals(myLiquidity, 2)} - - ) : ( - - {'< '} - $ - 0.01 - - )} - - - {truncDecimals(unbondedShares, 12)} pool shares - - - {coins.map((coin) => ( - - ))} - - - setPercent(val)} - > - - - - - - - - {[25, 50, 75, 100].map((percent) => ( - setPercent(percent)} - > - - {percent}% - - - ))} - - -
- -
-
-
-
- ); -}; - -export default RemoveLiquidityModal; diff --git a/examples/interchainjs/components/react/liquidity/token-input.tsx b/examples/interchainjs/components/react/liquidity/token-input.tsx deleted file mode 100644 index 89b7b137..00000000 --- a/examples/interchainjs/components/react/liquidity/token-input.tsx +++ /dev/null @@ -1,282 +0,0 @@ -import React from 'react'; -import { - Text, - Flex, - Box, - Center, - NumberInput, - NumberInputField, - CircularProgress, - CircularProgressLabel, - useMediaQuery, - useColorModeValue, -} from '@chakra-ui/react'; -import { Coin } from 'osmojs/types/codegen/cosmos/base/v1beta1/coin'; -import { AddIcon, MinusIcon } from '@chakra-ui/icons'; -import { - prettyPool, - osmosisAssets, - baseUnitsToDisplayUnits, - calcMaxCoinsForPool, - getSymbolForDenom, -} from '../../../utils/liquidity'; -import { getLogoUrlFromDenom } from './pool-list'; -import { ChainLogo } from './pool-card'; -import { PoolPretty, PriceHash } from '../../../utils/liquidity/types'; -import BigNumber from 'bignumber.js'; -import { truncDecimals } from './pool-detail-modal'; - -type PrettyAsset = Pick< - ReturnType, - 'poolAssetsPretty' ->['poolAssetsPretty'][number]; - -type InputToken = { - denom: string; - inputAmount: string; -}; - -const getChainNameForDenom = (denom: string) => { - return osmosisAssets.find((asset) => asset.base === denom)?.name; -}; - -export const TokenInput = ({ - token, - allTokens, - singleToken, - setSingleToken, - balances, - poolData, - prices, - inputTokens, - setInputTokens, -}: { - token: PrettyAsset; - allTokens: PrettyAsset[]; - singleToken: string | null; - setSingleToken: (symbol: string | null) => void; - balances: Coin[]; - poolData: PoolPretty; - prices: PriceHash; - inputTokens: InputToken[]; - setInputTokens: ( - coins: InputToken[] | ((prev: InputToken[]) => InputToken[]) - ) => void; -}) => { - const isSingleAsset = allTokens.some((token) => token.symbol === singleToken); - const isSelected = token.symbol === singleToken; - const singleAssetRatio = isSelected ? 100 : 0; - const ratio = isSingleAsset ? singleAssetRatio : Number(token.ratio) * 100; - - const handleIconClick = () => { - const otherSymbol = allTokens.find( - ({ symbol }) => symbol !== token.symbol - )!.symbol; - setSingleToken(isSingleAsset ? null : otherSymbol); - }; - - const balance = balances.find((b) => b.denom === token.denom); - - const availableBalance = balance - ? baseUnitsToDisplayUnits(token.symbol, balance.amount) - : '0'; - - const displayAmountToValue = (amount: string) => { - return new BigNumber(amount || 0) - .multipliedBy(prices[token.denom]) - .toString(); - }; - - const amount = inputTokens.find( - ({ denom }) => denom === token.denom - )?.inputAmount; - - const [isMobile, isMiddleScreen] = useMediaQuery([ - '(max-width: 480px)', - '(max-width: 800px)', - ]); - - const titleColor = useColorModeValue('#697584', '#A7B4C2'); - const statColor = useColorModeValue('#2C3137', '#EEF2F8'); - const bgColor = useColorModeValue('#EEF2F8', '#1D2024'); - const borderColor = useColorModeValue('#D1D6DD', '#434B55'); - - const syncInputTokens = (inputTokens: InputToken[], displayAmount: string) => - inputTokens.map((inputToken) => { - if (inputToken.denom === token.denom) { - return { ...inputToken, inputAmount: displayAmount }; - } - return { - ...inputToken, - inputAmount: new BigNumber(displayAmount).gt(0) - ? new BigNumber(displayAmountToValue(displayAmount)) - .dividedBy(prices[inputToken.denom]) - .decimalPlaces(2) - .toString() - : '', - }; - }); - - return ( - - - Available  - { - if (!isSingleAsset) { - const maxCoins = calcMaxCoinsForPool(prices, poolData, balances); - setInputTokens((prev: InputToken[]) => - prev.map((inputToken) => { - const coin = maxCoins.find( - ({ denom }) => denom === inputToken.denom - )!; - const symbol = getSymbolForDenom(coin.denom); - return { - ...inputToken, - inputAmount: baseUnitsToDisplayUnits(symbol, coin.amount), - }; - }) - ); - return; - } - if (!isSelected) return; - setInputTokens((prev) => syncInputTokens(prev, availableBalance)); - }} - > - {availableBalance} {token.symbol} - - - - - - - - - {ratio}% - - - - - - {token.symbol} - - - {getChainNameForDenom(token.denom)} - - - - {(isSingleAsset && isSelected) || ( -
- {isSingleAsset && !isSelected ? ( - - ) : ( - - )} -
- )} -
- - -
- -
- - { - setInputTokens((prev) => syncInputTokens(prev, val)); - }} - > - - - -
- - - {token.symbol} - - {amount && !Number.isNaN(Number(amount)) && ( - - ≈ ${truncDecimals(displayAmountToValue(amount), 2)} - - )} - -
-
-
-
- ); -}; diff --git a/examples/interchainjs/components/react/liquidity/types.tsx b/examples/interchainjs/components/react/liquidity/types.tsx deleted file mode 100644 index 9202c2f1..00000000 --- a/examples/interchainjs/components/react/liquidity/types.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { Gauge } from '../../../src/codegen/osmosis/incentives/gauge'; -import { MouseEventHandler, ReactNode } from 'react'; -import { IconType } from 'react-icons'; -import { calcPoolAprs } from '../../../utils/liquidity'; - -export interface ChooseChainInfo { - chainName: string; - chainRoute?: string; - label: string; - value: string; - icon?: string; - disabled?: boolean; -} - -export enum WalletStatus { - NotInit = 'NotInit', - Loading = 'Loading', - Loaded = 'Loaded', - NotExist = 'NotExist', - Rejected = 'Rejected', -} - -export interface ConnectWalletType { - buttonText?: string; - isLoading?: boolean; - isDisabled?: boolean; - icon?: IconType; - onClickConnectBtn?: MouseEventHandler; -} - -export interface ConnectedUserCardType { - walletIcon?: string; - username?: string; - icon?: ReactNode; -} - -export interface FeatureProps { - title: string; - text: string; - href: string; -} - -export interface ChainCardProps { - prettyName: string; - icon?: string; -} - -export type CopyAddressType = { - address?: string; - walletIcon?: string; - isLoading?: boolean; - maxDisplayLength?: number; - isRound?: boolean; - size?: string; -}; - -export enum TransactionResult { - Success = 0, - Failed = 1, -} - -export type Peroid = '1' | '7' | '14'; - -export type PoolApr = { - [K in Peroid]: ReturnType; -}; - -export type ExtraPoolProperties = { - fees7D: number; - volume24H: number; - volume7d: number; - liquidity: string | number; - myLiquidity?: string | number; - bonded?: string | number; - apr: PoolApr; -}; - -export type GaugeQueryResult = { - poolId: number; - gauges: Gauge[]; -}; diff --git a/examples/interchainjs/components/react/proposal-card.tsx b/examples/interchainjs/components/react/proposal-card.tsx deleted file mode 100644 index 0aa97783..00000000 --- a/examples/interchainjs/components/react/proposal-card.tsx +++ /dev/null @@ -1,208 +0,0 @@ -import React, { useMemo } from 'react'; -import dayjs from 'dayjs'; -import { cosmos } from '../../src/codegen'; -import { VoteOption } from '../types'; -import { decodeUint8Arr, Votes } from './vote'; -import { - Badge, - Box, - Center, - Flex, - Grid, - GridItem, - Spacer, - Text, - useColorMode, - useColorModeValue, -} from '@chakra-ui/react'; -import { Proposal } from '../../src/codegen/cosmos/gov/v1beta1/gov'; - -const ProposalStatus = cosmos.gov.v1beta1.ProposalStatus; - -export const getTitleFromDecoded = (decodedStr: string) => { - return decodedStr.slice(0, 250).match(/[A-Z][A-Za-z].*(?=\u0012)/)?.[0]; -}; - -export const getPercentage = (option: string | undefined, total: number) => { - if (!total) return '0.00%'; - const voted = option ? Number(option) : 0; - return ((voted / total) * 100).toFixed(2) + '%'; -}; - -export const VoteColor: { [key in VoteOption]: string } = { - [VoteOption.YES]: '#17a572', - [VoteOption.NO]: '#ce4256', - [VoteOption.NWV]: '#ff5b6d', - [VoteOption.ABSTAIN]: '#546198', -}; - -export const StatusBadge = ({ status }: { status: number }) => { - let statusConfig: { color: string; name: string } = { - color: 'purple', - name: 'Deposit Period', - }; - - switch (status) { - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - break; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - statusConfig = { - color: 'twitter', - name: 'Voting Period', - }; - break; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - statusConfig = { - color: 'green', - name: 'Passed', - }; - break; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - statusConfig = { - color: 'red', - name: 'Rejected', - }; - break; - default: - break; - } - - return ( - - {statusConfig.name} - - ); -}; - -const VotedBadge = () => ( - - Voted - -); - -export const ProposalCard = ({ - proposal, - handleClick, - votes, -}: { - proposal: Proposal; - handleClick: () => void; - votes: Votes | undefined; -}) => { - const { colorMode } = useColorMode(); - - const totalVotes = useMemo(() => { - if (!proposal.finalTallyResult) return 0; - const total = Object.values(proposal.finalTallyResult).reduce( - (prev, cur) => prev + Number(cur), - 0 - ); - return total ? total : 0; - }, [proposal]); - - const isVoted = votes && votes[proposal.proposalId.toString()]; - - return ( - - -
- # {proposal.proposalId.toString().padStart(6, '0')} -
-
- - - - - {getTitleFromDecoded(decodeUint8Arr(proposal.content?.value))} - - {isVoted && } - - - - - - {proposal.status === - ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD - ? 'Deposit' - : 'Voting'} -  end time:   - - - {dayjs( - proposal.status === - ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD - ? proposal.depositEndTime - : proposal.votingEndTime - ).format('YYYY-MM-DD hh:mm')} - - - - {totalVotes ? ( - - - - - - - ) : ( - - )} - - - - - - - - -
- ); -}; diff --git a/examples/interchainjs/components/react/proposal-modal.tsx b/examples/interchainjs/components/react/proposal-modal.tsx deleted file mode 100644 index 9bc5839e..00000000 --- a/examples/interchainjs/components/react/proposal-modal.tsx +++ /dev/null @@ -1,652 +0,0 @@ -import React, { useMemo, useState } from 'react'; -import { TransactionResult, VoteOption } from '../types'; -import { - AiFillCheckCircle, - AiFillCloseCircle, - AiFillMinusCircle, -} from 'react-icons/ai'; -import { PieChart } from 'react-minimal-pie-chart'; -import { - getPercentage, - getTitleFromDecoded, - StatusBadge, - VoteColor, -} from './proposal-card'; -import dayjs from 'dayjs'; -import { cosmos } from '../../src/codegen'; -import BigNumber from 'bignumber.js'; -import { assets } from 'chain-registry'; -import { AssetList, Asset } from '@chain-registry/types'; -import { decodeUint8Arr, Votes } from './vote'; -import { IconType } from 'react-icons'; -import { useChain } from '@cosmos-kit/react'; -import { StdFee } from '@cosmjs/stargate'; -import ReactMarkdown from 'react-markdown'; -import { - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalCloseButton, - ModalBody, - ModalFooter, - Button, - useDisclosure, - Flex, - Icon, - Stack, - Text, - Box, - Center, - Divider, - Heading, - Radio, - RadioGroup, - useToast, - useColorMode, - useColorModeValue, -} from '@chakra-ui/react'; -import { - Proposal, - ProposalStatus, -} from '../../src/codegen/cosmos/gov/v1beta1/gov'; - -const VoteType = cosmos.gov.v1beta1.VoteOption; - -const proposalStatus = ProposalStatus; - -const getChainAssets = (chainName: string) => { - return assets.find((chain) => chain.chain_name === chainName) as AssetList; -}; - -const getCoin = (chainName: string) => { - const chainAssets = getChainAssets(chainName); - return chainAssets.assets[0] as Asset; -}; - -const getExponent = (chainName: string) => { - return getCoin(chainName).denom_units.find( - (unit) => unit.denom === getCoin(chainName).display - )?.exponent as number; -}; - -const exponentiate = (num: number | string | undefined, exp: number) => { - if (!num) return 0; - return new BigNumber(num) - .multipliedBy(new BigNumber(10).exponentiatedBy(exp)) - .toNumber(); -}; - -const formatDate = (date: Date | undefined) => { - if (!date) return 'not specified'; - return dayjs(date).format('YYYY-MM-DD hh:mm:ss'); -}; - -const TimeDisplay = ({ title, time }: { title: string; time: string }) => ( - - - {title} - - - {time} - - -); - -const VoteRatio = ({ - type, - ratio, - amount, - token, -}: { - type: keyof typeof VoteOption; - ratio: string; - amount: string; - token: string; -}) => ( - - - {type} {ratio} - - - {amount} {token} - - -); - -const VoteResult = ({ voteOption }: { voteOption: number }) => { - let optionConfig: { color: string; icon: IconType; option: string } = { - color: VoteColor.YES, - icon: AiFillCheckCircle, - option: 'Yes', - }; - - switch (voteOption) { - case VoteType.VOTE_OPTION_YES: - break; - case VoteType.VOTE_OPTION_NO: - optionConfig = { - color: VoteColor.NO, - icon: AiFillCloseCircle, - option: 'No', - }; - break; - case VoteType.VOTE_OPTION_NO_WITH_VETO: - optionConfig = { - color: VoteColor.NWV, - icon: AiFillCloseCircle, - option: 'NoWithVeto', - }; - break; - case VoteType.VOTE_OPTION_ABSTAIN: - optionConfig = { - color: VoteColor.ABSTAIN, - icon: AiFillMinusCircle, - option: 'Abstain', - }; - break; - default: - break; - } - - return ( - <> - - You Voted - - - - - {optionConfig.option} - - - - ); -}; - -const NewLineText = ({ text }: { text: string }) => { - let count = 0; - return ( - <> - {text.split('\\n').map((str) => ( - - - {str} - - - ))} - - ); -}; - -export const ProposalModal = ({ - isOpen, - onClose, - proposal, - chainName, - quorum, - bondedTokens, - votes, - updateVotes, -}: { - isOpen: boolean; - onClose: () => void; - proposal: Proposal; - chainName: string; - quorum: number | undefined; - bondedTokens: string | undefined; - votes: Votes | undefined; - updateVotes: () => void; -}) => { - const [option, setOption] = useState(); - const [showMore, setShowMore] = useState(false); - const [isLoading, setIsLoading] = useState(false); - const { - isOpen: isVoteOptionsOpen, - onOpen: onVoteOptionsOpen, - onClose: onVoteOptionsClose, - } = useDisclosure(); - const toast = useToast(); - const { colorMode } = useColorMode(); - - const coin = getCoin(chainName); - const exponent = getExponent(chainName); - const { address, getSigningStargateClient } = useChain(chainName); - - const chartData = [ - { - title: 'YES', - value: Number(proposal.finalTallyResult?.yes), - color: VoteColor.YES, - }, - { - title: 'NO', - value: Number(proposal.finalTallyResult?.no), - color: VoteColor.NO, - }, - { - title: 'NWV', - value: Number(proposal.finalTallyResult?.noWithVeto), - color: VoteColor.NWV, - }, - { - title: 'ABSTAIN', - value: Number(proposal.finalTallyResult?.abstain), - color: VoteColor.ABSTAIN, - }, - ]; - - const emptyChartData = [ - { - title: 'NO VOTES YET', - value: 100, - color: VoteColor.ABSTAIN, - }, - ]; - - const totalVotes = useMemo(() => { - if (!proposal.finalTallyResult) return 0; - const total = Object.values(proposal.finalTallyResult).reduce( - (prev, cur) => prev + Number(cur), - 0 - ); - return total ? total : 0; - }, [proposal]); - - const isVoted = !!(votes && votes[proposal.proposalId.toString()]); - - const isDepositPeriod = - proposal.status === proposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - - const isVotingPeriod = - proposal.status === proposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - - const turnout = totalVotes / Number(bondedTokens); - - const minStakedTokens = - quorum && exponentiate(quorum * Number(bondedTokens), -exponent).toFixed(6); - - const description = - decodeUint8Arr(proposal.content?.value) - .match(/(?<=\u0012).*/s)?.[0] - .slice(2) || ''; - - const renderedDescription = - description.length > 200 - ? showMore - ? description - : `${description.slice(0, 200)}...` - : description || ''; - - const showToast = (code: number) => { - toast({ - title: `Transaction ${code === 0 ? 'successful' : 'failed'}`, - status: code === 0 ? 'success' : 'error', - duration: 3000, - isClosable: true, - position: 'top-right', - }); - }; - - const handleConfirmClick = async () => { - setIsLoading(true); - - const stargateClient = await getSigningStargateClient(); - - if (!stargateClient || !address || !option) { - console.error('stargateClient/address undefined or option not selected'); - return; - } - - const { vote: createVoteMsg } = - cosmos.gov.v1beta1.MessageComposer.fromPartial; - - const msg = createVoteMsg({ - option, - voter: address, - proposalId: proposal.proposalId, - }); - - const fee: StdFee = { - amount: [ - { - denom: coin.base, - amount: '1000', - }, - ], - gas: '86721', - }; - - try { - const res = await stargateClient.signAndBroadcast(address, [msg], fee); - stargateClient.disconnect(); - - showToast(res.code); - setIsLoading(false); - updateVotes(); - onVoteOptionsClose(); - } catch (error) { - console.error(error); - stargateClient.disconnect(); - showToast(TransactionResult.Failed); - setIsLoading(false); - } - }; - - const checkIfDisable = (option: number) => { - return isVoted - ? votes[proposal.proposalId.toString()] === option - ? true - : false - : false; - }; - - return ( - <> - { - onVoteOptionsClose(); - setOption(undefined); - }} - isCentered - > - - - - {getTitleFromDecoded(decodeUint8Arr(proposal.content?.value))} - - - - setOption(Number(e))}> - - - Yes - - - No - - - No with Veto - - - Abstain - - - - - - - - - - - - { - onClose(); - setShowMore(false); - }} - isCentered - size="3xl" - > - - - - -
- -
- {isVoted && ( - - )} -
- {`#${proposal.proposalId} ${getTitleFromDecoded( - decodeUint8Arr(proposal.content?.value) - )}`} -
- - - - - - - - - -
- - - - - - Vote Details - - - -
- { - const { value, title, percentage } = dataEntry; - if (!totalVotes) return title; - - const maxValue = Math.max( - ...chartData.map((item) => item.value) - ); - - if (value !== maxValue) return ''; - return `${title} ${percentage.toFixed(2)}%`; - }} - labelStyle={{ - fontSize: '10px', - fill: totalVotes - ? chartData.sort((a, b) => b.value - a.value)[0].color - : VoteColor.ABSTAIN, - fontWeight: 'bold', - }} - labelPosition={0} - /> -
- - - (quorum || 0) ? 'green.500' : 'gray.400'} - borderColor={ - turnout > (quorum || 0) ? 'green.500' : 'gray.400' - } - fontWeight="bold" - border="1px solid" - w="fit-content" - px={2} - borderRadius="4px" - > - Turnout: {(turnout * 100).toFixed(2)}% - - {quorum && ( - - {`Minimum of staked ${minStakedTokens} ${coin.symbol}(${ - quorum * 100 - }%) need to vote - for this proposal to pass.`} - - )} - - - - - - - -
-
- - - - Description - - - {description.length > 200 && ( - - )} - -
- - - - -
-
- - ); -}; diff --git a/examples/interchainjs/components/react/send-tokens-card.tsx b/examples/interchainjs/components/react/send-tokens-card.tsx deleted file mode 100644 index 13be93b0..00000000 --- a/examples/interchainjs/components/react/send-tokens-card.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import React from 'react'; -import { - Box, - Button, - Center, - Heading, - Stack, - Text, - useColorMode, -} from '@chakra-ui/react'; - -import { handleChangeColorModeValue } from './handleChangeColor'; - -export const SendTokensCard = ({ - balance, - response, - isFetchingBalance, - isConnectWallet, - getBalanceButtonText, - handleClickGetBalance, - sendTokensButtonText, - handleClickSendTokens, -}: { - balance: number; - response?: string; - isFetchingBalance: boolean; - isConnectWallet: boolean; - sendTokensButtonText?: string; - handleClickSendTokens: () => void; - getBalanceButtonText?: string; - handleClickGetBalance: () => void; -}) => { - const { colorMode } = useColorMode(); - if (!isConnectWallet) { - return ( - - - Please Connect Your Wallet! - - - ); - } - return ( - - - - Balance:  - - {balance} - - - - -
- -
- {response && ( - - Result - -
{response}
-
-
- )} -
- ); -}; diff --git a/examples/interchainjs/components/react/user-card.tsx b/examples/interchainjs/components/react/user-card.tsx deleted file mode 100644 index 13c8bd75..00000000 --- a/examples/interchainjs/components/react/user-card.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { Text, Stack, Box } from '@chakra-ui/react'; -import { ConnectedUserCardType } from '../types'; - -export const ConnectedUserInfo = ({ - username, - icon -}: ConnectedUserCardType) => { - return ( - - {username && ( - <> - - {icon} - - - {username} - - - )} - - ); -}; diff --git a/examples/interchainjs/components/react/vote.tsx b/examples/interchainjs/components/react/vote.tsx deleted file mode 100644 index 8c468a08..00000000 --- a/examples/interchainjs/components/react/vote.tsx +++ /dev/null @@ -1,229 +0,0 @@ -import React, { useCallback, useEffect, useState } from 'react'; -import { ChainName } from 'cosmos-kit'; -import { - Box, - Center, - Heading, - Spinner, - Stack, - useDisclosure, - Text, - useColorModeValue, -} from '@chakra-ui/react'; -import { ProposalCard } from './proposal-card'; -import { ProposalModal } from './proposal-modal'; -import { useChain } from '@cosmos-kit/react'; -import { cosmos } from '../../src/codegen'; -import BigNumber from 'bignumber.js'; -import { - Proposal, - ProposalStatus, -} from '../../src/codegen/cosmos/gov/v1beta1/gov'; -import { QueryProposalsRequest } from '../../src/codegen/cosmos/gov/v1beta1/query'; - -const proposalStatus = ProposalStatus; - -export interface Votes { - [key: string]: number; -} - -interface VotingData { - votes?: Votes; - quorum?: number; - proposals?: Proposal[]; - bondedTokens?: string | undefined; -} - -export const decodeUint8Arr = (uint8array: Uint8Array | undefined) => { - if (!uint8array) return ''; - return new TextDecoder('utf-8').decode(uint8array); -}; - -export const VotingSection = ({ chainName }: { chainName: ChainName }) => { - const { isOpen, onOpen, onClose } = useDisclosure(); - const { address, getRpcEndpoint } = useChain(chainName); - const [data, setData] = useState(); - const [isLoading, setIsLoading] = useState(false); - const [selectedProposal, setSelectedProposal] = useState(); - - const getVotes = useCallback(async () => { - if (!address) return; - - let rpcEndpoint = await getRpcEndpoint(); - - if (!rpcEndpoint) { - console.log('no rpc endpoint — using a fallback'); - rpcEndpoint = `https://rpc.cosmos.directory/${chainName}`; - } - - const client = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: - typeof rpcEndpoint === 'string' ? rpcEndpoint : rpcEndpoint.url, - }); - - const { proposals: votedProposals } = - await client.cosmos.gov.v1beta1.proposals( - QueryProposalsRequest.fromPartial({ - proposalStatus: proposalStatus.PROPOSAL_STATUS_UNSPECIFIED, - voter: address, - depositor: '', - }) - ); - - const votesRequests = votedProposals.map((proposal) => { - return client.cosmos.gov.v1beta1.vote({ - proposalId: proposal.proposalId, - voter: address, - }); - }); - - const votesResponses = await Promise.all(votesRequests); - - const votes = votesResponses.reduce( - (prev, cur) => ({ - ...prev, - [cur.vote!.proposalId.toString()]: cur.vote?.options[0].option, - }), - {} - ) as Votes; - - setData((prev) => ({ ...prev, votes })); - }, [address, chainName, getRpcEndpoint]); - - useEffect(() => { - const getData = async () => { - if (!address) return; - setIsLoading(true); - - let rpcEndpoint = await getRpcEndpoint(); - - if (!rpcEndpoint) { - console.log('no rpc endpoint — using a fallback'); - rpcEndpoint = `https://rpc.cosmos.directory/${chainName}`; - } - - const client = await cosmos.ClientFactory.createRPCQueryClient({ - rpcEndpoint: - typeof rpcEndpoint === 'string' ? rpcEndpoint : rpcEndpoint.url, - }); - - // Get proposals - const { proposals } = await client.cosmos.gov.v1beta1.proposals( - QueryProposalsRequest.fromPartial({ - proposalStatus: proposalStatus.PROPOSAL_STATUS_UNSPECIFIED, - voter: '', - depositor: '', - }) - ); - - const sortedProposal = proposals.sort((a, b) => - a.proposalId < b.proposalId ? -1 : a.proposalId > b.proposalId ? 1 : 0 - ); - - const votingProposals = sortedProposal.filter( - (proposal) => - proposal.status === proposalStatus.PROPOSAL_STATUS_VOTING_PERIOD - ); - - const nonVotingProposals = sortedProposal.filter( - (proposal) => - proposal.status !== proposalStatus.PROPOSAL_STATUS_VOTING_PERIOD - ); - - const formattedProposal = [...votingProposals, ...nonVotingProposals]; - - // Get bondedTokens - const { pool } = await client.cosmos.staking.v1beta1.pool(); - - const bondedTokens = pool?.bondedTokens; - - // Get quorum - const { tallyParams } = await client.cosmos.gov.v1beta1.params({ - paramsType: 'tallying', - }); - - const quorumStr = decodeUint8Arr(tallyParams?.quorum); - - const quorum = new BigNumber(quorumStr) - .dividedBy(new BigNumber(10).exponentiatedBy(quorumStr.length)) - .toNumber(); - - setData((prev) => ({ - ...prev, - quorum, - bondedTokens, - proposals: formattedProposal, - })); - - await getVotes(); - - setIsLoading(false); - }; - getData(); - }, [address, chainName, getRpcEndpoint, getVotes]); - - const loader = ( -
- -
- ); - - const emptyContent = ( -
- - Please connect the wallet to see the proposals - -
- ); - - const content = address ? ( - - {data?.proposals?.map((proposal) => ( - { - onOpen(); - setSelectedProposal(proposal); - }} - key={proposal.proposalId.toString()} - /> - ))} - - ) : ( - emptyContent - ); - - return ( - <> - - - Proposals - - {isLoading ? loader : content} - - {selectedProposal && ( - - )} - - ); -}; diff --git a/examples/interchainjs/components/react/wallet-connect.tsx b/examples/interchainjs/components/react/wallet-connect.tsx deleted file mode 100644 index a29fd644..00000000 --- a/examples/interchainjs/components/react/wallet-connect.tsx +++ /dev/null @@ -1,201 +0,0 @@ -import React, { MouseEventHandler, ReactNode } from 'react'; -import { Button, Icon, Stack, Text, useColorModeValue } from '@chakra-ui/react'; -import { IoWallet } from 'react-icons/io5'; -import { ConnectWalletType } from '../types'; -import { FiAlertTriangle } from 'react-icons/fi'; -import { WalletStatus } from 'cosmos-kit'; - -export const ConnectWalletButton = ({ - buttonText, - isLoading, - isDisabled, - icon, - onClickConnectBtn -}: ConnectWalletType) => { - return ( - - ); -}; - -export const Disconnected = ({ - buttonText, - onClick -}: { - buttonText: string; - onClick: MouseEventHandler; -}) => { - return ( - - ); -}; - -export const Connected = ({ - buttonText, - onClick -}: { - buttonText: string; - onClick: MouseEventHandler; -}) => { - return ( - - ); -}; - -export const Connecting = () => { - return ; -}; - -export const Rejected = ({ - buttonText, - wordOfWarning, - onClick -}: { - buttonText: string; - wordOfWarning?: string; - onClick: MouseEventHandler; -}) => { - const bg = useColorModeValue('orange.200', 'orange.300'); - - return ( - - - {wordOfWarning && ( - - - - - Warning:  - - {wordOfWarning} - - - )} - - ); -}; - -export const Error = ({ - buttonText, - wordOfWarning, - onClick -}: { - buttonText: string; - wordOfWarning?: string; - onClick: MouseEventHandler; -}) => { - const bg = useColorModeValue('orange.200', 'orange.300'); - - return ( - - - {wordOfWarning && ( - - - - - Warning:  - - {wordOfWarning} - - - )} - - ); -}; - -export const NotExist = ({ - buttonText, - onClick -}: { - buttonText: string; - onClick: MouseEventHandler; -}) => { - return ( - - ); -}; - -export const WalletConnectComponent = ({ - walletStatus, - disconnect, - connecting, - connected, - rejected, - error, - notExist -}: { - walletStatus: WalletStatus; - disconnect: ReactNode; - connecting: ReactNode; - connected: ReactNode; - rejected: ReactNode; - error: ReactNode; - notExist: ReactNode; -}) => { - switch (walletStatus) { - case WalletStatus.Disconnected: - return <>{disconnect}; - case WalletStatus.Connecting: - return <>{connecting}; - case WalletStatus.Connected: - return <>{connected}; - case WalletStatus.Rejected: - return <>{rejected}; - case WalletStatus.Error: - return <>{error}; - case WalletStatus.NotExist: - return <>{notExist}; - default: - return <>{disconnect}; - } -}; diff --git a/examples/interchainjs/components/react/warn-block.tsx b/examples/interchainjs/components/react/warn-block.tsx deleted file mode 100644 index 2c93cf6f..00000000 --- a/examples/interchainjs/components/react/warn-block.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import React, { ReactNode } from 'react'; -import { Box, Stack, Text, useColorModeValue } from '@chakra-ui/react'; -import { WalletStatus } from 'cosmos-kit'; - -export const WarnBlock = ({ - wordOfWarning, - icon -}: { - wordOfWarning?: string; - icon?: ReactNode; -}) => { - return ( - - - - {icon} - - {wordOfWarning} - - - ); -}; - -export const RejectedWarn = ({ - wordOfWarning, - icon -}: { - wordOfWarning?: string; - icon?: ReactNode; -}) => { - return ; -}; - -export const ConnectStatusWarn = ({ - walletStatus, - rejected, - error -}: { - walletStatus: WalletStatus; - rejected: ReactNode; - error: ReactNode; -}) => { - switch (walletStatus) { - case WalletStatus.Rejected: - return <>{rejected}; - case WalletStatus.Error: - return <>{error}; - default: - return <>; - } -}; diff --git a/examples/interchainjs/components/types.tsx b/examples/interchainjs/components/types.tsx deleted file mode 100644 index 0f7bbdbd..00000000 --- a/examples/interchainjs/components/types.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import { MouseEventHandler, ReactNode } from 'react'; -import { IconType } from 'react-icons'; - -export interface ChooseChainInfo { - chainName: string; - chainRoute?: string; - label: string; - value: string; - icon?: string; - disabled?: boolean; -} - -export enum WalletStatus { - NotInit = 'NotInit', - Loading = 'Loading', - Loaded = 'Loaded', - NotExist = 'NotExist', - Rejected = 'Rejected', -} - -export interface ConnectWalletType { - buttonText?: string; - isLoading?: boolean; - isDisabled?: boolean; - icon?: IconType; - onClickConnectBtn?: MouseEventHandler; -} - -export interface ConnectedUserCardType { - walletIcon?: string; - username?: string; - icon?: ReactNode; -} - -export interface FeatureProps { - title: string; - text: string; - href: string; -} - -export interface ChainCardProps { - prettyName: string; - icon?: string; -} - -export type CopyAddressType = { - address?: string; - walletIcon?: string; - isLoading?: boolean; - maxDisplayLength?: number; - isRound?: boolean; - size?: string; -}; - -export enum VoteOption { - YES = 'YES', - NO = 'NO', - NWV = 'NWV', - ABSTAIN = 'ABSTAIN', -} - -export enum TransactionResult { - Success = 0, - Failed = 1, -} - -export type handleSelectChainDropdown = (value: ChainOption | null) => void; - -export interface OptionBase { - variant?: string; - colorScheme?: string; - isFixed?: boolean; - isDisabled?: boolean; -} - -export interface ChainOption extends OptionBase { - isDisabled?: boolean; - label: string; - value: string; - icon?: string; - chainName: string; - chainRoute?: string; -} - -export interface ChangeChainDropdownType { - data: ChainOption[]; - selectedItem?: ChainOption; - onChange: handleSelectChainDropdown; - chainDropdownLoading?: boolean; -} - -export interface ChangeChainMenuType { - data: ChainOption[]; - value?: ChainOption; - onClose?: () => void; - onChange: handleSelectChainDropdown; - innerRef?: RefObject; -} diff --git a/examples/interchainjs/components/wallet-multi.tsx b/examples/interchainjs/components/wallet-multi.tsx deleted file mode 100644 index 0b76b8f9..00000000 --- a/examples/interchainjs/components/wallet-multi.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { useManager } from '@cosmos-kit/react'; -import { Center, Grid, GridItem } from '@chakra-ui/react'; -import { useEffect, useMemo, useState } from 'react'; -import { - ChainOption, - ChooseChain, - handleSelectChainDropdown, - ConnectWalletButton, -} from '.'; -import { WalletCardSection } from './card'; -import { ChainName } from 'cosmos-kit'; -import React from 'react'; - -export const WalletSectionMulti = ({ - chainName, - setChainName, -}: { - chainName: ChainName | undefined; - setChainName: (val: ChainName | undefined) => void; -}) => { - const { chainRecords, getChainLogo } = useManager(); - - const chainOptions = useMemo( - () => - chainRecords.map((chainRecord) => { - return { - chainName: chainRecord?.name, - label: chainRecord?.chain.pretty_name, - value: chainRecord?.name, - icon: getChainLogo(chainRecord.name), - }; - }), - [chainRecords, getChainLogo] - ); - - useEffect(() => { - setChainName(window.localStorage.getItem('selected-chain') || 'osmosis'); - }, [setChainName]); - - const onChainChange: handleSelectChainDropdown = async ( - selectedValue: ChainOption | null - ) => { - setChainName(selectedValue?.chainName); - if (selectedValue?.chainName) { - window?.localStorage.setItem('selected-chain', selectedValue?.chainName); - } else { - window?.localStorage.removeItem('selected-chain'); - } - }; - - const chooseChain = ( - - ); - - return ( -
- - {chooseChain} - {chainName ? ( - - ) : ( - - )} - -
- ); -}; diff --git a/examples/interchainjs/components/wallet.tsx b/examples/interchainjs/components/wallet.tsx deleted file mode 100644 index 5aa89ad5..00000000 --- a/examples/interchainjs/components/wallet.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import { useChainWallet, useAccount } from '@interchain-kit/react'; -import { - Box, - Center, - Grid, - GridItem, - Icon, - Stack, - useColorModeValue, -} from '@chakra-ui/react'; -import { MouseEventHandler } from 'react'; -import { FiAlertTriangle } from 'react-icons/fi'; -import { - Astronaut, - Error, - Connected, - ConnectedShowAddress, - ConnectedUserInfo, - Connecting, - ConnectStatusWarn, - CopyAddressBtn, - Disconnected, - NotExist, - Rejected, - RejectedWarn, - WalletConnectComponent, - ChainCard, -} from '../components'; -import { chainName } from '../config'; -import { useWalletManager, useWalletModal } from '@interchain-kit/react' -import { WalletStatus } from 'cosmos-kit'; - -export const WalletSection = () => { - const walletManager = useWalletManager() - const chainIds = walletManager.chains.map(c => c.chainId) - // const { open, close, modalIsOpen } = useWalletModal() - const wallet = walletManager.wallets.find(item => item.option?.name === 'keplr-extension') - - const account = useAccount(chainName, wallet?.option?.name as string) - const username = account?.username - - const { address } = useChainWallet(chainName, wallet?.option?.name as string) - - const chain = { - chainName, - label: wallet?.option?.prettyName, - value: chainName, - // icon: // logoUrl, - }; - - // Events - const onClickConnect: MouseEventHandler = async (e) => { - console.log('onClickConnect', wallet?.option?.name) - // return - e.preventDefault(); - // await connect(); - walletManager.connect(wallet?.option?.name as string, () => { - console.log('onApprove') - }, (uri: string) => { - console.log({ uri }) - }) - }; - - const onDisconnect: MouseEventHandler = async (e) => { - console.log('onDisconnect', chainIds) - wallet?.disconnect(chainIds) - } - - // const onClickOpenView: MouseEventHandler = (e) => { - // e.preventDefault(); - // openView(); - // }; - - // Components - const connectWalletButton = ( - - } - connecting={} - connected={<> - - } - rejected={<> - - } - error={<> - {/* */} - } - notExist={<> - {/* */} - } - /> - ); - - const connectWalletWarn = ( - } - wordOfWarning={`${wallet?.option?.prettyName}`} - /> - } - error={ - } - wordOfWarning={`${wallet?.option?.prettyName}`} - /> - } - /> - ); - - const userInfo = username && ( - } /> - ); - const addressBtn = ( - } - /> - ); - - return ( -
- - - - - - - {userInfo} - {addressBtn} - - {connectWalletButton} - - {connectWalletWarn && {connectWalletWarn}} - - - -
- ); -}; diff --git a/examples/interchainjs/config/defaults.ts b/examples/interchainjs/config/defaults.ts deleted file mode 100644 index 0291327b..00000000 --- a/examples/interchainjs/config/defaults.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { assets } from 'chain-registry'; -import { AssetList, Asset } from '@chain-registry/types'; - -export const chainName = 'cosmoshub'; - -export const chainassets: AssetList = assets.find( - (chain) => chain.chain_name === chainName -) as AssetList; - -export const coin: Asset = chainassets.assets.find( - (asset) => asset.base === 'uatom' -) as Asset; \ No newline at end of file diff --git a/examples/interchainjs/config/features.ts b/examples/interchainjs/config/features.ts deleted file mode 100644 index f16a8d09..00000000 --- a/examples/interchainjs/config/features.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { FeatureProps } from '../components'; - -export const products: FeatureProps[] = [ - { - title: 'Cosmos Kit', - text: 'A wallet adapter for react with mobile WalletConnect support for the Cosmos ecosystem.', - href: 'https://github.com/cosmology-tech/cosmos-kit' - }, - { - title: 'Telescope', - text: 'A TypeScript Transpiler for Cosmos Protobufs to generate libraries for Cosmos blockchains.', - href: 'https://github.com/cosmology-tech/telescope' - }, - { - title: 'TS Codegen', - text: 'The quickest and easiest way to convert CosmWasm Contracts into dev-friendly TypeScript classes.', - href: 'https://github.com/CosmWasm/ts-codegen' - }, - { - title: 'CosmWasm Academy', - text: 'Master CosmWasm and build your secure, multi-chain dApp on any CosmWasm chain!', - href: 'https://academy.cosmwasm.com/' - }, - { - title: 'Chain Registry', - text: 'Get chain and asset list information from the npm package for the Official Cosmos chain registry.', - href: 'https://github.com/cosmology-tech/chain-registry' - }, - { - title: 'Videos', - text: 'How-to videos from the official Cosmology website, with learning resources for building in Cosmos.', - href: 'https://cosmology.zone/learn' - } -]; - -export const dependencies: FeatureProps[] = [ - { - title: 'Interchain UI', - text: 'A simple, modular and accessible React Component Library.', - href: 'https://cosmology.zone/components' - }, - { - title: 'Next.js', - text: 'A React Framework supports hybrid static & server rendering.', - href: 'https://nextjs.org/' - } -]; diff --git a/examples/interchainjs/config/index.ts b/examples/interchainjs/config/index.ts deleted file mode 100644 index 9643c6fd..00000000 --- a/examples/interchainjs/config/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './theme'; -export * from './features'; -export * from './defaults'; - diff --git a/examples/interchainjs/config/liquidity/defaults.ts b/examples/interchainjs/config/liquidity/defaults.ts deleted file mode 100644 index 001fd238..00000000 --- a/examples/interchainjs/config/liquidity/defaults.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { assets } from 'chain-registry'; -import { AssetList, Asset } from '@chain-registry/types'; -import { GeneratedType, Registry } from '@cosmjs/proto-signing'; -import { AminoTypes } from '@cosmjs/stargate'; -import { - cosmosAminoConverters, - cosmosProtoRegistry, - cosmwasmAminoConverters, - cosmwasmProtoRegistry, - ibcProtoRegistry, - ibcAminoConverters, - osmosisAminoConverters, - osmosisProtoRegistry, -} from 'osmojs'; - -export const chainName = 'osmosis'; - -export const chainAssets: AssetList = assets.find( - (chain) => chain.chain_name === chainName -) as AssetList; - -export const coin: Asset = chainAssets.assets.find( - (asset) => asset.base === 'uosmo' -) as Asset; - -const protoRegistry: ReadonlyArray<[string, GeneratedType]> = [ - ...cosmosProtoRegistry, - ...cosmwasmProtoRegistry, - ...ibcProtoRegistry, - ...osmosisProtoRegistry, -]; - -const aminoConverters = { - ...cosmosAminoConverters, - ...cosmwasmAminoConverters, - ...ibcAminoConverters, - ...osmosisAminoConverters, -}; - -export const registry = new Registry(protoRegistry); -export const aminoTypes = new AminoTypes(aminoConverters); diff --git a/examples/interchainjs/config/liquidity/features.ts b/examples/interchainjs/config/liquidity/features.ts deleted file mode 100644 index f16a8d09..00000000 --- a/examples/interchainjs/config/liquidity/features.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { FeatureProps } from '../components'; - -export const products: FeatureProps[] = [ - { - title: 'Cosmos Kit', - text: 'A wallet adapter for react with mobile WalletConnect support for the Cosmos ecosystem.', - href: 'https://github.com/cosmology-tech/cosmos-kit' - }, - { - title: 'Telescope', - text: 'A TypeScript Transpiler for Cosmos Protobufs to generate libraries for Cosmos blockchains.', - href: 'https://github.com/cosmology-tech/telescope' - }, - { - title: 'TS Codegen', - text: 'The quickest and easiest way to convert CosmWasm Contracts into dev-friendly TypeScript classes.', - href: 'https://github.com/CosmWasm/ts-codegen' - }, - { - title: 'CosmWasm Academy', - text: 'Master CosmWasm and build your secure, multi-chain dApp on any CosmWasm chain!', - href: 'https://academy.cosmwasm.com/' - }, - { - title: 'Chain Registry', - text: 'Get chain and asset list information from the npm package for the Official Cosmos chain registry.', - href: 'https://github.com/cosmology-tech/chain-registry' - }, - { - title: 'Videos', - text: 'How-to videos from the official Cosmology website, with learning resources for building in Cosmos.', - href: 'https://cosmology.zone/learn' - } -]; - -export const dependencies: FeatureProps[] = [ - { - title: 'Interchain UI', - text: 'A simple, modular and accessible React Component Library.', - href: 'https://cosmology.zone/components' - }, - { - title: 'Next.js', - text: 'A React Framework supports hybrid static & server rendering.', - href: 'https://nextjs.org/' - } -]; diff --git a/examples/interchainjs/config/liquidity/index.ts b/examples/interchainjs/config/liquidity/index.ts deleted file mode 100644 index 2c416ce6..00000000 --- a/examples/interchainjs/config/liquidity/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './theme'; -export * from './features'; -export * from './defaults'; diff --git a/examples/interchainjs/config/liquidity/theme.ts b/examples/interchainjs/config/liquidity/theme.ts deleted file mode 100644 index aa561419..00000000 --- a/examples/interchainjs/config/liquidity/theme.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { extendTheme } from '@chakra-ui/react'; - -export const defaultThemeObject = { - fonts: { - body: 'Inter, system-ui, sans-serif', - heading: 'Work Sans, system-ui, sans-serif' - }, - colors: { - primary: { - '50': '#e5e7f9', - '100': '#bec4ef', - '200': '#929ce4', - '300': '#6674d9', - '400': '#4657d1', - '500': '#2539c9', - '600': '#2133c3', - '700': '#1b2cbc', - '800': '#1624b5', - '900': '#0d17a9' - } - }, - breakPoints: { - sm: '30em', - md: '48em', - lg: '62em', - xl: '80em', - '2xl': '96em' - }, - shadows: { - largeSoft: 'rgba(60, 64, 67, 0.15) 0px 2px 10px 6px;' - } -}; - -export const defaultTheme = extendTheme(defaultThemeObject); diff --git a/examples/interchainjs/config/theme.ts b/examples/interchainjs/config/theme.ts deleted file mode 100644 index aa561419..00000000 --- a/examples/interchainjs/config/theme.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { extendTheme } from '@chakra-ui/react'; - -export const defaultThemeObject = { - fonts: { - body: 'Inter, system-ui, sans-serif', - heading: 'Work Sans, system-ui, sans-serif' - }, - colors: { - primary: { - '50': '#e5e7f9', - '100': '#bec4ef', - '200': '#929ce4', - '300': '#6674d9', - '400': '#4657d1', - '500': '#2539c9', - '600': '#2133c3', - '700': '#1b2cbc', - '800': '#1624b5', - '900': '#0d17a9' - } - }, - breakPoints: { - sm: '30em', - md: '48em', - lg: '62em', - xl: '80em', - '2xl': '96em' - }, - shadows: { - largeSoft: 'rgba(60, 64, 67, 0.15) 0px 2px 10px 6px;' - } -}; - -export const defaultTheme = extendTheme(defaultThemeObject); diff --git a/examples/interchainjs/hooks/index.ts b/examples/interchainjs/hooks/index.ts deleted file mode 100644 index 8d8cad59..00000000 --- a/examples/interchainjs/hooks/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './useClient'; -export * from './useRequest'; -export * from './useQueuedRequests'; -export * from './useOsmosisRequests'; -export * from './useTransactionToast'; diff --git a/examples/interchainjs/hooks/useClient.ts b/examples/interchainjs/hooks/useClient.ts deleted file mode 100644 index 7b6e7efb..00000000 --- a/examples/interchainjs/hooks/useClient.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { osmosis } from '../src/codegen/osmosis/bundle'; -import { useChain } from '@cosmos-kit/react'; - -export const useClient = (chainName: string) => { - const { getRpcEndpoint } = useChain(chainName); - - const getClient = async () => { - let rpcEndpoint = await getRpcEndpoint(); - - if (!rpcEndpoint) { - console.log('no rpc endpoint — using a fallback'); - rpcEndpoint = `https://rpc.cosmos.directory/${chainName}`; - } - - const client = await osmosis.ClientFactory.createRPCQueryClient({ - rpcEndpoint, - }); - - return client; - }; - - return { getClient }; -}; diff --git a/examples/interchainjs/hooks/useOsmosisRequests.ts b/examples/interchainjs/hooks/useOsmosisRequests.ts deleted file mode 100644 index b5994aad..00000000 --- a/examples/interchainjs/hooks/useOsmosisRequests.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { useRequest } from './useRequest'; -import { osmosis } from '../src/codegen/osmosis/bundle'; -import { QueryAllBalancesRequest } from '../src/codegen/cosmos/bank/v1beta1/query'; -import { Pool } from '../src/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; -import { useRef, useState } from 'react'; -import { useClient } from './useClient'; -import { - AccountLockedCoinsRequest, - AccountLockedLongerDurationRequest, -} from '../src/codegen/osmosis/lockup/query'; -import { QueryDelegatorDelegationsRequest } from '../src/codegen/cosmos/staking/v1beta1/query'; -import { PriceHash } from '../utils/liquidity/types'; -import { SuperfluidDelegationsByDelegatorRequest } from '../src/codegen/osmosis/superfluid/query'; -import { ActiveGaugesPerDenomRequest } from '../src/codegen/osmosis/incentives/query'; -import { - assets as nativeAssets, - asset_list as osmosisIbcAssets, -} from '@chain-registry/osmosis'; - -type Client = Awaited< - ReturnType ->; - -const osmosisAssets = [...nativeAssets.assets, ...osmosisIbcAssets.assets]; - -const removeUnsupportedPools = ({ poolAssets }: Pool, prices: PriceHash) => { - return poolAssets.every( - ({ token }) => - prices[token!.denom] && - !token!.denom.startsWith('gamm/pool') && - osmosisAssets.find((asset) => asset.base === token?.denom) - ); -}; - -export const useOsmosisRequests = (chainName: string) => { - const { getClient: getClientRequest } = useClient(chainName); - const [osmosisClient, setOsmosisClient] = useState(null); - const prevChainName = useRef(chainName); - - const getClient = async () => { - if (chainName === prevChainName.current && osmosisClient) - return osmosisClient; - - prevChainName.current = chainName; - const newClient = await getClientRequest(); - setOsmosisClient(newClient); - return newClient; - }; - - const getAllBalances = async (arg: QueryAllBalancesRequest) => { - const client = await getClient(); - const { balances } = await client.cosmos.bank.v1beta1.allBalances(arg); - return balances; - }; - - const getDelegations = async (arg: QueryDelegatorDelegationsRequest) => { - const client = await getClient(); - const { delegationResponses } = - await client.cosmos.staking.v1beta1.delegatorDelegations(arg); - return delegationResponses; - }; - - const getSuperfluidAssets = async () => { - const client = await getClient(); - const { assets: superfluidAssets } = - await client.osmosis.superfluid.allAssets(); - return superfluidAssets; - }; - - const getLockedCoins = async (arg: AccountLockedCoinsRequest) => { - const client = await getClient(); - const { coins: lockedCoins } = - await client.osmosis.lockup.accountLockedCoins(arg); - return lockedCoins; - }; - - const getLockableDurations = async () => { - const client = await getClient(); - const { lockableDurations } = - await client.osmosis.incentives.lockableDurations(); - return lockableDurations; - }; - - const getLocks = async (arg: AccountLockedLongerDurationRequest) => { - const client = await getClient(); - const { locks } = await client.osmosis.lockup.accountLockedLongerDuration( - arg - ); - return locks; - }; - - const getSuperfluidDelegations = async ( - arg: SuperfluidDelegationsByDelegatorRequest - ) => { - const client = await getClient(); - const { totalDelegatedCoins } = - await client.osmosis.superfluid.superfluidDelegationsByDelegator(arg); - return totalDelegatedCoins; - }; - - const getAllPools = async (prices: PriceHash) => { - const client = await getClient(); - const { pools } = await client.osmosis.gamm.v1beta1.pools({ - pagination: { - key: new Uint8Array(), - offset: BigInt(0), - limit: BigInt(2000), - countTotal: false, - reverse: false, - }, - }); - const formattedPools = pools - .filter(({ typeUrl }) => !typeUrl.includes('stableswap')) - .map(({ value }) => osmosis.gamm.v1beta1.Pool.decode(value)) - .filter((pool) => removeUnsupportedPools(pool, prices)); - return formattedPools; - }; - - const getActiveGauges = async (arg: ActiveGaugesPerDenomRequest) => { - const client = await getClient(); - const res = await client.osmosis.incentives.activeGaugesPerDenom(arg); - return res; - }; - - return { - getAllPools: useRequest(getAllPools), - getLockedCoins: useRequest(getLockedCoins), - getDelegations: useRequest(getDelegations), - getAllBalances: useRequest(getAllBalances), - getActiveGauges, - getSuperfluidAssets: - useRequest(getSuperfluidAssets), - getLockableDurations: - useRequest(getLockableDurations), - getLocks: useRequest(getLocks), - getSuperfluidDelegations: useRequest( - getSuperfluidDelegations - ), - }; -}; diff --git a/examples/interchainjs/hooks/useQueuedRequests.ts b/examples/interchainjs/hooks/useQueuedRequests.ts deleted file mode 100644 index bfd819dd..00000000 --- a/examples/interchainjs/hooks/useQueuedRequests.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { useState } from 'react'; - -const splitIntoChunks = (arr: T[], chunkSize: number): T[][] => { - const res = []; - for (let i = 0; i < arr.length; i += chunkSize) { - const chunk = arr.slice(i, i + chunkSize); - res.push(chunk); - } - return res; -}; - -export const useQueuedRequests = ({ - queueLength, - queueGap, -}: { - queueLength: number; - queueGap?: number; -}) => { - const [data, setData] = useState([]); - const [error, setError] = useState(); - const [loading, setLoading] = useState(false); - - const sendQueuedRequests = async (requests: Promise[]) => { - setLoading(true); - let results: T[] = []; - - const requestQueues = splitIntoChunks>(requests, queueLength); - - for (const [index, requestQueue] of Object.entries(requestQueues)) { - let queueResult: T[] = []; - - try { - queueResult = await Promise.all(requestQueue); - results = [...results, ...queueResult]; - } catch (error) { - console.error(error); - setError(error || 'Unexpected Error!'); - break; - } - - if (Number(index) !== requestQueues.length - 1 && queueGap) { - await new Promise((resolve) => setTimeout(resolve, queueGap)); - } - } - - setData(results); - setLoading(false); - }; - - return { - data, - error, - loading, - sendQueuedRequests, - }; -}; diff --git a/examples/interchainjs/hooks/useRequest.ts b/examples/interchainjs/hooks/useRequest.ts deleted file mode 100644 index 21a93ec6..00000000 --- a/examples/interchainjs/hooks/useRequest.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { useState } from 'react'; - -export const useRequest = any>( - requestFunc: (...args: Parameters) => ReturnType -) => { - const [data, setData] = useState>>(); - const [error, setError] = useState(); - const [loading, setLoading] = useState(false); - - const request = async (...args: Parameters) => { - setLoading(true); - try { - const result = await requestFunc(...args); - setData(result); - } catch (err) { - setError(err || 'Unexpected Error!'); - } finally { - setLoading(false); - } - }; - - const cleanUpData = () => { - setData(undefined); - }; - - return { - data, - error, - loading, - request, - cleanUpData, - }; -}; diff --git a/examples/interchainjs/hooks/useTransactionToast.tsx b/examples/interchainjs/hooks/useTransactionToast.tsx deleted file mode 100644 index 621be802..00000000 --- a/examples/interchainjs/hooks/useTransactionToast.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { useToast, Text, Box } from '@chakra-ui/react'; -import { TransactionResult } from '../components/types'; - -export const useTransactionToast = () => { - const toast = useToast({ - position: 'top-right', - containerStyle: { - maxWidth: '150px', - }, - }); - - const showToast = (code: number, res?: any) => { - toast({ - title: `Transaction ${ - code === TransactionResult.Success ? 'successful' : 'failed' - }`, - status: code === TransactionResult.Success ? 'success' : 'error', - duration: code === TransactionResult.Success ? 5000 : 20000, - isClosable: true, - description: ( - - {res?.message} - {res?.rawLog} - - ), - }); - }; - - return { showToast }; -}; diff --git a/examples/interchainjs/next.config.js b/examples/interchainjs/next.config.js deleted file mode 100644 index 3d3bc999..00000000 --- a/examples/interchainjs/next.config.js +++ /dev/null @@ -1,7 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - swcMinify: true, -}; - -module.exports = nextConfig; diff --git a/examples/interchainjs/package.json b/examples/interchainjs/package.json deleted file mode 100644 index 28e0fe61..00000000 --- a/examples/interchainjs/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "@cosmology/connect-chain-with-telescope", - "version": "2.0.1", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "locks:remove": "rm -f yarn.lock", - "locks:create": "generate-lockfile --lockfile ../../yarn.lock --package package.json --write yarn.lock --force", - "locks": "npm run locks:remove && npm run locks:create", - "codegen": "node scripts/codegen.js" - }, - "resolutions": { - "react": "18.2.0", - "react-dom": "18.2.0", - "@types/react": "18.0.25", - "@types/react-dom": "18.0.9" - }, - "dependencies": { - "@chain-registry/osmosis": "^1.21.0", - "@chain-registry/types": "0.17.0", - "@chakra-ui/icons": "2.0.12", - "@chakra-ui/react": "2.5.1", - "@cosmjs/amino": "0.32.3", - "@cosmjs/cosmwasm-stargate": "0.31.3", - "@cosmjs/proto-signing": "0.32.3", - "@cosmjs/stargate": "0.32.3", - "@cosmology/lcd": "^0.12.0", - "@cosmos-kit/react": "2.17.0", - "@emotion/react": "11.10.6", - "@emotion/styled": "11.10.6", - "@interchain-kit/core": "0.0.1-beta.8", - "@interchain-kit/keplr-extension": "0.0.1-beta.8", - "@interchain-kit/react": "0.0.1-beta.8", - "@interchain-ui/react": "^1.23.29", - "@interchain-ui/react-no-ssr": "^0.1.6", - "@tanstack/react-query": "4.32.0", - "bignumber.js": "9.1.0", - "chain-registry": "1.20.0", - "chakra-react-select": "^4.7.0", - "cosmos-kit": "2.18.0", - "dayjs": "^1.11.11", - "fast-fuzzy": "^1.12.0", - "framer-motion": "9.0.7", - "interchainjs": "0.0.1-beta.12", - "mobx": "^6.7.0", - "mobx-react": "^7.6.0", - "next": "^13", - "osmojs": "^16.5.1", - "react": "^18.2", - "react-dom": "^18.2", - "react-icons": "^4.12.0", - "react-markdown": "^8.0.7", - "react-minimal-pie-chart": "^8.4.0" - }, - "devDependencies": { - "@cosmjson/wasmswap": "^0.0.9", - "@cosmology/telescope": "^0.106.0", - "@protobufs/cosmos": "^0.1.0", - "@protobufs/cosmwasm": "^0.1.1", - "@protobufs/ibc": "^0.1.0", - "@types/node": "^20.14.6", - "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0", - "eslint": "8.28.0", - "eslint-config-next": "13.0.5", - "generate-lockfile": "0.0.12", - "typescript": "^5.1.6" - }, - "packageManager": "yarn@4.3.0" -} diff --git a/examples/interchainjs/pages/_app.tsx b/examples/interchainjs/pages/_app.tsx deleted file mode 100644 index 8537fbc4..00000000 --- a/examples/interchainjs/pages/_app.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import '../styles/globals.css'; -import '@interchain-ui/react/styles'; - -import type { AppProps } from 'next/app'; -import { ChakraProvider } from '@chakra-ui/react'; - -import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; -import { assetLists, chains } from '@chain-registry/v2'; -import { ChainProvider } from '@interchain-kit/react' -import { keplrWallet } from '@interchain-kit/keplr-extension' - -import { defaultTheme } from '../config'; - -const queryClient = new QueryClient(); - -const chainNames = ['cosmoshub'] -const _chains = chains.filter(c => chainNames.includes(c.chainName)) -const _assetLists = assetLists.filter(a => chainNames.includes(a.chainName)) - -function CreateCosmosApp({ Component, pageProps }: AppProps) { - const wallets = [keplrWallet] - - return ( - <> - - - - {/* @ts-ignore */} - - - - - - ); -} - -export default CreateCosmosApp; diff --git a/examples/interchainjs/pages/index.tsx b/examples/interchainjs/pages/index.tsx deleted file mode 100644 index b322b6e4..00000000 --- a/examples/interchainjs/pages/index.tsx +++ /dev/null @@ -1,271 +0,0 @@ -import { useState } from 'react'; -import Head from 'next/head'; -import BigNumber from 'bignumber.js'; - -import { - Box, - Button, - Center, - Container, - Divider, - Flex, - Grid, - Heading, - Icon, - Link, - Stack, - Text, - useColorMode, - useColorModeValue, -} from '@chakra-ui/react'; -import { BsFillMoonStarsFill, BsFillSunFill } from 'react-icons/bs'; -import { - chainassets, - chainName, - coin, - dependencies, - products, -} from '../config'; - -import { - Dependency, - handleChangeColorModeValue, - Product, - WalletSection, -} from '../components'; -import { SendTokensCard } from '../components/react/send-tokens-card'; - -import { cosmos, createRpcQueryHooks } from '../src/codegen'; -import { useRpcClient } from '../src/codegen'; -import { useChainWallet, useWalletManager, useChain } from '@interchain-kit/react' -import { } from '@interchain-kit/keplr-extension' -// import { CosmWasmSigningClient } from 'interchainjs/cosmwasm-stargate'; - -const library = { - title: 'InterchainJS', - text: 'interchainjs', - href: 'https://github.com/cosmology-tech/interchainjs', -}; - -const sendTokens = ( - // getSigningStargateClient: CosmWasmSigningClient, - setResp: (resp: string) => any, - address: string -) => { - console.log('chainName', chainName) - const { signingStargateClient, signingCosmWasmClient, signingClient } = useChain(chainName) - return async () => { - // const stargateClient = getSigningStargateClient - if ( - // !stargateClient || - !address - ) { - console.error('stargateClient undefined or address undefined.'); - return; - } - const fee = { - amount: [{ - denom: coin.base, - amount: '25000', - }], - gas: "1000000", - }; - // const signingClient = getSigningStargateClient - // const response = await signingClient.helpers.send( - // address, - // { fromAddress: address, toAddress: address, amount: [{ denom: coin.base, amount: '1' }] }, - // fee, - // 'using interchainjs' - // ) - const response = await signingCosmWasmClient.helpers.send( - address, - { fromAddress: address, toAddress: address, amount: [{ denom: coin.base, amount: '1' }] }, - fee, - 'using interchainjs' - ) - setResp(JSON.stringify(response, null, 2)); - }; -}; - -// Get the display exponent -// we can get the exponent from chain registry asset denom_units -const COIN_DISPLAY_EXPONENT = coin.denom_units.find( - (unit) => unit.denom === coin.display -)?.exponent as number; - -export default function Home() { - const { colorMode, toggleColorMode } = useColorMode(); - - // const { getSigningStargateClient, address, status, getRpcEndpoint } = - // useChain(chainName); - const walletManager = useWalletManager() - console.log('walletManager.chains', walletManager.chains) - const keplrExtension = walletManager.wallets.find(w => w.option?.name === 'keplr-extension') - const { signingCosmWasmClient: getSigningStargateClient, address } = useChainWallet(chainName, keplrExtension?.option?.name as string) - - const [resp, setResp] = useState(''); - - // const { - // data: rpcEndpoint - // } = useRpcEndpoint({ - // //@ts-ignore - // getter: getRpcEndpoint - // }); - - const rpcEndpoint = 'https://rpc.cosmos.directory/cosmoshub'; - - const { data: rpcClient } = useRpcClient({ - rpcEndpoint, - options: { - enabled: !!rpcEndpoint, - }, - }); - - console.log({ - rpcEndpoint, - rpcClient, - }); - - //@ts-ignore - // const hooks = cosmos.ClientFactory.createRPCQueryHooks({ rpc: rpcClient }) - const hooks = createRpcQueryHooks({ rpc: rpcClient }); - - const { - data: balance, - isSuccess: isBalanceLoaded, - isLoading: isFetchingBalance, - refetch: refetchBalance, - } = hooks.useBalance({ - request: { - address: address || '', - denom: chainassets?.assets[0].base as string, - }, - options: { - enabled: !!address && !!rpcClient, - // transform the returned balance into a BigNumber - select: ({ balance }) => - new BigNumber(balance?.amount ?? 0).multipliedBy( - 10 ** -COIN_DISPLAY_EXPONENT - ), - }, - }); - - console.log( - JSON.stringify( - { - address, - balance, - isBalanceLoaded, - isFetchingBalance, - refetchBalance, - }, - null, - 2 - ) - ); - - return ( - - - InterchainJS - Create Cosmos App - - - - - - - - - Create Cosmos App - - - Welcome to  - - Interchain Kit + Next.js +  - - {library.title} - - - - - - - -
- any, - address as string - )} - handleClickGetBalance={refetchBalance} - /> -
- - - - - - {products.map((product) => ( - - ))} - - - - {dependencies.map((dependency) => ( - - ))} - - - - - - - Built with - - Cosmology - - -
- ); -} diff --git a/examples/interchainjs/pages/liquidity.tsx b/examples/interchainjs/pages/liquidity.tsx deleted file mode 100644 index 62d5848c..00000000 --- a/examples/interchainjs/pages/liquidity.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import Head from 'next/head'; -import { - Box, - Divider, - Grid, - Heading, - Text, - Stack, - Container, - Link, - Button, - Flex, - Icon, - useColorMode, -} from '@chakra-ui/react'; -import { BsFillMoonStarsFill, BsFillSunFill } from 'react-icons/bs'; -import { dependencies, products } from '../config'; -import { - Product, - Dependency, - WalletSection, - ProvideLiquidity, - handleChangeColorModeValue, -} from '../components'; - -const library = { - title: 'OsmoJS', - text: 'OsmoJS', - href: 'https://github.com/osmosis-labs/osmojs', -}; - -export default function Home() { - const { colorMode, toggleColorMode } = useColorMode(); - - return ( - - - Create Cosmos App - - - - - - - - - Create Cosmos App - - - Welcome to  - - Cosmos Kit + Next.js +  - - {library.title} - - - - - - - - - - - {products.map((product) => ( - - ))} - - - - {dependencies.map((dependency) => ( - - ))} - - - - - - - Built with - - Cosmology - - - - ); -} diff --git a/examples/interchainjs/pages/mobx.tsx b/examples/interchainjs/pages/mobx.tsx deleted file mode 100644 index 0ced5e9d..00000000 --- a/examples/interchainjs/pages/mobx.tsx +++ /dev/null @@ -1,269 +0,0 @@ -import { useMemo, useState } from 'react'; -import Head from 'next/head'; -import { useChain } from '@cosmos-kit/react'; -import { StdFee } from '@cosmjs/amino'; -import { SigningStargateClient } from '@cosmjs/stargate'; -import BigNumber from 'bignumber.js'; - -import { - Box, - Button, - Center, - Container, - Divider, - Flex, - Grid, - Heading, - Icon, - Link, - Stack, - Text, - useColorMode, - useColorModeValue, -} from '@chakra-ui/react'; -import { BsFillMoonStarsFill, BsFillSunFill } from 'react-icons/bs'; -import { - chainassets, - chainName, - coin, - dependencies, - products, -} from '../config'; - -import { WalletStatus } from 'cosmos-kit'; -import { - Dependency, - handleChangeColorModeValue, - Product, - WalletSection, -} from '../components'; -import { SendTokensCard } from '../components/react/send-tokens-card'; - -import { - cosmos, - createRpcQueryHooks, - createRpcQueryMobxStores, -} from '../src/codegen'; -import { getRpcClient } from '../src/codegen'; -import { useRpcClient, useRpcEndpoint } from '../src/codegen'; -import { observer } from 'mobx-react'; -import { trace } from 'mobx'; - -const library = { - title: 'Telescope', - text: 'telescope', - href: 'https://github.com/cosmology-tech/telescope', -}; - -const sendTokens = ( - getSigningStargateClient: () => Promise, - setResp: (resp: string) => any, - address: string -) => { - return async () => { - const stargateClient = await getSigningStargateClient(); - if (!stargateClient || !address) { - console.error('stargateClient undefined or address undefined.'); - return; - } - - const { send } = cosmos.bank.v1beta1.MessageComposer.withTypeUrl; - - const msg = send({ - amount: [ - { - denom: coin.base, - amount: '1000', - }, - ], - toAddress: address, - fromAddress: address, - }); - - const fee: StdFee = { - amount: [ - { - denom: coin.base, - amount: '2000', - }, - ], - gas: '86364', - }; - const response = await stargateClient.signAndBroadcast(address, [msg], fee); - setResp(JSON.stringify(response, null, 2)); - }; -}; - -// Get the display exponent -// we can get the exponent from chain registry asset denom_units -const COIN_DISPLAY_EXPONENT = coin.denom_units.find( - (unit) => unit.denom === coin.display -)?.exponent as number; - -export default observer(function Home() { - // trace(true); - const { colorMode, toggleColorMode } = useColorMode(); - - const { getSigningStargateClient, address, status, getRpcEndpoint } = - useChain(chainName); - - const [resp, setResp] = useState(''); - - // const { - // data: rpcEndpoint - // } = useRpcEndpoint({ - // //@ts-ignore - // getter: getRpcEndpoint - // }); - - const rpcEndpoint = 'https://rpc.cosmos.directory/cosmoshub'; - - const { data: rpcClient } = useRpcClient({ - rpcEndpoint, - options: { - enabled: !!rpcEndpoint, - }, - }); - - console.log({ - rpcEndpoint, - rpcClient, - }); - - const cosmosStores = createRpcQueryMobxStores({ rpc: rpcClient }); - const store = useMemo(() => { - return new cosmosStores.cosmos.bank.v1beta1.QueryBalanceStore(); - }, [rpcClient]); - const { - data, - isSuccess: isBalanceLoaded, - isLoading: isFetchingBalance, - refetch: refetchBalance, - } = store.balance({ - address: address || '', - denom: chainassets?.assets[0].base as string, - }); - - const displayBalance = new BigNumber(data?.balance?.amount ?? 0).multipliedBy( - 10 ** -COIN_DISPLAY_EXPONENT - ); - - console.log( - JSON.stringify( - { - address, - balance: data?.balance, - isBalanceLoaded, - isFetchingBalance, - refetchBalance, - }, - null, - 2 - ) - ); - - return ( - - - Create Cosmos App - - - - - - - - - Create Cosmos App - - - Welcome to  - - Cosmos Kit + Next.js +  - - {library.title} - - - - - - - -
- Promise, - setResp as () => any, - address as string - )} - handleClickGetBalance={refetchBalance} - /> -
- - - - - - {products.map((product) => ( - - ))} - - - - {dependencies.map((dependency) => ( - - ))} - - - - - - - Built with - - Cosmology - - -
- ); -}); diff --git a/examples/interchainjs/pages/validator-test.tsx b/examples/interchainjs/pages/validator-test.tsx deleted file mode 100644 index 09d3c575..00000000 --- a/examples/interchainjs/pages/validator-test.tsx +++ /dev/null @@ -1,310 +0,0 @@ -import { useState } from 'react'; -import Head from 'next/head'; -import { useChain } from '@cosmos-kit/react'; -import { pubkeyType, StdFee } from '@cosmjs/amino'; -import { SigningStargateClient } from '@cosmjs/stargate'; -import BigNumber from 'bignumber.js'; -import { toBase64, fromBase64 } from '@cosmjs/encoding'; -import { Pubkey, encodeBech32Pubkey, decodeBech32Pubkey } from '@cosmjs/amino'; - -import { - Box, - Button, - Center, - Container, - Divider, - Flex, - Grid, - Heading, - Icon, - Link, - Stack, - Text, - useColorMode, - useColorModeValue, -} from '@chakra-ui/react'; -import { BsFillMoonStarsFill, BsFillSunFill } from 'react-icons/bs'; -import { - chainassets, - chainName, - coin, - dependencies, - products, -} from '../config'; - -import { WalletStatus } from 'cosmos-kit'; -import { - Dependency, - handleChangeColorModeValue, - Product, - WalletSection, -} from '../components'; -import { SendTokensCard } from '../components/react/send-tokens-card'; - -import { cosmos, createRpcQueryHooks } from '../src/codegen'; -import { useRpcClient, useRpcEndpoint } from '../src/codegen'; -import { QueryValidatorRequest } from '../src/codegen/cosmos/staking/v1beta1/query'; -import { PubKey } from '../src/codegen/cosmos/crypto/ed25519/keys'; -import { AnyAmino } from '../src/codegen/google/protobuf/any'; -import { Validator } from '../src/codegen/cosmos/staking/v1beta1/staking'; - -(BigInt.prototype as any).toJSON = function () { - return this.toString(); -}; - -function encodeAmino( - typeUrl: string, - pubkey: { key: Uint8Array }, - pubkeyType: string, - prefix: string -): AnyAmino { - const pubKeyString = toBase64(pubkey.key); - - const cryptoEncodedPubkey = encodeBech32Pubkey( - { - type: pubkeyType, - value: pubKeyString, - }, - prefix - ); - - return { - type: typeUrl, - value: { - key: new TextEncoder().encode(cryptoEncodedPubkey), - }, - }; -} - -function decodeAmino(typeUrl: string, pubkey: { key: Uint8Array }) { - const cryptoEncodedKeyString = new TextDecoder().decode(pubkey.key); - - const cryptoDecodedPubkey = decodeBech32Pubkey(cryptoEncodedKeyString); - - return { - typeUrl: typeUrl, - value: { - key: new TextEncoder().encode(cryptoDecodedPubkey.value), - }, - }; -} - -const library = { - title: 'Telescope', - text: 'telescope', - href: 'https://github.com/cosmology-tech/telescope', -}; - -const sendTokens = ( - getSigningStargateClient: () => Promise, - setResp: (resp: string) => any, - address: string -) => { - return async () => { - const stargateClient = await getSigningStargateClient(); - if (!stargateClient || !address) { - console.error('stargateClient undefined or address undefined.'); - return; - } - - const { send } = cosmos.bank.v1beta1.MessageComposer.withTypeUrl; - - const msg = send({ - amount: [ - { - denom: coin.base, - amount: '1000', - }, - ], - toAddress: address, - fromAddress: address, - }); - - const fee: StdFee = { - amount: [ - { - denom: coin.base, - amount: '2000', - }, - ], - gas: '86364', - }; - const response = await stargateClient.signAndBroadcast(address, [msg], fee); - setResp(JSON.stringify(response, null, 2)); - }; -}; - -// Get the display exponent -// we can get the exponent from chain registry asset denom_units -const COIN_DISPLAY_EXPONENT = coin.denom_units.find( - (unit) => unit.denom === coin.display -)?.exponent as number; - -export default function Home() { - const { colorMode, toggleColorMode } = useColorMode(); - - const { getSigningStargateClient, address, status, getRpcEndpoint } = - useChain(chainName); - - const [resp, setResp] = useState(''); - - // const { - // data: rpcEndpoint - // } = useRpcEndpoint({ - // //@ts-ignore - // getter: getRpcEndpoint - // }); - - const rpcEndpoint = 'https://rpc.cosmos.directory/cosmoshub'; - - const { data: rpcClient } = useRpcClient({ - rpcEndpoint, - options: { - enabled: !!rpcEndpoint, - }, - }); - - console.log({ - rpcEndpoint, - rpcClient, - }); - - //@ts-ignore - // const hooks = cosmos.ClientFactory.createRPCQueryHooks({ rpc: rpcClient }) - const hooks = createRpcQueryHooks({ rpc: rpcClient }); - - //validatorAddr: cosmosvaloper1tflk30mq5vgqjdly92kkhhq3raev2hnz6eete3 - //"consensusPubkey": { - // "typeUrl": "/cosmos.crypto.ed25519.PubKey", - // "value": {} - // } - const { - data: validator, - isSuccess: isValidatorLoaded, - isLoading: isFetchingValidator, - refetch, - } = hooks.useValidator({ - request: QueryValidatorRequest.fromPartial({ - validatorAddr: 'cosmosvaloper1tflk30mq5vgqjdly92kkhhq3raev2hnz6eete3', - }), - }); - - if (validator) { - const aminoValidator = Validator.toAmino(validator!.validator!); - - console.log(aminoValidator); - - const protoValidator = Validator.fromAmino(aminoValidator); - - console.log(protoValidator); - } - - return ( - - - Create Cosmos App - - - - - - - - - Create Cosmos App - - - Welcome to  - - Cosmos Kit + Next.js +  - - {library.title} - - - - - - - -
- Promise, - setResp as () => any, - address as string - )} - handleClickGetBalance={refetch} - /> -
- - - - - - {products.map((product) => ( - - ))} - - - - {dependencies.map((dependency) => ( - - ))} - - - - - - - Built with - - Cosmology - - -
- ); -} diff --git a/examples/interchainjs/pages/vote.tsx b/examples/interchainjs/pages/vote.tsx deleted file mode 100644 index a95357f3..00000000 --- a/examples/interchainjs/pages/vote.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import Head from 'next/head'; -import { - Box, - Divider, - Grid, - Heading, - Text, - Stack, - Container, - Link, - Button, - Flex, - Icon, - useColorMode, - useColorModeValue, -} from '@chakra-ui/react'; -import { BsFillMoonStarsFill, BsFillSunFill } from 'react-icons/bs'; -import { - Product, - Dependency, - WalletSectionMulti, - VotingSection, -} from '../components'; -import { dependencies, products } from '../config'; -import { useState } from 'react'; -import { ChainName } from 'cosmos-kit'; -import React from 'react'; - -export default function Home() { - const { colorMode, toggleColorMode } = useColorMode(); - const [chainName, setChainName] = useState('osmosis'); - - return ( - - - Create Cosmos App - - - - - - - - - Create Cosmos App - - - Welcome to  - - Cosmos Kit + Next.js - - - - - {chainName && } - - {products.map((product) => ( - - ))} - - - {dependencies.map((dependency) => ( - - ))} - - - - - - Built with - - Cosmology - - - - ); -} diff --git a/examples/interchainjs/proto/confio/LICENSE b/examples/interchainjs/proto/confio/LICENSE deleted file mode 100644 index deaad1f5..00000000 --- a/examples/interchainjs/proto/confio/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Confio/ICS23 -License: Apache2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Confio UO - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/examples/interchainjs/proto/confio/README.md b/examples/interchainjs/proto/confio/README.md deleted file mode 100644 index af52fb63..00000000 --- a/examples/interchainjs/proto/confio/README.md +++ /dev/null @@ -1 +0,0 @@ -# confio \ No newline at end of file diff --git a/examples/interchainjs/proto/confio/proofs.proto b/examples/interchainjs/proto/confio/proofs.proto deleted file mode 100644 index da43503e..00000000 --- a/examples/interchainjs/proto/confio/proofs.proto +++ /dev/null @@ -1,234 +0,0 @@ -syntax = "proto3"; - -package ics23; -option go_package = "github.com/confio/ics23/go"; - -enum HashOp { - // NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NO_HASH = 0; - SHA256 = 1; - SHA512 = 2; - KECCAK = 3; - RIPEMD160 = 4; - BITCOIN = 5; // ripemd160(sha256(x)) -} - -/** -LengthOp defines how to process the key and value of the LeafOp -to include length information. After encoding the length with the given -algorithm, the length will be prepended to the key and value bytes. -(Each one with it's own encoded length) -*/ -enum LengthOp { - // NO_PREFIX don't include any length info - NO_PREFIX = 0; - // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_PROTO = 1; - // VAR_RLP uses rlp int encoding of the length - VAR_RLP = 2; - // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_BIG = 3; - // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE = 4; - // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_BIG = 5; - // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE = 6; - // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_32_BYTES = 7; - // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - REQUIRE_64_BYTES = 8; -} - -/** -ExistenceProof takes a key and a value and a set of steps to perform on it. -The result of peforming all these steps will provide a "root hash", which can -be compared to the value in a header. - -Since it is computationally infeasible to produce a hash collission for any of the used -cryptographic hash functions, if someone can provide a series of operations to transform -a given key and value into a root hash that matches some trusted root, these key and values -must be in the referenced merkle tree. - -The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -which should be controlled by a spec. Eg. with lengthOp as NONE, - prefix = FOO, key = BAR, value = CHOICE -and - prefix = F, key = OOBAR, value = CHOICE -would produce the same value. - -With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -in the ProofSpec is valuable to prevent this mutability. And why all trees should -length-prefix the data before hashing it. -*/ -message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; -} - -/* -NonExistenceProof takes a proof of two neighbors, one left of the desired key, -one right of the desired key. If both proofs are valid AND they are neighbors, -then there is no valid proof for the given key. -*/ -message NonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - ExistenceProof left = 2; - ExistenceProof right = 3; -} - -/* -CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -*/ -message CommitmentProof { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - BatchProof batch = 3; - CompressedBatchProof compressed = 4; - } -} - -/** -LeafOp represents the raw key-value data we wish to prove, and -must be flexible to represent the internal transformation from -the original key-value pairs into the basis hash, for many existing -merkle trees. - -key and value are passed in. So that the signature of this operation is: - leafOp(key, value) -> output - -To process this, first prehash the keys and values if needed (ANY means no hash in this case): - hkey = prehashKey(key) - hvalue = prehashValue(value) - -Then combine the bytes, and hash it - output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -*/ -message LeafOp { - HashOp hash = 1; - HashOp prehash_key = 2; - HashOp prehash_value = 3; - LengthOp length = 4; - // prefix is a fixed bytes that may optionally be included at the beginning to differentiate - // a leaf node from an inner node. - bytes prefix = 5; -} - -/** -InnerOp represents a merkle-proof step that is not a leaf. -It represents concatenating two children and hashing them to provide the next result. - -The result of the previous step is passed in, so the signature of this op is: - innerOp(child) -> output - -The result of applying InnerOp should be: - output = op.hash(op.prefix || child || op.suffix) - - where the || operator is concatenation of binary data, -and child is the result of hashing all the tree below this step. - -Any special data, like prepending child with the length, or prepending the entire operation with -some value to differentiate from leaf nodes, should be included in prefix and suffix. -If either of prefix or suffix is empty, we just treat it as an empty string -*/ -message InnerOp { - HashOp hash = 1; - bytes prefix = 2; - bytes suffix = 3; -} - - -/** -ProofSpec defines what the expected parameters are for a given proof type. -This can be stored in the client and used to validate any incoming proofs. - - verify(ProofSpec, Proof) -> Proof | Error - -As demonstrated in tests, if we don't fix the algorithm used to calculate the -LeafHash for a given tree, there are many possible key-value pairs that can -generate a given hash (by interpretting the preimage differently). -We need this for proper security, requires client knows a priori what -tree format server uses. But not in code, rather a configuration object. -*/ -message ProofSpec { - // any field in the ExistenceProof must be the same as in this spec. - // except Prefix, which is just the first bytes of prefix (spec can be longer) - LeafOp leaf_spec = 1; - InnerSpec inner_spec = 2; - // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - int32 max_depth = 3; - // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - int32 min_depth = 4; -} - -/* -InnerSpec contains all store-specific structure info to determine if two proofs from a -given store are neighbors. - -This enables: - - isLeftMost(spec: InnerSpec, op: InnerOp) - isRightMost(spec: InnerSpec, op: InnerOp) - isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -*/ -message InnerSpec { - // Child order is the ordering of the children node, must count from 0 - // iavl tree is [0, 1] (left then right) - // merk is [0, 2, 1] (left, right, here) - repeated int32 child_order = 1; - int32 child_size = 2; - int32 min_prefix_length = 3; - int32 max_prefix_length = 4; - // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - bytes empty_child = 5; - // hash is the algorithm that must be used for each InnerOp - HashOp hash = 6; -} - -/* -BatchProof is a group of multiple proof types than can be compressed -*/ -message BatchProof { - repeated BatchEntry entries = 1; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message BatchEntry { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - } -} - - -/****** all items here are compressed forms *******/ - -message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message CompressedBatchEntry { - oneof proof { - CompressedExistenceProof exist = 1; - CompressedNonExistenceProof nonexist = 2; - } -} - -message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; -} - -message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; - CompressedExistenceProof right = 3; -} diff --git a/examples/interchainjs/proto/cosmos/LICENSE b/examples/interchainjs/proto/cosmos/LICENSE deleted file mode 100644 index 063e03fc..00000000 --- a/examples/interchainjs/proto/cosmos/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Cosmos SDK -License: Apache2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 All in Bits, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/README.md b/examples/interchainjs/proto/cosmos/README.md deleted file mode 100644 index 98a49c6b..00000000 --- a/examples/interchainjs/proto/cosmos/README.md +++ /dev/null @@ -1 +0,0 @@ -# cosmos \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/app/v1alpha1/config.proto b/examples/interchainjs/proto/cosmos/app/v1alpha1/config.proto deleted file mode 100644 index ed775006..00000000 --- a/examples/interchainjs/proto/cosmos/app/v1alpha1/config.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.v1alpha1; - -import "google/protobuf/any.proto"; - -// Config represents the configuration for a Cosmos SDK ABCI app. -// It is intended that all state machine logic including the version of -// baseapp and tx handlers (and possibly even Tendermint) that an app needs -// can be described in a config object. For compatibility, the framework should -// allow a mixture of declarative and imperative app wiring, however, apps -// that strive for the maximum ease of maintainability should be able to describe -// their state machine with a config object alone. -message Config { - // modules are the module configurations for the app. - repeated ModuleConfig modules = 1; -} - -// ModuleConfig is a module configuration for an app. -message ModuleConfig { - // name is the unique name of the module within the app. It should be a name - // that persists between different versions of a module so that modules - // can be smoothly upgraded to new versions. - // - // For example, for the module cosmos.bank.module.v1.Module, we may chose - // to simply name the module "bank" in the app. When we upgrade to - // cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same - // and the framework knows that the v2 module should receive all the same state - // that the v1 module had. Note: modules should provide info on which versions - // they can migrate from in the ModuleDescriptor.can_migration_from field. - string name = 1; - - // config is the config object for the module. Module config messages should - // define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - google.protobuf.Any config = 2; -} diff --git a/examples/interchainjs/proto/cosmos/app/v1alpha1/module.proto b/examples/interchainjs/proto/cosmos/app/v1alpha1/module.proto deleted file mode 100644 index 599078d7..00000000 --- a/examples/interchainjs/proto/cosmos/app/v1alpha1/module.proto +++ /dev/null @@ -1,93 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.v1alpha1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - // module indicates that this proto type is a config object for an app module - // and optionally provides other descriptive information about the module. - // It is recommended that a new module config object and go module is versioned - // for every state machine breaking version of a module. The recommended - // pattern for doing this is to put module config objects in a separate proto - // package from the API they expose. Ex: the cosmos.group.v1 API would be - // exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc. - ModuleDescriptor module = 57193479; -} - -// ModuleDescriptor describes an app module. -message ModuleDescriptor { - // go_import names the package that should be imported by an app to load the - // module in the runtime module registry. Either go_import must be defined here - // or the go_package option must be defined at the file level to indicate - // to users where to location the module implementation. go_import takes - // precedence over go_package when both are defined. - string go_import = 1; - - // use_package refers to a protobuf package that this module - // uses and exposes to the world. In an app, only one module should "use" - // or own a single protobuf package. It is assumed that the module uses - // all of the .proto files in a single package. - repeated PackageReference use_package = 2; - - // can_migrate_from defines which module versions this module can migrate - // state from. The framework will check that one module version is able to - // migrate from a previous module version before attempting to update its - // config. It is assumed that modules can transitively migrate from earlier - // versions. For instance if v3 declares it can migrate from v2, and v2 - // declares it can migrate from v1, the framework knows how to migrate - // from v1 to v3, assuming all 3 module versions are registered at runtime. - repeated MigrateFromInfo can_migrate_from = 3; -} - -// PackageReference is a reference to a protobuf package used by a module. -message PackageReference { - // name is the fully-qualified name of the package. - string name = 1; - - // revision is the optional revision of the package that is being used. - // Protobuf packages used in Cosmos should generally have a major version - // as the last part of the package name, ex. foo.bar.baz.v1. - // The revision of a package can be thought of as the minor version of a - // package which has additional backwards compatible definitions that weren't - // present in a previous version. - // - // A package should indicate its revision with a source code comment - // above the package declaration in one of its fields containing the - // test "Revision N" where N is an integer revision. All packages start - // at revision 0 the first time they are released in a module. - // - // When a new version of a module is released and items are added to existing - // .proto files, these definitions should contain comments of the form - // "Since Revision N" where N is an integer revision. - // - // When the module runtime starts up, it will check the pinned proto - // image and panic if there are runtime protobuf definitions that are not - // in the pinned descriptor which do not have - // a "Since Revision N" comment or have a "Since Revision N" comment where - // N is <= to the revision specified here. This indicates that the protobuf - // files have been updated, but the pinned file descriptor hasn't. - // - // If there are items in the pinned file descriptor with a revision - // greater than the value indicated here, this will also cause a panic - // as it may mean that the pinned descriptor for a legacy module has been - // improperly updated or that there is some other versioning discrepancy. - // Runtime protobuf definitions will also be checked for compatibility - // with pinned file descriptors to make sure there are no incompatible changes. - // - // This behavior ensures that: - // * pinned proto images are up-to-date - // * protobuf files are carefully annotated with revision comments which - // are important good client UX - // * protobuf files are changed in backwards and forwards compatible ways - uint32 revision = 2; -} - -// MigrateFromInfo is information on a module version that a newer module -// can migrate from. -message MigrateFromInfo { - - // module is the fully-qualified protobuf name of the module config object - // for the previous module version, ex: "cosmos.group.module.v1.Module". - string module = 1; -} diff --git a/examples/interchainjs/proto/cosmos/app/v1alpha1/query.proto b/examples/interchainjs/proto/cosmos/app/v1alpha1/query.proto deleted file mode 100644 index efec9c81..00000000 --- a/examples/interchainjs/proto/cosmos/app/v1alpha1/query.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.v1alpha1; - -import "cosmos/app/v1alpha1/config.proto"; - -// Query is the app module query service. -service Query { - - // Config returns the current app config. - rpc Config(QueryConfigRequest) returns (QueryConfigResponse) {} -} - -// QueryConfigRequest is the Query/Config request type. -message QueryConfigRequest {} - -// QueryConfigRequest is the Query/Config response type. -message QueryConfigResponse { - - // config is the current app config. - Config config = 1; -} diff --git a/examples/interchainjs/proto/cosmos/auth/v1beta1/auth.proto b/examples/interchainjs/proto/cosmos/auth/v1beta1/auth.proto deleted file mode 100644 index 963c6f15..00000000 --- a/examples/interchainjs/proto/cosmos/auth/v1beta1/auth.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// BaseAccount defines a base account type. It contains all the necessary fields -// for basic account functionality. Any custom account type should extend this -// type for additional functionality (e.g. vesting). -message BaseAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - option (cosmos_proto.implements_interface) = "AccountI"; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty"]; - uint64 account_number = 3; - uint64 sequence = 4; -} - -// ModuleAccount defines an account for modules that holds coins on a pool. -message ModuleAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "ModuleAccountI"; - - BaseAccount base_account = 1 [(gogoproto.embed) = true]; - string name = 2; - repeated string permissions = 3; -} - -// Params defines the parameters for the auth module. -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - uint64 max_memo_characters = 1; - uint64 tx_sig_limit = 2; - uint64 tx_size_cost_per_byte = 3; - uint64 sig_verify_cost_ed25519 = 4 [(gogoproto.customname) = "SigVerifyCostED25519"]; - uint64 sig_verify_cost_secp256k1 = 5 [(gogoproto.customname) = "SigVerifyCostSecp256k1"]; -} diff --git a/examples/interchainjs/proto/cosmos/auth/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/auth/v1beta1/genesis.proto deleted file mode 100644 index c88b94ee..00000000 --- a/examples/interchainjs/proto/cosmos/auth/v1beta1/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// GenesisState defines the auth module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // accounts are the accounts present at genesis. - repeated google.protobuf.Any accounts = 2; -} diff --git a/examples/interchainjs/proto/cosmos/auth/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/auth/v1beta1/query.proto deleted file mode 100644 index 7798da00..00000000 --- a/examples/interchainjs/proto/cosmos/auth/v1beta1/query.proto +++ /dev/null @@ -1,130 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// Query defines the gRPC querier service. -service Query { - // Accounts returns all the existing accounts - // - // Since: cosmos-sdk 0.43 - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; - } - - // Account returns account details based on address. - rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; - } - - // Params queries all parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/params"; - } - - // ModuleAccounts returns all the existing module accounts. - rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; - } - - // Bech32 queries bech32Prefix - rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; - } - - // AddressBytesToString converts Account Address bytes to string - rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; - } - - // AddressStringToBytes converts Address string to bytes - rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; - } -} - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsResponse { - // accounts are the existing accounts - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -message QueryAccountRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address defines the address to query for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -message QueryModuleAccountsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -message QueryModuleAccountsResponse { - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; -} - -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method -message Bech32PrefixRequest {} - -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method -message Bech32PrefixResponse { - string bech32_prefix = 1; -} - -// AddressBytesToStringRequest is the request type for AddressString rpc method -message AddressBytesToStringRequest { - bytes address_bytes = 1; -} - -// AddressBytesToStringResponse is the response type for AddressString rpc method -message AddressBytesToStringResponse { - string address_string = 1; -} - -// AddressStringToBytesRequest is the request type for AccountBytes rpc method -message AddressStringToBytesRequest { - string address_string = 1; -} - -// AddressStringToBytesResponse is the response type for AddressBytes rpc method -message AddressStringToBytesResponse { - bytes address_bytes = 1; -} diff --git a/examples/interchainjs/proto/cosmos/authz/v1beta1/authz.proto b/examples/interchainjs/proto/cosmos/authz/v1beta1/authz.proto deleted file mode 100644 index 06ce288a..00000000 --- a/examples/interchainjs/proto/cosmos/authz/v1beta1/authz.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// GenericAuthorization gives the grantee unrestricted permissions to execute -// the provided method on behalf of the granter's account. -message GenericAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - // Msg, identified by it's type URL, to grant unrestricted permissions to execute - string msg = 1; -} - -// Grant gives permissions to execute -// the provide method with expiration time. -message Grant { - google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; - // time when the grant will expire and will be pruned. If null, then the grant - // doesn't have a time expiration (other conditions in `authorization` - // may apply to invalidate the grant) - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true]; -} - -// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -// It is used in genesis.proto and query.proto -message GrantAuthorization { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; - google.protobuf.Timestamp expiration = 4 [(gogoproto.stdtime) = true]; -} - -// GrantQueueItem contains the list of TypeURL of a sdk.Msg. -message GrantQueueItem { - // msg_type_urls contains the list of TypeURL of a sdk.Msg. - repeated string msg_type_urls = 1; -} diff --git a/examples/interchainjs/proto/cosmos/authz/v1beta1/event.proto b/examples/interchainjs/proto/cosmos/authz/v1beta1/event.proto deleted file mode 100644 index 0476649a..00000000 --- a/examples/interchainjs/proto/cosmos/authz/v1beta1/event.proto +++ /dev/null @@ -1,27 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// EventGrant is emitted on Msg/Grant -message EventGrant { - // Msg type URL for which an autorization is granted - string msg_type_url = 2; - // Granter account address - string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Grantee account address - string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventRevoke is emitted on Msg/Revoke -message EventRevoke { - // Msg type URL for which an autorization is revoked - string msg_type_url = 2; - // Granter account address - string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Grantee account address - string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} diff --git a/examples/interchainjs/proto/cosmos/authz/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/authz/v1beta1/genesis.proto deleted file mode 100644 index 310f6265..00000000 --- a/examples/interchainjs/proto/cosmos/authz/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// GenesisState defines the authz module's genesis state. -message GenesisState { - repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/authz/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/authz/v1beta1/query.proto deleted file mode 100644 index 62154ac1..00000000 --- a/examples/interchainjs/proto/cosmos/authz/v1beta1/query.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/authz/v1beta1/authz.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// Query defines the gRPC querier service. -service Query { - // Returns list of `Authorization`, granted to the grantee by the granter. - rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; - } - - // GranterGrants returns list of `GrantAuthorization`, granted by granter. - // - // Since: cosmos-sdk 0.46 - rpc GranterGrants(QueryGranterGrantsRequest) returns (QueryGranterGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/granter/{granter}"; - } - - // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // - // Since: cosmos-sdk 0.46 - rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; - } -} - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -message QueryGrantsRequest { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Optional, msg_type_url, when set, will query only grants matching given msg type. - string msg_type_url = 3; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -message QueryGrantsResponse { - // authorizations is a list of grants granted for grantee by granter. - repeated Grant grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -message QueryGranterGrantsRequest { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -message QueryGranterGrantsResponse { - // grants is a list of grants granted by the granter. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. -message QueryGranteeGrantsRequest { - string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -message QueryGranteeGrantsResponse { - // grants is a list of grants granted to the grantee. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmos/authz/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/authz/v1beta1/tx.proto deleted file mode 100644 index 068218ff..00000000 --- a/examples/interchainjs/proto/cosmos/authz/v1beta1/tx.proto +++ /dev/null @@ -1,75 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/authz/v1beta1/authz.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// Msg defines the authz Msg service. -service Msg { - // Grant grants the provided authorization to the grantee on the granter's - // account with the provided expiration time. If there is already a grant - // for the given (granter, grantee, Authorization) triple, then the grant - // will be overwritten. - rpc Grant(MsgGrant) returns (MsgGrantResponse); - - // Exec attempts to execute the provided messages using - // authorizations granted to the grantee. Each message should have only - // one signer corresponding to the granter of the authorization. - rpc Exec(MsgExec) returns (MsgExecResponse); - - // Revoke revokes any authorization corresponding to the provided method name on the - // granter's account that has been granted to the grantee. - rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); -} - -// MsgGrant is a request type for Grant method. It declares authorization to the grantee -// on behalf of the granter with the provided expiration time. -message MsgGrant { - option (cosmos.msg.v1.signer) = "granter"; - - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; -} - -// MsgExecResponse defines the Msg/MsgExecResponse response type. -message MsgExecResponse { - repeated bytes results = 1; -} - -// MsgExec attempts to execute the provided messages using -// authorizations granted to the grantee. Each message should have only -// one signer corresponding to the granter of the authorization. -message MsgExec { - option (cosmos.msg.v1.signer) = "grantee"; - - string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Authorization Msg requests to execute. Each msg must implement Authorization interface - // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - // triple and validate it. - repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"]; -} - -// MsgGrantResponse defines the Msg/MsgGrant response type. -message MsgGrantResponse {} - -// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -// granter's account with that has been granted to the grantee. -message MsgRevoke { - option (cosmos.msg.v1.signer) = "granter"; - - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string msg_type_url = 3; -} - -// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -message MsgRevokeResponse {} diff --git a/examples/interchainjs/proto/cosmos/bank/v1beta1/authz.proto b/examples/interchainjs/proto/cosmos/bank/v1beta1/authz.proto deleted file mode 100644 index 4f58b15e..00000000 --- a/examples/interchainjs/proto/cosmos/bank/v1beta1/authz.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// SendAuthorization allows the grantee to spend up to spend_limit coins from -// the granter's account. -// -// Since: cosmos-sdk 0.43 -message SendAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} diff --git a/examples/interchainjs/proto/cosmos/bank/v1beta1/bank.proto b/examples/interchainjs/proto/cosmos/bank/v1beta1/bank.proto deleted file mode 100644 index 7bc9819d..00000000 --- a/examples/interchainjs/proto/cosmos/bank/v1beta1/bank.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Params defines the parameters for the bank module. -message Params { - option (gogoproto.goproto_stringer) = false; - repeated SendEnabled send_enabled = 1; - bool default_send_enabled = 2; -} - -// SendEnabled maps coin denom to a send_enabled status (whether a denom is -// sendable). -message SendEnabled { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - string denom = 1; - bool enabled = 2; -} - -// Input models transaction input. -message Input { - option (cosmos.msg.v1.signer) = "address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Output models transaction outputs. -message Output { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Supply represents a struct that passively keeps track of the total supply -// amounts in the network. -// This message is deprecated now that supply is indexed by denom. -message Supply { - option deprecated = true; - - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/migrations/v040.SupplyI"; - - repeated cosmos.base.v1beta1.Coin total = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// DenomUnit represents a struct that describes a given -// denomination unit of the basic token. -message DenomUnit { - // denom represents the string name of the given denom unit (e.g uatom). - string denom = 1; - // exponent represents power of 10 exponent that one must - // raise the base_denom to in order to equal the given DenomUnit's denom - // 1 denom = 10^exponent base_denom - // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - // exponent = 6, thus: 1 atom = 10^6 uatom). - uint32 exponent = 2; - // aliases is a list of string aliases for the given denom - repeated string aliases = 3; -} - -// Metadata represents a struct that describes -// a basic token. -message Metadata { - string description = 1; - // denom_units represents the list of DenomUnit's for a given coin - repeated DenomUnit denom_units = 2; - // base represents the base denom (should be the DenomUnit with exponent = 0). - string base = 3; - // display indicates the suggested denom that should be - // displayed in clients. - string display = 4; - // name defines the name of the token (eg: Cosmos Atom) - // - // Since: cosmos-sdk 0.43 - string name = 5; - // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - // be the same as the display. - // - // Since: cosmos-sdk 0.43 - string symbol = 6; - // URI to a document (on or off-chain) that contains additional information. Optional. - // - // Since: cosmos-sdk 0.46 - string uri = 7 [(gogoproto.customname) = "URI"]; - // URIHash is a sha256 hash of a document pointed by URI. It's used to verify that - // the document didn't change. Optional. - // - // Since: cosmos-sdk 0.46 - string uri_hash = 8 [(gogoproto.customname) = "URIHash"]; -} diff --git a/examples/interchainjs/proto/cosmos/bank/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/bank/v1beta1/genesis.proto deleted file mode 100644 index aa35790b..00000000 --- a/examples/interchainjs/proto/cosmos/bank/v1beta1/genesis.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// GenesisState defines the bank module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // balances is an array containing the balances of all the accounts. - repeated Balance balances = 2 [(gogoproto.nullable) = false]; - - // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - repeated cosmos.base.v1beta1.Coin supply = 3 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; - - // denom_metadata defines the metadata of the differents coins. - repeated Metadata denom_metadata = 4 [(gogoproto.nullable) = false]; -} - -// Balance defines an account address and balance pair used in the bank module's -// genesis state. -message Balance { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the balance holder. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // coins defines the different coins this balance holds. - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/bank/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/bank/v1beta1/query.proto deleted file mode 100644 index cbe7f38a..00000000 --- a/examples/interchainjs/proto/cosmos/bank/v1beta1/query.proto +++ /dev/null @@ -1,231 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Query defines the gRPC querier service. -service Query { - // Balance queries the balance of a single coin for a single account. - rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom"; - } - - // AllBalances queries the balance of all coins for a single account. - rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; - } - - // SpendableBalances queries the spenable balance of all coins for a single - // account. - rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}"; - } - - // TotalSupply queries the total supply of all coins. - rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply"; - } - - // SupplyOf queries the supply of a single coin. - rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom"; - } - - // Params queries the parameters of x/bank module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/params"; - } - - // DenomsMetadata queries the client metadata of a given coin denomination. - rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; - } - - // DenomsMetadata queries the client metadata for all registered coin - // denominations. - rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; - } - - // DenomOwners queries for all account addresses that own a particular token - // denomination. - rpc DenomOwners(QueryDenomOwnersRequest) returns (QueryDenomOwnersResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}"; - } -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method. -message QueryBalanceRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // denom is the coin denom to query balances for. - string denom = 2; -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -message QueryBalanceResponse { - // balance is the balance of the coin. - cosmos.base.v1beta1.Coin balance = 1; -} - -// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -message QueryAllBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpendableBalancesRequest defines the gRPC request structure for querying -// an account's spendable balances. -message QuerySpendableBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query spendable balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for querying -// an account's spendable balances. -message QuerySpendableBalancesResponse { - // balances is the spendable balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -// method. -message QueryTotalSupplyRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // pagination defines an optional pagination for the request. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -message QueryTotalSupplyResponse { - // supply is the supply of the coins - repeated cosmos.base.v1beta1.Coin supply = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -message QuerySupplyOfRequest { - // denom is the coin denom to query balances for. - string denom = 1; -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -message QuerySupplyOfResponse { - // amount is the supply of the coin. - cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; -} - -// QueryParamsRequest defines the request type for querying x/bank parameters. -message QueryParamsRequest {} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -message QueryDenomsMetadataRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -// method. -message QueryDenomsMetadataResponse { - // metadata provides the client information for all the registered tokens. - repeated Metadata metadatas = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -message QueryDenomMetadataRequest { - // denom is the coin denom to query the metadata for. - string denom = 1; -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -// method. -message QueryDenomMetadataResponse { - // metadata describes and provides all the client information for the requested token. - Metadata metadata = 1 [(gogoproto.nullable) = false]; -} - -// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -// which queries for a paginated set of all account holders of a particular -// denomination. -message QueryDenomOwnersRequest { - // denom defines the coin denomination to query all account holders for. - string denom = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// DenomOwner defines structure representing an account that owns or holds a -// particular denominated token. It contains the account address and account -// balance of the denominated token. -message DenomOwner { - // address defines the address that owns a particular denomination. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // balance is the balance of the denominated coin for an account. - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; -} - -// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -message QueryDenomOwnersResponse { - repeated DenomOwner denom_owners = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmos/bank/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/bank/v1beta1/tx.proto deleted file mode 100644 index 22e62cbf..00000000 --- a/examples/interchainjs/proto/cosmos/bank/v1beta1/tx.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Msg defines the bank Msg service. -service Msg { - // Send defines a method for sending coins from one account to another account. - rpc Send(MsgSend) returns (MsgSendResponse); - - // MultiSend defines a method for sending coins from some accounts to other accounts. - rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); -} - -// MsgSend represents a message to send coins from one account to another. -message MsgSend { - option (cosmos.msg.v1.signer) = "from_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse {} - -// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -message MsgMultiSend { - option (cosmos.msg.v1.signer) = "inputs"; - - option (gogoproto.equal) = false; - - repeated Input inputs = 1 [(gogoproto.nullable) = false]; - repeated Output outputs = 2 [(gogoproto.nullable) = false]; -} - -// MsgMultiSendResponse defines the Msg/MultiSend response type. -message MsgMultiSendResponse {} diff --git a/examples/interchainjs/proto/cosmos/base/abci/v1beta1/abci.proto b/examples/interchainjs/proto/cosmos/base/abci/v1beta1/abci.proto deleted file mode 100644 index 09a2fcc4..00000000 --- a/examples/interchainjs/proto/cosmos/base/abci/v1beta1/abci.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; -package cosmos.base.abci.v1beta1; - -import "gogoproto/gogo.proto"; -import "tendermint/abci/types.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; - -// TxResponse defines a structure containing relevant tx data and metadata. The -// tags are stringified and the log is JSON decoded. -message TxResponse { - option (gogoproto.goproto_getters) = false; - // The block height - int64 height = 1; - // The transaction hash. - string txhash = 2 [(gogoproto.customname) = "TxHash"]; - // Namespace for the Code - string codespace = 3; - // Response code. - uint32 code = 4; - // Result bytes, if any. - string data = 5; - // The output of the application's logger (raw string). May be - // non-deterministic. - string raw_log = 6; - // The output of the application's logger (typed). May be non-deterministic. - repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; - // Additional information. May be non-deterministic. - string info = 8; - // Amount of gas requested for transaction. - int64 gas_wanted = 9; - // Amount of gas consumed by transaction. - int64 gas_used = 10; - // The request transaction bytes. - google.protobuf.Any tx = 11; - // Time of the previous block. For heights > 1, it's the weighted median of - // the timestamps of the valid votes in the block.LastCommit. For height == 1, - // it's genesis time. - string timestamp = 12; - // Events defines all the events emitted by processing a transaction. Note, - // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with - // additional metadata, emitted only by processing the messages. - // - // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - repeated tendermint.abci.Event events = 13 [(gogoproto.nullable) = false]; -} - -// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -message ABCIMessageLog { - option (gogoproto.stringer) = true; - - uint32 msg_index = 1 [(gogoproto.jsontag) = "msg_index"]; - string log = 2; - - // Events contains a slice of Event objects that were emitted during some - // execution. - repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; -} - -// StringEvent defines en Event object wrapper where all the attributes -// contain key/value pairs that are strings instead of raw bytes. -message StringEvent { - option (gogoproto.stringer) = true; - - string type = 1; - repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; -} - -// Attribute defines an attribute wrapper where the key and value are -// strings instead of raw bytes. -message Attribute { - string key = 1; - string value = 2; -} - -// GasInfo defines tx execution gas context. -message GasInfo { - // GasWanted is the maximum units of work we allow this tx to perform. - uint64 gas_wanted = 1; - - // GasUsed is the amount of gas actually consumed. - uint64 gas_used = 2; -} - -// Result is the union of ResponseFormat and ResponseCheckTx. -message Result { - option (gogoproto.goproto_getters) = false; - - // Data is any data returned from message or handler execution. It MUST be - // length prefixed in order to separate data from multiple message executions. - // Deprecated. This field is still populated, but prefer msg_response instead - // because it also contains the Msg response typeURL. - bytes data = 1 [deprecated = true]; - - // Log contains the log information from message or handler execution. - string log = 2; - - // Events contains a slice of Event objects that were emitted during message - // or handler execution. - repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; - - // msg_responses contains the Msg handler responses type packed in Anys. - // - // Since: cosmos-sdk 0.46 - repeated google.protobuf.Any msg_responses = 4; -} - -// SimulationResponse defines the response generated when a transaction is -// successfully simulated. -message SimulationResponse { - GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - Result result = 2; -} - -// MsgData defines the data returned in a Result object during message -// execution. -message MsgData { - option deprecated = true; - option (gogoproto.stringer) = true; - - string msg_type = 1; - bytes data = 2; -} - -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -// for each message. -message TxMsgData { - option (gogoproto.stringer) = true; - - // data field is deprecated and not populated. - repeated MsgData data = 1 [deprecated = true]; - - // msg_responses contains the Msg handler responses packed into Anys. - // - // Since: cosmos-sdk 0.46 - repeated google.protobuf.Any msg_responses = 2; -} - -// SearchTxsResult defines a structure for querying txs pageable -message SearchTxsResult { - option (gogoproto.stringer) = true; - - // Count of all txs - uint64 total_count = 1; - // Count of txs in current page - uint64 count = 2; - // Index of current page, start from 1 - uint64 page_number = 3; - // Count of total pages - uint64 page_total = 4; - // Max count txs per page - uint64 limit = 5; - // List of txs in current page - repeated TxResponse txs = 6; -} diff --git a/examples/interchainjs/proto/cosmos/base/kv/v1beta1/kv.proto b/examples/interchainjs/proto/cosmos/base/kv/v1beta1/kv.proto deleted file mode 100644 index 4e9b8d28..00000000 --- a/examples/interchainjs/proto/cosmos/base/kv/v1beta1/kv.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.base.kv.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/kv"; - -// Pairs defines a repeated slice of Pair objects. -message Pairs { - repeated Pair pairs = 1 [(gogoproto.nullable) = false]; -} - -// Pair defines a key/value bytes tuple. -message Pair { - bytes key = 1; - bytes value = 2; -} diff --git a/examples/interchainjs/proto/cosmos/base/query/v1beta1/pagination.proto b/examples/interchainjs/proto/cosmos/base/query/v1beta1/pagination.proto deleted file mode 100644 index 0a368144..00000000 --- a/examples/interchainjs/proto/cosmos/base/query/v1beta1/pagination.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; -package cosmos.base.query.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -// PageRequest is to be embedded in gRPC request messages for efficient -// pagination. Ex: -// -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } -message PageRequest { - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - bytes key = 1; - - // offset is a numeric offset that can be used when key is unavailable. - // It is less efficient than using key. Only one of offset or key should - // be set. - uint64 offset = 2; - - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - uint64 limit = 3; - - // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. - // count_total is only respected when offset is used. It is ignored when key - // is set. - bool count_total = 4; - - // reverse is set to true if results are to be returned in the descending order. - // - // Since: cosmos-sdk 0.43 - bool reverse = 5; -} - -// PageResponse is to be embedded in gRPC response messages where the -// corresponding request message has used PageRequest. -// -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } -message PageResponse { - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently. It will be empty if - // there are no more results. - bytes next_key = 1; - - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - uint64 total = 2; -} diff --git a/examples/interchainjs/proto/cosmos/base/reflection/v1beta1/reflection.proto b/examples/interchainjs/proto/cosmos/base/reflection/v1beta1/reflection.proto deleted file mode 100644 index 22670e72..00000000 --- a/examples/interchainjs/proto/cosmos/base/reflection/v1beta1/reflection.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; -package cosmos.base.reflection.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; - -// ReflectionService defines a service for interface reflection. -service ReflectionService { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; - }; - - // ListImplementations list all the concrete types that implement a given - // interface. - rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" - "{interface_name}/implementations"; - }; -} - -// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -message ListAllInterfacesRequest {} - -// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -message ListAllInterfacesResponse { - // interface_names is an array of all the registered interfaces. - repeated string interface_names = 1; -} - -// ListImplementationsRequest is the request type of the ListImplementations -// RPC. -message ListImplementationsRequest { - // interface_name defines the interface to query the implementations for. - string interface_name = 1; -} - -// ListImplementationsResponse is the response type of the ListImplementations -// RPC. -message ListImplementationsResponse { - repeated string implementation_message_names = 1; -} diff --git a/examples/interchainjs/proto/cosmos/base/reflection/v2alpha1/reflection.proto b/examples/interchainjs/proto/cosmos/base/reflection/v2alpha1/reflection.proto deleted file mode 100644 index d5b04855..00000000 --- a/examples/interchainjs/proto/cosmos/base/reflection/v2alpha1/reflection.proto +++ /dev/null @@ -1,218 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.base.reflection.v2alpha1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; - -// AppDescriptor describes a cosmos-sdk based application -message AppDescriptor { - // AuthnDescriptor provides information on how to authenticate transactions on the application - // NOTE: experimental and subject to change in future releases. - AuthnDescriptor authn = 1; - // chain provides the chain descriptor - ChainDescriptor chain = 2; - // codec provides metadata information regarding codec related types - CodecDescriptor codec = 3; - // configuration provides metadata information regarding the sdk.Config type - ConfigurationDescriptor configuration = 4; - // query_services provides metadata information regarding the available queriable endpoints - QueryServicesDescriptor query_services = 5; - // tx provides metadata information regarding how to send transactions to the given application - TxDescriptor tx = 6; -} - -// TxDescriptor describes the accepted transaction type -message TxDescriptor { - // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - // it is not meant to support polymorphism of transaction types, it is supposed to be used by - // reflection clients to understand if they can handle a specific transaction type in an application. - string fullname = 1; - // msgs lists the accepted application messages (sdk.Msg) - repeated MsgDescriptor msgs = 2; -} - -// AuthnDescriptor provides information on how to sign transactions without relying -// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -message AuthnDescriptor { - // sign_modes defines the supported signature algorithm - repeated SigningModeDescriptor sign_modes = 1; -} - -// SigningModeDescriptor provides information on a signing flow of the application -// NOTE(fdymylja): here we could go as far as providing an entire flow on how -// to sign a message given a SigningModeDescriptor, but it's better to think about -// this another time -message SigningModeDescriptor { - // name defines the unique name of the signing mode - string name = 1; - // number is the unique int32 identifier for the sign_mode enum - int32 number = 2; - // authn_info_provider_method_fullname defines the fullname of the method to call to get - // the metadata required to authenticate using the provided sign_modes - string authn_info_provider_method_fullname = 3; -} - -// ChainDescriptor describes chain information of the application -message ChainDescriptor { - // id is the chain id - string id = 1; -} - -// CodecDescriptor describes the registered interfaces and provides metadata information on the types -message CodecDescriptor { - // interfaces is a list of the registerted interfaces descriptors - repeated InterfaceDescriptor interfaces = 1; -} - -// InterfaceDescriptor describes the implementation of an interface -message InterfaceDescriptor { - // fullname is the name of the interface - string fullname = 1; - // interface_accepting_messages contains information regarding the proto messages which contain the interface as - // google.protobuf.Any field - repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; - // interface_implementers is a list of the descriptors of the interface implementers - repeated InterfaceImplementerDescriptor interface_implementers = 3; -} - -// InterfaceImplementerDescriptor describes an interface implementer -message InterfaceImplementerDescriptor { - // fullname is the protobuf queryable name of the interface implementer - string fullname = 1; - // type_url defines the type URL used when marshalling the type as any - // this is required so we can provide type safe google.protobuf.Any marshalling and - // unmarshalling, making sure that we don't accept just 'any' type - // in our interface fields - string type_url = 2; -} - -// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -// an interface represented as a google.protobuf.Any -message InterfaceAcceptingMessageDescriptor { - // fullname is the protobuf fullname of the type containing the interface - string fullname = 1; - // field_descriptor_names is a list of the protobuf name (not fullname) of the field - // which contains the interface as google.protobuf.Any (the interface is the same, but - // it can be in multiple fields of the same proto message) - repeated string field_descriptor_names = 2; -} - -// ConfigurationDescriptor contains metadata information on the sdk.Config -message ConfigurationDescriptor { - // bech32_account_address_prefix is the account address prefix - string bech32_account_address_prefix = 1; -} - -// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -message MsgDescriptor { - // msg_type_url contains the TypeURL of a sdk.Msg. - string msg_type_url = 1; -} - -// ReflectionService defines a service for application reflection. -service ReflectionService { - // GetAuthnDescriptor returns information on how to authenticate transactions in the application - // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - // future releases of the cosmos-sdk. - rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; - } - // GetChainDescriptor returns the description of the chain - rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; - }; - // GetCodecDescriptor returns the descriptor of the codec of the application - rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; - } - // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; - } - // GetQueryServicesDescriptor returns the available gRPC queryable services of the application - rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; - } - // GetTxDescriptor returns information on the used transaction object and available msgs that can be used - rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; - } -} - -// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -message GetAuthnDescriptorRequest {} -// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -message GetAuthnDescriptorResponse { - // authn describes how to authenticate to the application when sending transactions - AuthnDescriptor authn = 1; -} - -// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -message GetChainDescriptorRequest {} -// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -message GetChainDescriptorResponse { - // chain describes application chain information - ChainDescriptor chain = 1; -} - -// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -message GetCodecDescriptorRequest {} -// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -message GetCodecDescriptorResponse { - // codec describes the application codec such as registered interfaces and implementations - CodecDescriptor codec = 1; -} - -// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorRequest {} -// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorResponse { - // config describes the application's sdk.Config - ConfigurationDescriptor config = 1; -} - -// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorRequest {} -// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorResponse { - // queries provides information on the available queryable services - QueryServicesDescriptor queries = 1; -} - -// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -message GetTxDescriptorRequest {} -// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -message GetTxDescriptorResponse { - // tx provides information on msgs that can be forwarded to the application - // alongside the accepted transaction protobuf type - TxDescriptor tx = 1; -} - -// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -message QueryServicesDescriptor { - // query_services is a list of cosmos-sdk QueryServiceDescriptor - repeated QueryServiceDescriptor query_services = 1; -} - -// QueryServiceDescriptor describes a cosmos-sdk queryable service -message QueryServiceDescriptor { - // fullname is the protobuf fullname of the service descriptor - string fullname = 1; - // is_module describes if this service is actually exposed by an application's module - bool is_module = 2; - // methods provides a list of query service methods - repeated QueryMethodDescriptor methods = 3; -} - -// QueryMethodDescriptor describes a queryable method of a query service -// no other info is provided beside method name and tendermint queryable path -// because it would be redundant with the grpc reflection service -message QueryMethodDescriptor { - // name is the protobuf name (not fullname) of the method - string name = 1; - // full_query_path is the path that can be used to query - // this method via tendermint abci.Query - string full_query_path = 2; -} diff --git a/examples/interchainjs/proto/cosmos/base/snapshots/v1beta1/snapshot.proto b/examples/interchainjs/proto/cosmos/base/snapshots/v1beta1/snapshot.proto deleted file mode 100644 index a89e0b4c..00000000 --- a/examples/interchainjs/proto/cosmos/base/snapshots/v1beta1/snapshot.proto +++ /dev/null @@ -1,70 +0,0 @@ -syntax = "proto3"; -package cosmos.base.snapshots.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types"; - -// Snapshot contains Tendermint state sync snapshot info. -message Snapshot { - uint64 height = 1; - uint32 format = 2; - uint32 chunks = 3; - bytes hash = 4; - Metadata metadata = 5 [(gogoproto.nullable) = false]; -} - -// Metadata contains SDK-specific snapshot metadata. -message Metadata { - repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -message SnapshotItem { - // item is the specific type of snapshot item. - oneof item { - SnapshotStoreItem store = 1; - SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; - SnapshotExtensionMeta extension = 3; - SnapshotExtensionPayload extension_payload = 4; - SnapshotKVItem kv = 5 [(gogoproto.customname) = "KV"]; - SnapshotSchema schema = 6; - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -message SnapshotStoreItem { - string name = 1; -} - -// SnapshotIAVLItem is an exported IAVL node. -message SnapshotIAVLItem { - bytes key = 1; - bytes value = 2; - // version is block height - int64 version = 3; - // height is depth of the tree. - int32 height = 4; -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -message SnapshotExtensionMeta { - string name = 1; - uint32 format = 2; -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -message SnapshotExtensionPayload { - bytes payload = 1; -} - -// SnapshotKVItem is an exported Key/Value Pair -message SnapshotKVItem { - bytes key = 1; - bytes value = 2; -} - -// SnapshotSchema is an exported schema of smt store -message SnapshotSchema{ - repeated bytes keys = 1; -} diff --git a/examples/interchainjs/proto/cosmos/base/store/v1beta1/commit_info.proto b/examples/interchainjs/proto/cosmos/base/store/v1beta1/commit_info.proto deleted file mode 100644 index 98a33d30..00000000 --- a/examples/interchainjs/proto/cosmos/base/store/v1beta1/commit_info.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package cosmos.base.store.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/store/types"; - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -message CommitInfo { - int64 version = 1; - repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -message StoreInfo { - string name = 1; - CommitID commit_id = 2 [(gogoproto.nullable) = false]; -} - -// CommitID defines the committment information when a specific store is -// committed. -message CommitID { - option (gogoproto.goproto_stringer) = false; - - int64 version = 1; - bytes hash = 2; -} diff --git a/examples/interchainjs/proto/cosmos/base/store/v1beta1/listening.proto b/examples/interchainjs/proto/cosmos/base/store/v1beta1/listening.proto deleted file mode 100644 index 35999710..00000000 --- a/examples/interchainjs/proto/cosmos/base/store/v1beta1/listening.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.base.store.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/store/types"; - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) -// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and -// Deletes -// -// Since: cosmos-sdk 0.43 -message StoreKVPair { - string store_key = 1; // the store key for the KVStore this pair originates from - bool delete = 2; // true indicates a delete operation, false indicates a set operation - bytes key = 3; - bytes value = 4; -} diff --git a/examples/interchainjs/proto/cosmos/base/tendermint/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/base/tendermint/v1beta1/query.proto deleted file mode 100644 index 96a46e53..00000000 --- a/examples/interchainjs/proto/cosmos/base/tendermint/v1beta1/query.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; -package cosmos.base.tendermint.v1beta1; - -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "tendermint/p2p/types.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; - -// Service defines the gRPC querier service for tendermint queries. -service Service { - // GetNodeInfo queries the current node info. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; - } - // GetSyncing queries node syncing. - rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; - } - // GetLatestBlock returns the latest block. - rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; - } - // GetBlockByHeight queries block for given height. - rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; - } - - // GetLatestValidatorSet queries latest validator-set. - rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; - } - // GetValidatorSetByHeight queries validator-set at a given height. - rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; - } -} - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightRequest { - int64 height = 1; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetRequest { - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// Validator is the type for the validator-set. -message Validator { - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pub_key = 2; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightRequest { - int64 height = 1; -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightResponse { - .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -message GetLatestBlockRequest {} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -message GetLatestBlockResponse { - .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -message GetSyncingRequest {} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -message GetSyncingResponse { - bool syncing = 1; -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoRequest {} - -// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. -message GetNodeInfoResponse { - .tendermint.p2p.NodeInfo node_info = 1; - VersionInfo application_version = 2; -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -message VersionInfo { - string name = 1; - string app_name = 2; - string version = 3; - string git_commit = 4; - string build_tags = 5; - string go_version = 6; - repeated Module build_deps = 7; - // Since: cosmos-sdk 0.43 - string cosmos_sdk_version = 8; -} - -// Module is the type for VersionInfo -message Module { - // module path - string path = 1; - // module version - string version = 2; - // checksum - string sum = 3; -} diff --git a/examples/interchainjs/proto/cosmos/base/v1beta1/coin.proto b/examples/interchainjs/proto/cosmos/base/v1beta1/coin.proto deleted file mode 100644 index 69e67e09..00000000 --- a/examples/interchainjs/proto/cosmos/base/v1beta1/coin.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package cosmos.base.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; - -// Coin defines a token with a denomination and an amount. -// -// NOTE: The amount field is an Int which implements the custom method -// signatures required by gogoproto. -message Coin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 - [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecCoin defines a token with a denomination and a decimal amount. -// -// NOTE: The amount field is an Dec which implements the custom method -// signatures required by gogoproto. -message DecCoin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 - [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} - -// IntProto defines a Protobuf wrapper around an Int object. -message IntProto { - string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecProto defines a Protobuf wrapper around a Dec object. -message DecProto { - string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/capability/v1beta1/capability.proto b/examples/interchainjs/proto/cosmos/capability/v1beta1/capability.proto deleted file mode 100644 index c433566d..00000000 --- a/examples/interchainjs/proto/cosmos/capability/v1beta1/capability.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmos.capability.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; - -import "gogoproto/gogo.proto"; - -// Capability defines an implementation of an object capability. The index -// provided to a Capability must be globally unique. -message Capability { - option (gogoproto.goproto_stringer) = false; - - uint64 index = 1; -} - -// Owner defines a single capability owner. An owner is defined by the name of -// capability and the module name. -message Owner { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - string module = 1; - string name = 2; -} - -// CapabilityOwners defines a set of owners of a single Capability. The set of -// owners must be unique. -message CapabilityOwners { - repeated Owner owners = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/capability/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/capability/v1beta1/genesis.proto deleted file mode 100644 index b5482439..00000000 --- a/examples/interchainjs/proto/cosmos/capability/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package cosmos.capability.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/capability/v1beta1/capability.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; - -// GenesisOwners defines the capability owners with their corresponding index. -message GenesisOwners { - // index is the index of the capability owner. - uint64 index = 1; - - // index_owners are the owners at the given index. - CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false]; -} - -// GenesisState defines the capability module's genesis state. -message GenesisState { - // index is the capability global index. - uint64 index = 1; - - // owners represents a map from index to owners of the capability index - // index key is string to allow amino marshalling. - repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/crisis/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/crisis/v1beta1/genesis.proto deleted file mode 100644 index 5c291604..00000000 --- a/examples/interchainjs/proto/cosmos/crisis/v1beta1/genesis.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// GenesisState defines the crisis module's genesis state. -message GenesisState { - // constant_fee is the fee used to verify the invariant in the crisis - // module. - cosmos.base.v1beta1.Coin constant_fee = 3 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/crisis/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/crisis/v1beta1/tx.proto deleted file mode 100644 index fea9059f..00000000 --- a/examples/interchainjs/proto/cosmos/crisis/v1beta1/tx.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -// Msg defines the bank Msg service. -service Msg { - // VerifyInvariant defines a method to verify a particular invariance. - rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); -} - -// MsgVerifyInvariant represents a message to verify a particular invariance. -message MsgVerifyInvariant { - option (cosmos.msg.v1.signer) = "sender"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string invariant_module_name = 2; - string invariant_route = 3; -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -message MsgVerifyInvariantResponse {} diff --git a/examples/interchainjs/proto/cosmos/crypto/ed25519/keys.proto b/examples/interchainjs/proto/cosmos/crypto/ed25519/keys.proto deleted file mode 100644 index 6ffec344..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/ed25519/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.ed25519; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; - -// PubKey is an ed25519 public key for handling Tendermint keys in SDK. -// It's needed for Any serialization and SDK compatibility. -// It must not be used in a non Tendermint key context because it doesn't implement -// ADR-28. Nevertheless, you will like to use ed25519 in app user level -// then you must create a new proto message and follow ADR-28 for Address construction. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; -} - -// Deprecated: PrivKey defines a ed25519 private key. -// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -message PrivKey { - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; -} diff --git a/examples/interchainjs/proto/cosmos/crypto/hd/v1/hd.proto b/examples/interchainjs/proto/cosmos/crypto/hd/v1/hd.proto deleted file mode 100644 index e4a95afc..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/hd/v1/hd.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.hd.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/hd"; -option (gogoproto.goproto_getters_all) = false; - -// BIP44Params is used as path field in ledger item in Record. -message BIP44Params { - option (gogoproto.goproto_stringer) = false; - // purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation - uint32 purpose = 1; - // coin_type is a constant that improves privacy - uint32 coin_type = 2; - // account splits the key space into independent user identities - uint32 account = 3; - // change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - // chain. - bool change = 4; - // address_index is used as child index in BIP32 derivation - uint32 address_index = 5; -} diff --git a/examples/interchainjs/proto/cosmos/crypto/keyring/v1/record.proto b/examples/interchainjs/proto/cosmos/crypto/keyring/v1/record.proto deleted file mode 100644 index 9b2d3c96..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/keyring/v1/record.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.keyring.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/crypto/hd/v1/hd.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keyring"; -option (gogoproto.goproto_getters_all) = false; - -// Record is used for representing a key in the keyring. -message Record { - // name represents a name of Record - string name = 1; - // pub_key represents a public key in any format - google.protobuf.Any pub_key = 2; - - // Record contains one of the following items - oneof item { - // local stores the public information about a locally stored key - Local local = 3; - // ledger stores the public information about a Ledger key - Ledger ledger = 4; - // Multi does not store any information. - Multi multi = 5; - // Offline does not store any information. - Offline offline = 6; - } - - // Item is a keyring item stored in a keyring backend. - // Local item - message Local { - google.protobuf.Any priv_key = 1; - string priv_key_type = 2; - } - - // Ledger item - message Ledger { - hd.v1.BIP44Params path = 1; - } - - // Multi item - message Multi {} - - // Offline item - message Offline {} -} diff --git a/examples/interchainjs/proto/cosmos/crypto/multisig/keys.proto b/examples/interchainjs/proto/cosmos/crypto/multisig/keys.proto deleted file mode 100644 index 7a11fe33..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/multisig/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; - -// LegacyAminoPubKey specifies a public key type -// which nests multiple public keys and a threshold, -// it uses legacy amino address rules. -message LegacyAminoPubKey { - option (gogoproto.goproto_getters) = false; - - uint32 threshold = 1; - repeated google.protobuf.Any public_keys = 2 [(gogoproto.customname) = "PubKeys"]; -} diff --git a/examples/interchainjs/proto/cosmos/crypto/multisig/v1beta1/multisig.proto b/examples/interchainjs/proto/cosmos/crypto/multisig/v1beta1/multisig.proto deleted file mode 100644 index bf671f17..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/multisig/v1beta1/multisig.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; - -// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers -// signed and with which modes. -message MultiSignature { - option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; -} - -// CompactBitArray is an implementation of a space efficient bit array. -// This is used to ensure that the encoded data takes up a minimal amount of -// space after proto encoding. -// This is not thread safe, and is not intended for concurrent usage. -message CompactBitArray { - option (gogoproto.goproto_stringer) = false; - - uint32 extra_bits_stored = 1; - bytes elems = 2; -} diff --git a/examples/interchainjs/proto/cosmos/crypto/secp256k1/keys.proto b/examples/interchainjs/proto/cosmos/crypto/secp256k1/keys.proto deleted file mode 100644 index a2272571..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/secp256k1/keys.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.secp256k1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; - -// PubKey defines a secp256k1 public key -// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -// if the y-coordinate is the lexicographically largest of the two associated with -// the x-coordinate. Otherwise the first byte is a 0x03. -// This prefix is followed with the x-coordinate. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1; -} - -// PrivKey defines a secp256k1 private key. -message PrivKey { - bytes key = 1; -} diff --git a/examples/interchainjs/proto/cosmos/crypto/secp256r1/keys.proto b/examples/interchainjs/proto/cosmos/crypto/secp256r1/keys.proto deleted file mode 100644 index 2e96c6e3..00000000 --- a/examples/interchainjs/proto/cosmos/crypto/secp256r1/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.crypto.secp256r1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; -option (gogoproto.messagename_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// PubKey defines a secp256r1 ECDSA public key. -message PubKey { - // Point on secp256r1 curve in a compressed representation as specified in section - // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; -} - -// PrivKey defines a secp256r1 ECDSA private key. -message PrivKey { - // secret number serialized using big-endian encoding - bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; -} diff --git a/examples/interchainjs/proto/cosmos/distribution/v1beta1/distribution.proto b/examples/interchainjs/proto/cosmos/distribution/v1beta1/distribution.proto deleted file mode 100644 index 1afe25ae..00000000 --- a/examples/interchainjs/proto/cosmos/distribution/v1beta1/distribution.proto +++ /dev/null @@ -1,154 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; - -// Params defines the set of params for the distribution module. -message Params { - option (gogoproto.goproto_stringer) = false; - string community_tax = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string base_proposer_reward = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string bonus_proposer_reward = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bool withdraw_addr_enabled = 4; -} - -// ValidatorHistoricalRewards represents historical rewards for a validator. -// Height is implicit within the store key. -// Cumulative reward ratio is the sum from the zeroeth period -// until this period of rewards / tokens, per the spec. -// The reference count indicates the number of objects -// which might need to reference this historical entry at any point. -// ReferenceCount = -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization -message ValidatorHistoricalRewards { - repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; - uint32 reference_count = 2; -} - -// ValidatorCurrentRewards represents current rewards and current -// period for a validator kept as a running counter and incremented -// each block as long as the validator's tokens remain constant. -message ValidatorCurrentRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; - uint64 period = 2; -} - -// ValidatorAccumulatedCommission represents accumulated commission -// for a validator kept as a running counter, can be withdrawn at any time. -message ValidatorAccumulatedCommission { - repeated cosmos.base.v1beta1.DecCoin commission = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -// for a validator inexpensive to track, allows simple sanity checks. -message ValidatorOutstandingRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// ValidatorSlashEvent represents a validator slash event. -// Height is implicit within the store key. -// This is needed to calculate appropriate amount of staking tokens -// for delegations which are withdrawn after a slash has occurred. -message ValidatorSlashEvent { - uint64 validator_period = 1; - string fraction = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -message ValidatorSlashEvents { - option (gogoproto.goproto_stringer) = false; - repeated ValidatorSlashEvent validator_slash_events = 1 [(gogoproto.nullable) = false]; -} - -// FeePool is the global fee pool for distribution. -message FeePool { - repeated cosmos.base.v1beta1.DecCoin community_pool = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// CommunityPoolSpendProposal details a proposal for use of community funds, -// together with how many coins are proposed to be spent, and to which -// recipient account. -message CommunityPoolSpendProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string recipient = 3; - repeated cosmos.base.v1beta1.Coin amount = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// DelegatorStartingInfo represents the starting info for a delegator reward -// period. It tracks the previous validator period, the delegation's amount of -// staking token, and the creation height (to check later on if any slashes have -// occurred). NOTE: Even though validators are slashed to whole staking tokens, -// the delegators within the validator may be left with less than a full token, -// thus sdk.Dec is used. -message DelegatorStartingInfo { - uint64 previous_period = 1; - string stake = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 height = 3 [(gogoproto.jsontag) = "creation_height"]; -} - -// DelegationDelegatorReward represents the properties -// of a delegator's delegation reward. -message DelegationDelegatorReward { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - repeated cosmos.base.v1beta1.DecCoin reward = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -// with a deposit -message CommunityPoolSpendProposalWithDeposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string recipient = 3; - string amount = 4; - string deposit = 5; -} diff --git a/examples/interchainjs/proto/cosmos/distribution/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/distribution/v1beta1/genesis.proto deleted file mode 100644 index 4662e8df..00000000 --- a/examples/interchainjs/proto/cosmos/distribution/v1beta1/genesis.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; -import "cosmos_proto/cosmos.proto"; - -// DelegatorWithdrawInfo is the address for where distributions rewards are -// withdrawn to by default this struct is only used at genesis to feed in -// default withdraw addresses. -message DelegatorWithdrawInfo { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // withdraw_address is the address to withdraw the delegation rewards to. - string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -message ValidatorOutstandingRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // outstanding_rewards represents the oustanding rewards of a validator. - repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -// json. -message ValidatorAccumulatedCommissionRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // accumulated is the accumulated commission of a validator. - ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false]; -} - -// ValidatorHistoricalRewardsRecord is used for import / export via genesis -// json. -message ValidatorHistoricalRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // period defines the period the historical rewards apply to. - uint64 period = 2; - - // rewards defines the historical rewards of a validator. - ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false]; -} - -// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -message ValidatorCurrentRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // rewards defines the current rewards of a validator. - ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false]; -} - -// DelegatorStartingInfoRecord used for import / export via genesis json. -message DelegatorStartingInfoRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_address is the address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // starting_info defines the starting info of a delegator. - DelegatorStartingInfo starting_info = 3 [(gogoproto.nullable) = false]; -} - -// ValidatorSlashEventRecord is used for import / export via genesis json. -message ValidatorSlashEventRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // height defines the block height at which the slash event occured. - uint64 height = 2; - // period is the period of the slash event. - uint64 period = 3; - // validator_slash_event describes the slash event. - ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false]; -} - -// GenesisState defines the distribution module's genesis state. -message GenesisState { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // fee_pool defines the fee pool at genesis. - FeePool fee_pool = 2 [(gogoproto.nullable) = false]; - - // fee_pool defines the delegator withdraw infos at genesis. - repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 [(gogoproto.nullable) = false]; - - // fee_pool defines the previous proposer at genesis. - string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // fee_pool defines the outstanding rewards of all validators at genesis. - repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 [(gogoproto.nullable) = false]; - - // fee_pool defines the accumulated commisions of all validators at genesis. - repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 [(gogoproto.nullable) = false]; - - // fee_pool defines the historical rewards of all validators at genesis. - repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 [(gogoproto.nullable) = false]; - - // fee_pool defines the current rewards of all validators at genesis. - repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 [(gogoproto.nullable) = false]; - - // fee_pool defines the delegator starting infos at genesis. - repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 [(gogoproto.nullable) = false]; - - // fee_pool defines the validator slash events at genesis. - repeated ValidatorSlashEventRecord validator_slash_events = 10 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/distribution/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/distribution/v1beta1/query.proto deleted file mode 100644 index a09413fc..00000000 --- a/examples/interchainjs/proto/cosmos/distribution/v1beta1/query.proto +++ /dev/null @@ -1,219 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; - -// Query defines the gRPC querier service for distribution module. -service Query { - // Params queries params of the distribution module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; - } - - // ValidatorOutstandingRewards queries rewards of a validator address. - rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) - returns (QueryValidatorOutstandingRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/outstanding_rewards"; - } - - // ValidatorCommission queries accumulated commission for a validator. - rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/commission"; - } - - // ValidatorSlashes queries slash events of a validator. - rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; - } - - // DelegationRewards queries the total rewards accrued by a delegation. - rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" - "{validator_address}"; - } - - // DelegationTotalRewards queries the total rewards accrued by a each - // validator. - rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; - } - - // DelegatorValidators queries the validators of a delegator. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/validators"; - } - - // DelegatorWithdrawAddress queries withdraw address of a delegator. - rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/withdraw_address"; - } - - // CommunityPool queries the community pool coins. - rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorOutstandingRewardsRequest is the request type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsRequest { - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsResponse { - ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorCommissionRequest is the request type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionRequest { - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionResponse { - // commission defines the commision the validator received. - ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorSlashesRequest is the request type for the -// Query/ValidatorSlashes RPC method -message QueryValidatorSlashesRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // starting_height defines the optional starting height to query the slashes. - uint64 starting_height = 2; - // starting_height defines the optional ending height to query the slashes. - uint64 ending_height = 3; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -message QueryValidatorSlashesResponse { - // slashes defines the slashes the validator received. - repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRewardsRequest is the request type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address defines the validator address to query for. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsResponse { - // rewards defines the rewards accrued by a delegation. - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// QueryDelegationTotalRewardsRequest is the request type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsResponse { - // rewards defines all the rewards accrued by a delegator. - repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; - // total defines the sum of all the rewards. - repeated cosmos.base.v1beta1.DecCoin total = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// QueryDelegatorValidatorsRequest is the request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validators defines the validators a delegator is delegating for. - repeated string validators = 1; -} - -// QueryDelegatorWithdrawAddressRequest is the request type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // withdraw_address defines the delegator address to query for. - string withdraw_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -// method. -message QueryCommunityPoolRequest {} - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -message QueryCommunityPoolResponse { - // pool defines community pool's coins. - repeated cosmos.base.v1beta1.DecCoin pool = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/distribution/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/distribution/v1beta1/tx.proto deleted file mode 100644 index 7f22dce9..00000000 --- a/examples/interchainjs/proto/cosmos/distribution/v1beta1/tx.proto +++ /dev/null @@ -1,95 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -// Msg defines the distribution Msg service. -service Msg { - // SetWithdrawAddress defines a method to change the withdraw address - // for a delegator (or validator self-delegation). - rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); - - // WithdrawDelegatorReward defines a method to withdraw rewards of delegator - // from a single validator. - rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); - - // WithdrawValidatorCommission defines a method to withdraw the - // full commission to the validator address. - rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); - - // FundCommunityPool defines a method to allow an account to directly - // fund the community pool. - rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); -} - -// MsgSetWithdrawAddress sets the withdraw address for -// a delegator (or validator self-delegation). -message MsgSetWithdrawAddress { - option (cosmos.msg.v1.signer) = "delegator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. -message MsgSetWithdrawAddressResponse {} - -// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -// from a single validator. -message MsgWithdrawDelegatorReward { - option (cosmos.msg.v1.signer) = "delegator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -message MsgWithdrawDelegatorRewardResponse { - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgWithdrawValidatorCommission withdraws the full commission to the validator -// address. -message MsgWithdrawValidatorCommission { - option (cosmos.msg.v1.signer) = "validator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -message MsgWithdrawValidatorCommissionResponse { - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgFundCommunityPool allows an account to directly -// fund the community pool. -message MsgFundCommunityPool { - option (cosmos.msg.v1.signer) = "depositor"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -message MsgFundCommunityPoolResponse {} diff --git a/examples/interchainjs/proto/cosmos/evidence/v1beta1/evidence.proto b/examples/interchainjs/proto/cosmos/evidence/v1beta1/evidence.proto deleted file mode 100644 index 83f9ec3d..00000000 --- a/examples/interchainjs/proto/cosmos/evidence/v1beta1/evidence.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; - -// Equivocation implements the Evidence interface and defines evidence of double -// signing misbehavior. -message Equivocation { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - int64 height = 1; - google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - int64 power = 3; - string consensus_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/evidence/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/evidence/v1beta1/genesis.proto deleted file mode 100644 index 199f446f..00000000 --- a/examples/interchainjs/proto/cosmos/evidence/v1beta1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; - -import "google/protobuf/any.proto"; - -// GenesisState defines the evidence module's genesis state. -message GenesisState { - // evidence defines all the evidence at genesis. - repeated google.protobuf.Any evidence = 1; -} diff --git a/examples/interchainjs/proto/cosmos/evidence/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/evidence/v1beta1/query.proto deleted file mode 100644 index eda00544..00000000 --- a/examples/interchainjs/proto/cosmos/evidence/v1beta1/query.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; - -// Query defines the gRPC querier service. -service Query { - // Evidence queries evidence based on evidence hash. - rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}"; - } - - // AllEvidence queries all evidence. - rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence"; - } -} - -// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -message QueryEvidenceRequest { - // evidence_hash defines the hash of the requested evidence. - bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; -} - -// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -message QueryEvidenceResponse { - // evidence returns the requested evidence. - google.protobuf.Any evidence = 1; -} - -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceResponse { - // evidence returns all evidences. - repeated google.protobuf.Any evidence = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmos/evidence/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/evidence/v1beta1/tx.proto deleted file mode 100644 index 223f7e11..00000000 --- a/examples/interchainjs/proto/cosmos/evidence/v1beta1/tx.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -// Msg defines the evidence Msg service. -service Msg { - // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - // counterfactual signing. - rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse); -} - -// MsgSubmitEvidence represents a message that supports submitting arbitrary -// Evidence of misbehavior such as equivocation or counterfactual signing. -message MsgSubmitEvidence { - option (cosmos.msg.v1.signer) = "submitter"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; -} - -// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -message MsgSubmitEvidenceResponse { - // hash defines the hash of the evidence. - bytes hash = 4; -} diff --git a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/feegrant.proto b/examples/interchainjs/proto/cosmos/feegrant/v1beta1/feegrant.proto deleted file mode 100644 index eca71e2b..00000000 --- a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// BasicAllowance implements Allowance with a one-time grant of tokens -// that optionally expires. The grantee can use up to SpendLimit to cover fees. -message BasicAllowance { - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // spend_limit specifies the maximum amount of tokens that can be spent - // by this allowance and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // expiration specifies an optional time when this allowance expires - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; -} - -// PeriodicAllowance extends Allowance to allow for both a maximum cap, -// as well as a limit per time period. -message PeriodicAllowance { - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // basic specifies a struct of `BasicAllowance` - BasicAllowance basic = 1 [(gogoproto.nullable) = false]; - - // period specifies the time duration in which period_spend_limit coins can - // be spent before that allowance is reset - google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; - - // period_spend_limit specifies the maximum number of coins that can be spent - // in the period - repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // period_can_spend is the number of coins left to be spent before the period_reset time - repeated cosmos.base.v1beta1.Coin period_can_spend = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // period_reset is the time at which this period resets and a new one begins, - // it is calculated from the start time of the first transaction after the - // last period ended - google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -// AllowedMsgAllowance creates allowance only for specified message types. -message AllowedMsgAllowance { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // allowance can be any of basic and periodic fee allowance. - google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; - - // allowed_messages are the messages for which the grantee has the access. - repeated string allowed_messages = 2; -} - -// Grant is stored in the KVStore to record a grant with full context -message Grant { - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // allowance can be any of basic, periodic, allowed fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; -} diff --git a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/feegrant/v1beta1/genesis.proto deleted file mode 100644 index 5b1ac4ca..00000000 --- a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/feegrant/v1beta1/feegrant.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// GenesisState contains a set of fee allowances, persisted from the store -message GenesisState { - repeated Grant allowances = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/feegrant/v1beta1/query.proto deleted file mode 100644 index 59c992c9..00000000 --- a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/query.proto +++ /dev/null @@ -1,79 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "cosmos/feegrant/v1beta1/feegrant.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// Query defines the gRPC querier service. -service Query { - - // Allowance returns fee granted to the grantee by the granter. - rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; - } - - // Allowances returns all the grants for address. - rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; - } - - // AllowancesByGranter returns all the grants given by an address - // Since v0.46 - rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; - } -} - -// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -message QueryAllowanceRequest { - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -message QueryAllowanceResponse { - // allowance is a allowance granted for grantee by granter. - cosmos.feegrant.v1beta1.Grant allowance = 1; -} - -// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -message QueryAllowancesRequest { - string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -message QueryAllowancesResponse { - // allowances are allowance's granted for grantee by granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -message QueryAllowancesByGranterRequest { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -message QueryAllowancesByGranterResponse { - // allowances that have been issued by the granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/feegrant/v1beta1/tx.proto deleted file mode 100644 index a12d9aaa..00000000 --- a/examples/interchainjs/proto/cosmos/feegrant/v1beta1/tx.proto +++ /dev/null @@ -1,53 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// Msg defines the feegrant msg service. -service Msg { - - // GrantAllowance grants fee allowance to the grantee on the granter's - // account with the provided expiration time. - rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); - - // RevokeAllowance revokes any fee allowance of granter's account that - // has been granted to the grantee. - rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); -} - -// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -// of fees from the account of Granter. -message MsgGrantAllowance { - option (cosmos.msg.v1.signer) = "granter"; - - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // allowance can be any of basic, periodic, allowed fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; -} - -// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -message MsgGrantAllowanceResponse {} - -// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -message MsgRevokeAllowance { - option (cosmos.msg.v1.signer) = "granter"; - - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -message MsgRevokeAllowanceResponse {} diff --git a/examples/interchainjs/proto/cosmos/genutil/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/genutil/v1beta1/genesis.proto deleted file mode 100644 index 958d15fe..00000000 --- a/examples/interchainjs/proto/cosmos/genutil/v1beta1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cosmos.genutil.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; - -// GenesisState defines the raw genesis transaction in JSON. -message GenesisState { - // gen_txs defines the genesis transactions. - repeated bytes gen_txs = 1 [(gogoproto.casttype) = "encoding/json.RawMessage", (gogoproto.jsontag) = "gentxs"]; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1/genesis.proto b/examples/interchainjs/proto/cosmos/gov/v1/genesis.proto deleted file mode 100644 index cb44a7f3..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.gov.v1; - -import "cosmos/gov/v1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// GenesisState defines the gov module's genesis state. -message GenesisState { - // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1; - // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2; - // votes defines all the votes present at genesis. - repeated Vote votes = 3; - // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4; - // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5; - // params defines all the paramaters of related to voting. - VotingParams voting_params = 6; - // params defines all the paramaters of related to tally. - TallyParams tally_params = 7; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1/gov.proto b/examples/interchainjs/proto/cosmos/gov/v1/gov.proto deleted file mode 100644 index fb014d65..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1/gov.proto +++ /dev/null @@ -1,132 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.gov.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// VoteOption enumerates the valid vote options for a given governance proposal. -enum VoteOption { - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4; -} - -// WeightedVoteOption defines a unit of vote for vote split. -message WeightedVoteOption { - VoteOption option = 1; - string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -message Deposit { - uint64 proposal_id = 1; - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// Proposal defines the core field members of a governance proposal. -message Proposal { - uint64 id = 1; - repeated google.protobuf.Any messages = 2; - ProposalStatus status = 3; - // final_tally_result is the final tally result of the proposal. When - // querying a proposal via gRPC, this field is not populated until the - // proposal's voting period has ended. - TallyResult final_tally_result = 4; - google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; - - // metadata is any arbitrary metadata attached to the proposal. - string metadata = 10; -} - -// ProposalStatus enumerates the valid statuses of a proposal. -enum ProposalStatus { - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - PROPOSAL_STATUS_UNSPECIFIED = 0; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - PROPOSAL_STATUS_PASSED = 3; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - PROPOSAL_STATUS_REJECTED = 4; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - PROPOSAL_STATUS_FAILED = 5; -} - -// TallyResult defines a standard tally for a governance proposal. -message TallyResult { - string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"]; - string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"]; - string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"]; - string no_with_veto_count = 4 [(cosmos_proto.scalar) = "cosmos.Int"]; -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -message Vote { - uint64 proposal_id = 1; - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - reserved 3; - repeated WeightedVoteOption options = 4; - - // metadata is any arbitrary metadata to attached to the vote. - string metadata = 5; -} - -// DepositParams defines the params for deposits on governance proposals. -message DepositParams { - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 - [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; -} - -// VotingParams defines the params for voting on governance proposals. -message VotingParams { - // Length of the voting period. - google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true]; -} - -// TallyParams defines the params for tallying votes on governance proposals. -message TallyParams { - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "quorum,omitempty"]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "threshold,omitempty"]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "veto_threshold,omitempty"]; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1/query.proto b/examples/interchainjs/proto/cosmos/gov/v1/query.proto deleted file mode 100644 index ea46472a..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1/query.proto +++ /dev/null @@ -1,183 +0,0 @@ - -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.gov.v1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "cosmos/gov/v1/gov.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// Query defines the gRPC querier service for gov module -service Query { - // Proposal queries proposal details based on ProposalID. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}"; - } - - // Proposals queries all proposals based on given status. - rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals"; - } - - // Vote queries voted information based on proposalID, voterAddr. - rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}"; - } - - // Votes queries votes of a given proposal. - rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/votes"; - } - - // Params queries all parameters of the gov module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}"; - } - - // Deposit queries single deposit information based proposalID, depositAddr. - rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}"; - } - - // Deposits queries all deposits of a single proposal. - rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits"; - } - - // TallyResult queries the tally of a proposal vote. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/tally"; - } -} - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -message QueryProposalRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - Proposal proposal = 1; -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -message QueryProposalsRequest { - // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1; - - // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // depositor defines the deposit addresses from the proposals. - string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - repeated Proposal proposals = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -message QueryVoteRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter defines the oter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defined the queried vote. - Vote vote = 1; -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -message QueryVotesRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defined the queried votes. - repeated Vote votes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1; - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2; - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3; -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -message QueryDepositRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - Deposit deposit = 1; -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -message QueryDepositsRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - repeated Deposit deposits = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -message QueryTallyResultRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1/tx.proto b/examples/interchainjs/proto/cosmos/gov/v1/tx.proto deleted file mode 100644 index 9306c51e..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1/tx.proto +++ /dev/null @@ -1,100 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.gov.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/gov/v1/gov.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// Msg defines the gov Msg service. -service Msg { - // SubmitProposal defines a method to create new proposal given a content. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - // to execute a legacy content-based proposal. - rpc ExecLegacyContent(MsgExecLegacyContent) returns (MsgExecLegacyContentResponse); - - // Vote defines a method to add a vote on a specific proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); - - // Deposit defines a method to add deposit on a specific proposal. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); -} - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -message MsgSubmitProposal { - option (cosmos.msg.v1.signer) = "proposer"; - - repeated google.protobuf.Any messages = 1; - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false]; - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // metadata is any arbitrary metadata attached to the proposal. - string metadata = 4; -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - uint64 proposal_id = 1; -} - -// MsgExecLegacyContent is used to wrap the legacy content field into a message. -// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. -message MsgExecLegacyContent { - option (cosmos.msg.v1.signer) = "authority"; - - // content is the proposal's content. - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; - // authority must be the gov module address. - string authority = 2; -} - -// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -message MsgExecLegacyContentResponse {} - -// MsgVote defines a message to cast a vote. -message MsgVote { - option (cosmos.msg.v1.signer) = "voter"; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - VoteOption option = 3; - string metadata = 4; -} - -// MsgVoteResponse defines the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgVoteWeighted defines a message to cast a vote. -message MsgVoteWeighted { - option (cosmos.msg.v1.signer) = "voter"; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated WeightedVoteOption options = 3; - string metadata = 4; -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -message MsgVoteWeightedResponse {} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -message MsgDeposit { - option (cosmos.msg.v1.signer) = "depositor"; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} diff --git a/examples/interchainjs/proto/cosmos/gov/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/gov/v1beta1/genesis.proto deleted file mode 100644 index be9b07e4..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package cosmos.gov.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/gov/v1beta1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -// GenesisState defines the gov module's genesis state. -message GenesisState { - // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1; - // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; - // votes defines all the votes present at genesis. - repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false]; - // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; - // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [(gogoproto.nullable) = false]; - // params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [(gogoproto.nullable) = false]; - // params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1beta1/gov.proto b/examples/interchainjs/proto/cosmos/gov/v1beta1/gov.proto deleted file mode 100644 index f1487fe4..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1beta1/gov.proto +++ /dev/null @@ -1,201 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// VoteOption enumerates the valid vote options for a given governance proposal. -enum VoteOption { - option (gogoproto.goproto_enum_prefix) = false; - - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; -} - -// WeightedVoteOption defines a unit of vote for vote split. -// -// Since: cosmos-sdk 0.43 -message WeightedVoteOption { - VoteOption option = 1; - string weight = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// TextProposal defines a standard text proposal whose changes need to be -// manually updated in case of approval. -message TextProposal { - option (cosmos_proto.implements_interface) = "Content"; - - option (gogoproto.equal) = true; - - string title = 1; - string description = 2; -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -message Deposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - uint64 proposal_id = 1; - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Proposal defines the core field members of a governance proposal. -message Proposal { - option (gogoproto.equal) = true; - - uint64 proposal_id = 1; - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; - ProposalStatus status = 3; - // final_tally_result is the final tally result of the proposal. When - // querying a proposal via gRPC, this field is not populated until the - // proposal's voting period has ended. - TallyResult final_tally_result = 4 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated cosmos.base.v1beta1.Coin total_deposit = 7 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -// ProposalStatus enumerates the valid statuses of a proposal. -enum ProposalStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; -} - -// TallyResult defines a standard tally for a governance proposal. -message TallyResult { - option (gogoproto.equal) = true; - - string yes = 1 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string abstain = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string no = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string no_with_veto = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -message Vote { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "id"]; - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Deprecated: Prefer to use `options` instead. This field is set in queries - // if and only if `len(options) == 1` and that option has weight 1. In all - // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - VoteOption option = 3 [deprecated = true]; - // Since: cosmos-sdk 0.43 - repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; -} - -// DepositParams defines the params for deposits on governance proposals. -message DepositParams { - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.jsontag) = "min_deposit,omitempty" - ]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "max_deposit_period,omitempty" - ]; -} - -// VotingParams defines the params for voting on governance proposals. -message VotingParams { - // Length of the voting period. - google.protobuf.Duration voting_period = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "voting_period,omitempty"]; -} - -// TallyParams defines the params for tallying votes on governance proposals. -message TallyParams { - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - bytes quorum = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "quorum,omitempty" - ]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - bytes threshold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "threshold,omitempty" - ]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - bytes veto_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty" - ]; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/gov/v1beta1/query.proto deleted file mode 100644 index e8837fd2..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1beta1/query.proto +++ /dev/null @@ -1,191 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -// Query defines the gRPC querier service for gov module -service Query { - // Proposal queries proposal details based on ProposalID. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; - } - - // Proposals queries all proposals based on given status. - rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; - } - - // Vote queries voted information based on proposalID, voterAddr. - rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; - } - - // Votes queries votes of a given proposal. - rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; - } - - // Params queries all parameters of the gov module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; - } - - // Deposit queries single deposit information based proposalID, depositAddr. - rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; - } - - // Deposits queries all deposits of a single proposal. - rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits"; - } - - // TallyResult queries the tally of a proposal vote. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally"; - } -} - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -message QueryProposalRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - Proposal proposal = 1 [(gogoproto.nullable) = false]; -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -message QueryProposalsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1; - - // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // depositor defines the deposit addresses from the proposals. - string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - repeated Proposal proposals = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -message QueryVoteRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter defines the oter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defined the queried vote. - Vote vote = 1 [(gogoproto.nullable) = false]; -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -message QueryVotesRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defined the queried votes. - repeated Vote votes = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [(gogoproto.nullable) = false]; - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [(gogoproto.nullable) = false]; - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [(gogoproto.nullable) = false]; -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -message QueryDepositRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - Deposit deposit = 1 [(gogoproto.nullable) = false]; -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -message QueryDepositsRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - repeated Deposit deposits = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -message QueryTallyResultRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/gov/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/gov/v1beta1/tx.proto deleted file mode 100644 index 00ce2253..00000000 --- a/examples/interchainjs/proto/cosmos/gov/v1beta1/tx.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -// Msg defines the bank Msg service. -service Msg { - // SubmitProposal defines a method to create new proposal given a content. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // Vote defines a method to add a vote on a specific proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - // - // Since: cosmos-sdk 0.43 - rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); - - // Deposit defines a method to add deposit on a specific proposal. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); -} - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -message MsgSubmitProposal { - option (cosmos.msg.v1.signer) = "proposer"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; -} - -// MsgVote defines a message to cast a vote. -message MsgVote { - option (cosmos.msg.v1.signer) = "voter"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1; - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - VoteOption option = 3; -} - -// MsgVoteResponse defines the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgVoteWeighted defines a message to cast a vote. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeighted { - option (cosmos.msg.v1.signer) = "voter"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeightedResponse {} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -message MsgDeposit { - option (cosmos.msg.v1.signer) = "depositor"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} diff --git a/examples/interchainjs/proto/cosmos/group/v1/events.proto b/examples/interchainjs/proto/cosmos/group/v1/events.proto deleted file mode 100644 index e8907243..00000000 --- a/examples/interchainjs/proto/cosmos/group/v1/events.proto +++ /dev/null @@ -1,77 +0,0 @@ -syntax = "proto3"; - -package cosmos.group.v1; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/group/v1/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -// EventCreateGroup is an event emitted when a group is created. -message EventCreateGroup { - - // group_id is the unique ID of the group. - uint64 group_id = 1; -} - -// EventUpdateGroup is an event emitted when a group is updated. -message EventUpdateGroup { - - // group_id is the unique ID of the group. - uint64 group_id = 1; -} - -// EventCreateGroupPolicy is an event emitted when a group policy is created. -message EventCreateGroupPolicy { - - // address is the account address of the group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventUpdateGroupPolicy is an event emitted when a group policy is updated. -message EventUpdateGroupPolicy { - - // address is the account address of the group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventSubmitProposal is an event emitted when a proposal is created. -message EventSubmitProposal { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// EventWithdrawProposal is an event emitted when a proposal is withdrawn. -message EventWithdrawProposal { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// EventVote is an event emitted when a voter votes on a proposal. -message EventVote { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// EventExec is an event emitted when a proposal is executed. -message EventExec { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; - - // result is the proposal execution result. - ProposalExecutorResult result = 2; -} - -// EventLeaveGroup is an event emitted when group member leaves the group. -message EventLeaveGroup { - - // group_id is the unique ID of the group. - uint64 group_id = 1; - - // address is the account address of the group member. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} diff --git a/examples/interchainjs/proto/cosmos/group/v1/genesis.proto b/examples/interchainjs/proto/cosmos/group/v1/genesis.proto deleted file mode 100644 index 49655ad2..00000000 --- a/examples/interchainjs/proto/cosmos/group/v1/genesis.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package cosmos.group.v1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -import "cosmos/group/v1/types.proto"; - -// GenesisState defines the group module's genesis state. -message GenesisState { - - // group_seq is the group table orm.Sequence, - // it is used to get the next group ID. - uint64 group_seq = 1; - - // groups is the list of groups info. - repeated GroupInfo groups = 2; - - // group_members is the list of groups members. - repeated GroupMember group_members = 3; - - // group_policy_seq is the group policy table orm.Sequence, - // it is used to generate the next group policy account address. - uint64 group_policy_seq = 4; - - // group_policies is the list of group policies info. - repeated GroupPolicyInfo group_policies = 5; - - // proposal_seq is the proposal table orm.Sequence, - // it is used to get the next proposal ID. - uint64 proposal_seq = 6; - - // proposals is the list of proposals. - repeated Proposal proposals = 7; - - // votes is the list of votes. - repeated Vote votes = 8; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/group/v1/query.proto b/examples/interchainjs/proto/cosmos/group/v1/query.proto deleted file mode 100644 index 1690d5b7..00000000 --- a/examples/interchainjs/proto/cosmos/group/v1/query.proto +++ /dev/null @@ -1,308 +0,0 @@ -syntax = "proto3"; - -package cosmos.group.v1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/group/v1/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -// Query is the cosmos.group.v1 Query service. -service Query { - - // GroupInfo queries group info based on group id. - rpc GroupInfo(QueryGroupInfoRequest) returns (QueryGroupInfoResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_info/{group_id}"; - }; - - // GroupPolicyInfo queries group policy info based on account address of group policy. - rpc GroupPolicyInfo(QueryGroupPolicyInfoRequest) returns (QueryGroupPolicyInfoResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_policy_info/{address}"; - }; - - // GroupMembers queries members of a group - rpc GroupMembers(QueryGroupMembersRequest) returns (QueryGroupMembersResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_members/{group_id}"; - }; - - // GroupsByAdmin queries groups by admin address. - rpc GroupsByAdmin(QueryGroupsByAdminRequest) returns (QueryGroupsByAdminResponse) { - option (google.api.http).get = "/cosmos/group/v1/groups_by_admin/{admin}"; - }; - - // GroupPoliciesByGroup queries group policies by group id. - rpc GroupPoliciesByGroup(QueryGroupPoliciesByGroupRequest) returns (QueryGroupPoliciesByGroupResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_policies_by_group/{group_id}"; - }; - - // GroupsByAdmin queries group policies by admin address. - rpc GroupPoliciesByAdmin(QueryGroupPoliciesByAdminRequest) returns (QueryGroupPoliciesByAdminResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_policies_by_admin/{admin}"; - }; - - // Proposal queries a proposal based on proposal id. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/group/v1/proposal/{proposal_id}"; - }; - - // ProposalsByGroupPolicy queries proposals based on account address of group policy. - rpc ProposalsByGroupPolicy(QueryProposalsByGroupPolicyRequest) returns (QueryProposalsByGroupPolicyResponse) { - option (google.api.http).get = "/cosmos/group/v1/proposals_by_group_policy/{address}"; - }; - - // VoteByProposalVoter queries a vote by proposal id and voter. - rpc VoteByProposalVoter(QueryVoteByProposalVoterRequest) returns (QueryVoteByProposalVoterResponse) { - option (google.api.http).get = "/cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}"; - }; - - // VotesByProposal queries a vote by proposal. - rpc VotesByProposal(QueryVotesByProposalRequest) returns (QueryVotesByProposalResponse) { - option (google.api.http).get = "/cosmos/group/v1/votes_by_proposal/{proposal_id}"; - }; - - // VotesByVoter queries a vote by voter. - rpc VotesByVoter(QueryVotesByVoterRequest) returns (QueryVotesByVoterResponse) { - option (google.api.http).get = "/cosmos/group/v1/votes_by_voter/{voter}"; - }; - - // GroupsByMember queries groups by member address. - rpc GroupsByMember(QueryGroupsByMemberRequest) returns (QueryGroupsByMemberResponse) { - option (google.api.http).get = "/cosmos/group/v1/groups_by_member/{address}"; - }; - - // TallyResult queries the tally of a proposal votes. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/group/v1/proposals/{proposal_id}/tally"; - }; -} - -// QueryGroupInfoRequest is the Query/GroupInfo request type. -message QueryGroupInfoRequest { - - // group_id is the unique ID of the group. - uint64 group_id = 1; -} - -// QueryGroupInfoResponse is the Query/GroupInfo response type. -message QueryGroupInfoResponse { - - // info is the GroupInfo for the group. - GroupInfo info = 1; -} - -// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. -message QueryGroupPolicyInfoRequest { - - // address is the account address of the group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. -message QueryGroupPolicyInfoResponse { - - // info is the GroupPolicyInfo for the group policy. - GroupPolicyInfo info = 1; -} - -// QueryGroupMembersRequest is the Query/GroupMembers request type. -message QueryGroupMembersRequest { - - // group_id is the unique ID of the group. - uint64 group_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. -message QueryGroupMembersResponse { - - // members are the members of the group with given group_id. - repeated GroupMember members = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. -message QueryGroupsByAdminRequest { - - // admin is the account address of a group's admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. -message QueryGroupsByAdminResponse { - - // groups are the groups info with the provided admin. - repeated GroupInfo groups = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. -message QueryGroupPoliciesByGroupRequest { - - // group_id is the unique ID of the group policy's group. - uint64 group_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. -message QueryGroupPoliciesByGroupResponse { - - // group_policies are the group policies info associated with the provided group. - repeated GroupPolicyInfo group_policies = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. -message QueryGroupPoliciesByAdminRequest { - - // admin is the admin address of the group policy. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. -message QueryGroupPoliciesByAdminResponse { - - // group_policies are the group policies info with provided admin. - repeated GroupPolicyInfo group_policies = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryProposalRequest is the Query/Proposal request type. -message QueryProposalRequest { - - // proposal_id is the unique ID of a proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the Query/Proposal response type. -message QueryProposalResponse { - - // proposal is the proposal info. - Proposal proposal = 1; -} - -// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. -message QueryProposalsByGroupPolicyRequest { - - // address is the account address of the group policy related to proposals. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. -message QueryProposalsByGroupPolicyResponse { - - // proposals are the proposals with given group policy. - repeated Proposal proposals = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. -message QueryVoteByProposalVoterRequest { - - // proposal_id is the unique ID of a proposal. - uint64 proposal_id = 1; - - // voter is a proposal voter account address. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. -message QueryVoteByProposalVoterResponse { - - // vote is the vote with given proposal_id and voter. - Vote vote = 1; -} - -// QueryVotesByProposalRequest is the Query/VotesByProposal request type. -message QueryVotesByProposalRequest { - - // proposal_id is the unique ID of a proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesByProposalResponse is the Query/VotesByProposal response type. -message QueryVotesByProposalResponse { - - // votes are the list of votes for given proposal_id. - repeated Vote votes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVotesByVoterRequest is the Query/VotesByVoter request type. -message QueryVotesByVoterRequest { - // voter is a proposal voter account address. - string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesByVoterResponse is the Query/VotesByVoter response type. -message QueryVotesByVoterResponse { - - // votes are the list of votes by given voter. - repeated Vote votes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. -message QueryGroupsByMemberRequest { - // address is the group member address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. -message QueryGroupsByMemberResponse { - // groups are the groups info with the provided group member. - repeated GroupInfo groups = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the Query/TallyResult request type. -message QueryTallyResultRequest { - // proposal_id is the unique id of a proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the Query/TallyResult response type. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/group/v1/tx.proto b/examples/interchainjs/proto/cosmos/group/v1/tx.proto deleted file mode 100644 index 08d83ede..00000000 --- a/examples/interchainjs/proto/cosmos/group/v1/tx.proto +++ /dev/null @@ -1,364 +0,0 @@ -syntax = "proto3"; - -package cosmos.group.v1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; -import "cosmos/group/v1/types.proto"; - -import "cosmos/msg/v1/msg.proto"; - -// Msg is the cosmos.group.v1 Msg service. -service Msg { - - // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. - rpc CreateGroup(MsgCreateGroup) returns (MsgCreateGroupResponse); - - // UpdateGroupMembers updates the group members with given group id and admin address. - rpc UpdateGroupMembers(MsgUpdateGroupMembers) returns (MsgUpdateGroupMembersResponse); - - // UpdateGroupAdmin updates the group admin with given group id and previous admin address. - rpc UpdateGroupAdmin(MsgUpdateGroupAdmin) returns (MsgUpdateGroupAdminResponse); - - // UpdateGroupMetadata updates the group metadata with given group id and admin address. - rpc UpdateGroupMetadata(MsgUpdateGroupMetadata) returns (MsgUpdateGroupMetadataResponse); - - // CreateGroupPolicy creates a new group policy using given DecisionPolicy. - rpc CreateGroupPolicy(MsgCreateGroupPolicy) returns (MsgCreateGroupPolicyResponse); - - // CreateGroupWithPolicy creates a new group with policy. - rpc CreateGroupWithPolicy(MsgCreateGroupWithPolicy) returns (MsgCreateGroupWithPolicyResponse); - - // UpdateGroupPolicyAdmin updates a group policy admin. - rpc UpdateGroupPolicyAdmin(MsgUpdateGroupPolicyAdmin) returns (MsgUpdateGroupPolicyAdminResponse); - - // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. - rpc UpdateGroupPolicyDecisionPolicy(MsgUpdateGroupPolicyDecisionPolicy) - returns (MsgUpdateGroupPolicyDecisionPolicyResponse); - - // UpdateGroupPolicyMetadata updates a group policy metadata. - rpc UpdateGroupPolicyMetadata(MsgUpdateGroupPolicyMetadata) returns (MsgUpdateGroupPolicyMetadataResponse); - - // SubmitProposal submits a new proposal. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // WithdrawProposal aborts a proposal. - rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse); - - // Vote allows a voter to vote on a proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // Exec executes a proposal. - rpc Exec(MsgExec) returns (MsgExecResponse); - - // LeaveGroup allows a group member to leave the group. - rpc LeaveGroup(MsgLeaveGroup) returns (MsgLeaveGroupResponse); -} - -// -// Groups -// - -// MsgCreateGroup is the Msg/CreateGroup request type. -message MsgCreateGroup { - option (cosmos.msg.v1.signer) = "admin"; - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // members defines the group members. - repeated Member members = 2 [(gogoproto.nullable) = false]; - - // metadata is any arbitrary metadata to attached to the group. - string metadata = 3; -} - -// MsgCreateGroupResponse is the Msg/CreateGroup response type. -message MsgCreateGroupResponse { - - // group_id is the unique ID of the newly created group. - uint64 group_id = 1; -} - -// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. -message MsgUpdateGroupMembers { - option (cosmos.msg.v1.signer) = "admin"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // member_updates is the list of members to update, - // set weight to 0 to remove a member. - repeated Member member_updates = 3 [(gogoproto.nullable) = false]; -} - -// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. -message MsgUpdateGroupMembersResponse {} - -// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. -message MsgUpdateGroupAdmin { - option (cosmos.msg.v1.signer) = "admin"; - - // admin is the current account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // new_admin is the group new admin account address. - string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. -message MsgUpdateGroupAdminResponse {} - -// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. -message MsgUpdateGroupMetadata { - option (cosmos.msg.v1.signer) = "admin"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // metadata is the updated group's metadata. - string metadata = 3; -} - -// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. -message MsgUpdateGroupMetadataResponse {} - -// -// Group Policies -// - -// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. -message MsgCreateGroupPolicy { - option (cosmos.msg.v1.signer) = "admin"; - - option (gogoproto.goproto_getters) = false; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // metadata is any arbitrary metadata attached to the group policy. - string metadata = 3; - - // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; -} - -// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. -message MsgCreateGroupPolicyResponse { - - // address is the account address of the newly created group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. -message MsgUpdateGroupPolicyAdmin { - option (cosmos.msg.v1.signer) = "admin"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // address is the account address of the group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // new_admin is the new group policy admin. - string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. -message MsgCreateGroupWithPolicy { - option (gogoproto.goproto_getters) = false; - - // admin is the account address of the group and group policy admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // members defines the group members. - repeated Member members = 2 [(gogoproto.nullable) = false]; - - // group_metadata is any arbitrary metadata attached to the group. - string group_metadata = 3; - - // group_policy_metadata is any arbitrary metadata attached to the group policy. - string group_policy_metadata = 4; - - // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. - bool group_policy_as_admin = 5; - - // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; -} - -// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. -message MsgCreateGroupWithPolicyResponse { - - // group_id is the unique ID of the newly created group with policy. - uint64 group_id = 1; - - // group_policy_address is the account address of the newly created group policy. - string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. -message MsgUpdateGroupPolicyAdminResponse {} - -// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. -message MsgUpdateGroupPolicyDecisionPolicy { - option (cosmos.msg.v1.signer) = "admin"; - - option (gogoproto.goproto_getters) = false; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // address is the account address of group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // decision_policy is the updated group policy's decision policy. - google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; -} - -// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. -message MsgUpdateGroupPolicyDecisionPolicyResponse {} - -// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. -message MsgUpdateGroupPolicyMetadata { - option (cosmos.msg.v1.signer) = "admin"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // address is the account address of group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is the updated group policy metadata. - string metadata = 3; -} - -// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. -message MsgUpdateGroupPolicyMetadataResponse {} - -// -// Proposals and Voting -// - -// Exec defines modes of execution of a proposal on creation or on new vote. -enum Exec { - - // An empty value means that there should be a separate - // MsgExec request for the proposal to execute. - EXEC_UNSPECIFIED = 0; - - // Try to execute the proposal immediately. - // If the proposal is not allowed per the DecisionPolicy, - // the proposal will still be open and could - // be executed at a later point. - EXEC_TRY = 1; -} - -// MsgSubmitProposal is the Msg/SubmitProposal request type. -message MsgSubmitProposal { - option (cosmos.msg.v1.signer) = "proposers"; - - option (gogoproto.goproto_getters) = false; - - // address is the account address of group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // proposers are the account addresses of the proposers. - // Proposers signatures will be counted as yes votes. - repeated string proposers = 2; - - // metadata is any arbitrary metadata to attached to the proposal. - string metadata = 3; - - // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - repeated google.protobuf.Any messages = 4; - - // exec defines the mode of execution of the proposal, - // whether it should be executed immediately on creation or not. - // If so, proposers signatures are considered as Yes votes. - Exec exec = 5; -} - -// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// MsgWithdrawProposal is the Msg/WithdrawProposal request type. -message MsgWithdrawProposal { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // address is the admin of the group policy or one of the proposer of the proposal. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. -message MsgWithdrawProposalResponse {} - -// MsgVote is the Msg/Vote request type. -message MsgVote { - option (cosmos.msg.v1.signer) = "voter"; - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - // voter is the voter account address. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // option is the voter's choice on the proposal. - VoteOption option = 3; - - // metadata is any arbitrary metadata to attached to the vote. - string metadata = 4; - - // exec defines whether the proposal should be executed - // immediately after voting or not. - Exec exec = 5; -} - -// MsgVoteResponse is the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgExec is the Msg/Exec request type. -message MsgExec { - option (cosmos.msg.v1.signer) = "signer"; - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // signer is the account address used to execute the proposal. - string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgExecResponse is the Msg/Exec request type. -message MsgExecResponse {} - -// MsgLeaveGroup is the Msg/LeaveGroup request type. -message MsgLeaveGroup { - option (cosmos.msg.v1.signer) = "address"; - - // address is the account address of the group member. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; -} - -// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. -message MsgLeaveGroupResponse {} diff --git a/examples/interchainjs/proto/cosmos/group/v1/types.proto b/examples/interchainjs/proto/cosmos/group/v1/types.proto deleted file mode 100644 index e09a74c1..00000000 --- a/examples/interchainjs/proto/cosmos/group/v1/types.proto +++ /dev/null @@ -1,308 +0,0 @@ -syntax = "proto3"; - -package cosmos.group.v1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; - -// Member represents a group member with an account address, -// non-zero weight and metadata. -message Member { - - // address is the member's account address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // weight is the member's voting weight that should be greater than 0. - string weight = 2; - - // metadata is any arbitrary metadata to attached to the member. - string metadata = 3; - - // added_at is a timestamp specifying when a member was added. - google.protobuf.Timestamp added_at = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// Members defines a repeated slice of Member objects. -message Members { - - // members is the list of members. - repeated Member members = 1 [(gogoproto.nullable) = false]; -} - -// ThresholdDecisionPolicy implements the DecisionPolicy interface -message ThresholdDecisionPolicy { - option (cosmos_proto.implements_interface) = "DecisionPolicy"; - - // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. - string threshold = 1; - - // windows defines the different windows for voting and execution. - DecisionPolicyWindows windows = 2; -} - -// PercentageDecisionPolicy implements the DecisionPolicy interface -message PercentageDecisionPolicy { - option (cosmos_proto.implements_interface) = "DecisionPolicy"; - - // percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. - string percentage = 1; - - // windows defines the different windows for voting and execution. - DecisionPolicyWindows windows = 2; -} - -// DecisionPolicyWindows defines the different windows for voting and execution. -message DecisionPolicyWindows { - // voting_period is the duration from submission of a proposal to the end of voting period - // Within this times votes can be submitted with MsgVote. - google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; - - // min_execution_period is the minimum duration after the proposal submission - // where members can start sending MsgExec. This means that the window for - // sending a MsgExec transaction is: - // `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - // where max_execution_period is a app-specific config, defined in the keeper. - // If not set, min_execution_period will default to 0. - // - // Please make sure to set a `min_execution_period` that is smaller than - // `voting_period + max_execution_period`, or else the above execution window - // is empty, meaning that all proposals created with this decision policy - // won't be able to be executed. - google.protobuf.Duration min_execution_period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -// VoteOption enumerates the valid vote options for a given proposal. -enum VoteOption { - option (gogoproto.goproto_enum_prefix) = false; - - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4; -} - -// -// State -// - -// GroupInfo represents the high-level on-chain information for a group. -message GroupInfo { - - // id is the unique ID of the group. - uint64 id = 1; - - // admin is the account address of the group's admin. - string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata to attached to the group. - string metadata = 3; - - // version is used to track changes to a group's membership structure that - // would break existing proposals. Whenever any members weight is changed, - // or any member is added or removed this version is incremented and will - // cause proposals based on older versions of this group to fail - uint64 version = 4; - - // total_weight is the sum of the group members' weights. - string total_weight = 5; - - // created_at is a timestamp specifying when a group was created. - google.protobuf.Timestamp created_at = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// GroupMember represents the relationship between a group and a member. -message GroupMember { - - // group_id is the unique ID of the group. - uint64 group_id = 1; - - // member is the member data. - Member member = 2; -} - -// GroupPolicyInfo represents the high-level on-chain information for a group policy. -message GroupPolicyInfo { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - // address is the account address of group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // admin is the account address of the group admin. - string admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata to attached to the group policy. - string metadata = 4; - - // version is used to track changes to a group's GroupPolicyInfo structure that - // would create a different result on a running proposal. - uint64 version = 5; - - // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; - - // created_at is a timestamp specifying when a group policy was created. - google.protobuf.Timestamp created_at = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// Proposal defines a group proposal. Any member of a group can submit a proposal -// for a group policy to decide upon. -// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal -// passes as well as some optional metadata associated with the proposal. -message Proposal { - option (gogoproto.goproto_getters) = false; - - // id is the unique id of the proposal. - uint64 id = 1; - - // address is the account address of group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata to attached to the proposal. - string metadata = 3; - - // proposers are the account addresses of the proposers. - repeated string proposers = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // submit_time is a timestamp specifying when a proposal was submitted. - google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // group_version tracks the version of the group that this proposal corresponds to. - // When group membership is changed, existing proposals from previous group versions will become invalid. - uint64 group_version = 6; - - // group_policy_version tracks the version of the group policy that this proposal corresponds to. - // When a decision policy is changed, existing proposals from previous policy versions will become invalid. - uint64 group_policy_version = 7; - - // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. - ProposalStatus status = 8; - - // result is the final result based on the votes and election rule. Initial value is unfinalized. - // The result is persisted so that clients can always rely on this state and not have to replicate the logic. - ProposalResult result = 9; - - // final_tally_result contains the sums of all weighted votes for this - // proposal for each vote option, after tallying. When querying a proposal - // via gRPC, this field is not populated until the proposal's voting period - // has ended. - TallyResult final_tally_result = 10 [(gogoproto.nullable) = false]; - - // voting_period_end is the timestamp before which voting must be done. - // Unless a successfull MsgExec is called before (to execute a proposal whose - // tally is successful before the voting period ends), tallying will be done - // at this point, and the `final_tally_result`, as well - // as `status` and `result` fields will be accordingly updated. - google.protobuf.Timestamp voting_period_end = 11 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. - ProposalExecutorResult executor_result = 12; - - // messages is a list of Msgs that will be executed if the proposal passes. - repeated google.protobuf.Any messages = 13; -} - -// ProposalStatus defines proposal statuses. -enum ProposalStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is invalid and not allowed. - PROPOSAL_STATUS_UNSPECIFIED = 0; - - // Initial status of a proposal when persisted. - PROPOSAL_STATUS_SUBMITTED = 1; - - // Final status of a proposal when the final tally was executed. - PROPOSAL_STATUS_CLOSED = 2; - - // Final status of a proposal when the group was modified before the final tally. - PROPOSAL_STATUS_ABORTED = 3; - - // A proposal can be deleted before the voting start time by the owner. When this happens the final status - // is Withdrawn. - PROPOSAL_STATUS_WITHDRAWN = 4; -} - -// ProposalResult defines types of proposal results. -enum ProposalResult { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is invalid and not allowed - PROPOSAL_RESULT_UNSPECIFIED = 0; - - // Until a final tally has happened the status is unfinalized - PROPOSAL_RESULT_UNFINALIZED = 1; - - // Final result of the tally - PROPOSAL_RESULT_ACCEPTED = 2; - - // Final result of the tally - PROPOSAL_RESULT_REJECTED = 3; -} - -// ProposalExecutorResult defines types of proposal executor results. -enum ProposalExecutorResult { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is not allowed. - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0; - - // We have not yet run the executor. - PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1; - - // The executor was successful and proposed action updated state. - PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2; - - // The executor returned an error and proposed action didn't update state. - PROPOSAL_EXECUTOR_RESULT_FAILURE = 3; -} - -// TallyResult represents the sum of weighted votes for each vote option. -message TallyResult { - option (gogoproto.goproto_getters) = false; - - // yes_count is the weighted sum of yes votes. - string yes_count = 1; - - // abstain_count is the weighted sum of abstainers. - string abstain_count = 2; - - // no is the weighted sum of no votes. - string no_count = 3; - - // no_with_veto_count is the weighted sum of veto. - string no_with_veto_count = 4; -} - -// Vote represents a vote for a proposal. -message Vote { - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // voter is the account address of the voter. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // option is the voter's choice on the proposal. - VoteOption option = 3; - - // metadata is any arbitrary metadata to attached to the vote. - string metadata = 4; - - // submit_time is the timestamp when the vote was submitted. - google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/examples/interchainjs/proto/cosmos/mint/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/mint/v1beta1/genesis.proto deleted file mode 100644 index 4e783fb5..00000000 --- a/examples/interchainjs/proto/cosmos/mint/v1beta1/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// GenesisState defines the mint module's genesis state. -message GenesisState { - // minter is a space for holding current inflation information. - Minter minter = 1 [(gogoproto.nullable) = false]; - - // params defines all the paramaters of the module. - Params params = 2 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/mint/v1beta1/mint.proto b/examples/interchainjs/proto/cosmos/mint/v1beta1/mint.proto deleted file mode 100644 index 9cfe2b76..00000000 --- a/examples/interchainjs/proto/cosmos/mint/v1beta1/mint.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -// Minter represents the minting state. -message Minter { - // current annual inflation rate - string inflation = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // current annual expected provisions - string annual_provisions = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Params holds parameters for the mint module. -message Params { - option (gogoproto.goproto_stringer) = false; - - // type of coin to mint - string mint_denom = 1; - // maximum annual change in inflation rate - string inflation_rate_change = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maximum inflation rate - string inflation_max = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // minimum inflation rate - string inflation_min = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // goal of percent bonded atoms - string goal_bonded = 5 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // expected blocks per year - uint64 blocks_per_year = 6; -} diff --git a/examples/interchainjs/proto/cosmos/mint/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/mint/v1beta1/query.proto deleted file mode 100644 index acd341d7..00000000 --- a/examples/interchainjs/proto/cosmos/mint/v1beta1/query.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Params returns the total set of minting parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/params"; - } - - // Inflation returns the current minting inflation value. - rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; - } - - // AnnualProvisions current minting annual provisions value. - rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryInflationRequest is the request type for the Query/Inflation RPC method. -message QueryInflationRequest {} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -message QueryInflationResponse { - // inflation is the current minting inflation value. - bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// QueryAnnualProvisionsRequest is the request type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsRequest {} - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsResponse { - // annual_provisions is the current minting annual provisions value. - bytes annual_provisions = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/msg/v1/msg.proto b/examples/interchainjs/proto/cosmos/msg/v1/msg.proto deleted file mode 100644 index 89bdf312..00000000 --- a/examples/interchainjs/proto/cosmos/msg/v1/msg.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package cosmos.msg.v1; - -import "google/protobuf/descriptor.proto"; - -// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated. -// We need this right now because gogoproto codegen needs to import the extension. -option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice"; - -extend google.protobuf.MessageOptions { - // signer must be used in cosmos messages in order - // to signal to external clients which fields in a - // given cosmos message must be filled with signer - // information (address). - // The field must be the protobuf name of the message - // field extended with this MessageOption. - // The field must either be of string kind, or of message - // kind in case the signer information is contained within - // a message inside the cosmos message. - repeated string signer = 11110000; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/nft/v1beta1/event.proto b/examples/interchainjs/proto/cosmos/nft/v1beta1/event.proto deleted file mode 100644 index 96964f08..00000000 --- a/examples/interchainjs/proto/cosmos/nft/v1beta1/event.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; - -// EventSend is emitted on Msg/Send -message EventSend { - string class_id = 1; - string id = 2; - string sender = 3; - string receiver = 4; -} - -// EventMint is emitted on Mint -message EventMint { - string class_id = 1; - string id = 2; - string owner = 3; -} - -// EventBurn is emitted on Burn -message EventBurn { - string class_id = 1; - string id = 2; - string owner = 3; -} diff --git a/examples/interchainjs/proto/cosmos/nft/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/nft/v1beta1/genesis.proto deleted file mode 100644 index 6f36ed34..00000000 --- a/examples/interchainjs/proto/cosmos/nft/v1beta1/genesis.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -import "cosmos/nft/v1beta1/nft.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; - -// GenesisState defines the nft module's genesis state. -message GenesisState { - // class defines the class of the nft type. - repeated cosmos.nft.v1beta1.Class classes = 1; - repeated Entry entries = 2; -} - -// Entry Defines all nft owned by a person -message Entry { - // owner is the owner address of the following nft - string owner = 1; - - // nfts is a group of nfts of the same owner - repeated cosmos.nft.v1beta1.NFT nfts = 2; -} diff --git a/examples/interchainjs/proto/cosmos/nft/v1beta1/nft.proto b/examples/interchainjs/proto/cosmos/nft/v1beta1/nft.proto deleted file mode 100644 index b1241260..00000000 --- a/examples/interchainjs/proto/cosmos/nft/v1beta1/nft.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; - -// Class defines the class of the nft type. -message Class { - // id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 - string id = 1; - - // name defines the human-readable name of the NFT classification. Optional - string name = 2; - - // symbol is an abbreviated name for nft classification. Optional - string symbol = 3; - - // description is a brief description of nft classification. Optional - string description = 4; - - // uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional - string uri = 5; - - // uri_hash is a hash of the document pointed by uri. Optional - string uri_hash = 6; - - // data is the app specific metadata of the NFT class. Optional - google.protobuf.Any data = 7; -} - -// NFT defines the NFT. -message NFT { - // class_id associated with the NFT, similar to the contract address of ERC721 - string class_id = 1; - - // id is a unique identifier of the NFT - string id = 2; - - // uri for the NFT metadata stored off chain - string uri = 3; - - // uri_hash is a hash of the document pointed by uri - string uri_hash = 4; - - // data is an app specific data of the NFT. Optional - google.protobuf.Any data = 10; -} diff --git a/examples/interchainjs/proto/cosmos/nft/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/nft/v1beta1/query.proto deleted file mode 100644 index c1d8070f..00000000 --- a/examples/interchainjs/proto/cosmos/nft/v1beta1/query.proto +++ /dev/null @@ -1,125 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "cosmos/nft/v1beta1/nft.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; - -// Query defines the gRPC querier service. -service Query { - // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 - rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/balance/{owner}/{class_id}"; - } - - // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 - rpc Owner(QueryOwnerRequest) returns (QueryOwnerResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/owner/{class_id}/{id}"; - } - - // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. - rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/supply/{class_id}"; - } - - // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - // ERC721Enumerable - rpc NFTs(QueryNFTsRequest) returns (QueryNFTsResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/nfts"; - } - - // NFT queries an NFT based on its class and id. - rpc NFT(QueryNFTRequest) returns (QueryNFTResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/nfts/{class_id}/{id}"; - } - - // Class queries an NFT class based on its id - rpc Class(QueryClassRequest) returns (QueryClassResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/classes/{class_id}"; - } - - // Classes queries all NFT classes - rpc Classes(QueryClassesRequest) returns (QueryClassesResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/classes"; - } -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method -message QueryBalanceRequest { - string class_id = 1; - string owner = 2; -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method -message QueryBalanceResponse { - uint64 amount = 1; -} - -// QueryOwnerRequest is the request type for the Query/Owner RPC method -message QueryOwnerRequest { - string class_id = 1; - string id = 2; -} - -// QueryOwnerResponse is the response type for the Query/Owner RPC method -message QueryOwnerResponse { - string owner = 1; -} - -// QuerySupplyRequest is the request type for the Query/Supply RPC method -message QuerySupplyRequest { - string class_id = 1; -} - -// QuerySupplyResponse is the response type for the Query/Supply RPC method -message QuerySupplyResponse { - uint64 amount = 1; -} - -// QueryNFTstRequest is the request type for the Query/NFTs RPC method -message QueryNFTsRequest { - string class_id = 1; - string owner = 2; - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -// QueryNFTsResponse is the response type for the Query/NFTs RPC methods -message QueryNFTsResponse { - repeated cosmos.nft.v1beta1.NFT nfts = 1; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryNFTRequest is the request type for the Query/NFT RPC method -message QueryNFTRequest { - string class_id = 1; - string id = 2; -} - -// QueryNFTResponse is the response type for the Query/NFT RPC method -message QueryNFTResponse { - cosmos.nft.v1beta1.NFT nft = 1; -} - -// QueryClassRequest is the request type for the Query/Class RPC method -message QueryClassRequest { - string class_id = 1; -} - -// QueryClassResponse is the response type for the Query/Class RPC method -message QueryClassResponse { - cosmos.nft.v1beta1.Class class = 1; -} - -// QueryClassesRequest is the request type for the Query/Classes RPC method -message QueryClassesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryClassesResponse is the response type for the Query/Classes RPC method -message QueryClassesResponse { - repeated cosmos.nft.v1beta1.Class classes = 1; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmos/nft/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/nft/v1beta1/tx.proto deleted file mode 100644 index 95b402ce..00000000 --- a/examples/interchainjs/proto/cosmos/nft/v1beta1/tx.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; - -import "cosmos/msg/v1/msg.proto"; - -// Msg defines the nft Msg service. -service Msg { - // Send defines a method to send a nft from one account to another account. - rpc Send(MsgSend) returns (MsgSendResponse); -} -// MsgSend represents a message to send a nft from one account to another account. -message MsgSend { - option (cosmos.msg.v1.signer) = "sender"; - - // class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 - string class_id = 1; - - // id defines the unique identification of nft - string id = 2; - - // sender is the address of the owner of nft - string sender = 3; - - // receiver is the receiver address of nft - string receiver = 4; -} -// MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse {} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/orm/v1/orm.proto b/examples/interchainjs/proto/cosmos/orm/v1/orm.proto deleted file mode 100644 index abfbbd4f..00000000 --- a/examples/interchainjs/proto/cosmos/orm/v1/orm.proto +++ /dev/null @@ -1,104 +0,0 @@ -syntax = "proto3"; - -package cosmos.orm.v1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - - // table specifies that this message will be used as an ORM table. It cannot - // be used together with the singleton option. - TableDescriptor table = 104503790; - - // singleton specifies that this message will be used as an ORM singleton. It cannot - // be used together with the table option. - SingletonDescriptor singleton = 104503791; -} - -// TableDescriptor describes an ORM table. -message TableDescriptor { - - // primary_key defines the primary key for the table. - PrimaryKeyDescriptor primary_key = 1; - - // index defines one or more secondary indexes. - repeated SecondaryIndexDescriptor index = 2; - - // id is a non-zero integer ID that must be unique within the - // tables and singletons in this file. It may be deprecated in the future when this - // can be auto-generated. - uint32 id = 3; -} - -// PrimaryKeyDescriptor describes a table primary key. -message PrimaryKeyDescriptor { - - // fields is a comma-separated list of fields in the primary key. Spaces are - // not allowed. Supported field types, their encodings, and any applicable constraints - // are described below. - // - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that - // is suitable for sorted iteration (not varint encoding). This type is - // well-suited for small integers. - // - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that - // is suitable for sorted iteration (not varint encoding). This type is - // well-suited for small integers such as auto-incrementing sequences. - // - fixed32, fixed64 are encoded as big-endian fixed width bytes and support - // sorted iteration. These types are well-suited for encoding fixed with - // decimals as integers. - // - string's are encoded as raw bytes in terminal key segments and null-terminated - // in non-terminal segments. Null characters are thus forbidden in strings. - // string fields support sorted iteration. - // - bytes are encoded as raw bytes in terminal segments and length-prefixed - // with a 32-bit unsigned varint in non-terminal segments. - // - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with - // an encoding that enables sorted iteration. - // - google.protobuf.Timestamp and google.protobuf.Duration are encoded - // as 12 bytes using an encoding that enables sorted iteration. - // - enum fields are encoded using varint encoding and do not support sorted - // iteration. - // - bool fields are encoded as a single byte 0 or 1. - // - // All other fields types are unsupported in keys including repeated and - // oneof fields. - // - // Primary keys are prefixed by the varint encoded table id and the byte 0x0 - // plus any additional prefix specified by the schema. - string fields = 1; - - // auto_increment specifies that the primary key is generated by an - // auto-incrementing integer. If this is set to true fields must only - // contain one field of that is of type uint64. - bool auto_increment = 2; -} - -// PrimaryKeyDescriptor describes a table secondary index. -message SecondaryIndexDescriptor { - - // fields is a comma-separated list of fields in the index. The supported - // field types are the same as those for PrimaryKeyDescriptor.fields. - // Index keys are prefixed by the varint encoded table id and the varint - // encoded index id plus any additional prefix specified by the schema. - // - // In addition the the field segments, non-unique index keys are suffixed with - // any additional primary key fields not present in the index fields so that the - // primary key can be reconstructed. Unique indexes instead of being suffixed - // store the remaining primary key fields in the value.. - string fields = 1; - - // id is a non-zero integer ID that must be unique within the indexes for this - // table and less than 32768. It may be deprecated in the future when this can - // be auto-generated. - uint32 id = 2; - - // unique specifies that this an unique index. - bool unique = 3; -} - -// TableDescriptor describes an ORM singleton table which has at most one instance. -message SingletonDescriptor { - - // id is a non-zero integer ID that must be unique within the - // tables and singletons in this file. It may be deprecated in the future when this - // can be auto-generated. - uint32 id = 1; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/orm/v1alpha1/schema.proto b/examples/interchainjs/proto/cosmos/orm/v1alpha1/schema.proto deleted file mode 100644 index ab713340..00000000 --- a/examples/interchainjs/proto/cosmos/orm/v1alpha1/schema.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; - -package cosmos.orm.v1alpha1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - // module_schema is used to define the ORM schema for an app module. - // All module config messages that use module_schema must also declare - // themselves as app module config messages using the cosmos.app.v1.is_module - // option. - ModuleSchemaDescriptor module_schema = 104503792; -} - -// ModuleSchemaDescriptor describe's a module's ORM schema. -message ModuleSchemaDescriptor { - repeated FileEntry schema_file = 1; - - // FileEntry describes an ORM file used in a module. - message FileEntry { - // id is a prefix that will be varint encoded and prepended to all the - // table keys specified in the file's tables. - uint32 id = 1; - - // proto_file_name is the name of a file .proto in that contains - // table definitions. The .proto file must be in a package that the - // module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. - string proto_file_name = 2; - - // storage_type optionally indicates the type of storage this file's - // tables should used. If it is left unspecified, the default KV-storage - // of the app will be used. - StorageType storage_type = 3; - } - - // prefix is an optional prefix that precedes all keys in this module's - // store. - bytes prefix = 2; -} - -// StorageType -enum StorageType { - // STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent - // KV-storage where primary key entries are stored in merkle-tree - // backed commitment storage and indexes and seqs are stored in - // fast index storage. Note that the Cosmos SDK before store/v2alpha1 - // does not support this. - STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0; - - // STORAGE_TYPE_MEMORY indicates in-memory storage that will be - // reloaded every time an app restarts. Tables with this type of storage - // will by default be ignored when importing and exporting a module's - // state from JSON. - STORAGE_TYPE_MEMORY = 1; - - // STORAGE_TYPE_TRANSIENT indicates transient storage that is reset - // at the end of every block. Tables with this type of storage - // will by default be ignored when importing and exporting a module's - // state from JSON. - STORAGE_TYPE_TRANSIENT = 2; - - // STORAGE_TYPE_INDEX indicates persistent storage which is not backed - // by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK - // before store/v2alpha1 does not support this. - STORAGE_TYPE_INDEX = 3; - - // STORAGE_TYPE_INDEX indicates persistent storage which is backed by - // a merkle-tree. With this type of storage, both primary and index keys - // will affect the app hash and this is generally less efficient - // than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index - // keys into index storage. Note that modules built with the - // Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT - // instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX - // because this is the only type of persistent storage available. - STORAGE_TYPE_COMMITMENT = 4; -} diff --git a/examples/interchainjs/proto/cosmos/params/v1beta1/params.proto b/examples/interchainjs/proto/cosmos/params/v1beta1/params.proto deleted file mode 100644 index e5aabfec..00000000 --- a/examples/interchainjs/proto/cosmos/params/v1beta1/params.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -// ParameterChangeProposal defines a proposal to change one or more parameters. -message ParameterChangeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; -} - -// ParamChange defines an individual parameter change, for use in -// ParameterChangeProposal. -message ParamChange { - option (gogoproto.goproto_stringer) = false; - - string subspace = 1; - string key = 2; - string value = 3; -} diff --git a/examples/interchainjs/proto/cosmos/params/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/params/v1beta1/query.proto deleted file mode 100644 index 3b1c9a76..00000000 --- a/examples/interchainjs/proto/cosmos/params/v1beta1/query.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/params/v1beta1/params.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; - -// Query defines the gRPC querier service. -service Query { - // Params queries a specific parameter of a module, given its subspace and - // key. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/params"; - } - - // Subspaces queries for all registered subspaces and all keys for a subspace. - rpc Subspaces(QuerySubspacesRequest) returns (QuerySubspacesResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/subspaces"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest { - // subspace defines the module to query the parameter for. - string subspace = 1; - - // key defines the key of the parameter in the subspace. - string key = 2; -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // param defines the queried parameter. - ParamChange param = 1 [(gogoproto.nullable) = false]; -} - -// QuerySubspacesRequest defines a request type for querying for all registered -// subspaces and all keys for a subspace. -message QuerySubspacesRequest {} - -// QuerySubspacesResponse defines the response types for querying for all -// registered subspaces and all keys for a subspace. -message QuerySubspacesResponse { - repeated Subspace subspaces = 1; -} - -// Subspace defines a parameter subspace name and all the keys that exist for -// the subspace. -message Subspace { - string subspace = 1; - repeated string keys = 2; -} diff --git a/examples/interchainjs/proto/cosmos/slashing/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/slashing/v1beta1/genesis.proto deleted file mode 100644 index 312d56aa..00000000 --- a/examples/interchainjs/proto/cosmos/slashing/v1beta1/genesis.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; -import "cosmos_proto/cosmos.proto"; - -// GenesisState defines the slashing module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // signing_infos represents a map between validator addresses and their - // signing infos. - repeated SigningInfo signing_infos = 2 [(gogoproto.nullable) = false]; - - // missed_blocks represents a map between validator addresses and their - // missed blocks. - repeated ValidatorMissedBlocks missed_blocks = 3 [(gogoproto.nullable) = false]; -} - -// SigningInfo stores validator signing info of corresponding address. -message SigningInfo { - // address is the validator address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 [(gogoproto.nullable) = false]; -} - -// ValidatorMissedBlocks contains array of missed blocks of corresponding -// address. -message ValidatorMissedBlocks { - // address is the validator address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // missed_blocks is an array of missed blocks by the validator. - repeated MissedBlock missed_blocks = 2 [(gogoproto.nullable) = false]; -} - -// MissedBlock contains height and missed status as boolean. -message MissedBlock { - // index is the height at which the block was missed. - int64 index = 1; - // missed is the missed status. - bool missed = 2; -} diff --git a/examples/interchainjs/proto/cosmos/slashing/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/slashing/v1beta1/query.proto deleted file mode 100644 index f742c1f8..00000000 --- a/examples/interchainjs/proto/cosmos/slashing/v1beta1/query.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -// Query provides defines the gRPC querier service -service Query { - // Params queries the parameters of slashing module - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/params"; - } - - // SigningInfo queries the signing info of given cons address - rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}"; - } - - // SigningInfos queries signing info of all validators - rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -// method -message QuerySigningInfoRequest { - // cons_address is the address to query signing info of - string cons_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -message QuerySigningInfoResponse { - // val_signing_info is the signing info of requested val cons address - ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false]; -} - -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -// method -message QuerySigningInfosRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -message QuerySigningInfosResponse { - // info is the signing info of all validators - repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmos/slashing/v1beta1/slashing.proto b/examples/interchainjs/proto/cosmos/slashing/v1beta1/slashing.proto deleted file mode 100644 index 0aa9f61f..00000000 --- a/examples/interchainjs/proto/cosmos/slashing/v1beta1/slashing.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; - -// ValidatorSigningInfo defines a validator's signing info for monitoring their -// liveness activity. -message ValidatorSigningInfo { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Height at which validator was first a candidate OR was unjailed - int64 start_height = 2; - // Index which is incremented each time the validator was a bonded - // in a block and may have signed a precommit or not. This in conjunction with the - // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - int64 index_offset = 3; - // Timestamp until which the validator is jailed due to liveness downtime. - google.protobuf.Timestamp jailed_until = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Whether or not a validator has been tombstoned (killed out of validator set). It is set - // once the validator commits an equivocation or for any other configured misbehiavor. - bool tombstoned = 5; - // A counter kept to avoid unnecessary array reads. - // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - int64 missed_blocks_counter = 6; -} - -// Params represents the parameters used for by the slashing module. -message Params { - int64 signed_blocks_window = 1; - bytes min_signed_per_window = 2 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - google.protobuf.Duration downtime_jail_duration = 3 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - bytes slash_fraction_double_sign = 4 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - bytes slash_fraction_downtime = 5 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/slashing/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/slashing/v1beta1/tx.proto deleted file mode 100644 index 7c90304b..00000000 --- a/examples/interchainjs/proto/cosmos/slashing/v1beta1/tx.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -// Msg defines the slashing Msg service. -service Msg { - // Unjail defines a method for unjailing a jailed validator, thus returning - // them into the bonded validator set, so they can begin receiving provisions - // and rewards again. - rpc Unjail(MsgUnjail) returns (MsgUnjailResponse); -} - -// MsgUnjail defines the Msg/Unjail request type -message MsgUnjail { - option (cosmos.msg.v1.signer) = "validator_addr"; - - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "address"]; -} - -// MsgUnjailResponse defines the Msg/Unjail response type -message MsgUnjailResponse {} diff --git a/examples/interchainjs/proto/cosmos/staking/v1beta1/authz.proto b/examples/interchainjs/proto/cosmos/staking/v1beta1/authz.proto deleted file mode 100644 index 677edaad..00000000 --- a/examples/interchainjs/proto/cosmos/staking/v1beta1/authz.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -// -// Since: cosmos-sdk 0.43 -message StakeAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - // empty, there is no spend limit and any amount of coins can be delegated. - cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; - // validators is the oneof that represents either allow_list or deny_list - oneof validators { - // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - // account. - Validators allow_list = 2; - // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - Validators deny_list = 3; - } - // Validators defines list of validator addresses. - message Validators { - repeated string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - } - // authorization_type defines one of AuthorizationType. - AuthorizationType authorization_type = 4; -} - -// AuthorizationType defines the type of staking module authorization type -// -// Since: cosmos-sdk 0.43 -enum AuthorizationType { - // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - AUTHORIZATION_TYPE_UNSPECIFIED = 0; - // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - AUTHORIZATION_TYPE_DELEGATE = 1; - // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - AUTHORIZATION_TYPE_UNDELEGATE = 2; - // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - AUTHORIZATION_TYPE_REDELEGATE = 3; -} diff --git a/examples/interchainjs/proto/cosmos/staking/v1beta1/genesis.proto b/examples/interchainjs/proto/cosmos/staking/v1beta1/genesis.proto deleted file mode 100644 index bf3c298e..00000000 --- a/examples/interchainjs/proto/cosmos/staking/v1beta1/genesis.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/staking/v1beta1/staking.proto"; -import "cosmos_proto/cosmos.proto"; - -// GenesisState defines the staking module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - bytes last_total_power = 2 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - repeated LastValidatorPower last_validator_powers = 3 [(gogoproto.nullable) = false]; - - // delegations defines the validator set at genesis. - repeated Validator validators = 4 [(gogoproto.nullable) = false]; - - // delegations defines the delegations active at genesis. - repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; - - // unbonding_delegations defines the unbonding delegations active at genesis. - repeated UnbondingDelegation unbonding_delegations = 6 [(gogoproto.nullable) = false]; - - // redelegations defines the redelegations active at genesis. - repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; - - bool exported = 8; -} - -// LastValidatorPower required for validator set update logic. -message LastValidatorPower { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the validator. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // power defines the power of the validator. - int64 power = 2; -} diff --git a/examples/interchainjs/proto/cosmos/staking/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/staking/v1beta1/query.proto deleted file mode 100644 index 02469232..00000000 --- a/examples/interchainjs/proto/cosmos/staking/v1beta1/query.proto +++ /dev/null @@ -1,349 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/staking/v1beta1/staking.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Query defines the gRPC querier service. -service Query { - // Validators queries all validators that match the given status. - rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; - } - - // Validator queries validator info for given validator address. - rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; - } - - // ValidatorDelegations queries delegate info for given validator. - rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; - } - - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) - returns (QueryValidatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" - "{validator_addr}/unbonding_delegations"; - } - - // Delegation queries delegate info for given validator delegator pair. - rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}"; - } - - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}/unbonding_delegation"; - } - - // DelegatorDelegations queries all delegations of a given delegator address. - rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; - } - - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) - returns (QueryDelegatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" - "{delegator_addr}/unbonding_delegations"; - } - - // Redelegations queries redelegations of given address. - rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; - } - - // DelegatorValidators queries all validators info for given delegator - // address. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; - } - - // DelegatorValidator queries validator info for given delegator validator - // pair. - rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" - "{validator_addr}"; - } - - // HistoricalInfo queries the historical info for given height. - rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; - } - - // Pool queries the pool info. - rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; - } - - // Parameters queries the staking parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/params"; - } -} - -// QueryValidatorsRequest is request type for Query/Validators RPC method. -message QueryValidatorsRequest { - // status enables to query for validators matching a given status. - string status = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -message QueryValidatorsResponse { - // validators contains all the queried validators. - repeated Validator validators = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorRequest is response type for the Query/Validator RPC method -message QueryValidatorRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -message QueryValidatorResponse { - // validator defines the the validator info. - Validator validator = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorDelegationsRequest is request type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsResponse { - repeated DelegationResponse delegation_responses = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorUnbondingDelegationsRequest is required type for the -// Query/ValidatorUnbondingDelegations RPC method -message QueryValidatorUnbondingDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -message QueryValidatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRequest is request type for the Query/Delegation RPC method. -message QueryDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -message QueryDelegationResponse { - // delegation_responses defines the delegation info of a delegation. - DelegationResponse delegation_response = 1; -} - -// QueryUnbondingDelegationRequest is request type for the -// Query/UnbondingDelegation RPC method. -message QueryUnbondingDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -message QueryUnbondingDelegationResponse { - // unbond defines the unbonding information of a delegation. - UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false]; -} - -// QueryDelegatorDelegationsRequest is request type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsResponse { - // delegation_responses defines all the delegations' info of a delegator. - repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorUnbondingDelegationsRequest is request type for the -// Query/DelegatorUnbondingDelegations RPC method. -message QueryDelegatorUnbondingDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -message QueryDelegatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -// method. -message QueryRedelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // src_validator_addr defines the validator address to redelegate from. - string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // dst_validator_addr defines the validator address to redelegate to. - string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -message QueryRedelegationsResponse { - repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorsRequest is request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. - repeated Validator validators = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorRequest is request type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorResponse { - // validator defines the the validator info. - Validator validator = 1 [(gogoproto.nullable) = false]; -} - -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoRequest { - // height defines at which height to query the historical info. - int64 height = 1; -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoResponse { - // hist defines the historical info at the given height. - HistoricalInfo hist = 1; -} - -// QueryPoolRequest is request type for the Query/Pool RPC method. -message QueryPoolRequest {} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -message QueryPoolResponse { - // pool defines the pool info. - Pool pool = 1 [(gogoproto.nullable) = false]; -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/cosmos/staking/v1beta1/staking.proto b/examples/interchainjs/proto/cosmos/staking/v1beta1/staking.proto deleted file mode 100644 index dcf2645f..00000000 --- a/examples/interchainjs/proto/cosmos/staking/v1beta1/staking.proto +++ /dev/null @@ -1,358 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "tendermint/types/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// HistoricalInfo contains header and validator information for a given block. -// It is stored as part of staking module's state, which persists the `n` most -// recent HistoricalInfo -// (`n` is set by the staking module's `historical_entries` parameter). -message HistoricalInfo { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - repeated Validator valset = 2 [(gogoproto.nullable) = false]; -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -message CommissionRates { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // rate is the commission rate charged to delegators, as a fraction. - string rate = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - string max_rate = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - string max_change_rate = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Commission defines commission parameters for a given validator. -message Commission { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // commission_rates defines the initial commission rates to be used for creating a validator. - CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - // update_time is the last time the commission rate was changed. - google.protobuf.Timestamp update_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// Description defines a validator description. -message Description { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // moniker defines a human-readable name for the validator. - string moniker = 1; - // identity defines an optional identity signature (ex. UPort or Keybase). - string identity = 2; - // website defines an optional website link. - string website = 3; - // security_contact defines an optional email for security contact. - string security_contact = 4; - // details define other optional details. - string details = 5; -} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -message Validator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - google.protobuf.Any consensus_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - // jailed defined whether the validator has been jailed from bonded status or not. - bool jailed = 3; - // status is the validator status (bonded/unbonding/unbonded). - BondStatus status = 4; - // tokens define the delegated tokens (incl. self-delegation). - string tokens = 5 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // delegator_shares defines total shares issued to a validator's delegators. - string delegator_shares = 6 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // description defines the description terms for the validator. - Description description = 7 [(gogoproto.nullable) = false]; - // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - int64 unbonding_height = 8; - // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - google.protobuf.Timestamp unbonding_time = 9 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // commission defines the commission parameters. - Commission commission = 10 [(gogoproto.nullable) = false]; - // min_self_delegation is the validator's self declared minimum self delegation. - string min_self_delegation = 11 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// BondStatus is the status of a validator. -enum BondStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // UNSPECIFIED defines an invalid validator status. - BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"]; - // UNBONDED defines a validator that is not bonded. - BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"]; - // UNBONDING defines a validator that is unbonding. - BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"]; - // BONDED defines a validator that is bonded. - BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"]; -} - -// ValAddresses defines a repeated set of validator addresses. -message ValAddresses { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = true; - - repeated string addresses = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// DVPair is struct that just has a delegator-validator pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a DVPair can -// be used to construct the key to getting an UnbondingDelegation from state. -message DVPair { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// DVPairs defines an array of DVPair objects. -message DVPairs { - repeated DVPair pairs = 1 [(gogoproto.nullable) = false]; -} - -// DVVTriplet is struct that just has a delegator-validator-validator triplet -// with no other data. It is intended to be used as a marshalable pointer. For -// example, a DVVTriplet can be used to construct the key to getting a -// Redelegation from state. -message DVVTriplet { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// DVVTriplets defines an array of DVVTriplet objects. -message DVVTriplets { - repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false]; -} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -message Delegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // shares define the delegation shares received. - string shares = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -message UnbondingDelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // entries are the unbonding delegation entries. - repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries -} - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -message UnbondingDelegationEntry { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // creation_height is the height which the unbonding took place. - int64 creation_height = 1; - // completion_time is the unix time for unbonding completion. - google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // initial_balance defines the tokens initially scheduled to receive at completion. - string initial_balance = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // balance defines the tokens to receive at completion. - string balance = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// RedelegationEntry defines a redelegation object with relevant metadata. -message RedelegationEntry { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // creation_height defines the height which the redelegation took place. - int64 creation_height = 1; - // completion_time defines the unix time for redelegation completion. - google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // initial_balance defines the initial balance when redelegation started. - string initial_balance = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // shares_dst is the amount of destination-validator shares created by redelegation. - string shares_dst = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -message Redelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // entries are the redelegation entries. - repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries -} - -// Params defines the parameters for the staking module. -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // unbonding_time is the time duration of unbonding. - google.protobuf.Duration unbonding_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - // max_validators is the maximum number of validators. - uint32 max_validators = 2; - // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - uint32 max_entries = 3; - // historical_entries is the number of historical entries to persist. - uint32 historical_entries = 4; - // bond_denom defines the bondable coin denomination. - string bond_denom = 5; - // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - string min_commission_rate = 6 [ - (gogoproto.moretags) = "yaml:\"min_commission_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -message DelegationResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - - Delegation delegation = 1 [(gogoproto.nullable) = false]; - - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; -} - -// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -// contains a balance in addition to shares which is more suitable for client -// responses. -message RedelegationEntryResponse { - option (gogoproto.equal) = true; - - RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; - string balance = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// RedelegationResponse is equivalent to a Redelegation except that its entries -// contain a balance in addition to shares which is more suitable for client -// responses. -message RedelegationResponse { - option (gogoproto.equal) = false; - - Redelegation redelegation = 1 [(gogoproto.nullable) = false]; - repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -message Pool { - option (gogoproto.description) = true; - option (gogoproto.equal) = true; - string not_bonded_tokens = 1 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "not_bonded_tokens" - ]; - string bonded_tokens = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "bonded_tokens" - ]; -} diff --git a/examples/interchainjs/proto/cosmos/staking/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/staking/v1beta1/tx.proto deleted file mode 100644 index 6c8d40a7..00000000 --- a/examples/interchainjs/proto/cosmos/staking/v1beta1/tx.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Msg defines the staking Msg service. -service Msg { - // CreateValidator defines a method for creating a new validator. - rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); - - // EditValidator defines a method for editing an existing validator. - rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse); - - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); - - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse); - - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); -} - -// MsgCreateValidator defines a SDK message for creating a new validator. -message MsgCreateValidator { - // NOTE(fdymylja): this is a particular case in which - // if validator_address == delegator_address then only one - // is expected to sign, otherwise both are. - option (cosmos.msg.v1.signer) = "delegator_address"; - option (cosmos.msg.v1.signer) = "validator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false]; - CommissionRates commission = 2 [(gogoproto.nullable) = false]; - string min_self_delegation = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string delegator_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; -} - -// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -message MsgCreateValidatorResponse {} - -// MsgEditValidator defines a SDK message for editing an existing validator. -message MsgEditValidator { - option (cosmos.msg.v1.signer) = "validator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // We pass a reference to the new commission rate and min self delegation as - // it's not mandatory to update. If not updated, the deserialized rate will be - // zero with no way to distinguish if an update was intended. - // REF: #2373 - string commission_rate = 3 - [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; - string min_self_delegation = 4 - [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; -} - -// MsgEditValidatorResponse defines the Msg/EditValidator response type. -message MsgEditValidatorResponse {} - -// MsgDelegate defines a SDK message for performing a delegation of coins -// from a delegator to a validator. -message MsgDelegate { - option (cosmos.msg.v1.signer) = "delegator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgDelegateResponse defines the Msg/Delegate response type. -message MsgDelegateResponse {} - -// MsgBeginRedelegate defines a SDK message for performing a redelegation -// of coins from a delegator and source validator to a destination validator. -message MsgBeginRedelegate { - option (cosmos.msg.v1.signer) = "delegator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; -} - -// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -message MsgBeginRedelegateResponse { - google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// MsgUndelegate defines a SDK message for performing an undelegation from a -// delegate and a validator. -message MsgUndelegate { - option (cosmos.msg.v1.signer) = "delegator_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgUndelegateResponse defines the Msg/Undelegate response type. -message MsgUndelegateResponse { - google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/examples/interchainjs/proto/cosmos/tx/signing/v1beta1/signing.proto b/examples/interchainjs/proto/cosmos/tx/signing/v1beta1/signing.proto deleted file mode 100644 index 5a22616f..00000000 --- a/examples/interchainjs/proto/cosmos/tx/signing/v1beta1/signing.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.signing.v1beta1; - -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; - -// SignMode represents a signing mode with its own security guarantees. -// -// This enum should be considered a registry of all known sign modes -// in the Cosmos ecosystem. Apps are not expected to support all known -// sign modes. Apps that would like to support custom sign modes are -// encouraged to open a small PR against this file to add a new case -// to this SignMode enum describing their sign mode so that different -// apps have a consistent version of this enum. -enum SignMode { - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - // rejected. - SIGN_MODE_UNSPECIFIED = 0; - - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - // verified with raw bytes from Tx. - SIGN_MODE_DIRECT = 1; - - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some - // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT. It is currently not supported. - SIGN_MODE_TEXTUAL = 2; - - // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses - // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. - // - // Since: cosmos-sdk 0.46 - SIGN_MODE_DIRECT_AUX = 3; - - // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future. - SIGN_MODE_LEGACY_AMINO_JSON = 127; -} - -// SignatureDescriptors wraps multiple SignatureDescriptor's. -message SignatureDescriptors { - // signatures are the signature descriptors - repeated SignatureDescriptor signatures = 1; -} - -// SignatureDescriptor is a convenience type which represents the full data for -// a signature including the public key of the signer, signing modes and the -// signature itself. It is primarily used for coordinating signatures between -// clients. -message SignatureDescriptor { - // public_key is the public key of the signer - google.protobuf.Any public_key = 1; - - Data data = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - uint64 sequence = 3; - - // Data represents signature data - message Data { - // sum is the oneof that specifies whether this represents single or multi-signature data - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a multisig signer - Multi multi = 2; - } - - // Single is the signature data for a single signer - message Single { - // mode is the signing mode of the single signer - SignMode mode = 1; - - // signature is the raw signature bytes - bytes signature = 2; - } - - // Multi is the signature data for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // signatures is the signatures of the multi-signature - repeated Data signatures = 2; - } - } -} diff --git a/examples/interchainjs/proto/cosmos/tx/v1beta1/service.proto b/examples/interchainjs/proto/cosmos/tx/v1beta1/service.proto deleted file mode 100644 index e7af1526..00000000 --- a/examples/interchainjs/proto/cosmos/tx/v1beta1/service.proto +++ /dev/null @@ -1,163 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/tx/v1beta1/tx.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Service defines a gRPC service for interacting with transactions. -service Service { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/simulate" - body: "*" - }; - } - // GetTx fetches a tx by hash. - rpc GetTx(GetTxRequest) returns (GetTxResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}"; - } - // BroadcastTx broadcast transaction. - rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/txs" - body: "*" - }; - } - // GetTxsEvent fetches txs by event. - rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; - } - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: cosmos-sdk 0.45.2 - rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}"; - } -} - -// GetTxsEventRequest is the request type for the Service.TxsByEvents -// RPC method. -message GetTxsEventRequest { - // events is the list of transaction event type. - repeated string events = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; - OrderBy order_by = 3; -} - -// OrderBy defines the sorting order -enum OrderBy { - // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_UNSPECIFIED = 0; - // ORDER_BY_ASC defines ascending order - ORDER_BY_ASC = 1; - // ORDER_BY_DESC defines descending order - ORDER_BY_DESC = 2; -} - -// GetTxsEventResponse is the response type for the Service.TxsByEvents -// RPC method. -message GetTxsEventResponse { - // txs is the list of queried transactions. - repeated cosmos.tx.v1beta1.Tx txs = 1; - // tx_responses is the list of queried TxResponses. - repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -// RPC method. -message BroadcastTxRequest { - // tx_bytes is the raw transaction. - bytes tx_bytes = 1; - BroadcastMode mode = 2; -} - -// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. -enum BroadcastMode { - // zero-value for mode ordering - BROADCAST_MODE_UNSPECIFIED = 0; - // BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - // the tx to be committed in a block. - BROADCAST_MODE_BLOCK = 1; - // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - // a CheckTx execution response only. - BROADCAST_MODE_SYNC = 2; - // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - // immediately. - BROADCAST_MODE_ASYNC = 3; -} - -// BroadcastTxResponse is the response type for the -// Service.BroadcastTx method. -message BroadcastTxResponse { - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 1; -} - -// SimulateRequest is the request type for the Service.Simulate -// RPC method. -message SimulateRequest { - // tx is the transaction to simulate. - // Deprecated. Send raw tx bytes instead. - cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; - // tx_bytes is the raw transaction. - // - // Since: cosmos-sdk 0.43 - bytes tx_bytes = 2; -} - -// SimulateResponse is the response type for the -// Service.SimulateRPC method. -message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; -} - -// GetTxRequest is the request type for the Service.GetTx -// RPC method. -message GetTxRequest { - // hash is the tx hash to query, encoded as a hex string. - string hash = 1; -} - -// GetTxResponse is the response type for the Service.GetTx method. -message GetTxResponse { - // tx is the queried transaction. - cosmos.tx.v1beta1.Tx tx = 1; - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 2; -} - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsRequest { - // height is the height of the block to query. - int64 height = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsResponse { - // txs are the transactions in the block. - repeated cosmos.tx.v1beta1.Tx txs = 1; - .tendermint.types.BlockID block_id = 2; - .tendermint.types.Block block = 3; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 4; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/tx/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/tx/v1beta1/tx.proto deleted file mode 100644 index ac7b690f..00000000 --- a/examples/interchainjs/proto/cosmos/tx/v1beta1/tx.proto +++ /dev/null @@ -1,249 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/tx/signing/v1beta1/signing.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Tx is the standard type used for broadcasting transactions. -message Tx { - // body is the processable content of the transaction - TxBody body = 1; - - // auth_info is the authorization related content of the transaction, - // specifically signers, signer modes and fee - AuthInfo auth_info = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// TxRaw is a variant of Tx that pins the signer's exact binary representation -// of body and auth_info. This is used for signing, broadcasting and -// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and -// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used -// as the transaction ID. -message TxRaw { - // body_bytes is a protobuf serialization of a TxBody that matches the - // representation in SignDoc. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in SignDoc. - bytes auth_info_bytes = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -message SignDoc { - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in TxRaw. - bytes auth_info_bytes = 2; - - // chain_id is the unique identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker - string chain_id = 3; - - // account_number is the account number of the account in state - uint64 account_number = 4; -} - -// SignDocDirectAux is the type used for generating sign bytes for -// SIGN_MODE_DIRECT_AUX. -// -// Since: cosmos-sdk 0.46 -message SignDocDirectAux { - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - bytes body_bytes = 1; - - // public_key is the public key of the signing account. - google.protobuf.Any public_key = 2; - - // chain_id is the identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker. - string chain_id = 3; - - // account_number is the account number of the account in state. - uint64 account_number = 4; - - // sequence is the sequence number of the signing account. - uint64 sequence = 5; - - // Tip is the optional tip used for meta-transactions. It should be left - // empty if the signer is not the tipper for this transaction. - Tip tip = 6; -} - -// TxBody is the body of a transaction that all signers sign over. -message TxBody { - // messages is a list of messages to be executed. The required signers of - // those messages define the number and order of elements in AuthInfo's - // signer_infos and Tx's signatures. Each required signer address is added to - // the list only the first time it occurs. - // By convention, the first required signer (usually from the first message) - // is referred to as the primary signer and pays the fee for the whole - // transaction. - repeated google.protobuf.Any messages = 1; - - // memo is any arbitrary note/comment to be added to the transaction. - // WARNING: in clients, any publicly exposed text should not be called memo, - // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - string memo = 2; - - // timeout is the block height after which this transaction will not - // be processed by the chain - uint64 timeout_height = 3; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, the transaction will be rejected - repeated google.protobuf.Any extension_options = 1023; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, they will be ignored - repeated google.protobuf.Any non_critical_extension_options = 2047; -} - -// AuthInfo describes the fee and signer modes that are used to sign a -// transaction. -message AuthInfo { - // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's - // messages. The first element is the primary signer and the one which pays - // the fee. - repeated SignerInfo signer_infos = 1; - - // Fee is the fee and gas limit for the transaction. The first signer is the - // primary signer and the one which pays the fee. The fee can be calculated - // based on the cost of evaluating the body and doing signature verification - // of the signers. This can be estimated via simulation. - Fee fee = 2; - - // Tip is the optional tip used for meta-transactions. - // - // Since: cosmos-sdk 0.46 - Tip tip = 3; -} - -// SignerInfo describes the public key and signing mode of a single top-level -// signer. -message SignerInfo { - // public_key is the public key of the signer. It is optional for accounts - // that already exist in state. If unset, the verifier can use the required \ - // signer address for this position and lookup the public key. - google.protobuf.Any public_key = 1; - - // mode_info describes the signing mode of the signer and is a nested - // structure to support nested multisig pubkey's - ModeInfo mode_info = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to - // prevent replay attacks. - uint64 sequence = 3; -} - -// ModeInfo describes the signing mode of a single or nested multisig signer. -message ModeInfo { - // sum is the oneof that specifies whether this represents a single or nested - // multisig signer - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a nested multisig signer - Multi multi = 2; - } - - // Single is the mode info for a single signer. It is structured as a message - // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - // future - message Single { - // mode is the signing mode of the single signer - cosmos.tx.signing.v1beta1.SignMode mode = 1; - } - - // Multi is the mode info for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // mode_infos is the corresponding modes of the signers of the multisig - // which could include nested multisig public keys - repeated ModeInfo mode_infos = 2; - } -} - -// Fee includes the amount of coins paid in fees and the maximum -// gas to be used by the transaction. The ratio yields an effective "gasprice", -// which must be above some miminum to be accepted into the mempool. -message Fee { - // amount is the amount of coins to be paid as a fee - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // gas_limit is the maximum gas that can be used in transaction processing - // before an out of gas error occurs - uint64 gas_limit = 2; - - // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - // the payer must be a tx signer (and thus have signed this field in AuthInfo). - // setting this field does *not* change the ordering of required signers for the transaction. - string payer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - // not support fee grants, this will fail - string granter = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// Tip is the tip used for meta-transactions. -// -// Since: cosmos-sdk 0.46 -message Tip { - // amount is the amount of the tip - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // tipper is the address of the account paying for the tip - string tipper = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// AuxSignerData is the intermediary format that an auxiliary signer (e.g. a -// tipper) builds and sends to the fee payer (who will build and broadcast the -// actual tx). AuxSignerData is not a valid tx in itself, and will be rejected -// by the node if sent directly as-is. -// -// Since: cosmos-sdk 0.46 -message AuxSignerData { - // address is the bech32-encoded address of the auxiliary signer. If using - // AuxSignerData across different chains, the bech32 prefix of the target - // chain (where the final transaction is broadcasted) should be used. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // sign_doc is the SIGN_MOD_DIRECT_AUX sign doc that the auxiliary signer - // signs. Note: we use the same sign doc even if we're signing with - // LEGACY_AMINO_JSON. - SignDocDirectAux sign_doc = 2; - // mode is the signing mode of the single signer - cosmos.tx.signing.v1beta1.SignMode mode = 3; - // sig is the signature of the sign doc. - bytes sig = 4; -} diff --git a/examples/interchainjs/proto/cosmos/upgrade/v1beta1/query.proto b/examples/interchainjs/proto/cosmos/upgrade/v1beta1/query.proto deleted file mode 100644 index e8c4baa0..00000000 --- a/examples/interchainjs/proto/cosmos/upgrade/v1beta1/query.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; - -// Query defines the gRPC upgrade querier service. -service Query { - // CurrentPlan queries the current upgrade plan. - rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; - } - - // AppliedPlan queries a previously applied upgrade plan by its name. - rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; - } - - // UpgradedConsensusState queries the consensus state that will serve - // as a trusted kernel for the next version of this chain. It will only be - // stored at the last height of this chain. - // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement - // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option deprecated = true; - option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; - } - - // ModuleVersions queries the list of module versions from state. - // - // Since: cosmos-sdk 0.43 - rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; - } - - // Returns the account with authority to conduct upgrades - rpc Authority(QueryAuthorityRequest) returns (QueryAuthorityResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/authority"; - } -} - -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanRequest {} - -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanResponse { - // plan is the current upgrade plan. - Plan plan = 1; -} - -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanRequest { - // name is the name of the applied plan to query for. - string name = 1; -} - -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanResponse { - // height is the block height at which the plan was applied. - int64 height = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateRequest { - option deprecated = true; - - // last height of the current chain must be sent in request - // as this is the height under which next consensus state is stored - int64 last_height = 1; -} - -// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateResponse { - option deprecated = true; - reserved 1; - - // Since: cosmos-sdk 0.43 - bytes upgraded_consensus_state = 2; -} - -// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsRequest { - // module_name is a field to query a specific module - // consensus version from state. Leaving this empty will - // fetch the full list of module versions from state - string module_name = 1; -} - -// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsResponse { - // module_versions is a list of module names with their consensus versions. - repeated ModuleVersion module_versions = 1; -} - -// QueryAuthorityRequest is the request type for Query/Authority -// -// Since: cosmos-sdk 0.46 -message QueryAuthorityRequest {} - -// QueryAuthorityResponse is the response type for Query/Authority -// -// Since: cosmos-sdk 0.46 -message QueryAuthorityResponse { - string address = 1; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/upgrade/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/upgrade/v1beta1/tx.proto deleted file mode 100644 index 9b04bf44..00000000 --- a/examples/interchainjs/proto/cosmos/upgrade/v1beta1/tx.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; - -// Msg defines the upgrade Msg service. -service Msg { - // SoftwareUpgrade is a governance operation for initiating a software upgrade. - // - // Since: cosmos-sdk 0.46 - rpc SoftwareUpgrade(MsgSoftwareUpgrade) returns (MsgSoftwareUpgradeResponse); - // CancelUpgrade is a governance operation for cancelling a previously - // approvid software upgrade. - // - // Since: cosmos-sdk 0.46 - rpc CancelUpgrade(MsgCancelUpgrade) returns (MsgCancelUpgradeResponse); -} - -// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -// -// Since: cosmos-sdk 0.46 -message MsgSoftwareUpgrade { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // plan is the upgrade plan. - Plan plan = 2 [(gogoproto.nullable) = false]; -} - -// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -// -// Since: cosmos-sdk 0.46 -message MsgSoftwareUpgradeResponse {} - -// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -// -// Since: cosmos-sdk 0.46 -message MsgCancelUpgrade { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -// -// Since: cosmos-sdk 0.46 -message MsgCancelUpgradeResponse {} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos/upgrade/v1beta1/upgrade.proto b/examples/interchainjs/proto/cosmos/upgrade/v1beta1/upgrade.proto deleted file mode 100644 index dc15e27c..00000000 --- a/examples/interchainjs/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; -option (gogoproto.goproto_getters_all) = false; - -// Plan specifies information about a planned upgrade and when it should occur. -message Plan { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // Sets the name for the upgrade. This name will be used by the upgraded - // version of the software to apply any special "on-upgrade" commands during - // the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no - // upgrade handler with this name has been set in the software, it will be - // assumed that the software is out-of-date when the upgrade Time or Height is - // reached and the software will exit. - string name = 1; - - // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - // has been removed from the SDK. - // If this field is not empty, an error will be thrown. - google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - // The height at which the upgrade must be performed. - // Only used if Time is not set. - int64 height = 3; - - // Any application specific upgrade info to be included on-chain - // such as a git commit that validators could automatically upgrade to - string info = 4; - - // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - // moved to the IBC module in the sub module 02-client. - // If this field is not empty, an error will be thrown. - google.protobuf.Any upgraded_client_state = 5 [deprecated = true]; -} - -// SoftwareUpgradeProposal is a gov Content type for initiating a software -// upgrade. -// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -// proposals, see MsgSoftwareUpgrade. -message SoftwareUpgradeProposal { - option deprecated = true; - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - Plan plan = 3 [(gogoproto.nullable) = false]; -} - -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -// upgrade. -// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -// proposals, see MsgCancelUpgrade. -message CancelSoftwareUpgradeProposal { - option deprecated = true; - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; -} - -// ModuleVersion specifies a module and its consensus version. -// -// Since: cosmos-sdk 0.43 -message ModuleVersion { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // name of the app module - string name = 1; - - // consensus version of the app module - uint64 version = 2; -} diff --git a/examples/interchainjs/proto/cosmos/vesting/v1beta1/tx.proto b/examples/interchainjs/proto/cosmos/vesting/v1beta1/tx.proto deleted file mode 100644 index 211bad09..00000000 --- a/examples/interchainjs/proto/cosmos/vesting/v1beta1/tx.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/vesting/v1beta1/vesting.proto"; - -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// Msg defines the bank Msg service. -service Msg { - // CreateVestingAccount defines a method that enables creating a vesting - // account. - rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); - // CreatePermanentLockedAccount defines a method that enables creating a permanent - // locked account. - rpc CreatePermanentLockedAccount(MsgCreatePermanentLockedAccount) returns (MsgCreatePermanentLockedAccountResponse); - // CreatePeriodicVestingAccount defines a method that enables creating a - // periodic vesting account. - rpc CreatePeriodicVestingAccount(MsgCreatePeriodicVestingAccount) returns (MsgCreatePeriodicVestingAccountResponse); -} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -message MsgCreateVestingAccount { - option (cosmos.msg.v1.signer) = "from_address"; - - option (gogoproto.equal) = true; - - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - int64 end_time = 4; - bool delayed = 5; -} - -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -message MsgCreateVestingAccountResponse {} - -// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent -// locked account. -message MsgCreatePermanentLockedAccount { - option (gogoproto.equal) = true; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. -message MsgCreatePermanentLockedAccountResponse {} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -message MsgCreatePeriodicVestingAccount { - option (cosmos.msg.v1.signer) = "from_address"; - - option (gogoproto.equal) = false; - - string from_address = 1; - string to_address = 2; - int64 start_time = 3; - repeated Period vesting_periods = 4 [(gogoproto.nullable) = false]; -} - -// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount -// response type. -message MsgCreatePeriodicVestingAccountResponse {} diff --git a/examples/interchainjs/proto/cosmos/vesting/v1beta1/vesting.proto b/examples/interchainjs/proto/cosmos/vesting/v1beta1/vesting.proto deleted file mode 100644 index 824cc30d..00000000 --- a/examples/interchainjs/proto/cosmos/vesting/v1beta1/vesting.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// BaseVestingAccount implements the VestingAccount interface. It contains all -// the necessary fields needed for any vesting account implementation. -message BaseVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; - repeated cosmos.base.v1beta1.Coin original_vesting = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin delegated_free = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - int64 end_time = 5; -} - -// ContinuousVestingAccount implements the VestingAccount interface. It -// continuously vests by unlocking coins linearly with respect to time. -message ContinuousVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2; -} - -// DelayedVestingAccount implements the VestingAccount interface. It vests all -// coins after a specific time, but non prior. In other words, it keeps them -// locked until a specified time. -message DelayedVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} - -// Period defines a length of time and amount of coins that will vest. -message Period { - option (gogoproto.goproto_stringer) = false; - - int64 length = 1; - repeated cosmos.base.v1beta1.Coin amount = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// PeriodicVestingAccount implements the VestingAccount interface. It -// periodically vests by unlocking coins during each specified period. -message PeriodicVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2; - repeated Period vesting_periods = 3 [(gogoproto.nullable) = false]; -} - -// PermanentLockedAccount implements the VestingAccount interface. It does -// not ever release coins, locking them indefinitely. Coins in this account can -// still be used for delegating and for governance votes even while locked. -// -// Since: cosmos-sdk 0.43 -message PermanentLockedAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} diff --git a/examples/interchainjs/proto/cosmos_proto/LICENSE b/examples/interchainjs/proto/cosmos_proto/LICENSE deleted file mode 100644 index 6b3e3508..00000000 --- a/examples/interchainjs/proto/cosmos_proto/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Pulsar -License: Apache2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2021 Regen Network Development, Inc. & All in Bits, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos_proto/README.md b/examples/interchainjs/proto/cosmos_proto/README.md deleted file mode 100644 index 9599cc65..00000000 --- a/examples/interchainjs/proto/cosmos_proto/README.md +++ /dev/null @@ -1 +0,0 @@ -# cosmos_proto \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmos_proto/cosmos.proto b/examples/interchainjs/proto/cosmos_proto/cosmos.proto deleted file mode 100644 index 5c63b86f..00000000 --- a/examples/interchainjs/proto/cosmos_proto/cosmos.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; -package cosmos_proto; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto"; - -extend google.protobuf.MessageOptions { - - // implements_interface is used to indicate the type name of the interface - // that a message implements so that it can be used in google.protobuf.Any - // fields that accept that interface. A message can implement multiple - // interfaces. Interfaces should be declared using a declare_interface - // file option. - repeated string implements_interface = 93001; -} - -extend google.protobuf.FieldOptions { - - // accepts_interface is used to annotate that a google.protobuf.Any - // field accepts messages that implement the specified interface. - // Interfaces should be declared using a declare_interface file option. - string accepts_interface = 93001; - - // scalar is used to indicate that this field follows the formatting defined - // by the named scalar which should be declared with declare_scalar. Code - // generators may choose to use this information to map this field to a - // language-specific type representing the scalar. - string scalar = 93002; -} - -extend google.protobuf.FileOptions { - - // declare_interface declares an interface type to be used with - // accepts_interface and implements_interface. Interface names are - // expected to follow the following convention such that their declaration - // can be discovered by tools: for a given interface type a.b.C, it is - // expected that the declaration will be found in a protobuf file named - // a/b/interfaces.proto in the file descriptor set. - repeated InterfaceDescriptor declare_interface = 793021; - - // declare_scalar declares a scalar type to be used with - // the scalar field option. Scalar names are - // expected to follow the following convention such that their declaration - // can be discovered by tools: for a given scalar type a.b.C, it is - // expected that the declaration will be found in a protobuf file named - // a/b/scalars.proto in the file descriptor set. - repeated ScalarDescriptor declare_scalar = 793022; -} - -// InterfaceDescriptor describes an interface type to be used with -// accepts_interface and implements_interface and declared by declare_interface. -message InterfaceDescriptor { - - // name is the name of the interface. It should be a short-name (without - // a period) such that the fully qualified name of the interface will be - // package.name, ex. for the package a.b and interface named C, the - // fully-qualified name will be a.b.C. - string name = 1; - - // description is a human-readable description of the interface and its - // purpose. - string description = 2; -} - -// ScalarDescriptor describes an scalar type to be used with -// the scalar field option and declared by declare_scalar. -// Scalars extend simple protobuf built-in types with additional -// syntax and semantics, for instance to represent big integers. -// Scalars should ideally define an encoding such that there is only one -// valid syntactical representation for a given semantic meaning, -// i.e. the encoding should be deterministic. -message ScalarDescriptor { - - // name is the name of the scalar. It should be a short-name (without - // a period) such that the fully qualified name of the scalar will be - // package.name, ex. for the package a.b and scalar named C, the - // fully-qualified name will be a.b.C. - string name = 1; - - // description is a human-readable description of the scalar and its - // encoding format. For instance a big integer or decimal scalar should - // specify precisely the expected encoding format. - string description = 2; - - // field_type is the type of field with which this scalar can be used. - // Scalars can be used with one and only one type of field so that - // encoding standards and simple and clear. Currently only string and - // bytes fields are supported for scalars. - repeated ScalarType field_type = 3; -} - -enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0; - SCALAR_TYPE_STRING = 1; - SCALAR_TYPE_BYTES = 2; -} diff --git a/examples/interchainjs/proto/cosmwasm/LICENSE b/examples/interchainjs/proto/cosmwasm/LICENSE deleted file mode 100644 index 5a23302b..00000000 --- a/examples/interchainjs/proto/cosmwasm/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Cosmos-SDK -License: Apache2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 All in Bits, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmwasm/README.md b/examples/interchainjs/proto/cosmwasm/README.md deleted file mode 100644 index 63192e81..00000000 --- a/examples/interchainjs/proto/cosmwasm/README.md +++ /dev/null @@ -1 +0,0 @@ -# cosmwasm \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmwasm/wasm/v1/genesis.proto b/examples/interchainjs/proto/cosmwasm/wasm/v1/genesis.proto deleted file mode 100644 index f02f3307..00000000 --- a/examples/interchainjs/proto/cosmwasm/wasm/v1/genesis.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmwasm/wasm/v1/types.proto"; -import "cosmwasm/wasm/v1/tx.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; - -// GenesisState - genesis state of x/wasm -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - repeated Code codes = 2 - [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "codes,omitempty" ]; - repeated Contract contracts = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "contracts,omitempty" - ]; - repeated Sequence sequences = 4 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "sequences,omitempty" - ]; - repeated GenMsgs gen_msgs = 5 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "gen_msgs,omitempty" - ]; - - // GenMsgs define the messages that can be executed during genesis phase in - // order. The intention is to have more human readable data that is auditable. - message GenMsgs { - // sum is a single message - oneof sum { - MsgStoreCode store_code = 1; - MsgInstantiateContract instantiate_contract = 2; - MsgExecuteContract execute_contract = 3; - } - } -} - -// Code struct encompasses CodeInfo and CodeBytes -message Code { - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - CodeInfo code_info = 2 [ (gogoproto.nullable) = false ]; - bytes code_bytes = 3; - // Pinned to wasmvm cache - bool pinned = 4; -} - -// Contract struct encompasses ContractAddress, ContractInfo, and ContractState -message Contract { - string contract_address = 1; - ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ]; - repeated Model contract_state = 3 [ (gogoproto.nullable) = false ]; -} - -// Sequence key and value of an id generation counter -message Sequence { - bytes id_key = 1 [ (gogoproto.customname) = "IDKey" ]; - uint64 value = 2; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/cosmwasm/wasm/v1/ibc.proto b/examples/interchainjs/proto/cosmwasm/wasm/v1/ibc.proto deleted file mode 100644 index d880a707..00000000 --- a/examples/interchainjs/proto/cosmwasm/wasm/v1/ibc.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; - -// MsgIBCSend -message MsgIBCSend { - // the channel by which the packet will be sent - string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; - - // Timeout height relative to the current block height. - // The timeout is disabled when set to 0. - uint64 timeout_height = 4 - [ (gogoproto.moretags) = "yaml:\"timeout_height\"" ]; - // Timeout timestamp (in nanoseconds) relative to the current block timestamp. - // The timeout is disabled when set to 0. - uint64 timeout_timestamp = 5 - [ (gogoproto.moretags) = "yaml:\"timeout_timestamp\"" ]; - - // Data is the payload to transfer. We must not make assumption what format or - // content is in here. - bytes data = 6; -} - -// MsgIBCCloseChannel port and channel need to be owned by the contract -message MsgIBCCloseChannel { - string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; -} diff --git a/examples/interchainjs/proto/cosmwasm/wasm/v1/proposal.proto b/examples/interchainjs/proto/cosmwasm/wasm/v1/proposal.proto deleted file mode 100644 index 2f36f87f..00000000 --- a/examples/interchainjs/proto/cosmwasm/wasm/v1/proposal.proto +++ /dev/null @@ -1,150 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmwasm/wasm/v1/types.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = true; - -// StoreCodeProposal gov proposal content type to submit WASM code to the system -message StoreCodeProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // WASMByteCode can be raw or gzip compressed - bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; - // Used in v1beta1 - reserved 5, 6; - // InstantiatePermission to apply on contract creation, optional - AccessConfig instantiate_permission = 7; -} - -// InstantiateContractProposal gov proposal content type to instantiate a -// contract. -message InstantiateContractProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // Admin is an optional address that can execute migrations - string admin = 4; - // CodeID is the reference to the stored WASM code - uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; - // Label is optional metadata to be stored with a constract instance. - string label = 6; - // Msg json encoded message to be passed to the contract on instantiation - bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 8 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MigrateContractProposal gov proposal content type to migrate a contract. -message MigrateContractProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // Note: skipping 3 as this was previously used for unneeded run_as - - // Contract is the address of the smart contract - string contract = 4; - // CodeID references the new WASM codesudo - uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; - // Msg json encoded message to be passed to the contract on migration - bytes msg = 6 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// SudoContractProposal gov proposal content type to call sudo on a contract. -message SudoContractProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // Contract is the address of the smart contract - string contract = 3; - // Msg json encoded message to be passed to the contract as sudo - bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// ExecuteContractProposal gov proposal content type to call execute on a -// contract. -message ExecuteContractProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; - // Contract is the address of the smart contract - string contract = 4; - // Msg json encoded message to be passed to the contract as execute - bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// UpdateAdminProposal gov proposal content type to set an admin for a contract. -message UpdateAdminProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // NewAdmin address to be set - string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ]; - // Contract is the address of the smart contract - string contract = 4; -} - -// ClearAdminProposal gov proposal content type to clear the admin of a -// contract. -message ClearAdminProposal { - // Title is a short summary - string title = 1; - // Description is a human readable text - string description = 2; - // Contract is the address of the smart contract - string contract = 3; -} - -// PinCodesProposal gov proposal content type to pin a set of code ids in the -// wasmvm cache. -message PinCodesProposal { - // Title is a short summary - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - // Description is a human readable text - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - // CodeIDs references the new WASM codes - repeated uint64 code_ids = 3 [ - (gogoproto.customname) = "CodeIDs", - (gogoproto.moretags) = "yaml:\"code_ids\"" - ]; -} - -// UnpinCodesProposal gov proposal content type to unpin a set of code ids in -// the wasmvm cache. -message UnpinCodesProposal { - // Title is a short summary - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - // Description is a human readable text - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - // CodeIDs references the WASM codes - repeated uint64 code_ids = 3 [ - (gogoproto.customname) = "CodeIDs", - (gogoproto.moretags) = "yaml:\"code_ids\"" - ]; -} diff --git a/examples/interchainjs/proto/cosmwasm/wasm/v1/query.proto b/examples/interchainjs/proto/cosmwasm/wasm/v1/query.proto deleted file mode 100644 index dbe7c0fb..00000000 --- a/examples/interchainjs/proto/cosmwasm/wasm/v1/query.proto +++ /dev/null @@ -1,223 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "gogoproto/gogo.proto"; -import "cosmwasm/wasm/v1/types.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = false; - -// Query provides defines the gRPC querier service -service Query { - // ContractInfo gets the contract meta data - rpc ContractInfo(QueryContractInfoRequest) - returns (QueryContractInfoResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/contract/{address}"; - } - // ContractHistory gets the contract code history - rpc ContractHistory(QueryContractHistoryRequest) - returns (QueryContractHistoryResponse) { - option (google.api.http).get = - "/cosmwasm/wasm/v1/contract/{address}/history"; - } - // ContractsByCode lists all smart contracts for a code id - rpc ContractsByCode(QueryContractsByCodeRequest) - returns (QueryContractsByCodeResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/code/{code_id}/contracts"; - } - // AllContractState gets all raw store data for a single contract - rpc AllContractState(QueryAllContractStateRequest) - returns (QueryAllContractStateResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/contract/{address}/state"; - } - // RawContractState gets single key from the raw store data of a contract - rpc RawContractState(QueryRawContractStateRequest) - returns (QueryRawContractStateResponse) { - option (google.api.http).get = - "/wasm/v1/contract/{address}/raw/{query_data}"; - } - // SmartContractState get smart query result from the contract - rpc SmartContractState(QuerySmartContractStateRequest) - returns (QuerySmartContractStateResponse) { - option (google.api.http).get = - "/wasm/v1/contract/{address}/smart/{query_data}"; - } - // Code gets the binary code and metadata for a singe wasm code - rpc Code(QueryCodeRequest) returns (QueryCodeResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/code/{code_id}"; - } - // Codes gets the metadata for all stored wasm codes - rpc Codes(QueryCodesRequest) returns (QueryCodesResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/code"; - } - - // PinnedCodes gets the pinned code ids - rpc PinnedCodes(QueryPinnedCodesRequest) returns (QueryPinnedCodesResponse) { - option (google.api.http).get = "/cosmwasm/wasm/v1/codes/pinned"; - } -} - -// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC -// method -message QueryContractInfoRequest { - // address is the address of the contract to query - string address = 1; -} -// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC -// method -message QueryContractInfoResponse { - option (gogoproto.equal) = true; - - // address is the address of the contract - string address = 1; - ContractInfo contract_info = 2 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "" - ]; -} - -// QueryContractHistoryRequest is the request type for the Query/ContractHistory -// RPC method -message QueryContractHistoryRequest { - // address is the address of the contract to query - string address = 1; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryContractHistoryResponse is the response type for the -// Query/ContractHistory RPC method -message QueryContractHistoryResponse { - repeated ContractCodeHistoryEntry entries = 1 - [ (gogoproto.nullable) = false ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode -// RPC method -message QueryContractsByCodeRequest { - uint64 code_id = 1; // grpc-gateway_out does not support Go style CodID - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryContractsByCodeResponse is the response type for the -// Query/ContractsByCode RPC method -message QueryContractsByCodeResponse { - // contracts are a set of contract addresses - repeated string contracts = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAllContractStateRequest is the request type for the -// Query/AllContractState RPC method -message QueryAllContractStateRequest { - // address is the address of the contract - string address = 1; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllContractStateResponse is the response type for the -// Query/AllContractState RPC method -message QueryAllContractStateResponse { - repeated Model models = 1 [ (gogoproto.nullable) = false ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRawContractStateRequest is the request type for the -// Query/RawContractState RPC method -message QueryRawContractStateRequest { - // address is the address of the contract - string address = 1; - bytes query_data = 2; -} - -// QueryRawContractStateResponse is the response type for the -// Query/RawContractState RPC method -message QueryRawContractStateResponse { - // Data contains the raw store data - bytes data = 1; -} - -// QuerySmartContractStateRequest is the request type for the -// Query/SmartContractState RPC method -message QuerySmartContractStateRequest { - // address is the address of the contract - string address = 1; - // QueryData contains the query data passed to the contract - bytes query_data = 2 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// QuerySmartContractStateResponse is the response type for the -// Query/SmartContractState RPC method -message QuerySmartContractStateResponse { - // Data contains the json data returned from the smart contract - bytes data = 1 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// QueryCodeRequest is the request type for the Query/Code RPC method -message QueryCodeRequest { - uint64 code_id = 1; // grpc-gateway_out does not support Go style CodID -} - -// CodeInfoResponse contains code meta data from CodeInfo -message CodeInfoResponse { - option (gogoproto.equal) = true; - - uint64 code_id = 1 [ - (gogoproto.customname) = "CodeID", - (gogoproto.jsontag) = "id" - ]; // id for legacy support - string creator = 2; - bytes data_hash = 3 - [ (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes" ]; - // Used in v1beta1 - reserved 4, 5; -} - -// QueryCodeResponse is the response type for the Query/Code RPC method -message QueryCodeResponse { - option (gogoproto.equal) = true; - CodeInfoResponse code_info = 1 - [ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ]; - bytes data = 2 [ (gogoproto.jsontag) = "data" ]; -} - -// QueryCodesRequest is the request type for the Query/Codes RPC method -message QueryCodesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryCodesResponse is the response type for the Query/Codes RPC method -message QueryCodesResponse { - repeated CodeInfoResponse code_infos = 1 [ (gogoproto.nullable) = false ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes -// RPC method -message QueryPinnedCodesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryPinnedCodesResponse is the response type for the -// Query/PinnedCodes RPC method -message QueryPinnedCodesResponse { - repeated uint64 code_ids = 1 - [ (gogoproto.nullable) = false, (gogoproto.customname) = "CodeIDs" ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/examples/interchainjs/proto/cosmwasm/wasm/v1/tx.proto b/examples/interchainjs/proto/cosmwasm/wasm/v1/tx.proto deleted file mode 100644 index 8295907e..00000000 --- a/examples/interchainjs/proto/cosmwasm/wasm/v1/tx.proto +++ /dev/null @@ -1,135 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "cosmwasm/wasm/v1/types.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; - -// Msg defines the wasm Msg service. -service Msg { - // StoreCode to submit Wasm code to the system - rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse); - // Instantiate creates a new smart contract instance for the given code id. - rpc InstantiateContract(MsgInstantiateContract) - returns (MsgInstantiateContractResponse); - // Execute submits the given message data to a smart contract - rpc ExecuteContract(MsgExecuteContract) returns (MsgExecuteContractResponse); - // Migrate runs a code upgrade/ downgrade for a smart contract - rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse); - // UpdateAdmin sets a new admin for a smart contract - rpc UpdateAdmin(MsgUpdateAdmin) returns (MsgUpdateAdminResponse); - // ClearAdmin removes any admin stored for a smart contract - rpc ClearAdmin(MsgClearAdmin) returns (MsgClearAdminResponse); -} - -// MsgStoreCode submit Wasm code to the system -message MsgStoreCode { - // Sender is the that actor that signed the messages - string sender = 1; - // WASMByteCode can be raw or gzip compressed - bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ]; - // Used in v1beta1 - reserved 3, 4; - // InstantiatePermission access control to apply on contract creation, - // optional - AccessConfig instantiate_permission = 5; -} -// MsgStoreCodeResponse returns store result data. -message MsgStoreCodeResponse { - // CodeID is the reference to the stored WASM code - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; -} - -// MsgInstantiateContract create a new smart contract instance for the given -// code id. -message MsgInstantiateContract { - // Sender is the that actor that signed the messages - string sender = 1; - // Admin is an optional address that can execute migrations - string admin = 2; - // CodeID is the reference to the stored WASM code - uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; - // Label is optional metadata to be stored with a contract instance. - string label = 4; - // Msg json encoded message to be passed to the contract on instantiation - bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on instantiation - repeated cosmos.base.v1beta1.Coin funds = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} -// MsgInstantiateContractResponse return instantiation result data -message MsgInstantiateContractResponse { - // Address is the bech32 address of the new contract instance. - string address = 1; - // Data contains base64-encoded bytes to returned from the contract - bytes data = 2; -} - -// MsgExecuteContract submits the given message data to a smart contract -message MsgExecuteContract { - // Sender is the that actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 2; - // Msg json encoded message to be passed to the contract - bytes msg = 3 [ (gogoproto.casttype) = "RawContractMessage" ]; - // Funds coins that are transferred to the contract on execution - repeated cosmos.base.v1beta1.Coin funds = 5 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgExecuteContractResponse returns execution result data. -message MsgExecuteContractResponse { - // Data contains base64-encoded bytes to returned from the contract - bytes data = 1; -} - -// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract -message MsgMigrateContract { - // Sender is the that actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 2; - // CodeID references the new WASM code - uint64 code_id = 3 [ (gogoproto.customname) = "CodeID" ]; - // Msg json encoded message to be passed to the contract on migration - bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// MsgMigrateContractResponse returns contract migration result data. -message MsgMigrateContractResponse { - // Data contains same raw bytes returned as data from the wasm contract. - // (May be empty) - bytes data = 1; -} - -// MsgUpdateAdmin sets a new admin for a smart contract -message MsgUpdateAdmin { - // Sender is the that actor that signed the messages - string sender = 1; - // NewAdmin address to be set - string new_admin = 2; - // Contract is the address of the smart contract - string contract = 3; -} - -// MsgUpdateAdminResponse returns empty data -message MsgUpdateAdminResponse {} - -// MsgClearAdmin removes any admin stored for a smart contract -message MsgClearAdmin { - // Sender is the that actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 3; -} - -// MsgClearAdminResponse returns empty data -message MsgClearAdminResponse {} diff --git a/examples/interchainjs/proto/cosmwasm/wasm/v1/types.proto b/examples/interchainjs/proto/cosmwasm/wasm/v1/types.proto deleted file mode 100644 index 7ee2f639..00000000 --- a/examples/interchainjs/proto/cosmwasm/wasm/v1/types.proto +++ /dev/null @@ -1,140 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = true; - -// AccessType permission types -enum AccessType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = false; - // AccessTypeUnspecified placeholder for empty value - ACCESS_TYPE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "AccessTypeUnspecified" ]; - // AccessTypeNobody forbidden - ACCESS_TYPE_NOBODY = 1 - [ (gogoproto.enumvalue_customname) = "AccessTypeNobody" ]; - // AccessTypeOnlyAddress restricted to an address - ACCESS_TYPE_ONLY_ADDRESS = 2 - [ (gogoproto.enumvalue_customname) = "AccessTypeOnlyAddress" ]; - // AccessTypeEverybody unrestricted - ACCESS_TYPE_EVERYBODY = 3 - [ (gogoproto.enumvalue_customname) = "AccessTypeEverybody" ]; -} - -// AccessTypeParam -message AccessTypeParam { - option (gogoproto.goproto_stringer) = true; - AccessType value = 1 [ (gogoproto.moretags) = "yaml:\"value\"" ]; -} - -// AccessConfig access control type. -message AccessConfig { - option (gogoproto.goproto_stringer) = true; - AccessType permission = 1 [ (gogoproto.moretags) = "yaml:\"permission\"" ]; - string address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; -} - -// Params defines the set of wasm parameters. -message Params { - option (gogoproto.goproto_stringer) = false; - AccessConfig code_upload_access = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"code_upload_access\"" - ]; - AccessType instantiate_default_permission = 2 - [ (gogoproto.moretags) = "yaml:\"instantiate_default_permission\"" ]; - uint64 max_wasm_code_size = 3 - [ (gogoproto.moretags) = "yaml:\"max_wasm_code_size\"" ]; -} - -// CodeInfo is data for the uploaded contract WASM code -message CodeInfo { - // CodeHash is the unique identifier created by wasmvm - bytes code_hash = 1; - // Creator address who initially stored the code - string creator = 2; - // Used in v1beta1 - reserved 3, 4; - // InstantiateConfig access control to apply on contract creation, optional - AccessConfig instantiate_config = 5 [ (gogoproto.nullable) = false ]; -} - -// ContractInfo stores a WASM contract instance -message ContractInfo { - option (gogoproto.equal) = true; - - // CodeID is the reference to the stored Wasm code - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - // Creator address who initially instantiated the contract - string creator = 2; - // Admin is an optional address that can execute migrations - string admin = 3; - // Label is optional metadata to be stored with a contract instance. - string label = 4; - // Created Tx position when the contract was instantiated. - // This data should kept internal and not be exposed via query results. Just - // use for sorting - AbsoluteTxPosition created = 5; - string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ]; - - // Extension is an extension point to store custom metadata within the - // persistence model. - google.protobuf.Any extension = 7 - [ (cosmos_proto.accepts_interface) = "ContractInfoExtension" ]; -} - -// ContractCodeHistoryOperationType actions that caused a code change -enum ContractCodeHistoryOperationType { - option (gogoproto.goproto_enum_prefix) = false; - // ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeUnspecified" ]; - // ContractCodeHistoryOperationTypeInit on chain contract instantiation - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeInit" ]; - // ContractCodeHistoryOperationTypeMigrate code migration - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeMigrate" ]; - // ContractCodeHistoryOperationTypeGenesis based on genesis data - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3 - [ (gogoproto.enumvalue_customname) = - "ContractCodeHistoryOperationTypeGenesis" ]; -} - -// ContractCodeHistoryEntry metadata to a contract. -message ContractCodeHistoryEntry { - ContractCodeHistoryOperationType operation = 1; - // CodeID is the reference to the stored WASM code - uint64 code_id = 2 [ (gogoproto.customname) = "CodeID" ]; - // Updated Tx position when the operation was executed. - AbsoluteTxPosition updated = 3; - bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; -} - -// AbsoluteTxPosition is a unique transaction position that allows for global -// ordering of transactions. -message AbsoluteTxPosition { - // BlockHeight is the block the contract was created at - uint64 block_height = 1; - // TxIndex is a monotonic counter within the block (actual transaction index, - // or gas consumed) - uint64 tx_index = 2; -} - -// Model is a struct that holds a KV pair -message Model { - // hex-encode key to read it better (this is often ascii) - bytes key = 1 [ (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes" ]; - // base64-encode raw value - bytes value = 2; -} diff --git a/examples/interchainjs/proto/gogoproto/LICENSE b/examples/interchainjs/proto/gogoproto/LICENSE deleted file mode 100644 index 992eb2bd..00000000 --- a/examples/interchainjs/proto/gogoproto/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2013, The GoGo Authors. All rights reserved. - -Protocol Buffers for Go with Gadgets - -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/examples/interchainjs/proto/gogoproto/README.md b/examples/interchainjs/proto/gogoproto/README.md deleted file mode 100644 index 4cfc4768..00000000 --- a/examples/interchainjs/proto/gogoproto/README.md +++ /dev/null @@ -1 +0,0 @@ -# gogoproto \ No newline at end of file diff --git a/examples/interchainjs/proto/gogoproto/gogo.proto b/examples/interchainjs/proto/gogoproto/gogo.proto deleted file mode 100644 index 49e78f99..00000000 --- a/examples/interchainjs/proto/gogoproto/gogo.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; -} diff --git a/examples/interchainjs/proto/google/LICENSE b/examples/interchainjs/proto/google/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/examples/interchainjs/proto/google/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/examples/interchainjs/proto/google/README.md b/examples/interchainjs/proto/google/README.md deleted file mode 100644 index 3bdc1f83..00000000 --- a/examples/interchainjs/proto/google/README.md +++ /dev/null @@ -1 +0,0 @@ -# google \ No newline at end of file diff --git a/examples/interchainjs/proto/google/api/annotations.proto b/examples/interchainjs/proto/google/api/annotations.proto deleted file mode 100644 index efdab3db..00000000 --- a/examples/interchainjs/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/examples/interchainjs/proto/google/api/http.proto b/examples/interchainjs/proto/google/api/http.proto deleted file mode 100644 index 113fa936..00000000 --- a/examples/interchainjs/proto/google/api/http.proto +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/examples/interchainjs/proto/google/protobuf/any.proto b/examples/interchainjs/proto/google/protobuf/any.proto deleted file mode 100644 index 4cf3843b..00000000 --- a/examples/interchainjs/proto/google/protobuf/any.proto +++ /dev/null @@ -1,155 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; -} diff --git a/examples/interchainjs/proto/google/protobuf/descriptor.proto b/examples/interchainjs/proto/google/protobuf/descriptor.proto deleted file mode 100644 index 4a08905a..00000000 --- a/examples/interchainjs/proto/google/protobuf/descriptor.proto +++ /dev/null @@ -1,885 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - -syntax = "proto2"; - -package google.protobuf; - -option go_package = "descriptor"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - // Indexes of the public imported files in the dependency list above. - repeated int32 public_dependency = 10; - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - repeated int32 weak_dependency = 11; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; - - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - optional string syntax = 12; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - - optional ExtensionRangeOptions options = 3; - } - repeated ExtensionRange extension_range = 5; - - repeated OneofDescriptorProto oneof_decl = 8; - - optional MessageOptions options = 7; - - // Range of reserved tag numbers. Reserved tag numbers may not be used by - // fields or extension ranges in the same message. Reserved ranges may - // not overlap. - message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - } - repeated ReservedRange reserved_range = 9; - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - repeated string reserved_name = 10; -} - -message ExtensionRangeOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 - // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - } - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - } - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - optional int32 oneof_index = 9; - - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - optional string json_name = 10; - - optional FieldOptions options = 8; -} - -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; - optional OneofOptions options = 2; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; - - // Range of reserved numeric values. Reserved values may not be used by - // entries in the same enum. Reserved ranges may not overlap. - // - // Note that this is distinct from DescriptorProto.ReservedRange in that it - // is inclusive such that it can appropriately represent the entire int32 - // domain. - message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. - } - - // Range of reserved numeric values. Reserved numeric values may not be used - // by enum values in the same enum declaration. Reserved ranges may not - // overlap. - repeated EnumReservedRange reserved_range = 4; - - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - repeated string reserved_name = 5; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; - - // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default = false]; - // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default = false]; -} - - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - optional string java_outer_classname = 8; - - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default = false]; - - // This option does nothing. - optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default = false]; - - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default = SPEED]; - - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - optional string go_package = 11; - - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default = false]; - optional bool java_generic_services = 17 [default = false]; - optional bool py_generic_services = 18 [default = false]; - optional bool php_generic_services = 42 [default = false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default = false]; - - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default = false]; - - - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - optional string objc_class_prefix = 36; - - // Namespace for generated classes; defaults to the package. - optional string csharp_namespace = 37; - - // By default Swift generators will take the proto package and CamelCase it - // replacing '.' with underscore and use that to prefix the types/symbols - // defined. When this options is provided, they will use this value instead - // to prefix the types/symbols defined. - optional string swift_prefix = 39; - - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - optional string php_class_prefix = 40; - - // Use this option to change the namespace of php generated classes. Default - // is empty. When this option is empty, the package name will be used for - // determining the namespace. - optional string php_namespace = 41; - - // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be - // used for determining the namespace. - optional string php_metadata_namespace = 44; - - // Use this option to change the package of ruby generated classes. Default - // is empty. When this option is not set, the package name will be used for - // determining the ruby package. - optional string ruby_package = 45; - - - // The parser stores options it doesn't recognize here. - // See the documentation for the "Options" section above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. - // See the documentation for the "Options" section above. - extensions 1000 to max; - - //reserved 38; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default = false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default = false]; - - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default = false]; - - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementations still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - optional bool map_entry = 7; - - //reserved 8; // javalite_serializable - //reserved 9; // javanano_as_lite - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - optional bool packed = 2; - - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - // is represented as JavaScript string, which avoids loss of precision that - // can happen when a large value is converted to a floating point JavaScript. - // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - // use the JavaScript "number" type. The behavior of the default option - // JS_NORMAL is implementation dependent. - // - // This option is an enum to permit additional types to be added, e.g. - // goog.math.Integer. - optional JSType jstype = 6 [default = JS_NORMAL]; - enum JSType { - // Use the default type. - JS_NORMAL = 0; - - // Use JavaScript strings. - JS_STRING = 1; - - // Use JavaScript numbers. - JS_NUMBER = 2; - } - - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - optional bool lazy = 5 [default = false]; - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default = false]; - - // For Google-internal migration only. Do not use. - optional bool weak = 10 [default = false]; - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; - - //reserved 4; // removed jtype -} - -message OneofOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // Set this option to true to allow mapping different tag names to the same - // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default = false]; - - //reserved 5; // javanano_as_lite - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default = false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default = false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default = false]; - - // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - // or neither? HTTP based RPC implementation may choose GET verb for safe - // methods, and PUT verb for idempotent methods instead of the default POST. - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects - } - optional IdempotencyLevel idempotency_level = 34 - [default = IDEMPOTENCY_UNKNOWN]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendant. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed = true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed = true]; - - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - optional string leading_comments = 3; - optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -message GeneratedCodeInfo { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - repeated Annotation annotation = 1; - message Annotation { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed = true]; - - // Identifies the filesystem path to the original source .proto. - optional string source_file = 2; - - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - optional int32 begin = 3; - - // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - optional int32 end = 4; - } -} diff --git a/examples/interchainjs/proto/google/protobuf/duration.proto b/examples/interchainjs/proto/google/protobuf/duration.proto deleted file mode 100644 index b14bea5d..00000000 --- a/examples/interchainjs/proto/google/protobuf/duration.proto +++ /dev/null @@ -1,116 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DurationProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Duration represents a signed, fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". It is related to Timestamp in that the difference between -// two Timestamp values is a Duration and it can be added or subtracted -// from a Timestamp. Range is approximately +-10,000 years. -// -// # Examples -// -// Example 1: Compute Duration from two Timestamps in pseudo code. -// -// Timestamp start = ...; -// Timestamp end = ...; -// Duration duration = ...; -// -// duration.seconds = end.seconds - start.seconds; -// duration.nanos = end.nanos - start.nanos; -// -// if (duration.seconds < 0 && duration.nanos > 0) { -// duration.seconds += 1; -// duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; -// duration.nanos += 1000000000; -// } -// -// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -// -// Timestamp start = ...; -// Duration duration = ...; -// Timestamp end = ...; -// -// end.seconds = start.seconds + duration.seconds; -// end.nanos = start.nanos + duration.nanos; -// -// if (end.nanos < 0) { -// end.seconds -= 1; -// end.nanos += 1000000000; -// } else if (end.nanos >= 1000000000) { -// end.seconds += 1; -// end.nanos -= 1000000000; -// } -// -// Example 3: Compute Duration from datetime.timedelta in Python. -// -// td = datetime.timedelta(days=3, minutes=10) -// duration = Duration() -// duration.FromTimedelta(td) -// -// # JSON Mapping -// -// In JSON format, the Duration type is encoded as a string rather than an -// object, where the string ends in the suffix "s" (indicating seconds) and -// is preceded by the number of seconds, with nanoseconds expressed as -// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -// microsecond should be expressed in JSON format as "3.000001s". -// -// -message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} diff --git a/examples/interchainjs/proto/google/protobuf/empty.proto b/examples/interchainjs/proto/google/protobuf/empty.proto deleted file mode 100644 index 6057c852..00000000 --- a/examples/interchainjs/proto/google/protobuf/empty.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "EmptyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// A generic empty message that you can re-use to avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -message Empty {} diff --git a/examples/interchainjs/proto/google/protobuf/timestamp.proto b/examples/interchainjs/proto/google/protobuf/timestamp.proto deleted file mode 100644 index 0ebe36ea..00000000 --- a/examples/interchainjs/proto/google/protobuf/timestamp.proto +++ /dev/null @@ -1,138 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "TimestampProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Timestamp represents a point in time independent of any time zone or local -// calendar, encoded as a count of seconds and fractions of seconds at -// nanosecond resolution. The count is relative to an epoch at UTC midnight on -// January 1, 1970, in the proleptic Gregorian calendar which extends the -// Gregorian calendar backwards to year one. -// -// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -// second table is needed for interpretation, using a [24-hour linear -// smear](https://developers.google.com/time/smear). -// -// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -// restricting to that range, we ensure that we can convert to and from [RFC -// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; -// gettimeofday(&tv, NULL); -// -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); -// -// -// Example 5: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() -// timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the -// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, {day}, -// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -// is required. A proto3 JSON serializer should always use UTC (as indicated by -// "Z") when printing the Timestamp type and a proto3 JSON parser should be -// able to accept both UTC and other timezones (as indicated by an offset). -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard -// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -// method. In Python, a standard `datetime.datetime` object can be converted -// to this format using -// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D -// ) to obtain a formatter capable of generating timestamps in this format. -// -// -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} diff --git a/examples/interchainjs/proto/ibc/LICENSE b/examples/interchainjs/proto/ibc/LICENSE deleted file mode 100644 index c04a16b3..00000000 --- a/examples/interchainjs/proto/ibc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 COSMOS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/examples/interchainjs/proto/ibc/README.md b/examples/interchainjs/proto/ibc/README.md deleted file mode 100644 index e4ee70c7..00000000 --- a/examples/interchainjs/proto/ibc/README.md +++ /dev/null @@ -1 +0,0 @@ -# ibc \ No newline at end of file diff --git a/examples/interchainjs/proto/ibc/applications/transfer/v1/genesis.proto b/examples/interchainjs/proto/ibc/applications/transfer/v1/genesis.proto deleted file mode 100644 index 73d9fddd..00000000 --- a/examples/interchainjs/proto/ibc/applications/transfer/v1/genesis.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; - -import "ibc/applications/transfer/v1/transfer.proto"; -import "gogoproto/gogo.proto"; - -// GenesisState defines the ibc-transfer genesis state -message GenesisState { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - repeated DenomTrace denom_traces = 2 [ - (gogoproto.castrepeated) = "Traces", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"denom_traces\"" - ]; - Params params = 3 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/ibc/applications/transfer/v1/query.proto b/examples/interchainjs/proto/ibc/applications/transfer/v1/query.proto deleted file mode 100644 index f2faa87b..00000000 --- a/examples/interchainjs/proto/ibc/applications/transfer/v1/query.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/applications/transfer/v1/transfer.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; - -// Query provides defines the gRPC querier service. -service Query { - // DenomTrace queries a denomination trace information. - rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; - } - - // DenomTraces queries all denomination traces. - rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; - } - - // Params queries all parameters of the ibc-transfer module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/params"; - } -} - -// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -// method -message QueryDenomTraceRequest { - // hash (in hex format) of the denomination trace information. - string hash = 1; -} - -// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -// method. -message QueryDenomTraceResponse { - // denom_trace returns the requested denomination trace information. - DenomTrace denom_trace = 1; -} - -// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -// method -message QueryDenomTracesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -// method. -message QueryDenomTracesResponse { - // denom_traces returns all denominations trace information. - repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} diff --git a/examples/interchainjs/proto/ibc/applications/transfer/v1/transfer.proto b/examples/interchainjs/proto/ibc/applications/transfer/v1/transfer.proto deleted file mode 100644 index 10ce92f9..00000000 --- a/examples/interchainjs/proto/ibc/applications/transfer/v1/transfer.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; - -import "gogoproto/gogo.proto"; - -// DenomTrace contains the base denomination for ICS20 fungible tokens and the -// source tracing information path. -message DenomTrace { - // path defines the chain of port/channel identifiers used for tracing the - // source of the fungible token. - string path = 1; - // base denomination of the relayed fungible token. - string base_denom = 2; -} - -// Params defines the set of IBC transfer parameters. -// NOTE: To prevent a single token from being transferred, set the -// TransfersEnabled parameter to true and then set the bank module's SendEnabled -// parameter for the denomination to false. -message Params { - // send_enabled enables or disables all cross-chain token transfers from this - // chain. - bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""]; - // receive_enabled enables or disables all cross-chain token transfers to this - // chain. - bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""]; -} diff --git a/examples/interchainjs/proto/ibc/applications/transfer/v1/tx.proto b/examples/interchainjs/proto/ibc/applications/transfer/v1/tx.proto deleted file mode 100644 index dfc480d0..00000000 --- a/examples/interchainjs/proto/ibc/applications/transfer/v1/tx.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "ibc/core/client/v1/client.proto"; - -// Msg defines the ibc/transfer Msg service. -service Msg { - // Transfer defines a rpc handler method for MsgTransfer. - rpc Transfer(MsgTransfer) returns (MsgTransferResponse); -} - -// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -// ICS20 enabled chains. See ICS Spec here: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -message MsgTransfer { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // the port on which the packet will be sent - string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; - // the channel by which the packet will be sent - string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""]; - // the tokens to be transferred - cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; - // the sender address - string sender = 4; - // the recipient address on the destination chain - string receiver = 5; - // Timeout height relative to the current block height. - // The timeout is disabled when set to 0. - ibc.core.client.v1.Height timeout_height = 6 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - // Timeout timestamp (in nanoseconds) relative to the current block timestamp. - // The timeout is disabled when set to 0. - uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; -} - -// MsgTransferResponse defines the Msg/Transfer response type. -message MsgTransferResponse {} diff --git a/examples/interchainjs/proto/ibc/applications/transfer/v2/packet.proto b/examples/interchainjs/proto/ibc/applications/transfer/v2/packet.proto deleted file mode 100644 index 593392a9..00000000 --- a/examples/interchainjs/proto/ibc/applications/transfer/v2/packet.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v2; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; - -// FungibleTokenPacketData defines a struct for the packet payload -// See FungibleTokenPacketData spec: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -message FungibleTokenPacketData { - // the token denomination to be transferred - string denom = 1; - // the token amount to be transferred - string amount = 2; - // the sender address - string sender = 3; - // the recipient address on the destination chain - string receiver = 4; -} diff --git a/examples/interchainjs/proto/ibc/core/channel/v1/channel.proto b/examples/interchainjs/proto/ibc/core/channel/v1/channel.proto deleted file mode 100644 index c7f42dbf..00000000 --- a/examples/interchainjs/proto/ibc/core/channel/v1/channel.proto +++ /dev/null @@ -1,148 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; - -// Channel defines pipeline for exactly-once packet delivery between specific -// modules on separate blockchains, which has at least one end capable of -// sending packets and one end capable of receiving packets. -message Channel { - option (gogoproto.goproto_getters) = false; - - // current state of the channel end - State state = 1; - // whether the channel is ordered or unordered - Order ordering = 2; - // counterparty channel end - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - // list of connection identifiers, in order, along which packets sent on - // this channel will travel - repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; - // opaque channel version, which is agreed upon during the handshake - string version = 5; -} - -// IdentifiedChannel defines a channel with additional port and channel -// identifier fields. -message IdentifiedChannel { - option (gogoproto.goproto_getters) = false; - - // current state of the channel end - State state = 1; - // whether the channel is ordered or unordered - Order ordering = 2; - // counterparty channel end - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - // list of connection identifiers, in order, along which packets sent on - // this channel will travel - repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; - // opaque channel version, which is agreed upon during the handshake - string version = 5; - // port identifier - string port_id = 6; - // channel identifier - string channel_id = 7; -} - -// State defines if a channel is in one of the following states: -// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. -enum State { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; - // A channel has just started the opening handshake. - STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; - // A channel has acknowledged the handshake step on the counterparty chain. - STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; - // A channel has completed the handshake. Open channels are - // ready to send and receive packets. - STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; - // A channel has been closed and can no longer be used to send or receive - // packets. - STATE_CLOSED = 4 [(gogoproto.enumvalue_customname) = "CLOSED"]; -} - -// Order defines if a channel is ORDERED or UNORDERED -enum Order { - option (gogoproto.goproto_enum_prefix) = false; - - // zero-value for channel ordering - ORDER_NONE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "NONE"]; - // packets can be delivered in any order, which may differ from the order in - // which they were sent. - ORDER_UNORDERED = 1 [(gogoproto.enumvalue_customname) = "UNORDERED"]; - // packets are delivered exactly in the order which they were sent - ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; -} - -// Counterparty defines a channel end counterparty -message Counterparty { - option (gogoproto.goproto_getters) = false; - - // port on the counterparty chain which owns the other end of the channel. - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel end on the counterparty chain - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; -} - -// Packet defines a type that carries data across different chains through IBC -message Packet { - option (gogoproto.goproto_getters) = false; - - // number corresponds to the order of sends and receives, where a Packet - // with an earlier sequence number must be sent and received before a Packet - // with a later sequence number. - uint64 sequence = 1; - // identifies the port on the sending chain. - string source_port = 2 [(gogoproto.moretags) = "yaml:\"source_port\""]; - // identifies the channel end on the sending chain. - string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; - // identifies the port on the receiving chain. - string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; - // identifies the channel end on the receiving chain. - string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; - // actual opaque bytes transferred directly to the application module - bytes data = 6; - // block height after which the packet times out - ibc.core.client.v1.Height timeout_height = 7 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - // block timestamp (in nanoseconds) after which the packet times out - uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; -} - -// PacketState defines the generic type necessary to retrieve and store -// packet commitments, acknowledgements, and receipts. -// Caller is responsible for knowing the context necessary to interpret this -// state as a commitment, acknowledgement, or a receipt. -message PacketState { - option (gogoproto.goproto_getters) = false; - - // channel port identifier. - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel unique identifier. - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // packet sequence. - uint64 sequence = 3; - // embedded data that represents packet state. - bytes data = 4; -} - -// Acknowledgement is the recommended acknowledgement format to be used by -// app-specific protocols. -// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -// conflicts with other protobuf message formats used for acknowledgements. -// The first byte of any message with this format will be the non-ASCII values -// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -// https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope -message Acknowledgement { - // response contains either a result or an error and must be non-empty - oneof response { - bytes result = 21; - string error = 22; - } -} diff --git a/examples/interchainjs/proto/ibc/core/channel/v1/genesis.proto b/examples/interchainjs/proto/ibc/core/channel/v1/genesis.proto deleted file mode 100644 index 38b57ed6..00000000 --- a/examples/interchainjs/proto/ibc/core/channel/v1/genesis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// GenesisState defines the ibc channel submodule's genesis state. -message GenesisState { - repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; - repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; - repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; - repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; - repeated PacketSequence send_sequences = 5 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; - repeated PacketSequence recv_sequences = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; - repeated PacketSequence ack_sequences = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; - // the sequence for the next generated channel identifier - uint64 next_channel_sequence = 8 [(gogoproto.moretags) = "yaml:\"next_channel_sequence\""]; -} - -// PacketSequence defines the genesis type necessary to retrieve and store -// next send and receive sequences. -message PacketSequence { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - uint64 sequence = 3; -} diff --git a/examples/interchainjs/proto/ibc/core/channel/v1/query.proto b/examples/interchainjs/proto/ibc/core/channel/v1/query.proto deleted file mode 100644 index 212cb645..00000000 --- a/examples/interchainjs/proto/ibc/core/channel/v1/query.proto +++ /dev/null @@ -1,376 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; - -import "ibc/core/client/v1/client.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; - -// Query provides defines the gRPC querier service -service Query { - // Channel queries an IBC Channel. - rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}"; - } - - // Channels queries all the IBC channels of a chain. - rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels"; - } - - // ConnectionChannels queries all the channels associated with a connection - // end. - rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/connections/{connection}/channels"; - } - - // ChannelClientState queries for the client state for the channel associated - // with the provided channel identifiers. - rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/client_state"; - } - - // ChannelConsensusState queries for the consensus state for the channel - // associated with the provided channel identifiers. - rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/consensus_state/revision/" - "{revision_number}/height/{revision_height}"; - } - - // PacketCommitment queries a stored packet commitment hash. - rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" - "packet_commitments/{sequence}"; - } - - // PacketCommitments returns all the packet commitments hashes associated - // with a channel. - rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_commitments"; - } - - // PacketReceipt queries if a given packet sequence has been received on the - // queried chain - rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_receipts/{sequence}"; - } - - // PacketAcknowledgement queries a stored packet acknowledgement hash. - rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_acks/{sequence}"; - } - - // PacketAcknowledgements returns all the packet acknowledgements associated - // with a channel. - rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_acknowledgements"; - } - - // UnreceivedPackets returns all the unreceived IBC packets associated with a - // channel and sequences. - rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" - "packet_commitments/" - "{packet_commitment_sequences}/unreceived_packets"; - } - - // UnreceivedAcks returns all the unreceived IBC acknowledgements associated - // with a channel and sequences. - rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_commitments/" - "{packet_ack_sequences}/unreceived_acks"; - } - - // NextSequenceReceive returns the next receive sequence for a given channel. - rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/next_sequence"; - } -} - -// QueryChannelRequest is the request type for the Query/Channel RPC method -message QueryChannelRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QueryChannelResponse is the response type for the Query/Channel RPC method. -// Besides the Channel end, it includes a proof and the height from which the -// proof was retrieved. -message QueryChannelResponse { - // channel associated with the request identifiers - ibc.core.channel.v1.Channel channel = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelsRequest is the request type for the Query/Channels RPC method -message QueryChannelsRequest { - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryChannelsResponse is the response type for the Query/Channels RPC method. -message QueryChannelsResponse { - // list of stored channels of the chain. - repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionChannelsRequest is the request type for the -// Query/QueryConnectionChannels RPC method -message QueryConnectionChannelsRequest { - // connection unique identifier - string connection = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConnectionChannelsResponse is the Response type for the -// Query/QueryConnectionChannels RPC method -message QueryConnectionChannelsResponse { - // list of channels associated with a connection. - repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelClientStateRequest is the request type for the Query/ClientState -// RPC method -message QueryChannelClientStateRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QueryChannelClientStateResponse is the Response type for the -// Query/QueryChannelClientState RPC method -message QueryChannelClientStateResponse { - // client state associated with the channel - ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelConsensusStateRequest is the request type for the -// Query/ConsensusState RPC method -message QueryChannelConsensusStateRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // revision number of the consensus state - uint64 revision_number = 3; - // revision height of the consensus state - uint64 revision_height = 4; -} - -// QueryChannelClientStateResponse is the Response type for the -// Query/QueryChannelClientState RPC method -message QueryChannelConsensusStateResponse { - // consensus state associated with the channel - google.protobuf.Any consensus_state = 1; - // client ID associated with the consensus state - string client_id = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryPacketCommitmentRequest is the request type for the -// Query/PacketCommitment RPC method -message QueryPacketCommitmentRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketCommitmentResponse defines the client query response for a packet -// which also includes a proof and the height from which the proof was -// retrieved -message QueryPacketCommitmentResponse { - // packet associated with the request fields - bytes commitment = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketCommitmentsRequest is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketCommitmentsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -// QueryPacketCommitmentsResponse is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketCommitmentsResponse { - repeated ibc.core.channel.v1.PacketState commitments = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketReceiptRequest is the request type for the -// Query/PacketReceipt RPC method -message QueryPacketReceiptRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketReceiptResponse defines the client query response for a packet -// receipt which also includes a proof, and the height from which the proof was -// retrieved -message QueryPacketReceiptResponse { - // success flag for if receipt exists - bool received = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryPacketAcknowledgementRequest is the request type for the -// Query/PacketAcknowledgement RPC method -message QueryPacketAcknowledgementRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketAcknowledgementResponse defines the client query response for a -// packet which also includes a proof and the height from which the -// proof was retrieved -message QueryPacketAcknowledgementResponse { - // packet associated with the request fields - bytes acknowledgement = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketAcknowledgementsRequest is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketAcknowledgementsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 3; - // list of packet sequences - repeated uint64 packet_commitment_sequences = 4; -} - -// QueryPacketAcknowledgemetsResponse is the request type for the -// Query/QueryPacketAcknowledgements RPC method -message QueryPacketAcknowledgementsResponse { - repeated ibc.core.channel.v1.PacketState acknowledgements = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryUnreceivedPacketsRequest is the request type for the -// Query/UnreceivedPackets RPC method -message QueryUnreceivedPacketsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // list of packet sequences - repeated uint64 packet_commitment_sequences = 3; -} - -// QueryUnreceivedPacketsResponse is the response type for the -// Query/UnreceivedPacketCommitments RPC method -message QueryUnreceivedPacketsResponse { - // list of unreceived packet sequences - repeated uint64 sequences = 1; - // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} - -// QueryUnreceivedAcks is the request type for the -// Query/UnreceivedAcks RPC method -message QueryUnreceivedAcksRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // list of acknowledgement sequences - repeated uint64 packet_ack_sequences = 3; -} - -// QueryUnreceivedAcksResponse is the response type for the -// Query/UnreceivedAcks RPC method -message QueryUnreceivedAcksResponse { - // list of unreceived acknowledgement sequences - repeated uint64 sequences = 1; - // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} - -// QueryNextSequenceReceiveRequest is the request type for the -// Query/QueryNextSequenceReceiveRequest RPC method -message QueryNextSequenceReceiveRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QuerySequenceResponse is the request type for the -// Query/QueryNextSequenceReceiveResponse RPC method -message QueryNextSequenceReceiveResponse { - // next sequence receive number - uint64 next_sequence_receive = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/ibc/core/channel/v1/tx.proto b/examples/interchainjs/proto/ibc/core/channel/v1/tx.proto deleted file mode 100644 index dab45080..00000000 --- a/examples/interchainjs/proto/ibc/core/channel/v1/tx.proto +++ /dev/null @@ -1,211 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// Msg defines the ibc/channel Msg service. -service Msg { - // ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - rpc ChannelOpenInit(MsgChannelOpenInit) returns (MsgChannelOpenInitResponse); - - // ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - rpc ChannelOpenTry(MsgChannelOpenTry) returns (MsgChannelOpenTryResponse); - - // ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - rpc ChannelOpenAck(MsgChannelOpenAck) returns (MsgChannelOpenAckResponse); - - // ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - rpc ChannelOpenConfirm(MsgChannelOpenConfirm) returns (MsgChannelOpenConfirmResponse); - - // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - rpc ChannelCloseInit(MsgChannelCloseInit) returns (MsgChannelCloseInitResponse); - - // ChannelCloseConfirm defines a rpc handler method for - // MsgChannelCloseConfirm. - rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); - - // RecvPacket defines a rpc handler method for MsgRecvPacket. - rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); - - // Timeout defines a rpc handler method for MsgTimeout. - rpc Timeout(MsgTimeout) returns (MsgTimeoutResponse); - - // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. - rpc TimeoutOnClose(MsgTimeoutOnClose) returns (MsgTimeoutOnCloseResponse); - - // Acknowledgement defines a rpc handler method for MsgAcknowledgement. - rpc Acknowledgement(MsgAcknowledgement) returns (MsgAcknowledgementResponse); -} - -// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -// is called by a relayer on Chain A. -message MsgChannelOpenInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - Channel channel = 2 [(gogoproto.nullable) = false]; - string signer = 3; -} - -// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. -message MsgChannelOpenInitResponse {} - -// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -// on Chain B. -message MsgChannelOpenTry { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need - // the channel identifier of the previous channel in state INIT - string previous_channel_id = 2 [(gogoproto.moretags) = "yaml:\"previous_channel_id\""]; - Channel channel = 3 [(gogoproto.nullable) = false]; - string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 7; -} - -// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. -message MsgChannelOpenTryResponse {} - -// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -// the change of channel state to TRYOPEN on Chain B. -message MsgChannelOpenAck { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_channel_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 7; -} - -// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. -message MsgChannelOpenAckResponse {} - -// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -// acknowledge the change of channel state to OPEN on Chain A. -message MsgChannelOpenConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -// type. -message MsgChannelOpenConfirmResponse {} - -// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -// to close a channel with Chain B. -message MsgChannelCloseInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string signer = 3; -} - -// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. -message MsgChannelCloseInitResponse {} - -// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -// to acknowledge the change of channel state to CLOSED on Chain A. -message MsgChannelCloseConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -// type. -message MsgChannelCloseConfirmResponse {} - -// MsgRecvPacket receives incoming IBC packet -message MsgRecvPacket { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 4; -} - -// MsgRecvPacketResponse defines the Msg/RecvPacket response type. -message MsgRecvPacketResponse {} - -// MsgTimeout receives timed-out packet -message MsgTimeout { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - string signer = 5; -} - -// MsgTimeoutResponse defines the Msg/Timeout response type. -message MsgTimeoutResponse {} - -// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. -message MsgTimeoutOnClose { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; - bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - string signer = 6; -} - -// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. -message MsgTimeoutOnCloseResponse {} - -// MsgAcknowledgement receives incoming IBC acknowledgement -message MsgAcknowledgement { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes acknowledgement = 2; - bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. -message MsgAcknowledgementResponse {} diff --git a/examples/interchainjs/proto/ibc/core/client/v1/client.proto b/examples/interchainjs/proto/ibc/core/client/v1/client.proto deleted file mode 100644 index f0a1538e..00000000 --- a/examples/interchainjs/proto/ibc/core/client/v1/client.proto +++ /dev/null @@ -1,104 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/02-client/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; -import "cosmos_proto/cosmos.proto"; - -// IdentifiedClientState defines a client state with an additional client -// identifier field. -message IdentifiedClientState { - // client identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateWithHeight defines a consensus state with an additional height -// field. -message ConsensusStateWithHeight { - // consensus state height - Height height = 1 [(gogoproto.nullable) = false]; - // consensus state - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml\"consensus_state\""]; -} - -// ClientConsensusStates defines all the stored consensus states for a given -// client. -message ClientConsensusStates { - // client identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // consensus states and their heights associated with the client - repeated ConsensusStateWithHeight consensus_states = 2 - [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; -} - -// ClientUpdateProposal is a governance proposal. If it passes, the substitute -// client's latest consensus state is copied over to the subject client. The proposal -// handler may fail if the subject and the substitute do not match in client and -// chain parameters (with exception to latest height, frozen height, and chain-id). -message ClientUpdateProposal { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // the title of the update proposal - string title = 1; - // the description of the proposal - string description = 2; - // the client identifier for the client to be updated if the proposal passes - string subject_client_id = 3 [(gogoproto.moretags) = "yaml:\"subject_client_id\""]; - // the substitute client identifier for the client standing in for the subject - // client - string substitute_client_id = 4 [(gogoproto.moretags) = "yaml:\"substitute_client_id\""]; -} - -// UpgradeProposal is a gov Content type for initiating an IBC breaking -// upgrade. -message UpgradeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = true; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - cosmos.upgrade.v1beta1.Plan plan = 3 [(gogoproto.nullable) = false]; - - // An UpgradedClientState must be provided to perform an IBC breaking upgrade. - // This will make the chain commit to the correct upgraded (self) client state - // before the upgrade occurs, so that connecting chains can verify that the - // new upgraded client is valid by verifying a proof on the previous version - // of the chain. This will allow IBC connections to persist smoothly across - // planned chain upgrades - google.protobuf.Any upgraded_client_state = 4 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; -} - -// Height is a monotonically increasing data type -// that can be compared against another Height for the purposes of updating and -// freezing clients -// -// Normally the RevisionHeight is incremented at each height while keeping -// RevisionNumber the same. However some consensus algorithms may choose to -// reset the height in certain conditions e.g. hard forks, state-machine -// breaking changes In these cases, the RevisionNumber is incremented so that -// height continues to be monitonically increasing even as the RevisionHeight -// gets reset -message Height { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // the revision that the client is currently on - uint64 revision_number = 1 [(gogoproto.moretags) = "yaml:\"revision_number\""]; - // the height within the given revision - uint64 revision_height = 2 [(gogoproto.moretags) = "yaml:\"revision_height\""]; -} - -// Params defines the set of IBC light client parameters. -message Params { - // allowed_clients defines the list of allowed client state types. - repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""]; -} diff --git a/examples/interchainjs/proto/ibc/core/client/v1/genesis.proto b/examples/interchainjs/proto/ibc/core/client/v1/genesis.proto deleted file mode 100644 index 6668f2ca..00000000 --- a/examples/interchainjs/proto/ibc/core/client/v1/genesis.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/02-client/types"; - -import "ibc/core/client/v1/client.proto"; -import "gogoproto/gogo.proto"; - -// GenesisState defines the ibc client submodule's genesis state. -message GenesisState { - // client states with their corresponding identifiers - repeated IdentifiedClientState clients = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; - // consensus states from each client - repeated ClientConsensusStates clients_consensus = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ClientsConsensusStates", - (gogoproto.moretags) = "yaml:\"clients_consensus\"" - ]; - // metadata from each client - repeated IdentifiedGenesisMetadata clients_metadata = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"clients_metadata\""]; - Params params = 4 [(gogoproto.nullable) = false]; - // create localhost on initialization - bool create_localhost = 5 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; - // the sequence for the next generated client identifier - uint64 next_client_sequence = 6 [(gogoproto.moretags) = "yaml:\"next_client_sequence\""]; -} - -// GenesisMetadata defines the genesis type for metadata that clients may return -// with ExportMetadata -message GenesisMetadata { - option (gogoproto.goproto_getters) = false; - - // store key of metadata without clientID-prefix - bytes key = 1; - // metadata value - bytes value = 2; -} - -// IdentifiedGenesisMetadata has the client metadata with the corresponding -// client id. -message IdentifiedGenesisMetadata { - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - repeated GenesisMetadata client_metadata = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_metadata\""]; -} diff --git a/examples/interchainjs/proto/ibc/core/client/v1/query.proto b/examples/interchainjs/proto/ibc/core/client/v1/query.proto deleted file mode 100644 index b6f8eb47..00000000 --- a/examples/interchainjs/proto/ibc/core/client/v1/query.proto +++ /dev/null @@ -1,184 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/02-client/types"; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/client/v1/client.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; - -// Query provides defines the gRPC querier service -service Query { - // ClientState queries an IBC light client. - rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_states/{client_id}"; - } - - // ClientStates queries all the IBC light clients of a chain. - rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_states"; - } - - // ConsensusState queries a consensus state associated with a client state at - // a given height. - rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/" - "{client_id}/revision/{revision_number}/" - "height/{revision_height}"; - } - - // ConsensusStates queries all the consensus state associated with a given - // client. - rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}"; - } - - // Status queries the status of an IBC client. - rpc ClientStatus(QueryClientStatusRequest) returns (QueryClientStatusResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; - } - - // ClientParams queries all parameters of the ibc client. - rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/client/v1/params"; - } - - // UpgradedClientState queries an Upgraded IBC light client. - rpc UpgradedClientState(QueryUpgradedClientStateRequest) returns (QueryUpgradedClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/upgraded_client_states"; - } - - // UpgradedConsensusState queries an Upgraded IBC consensus state. - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/upgraded_consensus_states"; - } -} - -// QueryClientStateRequest is the request type for the Query/ClientState RPC -// method -message QueryClientStateRequest { - // client state unique identifier - string client_id = 1; -} - -// QueryClientStateResponse is the response type for the Query/ClientState RPC -// method. Besides the client state, it includes a proof and the height from -// which the proof was retrieved. -message QueryClientStateResponse { - // client state associated with the request identifier - google.protobuf.Any client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -// method -message QueryClientStatesRequest { - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -// method. -message QueryClientStatesResponse { - // list of stored ClientStates of the chain. - repeated IdentifiedClientState client_states = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryConsensusStateRequest is the request type for the Query/ConsensusState -// RPC method. Besides the consensus state, it includes a proof and the height -// from which the proof was retrieved. -message QueryConsensusStateRequest { - // client identifier - string client_id = 1; - // consensus state revision number - uint64 revision_number = 2; - // consensus state revision height - uint64 revision_height = 3; - // latest_height overrrides the height field and queries the latest stored - // ConsensusState - bool latest_height = 4; -} - -// QueryConsensusStateResponse is the response type for the Query/ConsensusState -// RPC method -message QueryConsensusStateResponse { - // consensus state associated with the client identifier at the given height - google.protobuf.Any consensus_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -// RPC method. -message QueryConsensusStatesRequest { - // client identifier - string client_id = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConsensusStatesResponse is the response type for the -// Query/ConsensusStates RPC method -message QueryConsensusStatesResponse { - // consensus states associated with the identifier - repeated ConsensusStateWithHeight consensus_states = 1 [(gogoproto.nullable) = false]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -// method -message QueryClientStatusRequest { - // client unique identifier - string client_id = 1; -} - -// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -// method. It returns the current status of the IBC client. -message QueryClientStatusResponse { - string status = 1; -} - -// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -// method. -message QueryClientParamsRequest {} - -// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -// method. -message QueryClientParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} - -// QueryUpgradedClientStateRequest is the request type for the -// Query/UpgradedClientState RPC method -message QueryUpgradedClientStateRequest {} - -// QueryUpgradedClientStateResponse is the response type for the -// Query/UpgradedClientState RPC method. -message QueryUpgradedClientStateResponse { - // client state associated with the request identifier - google.protobuf.Any upgraded_client_state = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the -// Query/UpgradedConsensusState RPC method -message QueryUpgradedConsensusStateRequest {} - -// QueryUpgradedConsensusStateResponse is the response type for the -// Query/UpgradedConsensusState RPC method. -message QueryUpgradedConsensusStateResponse { - // Consensus state associated with the request identifier - google.protobuf.Any upgraded_consensus_state = 1; -} diff --git a/examples/interchainjs/proto/ibc/core/client/v1/tx.proto b/examples/interchainjs/proto/ibc/core/client/v1/tx.proto deleted file mode 100644 index 82df96de..00000000 --- a/examples/interchainjs/proto/ibc/core/client/v1/tx.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/02-client/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// Msg defines the ibc/client Msg service. -service Msg { - // CreateClient defines a rpc handler method for MsgCreateClient. - rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); - - // UpdateClient defines a rpc handler method for MsgUpdateClient. - rpc UpdateClient(MsgUpdateClient) returns (MsgUpdateClientResponse); - - // UpgradeClient defines a rpc handler method for MsgUpgradeClient. - rpc UpgradeClient(MsgUpgradeClient) returns (MsgUpgradeClientResponse); - - // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - rpc SubmitMisbehaviour(MsgSubmitMisbehaviour) returns (MsgSubmitMisbehaviourResponse); -} - -// MsgCreateClient defines a message to create an IBC client -message MsgCreateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // light client state - google.protobuf.Any client_state = 1 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // consensus state associated with the client that corresponds to a given - // height. - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // signer address - string signer = 3; -} - -// MsgCreateClientResponse defines the Msg/CreateClient response type. -message MsgCreateClientResponse {} - -// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -// the given header. -message MsgUpdateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // header to update the light client - google.protobuf.Any header = 2; - // signer address - string signer = 3; -} - -// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -message MsgUpdateClientResponse {} - -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -// state -message MsgUpgradeClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // upgraded client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // upgraded consensus state, only contains enough information to serve as a - // basis of trust in update logic - google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // proof that old chain committed to new client - bytes proof_upgrade_client = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade_client\""]; - // proof that old chain committed to new consensus state - bytes proof_upgrade_consensus_state = 5 [(gogoproto.moretags) = "yaml:\"proof_upgrade_consensus_state\""]; - // signer address - string signer = 6; -} - -// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -message MsgUpgradeClientResponse {} - -// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -// light client misbehaviour. -message MsgSubmitMisbehaviour { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // misbehaviour used for freezing the light client - google.protobuf.Any misbehaviour = 2; - // signer address - string signer = 3; -} - -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -// type. -message MsgSubmitMisbehaviourResponse {} diff --git a/examples/interchainjs/proto/ibc/core/commitment/v1/commitment.proto b/examples/interchainjs/proto/ibc/core/commitment/v1/commitment.proto deleted file mode 100644 index b460b9a1..00000000 --- a/examples/interchainjs/proto/ibc/core/commitment/v1/commitment.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package ibc.core.commitment.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/23-commitment/types"; - -import "gogoproto/gogo.proto"; -import "confio/proofs.proto"; - -// MerkleRoot defines a merkle root hash. -// In the Cosmos SDK, the AppHash of a block header becomes the root. -message MerkleRoot { - option (gogoproto.goproto_getters) = false; - - bytes hash = 1; -} - -// MerklePrefix is merkle path prefixed to the key. -// The constructed key from the Path and the key will be append(Path.KeyPath, -// append(Path.KeyPrefix, key...)) -message MerklePrefix { - bytes key_prefix = 1 [(gogoproto.moretags) = "yaml:\"key_prefix\""]; -} - -// MerklePath is the path used to verify commitment proofs, which can be an -// arbitrary structured object (defined by a commitment type). -// MerklePath is represented from root-to-leaf -message MerklePath { - option (gogoproto.goproto_stringer) = false; - - repeated string key_path = 1 [(gogoproto.moretags) = "yaml:\"key_path\""]; -} - -// MerkleProof is a wrapper type over a chain of CommitmentProofs. -// It demonstrates membership or non-membership for an element or set of -// elements, verifiable in conjunction with a known commitment root. Proofs -// should be succinct. -// MerkleProofs are ordered from leaf-to-root -message MerkleProof { - repeated ics23.CommitmentProof proofs = 1; -} diff --git a/examples/interchainjs/proto/ibc/core/connection/v1/connection.proto b/examples/interchainjs/proto/ibc/core/connection/v1/connection.proto deleted file mode 100644 index 74c39e26..00000000 --- a/examples/interchainjs/proto/ibc/core/connection/v1/connection.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/commitment/v1/commitment.proto"; - -// ICS03 - Connection Data Structures as defined in -// https://github.com/cosmos/ibc/blob/master/spec/core/ics-003-connection-semantics#data-structures - -// ConnectionEnd defines a stateful object on a chain connected to another -// separate one. -// NOTE: there must only be 2 defined ConnectionEnds to establish -// a connection between two chains. -message ConnectionEnd { - option (gogoproto.goproto_getters) = false; - // client associated with this connection. - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // IBC version which can be utilised to determine encodings or protocols for - // channels or packets utilising this connection. - repeated Version versions = 2; - // current state of the connection end. - State state = 3; - // counterparty chain associated with this connection. - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - // delay period that must pass before a consensus state can be used for - // packet-verification NOTE: delay period logic is only implemented by some - // clients. - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; -} - -// IdentifiedConnection defines a connection with additional connection -// identifier field. -message IdentifiedConnection { - option (gogoproto.goproto_getters) = false; - // connection identifier. - string id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; - // client associated with this connection. - string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // IBC version which can be utilised to determine encodings or protocols for - // channels or packets utilising this connection - repeated Version versions = 3; - // current state of the connection end. - State state = 4; - // counterparty chain associated with this connection. - Counterparty counterparty = 5 [(gogoproto.nullable) = false]; - // delay period associated with this connection. - uint64 delay_period = 6 [(gogoproto.moretags) = "yaml:\"delay_period\""]; -} - -// State defines if a connection is in one of the following states: -// INIT, TRYOPEN, OPEN or UNINITIALIZED. -enum State { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; - // A connection end has just started the opening handshake. - STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; - // A connection end has acknowledged the handshake step on the counterparty - // chain. - STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; - // A connection end has completed the handshake. - STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; -} - -// Counterparty defines the counterparty chain associated with a connection end. -message Counterparty { - option (gogoproto.goproto_getters) = false; - - // identifies the client on the counterparty chain associated with a given - // connection. - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // identifies the connection end on the counterparty chain associated with a - // given connection. - string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - // commitment merkle prefix of the counterparty chain. - ibc.core.commitment.v1.MerklePrefix prefix = 3 [(gogoproto.nullable) = false]; -} - -// ClientPaths define all the connection paths for a client state. -message ClientPaths { - // list of connection paths - repeated string paths = 1; -} - -// ConnectionPaths define all the connection paths for a given client state. -message ConnectionPaths { - // client state unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // list of connection paths - repeated string paths = 2; -} - -// Version defines the versioning scheme used to negotiate the IBC verison in -// the connection handshake. -message Version { - option (gogoproto.goproto_getters) = false; - - // unique version identifier - string identifier = 1; - // list of features compatible with the specified identifier - repeated string features = 2; -} - -// Params defines the set of Connection parameters. -message Params { - // maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - // largest amount of time that the chain might reasonably take to produce the next block under normal operating - // conditions. A safe choice is 3-5x the expected time per block. - uint64 max_expected_time_per_block = 1 [(gogoproto.moretags) = "yaml:\"max_expected_time_per_block\""]; -} diff --git a/examples/interchainjs/proto/ibc/core/connection/v1/genesis.proto b/examples/interchainjs/proto/ibc/core/connection/v1/genesis.proto deleted file mode 100644 index ec5be642..00000000 --- a/examples/interchainjs/proto/ibc/core/connection/v1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/connection/v1/connection.proto"; - -// GenesisState defines the ibc connection submodule's genesis state. -message GenesisState { - repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false]; - repeated ConnectionPaths client_connection_paths = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""]; - // the sequence for the next generated connection identifier - uint64 next_connection_sequence = 3 [(gogoproto.moretags) = "yaml:\"next_connection_sequence\""]; - Params params = 4 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/ibc/core/connection/v1/query.proto b/examples/interchainjs/proto/ibc/core/connection/v1/query.proto deleted file mode 100644 index d668c3d2..00000000 --- a/examples/interchainjs/proto/ibc/core/connection/v1/query.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/connection/v1/connection.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; - -// Query provides defines the gRPC querier service -service Query { - // Connection queries an IBC connection end. - rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}"; - } - - // Connections queries all the IBC connections of a chain. - rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections"; - } - - // ClientConnections queries the connection paths associated with a client - // state. - rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/client_connections/{client_id}"; - } - - // ConnectionClientState queries the client state associated with the - // connection. - rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/client_state"; - } - - // ConnectionConsensusState queries the consensus state associated with the - // connection. - rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" - "revision/{revision_number}/height/{revision_height}"; - } -} - -// QueryConnectionRequest is the request type for the Query/Connection RPC -// method -message QueryConnectionRequest { - // connection unique identifier - string connection_id = 1; -} - -// QueryConnectionResponse is the response type for the Query/Connection RPC -// method. Besides the connection end, it includes a proof and the height from -// which the proof was retrieved. -message QueryConnectionResponse { - // connection associated with the request identifier - ibc.core.connection.v1.ConnectionEnd connection = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionsRequest is the request type for the Query/Connections RPC -// method -message QueryConnectionsRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryConnectionsResponse is the response type for the Query/Connections RPC -// method. -message QueryConnectionsResponse { - // list of stored connections of the chain. - repeated ibc.core.connection.v1.IdentifiedConnection connections = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryClientConnectionsRequest is the request type for the -// Query/ClientConnections RPC method -message QueryClientConnectionsRequest { - // client identifier associated with a connection - string client_id = 1; -} - -// QueryClientConnectionsResponse is the response type for the -// Query/ClientConnections RPC method -message QueryClientConnectionsResponse { - // slice of all the connection paths associated with a client. - repeated string connection_paths = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was generated - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionClientStateRequest is the request type for the -// Query/ConnectionClientState RPC method -message QueryConnectionClientStateRequest { - // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; -} - -// QueryConnectionClientStateResponse is the response type for the -// Query/ConnectionClientState RPC method -message QueryConnectionClientStateResponse { - // client state associated with the channel - ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionConsensusStateRequest is the request type for the -// Query/ConnectionConsensusState RPC method -message QueryConnectionConsensusStateRequest { - // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - uint64 revision_number = 2; - uint64 revision_height = 3; -} - -// QueryConnectionConsensusStateResponse is the response type for the -// Query/ConnectionConsensusState RPC method -message QueryConnectionConsensusStateResponse { - // consensus state associated with the channel - google.protobuf.Any consensus_state = 1; - // client ID associated with the consensus state - string client_id = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/ibc/core/connection/v1/tx.proto b/examples/interchainjs/proto/ibc/core/connection/v1/tx.proto deleted file mode 100644 index 9d4e577e..00000000 --- a/examples/interchainjs/proto/ibc/core/connection/v1/tx.proto +++ /dev/null @@ -1,119 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/connection/v1/connection.proto"; - -// Msg defines the ibc/connection Msg service. -service Msg { - // ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. - rpc ConnectionOpenInit(MsgConnectionOpenInit) returns (MsgConnectionOpenInitResponse); - - // ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. - rpc ConnectionOpenTry(MsgConnectionOpenTry) returns (MsgConnectionOpenTryResponse); - - // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. - rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); - - // ConnectionOpenConfirm defines a rpc handler method for - // MsgConnectionOpenConfirm. - rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); -} - -// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -// initialize a connection with Chain B. -message MsgConnectionOpenInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - Counterparty counterparty = 2 [(gogoproto.nullable) = false]; - Version version = 3; - uint64 delay_period = 4 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - string signer = 5; -} - -// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -// type. -message MsgConnectionOpenInitResponse {} - -// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -// connection on Chain B. -message MsgConnectionOpenTry { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need - // the connection identifier of the previous connection in state INIT - string previous_connection_id = 2 [(gogoproto.moretags) = "yaml:\"previous_connection_id\""]; - google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; - ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - // proof of the initialization the connection on Chain A: `UNITIALIZED -> - // INIT` - bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - // proof of client state included in message - bytes proof_client = 9 [(gogoproto.moretags) = "yaml:\"proof_client\""]; - // proof of client consensus state - bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.core.client.v1.Height consensus_height = 11 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - string signer = 12; -} - -// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -message MsgConnectionOpenTryResponse {} - -// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -// acknowledge the change of connection state to TRYOPEN on Chain B. -message MsgConnectionOpenAck { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string counterparty_connection_id = 2 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - Version version = 3; - google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; - ibc.core.client.v1.Height proof_height = 5 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - // proof of the initialization the connection on Chain B: `UNITIALIZED -> - // TRYOPEN` - bytes proof_try = 6 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - // proof of client state included in message - bytes proof_client = 7 [(gogoproto.moretags) = "yaml:\"proof_client\""]; - // proof of client consensus state - bytes proof_consensus = 8 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.core.client.v1.Height consensus_height = 9 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - string signer = 10; -} - -// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -message MsgConnectionOpenAckResponse {} - -// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -// acknowledge the change of connection state to OPEN on Chain A. -message MsgConnectionOpenConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - // proof for the change of the connection state on Chain A: `INIT -> OPEN` - bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 4; -} - -// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -// response type. -message MsgConnectionOpenConfirmResponse {} diff --git a/examples/interchainjs/proto/ibc/core/port/v1/query.proto b/examples/interchainjs/proto/ibc/core/port/v1/query.proto deleted file mode 100644 index 3c7fb7cb..00000000 --- a/examples/interchainjs/proto/ibc/core/port/v1/query.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package ibc.core.port.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/05-port/types"; - -import "ibc/core/channel/v1/channel.proto"; - -// Query defines the gRPC querier service -service Query { - // AppVersion queries an IBC Port and determines the appropriate application version to be used - rpc AppVersion(QueryAppVersionRequest) returns (QueryAppVersionResponse) {} -} - -// QueryAppVersionRequest is the request type for the Query/AppVersion RPC method -message QueryAppVersionRequest { - // port unique identifier - string port_id = 1; - // connection unique identifier - string connection_id = 2; - // whether the channel is ordered or unordered - ibc.core.channel.v1.Order ordering = 3; - // counterparty channel end - ibc.core.channel.v1.Counterparty counterparty = 4; - // proposed version - string proposed_version = 5; -} - -// QueryAppVersionResponse is the response type for the Query/AppVersion RPC method. -message QueryAppVersionResponse { - // port id associated with the request identifiers - string port_id = 1; - // supported app version - string version = 2; -} diff --git a/examples/interchainjs/proto/ibc/core/types/v1/genesis.proto b/examples/interchainjs/proto/ibc/core/types/v1/genesis.proto deleted file mode 100644 index e39f6cdb..00000000 --- a/examples/interchainjs/proto/ibc/core/types/v1/genesis.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package ibc.core.types.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/genesis.proto"; -import "ibc/core/connection/v1/genesis.proto"; -import "ibc/core/channel/v1/genesis.proto"; - -// GenesisState defines the ibc module's genesis state. -message GenesisState { - // ICS002 - Clients genesis state - ibc.core.client.v1.GenesisState client_genesis = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""]; - // ICS003 - Connections genesis state - ibc.core.connection.v1.GenesisState connection_genesis = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""]; - // ICS004 - Channel genesis state - ibc.core.channel.v1.GenesisState channel_genesis = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""]; -} diff --git a/examples/interchainjs/proto/ibc/lightclients/localhost/v1/localhost.proto b/examples/interchainjs/proto/ibc/lightclients/localhost/v1/localhost.proto deleted file mode 100644 index 4fe05b78..00000000 --- a/examples/interchainjs/proto/ibc/lightclients/localhost/v1/localhost.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.localhost.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/light-clients/09-localhost/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; - -// ClientState defines a loopback (localhost) client. It requires (read-only) -// access to keys outside the client prefix. -message ClientState { - option (gogoproto.goproto_getters) = false; - // self chain ID - string chain_id = 1 [(gogoproto.moretags) = "yaml:\"chain_id\""]; - // self latest block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/examples/interchainjs/proto/ibc/lightclients/solomachine/v1/solomachine.proto deleted file mode 100644 index b9b8a3a2..00000000 --- a/examples/interchainjs/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/core/02-client/legacy/v100"; - -import "ibc/core/connection/v1/connection.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - uint64 frozen_sequence = 2 [(gogoproto.moretags) = "yaml:\"frozen_sequence\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // when set to true, will allow governance to update a solo machine client. - // The client will be unfrozen if it is frozen. - bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - uint64 sequence = 2; - SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - uint64 timestamp = 2; - string diversifier = 3; - // type of the data used - DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; - // marshaled data - bytes data = 5; -} - -// DataType defines the type of solo machine proof being created. This is done -// to preserve uniqueness of different data sign byte encodings. -enum DataType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Data type for client state verification - DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; - // Data type for consensus state verification - DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; - // Data type for connection state verification - DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; - // Data type for channel state verification - DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; - // Data type for packet commitment verification - DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; - // Data type for packet acknowledgement verification - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; - // Data type for packet receipt absence verification - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; - // Data type for next sequence recv verification - DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; - // Data type for header verification - DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// ClientStateData returns the SignBytes data for client state verification. -message ClientStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateData returns the SignBytes data for consensus state -// verification. -message ConsensusStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConnectionStateData returns the SignBytes data for connection state -// verification. -message ConnectionStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.connection.v1.ConnectionEnd connection = 2; -} - -// ChannelStateData returns the SignBytes data for channel state -// verification. -message ChannelStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.channel.v1.Channel channel = 2; -} - -// PacketCommitmentData returns the SignBytes data for packet commitment -// verification. -message PacketCommitmentData { - bytes path = 1; - bytes commitment = 2; -} - -// PacketAcknowledgementData returns the SignBytes data for acknowledgement -// verification. -message PacketAcknowledgementData { - bytes path = 1; - bytes acknowledgement = 2; -} - -// PacketReceiptAbsenceData returns the SignBytes data for -// packet receipt absence verification. -message PacketReceiptAbsenceData { - bytes path = 1; -} - -// NextSequenceRecvData returns the SignBytes data for verification of the next -// sequence to be received. -message NextSequenceRecvData { - bytes path = 1; - uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} diff --git a/examples/interchainjs/proto/ibc/lightclients/solomachine/v2/solomachine.proto b/examples/interchainjs/proto/ibc/lightclients/solomachine/v2/solomachine.proto deleted file mode 100644 index 0c8c638c..00000000 --- a/examples/interchainjs/proto/ibc/lightclients/solomachine/v2/solomachine.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v2; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/light-clients/06-solomachine/types"; - -import "ibc/core/connection/v1/connection.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - bool is_frozen = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // when set to true, will allow governance to update a solo machine client. - // The client will be unfrozen if it is frozen. - bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - uint64 sequence = 2; - SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - uint64 timestamp = 2; - string diversifier = 3; - // type of the data used - DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; - // marshaled data - bytes data = 5; -} - -// DataType defines the type of solo machine proof being created. This is done -// to preserve uniqueness of different data sign byte encodings. -enum DataType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Data type for client state verification - DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; - // Data type for consensus state verification - DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; - // Data type for connection state verification - DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; - // Data type for channel state verification - DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; - // Data type for packet commitment verification - DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; - // Data type for packet acknowledgement verification - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; - // Data type for packet receipt absence verification - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; - // Data type for next sequence recv verification - DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; - // Data type for header verification - DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// ClientStateData returns the SignBytes data for client state verification. -message ClientStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateData returns the SignBytes data for consensus state -// verification. -message ConsensusStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConnectionStateData returns the SignBytes data for connection state -// verification. -message ConnectionStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.connection.v1.ConnectionEnd connection = 2; -} - -// ChannelStateData returns the SignBytes data for channel state -// verification. -message ChannelStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.channel.v1.Channel channel = 2; -} - -// PacketCommitmentData returns the SignBytes data for packet commitment -// verification. -message PacketCommitmentData { - bytes path = 1; - bytes commitment = 2; -} - -// PacketAcknowledgementData returns the SignBytes data for acknowledgement -// verification. -message PacketAcknowledgementData { - bytes path = 1; - bytes acknowledgement = 2; -} - -// PacketReceiptAbsenceData returns the SignBytes data for -// packet receipt absence verification. -message PacketReceiptAbsenceData { - bytes path = 1; -} - -// NextSequenceRecvData returns the SignBytes data for verification of the next -// sequence to be received. -message NextSequenceRecvData { - bytes path = 1; - uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} diff --git a/examples/interchainjs/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/examples/interchainjs/proto/ibc/lightclients/tendermint/v1/tendermint.proto deleted file mode 100644 index 54e229b2..00000000 --- a/examples/interchainjs/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ /dev/null @@ -1,115 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.tendermint.v1; - -option go_package = "github.com/cosmos/ibc-go/v2/modules/light-clients/07-tendermint/types"; - -import "tendermint/types/validator.proto"; -import "tendermint/types/types.proto"; -import "confio/proofs.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/commitment/v1/commitment.proto"; -import "gogoproto/gogo.proto"; - -// ClientState from Tendermint tracks the current validator set, latest height, -// and a possible frozen height. -message ClientState { - option (gogoproto.goproto_getters) = false; - - string chain_id = 1; - Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""]; - // duration of the period since the LastestTimestamp during which the - // submitted headers are valid for upgrade - google.protobuf.Duration trusting_period = 3 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""]; - // duration of the staking unbonding period - google.protobuf.Duration unbonding_period = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"unbonding_period\"" - ]; - // defines how much new (untrusted) header's Time can drift into the future. - google.protobuf.Duration max_clock_drift = 5 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; - // Block height when the client was frozen due to a misbehaviour - ibc.core.client.v1.Height frozen_height = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; - // Latest height the client was updated to - ibc.core.client.v1.Height latest_height = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; - - // Proof specifications used in verifying counterparty state - repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; - - // Path at which next upgraded client will be committed. - // Each element corresponds to the key for a single CommitmentProof in the - // chained proof. NOTE: ClientState must stored under - // `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - // under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - // the default upgrade module, upgrade_path should be []string{"upgrade", - // "upgradedIBCState"}` - repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; - - // This flag, when set to true, will allow governance to recover a client - // which has expired - bool allow_update_after_expiry = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; - // This flag, when set to true, will allow governance to unfreeze a client - // whose chain has experienced a misbehaviour event - bool allow_update_after_misbehaviour = 11 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; -} - -// ConsensusState defines the consensus state from Tendermint. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - - // timestamp that corresponds to the block height in which the ConsensusState - // was stored. - google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // commitment root (i.e app hash) - ibc.core.commitment.v1.MerkleRoot root = 2 [(gogoproto.nullable) = false]; - bytes next_validators_hash = 3 [ - (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", - (gogoproto.moretags) = "yaml:\"next_validators_hash\"" - ]; -} - -// Misbehaviour is a wrapper over two conflicting Headers -// that implements Misbehaviour interface expected by ICS-02 -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; - Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; -} - -// Header defines the Tendermint client consensus Header. -// It encapsulates all the information necessary to update from a trusted -// Tendermint ConsensusState. The inclusion of TrustedHeight and -// TrustedValidators allows this update to process correctly, so long as the -// ConsensusState for the TrustedHeight exists, this removes race conditions -// among relayers The SignedHeader and ValidatorSet are the new untrusted update -// fields for the client. The TrustedHeight is the height of a stored -// ConsensusState on the client that will be used to verify the new untrusted -// header. The Trusted ConsensusState must be within the unbonding period of -// current time in order to correctly verify, and the TrustedValidators must -// hash to TrustedConsensusState.NextValidatorsHash since that is the last -// trusted validator set at the TrustedHeight. -message Header { - .tendermint.types.SignedHeader signed_header = 1 - [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""]; - - .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; - ibc.core.client.v1.Height trusted_height = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; - .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; -} - -// Fraction defines the protobuf message type for tmmath.Fraction that only -// supports positive values. -message Fraction { - uint64 numerator = 1; - uint64 denominator = 2; -} diff --git a/examples/interchainjs/proto/osmosis/claim/v1beta1/claim.proto b/examples/interchainjs/proto/osmosis/claim/v1beta1/claim.proto deleted file mode 100644 index 47e824ab..00000000 --- a/examples/interchainjs/proto/osmosis/claim/v1beta1/claim.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package osmosis.claim.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/genesis.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v7/x/claim/types"; - -enum Action { - option (gogoproto.goproto_enum_prefix) = false; - - ActionAddLiquidity = 0; - ActionSwap = 1; - ActionVote = 2; - ActionDelegateStake = 3; -} - -// A Claim Records is the metadata of claim data per address -message ClaimRecord { - // address of claim user - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - - // total initial claimable amount for the user - repeated cosmos.base.v1beta1.Coin initial_claimable_amount = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_claimable_amount\"" - ]; - - // true if action is completed - // index of bool in array refers to action enum # - repeated bool action_completed = 3 - [ (gogoproto.moretags) = "yaml:\"action_completed\"" ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/claim/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/claim/v1beta1/genesis.proto deleted file mode 100644 index 1166a25c..00000000 --- a/examples/interchainjs/proto/osmosis/claim/v1beta1/genesis.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package osmosis.claim.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/genesis.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "osmosis/claim/v1beta1/claim.proto"; -import "osmosis/claim/v1beta1/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v7/x/claim/types"; - -// GenesisState defines the claim module's genesis state. -message GenesisState { - // balance of the claim module's account - cosmos.base.v1beta1.Coin module_account_balance = 1 [ - (gogoproto.moretags) = "yaml:\"module_account_balance\"", - (gogoproto.nullable) = false - ]; - - // params defines all the parameters of the module. - Params params = 2 [ - (gogoproto.moretags) = "yaml:\"params\"", - (gogoproto.nullable) = false - ]; - - // list of claim records, one for every airdrop recipient - repeated ClaimRecord claim_records = 3 [ - (gogoproto.moretags) = "yaml:\"claim_records\"", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/claim/v1beta1/params.proto b/examples/interchainjs/proto/osmosis/claim/v1beta1/params.proto deleted file mode 100644 index 3398b0da..00000000 --- a/examples/interchainjs/proto/osmosis/claim/v1beta1/params.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package osmosis.claim.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v7/x/claim/types"; - -// Params defines the claim module's parameters. -message Params { - google.protobuf.Timestamp airdrop_start_time = 1 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"airdrop_start_time\"" - ]; - google.protobuf.Duration duration_until_decay = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration_until_decay,omitempty", - (gogoproto.moretags) = "yaml:\"duration_until_decay\"" - ]; - google.protobuf.Duration duration_of_decay = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration_of_decay,omitempty", - (gogoproto.moretags) = "yaml:\"duration_of_decay\"" - ]; - // denom of claimable asset - string claim_denom = 4; -} diff --git a/examples/interchainjs/proto/osmosis/claim/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/claim/v1beta1/query.proto deleted file mode 100644 index cca55759..00000000 --- a/examples/interchainjs/proto/osmosis/claim/v1beta1/query.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; -package osmosis.claim.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "osmosis/claim/v1beta1/claim.proto"; -import "osmosis/claim/v1beta1/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v7/x/claim/types"; - -// Query defines the gRPC querier service. -service Query { - rpc ModuleAccountBalance(QueryModuleAccountBalanceRequest) - returns (QueryModuleAccountBalanceResponse) { - option (google.api.http).get = - "/osmosis/claim/v1beta1/module_account_balance"; - } - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/claim/v1beta1/params"; - } - rpc ClaimRecord(QueryClaimRecordRequest) returns (QueryClaimRecordResponse) { - option (google.api.http).get = - "/osmosis/claim/v1beta1/claim_record/{address}"; - } - rpc ClaimableForAction(QueryClaimableForActionRequest) - returns (QueryClaimableForActionResponse) { - option (google.api.http).get = - "/osmosis/claim/v1beta1/claimable_for_action/{address}/{action}"; - } - rpc TotalClaimable(QueryTotalClaimableRequest) - returns (QueryTotalClaimableResponse) { - option (google.api.http).get = - "/osmosis/claim/v1beta1/total_claimable/{address}"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryModuleAccountBalanceRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryModuleAccountBalanceResponse { - // params defines the parameters of the module. - repeated cosmos.base.v1beta1.Coin moduleAccountBalance = 1 [ - (gogoproto.moretags) = "yaml:\"coins\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryClaimRecordRequest { - string address = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; -} - -message QueryClaimRecordResponse { - ClaimRecord claim_record = 1 [ - (gogoproto.moretags) = "yaml:\"claim_record\"", - (gogoproto.nullable) = false - ]; -} - -message QueryClaimableForActionRequest { - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - Action action = 2 [ (gogoproto.moretags) = "yaml:\"action\"" ]; -} - -message QueryClaimableForActionResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.moretags) = "yaml:\"coins\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message QueryTotalClaimableRequest { - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; -} - -message QueryTotalClaimableResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.moretags) = "yaml:\"coins\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/epochs/genesis.proto b/examples/interchainjs/proto/osmosis/epochs/genesis.proto deleted file mode 100644 index f8a2754b..00000000 --- a/examples/interchainjs/proto/osmosis/epochs/genesis.proto +++ /dev/null @@ -1,72 +0,0 @@ -syntax = "proto3"; -package osmosis.epochs.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/epochs/types"; - -// EpochInfo is a struct that describes the data going into -// a timer defined by the x/epochs module. -message EpochInfo { - // identifier is a unique reference to this particular timer. - string identifier = 1; - // start_time is the time at which the timer first ever ticks. - // If start_time is in the future, the epoch will not begin until the start - // time. - google.protobuf.Timestamp start_time = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; - // duration is the time in between epoch ticks. - // In order for intended behavior to be met, duration should - // be greater than the chains expected block time. - // Duration must be non-zero. - google.protobuf.Duration duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - // current_epoch is the current epoch number, or in other words, - // how many times has the timer 'ticked'. - // The first tick (current_epoch=1) is defined as - // the first block whose blocktime is greater than the EpochInfo start_time. - int64 current_epoch = 4; - // current_epoch_start_time describes the start time of the current timer - // interval. The interval is (current_epoch_start_time, - // current_epoch_start_time + duration] When the timer ticks, this is set to - // current_epoch_start_time = last_epoch_start_time + duration only one timer - // tick for a given identifier can occur per block. - // - // NOTE! The current_epoch_start_time may diverge significantly from the - // wall-clock time the epoch began at. Wall-clock time of epoch start may be - // >> current_epoch_start_time. Suppose current_epoch_start_time = 10, - // duration = 5. Suppose the chain goes offline at t=14, and comes back online - // at t=30, and produces blocks at every successive time. (t=31, 32, etc.) - // * The t=30 block will start the epoch for (10, 15] - // * The t=31 block will start the epoch for (15, 20] - // * The t=32 block will start the epoch for (20, 25] - // * The t=33 block will start the epoch for (25, 30] - // * The t=34 block will start the epoch for (30, 35] - // * The **t=36** block will start the epoch for (35, 40] - google.protobuf.Timestamp current_epoch_start_time = 5 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"current_epoch_start_time\"" - ]; - // epoch_counting_started is a boolean, that indicates whether this - // epoch timer has began yet. - bool epoch_counting_started = 6; - reserved 7; - // current_epoch_start_height is the block height at which the current epoch - // started. (The block height at which the timer last ticked) - int64 current_epoch_start_height = 8; -} - -// GenesisState defines the epochs module's genesis state. -message GenesisState { - repeated EpochInfo epochs = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/epochs/query.proto b/examples/interchainjs/proto/osmosis/epochs/query.proto deleted file mode 100644 index 9fde25db..00000000 --- a/examples/interchainjs/proto/osmosis/epochs/query.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package osmosis.epochs.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "osmosis/epochs/genesis.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/epochs/types"; - -// Query defines the gRPC querier service. -service Query { - // EpochInfos provide running epochInfos - rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) { - option (google.api.http).get = "/osmosis/epochs/v1beta1/epochs"; - } - // CurrentEpoch provide current epoch of specified identifier - rpc CurrentEpoch(QueryCurrentEpochRequest) - returns (QueryCurrentEpochResponse) { - option (google.api.http).get = "/osmosis/epochs/v1beta1/current_epoch"; - } -} - -message QueryEpochsInfoRequest {} -message QueryEpochsInfoResponse { - repeated EpochInfo epochs = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryCurrentEpochRequest { string identifier = 1; } -message QueryCurrentEpochResponse { int64 current_epoch = 1; } \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/gamm/pool-models/balancer/balancerPool.proto b/examples/interchainjs/proto/osmosis/gamm/pool-models/balancer/balancerPool.proto deleted file mode 100644 index 6ee8f133..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/pool-models/balancer/balancerPool.proto +++ /dev/null @@ -1,151 +0,0 @@ -syntax = "proto3"; -// this is a legacy package that requires additional migration logic -// in order to use the correct packge. Decision made to use legacy package path -// until clear steps for migration logic and the unknowns for state breaking are -// investigated for changing proto package. -package osmosis.gamm.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer"; - -// Parameters for changing the weights in a balancer pool smoothly from -// a start weight and end weight over a period of time. -// Currently, the only smooth change supported is linear changing between -// the two weights, but more types may be added in the future. -// When these parameters are set, the weight w(t) for pool time `t` is the -// following: -// t <= start_time: w(t) = initial_pool_weights -// start_time < t <= start_time + duration: -// w(t) = initial_pool_weights + (t - start_time) * -// (target_pool_weights - initial_pool_weights) / (duration) -// t > start_time + duration: w(t) = target_pool_weights -message SmoothWeightChangeParams { - // The start time for beginning the weight change. - // If a parameter change / pool instantiation leaves this blank, - // it should be generated by the state_machine as the current time. - google.protobuf.Timestamp start_time = 1 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; - // Duration for the weights to change over - google.protobuf.Duration duration = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - // The initial pool weights. These are copied from the pool's settings - // at the time of weight change instantiation. - // The amount PoolAsset.token.amount field is ignored if present, - // future type refactorings should just have a type with the denom & weight - // here. - repeated osmosis.gamm.v1beta1.PoolAsset initial_pool_weights = 3 [ - (gogoproto.moretags) = "yaml:\"initial_pool_weights\"", - (gogoproto.nullable) = false - ]; - // The target pool weights. The pool weights will change linearly with respect - // to time between start_time, and start_time + duration. The amount - // PoolAsset.token.amount field is ignored if present, future type - // refactorings should just have a type with the denom & weight here. - repeated osmosis.gamm.v1beta1.PoolAsset target_pool_weights = 4 [ - (gogoproto.moretags) = "yaml:\"target_pool_weights\"", - (gogoproto.nullable) = false - ]; - // Intermediate variable for the 'slope' of pool weights. This is equal to - // (target_pool_weights - initial_pool_weights) / (duration) - // TODO: Work out precision, and decide if this is good to add - // repeated PoolAsset poolWeightSlope = 5 [ - // (gogoproto.moretags) = "yaml:\"pool_weight_slope\"", - // (gogoproto.nullable) = false - // ]; -} - -// PoolParams defined the parameters that will be managed by the pool -// governance in the future. This params are not managed by the chain -// governance. Instead they will be managed by the token holders of the pool. -// The pool's token holders are specified in future_pool_governor. -message PoolParams { - string swap_fee = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"swap_fee\"", - (gogoproto.nullable) = false - ]; - string exit_fee = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"exit_fee\"", - (gogoproto.nullable) = false - ]; - SmoothWeightChangeParams smooth_weight_change_params = 3 [ - (gogoproto.moretags) = "yaml:\"smooth_weight_change_params\"", - (gogoproto.nullable) = true - ]; -} - -// Pool asset is an internal struct that combines the amount of the -// token in the pool, and its balancer weight. -// This is an awkward packaging of data, -// and should be revisited in a future state migration. -message PoolAsset { - // Coins we are talking about, - // the denomination must be unique amongst all PoolAssets for this pool. - cosmos.base.v1beta1.Coin token = 1 - [ (gogoproto.moretags) = "yaml:\"token\"", (gogoproto.nullable) = false ]; - // Weight that is not normalized. This weight must be less than 2^50 - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.nullable) = false - ]; -} - -message Pool { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "PoolI"; - - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - uint64 id = 2; - - PoolParams pool_params = 3 [ - (gogoproto.moretags) = "yaml:\"balancer_pool_params\"", - (gogoproto.nullable) = false - ]; - - // This string specifies who will govern the pool in the future. - // Valid forms of this are: - // {token name},{duration} - // {duration} - // where {token name} if specified is the token which determines the - // governor, and if not specified is the LP token for this pool.duration is - // a time specified as 0w,1w,2w, etc. which specifies how long the token - // would need to be locked up to count in governance. 0w means no lockup. - // TODO: Further improve these docs - string future_pool_governor = 4 - [ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ]; - // sum of all LP tokens sent out - cosmos.base.v1beta1.Coin total_shares = 5 [ - (gogoproto.moretags) = "yaml:\"total_shares\"", - (gogoproto.nullable) = false - ]; - // These are assumed to be sorted by denomiation. - // They contain the pool asset and the information about the weight - repeated osmosis.gamm.v1beta1.PoolAsset pool_assets = 6 [ - (gogoproto.moretags) = "yaml:\"pool_assets\"", - (gogoproto.nullable) = false - ]; - // sum of all non-normalized pool weights - string total_weight = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"total_weight\"", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/gamm/pool-models/balancer/tx/tx.proto b/examples/interchainjs/proto/osmosis/gamm/pool-models/balancer/tx/tx.proto deleted file mode 100644 index 5ed0fdc0..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/pool-models/balancer/tx/tx.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.poolmodels.balancer.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/gamm/pool-models/balancer/balancerPool.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer"; - -service Msg { - rpc CreateBalancerPool(MsgCreateBalancerPool) - returns (MsgCreateBalancerPoolResponse); -} - -// ===================== MsgCreatePool -message MsgCreateBalancerPool { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - - osmosis.gamm.v1beta1.PoolParams pool_params = 2 - [ (gogoproto.moretags) = "yaml:\"pool_params\"" ]; - - repeated osmosis.gamm.v1beta1.PoolAsset pool_assets = 3 - [ (gogoproto.nullable) = false ]; - - string future_pool_governor = 4 - [ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ]; -} - -// Returns the poolID -message MsgCreateBalancerPoolResponse { - uint64 pool_id = 1 [ (gogoproto.customname) = "PoolID" ]; -} diff --git a/examples/interchainjs/proto/osmosis/gamm/pool-models/stableswap/stableswap_pool.proto b/examples/interchainjs/proto/osmosis/gamm/pool-models/stableswap/stableswap_pool.proto deleted file mode 100644 index 582a37b3..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/pool-models/stableswap/stableswap_pool.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.poolmodels.stableswap.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/stableswap"; - -// PoolParams defined the parameters that will be managed by the pool -// governance in the future. This params are not managed by the chain -// governance. Instead they will be managed by the token holders of the pool. -// The pool's token holders are specified in future_pool_governor. -message PoolParams { - string swap_fee = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"swap_fee\"", - (gogoproto.nullable) = false - ]; - string exit_fee = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"exit_fee\"", - (gogoproto.nullable) = false - ]; -} - -// Pool is the stableswap Pool struct -message Pool { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "PoolI"; - - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - uint64 id = 2; - - PoolParams pool_params = 3 [ - (gogoproto.moretags) = "yaml:\"stableswap_pool_params\"", - (gogoproto.nullable) = false - ]; - - // This string specifies who will govern the pool in the future. - // Valid forms of this are: - // {token name},{duration} - // {duration} - // where {token name} if specified is the token which determines the - // governor, and if not specified is the LP token for this pool.duration is - // a time specified as 0w,1w,2w, etc. which specifies how long the token - // would need to be locked up to count in governance. 0w means no lockup. - string future_pool_governor = 4 - [ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ]; - // sum of all LP shares - cosmos.base.v1beta1.Coin total_shares = 5 [ - (gogoproto.moretags) = "yaml:\"total_shares\"", - (gogoproto.nullable) = false - ]; - // assets in the pool - repeated cosmos.base.v1beta1.Coin pool_liquidity = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // for calculation amognst assets with different precisions - repeated uint64 scaling_factors = 7 - [ (gogoproto.moretags) = "yaml:\"stableswap_scaling_factors\"" ]; - // scaling_factor_controller is the address can adjust pool scaling factors - string scaling_factor_controller = 8 - [ (gogoproto.moretags) = "yaml:\"scaling_factor_controller\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/gamm/pool-models/stableswap/tx.proto b/examples/interchainjs/proto/osmosis/gamm/pool-models/stableswap/tx.proto deleted file mode 100644 index 73a74b06..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/pool-models/stableswap/tx.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.poolmodels.stableswap.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "osmosis/gamm/pool-models/stableswap/stableswap_pool.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/stableswap"; - -service Msg { - rpc CreateStableswapPool(MsgCreateStableswapPool) - returns (MsgCreateStableswapPoolResponse); - rpc StableSwapAdjustScalingFactors(MsgStableSwapAdjustScalingFactors) - returns (MsgStableSwapAdjustScalingFactorsResponse); -} - -// ===================== MsgCreatePool -message MsgCreateStableswapPool { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - - PoolParams pool_params = 2 [ (gogoproto.moretags) = "yaml:\"pool_params\"" ]; - - repeated cosmos.base.v1beta1.Coin initial_pool_liquidity = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - repeated uint64 scaling_factors = 4 - [ (gogoproto.moretags) = "yaml:\"stableswap_scaling_factor\"" ]; - - string future_pool_governor = 5 - [ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ]; - - string scaling_factor_controller = 6 - [ (gogoproto.moretags) = "yaml:\"scaling_factor_controller\"" ]; -} - -// Returns a poolID with custom poolName. -message MsgCreateStableswapPoolResponse { - uint64 pool_id = 1 [ (gogoproto.customname) = "PoolID" ]; -} - -// Sender must be the pool's scaling_factor_governor in order for the tx to -// succeed. Adjusts stableswap scaling factors. -message MsgStableSwapAdjustScalingFactors { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.customname) = "PoolID" ]; - - repeated uint64 scaling_factors = 3 - [ (gogoproto.moretags) = "yaml:\"stableswap_scaling_factor\"" ]; -} - -message MsgStableSwapAdjustScalingFactorsResponse {} diff --git a/examples/interchainjs/proto/osmosis/gamm/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/gamm/v1beta1/genesis.proto deleted file mode 100644 index d2d71c0e..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/v1beta1/genesis.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Params holds parameters for the incentives module -message Params { - repeated cosmos.base.v1beta1.Coin pool_creation_fee = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"pool_creation_fee\"", - (gogoproto.nullable) = false - ]; -} - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/types"; - -// GenesisState defines the gamm module's genesis state. -message GenesisState { - repeated google.protobuf.Any pools = 1 - [ (cosmos_proto.accepts_interface) = "PoolI" ]; - // will be renamed to next_pool_id in an upcoming version - uint64 next_pool_number = 2; - Params params = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/gamm/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/gamm/v1beta1/query.proto deleted file mode 100644 index 9d6a521c..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/v1beta1/query.proto +++ /dev/null @@ -1,308 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/gamm/v1beta1/tx.proto"; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/types"; - -service Query { - rpc Pools(QueryPoolsRequest) returns (QueryPoolsResponse) { - option (google.api.http).get = "/osmosis/gamm/v1beta1/pools"; - } - - rpc NumPools(QueryNumPoolsRequest) returns (QueryNumPoolsResponse) { - option (google.api.http).get = "/osmosis/gamm/v1beta1/num_pools"; - } - - rpc TotalLiquidity(QueryTotalLiquidityRequest) - returns (QueryTotalLiquidityResponse) { - option (google.api.http).get = "/osmosis/gamm/v1beta1/total_liquidity"; - } - - // PoolsWithFilter allows you to query specific pools with requested - // parameters - rpc PoolsWithFilter(QueryPoolsWithFilterRequest) - returns (QueryPoolsWithFilterResponse) { - option (google.api.http).get = "/osmosis/gamm/v1beta1/filtered_pools"; - } - - // Per Pool gRPC Endpoints - rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/osmosis/gamm/v1beta1/pools/{pool_id}"; - } - - // PoolType returns the type of the pool. - // Returns "Balancer" as a string literal when the pool is a balancer pool. - // Errors if the pool is failed to be type caseted. - rpc PoolType(QueryPoolTypeRequest) returns (QueryPoolTypeResponse) { - option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; - } - - // Simulates joining pool without a swap. Returns the amount of shares you'd - // get and tokens needed to provide - rpc CalcJoinPoolNoSwapShares(QueryCalcJoinPoolNoSwapSharesRequest) - returns (QueryCalcJoinPoolNoSwapSharesResponse) {} - - rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) - returns (QueryCalcJoinPoolSharesResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/pools/{pool_id}/join_swap_exact_in"; - } - rpc CalcExitPoolCoinsFromShares(QueryCalcExitPoolCoinsFromSharesRequest) - returns (QueryCalcExitPoolCoinsFromSharesResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/pools/{pool_id}/exit_swap_share_amount_in"; - } - - rpc PoolParams(QueryPoolParamsRequest) returns (QueryPoolParamsResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/pools/{pool_id}/params"; - } - - rpc TotalPoolLiquidity(QueryTotalPoolLiquidityRequest) - returns (QueryTotalPoolLiquidityResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/pools/{pool_id}/total_pool_liquidity"; - } - - rpc TotalShares(QueryTotalSharesRequest) returns (QueryTotalSharesResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/pools/{pool_id}/total_shares"; - } - - // SpotPrice defines a gRPC query handler that returns the spot price given - // a base denomination and a quote denomination. - rpc SpotPrice(QuerySpotPriceRequest) returns (QuerySpotPriceResponse) { - option deprecated = true; - option (google.api.http).get = - "/osmosis/gamm/v1beta1/pools/{pool_id}/prices"; - } - - // Estimate the swap. - rpc EstimateSwapExactAmountIn(QuerySwapExactAmountInRequest) - returns (QuerySwapExactAmountInResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/{pool_id}/estimate/swap_exact_amount_in"; - } - - rpc EstimateSwapExactAmountOut(QuerySwapExactAmountOutRequest) - returns (QuerySwapExactAmountOutResponse) { - option (google.api.http).get = - "/osmosis/gamm/v1beta1/{pool_id}/estimate/swap_exact_amount_out"; - } -} - -//=============================== Pool -message QueryPoolRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} -message QueryPoolResponse { - google.protobuf.Any pool = 1 [ (cosmos_proto.accepts_interface) = "PoolI" ]; -} - -//=============================== Pools -message QueryPoolsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} -message QueryPoolsResponse { - repeated google.protobuf.Any pools = 1 - [ (cosmos_proto.accepts_interface) = "PoolI" ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -//=============================== NumPools -message QueryNumPoolsRequest {} -message QueryNumPoolsResponse { - uint64 num_pools = 1 [ (gogoproto.moretags) = "yaml:\"num_pools\"" ]; -} - -//=============================== PoolType -message QueryPoolTypeRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} -message QueryPoolTypeResponse { - string pool_type = 1 [ (gogoproto.moretags) = "yaml:\"pool_type\"" ]; -} - -//=============================== CalcJoinPoolShares -message QueryCalcJoinPoolSharesRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; -} -message QueryCalcJoinPoolSharesResponse { - string share_out_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_out_amount\"", - (gogoproto.nullable) = false - ]; - repeated cosmos.base.v1beta1.Coin tokens_out = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; -} - -//=============================== CalcExitPoolCoinsFromShares -message QueryCalcExitPoolCoinsFromSharesRequest { - uint64 pool_id = 1; - string share_in_amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} -message QueryCalcExitPoolCoinsFromSharesResponse { - repeated cosmos.base.v1beta1.Coin tokens_out = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; -} - -//=============================== PoolParams -message QueryPoolParamsRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} -message QueryPoolParamsResponse { google.protobuf.Any params = 1; } - -//=============================== PoolLiquidity -message QueryTotalPoolLiquidityRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} - -message QueryTotalPoolLiquidityResponse { - repeated cosmos.base.v1beta1.Coin liquidity = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"liquidity\"", - (gogoproto.nullable) = false - ]; -} - -//=============================== TotalShares -message QueryTotalSharesRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} -message QueryTotalSharesResponse { - cosmos.base.v1beta1.Coin total_shares = 1 [ - (gogoproto.moretags) = "yaml:\"total_shares\"", - (gogoproto.nullable) = false - ]; -} -//=============================== CalcJoinPoolNoSwapShares -message QueryCalcJoinPoolNoSwapSharesRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; -} -message QueryCalcJoinPoolNoSwapSharesResponse { - repeated cosmos.base.v1beta1.Coin tokens_out = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"tokens_out\"", - (gogoproto.nullable) = false - ]; - string shares_out = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} -// QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice -// query. -message QuerySpotPriceRequest { - option deprecated = true; - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string base_asset_denom = 2 - [ (gogoproto.moretags) = "yaml:\"base_asset_denom\"" ]; - string quote_asset_denom = 3 - [ (gogoproto.moretags) = "yaml:\"quote_asset_denom\"" ]; - reserved 4; - reserved "withSwapFee"; -} - -//=============================== PoolsWithFilter - -message QueryPoolsWithFilterRequest { - repeated cosmos.base.v1beta1.Coin min_liquidity = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"min_liquidity\"", - (gogoproto.nullable) = false - ]; - string pool_type = 2; - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -message QueryPoolsWithFilterResponse { - repeated google.protobuf.Any pools = 1 - [ (cosmos_proto.accepts_interface) = "PoolI" ]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice -// query. -message QuerySpotPriceResponse { - option deprecated = true; - // String of the Dec. Ex) 10.203uatom - string spot_price = 1 [ (gogoproto.moretags) = "yaml:\"spot_price\"" ]; -} - -//=============================== EstimateSwapExactAmountIn -message QuerySwapExactAmountInRequest { - // TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string token_in = 3 [ (gogoproto.moretags) = "yaml:\"token_in\"" ]; - repeated SwapAmountInRoute routes = 4 [ - (gogoproto.moretags) = "yaml:\"routes\"", - (gogoproto.nullable) = false - ]; -} - -message QuerySwapExactAmountInResponse { - string token_out_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_out_amount\"", - (gogoproto.nullable) = false - ]; -} - -//=============================== EstimateSwapExactAmountOut -message QuerySwapExactAmountOutRequest { - // TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - repeated SwapAmountOutRoute routes = 3 [ - (gogoproto.moretags) = "yaml:\"routes\"", - (gogoproto.nullable) = false - ]; - string token_out = 4 [ (gogoproto.moretags) = "yaml:\"token_out\"" ]; -} - -message QuerySwapExactAmountOutResponse { - string token_in_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_in_amount\"", - (gogoproto.nullable) = false - ]; -} - -message QueryTotalLiquidityRequest {} - -message QueryTotalLiquidityResponse { - repeated cosmos.base.v1beta1.Coin liquidity = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"liquidity\"", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/gamm/v1beta1/tx.proto b/examples/interchainjs/proto/osmosis/gamm/v1beta1/tx.proto deleted file mode 100644 index 1421e624..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/v1beta1/tx.proto +++ /dev/null @@ -1,237 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/types"; - -service Msg { - rpc JoinPool(MsgJoinPool) returns (MsgJoinPoolResponse); - rpc ExitPool(MsgExitPool) returns (MsgExitPoolResponse); - rpc SwapExactAmountIn(MsgSwapExactAmountIn) - returns (MsgSwapExactAmountInResponse); - rpc SwapExactAmountOut(MsgSwapExactAmountOut) - returns (MsgSwapExactAmountOutResponse); - rpc JoinSwapExternAmountIn(MsgJoinSwapExternAmountIn) - returns (MsgJoinSwapExternAmountInResponse); - rpc JoinSwapShareAmountOut(MsgJoinSwapShareAmountOut) - returns (MsgJoinSwapShareAmountOutResponse); - rpc ExitSwapExternAmountOut(MsgExitSwapExternAmountOut) - returns (MsgExitSwapExternAmountOutResponse); - rpc ExitSwapShareAmountIn(MsgExitSwapShareAmountIn) - returns (MsgExitSwapShareAmountInResponse); -} - -// ===================== MsgJoinPool -// This is really MsgJoinPoolNoSwap -message MsgJoinPool { - - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string share_out_amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"pool_amount_out\"", - (gogoproto.nullable) = false - ]; - repeated cosmos.base.v1beta1.Coin token_in_maxs = 4 [ - (gogoproto.moretags) = "yaml:\"token_in_max_amounts\"", - (gogoproto.nullable) = false - ]; -} - -message MsgJoinPoolResponse { - string share_out_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_out_amount\"", - (gogoproto.nullable) = false - ]; - repeated cosmos.base.v1beta1.Coin token_in = 2 [ - (gogoproto.moretags) = "yaml:\"token_in\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgExitPool -message MsgExitPool { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string share_in_amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_in_amount\"", - (gogoproto.nullable) = false - ]; - - repeated cosmos.base.v1beta1.Coin token_out_mins = 4 [ - (gogoproto.moretags) = "yaml:\"token_out_min_amounts\"", - (gogoproto.nullable) = false - ]; -} - -message MsgExitPoolResponse { - repeated cosmos.base.v1beta1.Coin token_out = 1 [ - (gogoproto.moretags) = "yaml:\"token_out\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgSwapExactAmountIn -message SwapAmountInRoute { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string token_out_denom = 2 - [ (gogoproto.moretags) = "yaml:\"token_out_denom\"" ]; -} - -message MsgSwapExactAmountIn { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - repeated SwapAmountInRoute routes = 2 [ (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin token_in = 3 [ - (gogoproto.moretags) = "yaml:\"token_in\"", - (gogoproto.nullable) = false - ]; - string token_out_min_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_out_min_amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgSwapExactAmountInResponse { - string token_out_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_out_amount\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgSwapExactAmountOut -message SwapAmountOutRoute { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string token_in_denom = 2 - [ (gogoproto.moretags) = "yaml:\"token_out_denom\"" ]; -} - -message MsgSwapExactAmountOut { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - repeated SwapAmountOutRoute routes = 2 [ (gogoproto.nullable) = false ]; - string token_in_max_amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_in_max_amount\"", - (gogoproto.nullable) = false - ]; - cosmos.base.v1beta1.Coin token_out = 4 [ - (gogoproto.moretags) = "yaml:\"token_out\"", - (gogoproto.nullable) = false - ]; -} - -message MsgSwapExactAmountOutResponse { - string token_in_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_in_amount\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgJoinSwapExternAmountIn -// TODO: Rename to MsgJoinSwapExactAmountIn -message MsgJoinSwapExternAmountIn { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - cosmos.base.v1beta1.Coin token_in = 3 [ - (gogoproto.moretags) = "yaml:\"token_in\"", - (gogoproto.nullable) = false - ]; - string share_out_min_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_out_min_amount\"", - (gogoproto.nullable) = false - ]; - // repeated cosmos.base.v1beta1.Coin tokensIn = 5 [ - // (gogoproto.moretags) = "yaml:\"tokens_in\"", - // (gogoproto.nullable) = false - // ]; -} - -message MsgJoinSwapExternAmountInResponse { - string share_out_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_out_amount\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgJoinSwapShareAmountOut -message MsgJoinSwapShareAmountOut { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string token_in_denom = 3 - [ (gogoproto.moretags) = "yaml:\"token_in_denom\"" ]; - string share_out_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_out_amount\"", - (gogoproto.nullable) = false - ]; - string token_in_max_amount = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_in_max_amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgJoinSwapShareAmountOutResponse { - string token_in_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_in_amount\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgExitSwapShareAmountIn -message MsgExitSwapShareAmountIn { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string token_out_denom = 3 - [ (gogoproto.moretags) = "yaml:\"token_out_denom\"" ]; - string share_in_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_in_amount\"", - (gogoproto.nullable) = false - ]; - string token_out_min_amount = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_out_min_amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgExitSwapShareAmountInResponse { - string token_out_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"token_out_amount\"", - (gogoproto.nullable) = false - ]; -} - -// ===================== MsgExitSwapExternAmountOut -message MsgExitSwapExternAmountOut { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - cosmos.base.v1beta1.Coin token_out = 3 [ - (gogoproto.moretags) = "yaml:\"token_out\"", - (gogoproto.nullable) = false - ]; - string share_in_max_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_in_max_amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgExitSwapExternAmountOutResponse { - string share_in_amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"share_in_amount\"", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/gamm/v2/query.proto b/examples/interchainjs/proto/osmosis/gamm/v2/query.proto deleted file mode 100644 index 02ec334c..00000000 --- a/examples/interchainjs/proto/osmosis/gamm/v2/query.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package osmosis.gamm.v2; - -import "gogoproto/gogo.proto"; -import "osmosis/gamm/v1beta1/tx.proto"; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/gamm/v2types"; - -service Query { - // SpotPrice defines a gRPC query handler that returns the spot price given - // a base denomination and a quote denomination. - rpc SpotPrice(QuerySpotPriceRequest) returns (QuerySpotPriceResponse) { - option (google.api.http).get = "/osmosis/gamm/v2/pools/{pool_id}/prices"; - } -} - -// QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice -// query. -message QuerySpotPriceRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string base_asset_denom = 2 - [ (gogoproto.moretags) = "yaml:\"base_asset_denom\"" ]; - string quote_asset_denom = 3 - [ (gogoproto.moretags) = "yaml:\"quote_asset_denom\"" ]; -} - -// QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice -// query. -message QuerySpotPriceResponse { - // String of the Dec. Ex) 10.203uatom - string spot_price = 1 [ (gogoproto.moretags) = "yaml:\"spot_price\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/ibc-rate-limit/v1beta1/params.proto b/examples/interchainjs/proto/osmosis/ibc-rate-limit/v1beta1/params.proto deleted file mode 100644 index 5f66b2b3..00000000 --- a/examples/interchainjs/proto/osmosis/ibc-rate-limit/v1beta1/params.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package osmosis.ibcratelimit.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/ibc-rate-limit/types"; - -// Params defines the parameters for the ibc-rate-limit module. -message Params { - string contract_address = 1 - [ (gogoproto.moretags) = "yaml:\"contract_address\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/ibc-rate-limit/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/ibc-rate-limit/v1beta1/query.proto deleted file mode 100644 index 01d2eb2d..00000000 --- a/examples/interchainjs/proto/osmosis/ibc-rate-limit/v1beta1/query.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package osmosis.ibcratelimit.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "osmosis/ibc-rate-limit/v1beta1/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/ibc-rate-limit/types"; - -// Query defines the gRPC querier service. -service Query { - // Params defines a gRPC query method that returns the ibc-rate-limit module's - // parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/ibc-rate-limit/v1beta1/params"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/incentives/gauge.proto b/examples/interchainjs/proto/osmosis/incentives/gauge.proto deleted file mode 100644 index 39fc45de..00000000 --- a/examples/interchainjs/proto/osmosis/incentives/gauge.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; -package osmosis.incentives; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "osmosis/lockup/lock.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/incentives/types"; - -// Gauge is an object that stores and distributes yields to recipients who -// satisfy certain conditions. Currently gauges support conditions around the -// duration for which a given denom is locked. -message Gauge { - // id is the unique ID of a Gauge - uint64 id = 1; - // is_perpetual is a flag to show if it's a perpetual or non-perpetual gauge - // Non-perpetual gauges distribute their tokens equally per epoch while the - // gauge is in the active period. Perpetual gauges distribute all their tokens - // at a single time and only distribute their tokens again once the gauge is - // refilled, Intended for use with incentives that get refilled daily. - bool is_perpetual = 2; - // distribute_to is where the gauge rewards are distributed to. - // This is queried via lock duration or by timestamp - osmosis.lockup.QueryCondition distribute_to = 3 - [ (gogoproto.nullable) = false ]; - // coins is the total amount of coins that have been in the gauge - // Can distribute multiple coin denoms - repeated cosmos.base.v1beta1.Coin coins = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // start_time is the distribution start time - google.protobuf.Timestamp start_time = 5 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; - // num_epochs_paid_over is the number of total epochs distribution will be - // completed over - uint64 num_epochs_paid_over = 6; - // filled_epochs is the number of epochs distribution has been completed on - // already - uint64 filled_epochs = 7; - // distributed_coins are coins that have been distributed already - repeated cosmos.base.v1beta1.Coin distributed_coins = 8 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message LockableDurationsInfo { - // List of incentivised durations that gauges will pay out to - repeated google.protobuf.Duration lockable_durations = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_durations\"" - ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/incentives/genesis.proto b/examples/interchainjs/proto/osmosis/incentives/genesis.proto deleted file mode 100644 index 402970b0..00000000 --- a/examples/interchainjs/proto/osmosis/incentives/genesis.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package osmosis.incentives; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "osmosis/incentives/params.proto"; -import "osmosis/incentives/gauge.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/incentives/types"; - -// GenesisState defines the incentives module's various parameters when first -// initialized -message GenesisState { - // params are all the parameters of the module - Params params = 1 [ (gogoproto.nullable) = false ]; - // gauges are all gauges that should exist at genesis - repeated Gauge gauges = 2 [ (gogoproto.nullable) = false ]; - // lockable_durations are all lockup durations that gauges can be locked for - // in order to recieve incentives - repeated google.protobuf.Duration lockable_durations = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_durations\"" - ]; - // last_gauge_id is what the gauge number will increment from when creating - // the next gauge after genesis - uint64 last_gauge_id = 4; -} diff --git a/examples/interchainjs/proto/osmosis/incentives/params.proto b/examples/interchainjs/proto/osmosis/incentives/params.proto deleted file mode 100644 index 9056bb36..00000000 --- a/examples/interchainjs/proto/osmosis/incentives/params.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package osmosis.incentives; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/incentives/types"; - -// Params holds parameters for the incentives module -message Params { - // distr_epoch_identifier is what epoch type distribution will be triggered by - // (day, week, etc.) - string distr_epoch_identifier = 1 - [ (gogoproto.moretags) = "yaml:\"distr_epoch_identifier\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/incentives/query.proto b/examples/interchainjs/proto/osmosis/incentives/query.proto deleted file mode 100644 index d2d0e64f..00000000 --- a/examples/interchainjs/proto/osmosis/incentives/query.proto +++ /dev/null @@ -1,175 +0,0 @@ -syntax = "proto3"; -package osmosis.incentives; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "osmosis/incentives/gauge.proto"; -import "osmosis/lockup/lock.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/incentives/types"; - -// Query defines the gRPC querier service -service Query { - // ModuleToDistributeCoins returns coins that are going to be distributed - rpc ModuleToDistributeCoins(ModuleToDistributeCoinsRequest) - returns (ModuleToDistributeCoinsResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/module_to_distribute_coins"; - } - - // GaugeByID returns gauges by their respective ID - rpc GaugeByID(GaugeByIDRequest) returns (GaugeByIDResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/gauge_by_id/{id}"; - } - // Gauges returns both upcoming and active gauges - rpc Gauges(GaugesRequest) returns (GaugesResponse) { - option (google.api.http).get = "/osmosis/incentives/v1beta1/gauges"; - } - // ActiveGauges returns active gauges - rpc ActiveGauges(ActiveGaugesRequest) returns (ActiveGaugesResponse) { - option (google.api.http).get = "/osmosis/incentives/v1beta1/active_gauges"; - } - // ActiveGaugesPerDenom returns active gauges by denom - rpc ActiveGaugesPerDenom(ActiveGaugesPerDenomRequest) - returns (ActiveGaugesPerDenomResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/active_gauges_per_denom"; - } - // Returns scheduled gauges that have not yet occured - rpc UpcomingGauges(UpcomingGaugesRequest) returns (UpcomingGaugesResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/upcoming_gauges"; - } - // UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured - // by denom - rpc UpcomingGaugesPerDenom(UpcomingGaugesPerDenomRequest) - returns (UpcomingGaugesPerDenomResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/upcoming_gauges_per_denom"; - } - - // RewardsEst returns an estimate of the rewards from now until a specified - // time in the future The querier either provides an address or a set of locks - // for which they want to find the associated rewards - rpc RewardsEst(RewardsEstRequest) returns (RewardsEstResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/rewards_est/{owner}"; - } - // LockableDurations returns lockable durations that are valid to distribute - // incentives for - rpc LockableDurations(QueryLockableDurationsRequest) - returns (QueryLockableDurationsResponse) { - option (google.api.http).get = - "/osmosis/incentives/v1beta1/lockable_durations"; - } -} - -message ModuleToDistributeCoinsRequest {} -message ModuleToDistributeCoinsResponse { - // Coins that have yet to be distributed - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message GaugeByIDRequest { - // Gague ID being queried - uint64 id = 1; -} -message GaugeByIDResponse { - // Gauge that corresponds to provided gague ID - Gauge gauge = 1; -} - -message GaugesRequest { - // Pagination defines pagination for the request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} -message GaugesResponse { - // Upcoming and active gauges - repeated Gauge data = 1 [ (gogoproto.nullable) = false ]; - // Pagination defines pagination for the response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message ActiveGaugesRequest { - // Pagination defines pagination for the request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} -message ActiveGaugesResponse { - // Active gagues only - repeated Gauge data = 1 [ (gogoproto.nullable) = false ]; - // Pagination defines pagination for the response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message ActiveGaugesPerDenomRequest { - // Desired denom when querying active gagues - string denom = 1; - // Pagination defines pagination for the request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} -message ActiveGaugesPerDenomResponse { - // Active gagues that match denom in query - repeated Gauge data = 1 [ (gogoproto.nullable) = false ]; - // Pagination defines pagination for the response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message UpcomingGaugesRequest { - // Pagination defines pagination for the request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} -message UpcomingGaugesResponse { - // Gauges whose distribution is upcoming - repeated Gauge data = 1 [ (gogoproto.nullable) = false ]; - // Pagination defines pagination for the response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message UpcomingGaugesPerDenomRequest { - // Filter for upcoming gagues that match specific denom - string denom = 1; - // Pagination defines pagination for the request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -message UpcomingGaugesPerDenomResponse { - // Upcoming gagues that match denom in query - repeated Gauge upcoming_gauges = 1 [ (gogoproto.nullable) = false ]; - // Pagination defines pagination for the response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message RewardsEstRequest { - // Address that is being queried for future estimated rewards - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - // Lock IDs included in future reward estimation - repeated uint64 lock_ids = 2; - // Upper time limit of reward estimation - // Lower limit is current epoch - int64 end_epoch = 3; -} -message RewardsEstResponse { - // Estimated coin rewards that will be recieved at provided address - // from specified locks between current time and end epoch - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message QueryLockableDurationsRequest {} -message QueryLockableDurationsResponse { - // Time durations that users can lock coins for in order to recieve rewards - repeated google.protobuf.Duration lockable_durations = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_durations\"" - ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/incentives/tx.proto b/examples/interchainjs/proto/osmosis/incentives/tx.proto deleted file mode 100644 index b0881650..00000000 --- a/examples/interchainjs/proto/osmosis/incentives/tx.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; -package osmosis.incentives; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "osmosis/incentives/gauge.proto"; -import "osmosis/lockup/lock.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/incentives/types"; - -service Msg { - rpc CreateGauge(MsgCreateGauge) returns (MsgCreateGaugeResponse); - rpc AddToGauge(MsgAddToGauge) returns (MsgAddToGaugeResponse); -} - -// MsgCreateGauge creates a gague to distribute rewards to users -message MsgCreateGauge { - // is_perpetual shows if it's a perpetual or non-perpetual gauge - // Non-perpetual gauges distribute their tokens equally per epoch while the - // gauge is in the active period. Perpetual gauges distribute all their tokens - // at a single time and only distribute their tokens again once the gauge is - // refilled - bool is_perpetual = 1; - // owner is the address of gauge creator - string owner = 2 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - // distribute_to show which lock the gauge should distribute to by time - // duration or by timestamp - osmosis.lockup.QueryCondition distribute_to = 3 - [ (gogoproto.nullable) = false ]; - // coins are coin(s) to be distributed by the gauge - repeated cosmos.base.v1beta1.Coin coins = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // start_time is the distribution start time - google.protobuf.Timestamp start_time = 5 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; - // num_epochs_paid_over is the number of epochs distribution will be completed - // over - uint64 num_epochs_paid_over = 6; -} -message MsgCreateGaugeResponse {} - -// MsgAddToGauge adds coins to a previously created gauge -message MsgAddToGauge { - // owner is the gauge owner's address - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - // gauge_id is the ID of gauge that rewards are getting added to - uint64 gauge_id = 2; - // rewards are the coin(s) to add to gauge - repeated cosmos.base.v1beta1.Coin rewards = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} -message MsgAddToGaugeResponse {} diff --git a/examples/interchainjs/proto/osmosis/lockup/genesis.proto b/examples/interchainjs/proto/osmosis/lockup/genesis.proto deleted file mode 100644 index ff486713..00000000 --- a/examples/interchainjs/proto/osmosis/lockup/genesis.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package osmosis.lockup; - -import "gogoproto/gogo.proto"; -import "osmosis/lockup/lock.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/lockup/types"; - -// GenesisState defines the lockup module's genesis state. -message GenesisState { - uint64 last_lock_id = 1; - repeated PeriodLock locks = 2 [ (gogoproto.nullable) = false ]; - repeated SyntheticLock synthetic_locks = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/lockup/lock.proto b/examples/interchainjs/proto/osmosis/lockup/lock.proto deleted file mode 100644 index 577a8d2b..00000000 --- a/examples/interchainjs/proto/osmosis/lockup/lock.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; -package osmosis.lockup; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/lockup/types"; - -// PeriodLock is a single lock unit by period defined by the x/lockup module. -// It's a record of a locked coin at a specific time. It stores owner, duration, -// unlock time and the number of coins locked. A state of a period lock is -// created upon lock creation, and deleted once the lock has been matured after -// the `duration` has passed since unbonding started. -message PeriodLock { - // ID is the unique id of the lock. - // The ID of the lock is decided upon lock creation, incrementing by 1 for - // every lock. - uint64 ID = 1; - // Owner is the account address of the lock owner. - // Only the owner can modify the state of the lock. - string owner = 2 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - // Duration is the time needed for a lock to mature after unlocking has - // started. - google.protobuf.Duration duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - // EndTime refers to the time at which the lock would mature and get deleted. - // This value is first initialized when an unlock has started for the lock, - // end time being block time + duration. - google.protobuf.Timestamp end_time = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"end_time\"" - ]; - // Coins are the tokens locked within the lock, kept in the module account. - repeated cosmos.base.v1beta1.Coin coins = 5 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// LockQueryType defines the type of the lock query that can -// either be by duration or start time of the lock. -enum LockQueryType { - option (gogoproto.goproto_enum_prefix) = false; - - ByDuration = 0; - ByTime = 1; -} - -// QueryCondition is a struct used for querying locks upon different conditions. -// Duration field and timestamp fields could be optional, depending on the -// LockQueryType. -message QueryCondition { - // LockQueryType is a type of lock query, ByLockDuration | ByLockTime - LockQueryType lock_query_type = 1; - // Denom represents the token denomination we are looking to lock up - string denom = 2; - // Duration is used to query locks with longer duration than the specified - // duration. Duration field must not be nil when the lock query type is - // `ByLockDuration`. - google.protobuf.Duration duration = 3 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - // Timestamp is used by locks started before the specified duration. - // Timestamp field must not be nil when the lock query type is `ByLockTime`. - // Querying locks with timestamp is currently not implemented. - google.protobuf.Timestamp timestamp = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; -} - -// SyntheticLock is creating virtual lockup where new denom is combination of -// original denom and synthetic suffix. At the time of synthetic lockup creation -// and deletion, accumulation store is also being updated and on querier side, -// they can query as freely as native lockup. -message SyntheticLock { - // Underlying Lock ID is the underlying native lock's id for this synthetic - // lockup. A synthetic lock MUST have an underlying lock. - uint64 underlying_lock_id = 1; - // SynthDenom is the synthetic denom that is a combination of - // gamm share + bonding status + validator address. - string synth_denom = 2; - // used for unbonding synthetic lockups, for active synthetic lockups, this - // value is set to uninitialized value - google.protobuf.Timestamp end_time = 3 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"end_time\"" - ]; - // Duration is the duration for a synthetic lock to mature - // at the point of unbonding has started. - google.protobuf.Duration duration = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; -} diff --git a/examples/interchainjs/proto/osmosis/lockup/params.proto b/examples/interchainjs/proto/osmosis/lockup/params.proto deleted file mode 100644 index 1c66228f..00000000 --- a/examples/interchainjs/proto/osmosis/lockup/params.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; -package osmosis.lockup; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/lockup/types"; - -message Params { - repeated string force_unlock_allowed_addresses = 1 - [ (gogoproto.moretags) = "yaml:\"force_unlock_allowed_address\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/lockup/query.proto b/examples/interchainjs/proto/osmosis/lockup/query.proto deleted file mode 100644 index 8e69afbf..00000000 --- a/examples/interchainjs/proto/osmosis/lockup/query.proto +++ /dev/null @@ -1,299 +0,0 @@ -syntax = "proto3"; -package osmosis.lockup; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "osmosis/lockup/lock.proto"; -import "osmosis/lockup/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/lockup/types"; - -// Query defines the gRPC querier service. -service Query { - // Return full balance of the module - rpc ModuleBalance(ModuleBalanceRequest) returns (ModuleBalanceResponse) { - option (google.api.http).get = "/osmosis/lockup/v1beta1/module_balance"; - } - // Return locked balance of the module - rpc ModuleLockedAmount(ModuleLockedAmountRequest) - returns (ModuleLockedAmountResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/module_locked_amount"; - } - - // Returns unlockable coins which are not withdrawn yet - rpc AccountUnlockableCoins(AccountUnlockableCoinsRequest) - returns (AccountUnlockableCoinsResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_unlockable_coins/{owner}"; - } - // Returns unlocking coins - rpc AccountUnlockingCoins(AccountUnlockingCoinsRequest) - returns (AccountUnlockingCoinsResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_unlocking_coins/{owner}"; - } - // Return a locked coins that can't be withdrawn - rpc AccountLockedCoins(AccountLockedCoinsRequest) - returns (AccountLockedCoinsResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_coins/{owner}"; - } - - // Returns locked records of an account with unlock time beyond timestamp - rpc AccountLockedPastTime(AccountLockedPastTimeRequest) - returns (AccountLockedPastTimeResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_pasttime/{owner}"; - } - // Returns locked records of an account with unlock time beyond timestamp - // excluding tokens started unlocking - rpc AccountLockedPastTimeNotUnlockingOnly( - AccountLockedPastTimeNotUnlockingOnlyRequest) - returns (AccountLockedPastTimeNotUnlockingOnlyResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_pasttime_not_unlocking_only/" - "{owner}"; - } - // Returns unlocked records with unlock time before timestamp - rpc AccountUnlockedBeforeTime(AccountUnlockedBeforeTimeRequest) - returns (AccountUnlockedBeforeTimeResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_unlocked_before_time/{owner}"; - } - - // Returns lock records by address, timestamp, denom - rpc AccountLockedPastTimeDenom(AccountLockedPastTimeDenomRequest) - returns (AccountLockedPastTimeDenomResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_pasttime_denom/{owner}"; - } - - // Returns total locked per denom with longer past given time - rpc LockedDenom(LockedDenomRequest) returns (LockedDenomResponse) { - option (google.api.http).get = "/osmosis/lockup/v1beta1/locked_denom"; - } - - // Returns lock record by id - rpc LockedByID(LockedRequest) returns (LockedResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/locked_by_id/{lock_id}"; - } - - // Returns synthetic lockups by native lockup id - rpc SyntheticLockupsByLockupID(SyntheticLockupsByLockupIDRequest) - returns (SyntheticLockupsByLockupIDResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/synthetic_lockups_by_lock_id/{lock_id}"; - } - - // Returns account locked records with longer duration - rpc AccountLockedLongerDuration(AccountLockedLongerDurationRequest) - returns (AccountLockedLongerDurationResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_longer_duration/{owner}"; - } - - // Returns account locked records with a specific duration - rpc AccountLockedDuration(AccountLockedDurationRequest) - returns (AccountLockedDurationResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_duration/{owner}"; - } - - // Returns account locked records with longer duration excluding tokens - // started unlocking - rpc AccountLockedLongerDurationNotUnlockingOnly( - AccountLockedLongerDurationNotUnlockingOnlyRequest) - returns (AccountLockedLongerDurationNotUnlockingOnlyResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/" - "account_locked_longer_duration_not_unlocking_only/{owner}"; - } - // Returns account's locked records for a denom with longer duration - rpc AccountLockedLongerDurationDenom(AccountLockedLongerDurationDenomRequest) - returns (AccountLockedLongerDurationDenomResponse) { - option (google.api.http).get = - "/osmosis/lockup/v1beta1/account_locked_longer_duration_denom/{owner}"; - } - // Params returns lockup params. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/lockup/v1beta1/params"; - } -} - -message ModuleBalanceRequest {}; -message ModuleBalanceResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -}; - -message ModuleLockedAmountRequest {}; -message ModuleLockedAmountResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -}; - -message AccountUnlockableCoinsRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; -}; -message AccountUnlockableCoinsResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -}; - -message AccountUnlockingCoinsRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; -} -message AccountUnlockingCoinsResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message AccountLockedCoinsRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; -}; -message AccountLockedCoinsResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -}; - -message AccountLockedPastTimeRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Timestamp timestamp = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; -}; -message AccountLockedPastTimeResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message AccountLockedPastTimeNotUnlockingOnlyRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Timestamp timestamp = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; -}; -message AccountLockedPastTimeNotUnlockingOnlyResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message AccountUnlockedBeforeTimeRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Timestamp timestamp = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; -}; -message AccountUnlockedBeforeTimeResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -} - -message AccountLockedPastTimeDenomRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Timestamp timestamp = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; - string denom = 3; -}; -message AccountLockedPastTimeDenomResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message LockedDenomRequest { - string denom = 1; - google.protobuf.Duration duration = 2 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; -} -message LockedDenomResponse { - string amount = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"amount\"", - (gogoproto.nullable) = false - ]; -} - -message LockedRequest { uint64 lock_id = 1; }; -message LockedResponse { PeriodLock lock = 1; }; - -message SyntheticLockupsByLockupIDRequest { uint64 lock_id = 1; } -message SyntheticLockupsByLockupIDResponse { - repeated SyntheticLock synthetic_locks = 1 [ (gogoproto.nullable) = false ]; -} - -message AccountLockedLongerDurationRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Duration duration = 2 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; -}; -message AccountLockedLongerDurationResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message AccountLockedDurationRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Duration duration = 2 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; -}; -message AccountLockedDurationResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message AccountLockedLongerDurationNotUnlockingOnlyRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Duration duration = 2 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; -}; -message AccountLockedLongerDurationNotUnlockingOnlyResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message AccountLockedLongerDurationDenomRequest { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Duration duration = 2 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - string denom = 3; -}; -message AccountLockedLongerDurationDenomResponse { - repeated PeriodLock locks = 1 [ (gogoproto.nullable) = false ]; -}; - -message QueryParamsRequest {} -message QueryParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/lockup/tx.proto b/examples/interchainjs/proto/osmosis/lockup/tx.proto deleted file mode 100644 index 9d5c0642..00000000 --- a/examples/interchainjs/proto/osmosis/lockup/tx.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; -package osmosis.lockup; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "osmosis/lockup/lock.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/lockup/types"; - -// Msg defines the Msg service. -service Msg { - // LockTokens lock tokens - rpc LockTokens(MsgLockTokens) returns (MsgLockTokensResponse); - // BeginUnlockingAll begin unlocking all tokens - rpc BeginUnlockingAll(MsgBeginUnlockingAll) - returns (MsgBeginUnlockingAllResponse); - // MsgBeginUnlocking begins unlocking tokens by lock ID - rpc BeginUnlocking(MsgBeginUnlocking) returns (MsgBeginUnlockingResponse); - // MsgEditLockup edits the existing lockups by lock ID - rpc ExtendLockup(MsgExtendLockup) returns (MsgExtendLockupResponse); - rpc ForceUnlock(MsgForceUnlock) returns (MsgForceUnlockResponse); -} - -message MsgLockTokens { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - google.protobuf.Duration duration = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - repeated cosmos.base.v1beta1.Coin coins = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} -message MsgLockTokensResponse { uint64 ID = 1; } - -message MsgBeginUnlockingAll { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; -} -message MsgBeginUnlockingAllResponse { repeated PeriodLock unlocks = 1; } - -message MsgBeginUnlocking { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - uint64 ID = 2; - // Amount of unlocking coins. Unlock all if not set. - repeated cosmos.base.v1beta1.Coin coins = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} -message MsgBeginUnlockingResponse { bool success = 1; } - -// MsgExtendLockup extends the existing lockup's duration. -// The new duration is longer than the original. -message MsgExtendLockup { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - uint64 ID = 2; - - // duration to be set. fails if lower than the current duration, or is - // unlocking - google.protobuf.Duration duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - - // extend for other edit, e.g. cancel unlocking -} - -message MsgExtendLockupResponse { bool success = 1; } - -// MsgForceUnlock unlocks locks immediately for -// addresses registered via governance. -message MsgForceUnlock { - string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ]; - uint64 ID = 2; - // Amount of unlocking coins. Unlock all if not set. - repeated cosmos.base.v1beta1.Coin coins = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message MsgForceUnlockResponse { bool success = 1; } \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/mint/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/mint/v1beta1/genesis.proto deleted file mode 100644 index 67534deb..00000000 --- a/examples/interchainjs/proto/osmosis/mint/v1beta1/genesis.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package osmosis.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/mint/v1beta1/mint.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/mint/types"; - -// GenesisState defines the mint module's genesis state. -message GenesisState { - // minter is an abstraction for holding current rewards information. - Minter minter = 1 [ (gogoproto.nullable) = false ]; - - // params defines all the paramaters of the mint module. - Params params = 2 [ (gogoproto.nullable) = false ]; - - // reduction_started_epoch is the first epoch in which the reduction of mint - // begins. - int64 reduction_started_epoch = 3 - [ (gogoproto.moretags) = "yaml:\"reduction_started_epoch\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/mint/v1beta1/mint.proto b/examples/interchainjs/proto/osmosis/mint/v1beta1/mint.proto deleted file mode 100644 index d0a8223f..00000000 --- a/examples/interchainjs/proto/osmosis/mint/v1beta1/mint.proto +++ /dev/null @@ -1,111 +0,0 @@ -syntax = "proto3"; -package osmosis.mint.v1beta1; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/mint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -// Minter represents the minting state. -message Minter { - // epoch_provisions represent rewards for the current epoch. - string epoch_provisions = 1 [ - (gogoproto.moretags) = "yaml:\"epoch_provisions\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// WeightedAddress represents an address with a weight assigned to it. -// The weight is used to determine the proportion of the total minted -// tokens to be minted to the address. -message WeightedAddress { - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - string weight = 2 [ - (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// DistributionProportions defines the distribution proportions of the minted -// denom. In other words, defines which stakeholders will receive the minted -// denoms and how much. -message DistributionProportions { - // staking defines the proportion of the minted mint_denom that is to be - // allocated as staking rewards. - string staking = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"staking\"", - (gogoproto.nullable) = false - ]; - // pool_incentives defines the proportion of the minted mint_denom that is - // to be allocated as pool incentives. - string pool_incentives = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"pool_incentives\"", - (gogoproto.nullable) = false - ]; - // developer_rewards defines the proportion of the minted mint_denom that is - // to be allocated to developer rewards address. - string developer_rewards = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"developer_rewards\"", - (gogoproto.nullable) = false - ]; - // community_pool defines the proportion of the minted mint_denom that is - // to be allocated to the community pool. - string community_pool = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"community_pool\"", - (gogoproto.nullable) = false - ]; -} - -// Params holds parameters for the x/mint module. -message Params { - option (gogoproto.goproto_stringer) = false; - - // mint_denom is the denom of the coin to mint. - string mint_denom = 1; - // genesis_epoch_provisions epoch provisions from the first epoch. - string genesis_epoch_provisions = 2 [ - (gogoproto.moretags) = "yaml:\"genesis_epoch_provisions\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // epoch_identifier mint epoch identifier e.g. (day, week). - string epoch_identifier = 3 - [ (gogoproto.moretags) = "yaml:\"epoch_identifier\"" ]; - // reduction_period_in_epochs the number of epochs it takes - // to reduce the rewards. - int64 reduction_period_in_epochs = 4 - [ (gogoproto.moretags) = "yaml:\"reduction_period_in_epochs\"" ]; - // reduction_factor is the reduction multiplier to execute - // at the end of each period set by reduction_period_in_epochs. - string reduction_factor = 5 [ - (gogoproto.moretags) = "yaml:\"reduction_factor\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // distribution_proportions defines the distribution proportions of the minted - // denom. In other words, defines which stakeholders will receive the minted - // denoms and how much. - DistributionProportions distribution_proportions = 6 - [ (gogoproto.nullable) = false ]; - // weighted_developer_rewards_receivers is the address to receive developer - // rewards with weights assignedt to each address. The final amount that each - // address receives is: epoch_provisions * - // distribution_proportions.developer_rewards * Address's Weight. - repeated WeightedAddress weighted_developer_rewards_receivers = 7 [ - (gogoproto.moretags) = "yaml:\"developer_rewards_receiver\"", - (gogoproto.nullable) = false - ]; - // minting_rewards_distribution_start_epoch start epoch to distribute minting - // rewards - int64 minting_rewards_distribution_start_epoch = 8 - [ (gogoproto.moretags) = - "yaml:\"minting_rewards_distribution_start_epoch\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/mint/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/mint/v1beta1/query.proto deleted file mode 100644 index 9960e6ef..00000000 --- a/examples/interchainjs/proto/osmosis/mint/v1beta1/query.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; -package osmosis.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "osmosis/mint/v1beta1/mint.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/mint/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Params returns the total set of minting parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/mint/v1beta1/params"; - } - - // EpochProvisions returns the current minting epoch provisions value. - rpc EpochProvisions(QueryEpochProvisionsRequest) - returns (QueryEpochProvisionsResponse) { - option (google.api.http).get = "/osmosis/mint/v1beta1/epoch_provisions"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryEpochProvisionsRequest is the request type for the -// Query/EpochProvisions RPC method. -message QueryEpochProvisionsRequest {} - -// QueryEpochProvisionsResponse is the response type for the -// Query/EpochProvisions RPC method. -message QueryEpochProvisionsResponse { - // epoch_provisions is the current minting per epoch provisions value. - bytes epoch_provisions = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/genesis.proto deleted file mode 100644 index 51302029..00000000 --- a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/genesis.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package osmosis.poolincentives.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "osmosis/pool-incentives/v1beta1/incentives.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/pool-incentives/types"; - -// GenesisState defines the pool incentives module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; - repeated google.protobuf.Duration lockable_durations = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_durations\"" - ]; - DistrInfo distr_info = 3 [ - (gogoproto.nullable) = true, - (gogoproto.moretags) = "yaml:\"distr_info\"" - ]; - PoolToGauges pool_to_gauges = 4 [ - (gogoproto.nullable) = true, - (gogoproto.moretags) = "yaml:\"pool_to_gauges\"" - ]; -} diff --git a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/gov.proto b/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/gov.proto deleted file mode 100644 index d0a48bca..00000000 --- a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/gov.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; -package osmosis.poolincentives.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/pool-incentives/v1beta1/incentives.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/pool-incentives/types"; - -// ReplacePoolIncentivesProposal is a gov Content type for updating the pool -// incentives. If a ReplacePoolIncentivesProposal passes, the proposal’s records -// override the existing DistrRecords set in the module. Each record has a -// specified gauge id and weight, and the incentives are distributed to each -// gauge according to weight/total_weight. The incentives are put in the fee -// pool and it is allocated to gauges and community pool by the DistrRecords -// configuration. Note that gaugeId=0 represents the community pool. -message ReplacePoolIncentivesProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "ProposalContentI"; - - string title = 1; - string description = 2; - repeated DistrRecord records = 3 [ (gogoproto.nullable) = false ]; -} - -// UpdatePoolIncentivesProposal is a gov Content type for updating the pool -// incentives. If a UpdatePoolIncentivesProposal passes, all the DistrRecords -// in the proposals are edited. An existing DistrRecord is not overriden unless -// explicitly included in the proposal. -// This differs from an ReplacePoolIncentivesProposal because it only does an -// in place update of the DistrRecords for gauges explicitly mentioned in the -// proposal. - -// For example: if the existing DistrRecords were: -// [(Gauge 0, 5), (Gauge 1, 6), (Gauge 2, 6)] -// An UpdatePoolIncentivesProposal includes -// [(Gauge 1, 0), (Gauge 2, 4), (Gauge 3, 10)] -// This would delete Gauge 1, Edit Gauge 2, and Add Gauge 3 -// The result DistrRecords in state would be: -// [(Gauge 0, 5), (Gauge 2, 4), (Gauge 3, 10)] -message UpdatePoolIncentivesProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - option (cosmos_proto.implements_interface) = "ProposalContentI"; - - string title = 1; - string description = 2; - repeated DistrRecord records = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/incentives.proto b/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/incentives.proto deleted file mode 100644 index f26183a4..00000000 --- a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/incentives.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; -package osmosis.poolincentives.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/pool-incentives/types"; - -message Params { - option (gogoproto.goproto_stringer) = false; - - // minted_denom is the denomination of the coin expected to be minted by the - // minting module. Pool-incentives module doesn’t actually mint the coin - // itself, but rather manages the distribution of coins that matches the - // defined minted_denom. - string minted_denom = 1 [ (gogoproto.moretags) = "yaml:\"minted_denom\"" ]; -} - -message LockableDurationsInfo { - repeated google.protobuf.Duration lockable_durations = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_durations\"" - ]; -} - -message DistrInfo { - string total_weight = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"total_weight\"", - (gogoproto.nullable) = false - ]; - repeated DistrRecord records = 2 [ (gogoproto.nullable) = false ]; -} - -message DistrRecord { - option (gogoproto.equal) = true; - - uint64 gauge_id = 1 [ (gogoproto.moretags) = "yaml:\"gauge_id\"" ]; - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message PoolToGauge { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - uint64 gauge_id = 2 [ (gogoproto.moretags) = "yaml:\"gauge\"" ]; - google.protobuf.Duration duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"duration\"" - ]; -} - -message PoolToGauges { - repeated PoolToGauge pool_to_gauge = 2 [ (gogoproto.nullable) = false ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/query.proto deleted file mode 100644 index 3af16e93..00000000 --- a/examples/interchainjs/proto/osmosis/pool-incentives/v1beta1/query.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; -package osmosis.poolincentives.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "osmosis/incentives/gauge.proto"; -import "osmosis/pool-incentives/v1beta1/incentives.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/pool-incentives/types"; - -service Query { - // GaugeIds takes the pool id and returns the matching gauge ids and durations - rpc GaugeIds(QueryGaugeIdsRequest) returns (QueryGaugeIdsResponse) { - option (google.api.http).get = - "/osmosis/pool-incentives/v1beta1/gauge-ids/{pool_id}"; - } - // DistrInfo returns the pool's matching gauge ids and weights. - rpc DistrInfo(QueryDistrInfoRequest) returns (QueryDistrInfoResponse) { - option (google.api.http).get = - "/osmosis/pool-incentives/v1beta1/distr_info"; - } - - // Params returns pool incentives params. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/pool-incentives/v1beta1/params"; - } - - // LockableDurations returns lock durations for pools. - rpc LockableDurations(QueryLockableDurationsRequest) - returns (QueryLockableDurationsResponse) { - option (google.api.http).get = - "/osmosis/pool-incentives/v1beta1/lockable_durations"; - } - - // IncentivizedPools returns currently incentivized pools - rpc IncentivizedPools(QueryIncentivizedPoolsRequest) - returns (QueryIncentivizedPoolsResponse) { - option (google.api.http).get = - "/osmosis/pool-incentives/v1beta1/incentivized_pools"; - } - - // ExternalIncentiveGauges returns external incentive gauges. - rpc ExternalIncentiveGauges(QueryExternalIncentiveGaugesRequest) - returns (QueryExternalIncentiveGaugesResponse) { - option (google.api.http).get = - "/osmosis/pool-incentives/v1beta1/external_incentive_gauges"; - } -} - -message QueryGaugeIdsRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} -message QueryGaugeIdsResponse { - message GaugeIdWithDuration { - uint64 gauge_id = 1 [ (gogoproto.moretags) = "yaml:\"gauge_id\"" ]; - google.protobuf.Duration duration = 2 - [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; - string gauge_incentive_percentage = 3; - } - - repeated GaugeIdWithDuration gauge_ids_with_duration = 1 - [ (gogoproto.moretags) = "yaml:\"gauge_ids_with_duration\"" ]; -} - -message QueryDistrInfoRequest {} -message QueryDistrInfoResponse { - DistrInfo distr_info = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"distr_info\"" - ]; -} - -message QueryParamsRequest {} -message QueryParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryLockableDurationsRequest {} -message QueryLockableDurationsResponse { - repeated google.protobuf.Duration lockable_durations = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_durations\"" - ]; -} - -message QueryIncentivizedPoolsRequest {} -message IncentivizedPool { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - google.protobuf.Duration lockable_duration = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"lockable_duration\"" - ]; - uint64 gauge_id = 3 [ (gogoproto.moretags) = "yaml:\"gauge_id\"" ]; -} -message QueryIncentivizedPoolsResponse { - repeated IncentivizedPool incentivized_pools = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"incentivized_pools\"" - ]; -} - -message QueryExternalIncentiveGaugesRequest {} -message QueryExternalIncentiveGaugesResponse { - repeated osmosis.incentives.Gauge data = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/sumtree/v1beta1/tree.proto b/examples/interchainjs/proto/osmosis/sumtree/v1beta1/tree.proto deleted file mode 100644 index ff9a1f32..00000000 --- a/examples/interchainjs/proto/osmosis/sumtree/v1beta1/tree.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package osmosis.store.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/osmoutils/sumtree"; - -message Node { repeated Child children = 1; } - -message Child { - bytes index = 1; - string accumulation = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message Leaf { Child leaf = 1; } diff --git a/examples/interchainjs/proto/osmosis/superfluid/genesis.proto b/examples/interchainjs/proto/osmosis/superfluid/genesis.proto deleted file mode 100644 index a068d0ff..00000000 --- a/examples/interchainjs/proto/osmosis/superfluid/genesis.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package osmosis.superfluid; - -import "gogoproto/gogo.proto"; -import "osmosis/superfluid/superfluid.proto"; -import "osmosis/superfluid/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types"; - -// GenesisState defines the module's genesis state. -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - // superfluid_assets defines the registered superfluid assets that have been - // registered via governance. - repeated SuperfluidAsset superfluid_assets = 2 - [ (gogoproto.nullable) = false ]; - // osmo_equivalent_multipliers is the records of osmo equivalent amount of - // each superfluid registered pool, updated every epoch. - repeated OsmoEquivalentMultiplierRecord osmo_equivalent_multipliers = 3 - [ (gogoproto.nullable) = false ]; - // intermediary_accounts is a secondary account for superfluid staking that - // plays an intermediary role between validators and the delegators. - repeated SuperfluidIntermediaryAccount intermediary_accounts = 4 - [ (gogoproto.nullable) = false ]; - repeated LockIdIntermediaryAccountConnection intemediary_account_connections = - 5 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/superfluid/params.proto b/examples/interchainjs/proto/osmosis/superfluid/params.proto deleted file mode 100644 index 754f6a7e..00000000 --- a/examples/interchainjs/proto/osmosis/superfluid/params.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; -package osmosis.superfluid; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types"; - -// Params holds parameters for the superfluid module -message Params { - // minimum_risk_factor is to be cut on OSMO equivalent value of lp tokens for - // superfluid staking, default: 5%. The minimum risk factor works - // to counter-balance the staked amount on chain's exposure to various asset - // volatilities, and have base staking be 'resistant' to volatility. - string minimum_risk_factor = 1 [ - (gogoproto.moretags) = "yaml:\"minimum_risk_factor\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/superfluid/query.proto b/examples/interchainjs/proto/osmosis/superfluid/query.proto deleted file mode 100644 index 71f80d62..00000000 --- a/examples/interchainjs/proto/osmosis/superfluid/query.proto +++ /dev/null @@ -1,284 +0,0 @@ -syntax = "proto3"; -package osmosis.superfluid; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "osmosis/superfluid/superfluid.proto"; -import "osmosis/superfluid/params.proto"; -import "osmosis/lockup/lock.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types"; - -// Query defines the gRPC querier service. -service Query { - // Params returns the total set of superfluid parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/superfluid/v1beta1/params"; - } - - // Returns superfluid asset type, whether if it's a native asset or an lp - // share. - rpc AssetType(AssetTypeRequest) returns (AssetTypeResponse) { - option (google.api.http).get = "/osmosis/superfluid/v1beta1/asset_type"; - } - - // Returns all registered superfluid assets. - rpc AllAssets(AllAssetsRequest) returns (AllAssetsResponse) { - option (google.api.http).get = "/osmosis/superfluid/v1beta1/all_assets"; - } - - // Returns the osmo equivalent multiplier used in the most recent epoch. - rpc AssetMultiplier(AssetMultiplierRequest) - returns (AssetMultiplierResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/asset_multiplier"; - } - - // Returns all superfluid intermediary accounts. - rpc AllIntermediaryAccounts(AllIntermediaryAccountsRequest) - returns (AllIntermediaryAccountsResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/all_intermediary_accounts"; - } - - // Returns intermediary account connected to a superfluid staked lock by id - rpc ConnectedIntermediaryAccount(ConnectedIntermediaryAccountRequest) - returns (ConnectedIntermediaryAccountResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/connected_intermediary_account/{lock_id}"; - } - - // Returns the amount of delegations of specific denom for all validators - rpc TotalDelegationByValidatorForDenom( - QueryTotalDelegationByValidatorForDenomRequest) - returns (QueryTotalDelegationByValidatorForDenomResponse) {} - - // Returns the total amount of osmo superfluidly staked. - // Response is denominated in uosmo. - rpc TotalSuperfluidDelegations(TotalSuperfluidDelegationsRequest) - returns (TotalSuperfluidDelegationsResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/all_superfluid_delegations"; - } - - // Returns the coins superfluid delegated for the delegator, validator, denom - // triplet - rpc SuperfluidDelegationAmount(SuperfluidDelegationAmountRequest) - returns (SuperfluidDelegationAmountResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/superfluid_delegation_amount"; - } - - // Returns all the delegated superfluid poistions for a specific delegator. - rpc SuperfluidDelegationsByDelegator(SuperfluidDelegationsByDelegatorRequest) - returns (SuperfluidDelegationsByDelegatorResponse) { - option (google.api.http).get = "/osmosis/superfluid/v1beta1/" - "superfluid_delegations/{delegator_address}"; - } - - // Returns all the undelegating superfluid poistions for a specific delegator. - rpc SuperfluidUndelegationsByDelegator( - SuperfluidUndelegationsByDelegatorRequest) - returns (SuperfluidUndelegationsByDelegatorResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/" - "superfluid_undelegations_by_delegator/{delegator_address}"; - } - - // Returns all the superfluid positions of a specific denom delegated to one - // validator - rpc SuperfluidDelegationsByValidatorDenom( - SuperfluidDelegationsByValidatorDenomRequest) - returns (SuperfluidDelegationsByValidatorDenomResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/superfluid_delegations_by_validator_denom"; - } - - // Returns the amount of a specific denom delegated to a specific validator - // This is labeled an estimate, because the way it calculates the amount can - // lead rounding errors from the true delegated amount - rpc EstimateSuperfluidDelegatedAmountByValidatorDenom( - EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) - returns (EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/" - "estimate_superfluid_delegation_amount_by_validator_denom"; - } - - // Returns the specified delegations for a specific delegator - rpc TotalDelegationByDelegator(QueryTotalDelegationByDelegatorRequest) - returns (QueryTotalDelegationByDelegatorResponse) { - option (google.api.http).get = - "/osmosis/superfluid/v1beta1/" - "total_delegation_by_delegator/{delegator_address}"; - } - - // Returns a list of whitelisted pool ids to unpool. - rpc UnpoolWhitelist(QueryUnpoolWhitelistRequest) - returns (QueryUnpoolWhitelistResponse) { - option (google.api.http).get = "/osmosis/superfluid/v1beta1/" - "unpool_whitelist"; - } -} - -message QueryParamsRequest {} -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message AssetTypeRequest { string denom = 1; }; -message AssetTypeResponse { SuperfluidAssetType asset_type = 1; }; - -message AllAssetsRequest {}; -message AllAssetsResponse { - repeated SuperfluidAsset assets = 1 [ (gogoproto.nullable) = false ]; -}; - -message AssetMultiplierRequest { string denom = 1; }; -message AssetMultiplierResponse { - OsmoEquivalentMultiplierRecord osmo_equivalent_multiplier = 1; -}; - -message SuperfluidIntermediaryAccountInfo { - string denom = 1; - string val_addr = 2; - uint64 gauge_id = 3; - string address = 4; -} -message AllIntermediaryAccountsRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -}; -message AllIntermediaryAccountsResponse { - repeated SuperfluidIntermediaryAccountInfo accounts = 1 - [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -}; - -message ConnectedIntermediaryAccountRequest { uint64 lock_id = 1; } -message ConnectedIntermediaryAccountResponse { - SuperfluidIntermediaryAccountInfo account = 1; -} - -message QueryTotalDelegationByValidatorForDenomRequest { string denom = 1; } -message QueryTotalDelegationByValidatorForDenomResponse { - repeated Delegations assets = 1 [ (gogoproto.nullable) = false ]; -} - -message Delegations { - string val_addr = 1; - string amount_sfsd = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"amount_sfsd\"", - (gogoproto.nullable) = false - ]; - string osmo_equivalent = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"osmo_equivalent\"", - (gogoproto.nullable) = false - ]; -} -message TotalSuperfluidDelegationsRequest {} - -message TotalSuperfluidDelegationsResponse { - string total_delegations = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"total_superfluid_delegations\"", - (gogoproto.nullable) = false - ]; -} - -message SuperfluidDelegationAmountRequest { - string delegator_address = 1; - string validator_address = 2; - string denom = 3; -} - -message SuperfluidDelegationAmountResponse { - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message SuperfluidDelegationsByDelegatorRequest { - string delegator_address = 1; -} - -message SuperfluidDelegationsByDelegatorResponse { - repeated SuperfluidDelegationRecord superfluid_delegation_records = 1 - [ (gogoproto.nullable) = false ]; - repeated cosmos.base.v1beta1.Coin total_delegated_coins = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - cosmos.base.v1beta1.Coin total_equivalent_staked_amount = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" - ]; -} - -message SuperfluidUndelegationsByDelegatorRequest { - string delegator_address = 1; - string denom = 2; -} - -message SuperfluidUndelegationsByDelegatorResponse { - repeated SuperfluidDelegationRecord superfluid_delegation_records = 1 - [ (gogoproto.nullable) = false ]; - repeated cosmos.base.v1beta1.Coin total_undelegated_coins = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated osmosis.lockup.SyntheticLock synthetic_locks = 3 - [ (gogoproto.nullable) = false ]; -} - -message SuperfluidDelegationsByValidatorDenomRequest { - string validator_address = 1; - string denom = 2; -} - -message SuperfluidDelegationsByValidatorDenomResponse { - repeated SuperfluidDelegationRecord superfluid_delegation_records = 1 - [ (gogoproto.nullable) = false ]; -} - -message EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - string validator_address = 1; - string denom = 2; -} - -message EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - repeated cosmos.base.v1beta1.Coin total_delegated_coins = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message QueryTotalDelegationByDelegatorRequest { string delegator_address = 1; } - -message QueryTotalDelegationByDelegatorResponse { - repeated SuperfluidDelegationRecord superfluid_delegation_records = 1 - [ (gogoproto.nullable) = false ]; - - repeated cosmos.staking.v1beta1.DelegationResponse delegation_response = 2 - [ (gogoproto.nullable) = false ]; - repeated cosmos.base.v1beta1.Coin total_delegated_coins = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - cosmos.base.v1beta1.Coin total_equivalent_staked_amount = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" - ]; -} - -message QueryUnpoolWhitelistRequest {} - -message QueryUnpoolWhitelistResponse { repeated uint64 pool_ids = 1; } diff --git a/examples/interchainjs/proto/osmosis/superfluid/superfluid.proto b/examples/interchainjs/proto/osmosis/superfluid/superfluid.proto deleted file mode 100644 index fdf8d5a1..00000000 --- a/examples/interchainjs/proto/osmosis/superfluid/superfluid.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; -package osmosis.superfluid; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types"; - -// SuperfluidAssetType indicates whether the superfluid asset is -// a native token itself or the lp share of a pool. -enum SuperfluidAssetType { - option (gogoproto.goproto_enum_prefix) = false; - - SuperfluidAssetTypeNative = 0; - SuperfluidAssetTypeLPShare = 1; - // SuperfluidAssetTypeLendingShare = 2; // for now not exist -} - -// SuperfluidAsset stores the pair of superfluid asset type and denom pair -message SuperfluidAsset { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - string denom = 1; - // AssetType indicates whether the superfluid asset is a native token or an lp - // share - SuperfluidAssetType asset_type = 2; -} - -// SuperfluidIntermediaryAccount takes the role of intermediary between LP token -// and OSMO tokens for superfluid staking. The intermediary account is the -// actual account responsible for delegation, not the validator account itself. -message SuperfluidIntermediaryAccount { - // Denom indicates the denom of the superfluid asset. - string denom = 1; - string val_addr = 2; - // perpetual gauge for rewards distribution - uint64 gauge_id = 3; -} - -// The Osmo-Equivalent-Multiplier Record for epoch N refers to the osmo worth we -// treat an LP share as having, for all of epoch N. Eventually this is intended -// to be set as the Time-weighted-average-osmo-backing for the entire duration -// of epoch N-1. (Thereby locking whats in use for epoch N as based on the prior -// epochs rewards) However for now, this is not the TWAP but instead the spot -// price at the boundary. For different types of assets in the future, it could -// change. -message OsmoEquivalentMultiplierRecord { - int64 epoch_number = 1; - // superfluid asset denom, can be LP token or native token - string denom = 2; - string multiplier = 3 [ - (gogoproto.moretags) = "yaml:\"multiplier\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// SuperfluidDelegationRecord is a struct used to indicate superfluid -// delegations of an account in the state machine in a user friendly form. -message SuperfluidDelegationRecord { - string delegator_address = 1; - string validator_address = 2; - cosmos.base.v1beta1.Coin delegation_amount = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" - ]; - cosmos.base.v1beta1.Coin equivalent_staked_amount = 4 - [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" ]; -} - -// LockIdIntermediaryAccountConnection is a struct used to indicate the -// relationship between the underlying lock id and superfluid delegation done -// via lp shares. -message LockIdIntermediaryAccountConnection { - uint64 lock_id = 1; - string intermediary_account = 2; -} - -message UnpoolWhitelistedPools { repeated uint64 ids = 1; } diff --git a/examples/interchainjs/proto/osmosis/superfluid/tx.proto b/examples/interchainjs/proto/osmosis/superfluid/tx.proto deleted file mode 100644 index 67b4a915..00000000 --- a/examples/interchainjs/proto/osmosis/superfluid/tx.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package osmosis.superfluid; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "osmosis/superfluid/superfluid.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types"; - -// Msg defines the Msg service. -service Msg { - // Execute superfluid delegation for a lockup - rpc SuperfluidDelegate(MsgSuperfluidDelegate) - returns (MsgSuperfluidDelegateResponse); - - // Execute superfluid undelegation for a lockup - rpc SuperfluidUndelegate(MsgSuperfluidUndelegate) - returns (MsgSuperfluidUndelegateResponse); - - // Execute superfluid redelegation for a lockup - // rpc SuperfluidRedelegate(MsgSuperfluidRedelegate) returns - // (MsgSuperfluidRedelegateResponse); - - // For a given lock that is being superfluidly undelegated, - // also unbond the underlying lock. - rpc SuperfluidUnbondLock(MsgSuperfluidUnbondLock) - returns (MsgSuperfluidUnbondLockResponse); - - // Execute lockup lock and superfluid delegation in a single msg - rpc LockAndSuperfluidDelegate(MsgLockAndSuperfluidDelegate) - returns (MsgLockAndSuperfluidDelegateResponse); - - rpc UnPoolWhitelistedPool(MsgUnPoolWhitelistedPool) - returns (MsgUnPoolWhitelistedPoolResponse); -} - -message MsgSuperfluidDelegate { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 lock_id = 2; - string val_addr = 3; -} -message MsgSuperfluidDelegateResponse {} - -message MsgSuperfluidUndelegate { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 lock_id = 2; -} -message MsgSuperfluidUndelegateResponse {} - -message MsgSuperfluidUnbondLock { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 lock_id = 2; -} -message MsgSuperfluidUnbondLockResponse {} - -// message MsgSuperfluidRedelegate { -// string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; -// uint64 lock_id = 2; -// string new_val_addr = 3; -// } -// message MsgSuperfluidRedelegateResponse {} - -// MsgLockAndSuperfluidDelegate locks coins with the unbonding period duration, -// and then does a superfluid lock from the newly created lockup, to the -// specified validator addr. -message MsgLockAndSuperfluidDelegate { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - string val_addr = 3; -} -message MsgLockAndSuperfluidDelegateResponse { uint64 ID = 1; } - -// MsgUnPoolWhitelistedPool Unpools every lock the sender has, that is -// associated with pool pool_id. If pool_id is not approved for unpooling by -// governance, this is a no-op. Unpooling takes the locked gamm shares, and runs -// "ExitPool" on it, to get the constituent tokens. e.g. z gamm/pool/1 tokens -// ExitPools into constituent tokens x uatom, y uosmo. Then it creates a new -// lock for every constituent token, with the duration associated with the lock. -// If the lock was unbonding, the new lockup durations should be the time left -// until unbond completion. -message MsgUnPoolWhitelistedPool { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} - -message MsgUnPoolWhitelistedPoolResponse { - repeated uint64 exited_lock_ids = 1; -} diff --git a/examples/interchainjs/proto/osmosis/superfluid/v1beta1/gov.proto b/examples/interchainjs/proto/osmosis/superfluid/v1beta1/gov.proto deleted file mode 100644 index 787a45c6..00000000 --- a/examples/interchainjs/proto/osmosis/superfluid/v1beta1/gov.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; -package osmosis.superfluid.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/superfluid/superfluid.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/superfluid/types"; - -// SetSuperfluidAssetsProposal is a gov Content type to update the superfluid -// assets -message SetSuperfluidAssetsProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - option (cosmos_proto.implements_interface) = "ProposalContentI"; - - string title = 1; - string description = 2; - repeated SuperfluidAsset assets = 3 [ (gogoproto.nullable) = false ]; -} - -// RemoveSuperfluidAssetsProposal is a gov Content type to remove the superfluid -// assets by denom -message RemoveSuperfluidAssetsProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - option (cosmos_proto.implements_interface) = "ProposalContentI"; - - string title = 1; - string description = 2; - repeated string superfluid_asset_denoms = 3; -} - -// UpdateUnpoolWhiteListProposal is a gov Content type to update the -// allowed list of pool ids. -message UpdateUnpoolWhiteListProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - option (cosmos_proto.implements_interface) = "ProposalContentI"; - - string title = 1; - string description = 2; - repeated uint64 ids = 3; - bool is_overwrite = 4; -} diff --git a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto b/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto deleted file mode 100644 index cc58a6d5..00000000 --- a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package osmosis.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/tokenfactory/types"; - -// DenomAuthorityMetadata specifies metadata for addresses that have specific -// capabilities over a token factory denom. Right now there is only one Admin -// permission, but is planned to be extended to the future. -message DenomAuthorityMetadata { - option (gogoproto.equal) = true; - - // Can be empty for no admin, or a valid osmosis address - string admin = 1 [ (gogoproto.moretags) = "yaml:\"admin\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/genesis.proto deleted file mode 100644 index e8c2c7c2..00000000 --- a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/genesis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package osmosis.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; -import "osmosis/tokenfactory/v1beta1/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/tokenfactory/types"; - -// GenesisState defines the tokenfactory module's genesis state. -message GenesisState { - // params defines the paramaters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated GenesisDenom factory_denoms = 2 [ - (gogoproto.moretags) = "yaml:\"factory_denoms\"", - (gogoproto.nullable) = false - ]; -} - -// GenesisDenom defines a tokenfactory denom that is defined within genesis -// state. The structure contains DenomAuthorityMetadata which defines the -// denom's admin. -message GenesisDenom { - option (gogoproto.equal) = true; - - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - DenomAuthorityMetadata authority_metadata = 2 [ - (gogoproto.moretags) = "yaml:\"authority_metadata\"", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/params.proto b/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/params.proto deleted file mode 100644 index 7e14273d..00000000 --- a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/params.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package osmosis.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/tokenfactory/types"; - -// Params defines the parameters for the tokenfactory module. -message Params { - repeated cosmos.base.v1beta1.Coin denom_creation_fee = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"denom_creation_fee\"", - (gogoproto.nullable) = false - ]; -} diff --git a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/query.proto deleted file mode 100644 index 7b347161..00000000 --- a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/query.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; -package osmosis.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; -import "osmosis/tokenfactory/v1beta1/params.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/tokenfactory/types"; - -// Query defines the gRPC querier service. -service Query { - // Params defines a gRPC query method that returns the tokenfactory module's - // parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/osmosis/tokenfactory/v1beta1/params"; - } - - // DenomAuthorityMetadata defines a gRPC query method for fetching - // DenomAuthorityMetadata for a particular denom. - rpc DenomAuthorityMetadata(QueryDenomAuthorityMetadataRequest) - returns (QueryDenomAuthorityMetadataResponse) { - option (google.api.http).get = - "/osmosis/tokenfactory/v1beta1/denoms/{denom}/authority_metadata"; - } - - // DenomsFromCreator defines a gRPC query method for fetching all - // denominations created by a specific admin/creator. - rpc DenomsFromCreator(QueryDenomsFromCreatorRequest) - returns (QueryDenomsFromCreatorResponse) { - option (google.api.http).get = - "/osmosis/tokenfactory/v1beta1/denoms_from_creator/{creator}"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryDenomAuthorityMetadataRequest defines the request structure for the -// DenomAuthorityMetadata gRPC query. -message QueryDenomAuthorityMetadataRequest { - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; -} - -// QueryDenomAuthorityMetadataResponse defines the response structure for the -// DenomAuthorityMetadata gRPC query. -message QueryDenomAuthorityMetadataResponse { - DenomAuthorityMetadata authority_metadata = 1 [ - (gogoproto.moretags) = "yaml:\"authority_metadata\"", - (gogoproto.nullable) = false - ]; -} - -// QueryDenomsFromCreatorRequest defines the request structure for the -// DenomsFromCreator gRPC query. -message QueryDenomsFromCreatorRequest { - string creator = 1 [ (gogoproto.moretags) = "yaml:\"creator\"" ]; -} - -// QueryDenomsFromCreatorRequest defines the response structure for the -// DenomsFromCreator gRPC query. -message QueryDenomsFromCreatorResponse { - repeated string denoms = 1 [ (gogoproto.moretags) = "yaml:\"denoms\"" ]; -} diff --git a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/tx.proto b/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/tx.proto deleted file mode 100644 index 938b1fa9..00000000 --- a/examples/interchainjs/proto/osmosis/tokenfactory/v1beta1/tx.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; -package osmosis.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/tokenfactory/types"; - -// Msg defines the tokefactory module's gRPC message service. -service Msg { - rpc CreateDenom(MsgCreateDenom) returns (MsgCreateDenomResponse); - rpc Mint(MsgMint) returns (MsgMintResponse); - rpc Burn(MsgBurn) returns (MsgBurnResponse); - rpc ChangeAdmin(MsgChangeAdmin) returns (MsgChangeAdminResponse); - rpc SetDenomMetadata(MsgSetDenomMetadata) - returns (MsgSetDenomMetadataResponse); - - // ForceTransfer is deactivated for now because we need to think through edge - // cases rpc ForceTransfer(MsgForceTransfer) returns - // (MsgForceTransferResponse); -} - -// MsgCreateDenom defines the message structure for the CreateDenom gRPC service -// method. It allows an account to create a new denom. It requires a sender -// address and a sub denomination. The (sender_address, sub_denomination) tuple -// must be unique and cannot be re-used. -// -// The resulting denom created is defined as -// . The resulting denom's admin is -// originally set to be the creator, but this can be changed later. The token -// denom does not indicate the current admin. -message MsgCreateDenom { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - // subdenom can be up to 44 "alphanumeric" characters long. - string subdenom = 2 [ (gogoproto.moretags) = "yaml:\"subdenom\"" ]; -} - -// MsgCreateDenomResponse is the return value of MsgCreateDenom -// It returns the full string of the newly created denom -message MsgCreateDenomResponse { - string new_token_denom = 1 - [ (gogoproto.moretags) = "yaml:\"new_token_denom\"" ]; -} - -// MsgMint is the sdk.Msg type for allowing an admin account to mint -// more of a token. For now, we only support minting to the sender account -message MsgMint { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.moretags) = "yaml:\"amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgMintResponse {} - -// MsgBurn is the sdk.Msg type for allowing an admin account to burn -// a token. For now, we only support burning from the sender account. -message MsgBurn { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.moretags) = "yaml:\"amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgBurnResponse {} - -// MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign -// adminship of a denom to a new account -message MsgChangeAdmin { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ]; -} - -// MsgChangeAdminResponse defines the response structure for an executed -// MsgChangeAdmin message. -message MsgChangeAdminResponse {} - -// message MsgForceTransfer { -// string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; -// cosmos.base.v1beta1.Coin amount = 2 [ -// (gogoproto.moretags) = "yaml:\"amount\"", -// (gogoproto.nullable) = false -// ]; -// string transferFromAddress = 3 -// [ (gogoproto.moretags) = "yaml:\"transfer_from_address\"" ]; -// string transferToAddress = 4 -// [ (gogoproto.moretags) = "yaml:\"transfer_to_address\"" ]; -// } - -// message MsgForceTransferResponse {} - -// MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set -// the denom's bank metadata -message MsgSetDenomMetadata { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.bank.v1beta1.Metadata metadata = 2 [ - (gogoproto.moretags) = "yaml:\"metadata\"", - (gogoproto.nullable) = false - ]; -} - -// MsgSetDenomMetadataResponse defines the response structure for an executed -// MsgSetDenomMetadata message. -message MsgSetDenomMetadataResponse {} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/twap/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/twap/v1beta1/genesis.proto deleted file mode 100644 index e9c377b0..00000000 --- a/examples/interchainjs/proto/osmosis/twap/v1beta1/genesis.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package osmosis.twap.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/twap/v1beta1/twap_record.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/twap/types"; - -// Params holds parameters for the twap module -message Params { - string prune_epoch_identifier = 1; - google.protobuf.Duration record_history_keep_period = 2 [ - (gogoproto.moretags) = "yaml:\"record_history_keep_period\"", - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false - ]; -} - -// GenesisState defines the twap module's genesis state. -message GenesisState { - // twaps is the collection of all twap records. - repeated TwapRecord twaps = 1 [ (gogoproto.nullable) = false ]; - - // params is the container of twap parameters. - Params params = 2 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/twap/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/twap/v1beta1/query.proto deleted file mode 100644 index 95374ece..00000000 --- a/examples/interchainjs/proto/osmosis/twap/v1beta1/query.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; -package osmosis.twap.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/twap/v1beta1/twap_record.proto"; -import "osmosis/twap/v1beta1/genesis.proto"; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/twap/client/queryproto"; - -service Query { - rpc Params(ParamsRequest) returns (ParamsResponse) { - option (google.api.http).get = "/osmosis/twap/v1beta1/Params"; - } - rpc ArithmeticTwap(ArithmeticTwapRequest) returns (ArithmeticTwapResponse) { - option (google.api.http).get = "/osmosis/twap/v1beta1/ArithmeticTwap"; - } - rpc ArithmeticTwapToNow(ArithmeticTwapToNowRequest) - returns (ArithmeticTwapToNowResponse) { - option deprecated = true; - option (google.api.http).get = "/osmosis/twap/v1beta1/ArithmeticTwapToNow"; - } -} - -message ArithmeticTwapRequest { - uint64 pool_id = 1; - string base_asset = 2; - string quote_asset = 3; - google.protobuf.Timestamp start_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; - google.protobuf.Timestamp end_time = 5 [ - (gogoproto.nullable) = true, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"end_time\"" - ]; -} -message ArithmeticTwapResponse { - string arithmetic_twap = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"arithmetic_twap\"", - (gogoproto.nullable) = false - ]; -} - -message ArithmeticTwapToNowRequest { - uint64 pool_id = 1; - string base_asset = 2; - string quote_asset = 3; - google.protobuf.Timestamp start_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; -} -message ArithmeticTwapToNowResponse { - string arithmetic_twap = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"arithmetic_twap\"", - (gogoproto.nullable) = false - ]; -} - -message ParamsRequest {} -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/examples/interchainjs/proto/osmosis/twap/v1beta1/query.yml b/examples/interchainjs/proto/osmosis/twap/v1beta1/query.yml deleted file mode 100644 index 6763392a..00000000 --- a/examples/interchainjs/proto/osmosis/twap/v1beta1/query.yml +++ /dev/null @@ -1,22 +0,0 @@ -keeper: - path: "github.com/osmosis-labs/osmosis/v13/x/twap" - struct: "Keeper" -client_path: "github.com/osmosis-labs/osmosis/v13/x/twap/client" -queries: - ArithmeticTwap: - proto_wrapper: - default_values: - Req.end_time: "ctx.BlockTime()" - query_func: "k.GetArithmeticTwap" - cli: - cmd: "ArithmeticTwap" - ArithmeticTwapToNow: - proto_wrapper: - query_func: "k.GetArithmeticTwapToNow" - cli: - cmd: "ArithmeticTwapToNow" - Params: - proto_wrapper: - query_func: "k.GetParams" - cli: - cmd: "GetArithmeticTwapToNow" \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/twap/v1beta1/twap_record.proto b/examples/interchainjs/proto/osmosis/twap/v1beta1/twap_record.proto deleted file mode 100644 index d040b318..00000000 --- a/examples/interchainjs/proto/osmosis/twap/v1beta1/twap_record.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; -package osmosis.twap.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/twap/types"; - -// A TWAP record should be indexed in state by pool_id, (asset pair), timestamp -// The asset pair assets should be lexicographically sorted. -// Technically (pool_id, asset_0_denom, asset_1_denom, height) do not need to -// appear in the struct however we view this as the wrong performance tradeoff -// given SDK today. Would rather we optimize for readability and correctness, -// than an optimal state storage format. The system bottleneck is elsewhere for -// now. -message TwapRecord { - uint64 pool_id = 1; - // Lexicographically smaller denom of the pair - string asset0_denom = 2; - // Lexicographically larger denom of the pair - string asset1_denom = 3; - // height this record corresponds to, for debugging purposes - int64 height = 4 [ - (gogoproto.moretags) = "yaml:\"record_height\"", - (gogoproto.jsontag) = "record_height" - ]; - // This field should only exist until we have a global registry in the state - // machine, mapping prior block heights within {TIME RANGE} to times. - google.protobuf.Timestamp time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"record_time\"" - ]; - - // We store the last spot prices in the struct, so that we can interpolate - // accumulator values for times between when accumulator records are stored. - string p0_last_spot_price = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string p1_last_spot_price = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - string p0_arithmetic_twap_accumulator = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string p1_arithmetic_twap_accumulator = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // string geometric_twap_accumulator = 7 [(gogoproto.customtype) = - // "github.com/cosmos/cosmos-sdk/types.Dec", - // (gogoproto.nullable) = false]; - - // This field contains the time in which the last spot price error occured. - // It is used to alert the caller if they are getting a potentially erroneous - // TWAP, due to an unforeseen underlying error. - google.protobuf.Timestamp last_error_time = 11 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"last_error_time\"" - ]; -} diff --git a/examples/interchainjs/proto/osmosis/txfees/v1beta1/feetoken.proto b/examples/interchainjs/proto/osmosis/txfees/v1beta1/feetoken.proto deleted file mode 100644 index 3b18f58f..00000000 --- a/examples/interchainjs/proto/osmosis/txfees/v1beta1/feetoken.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package osmosis.txfees.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/txfees/types"; - -// FeeToken is a struct that specifies a coin denom, and pool ID pair. -// This marks the token as eligible for use as a tx fee asset in Osmosis. -// Its price in osmo is derived through looking at the provided pool ID. -// The pool ID must have osmo as one of its assets. -message FeeToken { - option (gogoproto.equal) = true; - - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - uint64 poolID = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/txfees/v1beta1/genesis.proto b/examples/interchainjs/proto/osmosis/txfees/v1beta1/genesis.proto deleted file mode 100644 index 4ac7a282..00000000 --- a/examples/interchainjs/proto/osmosis/txfees/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package osmosis.txfees.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/txfees/v1beta1/feetoken.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/txfees/types"; - -// GenesisState defines the txfees module's genesis state. -message GenesisState { - string basedenom = 1; - repeated FeeToken feetokens = 2 [ (gogoproto.nullable) = false ]; -} diff --git a/examples/interchainjs/proto/osmosis/txfees/v1beta1/gov.proto b/examples/interchainjs/proto/osmosis/txfees/v1beta1/gov.proto deleted file mode 100644 index a87a2afa..00000000 --- a/examples/interchainjs/proto/osmosis/txfees/v1beta1/gov.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package osmosis.txfees.v1beta1; - -import "gogoproto/gogo.proto"; -import "osmosis/txfees/v1beta1/feetoken.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/txfees/types"; - -// UpdateFeeTokenProposal is a gov Content type for adding a new whitelisted fee -// token. It must specify a denom along with gamm pool ID to use as a spot price -// calculator. It can be used to add a new denom to the whitelist It can also be -// used to update the Pool to associate with the denom. If Pool ID is set to 0, -// it will remove the denom from the whitelisted set. -message UpdateFeeTokenProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - option (cosmos_proto.implements_interface) = "ProposalContentI"; - - string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; - string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; - FeeToken feetoken = 3 [ - (gogoproto.moretags) = "yaml:\"fee_token\"", - (gogoproto.nullable) = false - ]; -} \ No newline at end of file diff --git a/examples/interchainjs/proto/osmosis/txfees/v1beta1/query.proto b/examples/interchainjs/proto/osmosis/txfees/v1beta1/query.proto deleted file mode 100644 index 395eb113..00000000 --- a/examples/interchainjs/proto/osmosis/txfees/v1beta1/query.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; -package osmosis.txfees.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; - -import "osmosis/txfees/v1beta1/feetoken.proto"; - -option go_package = "github.com/osmosis-labs/osmosis/v13/x/txfees/types"; - -service Query { - // FeeTokens returns a list of all the whitelisted fee tokens and their - // corresponding pools. It does not include the BaseDenom, which has its own - // query endpoint - rpc FeeTokens(QueryFeeTokensRequest) returns (QueryFeeTokensResponse) { - option (google.api.http).get = "/osmosis/txfees/v1beta1/fee_tokens"; - } - - // DenomSpotPrice returns all spot prices by each registered token denom. - rpc DenomSpotPrice(QueryDenomSpotPriceRequest) - returns (QueryDenomSpotPriceResponse) { - option (google.api.http).get = - "/osmosis/txfees/v1beta1/spot_price_by_denom"; - } - - // Returns the poolID for a specified denom input. - rpc DenomPoolId(QueryDenomPoolIdRequest) returns (QueryDenomPoolIdResponse) { - option (google.api.http).get = - "/osmosis/txfees/v1beta1/denom_pool_id/{denom}"; - } - - // Returns a list of all base denom tokens and their corresponding pools. - rpc BaseDenom(QueryBaseDenomRequest) returns (QueryBaseDenomResponse) { - option (google.api.http).get = "/osmosis/txfees/v1beta1/base_denom"; - } -} - -message QueryFeeTokensRequest {} -message QueryFeeTokensResponse { - repeated FeeToken fee_tokens = 1 [ - (gogoproto.moretags) = "yaml:\"fee_tokens\"", - (gogoproto.nullable) = false - ]; -} - -// QueryDenomSpotPriceRequest defines grpc request structure for querying spot -// price for the specified tx fee denom -message QueryDenomSpotPriceRequest { - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; -} - -// QueryDenomSpotPriceRequest defines grpc response structure for querying spot -// price for the specified tx fee denom -message QueryDenomSpotPriceResponse { - uint64 poolID = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string spot_price = 2 [ - (gogoproto.moretags) = "yaml:\"spot_price\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message QueryDenomPoolIdRequest { - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; -} -message QueryDenomPoolIdResponse { - uint64 poolID = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; -} - -message QueryBaseDenomRequest {} -message QueryBaseDenomResponse { - string base_denom = 1 [ (gogoproto.moretags) = "yaml:\"base_denom\"" ]; -} diff --git a/examples/interchainjs/proto/tendermint/LICENSE b/examples/interchainjs/proto/tendermint/LICENSE deleted file mode 100644 index eaf92fbf..00000000 --- a/examples/interchainjs/proto/tendermint/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Tendermint Core -License: Apache2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 All in Bits, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/examples/interchainjs/proto/tendermint/README.md b/examples/interchainjs/proto/tendermint/README.md deleted file mode 100644 index 74fcf8b8..00000000 --- a/examples/interchainjs/proto/tendermint/README.md +++ /dev/null @@ -1 +0,0 @@ -# tendermint \ No newline at end of file diff --git a/examples/interchainjs/proto/tendermint/abci/types.proto b/examples/interchainjs/proto/tendermint/abci/types.proto deleted file mode 100644 index d41a5226..00000000 --- a/examples/interchainjs/proto/tendermint/abci/types.proto +++ /dev/null @@ -1,394 +0,0 @@ -syntax = "proto3"; -package tendermint.abci; - -option go_package = "github.com/tendermint/tendermint/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "tendermint/crypto/proof.proto"; -import "tendermint/types/types.proto"; -import "tendermint/crypto/keys.proto"; -import "tendermint/types/params.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - } -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; -} - -enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots {} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - } -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseBeginBlock { - repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - tendermint.types.EvidenceParams evidence = 2; - tendermint.types.ValidatorParams validator = 3; - tendermint.types.VersionParams version = 4; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Note: must be greater than 0 - int64 max_bytes = 1; - // Note: must be greater or equal to -1 - int64 max_gas = 2; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - bytes key = 1; - bytes value = 2; - bool index = 3; // nondeterministic -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -// Validator -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -// ValidatorUpdate -message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Evidence { - EvidenceType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - int64 total_voting_power = 5; -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); -} diff --git a/examples/interchainjs/proto/tendermint/crypto/keys.proto b/examples/interchainjs/proto/tendermint/crypto/keys.proto deleted file mode 100644 index 16fd7adf..00000000 --- a/examples/interchainjs/proto/tendermint/crypto/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -// PublicKey defines the keys available for use with Tendermint Validators -message PublicKey { - option (gogoproto.compare) = true; - option (gogoproto.equal) = true; - - oneof sum { - bytes ed25519 = 1; - bytes secp256k1 = 2; - } -} diff --git a/examples/interchainjs/proto/tendermint/crypto/proof.proto b/examples/interchainjs/proto/tendermint/crypto/proof.proto deleted file mode 100644 index 975df768..00000000 --- a/examples/interchainjs/proto/tendermint/crypto/proof.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; -} - -message ValueOp { - // Encoded in ProofOp.Key. - bytes key = 1; - - // To encode in ProofOp.Data - Proof proof = 2; -} - -message DominoOp { - string key = 1; - string input = 2; - string output = 3; -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/tendermint/libs/bits/types.proto b/examples/interchainjs/proto/tendermint/libs/bits/types.proto deleted file mode 100644 index 3111d113..00000000 --- a/examples/interchainjs/proto/tendermint/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.libs.bits; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/examples/interchainjs/proto/tendermint/p2p/types.proto b/examples/interchainjs/proto/tendermint/p2p/types.proto deleted file mode 100644 index 216a6d8d..00000000 --- a/examples/interchainjs/proto/tendermint/p2p/types.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; - uint64 block = 2; - uint64 app = 3; -} - -message NodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string node_id = 2 [(gogoproto.customname) = "NodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - NodeInfoOther other = 8 [(gogoproto.nullable) = false]; -} - -message NodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; -} - -message PeerInfo { - string id = 1 [(gogoproto.customname) = "ID"]; - repeated PeerAddressInfo address_info = 2; - google.protobuf.Timestamp last_connected = 3 [(gogoproto.stdtime) = true]; -} - -message PeerAddressInfo { - string address = 1; - google.protobuf.Timestamp last_dial_success = 2 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp last_dial_failure = 3 [(gogoproto.stdtime) = true]; - uint32 dial_failures = 4; -} diff --git a/examples/interchainjs/proto/tendermint/types/block.proto b/examples/interchainjs/proto/tendermint/types/block.proto deleted file mode 100644 index 84e9bb15..00000000 --- a/examples/interchainjs/proto/tendermint/types/block.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; - -message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; -} diff --git a/examples/interchainjs/proto/tendermint/types/evidence.proto b/examples/interchainjs/proto/tendermint/types/evidence.proto deleted file mode 100644 index d9548a43..00000000 --- a/examples/interchainjs/proto/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/examples/interchainjs/proto/tendermint/types/params.proto b/examples/interchainjs/proto/tendermint/types/params.proto deleted file mode 100644 index 70789222..00000000 --- a/examples/interchainjs/proto/tendermint/types/params.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.equal_all) = true; - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -message ConsensusParams { - BlockParams block = 1 [(gogoproto.nullable) = false]; - EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; - ValidatorParams validator = 3 [(gogoproto.nullable) = false]; - VersionParams version = 4 [(gogoproto.nullable) = false]; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Max block size, in bytes. - // Note: must be greater than 0 - int64 max_bytes = 1; - // Max gas per block. - // Note: must be greater or equal to -1 - int64 max_gas = 2; - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - int64 time_iota_ms = 3; -} - -// EvidenceParams determine how we handle evidence of malfeasance. -message EvidenceParams { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - int64 max_age_num_blocks = 1; - - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - int64 max_bytes = 3; -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -message ValidatorParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - repeated string pub_key_types = 1; -} - -// VersionParams contains the ABCI application version. -message VersionParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - uint64 app_version = 1; -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -message HashedParams { - int64 block_max_bytes = 1; - int64 block_max_gas = 2; -} diff --git a/examples/interchainjs/proto/tendermint/types/types.proto b/examples/interchainjs/proto/tendermint/types/types.proto deleted file mode 100644 index 57efc33c..00000000 --- a/examples/interchainjs/proto/tendermint/types/types.proto +++ /dev/null @@ -1,153 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/crypto/proof.proto"; -import "tendermint/version/types.proto"; -import "tendermint/types/validator.proto"; - -// BlockIdFlag indicates which BlcokID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; -} - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -// -------------------------------- - -// Header defines the structure of a Tendermint block header. -message Header { - // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - -message SignedHeader { - Header header = 1; - Commit commit = 2; -} - -message LightBlock { - SignedHeader signed_header = 1; - tendermint.types.ValidatorSet validator_set = 2; -} - -message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; -} diff --git a/examples/interchainjs/proto/tendermint/types/validator.proto b/examples/interchainjs/proto/tendermint/types/validator.proto deleted file mode 100644 index 49860b96..00000000 --- a/examples/interchainjs/proto/tendermint/types/validator.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/examples/interchainjs/proto/tendermint/version/types.proto b/examples/interchainjs/proto/tendermint/version/types.proto deleted file mode 100644 index 6061868b..00000000 --- a/examples/interchainjs/proto/tendermint/version/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package tendermint.version; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; - -import "gogoproto/gogo.proto"; - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -message App { - uint64 protocol = 1; - string software = 2; -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -message Consensus { - option (gogoproto.equal) = true; - - uint64 block = 1; - uint64 app = 2; -} diff --git a/examples/interchainjs/public/favicon.ico b/examples/interchainjs/public/favicon.ico deleted file mode 100644 index aec78edd3b03a0c25a2c9a33b3a19ef7d8024ce5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25531 zcmdUY`CC=zxi*Lhh=731lY*iGq9}ua8w6yYL}c&HW(FDdW)hi)4NYr?CMR=G1`|zt zGBnj5Gbc@&+Us(TLrgRzQIpv5v`y2K@A|%f;JfejynF2}?GNYI)9Zf5_g!nf?=!q> zp~Qaw+u!W1DfL?!xzf$e&9A&{&ptP|<=_AIH^RL=;DrSgX-+ry(S4m+h_EUyP}7GCfyBg$T2VvCFUbKs);=*k>oeZoe-B|3m(_-`sQU z$t{?C<>HrXZoPZx(tBfULS<}UxJXwX;A%ks%R5hlXSXbIyP7J@8+D&5_gHawLA2>(P&SL!B3xu$wg%agUy5Dc+=bWfC0`;yQ@06 zc|tv=PiC+wfWJI_ZZ>H?dp+Eg8==P!f(?aljgct!ym?IKyeEQiJW#NGzcX0Z=LFbp#wThSJ90iOpn>yAx(r?p+A zz{8C&iY1^erDpe`bx<<*Fu9HCV1Vi=mPAck)>vt;h4E!xSn%6Hi6B8!lX`A~?pkgY zHShpacJUdpe5Xaul-*#I`gl7*6U4a}ZQz_QxOp$6s^r}}pr>$A`>Qj-zx$6jz;*CK zR!Re?KvhI&;~XC; z*tQjNupg|2o93mNyHde*@NFF_R>@aCQPrn{wRn%MiMMBU0_sU$JY5xP^4u>z;cDAr z@Nn2y(?7*iqd>)M2D%;e(d%IA=uDZOFm6;~w|2nciU}ADArLV!u}ieDMz&aV{VaHa zxP)ghzXw+~#x#yW@eBwyjIhdeR6^@kTN39oh(`M_ zE{vsFtB(C!kFe$vwx#i$-=13n4%|96!qkkOeV>j}Hb6p`KRCcGs}h3NbN&b7zWEwt zNalC1of4aiyzn!yG_Qj}5RF8v*gLL^UtRd*QFrK+MA;QZKeukOHocBf0nDmB_Nm=4Z$L*H z*trv6P0T28>oNXV!88^17p;I$D{AAC1pcQ_sa;Ixcr%~?cj}7#N?3bA#h}$7R&-+T z&G(`rS;ZmeU&`AFxxvT{t~y8^;G2XSVij%z0dt<+;Sk$+>WqL^^Ts+Dl4kDRAg%@G zt%Da(i4&(<`S3O|KfZ5W_Ac-47XBzuC$2-eD$aSlRKO+qdDN++>+AdVfkbHB!*Fel z_-ZJ>U=RTx5k=-HC_An`+orl#-2alZ2(m!xQhm-GG#*p`j7eA5Ay;E!bZ&0k>9M(v zHRwitwW!QFr#NHE=&Ov&6!68C z^ZCTA?@vCZn``-^YT&!b6&H^6!%Pwvm!PARO)KbDJ7ayYgn%LEmSCyKc5+pN`(u`- zBpB`tPz%VGkPi;{_&R>96Z^JGuvo&o87`m+WU>q%D1}@I17p>wC^4GDAhkxdhds6s z_!caK%@8`c&hoY`0W4kt&t~-!v8SovOtG{81`OaiTUY{?swPH?U--F)b*n-&3;RV7 zADW=fgQaz5#{{mtuwUa={Sqk7^7`~0m>(ba1J7@1ZL|(@qf1b`4-T%;+B}`HFxxz> zN<*!p!&m0pwm{~#@o7ML*CmE~H8bVjF!srRvc-n@36l&;2gTXar!(m6=GqMEE?1uR zfF;PThO82u+sOm12QfDQM;DKlhinvcd!P1!yATlv`-^*61YbTJFJs_C0cvaNywe9Z z>zXLx5X?^j`)YIO_WlI%tH5#8VSU1?85FtM-MFBYtK*iG38+b5{Ydo=Y=2dl&`5PF)j) zp$CF;!Sae1SeYzdV8D41tT0nsH3QGmRHbi(3hZg?+94WvUn^L?v%i_6T0a?PAbIAh zKtj9vAy^-~9pEv(_{$2lcNlj)-*V+dO_C`fqFXIkt^wyA%XJG%P4}+EN6X)?_YAQvN6&kqeG#Pc91G{PjL&6ay6iOmC18@UjEU_Vwq$@;qBZ z?0zgkW<0vEne{DT%m)gY@fL<)VxBLsjb5uwoSg##Dnx)AbgfB+pyjU9*2cB~R9mRv z!coF%EaKchy>bd1=(NO$;se2S6a{-7Qk5(N>hXQr#5_i!hoM`+!^#y*n~vL0L2VZ^ z+Cv?QVn)sCv+Sa&5~lU>ldUuL``WKPs?XVfhi_@Xd4JwO`y&w5DLnju&rgCeCoC0{ zmx@;}j1mx#HDXf7CJdW1{|!E>E@T?GN^r2bR(Ewk%Lj$^tq;nAOi$6);k+tJj?~ai_6&zBg?_mY?krFt`=}Bt1^dC)!w64Kh99e z<)%_VI;usx_(tL~Xr&=wY)2L>3sHx&tKez{@obvk+u>dbX}IxR?*gQNN%lBLTHogE`&(~hJ3+x?HXf2E~tD3@U#VTMChCk&gVqt zA`axd>2_Fva~*bA5lP~0wivjH!6~jff4~sGpz3q30S?{}SU1cB-IY5T&^dGG3hrPl zs3uI+elmjn#H^|8 zgu;WNW3Z}-OHt;HCqx&{Nco41r#H{;Dy!@aVi z@7oJS6<^$x%xb-S-`-a3FE+%sK@6}mnVa&dE^s#DxbA~t00DbIvoXDn$*{hBZmQZI z5>6iYq;wi3N#suIQH_Al1te^p=4FvGE22e>&GyCD- z#wKuUHyFSyv40}D)KRwJnw4gzl|{Pv?yh*|4XER!20p~b%Ke)$*Ryun(T!>=%a5sqHB-jYxhE{>734V*8?;3>gP3OZSvOdC+lD@#De zmi(65Chcp8Tk2Wi@^el(9GqXp-U8Ugw%iz{@eY7GiEi8rUBB2-ATq@pBAuO$i%nm> zt#K7pMkGW^?oU$bwz&)5pxWfdtKqA_Mt!R&d%V?|Niqg*YN3D{rvUUKj33|_a#X47YDNsY&Q5MK|~(_^AMMC z-ge(iBuh8)5ZDmt(hCgm+LREUzl`m=Ro8y?(J3gvJ_gAyI{P2EaU3iG6oto#%Lc&{ zhbsm=v~Pl}h*54TqMP@<^p*?>_YBR2!k^~^hnVJYWm_gjxx>tvVdjGyW;LnGY~AYI zPXHtSr;{&(500~rfkqIwE^hHniQruT768DV1EC^xZh^-2vPF8!!QwtT0S=^s)c&9` zctGB?$i1|8fLH+03{>>=xay*F{|>Vb1gI@C;3<>7+TR<0{{ueYB3Td{B-Oz3G=i9= z(orx~#?S=r5E=Qr7f<_MpK9|w6Dybzv8oL+U%d^Ws``&u;W-EElf&xBV+R9#it5O^ zVsUMS@Cw69VF@;NH1go<5jXdwgS`p3fx=ww%(V(Kbgi~3^TH8W znYsr`zM`(GqB}1^*M9s+$oHnd%inm7zM26qa34@$B&%Wzvla!?!7YUH4BfuH$0Xh{ z5it;Vzk0-f>6EoWv_K2@cHswLhUTVL!}_^WsC)#|Z(|VEE!WsLs_=KgIXm60Y6XTo zh8F_!yQ1gzLuMB`^K4|g7G!*egY0BMK$SP2mL(Ru4p7N}=An)N@w3V|fBF`E426Jo z1(b_my6uHzAf9n*c=0XhK&yxZ=G>o$G7tvJ<269Z!9T0b77VEs z@QY7C>kE&lhY++LWJ6Z_@m2}zz*dSMyyc*C+9p1OJ>m-6B&=$`6_?+xwS=^*X8ZD$ z6+FfOhLR@+@XZgwB3pYGTKyf*;DWtDpZ(Mayal9#djxiW@iXwsV9sO;l9Zn(fgp4S zGQA^%sRx+v{_PdlkBb==1lbKr``vL?W~ra4`0TOEZzK%BVD))kdAWh{ZY#|_{Yn{> zWh{rVkfzgbYI9&D?Y4x3-feS=!{cu9IF5pgJlG$W1zc~Z6(-miLuRZ z5j}|Y{K+F=wiV4G+uC9(#eeoGk=_icd6f6EaqnI}*WS!m*BU*U5$8!3cJl?!aKxN_ zN!5 ztN~$6QzK|LCb~aWeBf(9tYSg(TF8|=SFc-*pv(mG z=*Y-eza2uGr9vZ3e)zA`Q3j20pz&qih| ze%40@mW3ar?QU9p5F&C@hu>9grV1v5ovfxp`hDa(`YVY z*#mCY#UEb$QFc#AG zSvJ64P+zuI-Qr*~19My)lfPPzIqw?4jqy&av^PuF)rVK6+&ZTHxqg~j7glo;69Bsk zc)$i2S_QKJqSZTKezoJ}WMgpZSowg~0KAnQ)Z!;jaF;k1w)5;&FXiS6nGzAPBNUo; z1*_m=EhkVGA6O1HSBAEt-Zw& zY3MsW!8)cHH$TVDR2JdlZR54*$wpw>K+A5wzH9v)6d+%O&LeaU$}I1@T+0O%CMnFU zR$Ye*xNu~4HGDwyMjuuzPNnO|gGbsn2l&Lr!`9Xg=?wz72*98f&y!-*L6m?b18mwI zAUo*%!}HP%&>I$5StaA_zH+=(4)Cl|t^tW{v-Y!eJ^XzCFz5rK zts6wy%L5wN*0z0kId8bidX7(1iG+6cad%U(vkSR5hBzZk9ca*jy21;;77eR=(5pps za4RSqWGpUAj^)0;d+TjhkFgj`P|LNbqJwtvnfU#?c{~DJMHox3ANLN~3uF9uuippJ z1WIGZD^#Kf88Be#i^su}6tSmVarSXO1}o8>V-eQz^}5B4@w<$X%8bw=yK<9^at}I^ z3YjW{*jzm?1XOf6c=iDv1;Cl79XVLJiCF_GMS#1Tx?L6{?j4TYz^nkRZDNyp1ebzK z)R~-7kl?Jg<3dZFm>#7}Q4G6}#qA0Y{B4cqXMYMxm&xDY@aAkIAmU&#C$aN#RmEu~ zDx;C?7Qla{qZ|_$Q?`UFVqw_h%>Gr;di`~-zVjixr|$tv(0&krV&ttW+smD0yn7NJ z0lv&SpoNIVG=2V(_H_b{dDnhma5pglrmbABpc}$BJeTF677LB>N&)cz0Pd=cb{prl zf~sXy_<|QCZ`R=B>Nbe68=nK(yBuaod)jhGAIj($L<2}2Tt-jrXQOsi&lpJ2=4*cl zFb>lvWhF!CrUerUkShW_EfOywzJ_%Ko7b?`Sa!}rXbsoLwS>u+hD>=&ANu$Ws63Pe z6A=B&L&Y#^UxfNtsxKqP8d$lFtLp&gzR>C?_xB8T?*;yI}Iq9IKv8n{#DHB>G z)p6svlMF8G7;LQ4r$+aG^Iq8b$C=e$(A~j@gKuu2lV?Ci7{lT}%T)m!!r|!V_(l@% zLLRe?6lgy>gozWpcDJYvcpX$RGu&;_-Yl(fv<;h8zF1p39rdKTw^l9|UaH=lSMQze zSRNX{++Y#=A(q*|oT-%QCJ~GRzNQ$qjw<_oDq?Wpa9N=p8f$$CbB_By8rn42YQHkn_Vp|2VhwHDC3;~tvlE^RSa#2 z*sK^#wNMXFx5A)V?mQ_W`X*_2S&3vmIv^Sbj{Hiyu;#)GUW2B zoN(}C)u4`!0+|5r*ljZVLfN8a<+M7t#E+20pAPe6SOrQd(0+$3NoGdHh+N=qf$Yye z1g{;*Di#}DZ!72p?PO6h#&cVB;Ski=ph)mtym5vq_D#?yf~UX*&SP$kI)-MwwXa&g zex9=Gn|vcwRv?Rt6|D|2XgY4a4pl25COAX;oZ=lA61vx(In@Ob3<7qG08bZ9e>dcq zxuKRQBe)hE?d)1@b{=kt7moOD``z)!Ow4_isYq_1RvPRwF;d$RJGPLoamTK0s@YV$ z<#O$JA$nNO+BaMfj`UO+0bkdV0InTBHg9NlP)~+hIrJb9uzMK~BE$LtG4ZpOA1l{$ zO>B@+N{Sm|O7cCvf9ZZmb{}KO=dwAoK-|xaqmZCSw6gz~K#pgw<&TdaWtagJGd~BS zX%2!^V9KDfCipB@tn27@##bMhDKiJVyuU)HCo!a|s|zZBl-{b(Zm;3lterkd=Y9^A z0RUP(9QR0Tj2D+pgcii4>ONJDv#AMP6$detT@O}J$Uxw1(f&)G6uBapS59k7b^LcI zhm5QS7Gwp;$ctQ|eL<@>5Pw_3_a7XY-RW2qoTZ?hlf1GWeW|@`gJxh|eaeUNTM2T0 zo58sJZ1)1hd{vur^DB^t#wV|U37A124=`SBY#{Fe0sIEK_>3b9sm#m@Pzfjzq|Ju} z=D0B6(|a5bfRWZP%R{jRl$o>Eu?vf(K^;Kw16=nXA9)HqNgPY~EOW(=r3Rnt$30yK zYqkF>q{}+KQ~Ma>@sz+fR+9E3JFB~4M<)xRCQs!JdIbnzrRv~j1Ux11;|f<3qdTFn zLe*KDcJ;?F0+TwxnM+22cVlD#@9_@pOJ^mQ%wsCIkQ*q{T7%_a;}MZv=;ae|0E$+G z%xB6(4>%X??yT=E6R?3s^Q;@Sf;LOo>G;jGp?X0ndO4>)_=jsb5|Vmm1+1oU3?ZQYm4Co zrj>;H?Y(b;i!2mR5N8`= z{lQBtVEsY6z;)dDO~|;{_2W#d!H@S-nS|!)w_`g5n~_cq0!_`OckbyaPlg(1rti*k zVE+6D0K!2*p_*SDIv*@c&V-@;@=)MBw9~IGfJgJm+!PSlATku97^K3V#Mul9U?N?6 z+&IVZY(4)=^078UHFpL$_N$JL+B9xJz=!cU`G+#bAo6N>iDQ0mY=G+0@K`nyaQ(1I za0XP6=Hr_(ENXBb4-!96#{WBf_F;YATF%4Eqj5x&|$xG*xjUkK1}L9C_{0pE0S5NuHZ*njaPiG?%T&g(lI*E zbG1BqWtr9b*AIUV{mc*b!6k}TeGD&q;M*73b^@!rUDuPKMMV^4Lu9x8;pA^2Z#>V0 zb@Bk+q>=y?;CogHched%vj6r0S0S*kXs&D4Em5u=73rUH;YdWG=(CZ$d4Ft~MV$d` z0zhkP9*KZ))do?7FXNiDAKbJQu5VcAWo_n9fu+Tffq;SygZz4P1rN80BGy)jM`gd) zx4(MwAoN;qmUHJ+Blzx^EO3Dj1P{~YV)C6Wi0ruhDzx}Lx9$^%_II9K#9mNH9T<0| zQXI)jXt4yUlMM#2tiNiDc|~&|qZ$KpHf%(#FKl9iD0O-@1h>Uu1n*8ziZhVqOt6x4up#A1FGuhC~ z5D0o8Jay|DAAkDT3TyG#PeA+QQ}=;afE=rVs#Y>f7rP)IWK8El0rZMcttke0S~?GG zfR8tTN}Uy+Y%S&~owb4fbdV174pC=W5WO*A>7Tv9%&|CB2BA%Zw)ka$dz&obeWepc zOs3j*%Hh9Ch>wN za0AH&yn!|%1D79DmAV0TUrh{mI_(QqSK$L5ck_jaiH6cvsNejM&$5Hqvdnn+AQ+=K zGYpmk(veUw$_7b}I?cBq&yn7R1K@SeqJ*_Edj0-`kPI=)@e=D2;Da*0KlQL!`?rbo zgQ%Ok{c7IQ06;W zWPtMaE~qz69DED0tQAHyFqhXe4h)+sR*S(&92Tfas$O~PZ+>hqdNv%v4!w$iy=un3T?6^=cp7esztpiX> z4zy^0-pis1lYwRP`x~IOl%9Dn{=&oJ(|Mzch83Q3_kvY&?!*?E;4^UMP1RJ4`JB?B z?wlM;cbM9jYNZ9CC){8NygqT5u&=lK{N zk=(vrOtldh`#_di#(8c>@<;>Ip`-2Q)6i2vQS6?rp!|L?SFC0GF2Q8Ab0;!%*Cg$i zq2O0p=HRHB9x)-VLAOX3@RjCQE7F0i+VM|(*7|ImJIOU@BT~_;ngC( zd-O=R?rz@5(u@#WRua29%xuqNeA%2p4~QKM2n8NtM?XP_sb5TtiWVd62i;FtuCz4Pee=dykcAf4~aO74t*97+7wc7R8e> zR;36{J(ewd@zl0)?Y}ju=KXneaVH_|b)P;2Dd>XeP%pScTF~Lh0P!4Cp@CNF4c3{+ z*xEqx{d>V#AcBQ!r}*3;b9Ys1z@ZJ|^w)Gc5*0~z~kD1fP$QBhPE z2Zfmv`cr%=;q+_!!w-)`ssd`QO$+FcgUzUQw3+$#6lAa}HhR`X$3V64N7W!+|oOxB$CD@D@_9Lefi{`p(l@5jK>!IXxaJq515?pQa1auNN` zV=pK(FCp6icV?@M*?E9525}4qaQRmv4=t*jSX4k+Nas#8jjDO--aN$59ajCR`WddG zs}F;>^>LVA9{^RLq0utP)BfW}SXjW7AA=1p7lSoz=1JiAH=F#weeIoL?KUz2+<6$Z z`^Uo8x>QC>ASzl189bo8a#s5fU2H`M2E_xO15y#PX@BS|BUg^;GoY+)y!MQ%ee+o^ z%-LIiIn3>8Yn&;}N0%xiXjrHLLWfEF zy^0LR<7?Ha>H1(ny*mEvS@0QnH{SWuslDoZAyK9l+*8#?c*4FXj^Fqhlb$MSGGY~>^JZSjvikPe2NZmSE4XDr4una!L^1G^O(3nK z7gW?(4}!&0x(a1;ebfw(ncS_~$DK1ACN6@30@T?U3bmStL%<RZK_PpiH`S!h@a2H?od|oUebrc=YB274TGtf#rd?MYb_(Fg~bXwJ!|d z{OcbdhtN8L^U61St%5M~Bpm{!FHH`70B=<{%{m6|3h)LvV#N>sm;0UsXYy5?H+4b} zF!NwC*0S()q&7tzg0b9jS5_xb5Y)el#rgZ+Fiy;MKbLg-<;7RIzUl2OrkWTq9bUQy zrAIfCTB4zIEx_V^({?UZNA3a>Ptw5@0(?4i$G5K6d?vW57%ZI{=QGPjP!21;QY8m! zI7o+T@VR9?p;=x4t3c3cQ8m&zlcqa+{_pXhJb(T^X95Z^G@<>S%*_)r>%#r{G3o?U zolFN$?A_ciMs1k$&Xd|tP2%r`Flqldnb>WqZK`5AnI9EDZhr9% zFqLZq)bp%f71T`U5$mr~k3pb(KO@xC8Y1Qrp3Kn96{{KCpy^N_qxnTH!t~|vHbR_8-l*=!G zZ47gDjq!W(t4DR$0yJw5pLF$Auxsz#RahNx{qZMHgXhkG0e^nzexn6a-IR?rFu)wL ze`~KjbLTK53vmgCJX{@}Og-?;zkx9}e9%S^z+z)qc@U&`tzfxWa>4fIb%QsBM}ae@ z^+m~{5Ws~W6^R1w&!kNqG>e1Zkr#gCQO`$o8pY?F8zT;#v&%UXxccv42?xLoUR(js z@$eiz`d~5`uvWA908@v0(Qy)2uFTbUn{F@#jXYX_Xg-Xw^JEQX?+OPG@&yyDgV+!X zR+LrbUzzgdvryYZp>S<{zwlXEajY}PzZTh?^5s1oOl3W`^R9qePBqkF-VSj5+o>uR zZoCK3$|U)TE}Z27@LGUjSKD9>2vq6AX!RYRWY&NNbp_OV^?azTEnjyqS5&W4otl>^ z?zNXsB-ur6-3_U(KTz)t!`#{c&LReu-fCFf{vyDexMHAc-CV~uZZ;95YGaiQfx9uU zfOE|TSSvyKs+|fVWCr-Su8HE8S(IfgaCI`fdvu2?7qO=yYS!svqLf0cV<`ZfAW%=d z{hZoVT(Ob2TA@#vhZYC2T|EWv*Gt9-^4$L7750jtNd$M&1{xg$%e?d=xb~N&#;A(M zabCmf=Tc@HTe$tO#t?8Lhyy!va%XvSQiC0AU$XXZ-C6l+1B}-3$qr_QYmBY|OWpAK zyAV8_SWyis#(Zm-n;Pw3snvC;p!3N(m?dtz)H3+h1CSN^i1yE;*j2&6+rfJ;zFG!e zYBy|x$O8Q{%mLiLF)E(xBe8c9Kme;!jX+~7OoBofU-_4;psX4l$zUwhE}+GL1RHft zSJWY@9Uba~S6PqD)+b$jhOa4BXE(>7GMUVV$J_U`Kfzx^wHn9H-#2iQR& zR?)$uhWTo|^q*&5Rt3)JHi8C0I;x=gUH&DwxmlclefM5b7LRIwci93`fnMen z8Bzb`{W1sqvq!)dc>1xPia&oWp=%`+AaY1O8M^k{cY*3YJjj8MUlzFoVk2JpX$`hIrMS5T>L2VH!o zqiTk2k(g*bE<7q|WZxS&xw{w>FV|uyx5^>k3vONI4L|T~1=C!5b zN!0%3gAwkD3z}%z0M4_{8^khHd->}5W)r<5V3t_k0@&XHR>TTpMF{35qts$_*FIfq zZuP6r=d*y}aor8&kQiSbfn1pFY$(QH-E!YuAxhF%n&UXODJ{g|fnG#M?WumU;GJ zZg+3^{I}u-XQBj`--}|a@u8Dhw%Gr@|0f0i^Oa+({3_;_nJHD6Y){^!ytsznO@;in F{r|_@0MY;e diff --git a/examples/interchainjs/scripts/aminos.js b/examples/interchainjs/scripts/aminos.js deleted file mode 100644 index 7eba47c8..00000000 --- a/examples/interchainjs/scripts/aminos.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = { - // PUT YOUR AMINO names here... - - // Staking - '/cosmos.staking.v1beta1.MsgCreateValidator': { - aminoType: 'cosmos-sdk/MsgCreateValidator' - }, - '/cosmos.staking.v1beta1.MsgEditValidator': { - aminoType: 'cosmos-sdk/MsgEditValidator' - }, - '/cosmos.staking.v1beta1.MsgDelegate': { - aminoType: 'cosmos-sdk/MsgDelegate' - }, - '/cosmos.staking.v1beta1.MsgUndelegate': { - aminoType: 'cosmos-sdk/MsgUndelegate' - }, - '/cosmos.staking.v1beta1.MsgBeginRedelegate': { - aminoType: 'cosmos-sdk/MsgBeginRedelegate' - }, - '/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation': { - aminoType: 'cosmos-sdk/MsgCancelUnbondingDelegation' - }, - '/cosmos.staking.v1beta1.MsgUpdateParams': { - aminoType: 'cosmos-sdk/x/staking/MsgUpdateParams' - }, - - // IBC - '/ibc.applications.transfer.v1.MsgTransfer': { - aminoType: 'cosmos-sdk/MsgTransfer' - } -}; diff --git a/examples/interchainjs/scripts/codegen.js b/examples/interchainjs/scripts/codegen.js deleted file mode 100644 index 66fef56a..00000000 --- a/examples/interchainjs/scripts/codegen.js +++ /dev/null @@ -1,98 +0,0 @@ -const { join, resolve } = require('path'); -const telescope = require('@cosmology/telescope').default; -const AMINO_MAP = require('./aminos').default; - -const protoDirs = [join(__dirname, '/../proto')]; - -telescope({ - protoDirs, - outPath: join(__dirname, '../src/codegen'), - options: { - env: 'v-next', - tsDisable: { - patterns: ['**/tx.registry.ts'], - files: [ - 'ibc/core/types/v1/genesis.ts', - 'ibc/applications/interchain_accounts/genesis/v1/genesis.ts', - 'cosmos/tx/signing/v1beta1/signing.ts', - 'cosmos/staking/v1beta1/tx.ts', - 'cosmos/staking/v1beta1/staking.ts', - - 'cosmos/authz/v1beta1/tx.amino.ts', - 'cosmos/staking/v1beta1/tx.amino.ts', - ], - }, - interfaces: { - enabled: false, - useUnionTypes: false, - }, - prototypes: { - enabled: true, - parser: { - keepCase: false, - }, - excluded: { - packages: ['cosmos.autocli.v1'], - }, - addAminoTypeToObjects: true, - addTypeUrlToObjects: true, - typingsFormat: { - customTypes: { - useCosmosSDKDec: true, - }, - num64: 'bigint', - useDeepPartial: true, - useExact: false, - timestamp: 'date', - duration: 'duration', - }, - - methods: { - encode: true, - decode: true, - fromJSON: true, - toJSON: true, - fromPartial: true, - toSDK: true, - fromSDK: true, - // - toAmino: true, - fromAmino: true, - fromProto: true, - toProto: true, - }, - includePackageVar: false, - fieldDefaultIsOptional: true, - useOptionalNullable: true, - allowUndefinedTypes: true, - }, - reactQuery: { - enabled: true, - instantExport: { - include: { - patterns: ['**'], - }, - }, - }, - aminoEncoding: { - enabled: true, - useRecursiveV2encoding: true, - }, - lcdClients: { - enabled: false, - }, - rpcClients: { - enabled: true, - camelCase: true, - }, - mobx: { - enabled: true, - }, - }, -}) - .then(() => { - console.log('✨ all done!'); - }) - .catch((e) => { - console.error(e); - }); diff --git a/examples/interchainjs/src/codegen/binary.ts b/examples/interchainjs/src/codegen/binary.ts deleted file mode 100644 index d87841e1..00000000 --- a/examples/interchainjs/src/codegen/binary.ts +++ /dev/null @@ -1,534 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -// Copyright (c) 2016, Daniel Wirtz All rights reserved. - -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: - -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of its author, nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. - -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- - -// Code generated by the command line utilities is owned by the owner -// of the input file used when generating it. This code is not -// standalone and requires a support library to be linked with it. This -// support library is itself covered by the above license. - -import { utf8Length, utf8Read, utf8Write } from "./utf8"; -import { - int64ToString, - readInt32, - readUInt32, - uInt64ToString, - varint32read, - varint64read, - writeVarint32, - writeVarint64, - int64FromString, - int64Length, - writeFixed32, - writeByte, - zzDecode, - zzEncode, -} from "./varint"; - -export enum WireType { - Varint = 0, - - Fixed64 = 1, - - Bytes = 2, - - Fixed32 = 5, -} - -// Reader -export interface IBinaryReader { - buf: Uint8Array; - pos: number; - type: number; - len: number; - tag(): [number, WireType, number]; - skip(length?: number): this; - skipType(wireType: number): this; - uint32(): number; - int32(): number; - sint32(): number; - fixed32(): number; - sfixed32(): number; - int64(): bigint; - uint64(): bigint; - sint64(): bigint; - fixed64(): bigint; - sfixed64(): bigint; - float(): number; - double(): number; - bool(): boolean; - bytes(): Uint8Array; - string(): string; -} - -export class BinaryReader implements IBinaryReader { - buf: Uint8Array; - pos: number; - type: number; - len: number; - - assertBounds(): void { - if (this.pos > this.len) throw new RangeError("premature EOF"); - } - - constructor(buf?: ArrayLike) { - this.buf = buf ? new Uint8Array(buf) : new Uint8Array(0); - this.pos = 0; - this.type = 0; - this.len = this.buf.length; - } - - tag(): [number, WireType, number] { - const tag = this.uint32(), - fieldNo = tag >>> 3, - wireType = tag & 7; - if (fieldNo <= 0 || wireType < 0 || wireType > 5) - throw new Error( - "illegal tag: field no " + fieldNo + " wire type " + wireType - ); - return [fieldNo, wireType, tag]; - } - - skip(length?: number) { - if (typeof length === "number") { - if (this.pos + length > this.len) throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - if (this.pos >= this.len) throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; - } - - skipType(wireType: number) { - switch (wireType) { - case WireType.Varint: - this.skip(); - break; - case WireType.Fixed64: - this.skip(8); - break; - case WireType.Bytes: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType); - } - break; - case WireType.Fixed32: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; - } - - uint32(): number { - return varint32read.bind(this)(); - } - - int32(): number { - return this.uint32() | 0; - } - - sint32(): number { - const num = this.uint32(); - return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding - } - - fixed32(): number { - const val = readUInt32(this.buf, this.pos); - this.pos += 4; - return val; - } - - sfixed32(): number { - const val = readInt32(this.buf, this.pos); - this.pos += 4; - return val; - } - - int64(): bigint { - const [lo, hi] = varint64read.bind(this)(); - return BigInt(int64ToString(lo, hi)); - } - - uint64(): bigint { - const [lo, hi] = varint64read.bind(this)(); - return BigInt(uInt64ToString(lo, hi)); - } - - sint64(): bigint { - let [lo, hi] = varint64read.bind(this)(); - // zig zag - [lo, hi] = zzDecode(lo, hi); - return BigInt(int64ToString(lo, hi)); - } - - fixed64(): bigint { - const lo = this.sfixed32(); - const hi = this.sfixed32(); - return BigInt(uInt64ToString(lo, hi)); - } - sfixed64(): bigint { - const lo = this.sfixed32(); - const hi = this.sfixed32(); - return BigInt(int64ToString(lo, hi)); - } - - float(): number { - throw new Error("float not supported"); - } - - double(): number { - throw new Error("double not supported"); - } - - bool(): boolean { - const [lo, hi] = varint64read.bind(this)(); - return lo !== 0 || hi !== 0; - } - - bytes(): Uint8Array { - const len = this.uint32(), - start = this.pos; - this.pos += len; - this.assertBounds(); - return this.buf.subarray(start, start + len); - } - - string(): string { - const bytes = this.bytes(); - return utf8Read(bytes, 0, bytes.length); - } -} - -// Writer -export interface IBinaryWriter { - len: number; - head: IOp; - tail: IOp; - states: State | null; - finish(): Uint8Array; - fork(): IBinaryWriter; - reset(): IBinaryWriter; - ldelim(): IBinaryWriter; - tag(fieldNo: number, type: WireType): IBinaryWriter; - uint32(value: number): IBinaryWriter; - int32(value: number): IBinaryWriter; - sint32(value: number): IBinaryWriter; - int64(value: string | number | bigint): IBinaryWriter; - uint64: (value: string | number | bigint) => IBinaryWriter; - sint64(value: string | number | bigint): IBinaryWriter; - fixed64(value: string | number | bigint): IBinaryWriter; - sfixed64: (value: string | number | bigint) => IBinaryWriter; - bool(value: boolean): IBinaryWriter; - fixed32(value: number): IBinaryWriter; - sfixed32: (value: number) => IBinaryWriter; - float(value: number): IBinaryWriter; - double(value: number): IBinaryWriter; - bytes(value: Uint8Array): IBinaryWriter; - string(value: string): IBinaryWriter; -} - -interface IOp { - len: number; - next?: IOp; - proceed(buf: Uint8Array | number[], pos: number): void; -} - -class Op implements IOp { - fn?: ((val: T, buf: Uint8Array | number[], pos: number) => void) | null; - len: number; - val: T; - next?: IOp; - - constructor( - fn: - | (( - val: T, - buf: Uint8Array | number[], - pos: number - ) => void | undefined | null) - | null, - len: number, - val: T - ) { - this.fn = fn; - this.len = len; - this.val = val; - } - - proceed(buf: Uint8Array | number[], pos: number) { - if (this.fn) { - this.fn(this.val, buf, pos); - } - } -} - -class State { - head: IOp; - tail: IOp; - len: number; - next: State | null; - - constructor(writer: BinaryWriter) { - this.head = writer.head; - this.tail = writer.tail; - this.len = writer.len; - this.next = writer.states; - } -} - -export class BinaryWriter implements IBinaryWriter { - len = 0; - head: IOp; - tail: IOp; - states: State | null; - - constructor() { - this.head = new Op(null, 0, 0); - this.tail = this.head; - this.states = null; - } - - static create() { - return new BinaryWriter(); - } - - static alloc(size: number): Uint8Array | number[] { - if (typeof Uint8Array !== "undefined") { - return pool( - (size) => new Uint8Array(size), - Uint8Array.prototype.subarray - )(size); - } else { - return new Array(size); - } - } - - private _push( - fn: (val: T, buf: Uint8Array | number[], pos: number) => void, - len: number, - val: T - ) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; - } - - finish(): Uint8Array { - let head = this.head.next, - pos = 0; - const buf = BinaryWriter.alloc(this.len); - while (head) { - head.proceed(buf, pos); - pos += head.len; - head = head.next; - } - return buf as Uint8Array; - } - - fork(): BinaryWriter { - this.states = new State(this); - this.head = this.tail = new Op(null, 0, 0); - this.len = 0; - return this; - } - - reset(): BinaryWriter { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(null, 0, 0); - this.len = 0; - } - return this; - } - - ldelim(): BinaryWriter { - const head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; - } - - tag(fieldNo: number, type: WireType): BinaryWriter { - return this.uint32(((fieldNo << 3) | type) >>> 0); - } - - uint32(value: number): BinaryWriter { - this.len += (this.tail = this.tail.next = - new Op( - writeVarint32, - (value = value >>> 0) < 128 - ? 1 - : value < 16384 - ? 2 - : value < 2097152 - ? 3 - : value < 268435456 - ? 4 - : 5, - value - )).len; - return this; - } - - int32(value: number): BinaryWriter { - return value < 0 - ? this._push(writeVarint64, 10, int64FromString(value.toString())) // 10 bytes per spec - : this.uint32(value); - } - - sint32(value: number): BinaryWriter { - return this.uint32(((value << 1) ^ (value >> 31)) >>> 0); - } - - int64(value: string | number | bigint): BinaryWriter { - const { lo, hi } = int64FromString(value.toString()); - return this._push(writeVarint64, int64Length(lo, hi), { lo, hi }); - } - - // uint64 is the same with int64 - uint64 = BinaryWriter.prototype.int64; - - sint64(value: string | number | bigint): BinaryWriter { - let { lo, hi } = int64FromString(value.toString()); - // zig zag - [lo, hi] = zzEncode(lo, hi); - return this._push(writeVarint64, int64Length(lo, hi), { lo, hi }); - } - - fixed64(value: string | number | bigint): BinaryWriter { - const { lo, hi } = int64FromString(value.toString()); - return this._push(writeFixed32, 4, lo)._push(writeFixed32, 4, hi); - } - - // sfixed64 is the same with fixed64 - sfixed64 = BinaryWriter.prototype.fixed64; - - bool(value: boolean): BinaryWriter { - return this._push(writeByte, 1, value ? 1 : 0); - } - - fixed32(value: number): BinaryWriter { - return this._push(writeFixed32, 4, value >>> 0); - } - - // sfixed32 is the same with fixed32 - sfixed32 = BinaryWriter.prototype.fixed32; - - float(value: number): BinaryWriter { - throw new Error("float not supported" + value); - } - - double(value: number): BinaryWriter { - throw new Error("double not supported" + value); - } - - bytes(value: Uint8Array): BinaryWriter { - const len = value.length >>> 0; - if (!len) return this._push(writeByte, 1, 0); - return this.uint32(len)._push(writeBytes, len, value); - } - - string(value: string): BinaryWriter { - const len = utf8Length(value); - return len - ? this.uint32(len)._push(utf8Write, len, value) - : this._push(writeByte, 1, 0); - } -} - -function writeBytes( - val: Uint8Array | number[], - buf: Uint8Array | number[], - pos: number -) { - if (typeof Uint8Array !== "undefined") { - (buf as Uint8Array).set(val, pos); - } else { - for (let i = 0; i < val.length; ++i) buf[pos + i] = val[i]; - } -} - -function pool( - alloc: (size: number) => Uint8Array, - slice: (begin?: number, end?: number) => Uint8Array, - size?: number -): (size: number) => Uint8Array { - const SIZE = size || 8192; - const MAX = SIZE >>> 1; - let slab: Uint8Array | null = null; - let offset = SIZE; - return function pool_alloc(size): Uint8Array { - if (size < 1 || size > MAX) return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - const buf: Uint8Array = slice.call(slab, offset, (offset += size)); - if (offset & 7) - // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} - -function indexOutOfRange(reader: BinaryReader, writeLength?: number) { - return RangeError( - "index out of range: " + - reader.pos + - " + " + - (writeLength || 1) + - " > " + - reader.len - ); -} diff --git a/examples/interchainjs/src/codegen/confio/proofs.ts b/examples/interchainjs/src/codegen/confio/proofs.ts deleted file mode 100644 index 50a8626c..00000000 --- a/examples/interchainjs/src/codegen/confio/proofs.ts +++ /dev/null @@ -1,2318 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../helpers"; -export enum HashOp { - /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */ - NO_HASH = 0, - SHA256 = 1, - SHA512 = 2, - KECCAK = 3, - RIPEMD160 = 4, - /** BITCOIN - ripemd160(sha256(x)) */ - BITCOIN = 5, - UNRECOGNIZED = -1, -} -export const HashOpSDKType = HashOp; -export const HashOpAmino = HashOp; -export function hashOpFromJSON(object: any): HashOp { - switch (object) { - case 0: - case "NO_HASH": - return HashOp.NO_HASH; - case 1: - case "SHA256": - return HashOp.SHA256; - case 2: - case "SHA512": - return HashOp.SHA512; - case 3: - case "KECCAK": - return HashOp.KECCAK; - case 4: - case "RIPEMD160": - return HashOp.RIPEMD160; - case 5: - case "BITCOIN": - return HashOp.BITCOIN; - case -1: - case "UNRECOGNIZED": - default: - return HashOp.UNRECOGNIZED; - } -} -export function hashOpToJSON(object: HashOp): string { - switch (object) { - case HashOp.NO_HASH: - return "NO_HASH"; - case HashOp.SHA256: - return "SHA256"; - case HashOp.SHA512: - return "SHA512"; - case HashOp.KECCAK: - return "KECCAK"; - case HashOp.RIPEMD160: - return "RIPEMD160"; - case HashOp.BITCOIN: - return "BITCOIN"; - case HashOp.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - */ -export enum LengthOp { - /** NO_PREFIX - NO_PREFIX don't include any length info */ - NO_PREFIX = 0, - /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */ - VAR_PROTO = 1, - /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */ - VAR_RLP = 2, - /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */ - FIXED32_BIG = 3, - /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */ - FIXED32_LITTLE = 4, - /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */ - FIXED64_BIG = 5, - /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */ - FIXED64_LITTLE = 6, - /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */ - REQUIRE_32_BYTES = 7, - /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */ - REQUIRE_64_BYTES = 8, - UNRECOGNIZED = -1, -} -export const LengthOpSDKType = LengthOp; -export const LengthOpAmino = LengthOp; -export function lengthOpFromJSON(object: any): LengthOp { - switch (object) { - case 0: - case "NO_PREFIX": - return LengthOp.NO_PREFIX; - case 1: - case "VAR_PROTO": - return LengthOp.VAR_PROTO; - case 2: - case "VAR_RLP": - return LengthOp.VAR_RLP; - case 3: - case "FIXED32_BIG": - return LengthOp.FIXED32_BIG; - case 4: - case "FIXED32_LITTLE": - return LengthOp.FIXED32_LITTLE; - case 5: - case "FIXED64_BIG": - return LengthOp.FIXED64_BIG; - case 6: - case "FIXED64_LITTLE": - return LengthOp.FIXED64_LITTLE; - case 7: - case "REQUIRE_32_BYTES": - return LengthOp.REQUIRE_32_BYTES; - case 8: - case "REQUIRE_64_BYTES": - return LengthOp.REQUIRE_64_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return LengthOp.UNRECOGNIZED; - } -} -export function lengthOpToJSON(object: LengthOp): string { - switch (object) { - case LengthOp.NO_PREFIX: - return "NO_PREFIX"; - case LengthOp.VAR_PROTO: - return "VAR_PROTO"; - case LengthOp.VAR_RLP: - return "VAR_RLP"; - case LengthOp.FIXED32_BIG: - return "FIXED32_BIG"; - case LengthOp.FIXED32_LITTLE: - return "FIXED32_LITTLE"; - case LengthOp.FIXED64_BIG: - return "FIXED64_BIG"; - case LengthOp.FIXED64_LITTLE: - return "FIXED64_LITTLE"; - case LengthOp.REQUIRE_32_BYTES: - return "REQUIRE_32_BYTES"; - case LengthOp.REQUIRE_64_BYTES: - return "REQUIRE_64_BYTES"; - case LengthOp.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ -export interface ExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - path: InnerOp[]; -} -export interface ExistenceProofProtoMsg { - typeUrl: "/ics23.ExistenceProof"; - value: Uint8Array; -} -/** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ -export interface ExistenceProofAmino { - key: Uint8Array; - value: Uint8Array; - leaf?: LeafOpAmino | undefined; - path: InnerOpAmino[]; -} -export interface ExistenceProofAminoMsg { - type: "/ics23.ExistenceProof"; - value: ExistenceProofAmino; -} -/** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ -export interface ExistenceProofSDKType { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOpSDKType | undefined; - path: InnerOpSDKType[]; -} -/** - * NonExistenceProof takes a proof of two neighbors, one left of the desired key, - * one right of the desired key. If both proofs are valid AND they are neighbors, - * then there is no valid proof for the given key. - */ -export interface NonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: ExistenceProof | undefined; - right: ExistenceProof | undefined; -} -export interface NonExistenceProofProtoMsg { - typeUrl: "/ics23.NonExistenceProof"; - value: Uint8Array; -} -/** - * NonExistenceProof takes a proof of two neighbors, one left of the desired key, - * one right of the desired key. If both proofs are valid AND they are neighbors, - * then there is no valid proof for the given key. - */ -export interface NonExistenceProofAmino { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left?: ExistenceProofAmino | undefined; - right?: ExistenceProofAmino | undefined; -} -export interface NonExistenceProofAminoMsg { - type: "/ics23.NonExistenceProof"; - value: NonExistenceProofAmino; -} -/** - * NonExistenceProof takes a proof of two neighbors, one left of the desired key, - * one right of the desired key. If both proofs are valid AND they are neighbors, - * then there is no valid proof for the given key. - */ -export interface NonExistenceProofSDKType { - key: Uint8Array; - left: ExistenceProofSDKType | undefined; - right: ExistenceProofSDKType | undefined; -} -/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ -export interface CommitmentProof { - exist?: ExistenceProof | undefined; - nonexist?: NonExistenceProof | undefined; - batch?: BatchProof | undefined; - compressed?: CompressedBatchProof | undefined; -} -export interface CommitmentProofProtoMsg { - typeUrl: "/ics23.CommitmentProof"; - value: Uint8Array; -} -/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ -export interface CommitmentProofAmino { - exist?: ExistenceProofAmino | undefined; - nonexist?: NonExistenceProofAmino | undefined; - batch?: BatchProofAmino | undefined; - compressed?: CompressedBatchProofAmino | undefined; -} -export interface CommitmentProofAminoMsg { - type: "/ics23.CommitmentProof"; - value: CommitmentProofAmino; -} -/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ -export interface CommitmentProofSDKType { - exist?: ExistenceProofSDKType | undefined; - nonexist?: NonExistenceProofSDKType | undefined; - batch?: BatchProofSDKType | undefined; - compressed?: CompressedBatchProofSDKType | undefined; -} -/** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ -export interface LeafOp { - hash: HashOp; - prehashKey: HashOp; - prehashValue: HashOp; - length: LengthOp; - /** - * prefix is a fixed bytes that may optionally be included at the beginning to differentiate - * a leaf node from an inner node. - */ - prefix: Uint8Array; -} -export interface LeafOpProtoMsg { - typeUrl: "/ics23.LeafOp"; - value: Uint8Array; -} -/** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ -export interface LeafOpAmino { - hash: HashOp; - prehash_key: HashOp; - prehash_value: HashOp; - length: LengthOp; - /** - * prefix is a fixed bytes that may optionally be included at the beginning to differentiate - * a leaf node from an inner node. - */ - prefix: Uint8Array; -} -export interface LeafOpAminoMsg { - type: "/ics23.LeafOp"; - value: LeafOpAmino; -} -/** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ -export interface LeafOpSDKType { - hash: HashOp; - prehash_key: HashOp; - prehash_value: HashOp; - length: LengthOp; - prefix: Uint8Array; -} -/** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ -export interface InnerOp { - hash: HashOp; - prefix: Uint8Array; - suffix: Uint8Array; -} -export interface InnerOpProtoMsg { - typeUrl: "/ics23.InnerOp"; - value: Uint8Array; -} -/** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ -export interface InnerOpAmino { - hash: HashOp; - prefix: Uint8Array; - suffix: Uint8Array; -} -export interface InnerOpAminoMsg { - type: "/ics23.InnerOp"; - value: InnerOpAmino; -} -/** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ -export interface InnerOpSDKType { - hash: HashOp; - prefix: Uint8Array; - suffix: Uint8Array; -} -/** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ -export interface ProofSpec { - /** - * any field in the ExistenceProof must be the same as in this spec. - * except Prefix, which is just the first bytes of prefix (spec can be longer) - */ - leafSpec: LeafOp | undefined; - innerSpec: InnerSpec | undefined; - /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */ - maxDepth: number; - /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */ - minDepth: number; -} -export interface ProofSpecProtoMsg { - typeUrl: "/ics23.ProofSpec"; - value: Uint8Array; -} -/** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ -export interface ProofSpecAmino { - /** - * any field in the ExistenceProof must be the same as in this spec. - * except Prefix, which is just the first bytes of prefix (spec can be longer) - */ - leaf_spec?: LeafOpAmino | undefined; - inner_spec?: InnerSpecAmino | undefined; - /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */ - max_depth: number; - /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */ - min_depth: number; -} -export interface ProofSpecAminoMsg { - type: "/ics23.ProofSpec"; - value: ProofSpecAmino; -} -/** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ -export interface ProofSpecSDKType { - leaf_spec: LeafOpSDKType | undefined; - inner_spec: InnerSpecSDKType | undefined; - max_depth: number; - min_depth: number; -} -/** - * InnerSpec contains all store-specific structure info to determine if two proofs from a - * given store are neighbors. - * - * This enables: - * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) - */ -export interface InnerSpec { - /** - * Child order is the ordering of the children node, must count from 0 - * iavl tree is [0, 1] (left then right) - * merk is [0, 2, 1] (left, right, here) - */ - childOrder: number[]; - childSize: number; - minPrefixLength: number; - maxPrefixLength: number; - /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */ - emptyChild: Uint8Array; - /** hash is the algorithm that must be used for each InnerOp */ - hash: HashOp; -} -export interface InnerSpecProtoMsg { - typeUrl: "/ics23.InnerSpec"; - value: Uint8Array; -} -/** - * InnerSpec contains all store-specific structure info to determine if two proofs from a - * given store are neighbors. - * - * This enables: - * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) - */ -export interface InnerSpecAmino { - /** - * Child order is the ordering of the children node, must count from 0 - * iavl tree is [0, 1] (left then right) - * merk is [0, 2, 1] (left, right, here) - */ - child_order: number[]; - child_size: number; - min_prefix_length: number; - max_prefix_length: number; - /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */ - empty_child: Uint8Array; - /** hash is the algorithm that must be used for each InnerOp */ - hash: HashOp; -} -export interface InnerSpecAminoMsg { - type: "/ics23.InnerSpec"; - value: InnerSpecAmino; -} -/** - * InnerSpec contains all store-specific structure info to determine if two proofs from a - * given store are neighbors. - * - * This enables: - * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) - */ -export interface InnerSpecSDKType { - child_order: number[]; - child_size: number; - min_prefix_length: number; - max_prefix_length: number; - empty_child: Uint8Array; - hash: HashOp; -} -/** BatchProof is a group of multiple proof types than can be compressed */ -export interface BatchProof { - entries: BatchEntry[]; -} -export interface BatchProofProtoMsg { - typeUrl: "/ics23.BatchProof"; - value: Uint8Array; -} -/** BatchProof is a group of multiple proof types than can be compressed */ -export interface BatchProofAmino { - entries: BatchEntryAmino[]; -} -export interface BatchProofAminoMsg { - type: "/ics23.BatchProof"; - value: BatchProofAmino; -} -/** BatchProof is a group of multiple proof types than can be compressed */ -export interface BatchProofSDKType { - entries: BatchEntrySDKType[]; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface BatchEntry { - exist?: ExistenceProof | undefined; - nonexist?: NonExistenceProof | undefined; -} -export interface BatchEntryProtoMsg { - typeUrl: "/ics23.BatchEntry"; - value: Uint8Array; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface BatchEntryAmino { - exist?: ExistenceProofAmino | undefined; - nonexist?: NonExistenceProofAmino | undefined; -} -export interface BatchEntryAminoMsg { - type: "/ics23.BatchEntry"; - value: BatchEntryAmino; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface BatchEntrySDKType { - exist?: ExistenceProofSDKType | undefined; - nonexist?: NonExistenceProofSDKType | undefined; -} -export interface CompressedBatchProof { - entries: CompressedBatchEntry[]; - lookupInners: InnerOp[]; -} -export interface CompressedBatchProofProtoMsg { - typeUrl: "/ics23.CompressedBatchProof"; - value: Uint8Array; -} -export interface CompressedBatchProofAmino { - entries: CompressedBatchEntryAmino[]; - lookup_inners: InnerOpAmino[]; -} -export interface CompressedBatchProofAminoMsg { - type: "/ics23.CompressedBatchProof"; - value: CompressedBatchProofAmino; -} -export interface CompressedBatchProofSDKType { - entries: CompressedBatchEntrySDKType[]; - lookup_inners: InnerOpSDKType[]; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface CompressedBatchEntry { - exist?: CompressedExistenceProof | undefined; - nonexist?: CompressedNonExistenceProof | undefined; -} -export interface CompressedBatchEntryProtoMsg { - typeUrl: "/ics23.CompressedBatchEntry"; - value: Uint8Array; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface CompressedBatchEntryAmino { - exist?: CompressedExistenceProofAmino | undefined; - nonexist?: CompressedNonExistenceProofAmino | undefined; -} -export interface CompressedBatchEntryAminoMsg { - type: "/ics23.CompressedBatchEntry"; - value: CompressedBatchEntryAmino; -} -/** Use BatchEntry not CommitmentProof, to avoid recursion */ -export interface CompressedBatchEntrySDKType { - exist?: CompressedExistenceProofSDKType | undefined; - nonexist?: CompressedNonExistenceProofSDKType | undefined; -} -export interface CompressedExistenceProof { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOp | undefined; - /** these are indexes into the lookup_inners table in CompressedBatchProof */ - path: number[]; -} -export interface CompressedExistenceProofProtoMsg { - typeUrl: "/ics23.CompressedExistenceProof"; - value: Uint8Array; -} -export interface CompressedExistenceProofAmino { - key: Uint8Array; - value: Uint8Array; - leaf?: LeafOpAmino | undefined; - /** these are indexes into the lookup_inners table in CompressedBatchProof */ - path: number[]; -} -export interface CompressedExistenceProofAminoMsg { - type: "/ics23.CompressedExistenceProof"; - value: CompressedExistenceProofAmino; -} -export interface CompressedExistenceProofSDKType { - key: Uint8Array; - value: Uint8Array; - leaf: LeafOpSDKType | undefined; - path: number[]; -} -export interface CompressedNonExistenceProof { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left: CompressedExistenceProof | undefined; - right: CompressedExistenceProof | undefined; -} -export interface CompressedNonExistenceProofProtoMsg { - typeUrl: "/ics23.CompressedNonExistenceProof"; - value: Uint8Array; -} -export interface CompressedNonExistenceProofAmino { - /** TODO: remove this as unnecessary??? we prove a range */ - key: Uint8Array; - left?: CompressedExistenceProofAmino | undefined; - right?: CompressedExistenceProofAmino | undefined; -} -export interface CompressedNonExistenceProofAminoMsg { - type: "/ics23.CompressedNonExistenceProof"; - value: CompressedNonExistenceProofAmino; -} -export interface CompressedNonExistenceProofSDKType { - key: Uint8Array; - left: CompressedExistenceProofSDKType | undefined; - right: CompressedExistenceProofSDKType | undefined; -} -function createBaseExistenceProof(): ExistenceProof { - return { - key: new Uint8Array(), - value: new Uint8Array(), - leaf: LeafOp.fromPartial({}), - path: [] - }; -} -export const ExistenceProof = { - typeUrl: "/ics23.ExistenceProof", - encode(message: ExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.path) { - InnerOp.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ExistenceProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExistenceProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - message.path.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ExistenceProof { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - leaf: isSet(object.leaf) ? LeafOp.fromJSON(object.leaf) : undefined, - path: Array.isArray(object?.path) ? object.path.map((e: any) => InnerOp.fromJSON(e)) : [] - }; - }, - toJSON(message: ExistenceProof): unknown { - 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())); - message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map(e => e ? InnerOp.toJSON(e) : undefined); - } else { - obj.path = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ExistenceProof { - const message = createBaseExistenceProof(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.leaf = object.leaf !== undefined && object.leaf !== null ? LeafOp.fromPartial(object.leaf) : undefined; - message.path = object.path?.map(e => InnerOp.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ExistenceProofSDKType): ExistenceProof { - return { - key: object?.key, - value: object?.value, - leaf: object.leaf ? LeafOp.fromSDK(object.leaf) : undefined, - path: Array.isArray(object?.path) ? object.path.map((e: any) => InnerOp.fromSDK(e)) : [] - }; - }, - toSDK(message: ExistenceProof): ExistenceProofSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toSDK(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map(e => e ? InnerOp.toSDK(e) : undefined); - } else { - obj.path = []; - } - return obj; - }, - fromAmino(object: ExistenceProofAmino): ExistenceProof { - return { - key: object.key, - value: object.value, - leaf: object?.leaf ? LeafOp.fromAmino(object.leaf) : undefined, - path: Array.isArray(object?.path) ? object.path.map((e: any) => InnerOp.fromAmino(e)) : [] - }; - }, - toAmino(message: ExistenceProof): ExistenceProofAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.leaf = message.leaf ? LeafOp.toAmino(message.leaf) : undefined; - if (message.path) { - obj.path = message.path.map(e => e ? InnerOp.toAmino(e) : undefined); - } else { - obj.path = []; - } - return obj; - }, - fromAminoMsg(object: ExistenceProofAminoMsg): ExistenceProof { - return ExistenceProof.fromAmino(object.value); - }, - fromProtoMsg(message: ExistenceProofProtoMsg): ExistenceProof { - return ExistenceProof.decode(message.value); - }, - toProto(message: ExistenceProof): Uint8Array { - return ExistenceProof.encode(message).finish(); - }, - toProtoMsg(message: ExistenceProof): ExistenceProofProtoMsg { - return { - typeUrl: "/ics23.ExistenceProof", - value: ExistenceProof.encode(message).finish() - }; - } -}; -function createBaseNonExistenceProof(): NonExistenceProof { - return { - key: new Uint8Array(), - left: ExistenceProof.fromPartial({}), - right: ExistenceProof.fromPartial({}) - }; -} -export const NonExistenceProof = { - typeUrl: "/ics23.NonExistenceProof", - encode(message: NonExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - ExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim(); - } - if (message.right !== undefined) { - ExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): NonExistenceProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNonExistenceProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): NonExistenceProof { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - left: isSet(object.left) ? ExistenceProof.fromJSON(object.left) : undefined, - right: isSet(object.right) ? ExistenceProof.fromJSON(object.right) : undefined - }; - }, - toJSON(message: NonExistenceProof): unknown { - 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); - message.right !== undefined && (obj.right = message.right ? ExistenceProof.toJSON(message.right) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): NonExistenceProof { - const message = createBaseNonExistenceProof(); - message.key = object.key ?? new Uint8Array(); - message.left = object.left !== undefined && object.left !== null ? ExistenceProof.fromPartial(object.left) : undefined; - message.right = object.right !== undefined && object.right !== null ? ExistenceProof.fromPartial(object.right) : undefined; - return message; - }, - fromSDK(object: NonExistenceProofSDKType): NonExistenceProof { - return { - key: object?.key, - left: object.left ? ExistenceProof.fromSDK(object.left) : undefined, - right: object.right ? ExistenceProof.fromSDK(object.right) : undefined - }; - }, - toSDK(message: NonExistenceProof): NonExistenceProofSDKType { - const obj: any = {}; - obj.key = message.key; - message.left !== undefined && (obj.left = message.left ? ExistenceProof.toSDK(message.left) : undefined); - message.right !== undefined && (obj.right = message.right ? ExistenceProof.toSDK(message.right) : undefined); - return obj; - }, - fromAmino(object: NonExistenceProofAmino): NonExistenceProof { - return { - key: object.key, - left: object?.left ? ExistenceProof.fromAmino(object.left) : undefined, - right: object?.right ? ExistenceProof.fromAmino(object.right) : undefined - }; - }, - toAmino(message: NonExistenceProof): NonExistenceProofAmino { - const obj: any = {}; - obj.key = message.key; - obj.left = message.left ? ExistenceProof.toAmino(message.left) : undefined; - obj.right = message.right ? ExistenceProof.toAmino(message.right) : undefined; - return obj; - }, - fromAminoMsg(object: NonExistenceProofAminoMsg): NonExistenceProof { - return NonExistenceProof.fromAmino(object.value); - }, - fromProtoMsg(message: NonExistenceProofProtoMsg): NonExistenceProof { - return NonExistenceProof.decode(message.value); - }, - toProto(message: NonExistenceProof): Uint8Array { - return NonExistenceProof.encode(message).finish(); - }, - toProtoMsg(message: NonExistenceProof): NonExistenceProofProtoMsg { - return { - typeUrl: "/ics23.NonExistenceProof", - value: NonExistenceProof.encode(message).finish() - }; - } -}; -function createBaseCommitmentProof(): CommitmentProof { - return { - exist: undefined, - nonexist: undefined, - batch: undefined, - compressed: undefined - }; -} -export const CommitmentProof = { - typeUrl: "/ics23.CommitmentProof", - encode(message: CommitmentProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).ldelim(); - } - if (message.batch !== undefined) { - BatchProof.encode(message.batch, writer.uint32(26).fork()).ldelim(); - } - if (message.compressed !== undefined) { - CompressedBatchProof.encode(message.compressed, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommitmentProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommitmentProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = CompressedBatchProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommitmentProof { - return { - exist: isSet(object.exist) ? ExistenceProof.fromJSON(object.exist) : undefined, - nonexist: isSet(object.nonexist) ? NonExistenceProof.fromJSON(object.nonexist) : undefined, - batch: isSet(object.batch) ? BatchProof.fromJSON(object.batch) : undefined, - compressed: isSet(object.compressed) ? CompressedBatchProof.fromJSON(object.compressed) : undefined - }; - }, - toJSON(message: CommitmentProof): unknown { - 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); - message.batch !== undefined && (obj.batch = message.batch ? BatchProof.toJSON(message.batch) : undefined); - message.compressed !== undefined && (obj.compressed = message.compressed ? CompressedBatchProof.toJSON(message.compressed) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): CommitmentProof { - const message = createBaseCommitmentProof(); - message.exist = object.exist !== undefined && object.exist !== null ? ExistenceProof.fromPartial(object.exist) : undefined; - message.nonexist = object.nonexist !== undefined && object.nonexist !== null ? NonExistenceProof.fromPartial(object.nonexist) : undefined; - message.batch = object.batch !== undefined && object.batch !== null ? BatchProof.fromPartial(object.batch) : undefined; - message.compressed = object.compressed !== undefined && object.compressed !== null ? CompressedBatchProof.fromPartial(object.compressed) : undefined; - return message; - }, - fromSDK(object: CommitmentProofSDKType): CommitmentProof { - return { - exist: object.exist ? ExistenceProof.fromSDK(object.exist) : undefined, - nonexist: object.nonexist ? NonExistenceProof.fromSDK(object.nonexist) : undefined, - batch: object.batch ? BatchProof.fromSDK(object.batch) : undefined, - compressed: object.compressed ? CompressedBatchProof.fromSDK(object.compressed) : undefined - }; - }, - toSDK(message: CommitmentProof): CommitmentProofSDKType { - const obj: any = {}; - message.exist !== undefined && (obj.exist = message.exist ? ExistenceProof.toSDK(message.exist) : undefined); - message.nonexist !== undefined && (obj.nonexist = message.nonexist ? NonExistenceProof.toSDK(message.nonexist) : undefined); - message.batch !== undefined && (obj.batch = message.batch ? BatchProof.toSDK(message.batch) : undefined); - message.compressed !== undefined && (obj.compressed = message.compressed ? CompressedBatchProof.toSDK(message.compressed) : undefined); - return obj; - }, - fromAmino(object: CommitmentProofAmino): CommitmentProof { - return { - exist: object?.exist ? ExistenceProof.fromAmino(object.exist) : undefined, - nonexist: object?.nonexist ? NonExistenceProof.fromAmino(object.nonexist) : undefined, - batch: object?.batch ? BatchProof.fromAmino(object.batch) : undefined, - compressed: object?.compressed ? CompressedBatchProof.fromAmino(object.compressed) : undefined - }; - }, - toAmino(message: CommitmentProof): CommitmentProofAmino { - const obj: any = {}; - obj.exist = message.exist ? ExistenceProof.toAmino(message.exist) : undefined; - obj.nonexist = message.nonexist ? NonExistenceProof.toAmino(message.nonexist) : undefined; - obj.batch = message.batch ? BatchProof.toAmino(message.batch) : undefined; - obj.compressed = message.compressed ? CompressedBatchProof.toAmino(message.compressed) : undefined; - return obj; - }, - fromAminoMsg(object: CommitmentProofAminoMsg): CommitmentProof { - return CommitmentProof.fromAmino(object.value); - }, - fromProtoMsg(message: CommitmentProofProtoMsg): CommitmentProof { - return CommitmentProof.decode(message.value); - }, - toProto(message: CommitmentProof): Uint8Array { - return CommitmentProof.encode(message).finish(); - }, - toProtoMsg(message: CommitmentProof): CommitmentProofProtoMsg { - return { - typeUrl: "/ics23.CommitmentProof", - value: CommitmentProof.encode(message).finish() - }; - } -}; -function createBaseLeafOp(): LeafOp { - return { - hash: 0, - prehashKey: 0, - prehashValue: 0, - length: 0, - prefix: new Uint8Array() - }; -} -export const LeafOp = { - typeUrl: "/ics23.LeafOp", - encode(message: LeafOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prehashKey !== 0) { - writer.uint32(16).int32(message.prehashKey); - } - if (message.prehashValue !== 0) { - writer.uint32(24).int32(message.prehashValue); - } - if (message.length !== 0) { - writer.uint32(32).int32(message.length); - } - if (message.prefix.length !== 0) { - writer.uint32(42).bytes(message.prefix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LeafOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLeafOp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = (reader.int32() as any); - break; - case 2: - message.prehashKey = (reader.int32() as any); - break; - case 3: - message.prehashValue = (reader.int32() as any); - break; - case 4: - message.length = (reader.int32() as any); - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LeafOp { - return { - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1, - prehashKey: isSet(object.prehashKey) ? hashOpFromJSON(object.prehashKey) : -1, - prehashValue: isSet(object.prehashValue) ? hashOpFromJSON(object.prehashValue) : -1, - length: isSet(object.length) ? lengthOpFromJSON(object.length) : -1, - prefix: isSet(object.prefix) ? bytesFromBase64(object.prefix) : new Uint8Array() - }; - }, - toJSON(message: LeafOp): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prehashKey !== undefined && (obj.prehashKey = hashOpToJSON(message.prehashKey)); - message.prehashValue !== undefined && (obj.prehashValue = hashOpToJSON(message.prehashValue)); - message.length !== undefined && (obj.length = lengthOpToJSON(message.length)); - message.prefix !== undefined && (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): LeafOp { - const message = createBaseLeafOp(); - message.hash = object.hash ?? 0; - message.prehashKey = object.prehashKey ?? 0; - message.prehashValue = object.prehashValue ?? 0; - message.length = object.length ?? 0; - message.prefix = object.prefix ?? new Uint8Array(); - return message; - }, - fromSDK(object: LeafOpSDKType): LeafOp { - return { - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1, - prehashKey: isSet(object.prehash_key) ? hashOpFromJSON(object.prehash_key) : -1, - prehashValue: isSet(object.prehash_value) ? hashOpFromJSON(object.prehash_value) : -1, - length: isSet(object.length) ? lengthOpFromJSON(object.length) : -1, - prefix: object?.prefix - }; - }, - toSDK(message: LeafOp): LeafOpSDKType { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prehashKey !== undefined && (obj.prehash_key = hashOpToJSON(message.prehashKey)); - message.prehashValue !== undefined && (obj.prehash_value = hashOpToJSON(message.prehashValue)); - message.length !== undefined && (obj.length = lengthOpToJSON(message.length)); - obj.prefix = message.prefix; - return obj; - }, - fromAmino(object: LeafOpAmino): LeafOp { - return { - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1, - prehashKey: isSet(object.prehash_key) ? hashOpFromJSON(object.prehash_key) : -1, - prehashValue: isSet(object.prehash_value) ? hashOpFromJSON(object.prehash_value) : -1, - length: isSet(object.length) ? lengthOpFromJSON(object.length) : -1, - prefix: object.prefix - }; - }, - toAmino(message: LeafOp): LeafOpAmino { - const obj: any = {}; - obj.hash = message.hash; - obj.prehash_key = message.prehashKey; - obj.prehash_value = message.prehashValue; - obj.length = message.length; - obj.prefix = message.prefix; - return obj; - }, - fromAminoMsg(object: LeafOpAminoMsg): LeafOp { - return LeafOp.fromAmino(object.value); - }, - fromProtoMsg(message: LeafOpProtoMsg): LeafOp { - return LeafOp.decode(message.value); - }, - toProto(message: LeafOp): Uint8Array { - return LeafOp.encode(message).finish(); - }, - toProtoMsg(message: LeafOp): LeafOpProtoMsg { - return { - typeUrl: "/ics23.LeafOp", - value: LeafOp.encode(message).finish() - }; - } -}; -function createBaseInnerOp(): InnerOp { - return { - hash: 0, - prefix: new Uint8Array(), - suffix: new Uint8Array() - }; -} -export const InnerOp = { - typeUrl: "/ics23.InnerOp", - encode(message: InnerOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash !== 0) { - writer.uint32(8).int32(message.hash); - } - if (message.prefix.length !== 0) { - writer.uint32(18).bytes(message.prefix); - } - if (message.suffix.length !== 0) { - writer.uint32(26).bytes(message.suffix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InnerOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInnerOp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = (reader.int32() as any); - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InnerOp { - return { - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1, - prefix: isSet(object.prefix) ? bytesFromBase64(object.prefix) : new Uint8Array(), - suffix: isSet(object.suffix) ? bytesFromBase64(object.suffix) : new Uint8Array() - }; - }, - toJSON(message: InnerOp): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - message.prefix !== undefined && (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array())); - message.suffix !== undefined && (obj.suffix = base64FromBytes(message.suffix !== undefined ? message.suffix : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): InnerOp { - const message = createBaseInnerOp(); - message.hash = object.hash ?? 0; - message.prefix = object.prefix ?? new Uint8Array(); - message.suffix = object.suffix ?? new Uint8Array(); - return message; - }, - fromSDK(object: InnerOpSDKType): InnerOp { - return { - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1, - prefix: object?.prefix, - suffix: object?.suffix - }; - }, - toSDK(message: InnerOp): InnerOpSDKType { - const obj: any = {}; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - obj.prefix = message.prefix; - obj.suffix = message.suffix; - return obj; - }, - fromAmino(object: InnerOpAmino): InnerOp { - return { - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1, - prefix: object.prefix, - suffix: object.suffix - }; - }, - toAmino(message: InnerOp): InnerOpAmino { - const obj: any = {}; - obj.hash = message.hash; - obj.prefix = message.prefix; - obj.suffix = message.suffix; - return obj; - }, - fromAminoMsg(object: InnerOpAminoMsg): InnerOp { - return InnerOp.fromAmino(object.value); - }, - fromProtoMsg(message: InnerOpProtoMsg): InnerOp { - return InnerOp.decode(message.value); - }, - toProto(message: InnerOp): Uint8Array { - return InnerOp.encode(message).finish(); - }, - toProtoMsg(message: InnerOp): InnerOpProtoMsg { - return { - typeUrl: "/ics23.InnerOp", - value: InnerOp.encode(message).finish() - }; - } -}; -function createBaseProofSpec(): ProofSpec { - return { - leafSpec: LeafOp.fromPartial({}), - innerSpec: InnerSpec.fromPartial({}), - maxDepth: 0, - minDepth: 0 - }; -} -export const ProofSpec = { - typeUrl: "/ics23.ProofSpec", - encode(message: ProofSpec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.leafSpec !== undefined) { - LeafOp.encode(message.leafSpec, writer.uint32(10).fork()).ldelim(); - } - if (message.innerSpec !== undefined) { - InnerSpec.encode(message.innerSpec, writer.uint32(18).fork()).ldelim(); - } - if (message.maxDepth !== 0) { - writer.uint32(24).int32(message.maxDepth); - } - if (message.minDepth !== 0) { - writer.uint32(32).int32(message.minDepth); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ProofSpec { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProofSpec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leafSpec = LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.innerSpec = InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.maxDepth = reader.int32(); - break; - case 4: - message.minDepth = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ProofSpec { - return { - leafSpec: isSet(object.leafSpec) ? LeafOp.fromJSON(object.leafSpec) : undefined, - innerSpec: isSet(object.innerSpec) ? InnerSpec.fromJSON(object.innerSpec) : undefined, - maxDepth: isSet(object.maxDepth) ? Number(object.maxDepth) : 0, - minDepth: isSet(object.minDepth) ? Number(object.minDepth) : 0 - }; - }, - toJSON(message: ProofSpec): unknown { - 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); - message.maxDepth !== undefined && (obj.maxDepth = Math.round(message.maxDepth)); - message.minDepth !== undefined && (obj.minDepth = Math.round(message.minDepth)); - return obj; - }, - fromPartial(object: DeepPartial): ProofSpec { - const message = createBaseProofSpec(); - message.leafSpec = object.leafSpec !== undefined && object.leafSpec !== null ? LeafOp.fromPartial(object.leafSpec) : undefined; - message.innerSpec = object.innerSpec !== undefined && object.innerSpec !== null ? InnerSpec.fromPartial(object.innerSpec) : undefined; - message.maxDepth = object.maxDepth ?? 0; - message.minDepth = object.minDepth ?? 0; - return message; - }, - fromSDK(object: ProofSpecSDKType): ProofSpec { - return { - leafSpec: object.leaf_spec ? LeafOp.fromSDK(object.leaf_spec) : undefined, - innerSpec: object.inner_spec ? InnerSpec.fromSDK(object.inner_spec) : undefined, - maxDepth: object?.max_depth, - minDepth: object?.min_depth - }; - }, - toSDK(message: ProofSpec): ProofSpecSDKType { - const obj: any = {}; - message.leafSpec !== undefined && (obj.leaf_spec = message.leafSpec ? LeafOp.toSDK(message.leafSpec) : undefined); - message.innerSpec !== undefined && (obj.inner_spec = message.innerSpec ? InnerSpec.toSDK(message.innerSpec) : undefined); - obj.max_depth = message.maxDepth; - obj.min_depth = message.minDepth; - return obj; - }, - fromAmino(object: ProofSpecAmino): ProofSpec { - return { - leafSpec: object?.leaf_spec ? LeafOp.fromAmino(object.leaf_spec) : undefined, - innerSpec: object?.inner_spec ? InnerSpec.fromAmino(object.inner_spec) : undefined, - maxDepth: object.max_depth, - minDepth: object.min_depth - }; - }, - toAmino(message: ProofSpec): ProofSpecAmino { - const obj: any = {}; - obj.leaf_spec = message.leafSpec ? LeafOp.toAmino(message.leafSpec) : undefined; - obj.inner_spec = message.innerSpec ? InnerSpec.toAmino(message.innerSpec) : undefined; - obj.max_depth = message.maxDepth; - obj.min_depth = message.minDepth; - return obj; - }, - fromAminoMsg(object: ProofSpecAminoMsg): ProofSpec { - return ProofSpec.fromAmino(object.value); - }, - fromProtoMsg(message: ProofSpecProtoMsg): ProofSpec { - return ProofSpec.decode(message.value); - }, - toProto(message: ProofSpec): Uint8Array { - return ProofSpec.encode(message).finish(); - }, - toProtoMsg(message: ProofSpec): ProofSpecProtoMsg { - return { - typeUrl: "/ics23.ProofSpec", - value: ProofSpec.encode(message).finish() - }; - } -}; -function createBaseInnerSpec(): InnerSpec { - return { - childOrder: [], - childSize: 0, - minPrefixLength: 0, - maxPrefixLength: 0, - emptyChild: new Uint8Array(), - hash: 0 - }; -} -export const InnerSpec = { - typeUrl: "/ics23.InnerSpec", - encode(message: InnerSpec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.childOrder) { - writer.int32(v); - } - writer.ldelim(); - if (message.childSize !== 0) { - writer.uint32(16).int32(message.childSize); - } - if (message.minPrefixLength !== 0) { - writer.uint32(24).int32(message.minPrefixLength); - } - if (message.maxPrefixLength !== 0) { - writer.uint32(32).int32(message.maxPrefixLength); - } - if (message.emptyChild.length !== 0) { - writer.uint32(42).bytes(message.emptyChild); - } - if (message.hash !== 0) { - writer.uint32(48).int32(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InnerSpec { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInnerSpec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.childOrder.push(reader.int32()); - } - } else { - message.childOrder.push(reader.int32()); - } - break; - case 2: - message.childSize = reader.int32(); - break; - case 3: - message.minPrefixLength = reader.int32(); - break; - case 4: - message.maxPrefixLength = reader.int32(); - break; - case 5: - message.emptyChild = reader.bytes(); - break; - case 6: - message.hash = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InnerSpec { - return { - childOrder: Array.isArray(object?.childOrder) ? object.childOrder.map((e: any) => Number(e)) : [], - childSize: isSet(object.childSize) ? Number(object.childSize) : 0, - minPrefixLength: isSet(object.minPrefixLength) ? Number(object.minPrefixLength) : 0, - maxPrefixLength: isSet(object.maxPrefixLength) ? Number(object.maxPrefixLength) : 0, - emptyChild: isSet(object.emptyChild) ? bytesFromBase64(object.emptyChild) : new Uint8Array(), - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1 - }; - }, - toJSON(message: InnerSpec): unknown { - const obj: any = {}; - if (message.childOrder) { - obj.childOrder = message.childOrder.map(e => Math.round(e)); - } else { - obj.childOrder = []; - } - message.childSize !== undefined && (obj.childSize = Math.round(message.childSize)); - message.minPrefixLength !== undefined && (obj.minPrefixLength = Math.round(message.minPrefixLength)); - message.maxPrefixLength !== undefined && (obj.maxPrefixLength = Math.round(message.maxPrefixLength)); - message.emptyChild !== undefined && (obj.emptyChild = base64FromBytes(message.emptyChild !== undefined ? message.emptyChild : new Uint8Array())); - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - return obj; - }, - fromPartial(object: DeepPartial): InnerSpec { - const message = createBaseInnerSpec(); - message.childOrder = object.childOrder?.map(e => e) || []; - message.childSize = object.childSize ?? 0; - message.minPrefixLength = object.minPrefixLength ?? 0; - message.maxPrefixLength = object.maxPrefixLength ?? 0; - message.emptyChild = object.emptyChild ?? new Uint8Array(); - message.hash = object.hash ?? 0; - return message; - }, - fromSDK(object: InnerSpecSDKType): InnerSpec { - return { - childOrder: Array.isArray(object?.child_order) ? object.child_order.map((e: any) => e) : [], - childSize: object?.child_size, - minPrefixLength: object?.min_prefix_length, - maxPrefixLength: object?.max_prefix_length, - emptyChild: object?.empty_child, - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1 - }; - }, - toSDK(message: InnerSpec): InnerSpecSDKType { - const obj: any = {}; - if (message.childOrder) { - obj.child_order = message.childOrder.map(e => e); - } else { - obj.child_order = []; - } - obj.child_size = message.childSize; - obj.min_prefix_length = message.minPrefixLength; - obj.max_prefix_length = message.maxPrefixLength; - obj.empty_child = message.emptyChild; - message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash)); - return obj; - }, - fromAmino(object: InnerSpecAmino): InnerSpec { - return { - childOrder: Array.isArray(object?.child_order) ? object.child_order.map((e: any) => e) : [], - childSize: object.child_size, - minPrefixLength: object.min_prefix_length, - maxPrefixLength: object.max_prefix_length, - emptyChild: object.empty_child, - hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : -1 - }; - }, - toAmino(message: InnerSpec): InnerSpecAmino { - const obj: any = {}; - if (message.childOrder) { - obj.child_order = message.childOrder.map(e => e); - } else { - obj.child_order = []; - } - obj.child_size = message.childSize; - obj.min_prefix_length = message.minPrefixLength; - obj.max_prefix_length = message.maxPrefixLength; - obj.empty_child = message.emptyChild; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: InnerSpecAminoMsg): InnerSpec { - return InnerSpec.fromAmino(object.value); - }, - fromProtoMsg(message: InnerSpecProtoMsg): InnerSpec { - return InnerSpec.decode(message.value); - }, - toProto(message: InnerSpec): Uint8Array { - return InnerSpec.encode(message).finish(); - }, - toProtoMsg(message: InnerSpec): InnerSpecProtoMsg { - return { - typeUrl: "/ics23.InnerSpec", - value: InnerSpec.encode(message).finish() - }; - } -}; -function createBaseBatchProof(): BatchProof { - return { - entries: [] - }; -} -export const BatchProof = { - typeUrl: "/ics23.BatchProof", - encode(message: BatchProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.entries) { - BatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BatchProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBatchProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BatchProof { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => BatchEntry.fromJSON(e)) : [] - }; - }, - toJSON(message: BatchProof): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? BatchEntry.toJSON(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromPartial(object: DeepPartial): BatchProof { - const message = createBaseBatchProof(); - message.entries = object.entries?.map(e => BatchEntry.fromPartial(e)) || []; - return message; - }, - fromSDK(object: BatchProofSDKType): BatchProof { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => BatchEntry.fromSDK(e)) : [] - }; - }, - toSDK(message: BatchProof): BatchProofSDKType { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? BatchEntry.toSDK(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAmino(object: BatchProofAmino): BatchProof { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => BatchEntry.fromAmino(e)) : [] - }; - }, - toAmino(message: BatchProof): BatchProofAmino { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? BatchEntry.toAmino(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAminoMsg(object: BatchProofAminoMsg): BatchProof { - return BatchProof.fromAmino(object.value); - }, - fromProtoMsg(message: BatchProofProtoMsg): BatchProof { - return BatchProof.decode(message.value); - }, - toProto(message: BatchProof): Uint8Array { - return BatchProof.encode(message).finish(); - }, - toProtoMsg(message: BatchProof): BatchProofProtoMsg { - return { - typeUrl: "/ics23.BatchProof", - value: BatchProof.encode(message).finish() - }; - } -}; -function createBaseBatchEntry(): BatchEntry { - return { - exist: undefined, - nonexist: undefined - }; -} -export const BatchEntry = { - typeUrl: "/ics23.BatchEntry", - encode(message: BatchEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.exist !== undefined) { - ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - NonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BatchEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBatchEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BatchEntry { - return { - exist: isSet(object.exist) ? ExistenceProof.fromJSON(object.exist) : undefined, - nonexist: isSet(object.nonexist) ? NonExistenceProof.fromJSON(object.nonexist) : undefined - }; - }, - toJSON(message: BatchEntry): unknown { - 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); - return obj; - }, - fromPartial(object: DeepPartial): BatchEntry { - const message = createBaseBatchEntry(); - message.exist = object.exist !== undefined && object.exist !== null ? ExistenceProof.fromPartial(object.exist) : undefined; - message.nonexist = object.nonexist !== undefined && object.nonexist !== null ? NonExistenceProof.fromPartial(object.nonexist) : undefined; - return message; - }, - fromSDK(object: BatchEntrySDKType): BatchEntry { - return { - exist: object.exist ? ExistenceProof.fromSDK(object.exist) : undefined, - nonexist: object.nonexist ? NonExistenceProof.fromSDK(object.nonexist) : undefined - }; - }, - toSDK(message: BatchEntry): BatchEntrySDKType { - const obj: any = {}; - message.exist !== undefined && (obj.exist = message.exist ? ExistenceProof.toSDK(message.exist) : undefined); - message.nonexist !== undefined && (obj.nonexist = message.nonexist ? NonExistenceProof.toSDK(message.nonexist) : undefined); - return obj; - }, - fromAmino(object: BatchEntryAmino): BatchEntry { - return { - exist: object?.exist ? ExistenceProof.fromAmino(object.exist) : undefined, - nonexist: object?.nonexist ? NonExistenceProof.fromAmino(object.nonexist) : undefined - }; - }, - toAmino(message: BatchEntry): BatchEntryAmino { - const obj: any = {}; - obj.exist = message.exist ? ExistenceProof.toAmino(message.exist) : undefined; - obj.nonexist = message.nonexist ? NonExistenceProof.toAmino(message.nonexist) : undefined; - return obj; - }, - fromAminoMsg(object: BatchEntryAminoMsg): BatchEntry { - return BatchEntry.fromAmino(object.value); - }, - fromProtoMsg(message: BatchEntryProtoMsg): BatchEntry { - return BatchEntry.decode(message.value); - }, - toProto(message: BatchEntry): Uint8Array { - return BatchEntry.encode(message).finish(); - }, - toProtoMsg(message: BatchEntry): BatchEntryProtoMsg { - return { - typeUrl: "/ics23.BatchEntry", - value: BatchEntry.encode(message).finish() - }; - } -}; -function createBaseCompressedBatchProof(): CompressedBatchProof { - return { - entries: [], - lookupInners: [] - }; -} -export const CompressedBatchProof = { - typeUrl: "/ics23.CompressedBatchProof", - encode(message: CompressedBatchProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.entries) { - CompressedBatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.lookupInners) { - InnerOp.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CompressedBatchProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCompressedBatchProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(CompressedBatchEntry.decode(reader, reader.uint32())); - break; - case 2: - message.lookupInners.push(InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CompressedBatchProof { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => CompressedBatchEntry.fromJSON(e)) : [], - lookupInners: Array.isArray(object?.lookupInners) ? object.lookupInners.map((e: any) => InnerOp.fromJSON(e)) : [] - }; - }, - toJSON(message: CompressedBatchProof): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? CompressedBatchEntry.toJSON(e) : undefined); - } else { - obj.entries = []; - } - if (message.lookupInners) { - obj.lookupInners = message.lookupInners.map(e => e ? InnerOp.toJSON(e) : undefined); - } else { - obj.lookupInners = []; - } - return obj; - }, - fromPartial(object: DeepPartial): CompressedBatchProof { - const message = createBaseCompressedBatchProof(); - message.entries = object.entries?.map(e => CompressedBatchEntry.fromPartial(e)) || []; - message.lookupInners = object.lookupInners?.map(e => InnerOp.fromPartial(e)) || []; - return message; - }, - fromSDK(object: CompressedBatchProofSDKType): CompressedBatchProof { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => CompressedBatchEntry.fromSDK(e)) : [], - lookupInners: Array.isArray(object?.lookup_inners) ? object.lookup_inners.map((e: any) => InnerOp.fromSDK(e)) : [] - }; - }, - toSDK(message: CompressedBatchProof): CompressedBatchProofSDKType { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? CompressedBatchEntry.toSDK(e) : undefined); - } else { - obj.entries = []; - } - if (message.lookupInners) { - obj.lookup_inners = message.lookupInners.map(e => e ? InnerOp.toSDK(e) : undefined); - } else { - obj.lookup_inners = []; - } - return obj; - }, - fromAmino(object: CompressedBatchProofAmino): CompressedBatchProof { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => CompressedBatchEntry.fromAmino(e)) : [], - lookupInners: Array.isArray(object?.lookup_inners) ? object.lookup_inners.map((e: any) => InnerOp.fromAmino(e)) : [] - }; - }, - toAmino(message: CompressedBatchProof): CompressedBatchProofAmino { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? CompressedBatchEntry.toAmino(e) : undefined); - } else { - obj.entries = []; - } - if (message.lookupInners) { - obj.lookup_inners = message.lookupInners.map(e => e ? InnerOp.toAmino(e) : undefined); - } else { - obj.lookup_inners = []; - } - return obj; - }, - fromAminoMsg(object: CompressedBatchProofAminoMsg): CompressedBatchProof { - return CompressedBatchProof.fromAmino(object.value); - }, - fromProtoMsg(message: CompressedBatchProofProtoMsg): CompressedBatchProof { - return CompressedBatchProof.decode(message.value); - }, - toProto(message: CompressedBatchProof): Uint8Array { - return CompressedBatchProof.encode(message).finish(); - }, - toProtoMsg(message: CompressedBatchProof): CompressedBatchProofProtoMsg { - return { - typeUrl: "/ics23.CompressedBatchProof", - value: CompressedBatchProof.encode(message).finish() - }; - } -}; -function createBaseCompressedBatchEntry(): CompressedBatchEntry { - return { - exist: undefined, - nonexist: undefined - }; -} -export const CompressedBatchEntry = { - typeUrl: "/ics23.CompressedBatchEntry", - encode(message: CompressedBatchEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.exist !== undefined) { - CompressedExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim(); - } - if (message.nonexist !== undefined) { - CompressedNonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CompressedBatchEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCompressedBatchEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = CompressedNonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CompressedBatchEntry { - return { - exist: isSet(object.exist) ? CompressedExistenceProof.fromJSON(object.exist) : undefined, - nonexist: isSet(object.nonexist) ? CompressedNonExistenceProof.fromJSON(object.nonexist) : undefined - }; - }, - toJSON(message: CompressedBatchEntry): unknown { - 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); - return obj; - }, - fromPartial(object: DeepPartial): CompressedBatchEntry { - const message = createBaseCompressedBatchEntry(); - message.exist = object.exist !== undefined && object.exist !== null ? CompressedExistenceProof.fromPartial(object.exist) : undefined; - message.nonexist = object.nonexist !== undefined && object.nonexist !== null ? CompressedNonExistenceProof.fromPartial(object.nonexist) : undefined; - return message; - }, - fromSDK(object: CompressedBatchEntrySDKType): CompressedBatchEntry { - return { - exist: object.exist ? CompressedExistenceProof.fromSDK(object.exist) : undefined, - nonexist: object.nonexist ? CompressedNonExistenceProof.fromSDK(object.nonexist) : undefined - }; - }, - toSDK(message: CompressedBatchEntry): CompressedBatchEntrySDKType { - const obj: any = {}; - message.exist !== undefined && (obj.exist = message.exist ? CompressedExistenceProof.toSDK(message.exist) : undefined); - message.nonexist !== undefined && (obj.nonexist = message.nonexist ? CompressedNonExistenceProof.toSDK(message.nonexist) : undefined); - return obj; - }, - fromAmino(object: CompressedBatchEntryAmino): CompressedBatchEntry { - return { - exist: object?.exist ? CompressedExistenceProof.fromAmino(object.exist) : undefined, - nonexist: object?.nonexist ? CompressedNonExistenceProof.fromAmino(object.nonexist) : undefined - }; - }, - toAmino(message: CompressedBatchEntry): CompressedBatchEntryAmino { - const obj: any = {}; - obj.exist = message.exist ? CompressedExistenceProof.toAmino(message.exist) : undefined; - obj.nonexist = message.nonexist ? CompressedNonExistenceProof.toAmino(message.nonexist) : undefined; - return obj; - }, - fromAminoMsg(object: CompressedBatchEntryAminoMsg): CompressedBatchEntry { - return CompressedBatchEntry.fromAmino(object.value); - }, - fromProtoMsg(message: CompressedBatchEntryProtoMsg): CompressedBatchEntry { - return CompressedBatchEntry.decode(message.value); - }, - toProto(message: CompressedBatchEntry): Uint8Array { - return CompressedBatchEntry.encode(message).finish(); - }, - toProtoMsg(message: CompressedBatchEntry): CompressedBatchEntryProtoMsg { - return { - typeUrl: "/ics23.CompressedBatchEntry", - value: CompressedBatchEntry.encode(message).finish() - }; - } -}; -function createBaseCompressedExistenceProof(): CompressedExistenceProof { - return { - key: new Uint8Array(), - value: new Uint8Array(), - leaf: LeafOp.fromPartial({}), - path: [] - }; -} -export const CompressedExistenceProof = { - typeUrl: "/ics23.CompressedExistenceProof", - encode(message: CompressedExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.leaf !== undefined) { - LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CompressedExistenceProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCompressedExistenceProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CompressedExistenceProof { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - leaf: isSet(object.leaf) ? LeafOp.fromJSON(object.leaf) : undefined, - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [] - }; - }, - toJSON(message: CompressedExistenceProof): unknown { - 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())); - message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map(e => Math.round(e)); - } else { - obj.path = []; - } - return obj; - }, - fromPartial(object: DeepPartial): CompressedExistenceProof { - const message = createBaseCompressedExistenceProof(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.leaf = object.leaf !== undefined && object.leaf !== null ? LeafOp.fromPartial(object.leaf) : undefined; - message.path = object.path?.map(e => e) || []; - return message; - }, - fromSDK(object: CompressedExistenceProofSDKType): CompressedExistenceProof { - return { - key: object?.key, - value: object?.value, - leaf: object.leaf ? LeafOp.fromSDK(object.leaf) : undefined, - path: Array.isArray(object?.path) ? object.path.map((e: any) => e) : [] - }; - }, - toSDK(message: CompressedExistenceProof): CompressedExistenceProofSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toSDK(message.leaf) : undefined); - if (message.path) { - obj.path = message.path.map(e => e); - } else { - obj.path = []; - } - return obj; - }, - fromAmino(object: CompressedExistenceProofAmino): CompressedExistenceProof { - return { - key: object.key, - value: object.value, - leaf: object?.leaf ? LeafOp.fromAmino(object.leaf) : undefined, - path: Array.isArray(object?.path) ? object.path.map((e: any) => e) : [] - }; - }, - toAmino(message: CompressedExistenceProof): CompressedExistenceProofAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.leaf = message.leaf ? LeafOp.toAmino(message.leaf) : undefined; - if (message.path) { - obj.path = message.path.map(e => e); - } else { - obj.path = []; - } - return obj; - }, - fromAminoMsg(object: CompressedExistenceProofAminoMsg): CompressedExistenceProof { - return CompressedExistenceProof.fromAmino(object.value); - }, - fromProtoMsg(message: CompressedExistenceProofProtoMsg): CompressedExistenceProof { - return CompressedExistenceProof.decode(message.value); - }, - toProto(message: CompressedExistenceProof): Uint8Array { - return CompressedExistenceProof.encode(message).finish(); - }, - toProtoMsg(message: CompressedExistenceProof): CompressedExistenceProofProtoMsg { - return { - typeUrl: "/ics23.CompressedExistenceProof", - value: CompressedExistenceProof.encode(message).finish() - }; - } -}; -function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { - return { - key: new Uint8Array(), - left: CompressedExistenceProof.fromPartial({}), - right: CompressedExistenceProof.fromPartial({}) - }; -} -export const CompressedNonExistenceProof = { - typeUrl: "/ics23.CompressedNonExistenceProof", - encode(message: CompressedNonExistenceProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.left !== undefined) { - CompressedExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim(); - } - if (message.right !== undefined) { - CompressedExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CompressedNonExistenceProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCompressedNonExistenceProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = CompressedExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CompressedNonExistenceProof { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - left: isSet(object.left) ? CompressedExistenceProof.fromJSON(object.left) : undefined, - right: isSet(object.right) ? CompressedExistenceProof.fromJSON(object.right) : undefined - }; - }, - toJSON(message: CompressedNonExistenceProof): unknown { - 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); - message.right !== undefined && (obj.right = message.right ? CompressedExistenceProof.toJSON(message.right) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): CompressedNonExistenceProof { - const message = createBaseCompressedNonExistenceProof(); - message.key = object.key ?? new Uint8Array(); - message.left = object.left !== undefined && object.left !== null ? CompressedExistenceProof.fromPartial(object.left) : undefined; - message.right = object.right !== undefined && object.right !== null ? CompressedExistenceProof.fromPartial(object.right) : undefined; - return message; - }, - fromSDK(object: CompressedNonExistenceProofSDKType): CompressedNonExistenceProof { - return { - key: object?.key, - left: object.left ? CompressedExistenceProof.fromSDK(object.left) : undefined, - right: object.right ? CompressedExistenceProof.fromSDK(object.right) : undefined - }; - }, - toSDK(message: CompressedNonExistenceProof): CompressedNonExistenceProofSDKType { - const obj: any = {}; - obj.key = message.key; - message.left !== undefined && (obj.left = message.left ? CompressedExistenceProof.toSDK(message.left) : undefined); - message.right !== undefined && (obj.right = message.right ? CompressedExistenceProof.toSDK(message.right) : undefined); - return obj; - }, - fromAmino(object: CompressedNonExistenceProofAmino): CompressedNonExistenceProof { - return { - key: object.key, - left: object?.left ? CompressedExistenceProof.fromAmino(object.left) : undefined, - right: object?.right ? CompressedExistenceProof.fromAmino(object.right) : undefined - }; - }, - toAmino(message: CompressedNonExistenceProof): CompressedNonExistenceProofAmino { - const obj: any = {}; - obj.key = message.key; - obj.left = message.left ? CompressedExistenceProof.toAmino(message.left) : undefined; - obj.right = message.right ? CompressedExistenceProof.toAmino(message.right) : undefined; - return obj; - }, - fromAminoMsg(object: CompressedNonExistenceProofAminoMsg): CompressedNonExistenceProof { - return CompressedNonExistenceProof.fromAmino(object.value); - }, - fromProtoMsg(message: CompressedNonExistenceProofProtoMsg): CompressedNonExistenceProof { - return CompressedNonExistenceProof.decode(message.value); - }, - toProto(message: CompressedNonExistenceProof): Uint8Array { - return CompressedNonExistenceProof.encode(message).finish(); - }, - toProtoMsg(message: CompressedNonExistenceProof): CompressedNonExistenceProofProtoMsg { - return { - typeUrl: "/ics23.CompressedNonExistenceProof", - value: CompressedNonExistenceProof.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/config.ts b/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/config.ts deleted file mode 100644 index eda0a15c..00000000 --- a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/config.ts +++ /dev/null @@ -1,306 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** - * Config represents the configuration for a Cosmos SDK ABCI app. - * It is intended that all state machine logic including the version of - * baseapp and tx handlers (and possibly even Tendermint) that an app needs - * can be described in a config object. For compatibility, the framework should - * allow a mixture of declarative and imperative app wiring, however, apps - * that strive for the maximum ease of maintainability should be able to describe - * their state machine with a config object alone. - */ -export interface Config { - /** modules are the module configurations for the app. */ - modules: ModuleConfig[]; -} -export interface ConfigProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.Config"; - value: Uint8Array; -} -/** - * Config represents the configuration for a Cosmos SDK ABCI app. - * It is intended that all state machine logic including the version of - * baseapp and tx handlers (and possibly even Tendermint) that an app needs - * can be described in a config object. For compatibility, the framework should - * allow a mixture of declarative and imperative app wiring, however, apps - * that strive for the maximum ease of maintainability should be able to describe - * their state machine with a config object alone. - */ -export interface ConfigAmino { - /** modules are the module configurations for the app. */ - modules: ModuleConfigAmino[]; -} -export interface ConfigAminoMsg { - type: "cosmos-sdk/Config"; - value: ConfigAmino; -} -/** - * Config represents the configuration for a Cosmos SDK ABCI app. - * It is intended that all state machine logic including the version of - * baseapp and tx handlers (and possibly even Tendermint) that an app needs - * can be described in a config object. For compatibility, the framework should - * allow a mixture of declarative and imperative app wiring, however, apps - * that strive for the maximum ease of maintainability should be able to describe - * their state machine with a config object alone. - */ -export interface ConfigSDKType { - modules: ModuleConfigSDKType[]; -} -/** ModuleConfig is a module configuration for an app. */ -export interface ModuleConfig { - /** - * name is the unique name of the module within the app. It should be a name - * that persists between different versions of a module so that modules - * can be smoothly upgraded to new versions. - * - * For example, for the module cosmos.bank.module.v1.Module, we may chose - * to simply name the module "bank" in the app. When we upgrade to - * cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same - * and the framework knows that the v2 module should receive all the same state - * that the v1 module had. Note: modules should provide info on which versions - * they can migrate from in the ModuleDescriptor.can_migration_from field. - */ - name: string; - /** - * config is the config object for the module. Module config messages should - * define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - */ - config: Any | undefined; -} -export interface ModuleConfigProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.ModuleConfig"; - value: Uint8Array; -} -/** ModuleConfig is a module configuration for an app. */ -export interface ModuleConfigAmino { - /** - * name is the unique name of the module within the app. It should be a name - * that persists between different versions of a module so that modules - * can be smoothly upgraded to new versions. - * - * For example, for the module cosmos.bank.module.v1.Module, we may chose - * to simply name the module "bank" in the app. When we upgrade to - * cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same - * and the framework knows that the v2 module should receive all the same state - * that the v1 module had. Note: modules should provide info on which versions - * they can migrate from in the ModuleDescriptor.can_migration_from field. - */ - name: string; - /** - * config is the config object for the module. Module config messages should - * define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - */ - config?: AnyAmino | undefined; -} -export interface ModuleConfigAminoMsg { - type: "cosmos-sdk/ModuleConfig"; - value: ModuleConfigAmino; -} -/** ModuleConfig is a module configuration for an app. */ -export interface ModuleConfigSDKType { - name: string; - config: AnySDKType | undefined; -} -function createBaseConfig(): Config { - return { - modules: [] - }; -} -export const Config = { - typeUrl: "/cosmos.app.v1alpha1.Config", - aminoType: "cosmos-sdk/Config", - encode(message: Config, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.modules) { - ModuleConfig.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Config { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConfig(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.modules.push(ModuleConfig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Config { - return { - modules: Array.isArray(object?.modules) ? object.modules.map((e: any) => ModuleConfig.fromJSON(e)) : [] - }; - }, - toJSON(message: Config): unknown { - const obj: any = {}; - if (message.modules) { - obj.modules = message.modules.map(e => e ? ModuleConfig.toJSON(e) : undefined); - } else { - obj.modules = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Config { - const message = createBaseConfig(); - message.modules = object.modules?.map(e => ModuleConfig.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ConfigSDKType): Config { - return { - modules: Array.isArray(object?.modules) ? object.modules.map((e: any) => ModuleConfig.fromSDK(e)) : [] - }; - }, - toSDK(message: Config): ConfigSDKType { - const obj: any = {}; - if (message.modules) { - obj.modules = message.modules.map(e => e ? ModuleConfig.toSDK(e) : undefined); - } else { - obj.modules = []; - } - return obj; - }, - fromAmino(object: ConfigAmino): Config { - return { - modules: Array.isArray(object?.modules) ? object.modules.map((e: any) => ModuleConfig.fromAmino(e)) : [] - }; - }, - toAmino(message: Config): ConfigAmino { - const obj: any = {}; - if (message.modules) { - obj.modules = message.modules.map(e => e ? ModuleConfig.toAmino(e) : undefined); - } else { - obj.modules = []; - } - return obj; - }, - fromAminoMsg(object: ConfigAminoMsg): Config { - return Config.fromAmino(object.value); - }, - toAminoMsg(message: Config): ConfigAminoMsg { - return { - type: "cosmos-sdk/Config", - value: Config.toAmino(message) - }; - }, - fromProtoMsg(message: ConfigProtoMsg): Config { - return Config.decode(message.value); - }, - toProto(message: Config): Uint8Array { - return Config.encode(message).finish(); - }, - toProtoMsg(message: Config): ConfigProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.Config", - value: Config.encode(message).finish() - }; - } -}; -function createBaseModuleConfig(): ModuleConfig { - return { - name: "", - config: Any.fromPartial({}) - }; -} -export const ModuleConfig = { - typeUrl: "/cosmos.app.v1alpha1.ModuleConfig", - aminoType: "cosmos-sdk/ModuleConfig", - encode(message: ModuleConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.config !== undefined) { - Any.encode(message.config, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleConfig { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleConfig(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.config = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleConfig { - return { - name: isSet(object.name) ? String(object.name) : "", - config: isSet(object.config) ? Any.fromJSON(object.config) : undefined - }; - }, - toJSON(message: ModuleConfig): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.config !== undefined && (obj.config = message.config ? Any.toJSON(message.config) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ModuleConfig { - const message = createBaseModuleConfig(); - message.name = object.name ?? ""; - message.config = object.config !== undefined && object.config !== null ? Any.fromPartial(object.config) : undefined; - return message; - }, - fromSDK(object: ModuleConfigSDKType): ModuleConfig { - return { - name: object?.name, - config: object.config ? Any.fromSDK(object.config) : undefined - }; - }, - toSDK(message: ModuleConfig): ModuleConfigSDKType { - const obj: any = {}; - obj.name = message.name; - message.config !== undefined && (obj.config = message.config ? Any.toSDK(message.config) : undefined); - return obj; - }, - fromAmino(object: ModuleConfigAmino): ModuleConfig { - return { - name: object.name, - config: object?.config ? Any.fromAmino(object.config) : undefined - }; - }, - toAmino(message: ModuleConfig): ModuleConfigAmino { - const obj: any = {}; - obj.name = message.name; - obj.config = message.config ? Any.toAmino(message.config) : undefined; - return obj; - }, - fromAminoMsg(object: ModuleConfigAminoMsg): ModuleConfig { - return ModuleConfig.fromAmino(object.value); - }, - toAminoMsg(message: ModuleConfig): ModuleConfigAminoMsg { - return { - type: "cosmos-sdk/ModuleConfig", - value: ModuleConfig.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleConfigProtoMsg): ModuleConfig { - return ModuleConfig.decode(message.value); - }, - toProto(message: ModuleConfig): Uint8Array { - return ModuleConfig.encode(message).finish(); - }, - toProtoMsg(message: ModuleConfig): ModuleConfigProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.ModuleConfig", - value: ModuleConfig.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/module.ts b/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/module.ts deleted file mode 100644 index 38394f94..00000000 --- a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/module.ts +++ /dev/null @@ -1,538 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** ModuleDescriptor describes an app module. */ -export interface ModuleDescriptor { - /** - * go_import names the package that should be imported by an app to load the - * module in the runtime module registry. Either go_import must be defined here - * or the go_package option must be defined at the file level to indicate - * to users where to location the module implementation. go_import takes - * precedence over go_package when both are defined. - */ - goImport: string; - /** - * use_package refers to a protobuf package that this module - * uses and exposes to the world. In an app, only one module should "use" - * or own a single protobuf package. It is assumed that the module uses - * all of the .proto files in a single package. - */ - usePackage: PackageReference[]; - /** - * can_migrate_from defines which module versions this module can migrate - * state from. The framework will check that one module version is able to - * migrate from a previous module version before attempting to update its - * config. It is assumed that modules can transitively migrate from earlier - * versions. For instance if v3 declares it can migrate from v2, and v2 - * declares it can migrate from v1, the framework knows how to migrate - * from v1 to v3, assuming all 3 module versions are registered at runtime. - */ - canMigrateFrom: MigrateFromInfo[]; -} -export interface ModuleDescriptorProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor"; - value: Uint8Array; -} -/** ModuleDescriptor describes an app module. */ -export interface ModuleDescriptorAmino { - /** - * go_import names the package that should be imported by an app to load the - * module in the runtime module registry. Either go_import must be defined here - * or the go_package option must be defined at the file level to indicate - * to users where to location the module implementation. go_import takes - * precedence over go_package when both are defined. - */ - go_import: string; - /** - * use_package refers to a protobuf package that this module - * uses and exposes to the world. In an app, only one module should "use" - * or own a single protobuf package. It is assumed that the module uses - * all of the .proto files in a single package. - */ - use_package: PackageReferenceAmino[]; - /** - * can_migrate_from defines which module versions this module can migrate - * state from. The framework will check that one module version is able to - * migrate from a previous module version before attempting to update its - * config. It is assumed that modules can transitively migrate from earlier - * versions. For instance if v3 declares it can migrate from v2, and v2 - * declares it can migrate from v1, the framework knows how to migrate - * from v1 to v3, assuming all 3 module versions are registered at runtime. - */ - can_migrate_from: MigrateFromInfoAmino[]; -} -export interface ModuleDescriptorAminoMsg { - type: "cosmos-sdk/ModuleDescriptor"; - value: ModuleDescriptorAmino; -} -/** ModuleDescriptor describes an app module. */ -export interface ModuleDescriptorSDKType { - go_import: string; - use_package: PackageReferenceSDKType[]; - can_migrate_from: MigrateFromInfoSDKType[]; -} -/** PackageReference is a reference to a protobuf package used by a module. */ -export interface PackageReference { - /** name is the fully-qualified name of the package. */ - name: string; - /** - * revision is the optional revision of the package that is being used. - * Protobuf packages used in Cosmos should generally have a major version - * as the last part of the package name, ex. foo.bar.baz.v1. - * The revision of a package can be thought of as the minor version of a - * package which has additional backwards compatible definitions that weren't - * present in a previous version. - * - * A package should indicate its revision with a source code comment - * above the package declaration in one of its fields containing the - * test "Revision N" where N is an integer revision. All packages start - * at revision 0 the first time they are released in a module. - * - * When a new version of a module is released and items are added to existing - * .proto files, these definitions should contain comments of the form - * "Since Revision N" where N is an integer revision. - * - * When the module runtime starts up, it will check the pinned proto - * image and panic if there are runtime protobuf definitions that are not - * in the pinned descriptor which do not have - * a "Since Revision N" comment or have a "Since Revision N" comment where - * N is <= to the revision specified here. This indicates that the protobuf - * files have been updated, but the pinned file descriptor hasn't. - * - * If there are items in the pinned file descriptor with a revision - * greater than the value indicated here, this will also cause a panic - * as it may mean that the pinned descriptor for a legacy module has been - * improperly updated or that there is some other versioning discrepancy. - * Runtime protobuf definitions will also be checked for compatibility - * with pinned file descriptors to make sure there are no incompatible changes. - * - * This behavior ensures that: - * * pinned proto images are up-to-date - * * protobuf files are carefully annotated with revision comments which - * are important good client UX - * * protobuf files are changed in backwards and forwards compatible ways - */ - revision: number; -} -export interface PackageReferenceProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.PackageReference"; - value: Uint8Array; -} -/** PackageReference is a reference to a protobuf package used by a module. */ -export interface PackageReferenceAmino { - /** name is the fully-qualified name of the package. */ - name: string; - /** - * revision is the optional revision of the package that is being used. - * Protobuf packages used in Cosmos should generally have a major version - * as the last part of the package name, ex. foo.bar.baz.v1. - * The revision of a package can be thought of as the minor version of a - * package which has additional backwards compatible definitions that weren't - * present in a previous version. - * - * A package should indicate its revision with a source code comment - * above the package declaration in one of its fields containing the - * test "Revision N" where N is an integer revision. All packages start - * at revision 0 the first time they are released in a module. - * - * When a new version of a module is released and items are added to existing - * .proto files, these definitions should contain comments of the form - * "Since Revision N" where N is an integer revision. - * - * When the module runtime starts up, it will check the pinned proto - * image and panic if there are runtime protobuf definitions that are not - * in the pinned descriptor which do not have - * a "Since Revision N" comment or have a "Since Revision N" comment where - * N is <= to the revision specified here. This indicates that the protobuf - * files have been updated, but the pinned file descriptor hasn't. - * - * If there are items in the pinned file descriptor with a revision - * greater than the value indicated here, this will also cause a panic - * as it may mean that the pinned descriptor for a legacy module has been - * improperly updated or that there is some other versioning discrepancy. - * Runtime protobuf definitions will also be checked for compatibility - * with pinned file descriptors to make sure there are no incompatible changes. - * - * This behavior ensures that: - * * pinned proto images are up-to-date - * * protobuf files are carefully annotated with revision comments which - * are important good client UX - * * protobuf files are changed in backwards and forwards compatible ways - */ - revision: number; -} -export interface PackageReferenceAminoMsg { - type: "cosmos-sdk/PackageReference"; - value: PackageReferenceAmino; -} -/** PackageReference is a reference to a protobuf package used by a module. */ -export interface PackageReferenceSDKType { - name: string; - revision: number; -} -/** - * MigrateFromInfo is information on a module version that a newer module - * can migrate from. - */ -export interface MigrateFromInfo { - /** - * module is the fully-qualified protobuf name of the module config object - * for the previous module version, ex: "cosmos.group.module.v1.Module". - */ - module: string; -} -export interface MigrateFromInfoProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo"; - value: Uint8Array; -} -/** - * MigrateFromInfo is information on a module version that a newer module - * can migrate from. - */ -export interface MigrateFromInfoAmino { - /** - * module is the fully-qualified protobuf name of the module config object - * for the previous module version, ex: "cosmos.group.module.v1.Module". - */ - module: string; -} -export interface MigrateFromInfoAminoMsg { - type: "cosmos-sdk/MigrateFromInfo"; - value: MigrateFromInfoAmino; -} -/** - * MigrateFromInfo is information on a module version that a newer module - * can migrate from. - */ -export interface MigrateFromInfoSDKType { - module: string; -} -function createBaseModuleDescriptor(): ModuleDescriptor { - return { - goImport: "", - usePackage: [], - canMigrateFrom: [] - }; -} -export const ModuleDescriptor = { - typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor", - aminoType: "cosmos-sdk/ModuleDescriptor", - encode(message: ModuleDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.goImport !== "") { - writer.uint32(10).string(message.goImport); - } - for (const v of message.usePackage) { - PackageReference.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.canMigrateFrom) { - MigrateFromInfo.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.goImport = reader.string(); - break; - case 2: - message.usePackage.push(PackageReference.decode(reader, reader.uint32())); - break; - case 3: - message.canMigrateFrom.push(MigrateFromInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleDescriptor { - return { - goImport: isSet(object.goImport) ? String(object.goImport) : "", - usePackage: Array.isArray(object?.usePackage) ? object.usePackage.map((e: any) => PackageReference.fromJSON(e)) : [], - canMigrateFrom: Array.isArray(object?.canMigrateFrom) ? object.canMigrateFrom.map((e: any) => MigrateFromInfo.fromJSON(e)) : [] - }; - }, - toJSON(message: ModuleDescriptor): unknown { - const obj: any = {}; - message.goImport !== undefined && (obj.goImport = message.goImport); - if (message.usePackage) { - obj.usePackage = message.usePackage.map(e => e ? PackageReference.toJSON(e) : undefined); - } else { - obj.usePackage = []; - } - if (message.canMigrateFrom) { - obj.canMigrateFrom = message.canMigrateFrom.map(e => e ? MigrateFromInfo.toJSON(e) : undefined); - } else { - obj.canMigrateFrom = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ModuleDescriptor { - const message = createBaseModuleDescriptor(); - message.goImport = object.goImport ?? ""; - message.usePackage = object.usePackage?.map(e => PackageReference.fromPartial(e)) || []; - message.canMigrateFrom = object.canMigrateFrom?.map(e => MigrateFromInfo.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ModuleDescriptorSDKType): ModuleDescriptor { - return { - goImport: object?.go_import, - usePackage: Array.isArray(object?.use_package) ? object.use_package.map((e: any) => PackageReference.fromSDK(e)) : [], - canMigrateFrom: Array.isArray(object?.can_migrate_from) ? object.can_migrate_from.map((e: any) => MigrateFromInfo.fromSDK(e)) : [] - }; - }, - toSDK(message: ModuleDescriptor): ModuleDescriptorSDKType { - const obj: any = {}; - obj.go_import = message.goImport; - if (message.usePackage) { - obj.use_package = message.usePackage.map(e => e ? PackageReference.toSDK(e) : undefined); - } else { - obj.use_package = []; - } - if (message.canMigrateFrom) { - obj.can_migrate_from = message.canMigrateFrom.map(e => e ? MigrateFromInfo.toSDK(e) : undefined); - } else { - obj.can_migrate_from = []; - } - return obj; - }, - fromAmino(object: ModuleDescriptorAmino): ModuleDescriptor { - return { - goImport: object.go_import, - usePackage: Array.isArray(object?.use_package) ? object.use_package.map((e: any) => PackageReference.fromAmino(e)) : [], - canMigrateFrom: Array.isArray(object?.can_migrate_from) ? object.can_migrate_from.map((e: any) => MigrateFromInfo.fromAmino(e)) : [] - }; - }, - toAmino(message: ModuleDescriptor): ModuleDescriptorAmino { - const obj: any = {}; - obj.go_import = message.goImport; - if (message.usePackage) { - obj.use_package = message.usePackage.map(e => e ? PackageReference.toAmino(e) : undefined); - } else { - obj.use_package = []; - } - if (message.canMigrateFrom) { - obj.can_migrate_from = message.canMigrateFrom.map(e => e ? MigrateFromInfo.toAmino(e) : undefined); - } else { - obj.can_migrate_from = []; - } - return obj; - }, - fromAminoMsg(object: ModuleDescriptorAminoMsg): ModuleDescriptor { - return ModuleDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: ModuleDescriptor): ModuleDescriptorAminoMsg { - return { - type: "cosmos-sdk/ModuleDescriptor", - value: ModuleDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleDescriptorProtoMsg): ModuleDescriptor { - return ModuleDescriptor.decode(message.value); - }, - toProto(message: ModuleDescriptor): Uint8Array { - return ModuleDescriptor.encode(message).finish(); - }, - toProtoMsg(message: ModuleDescriptor): ModuleDescriptorProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.ModuleDescriptor", - value: ModuleDescriptor.encode(message).finish() - }; - } -}; -function createBasePackageReference(): PackageReference { - return { - name: "", - revision: 0 - }; -} -export const PackageReference = { - typeUrl: "/cosmos.app.v1alpha1.PackageReference", - aminoType: "cosmos-sdk/PackageReference", - encode(message: PackageReference, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.revision !== 0) { - writer.uint32(16).uint32(message.revision); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PackageReference { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageReference(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.revision = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PackageReference { - return { - name: isSet(object.name) ? String(object.name) : "", - revision: isSet(object.revision) ? Number(object.revision) : 0 - }; - }, - toJSON(message: PackageReference): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.revision !== undefined && (obj.revision = Math.round(message.revision)); - return obj; - }, - fromPartial(object: DeepPartial): PackageReference { - const message = createBasePackageReference(); - message.name = object.name ?? ""; - message.revision = object.revision ?? 0; - return message; - }, - fromSDK(object: PackageReferenceSDKType): PackageReference { - return { - name: object?.name, - revision: object?.revision - }; - }, - toSDK(message: PackageReference): PackageReferenceSDKType { - const obj: any = {}; - obj.name = message.name; - obj.revision = message.revision; - return obj; - }, - fromAmino(object: PackageReferenceAmino): PackageReference { - return { - name: object.name, - revision: object.revision - }; - }, - toAmino(message: PackageReference): PackageReferenceAmino { - const obj: any = {}; - obj.name = message.name; - obj.revision = message.revision; - return obj; - }, - fromAminoMsg(object: PackageReferenceAminoMsg): PackageReference { - return PackageReference.fromAmino(object.value); - }, - toAminoMsg(message: PackageReference): PackageReferenceAminoMsg { - return { - type: "cosmos-sdk/PackageReference", - value: PackageReference.toAmino(message) - }; - }, - fromProtoMsg(message: PackageReferenceProtoMsg): PackageReference { - return PackageReference.decode(message.value); - }, - toProto(message: PackageReference): Uint8Array { - return PackageReference.encode(message).finish(); - }, - toProtoMsg(message: PackageReference): PackageReferenceProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.PackageReference", - value: PackageReference.encode(message).finish() - }; - } -}; -function createBaseMigrateFromInfo(): MigrateFromInfo { - return { - module: "" - }; -} -export const MigrateFromInfo = { - typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo", - aminoType: "cosmos-sdk/MigrateFromInfo", - encode(message: MigrateFromInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.module !== "") { - writer.uint32(10).string(message.module); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MigrateFromInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMigrateFromInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.module = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MigrateFromInfo { - return { - module: isSet(object.module) ? String(object.module) : "" - }; - }, - toJSON(message: MigrateFromInfo): unknown { - const obj: any = {}; - message.module !== undefined && (obj.module = message.module); - return obj; - }, - fromPartial(object: DeepPartial): MigrateFromInfo { - const message = createBaseMigrateFromInfo(); - message.module = object.module ?? ""; - return message; - }, - fromSDK(object: MigrateFromInfoSDKType): MigrateFromInfo { - return { - module: object?.module - }; - }, - toSDK(message: MigrateFromInfo): MigrateFromInfoSDKType { - const obj: any = {}; - obj.module = message.module; - return obj; - }, - fromAmino(object: MigrateFromInfoAmino): MigrateFromInfo { - return { - module: object.module - }; - }, - toAmino(message: MigrateFromInfo): MigrateFromInfoAmino { - const obj: any = {}; - obj.module = message.module; - return obj; - }, - fromAminoMsg(object: MigrateFromInfoAminoMsg): MigrateFromInfo { - return MigrateFromInfo.fromAmino(object.value); - }, - toAminoMsg(message: MigrateFromInfo): MigrateFromInfoAminoMsg { - return { - type: "cosmos-sdk/MigrateFromInfo", - value: MigrateFromInfo.toAmino(message) - }; - }, - fromProtoMsg(message: MigrateFromInfoProtoMsg): MigrateFromInfo { - return MigrateFromInfo.decode(message.value); - }, - toProto(message: MigrateFromInfo): Uint8Array { - return MigrateFromInfo.encode(message).finish(); - }, - toProtoMsg(message: MigrateFromInfo): MigrateFromInfoProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.MigrateFromInfo", - value: MigrateFromInfo.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/query.rpc.Query.ts deleted file mode 100644 index 824a36a2..00000000 --- a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/query.rpc.Query.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryConfigRequest, QueryConfigResponse } from "./query"; -/** Query is the app module query service. */ -export interface Query { - /** Config returns the current app config. */ - config(request?: QueryConfigRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.config = this.config.bind(this); - } - config(request: QueryConfigRequest = {}): Promise { - const data = QueryConfigRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.app.v1alpha1.Query", "Config", data); - return promise.then(data => QueryConfigResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - config(request?: QueryConfigRequest): Promise { - return queryService.config(request); - } - }; -}; -export interface UseConfigQuery extends ReactQueryParams { - request?: QueryConfigRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useConfig = ({ - request, - options - }: UseConfigQuery) => { - return useQuery(["configQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.config(request); - }, options); - }; - return { - /** Config returns the current app config. */useConfig - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryConfigStore { - store = new QueryStore(queryService?.config); - config(request: QueryConfigRequest) { - return this.store.getData(request); - } - } - return { - /** Config returns the current app config. */QueryConfigStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/query.ts b/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/query.ts deleted file mode 100644 index c0d25a19..00000000 --- a/examples/interchainjs/src/codegen/cosmos/app/v1alpha1/query.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { Config, ConfigAmino, ConfigSDKType } from "./config"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** QueryConfigRequest is the Query/Config request type. */ -export interface QueryConfigRequest {} -export interface QueryConfigRequestProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest"; - value: Uint8Array; -} -/** QueryConfigRequest is the Query/Config request type. */ -export interface QueryConfigRequestAmino {} -export interface QueryConfigRequestAminoMsg { - type: "cosmos-sdk/QueryConfigRequest"; - value: QueryConfigRequestAmino; -} -/** QueryConfigRequest is the Query/Config request type. */ -export interface QueryConfigRequestSDKType {} -/** QueryConfigRequest is the Query/Config response type. */ -export interface QueryConfigResponse { - /** config is the current app config. */ - config: Config | undefined; -} -export interface QueryConfigResponseProtoMsg { - typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse"; - value: Uint8Array; -} -/** QueryConfigRequest is the Query/Config response type. */ -export interface QueryConfigResponseAmino { - /** config is the current app config. */ - config?: ConfigAmino | undefined; -} -export interface QueryConfigResponseAminoMsg { - type: "cosmos-sdk/QueryConfigResponse"; - value: QueryConfigResponseAmino; -} -/** QueryConfigRequest is the Query/Config response type. */ -export interface QueryConfigResponseSDKType { - config: ConfigSDKType | undefined; -} -function createBaseQueryConfigRequest(): QueryConfigRequest { - return {}; -} -export const QueryConfigRequest = { - typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest", - aminoType: "cosmos-sdk/QueryConfigRequest", - encode(_: QueryConfigRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConfigRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConfigRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryConfigRequest { - return {}; - }, - toJSON(_: QueryConfigRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryConfigRequest { - const message = createBaseQueryConfigRequest(); - return message; - }, - fromSDK(_: QueryConfigRequestSDKType): QueryConfigRequest { - return {}; - }, - toSDK(_: QueryConfigRequest): QueryConfigRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryConfigRequestAmino): QueryConfigRequest { - return {}; - }, - toAmino(_: QueryConfigRequest): QueryConfigRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryConfigRequestAminoMsg): QueryConfigRequest { - return QueryConfigRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConfigRequest): QueryConfigRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConfigRequest", - value: QueryConfigRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConfigRequestProtoMsg): QueryConfigRequest { - return QueryConfigRequest.decode(message.value); - }, - toProto(message: QueryConfigRequest): Uint8Array { - return QueryConfigRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConfigRequest): QueryConfigRequestProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest", - value: QueryConfigRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConfigResponse(): QueryConfigResponse { - return { - config: Config.fromPartial({}) - }; -} -export const QueryConfigResponse = { - typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse", - aminoType: "cosmos-sdk/QueryConfigResponse", - encode(message: QueryConfigResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.config !== undefined) { - Config.encode(message.config, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConfigResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConfigResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.config = Config.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConfigResponse { - return { - config: isSet(object.config) ? Config.fromJSON(object.config) : undefined - }; - }, - toJSON(message: QueryConfigResponse): unknown { - const obj: any = {}; - message.config !== undefined && (obj.config = message.config ? Config.toJSON(message.config) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConfigResponse { - const message = createBaseQueryConfigResponse(); - message.config = object.config !== undefined && object.config !== null ? Config.fromPartial(object.config) : undefined; - return message; - }, - fromSDK(object: QueryConfigResponseSDKType): QueryConfigResponse { - return { - config: object.config ? Config.fromSDK(object.config) : undefined - }; - }, - toSDK(message: QueryConfigResponse): QueryConfigResponseSDKType { - const obj: any = {}; - message.config !== undefined && (obj.config = message.config ? Config.toSDK(message.config) : undefined); - return obj; - }, - fromAmino(object: QueryConfigResponseAmino): QueryConfigResponse { - return { - config: object?.config ? Config.fromAmino(object.config) : undefined - }; - }, - toAmino(message: QueryConfigResponse): QueryConfigResponseAmino { - const obj: any = {}; - obj.config = message.config ? Config.toAmino(message.config) : undefined; - return obj; - }, - fromAminoMsg(object: QueryConfigResponseAminoMsg): QueryConfigResponse { - return QueryConfigResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConfigResponse): QueryConfigResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConfigResponse", - value: QueryConfigResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConfigResponseProtoMsg): QueryConfigResponse { - return QueryConfigResponse.decode(message.value); - }, - toProto(message: QueryConfigResponse): Uint8Array { - return QueryConfigResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConfigResponse): QueryConfigResponseProtoMsg { - return { - typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse", - value: QueryConfigResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/auth.ts b/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/auth.ts deleted file mode 100644 index da7c5280..00000000 --- a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/auth.ts +++ /dev/null @@ -1,504 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccount { - address: string; - pubKey: Any | undefined; - accountNumber: bigint; - sequence: bigint; -} -export interface BaseAccountProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount"; - value: Uint8Array; -} -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccountAmino { - address: string; - pub_key?: AnyAmino | undefined; - account_number: string; - sequence: string; -} -export interface BaseAccountAminoMsg { - type: "cosmos-sdk/BaseAccount"; - value: BaseAccountAmino; -} -/** - * BaseAccount defines a base account type. It contains all the necessary fields - * for basic account functionality. Any custom account type should extend this - * type for additional functionality (e.g. vesting). - */ -export interface BaseAccountSDKType { - address: string; - pub_key: AnySDKType | undefined; - account_number: bigint; - sequence: bigint; -} -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccount { - baseAccount: BaseAccount | undefined; - name: string; - permissions: string[]; -} -export interface ModuleAccountProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount"; - value: Uint8Array; -} -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccountAmino { - base_account?: BaseAccountAmino | undefined; - name: string; - permissions: string[]; -} -export interface ModuleAccountAminoMsg { - type: "cosmos-sdk/ModuleAccount"; - value: ModuleAccountAmino; -} -/** ModuleAccount defines an account for modules that holds coins on a pool. */ -export interface ModuleAccountSDKType { - base_account: BaseAccountSDKType | undefined; - name: string; - permissions: string[]; -} -/** Params defines the parameters for the auth module. */ -export interface Params { - maxMemoCharacters: bigint; - txSigLimit: bigint; - txSizeCostPerByte: bigint; - sigVerifyCostEd25519: bigint; - sigVerifyCostSecp256k1: bigint; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the parameters for the auth module. */ -export interface ParamsAmino { - max_memo_characters: string; - tx_sig_limit: string; - tx_size_cost_per_byte: string; - sig_verify_cost_ed25519: string; - sig_verify_cost_secp256k1: string; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params defines the parameters for the auth module. */ -export interface ParamsSDKType { - max_memo_characters: bigint; - tx_sig_limit: bigint; - tx_size_cost_per_byte: bigint; - sig_verify_cost_ed25519: bigint; - sig_verify_cost_secp256k1: bigint; -} -function createBaseBaseAccount(): BaseAccount { - return { - address: "", - pubKey: Any.fromPartial({}), - accountNumber: BigInt(0), - sequence: BigInt(0) - }; -} -export const BaseAccount = { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount", - aminoType: "cosmos-sdk/BaseAccount", - encode(message: BaseAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.accountNumber !== BigInt(0)) { - writer.uint32(24).uint64(message.accountNumber); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(32).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BaseAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBaseAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = reader.uint64(); - break; - case 4: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BaseAccount { - return { - address: isSet(object.address) ? String(object.address) : "", - pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - accountNumber: isSet(object.accountNumber) ? BigInt(object.accountNumber.toString()) : BigInt(0), - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: BaseAccount): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pubKey !== undefined && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined); - message.accountNumber !== undefined && (obj.accountNumber = (message.accountNumber || BigInt(0)).toString()); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): BaseAccount { - const message = createBaseBaseAccount(); - message.address = object.address ?? ""; - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? Any.fromPartial(object.pubKey) : undefined; - message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: BaseAccountSDKType): BaseAccount { - return { - address: object?.address, - pubKey: object.pub_key ? Any.fromSDK(object.pub_key) : undefined, - accountNumber: object?.account_number, - sequence: object?.sequence - }; - }, - toSDK(message: BaseAccount): BaseAccountSDKType { - const obj: any = {}; - obj.address = message.address; - message.pubKey !== undefined && (obj.pub_key = message.pubKey ? Any.toSDK(message.pubKey) : undefined); - obj.account_number = message.accountNumber; - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: BaseAccountAmino): BaseAccount { - return { - address: object.address, - pubKey: object?.pub_key ? Any.fromAmino(object.pub_key) : undefined, - accountNumber: BigInt(object.account_number), - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: BaseAccount): BaseAccountAmino { - const obj: any = {}; - obj.address = message.address; - obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : undefined; - obj.account_number = message.accountNumber ? message.accountNumber.toString() : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: BaseAccountAminoMsg): BaseAccount { - return BaseAccount.fromAmino(object.value); - }, - toAminoMsg(message: BaseAccount): BaseAccountAminoMsg { - return { - type: "cosmos-sdk/BaseAccount", - value: BaseAccount.toAmino(message) - }; - }, - fromProtoMsg(message: BaseAccountProtoMsg): BaseAccount { - return BaseAccount.decode(message.value); - }, - toProto(message: BaseAccount): Uint8Array { - return BaseAccount.encode(message).finish(); - }, - toProtoMsg(message: BaseAccount): BaseAccountProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.BaseAccount", - value: BaseAccount.encode(message).finish() - }; - } -}; -function createBaseModuleAccount(): ModuleAccount { - return { - baseAccount: BaseAccount.fromPartial({}), - name: "", - permissions: [] - }; -} -export const ModuleAccount = { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", - aminoType: "cosmos-sdk/ModuleAccount", - encode(message: ModuleAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - for (const v of message.permissions) { - writer.uint32(26).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleAccount { - return { - baseAccount: isSet(object.baseAccount) ? BaseAccount.fromJSON(object.baseAccount) : undefined, - name: isSet(object.name) ? String(object.name) : "", - permissions: Array.isArray(object?.permissions) ? object.permissions.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ModuleAccount): unknown { - const obj: any = {}; - message.baseAccount !== undefined && (obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined); - message.name !== undefined && (obj.name = message.name); - if (message.permissions) { - obj.permissions = message.permissions.map(e => e); - } else { - obj.permissions = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ModuleAccount { - const message = createBaseModuleAccount(); - message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined; - message.name = object.name ?? ""; - message.permissions = object.permissions?.map(e => e) || []; - return message; - }, - fromSDK(object: ModuleAccountSDKType): ModuleAccount { - return { - baseAccount: object.base_account ? BaseAccount.fromSDK(object.base_account) : undefined, - name: object?.name, - permissions: Array.isArray(object?.permissions) ? object.permissions.map((e: any) => e) : [] - }; - }, - toSDK(message: ModuleAccount): ModuleAccountSDKType { - const obj: any = {}; - message.baseAccount !== undefined && (obj.base_account = message.baseAccount ? BaseAccount.toSDK(message.baseAccount) : undefined); - obj.name = message.name; - if (message.permissions) { - obj.permissions = message.permissions.map(e => e); - } else { - obj.permissions = []; - } - return obj; - }, - fromAmino(object: ModuleAccountAmino): ModuleAccount { - return { - baseAccount: object?.base_account ? BaseAccount.fromAmino(object.base_account) : undefined, - name: object.name, - permissions: Array.isArray(object?.permissions) ? object.permissions.map((e: any) => e) : [] - }; - }, - toAmino(message: ModuleAccount): ModuleAccountAmino { - const obj: any = {}; - obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount) : undefined; - obj.name = message.name; - if (message.permissions) { - obj.permissions = message.permissions.map(e => e); - } else { - obj.permissions = []; - } - return obj; - }, - fromAminoMsg(object: ModuleAccountAminoMsg): ModuleAccount { - return ModuleAccount.fromAmino(object.value); - }, - toAminoMsg(message: ModuleAccount): ModuleAccountAminoMsg { - return { - type: "cosmos-sdk/ModuleAccount", - value: ModuleAccount.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleAccountProtoMsg): ModuleAccount { - return ModuleAccount.decode(message.value); - }, - toProto(message: ModuleAccount): Uint8Array { - return ModuleAccount.encode(message).finish(); - }, - toProtoMsg(message: ModuleAccount): ModuleAccountProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.ModuleAccount", - value: ModuleAccount.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - maxMemoCharacters: BigInt(0), - txSigLimit: BigInt(0), - txSizeCostPerByte: BigInt(0), - sigVerifyCostEd25519: BigInt(0), - sigVerifyCostSecp256k1: BigInt(0) - }; -} -export const Params = { - typeUrl: "/cosmos.auth.v1beta1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxMemoCharacters !== BigInt(0)) { - writer.uint32(8).uint64(message.maxMemoCharacters); - } - if (message.txSigLimit !== BigInt(0)) { - writer.uint32(16).uint64(message.txSigLimit); - } - if (message.txSizeCostPerByte !== BigInt(0)) { - writer.uint32(24).uint64(message.txSizeCostPerByte); - } - if (message.sigVerifyCostEd25519 !== BigInt(0)) { - writer.uint32(32).uint64(message.sigVerifyCostEd25519); - } - if (message.sigVerifyCostSecp256k1 !== BigInt(0)) { - writer.uint32(40).uint64(message.sigVerifyCostSecp256k1); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = reader.uint64(); - break; - case 2: - message.txSigLimit = reader.uint64(); - break; - case 3: - message.txSizeCostPerByte = reader.uint64(); - break; - case 4: - message.sigVerifyCostEd25519 = reader.uint64(); - break; - case 5: - message.sigVerifyCostSecp256k1 = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - maxMemoCharacters: isSet(object.maxMemoCharacters) ? BigInt(object.maxMemoCharacters.toString()) : BigInt(0), - txSigLimit: isSet(object.txSigLimit) ? BigInt(object.txSigLimit.toString()) : BigInt(0), - txSizeCostPerByte: isSet(object.txSizeCostPerByte) ? BigInt(object.txSizeCostPerByte.toString()) : BigInt(0), - sigVerifyCostEd25519: isSet(object.sigVerifyCostEd25519) ? BigInt(object.sigVerifyCostEd25519.toString()) : BigInt(0), - sigVerifyCostSecp256k1: isSet(object.sigVerifyCostSecp256k1) ? BigInt(object.sigVerifyCostSecp256k1.toString()) : BigInt(0) - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.maxMemoCharacters !== undefined && (obj.maxMemoCharacters = (message.maxMemoCharacters || BigInt(0)).toString()); - message.txSigLimit !== undefined && (obj.txSigLimit = (message.txSigLimit || BigInt(0)).toString()); - message.txSizeCostPerByte !== undefined && (obj.txSizeCostPerByte = (message.txSizeCostPerByte || BigInt(0)).toString()); - message.sigVerifyCostEd25519 !== undefined && (obj.sigVerifyCostEd25519 = (message.sigVerifyCostEd25519 || BigInt(0)).toString()); - message.sigVerifyCostSecp256k1 !== undefined && (obj.sigVerifyCostSecp256k1 = (message.sigVerifyCostSecp256k1 || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.maxMemoCharacters = object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null ? BigInt(object.maxMemoCharacters.toString()) : BigInt(0); - message.txSigLimit = object.txSigLimit !== undefined && object.txSigLimit !== null ? BigInt(object.txSigLimit.toString()) : BigInt(0); - message.txSizeCostPerByte = object.txSizeCostPerByte !== undefined && object.txSizeCostPerByte !== null ? BigInt(object.txSizeCostPerByte.toString()) : BigInt(0); - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519 !== undefined && object.sigVerifyCostEd25519 !== null ? BigInt(object.sigVerifyCostEd25519.toString()) : BigInt(0); - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1 !== undefined && object.sigVerifyCostSecp256k1 !== null ? BigInt(object.sigVerifyCostSecp256k1.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - maxMemoCharacters: object?.max_memo_characters, - txSigLimit: object?.tx_sig_limit, - txSizeCostPerByte: object?.tx_size_cost_per_byte, - sigVerifyCostEd25519: object?.sig_verify_cost_ed25519, - sigVerifyCostSecp256k1: object?.sig_verify_cost_secp256k1 - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.max_memo_characters = message.maxMemoCharacters; - obj.tx_sig_limit = message.txSigLimit; - obj.tx_size_cost_per_byte = message.txSizeCostPerByte; - obj.sig_verify_cost_ed25519 = message.sigVerifyCostEd25519; - obj.sig_verify_cost_secp256k1 = message.sigVerifyCostSecp256k1; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - maxMemoCharacters: BigInt(object.max_memo_characters), - txSigLimit: BigInt(object.tx_sig_limit), - txSizeCostPerByte: BigInt(object.tx_size_cost_per_byte), - sigVerifyCostEd25519: BigInt(object.sig_verify_cost_ed25519), - sigVerifyCostSecp256k1: BigInt(object.sig_verify_cost_secp256k1) - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.max_memo_characters = message.maxMemoCharacters ? message.maxMemoCharacters.toString() : undefined; - obj.tx_sig_limit = message.txSigLimit ? message.txSigLimit.toString() : undefined; - obj.tx_size_cost_per_byte = message.txSizeCostPerByte ? message.txSizeCostPerByte.toString() : undefined; - obj.sig_verify_cost_ed25519 = message.sigVerifyCostEd25519 ? message.sigVerifyCostEd25519.toString() : undefined; - obj.sig_verify_cost_secp256k1 = message.sigVerifyCostSecp256k1 ? message.sigVerifyCostSecp256k1.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/genesis.ts deleted file mode 100644 index 67e0de17..00000000 --- a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/genesis.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./auth"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the auth module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** accounts are the accounts present at genesis. */ - accounts: Any[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the auth module's genesis state. */ -export interface GenesisStateAmino { - /** params defines all the paramaters of the module. */ - params?: ParamsAmino | undefined; - /** accounts are the accounts present at genesis. */ - accounts: AnyAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the auth module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - accounts: AnySDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - accounts: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.auth.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.accounts = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.accounts = object.accounts?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.accounts = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.accounts = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 6b060fad..00000000 --- a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,275 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryAccountsRequest, QueryAccountsResponse, QueryAccountRequest, QueryAccountResponse, QueryParamsRequest, QueryParamsResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, Bech32PrefixRequest, Bech32PrefixResponse, AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Accounts returns all the existing accounts - * - * Since: cosmos-sdk 0.43 - */ - accounts(request?: QueryAccountsRequest): Promise; - /** Account returns account details based on address. */ - account(request: QueryAccountRequest): Promise; - /** Params queries all parameters. */ - params(request?: QueryParamsRequest): Promise; - /** ModuleAccounts returns all the existing module accounts. */ - moduleAccounts(request?: QueryModuleAccountsRequest): Promise; - /** Bech32 queries bech32Prefix */ - bech32Prefix(request?: Bech32PrefixRequest): Promise; - /** AddressBytesToString converts Account Address bytes to string */ - addressBytesToString(request: AddressBytesToStringRequest): Promise; - /** AddressStringToBytes converts Address string to bytes */ - addressStringToBytes(request: AddressStringToBytesRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.accounts = this.accounts.bind(this); - this.account = this.account.bind(this); - this.params = this.params.bind(this); - this.moduleAccounts = this.moduleAccounts.bind(this); - this.bech32Prefix = this.bech32Prefix.bind(this); - this.addressBytesToString = this.addressBytesToString.bind(this); - this.addressStringToBytes = this.addressStringToBytes.bind(this); - } - accounts(request: QueryAccountsRequest = { - pagination: undefined - }): Promise { - const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Accounts", data); - return promise.then(data => QueryAccountsResponse.decode(new BinaryReader(data))); - } - account(request: QueryAccountRequest): Promise { - const data = QueryAccountRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Account", data); - return promise.then(data => QueryAccountResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - moduleAccounts(request: QueryModuleAccountsRequest = {}): Promise { - const data = QueryModuleAccountsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "ModuleAccounts", data); - return promise.then(data => QueryModuleAccountsResponse.decode(new BinaryReader(data))); - } - bech32Prefix(request: Bech32PrefixRequest = {}): Promise { - const data = Bech32PrefixRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Bech32Prefix", data); - return promise.then(data => Bech32PrefixResponse.decode(new BinaryReader(data))); - } - addressBytesToString(request: AddressBytesToStringRequest): Promise { - const data = AddressBytesToStringRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AddressBytesToString", data); - return promise.then(data => AddressBytesToStringResponse.decode(new BinaryReader(data))); - } - addressStringToBytes(request: AddressStringToBytesRequest): Promise { - const data = AddressStringToBytesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AddressStringToBytes", data); - return promise.then(data => AddressStringToBytesResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - accounts(request?: QueryAccountsRequest): Promise { - return queryService.accounts(request); - }, - account(request: QueryAccountRequest): Promise { - return queryService.account(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - moduleAccounts(request?: QueryModuleAccountsRequest): Promise { - return queryService.moduleAccounts(request); - }, - bech32Prefix(request?: Bech32PrefixRequest): Promise { - return queryService.bech32Prefix(request); - }, - addressBytesToString(request: AddressBytesToStringRequest): Promise { - return queryService.addressBytesToString(request); - }, - addressStringToBytes(request: AddressStringToBytesRequest): Promise { - return queryService.addressStringToBytes(request); - } - }; -}; -export interface UseAccountsQuery extends ReactQueryParams { - request?: QueryAccountsRequest; -} -export interface UseAccountQuery extends ReactQueryParams { - request: QueryAccountRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseModuleAccountsQuery extends ReactQueryParams { - request?: QueryModuleAccountsRequest; -} -export interface UseBech32PrefixQuery extends ReactQueryParams { - request?: Bech32PrefixRequest; -} -export interface UseAddressBytesToStringQuery extends ReactQueryParams { - request: AddressBytesToStringRequest; -} -export interface UseAddressStringToBytesQuery extends ReactQueryParams { - request: AddressStringToBytesRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useAccounts = ({ - request, - options - }: UseAccountsQuery) => { - return useQuery(["accountsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accounts(request); - }, options); - }; - const useAccount = ({ - request, - options - }: UseAccountQuery) => { - return useQuery(["accountQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.account(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useModuleAccounts = ({ - request, - options - }: UseModuleAccountsQuery) => { - return useQuery(["moduleAccountsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.moduleAccounts(request); - }, options); - }; - const useBech32Prefix = ({ - request, - options - }: UseBech32PrefixQuery) => { - return useQuery(["bech32PrefixQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.bech32Prefix(request); - }, options); - }; - const useAddressBytesToString = ({ - request, - options - }: UseAddressBytesToStringQuery) => { - return useQuery(["addressBytesToStringQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.addressBytesToString(request); - }, options); - }; - const useAddressStringToBytes = ({ - request, - options - }: UseAddressStringToBytesQuery) => { - return useQuery(["addressStringToBytesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.addressStringToBytes(request); - }, options); - }; - return { - /** - * Accounts returns all the existing accounts - * - * Since: cosmos-sdk 0.43 - */ - useAccounts, - /** Account returns account details based on address. */useAccount, - /** Params queries all parameters. */useParams, - /** ModuleAccounts returns all the existing module accounts. */useModuleAccounts, - /** Bech32 queries bech32Prefix */useBech32Prefix, - /** AddressBytesToString converts Account Address bytes to string */useAddressBytesToString, - /** AddressStringToBytes converts Address string to bytes */useAddressStringToBytes - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryAccountsStore { - store = new QueryStore(queryService?.accounts); - accounts(request: QueryAccountsRequest) { - return this.store.getData(request); - } - } - class QueryAccountStore { - store = new QueryStore(queryService?.account); - account(request: QueryAccountRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryModuleAccountsStore { - store = new QueryStore(queryService?.moduleAccounts); - moduleAccounts(request: QueryModuleAccountsRequest) { - return this.store.getData(request); - } - } - class QueryBech32PrefixStore { - store = new QueryStore(queryService?.bech32Prefix); - bech32Prefix(request: Bech32PrefixRequest) { - return this.store.getData(request); - } - } - class QueryAddressBytesToStringStore { - store = new QueryStore(queryService?.addressBytesToString); - addressBytesToString(request: AddressBytesToStringRequest) { - return this.store.getData(request); - } - } - class QueryAddressStringToBytesStore { - store = new QueryStore(queryService?.addressStringToBytes); - addressStringToBytes(request: AddressStringToBytesRequest) { - return this.store.getData(request); - } - } - return { - /** - * Accounts returns all the existing accounts - * - * Since: cosmos-sdk 0.43 - */ - QueryAccountsStore, - /** Account returns account details based on address. */QueryAccountStore, - /** Params queries all parameters. */QueryParamsStore, - /** ModuleAccounts returns all the existing module accounts. */QueryModuleAccountsStore, - /** Bech32 queries bech32Prefix */QueryBech32PrefixStore, - /** AddressBytesToString converts Account Address bytes to string */QueryAddressBytesToStringStore, - /** AddressStringToBytes converts Address string to bytes */QueryAddressStringToBytesStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/query.ts deleted file mode 100644 index f101cbf2..00000000 --- a/examples/interchainjs/src/codegen/cosmos/auth/v1beta1/query.ts +++ /dev/null @@ -1,1522 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Params, ParamsAmino, ParamsSDKType } from "./auth"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** - * QueryAccountsRequest is the request type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryAccountsRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest"; - value: Uint8Array; -} -/** - * QueryAccountsRequest is the request type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryAccountsRequestAminoMsg { - type: "cosmos-sdk/QueryAccountsRequest"; - value: QueryAccountsRequestAmino; -} -/** - * QueryAccountsRequest is the request type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryAccountsResponse is the response type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsResponse { - /** accounts are the existing accounts */ - accounts: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryAccountsResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse"; - value: Uint8Array; -} -/** - * QueryAccountsResponse is the response type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsResponseAmino { - /** accounts are the existing accounts */ - accounts: AnyAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryAccountsResponseAminoMsg { - type: "cosmos-sdk/QueryAccountsResponse"; - value: QueryAccountsResponseAmino; -} -/** - * QueryAccountsResponse is the response type for the Query/Accounts RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryAccountsResponseSDKType { - accounts: AnySDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryAccountRequest is the request type for the Query/Account RPC method. */ -export interface QueryAccountRequest { - /** address defines the address to query for. */ - address: string; -} -export interface QueryAccountRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest"; - value: Uint8Array; -} -/** QueryAccountRequest is the request type for the Query/Account RPC method. */ -export interface QueryAccountRequestAmino { - /** address defines the address to query for. */ - address: string; -} -export interface QueryAccountRequestAminoMsg { - type: "cosmos-sdk/QueryAccountRequest"; - value: QueryAccountRequestAmino; -} -/** QueryAccountRequest is the request type for the Query/Account RPC method. */ -export interface QueryAccountRequestSDKType { - address: string; -} -/** QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. */ -export interface QueryModuleAccountsRequest {} -export interface QueryModuleAccountsRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest"; - value: Uint8Array; -} -/** QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. */ -export interface QueryModuleAccountsRequestAmino {} -export interface QueryModuleAccountsRequestAminoMsg { - type: "cosmos-sdk/QueryModuleAccountsRequest"; - value: QueryModuleAccountsRequestAmino; -} -/** QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. */ -export interface QueryModuleAccountsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** QueryAccountResponse is the response type for the Query/Account RPC method. */ -export interface QueryAccountResponse { - /** account defines the account of the corresponding address. */ - account: Any | undefined; -} -export interface QueryAccountResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse"; - value: Uint8Array; -} -/** QueryAccountResponse is the response type for the Query/Account RPC method. */ -export interface QueryAccountResponseAmino { - /** account defines the account of the corresponding address. */ - account?: AnyAmino | undefined; -} -export interface QueryAccountResponseAminoMsg { - type: "cosmos-sdk/QueryAccountResponse"; - value: QueryAccountResponseAmino; -} -/** QueryAccountResponse is the response type for the Query/Account RPC method. */ -export interface QueryAccountResponseSDKType { - account: AnySDKType | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. */ -export interface QueryModuleAccountsResponse { - accounts: Any[]; -} -export interface QueryModuleAccountsResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse"; - value: Uint8Array; -} -/** QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. */ -export interface QueryModuleAccountsResponseAmino { - accounts: AnyAmino[]; -} -export interface QueryModuleAccountsResponseAminoMsg { - type: "cosmos-sdk/QueryModuleAccountsResponse"; - value: QueryModuleAccountsResponseAmino; -} -/** QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. */ -export interface QueryModuleAccountsResponseSDKType { - accounts: AnySDKType[]; -} -/** Bech32PrefixRequest is the request type for Bech32Prefix rpc method */ -export interface Bech32PrefixRequest {} -export interface Bech32PrefixRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest"; - value: Uint8Array; -} -/** Bech32PrefixRequest is the request type for Bech32Prefix rpc method */ -export interface Bech32PrefixRequestAmino {} -export interface Bech32PrefixRequestAminoMsg { - type: "cosmos-sdk/Bech32PrefixRequest"; - value: Bech32PrefixRequestAmino; -} -/** Bech32PrefixRequest is the request type for Bech32Prefix rpc method */ -export interface Bech32PrefixRequestSDKType {} -/** Bech32PrefixResponse is the response type for Bech32Prefix rpc method */ -export interface Bech32PrefixResponse { - bech32Prefix: string; -} -export interface Bech32PrefixResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse"; - value: Uint8Array; -} -/** Bech32PrefixResponse is the response type for Bech32Prefix rpc method */ -export interface Bech32PrefixResponseAmino { - bech32_prefix: string; -} -export interface Bech32PrefixResponseAminoMsg { - type: "cosmos-sdk/Bech32PrefixResponse"; - value: Bech32PrefixResponseAmino; -} -/** Bech32PrefixResponse is the response type for Bech32Prefix rpc method */ -export interface Bech32PrefixResponseSDKType { - bech32_prefix: string; -} -/** AddressBytesToStringRequest is the request type for AddressString rpc method */ -export interface AddressBytesToStringRequest { - addressBytes: Uint8Array; -} -export interface AddressBytesToStringRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest"; - value: Uint8Array; -} -/** AddressBytesToStringRequest is the request type for AddressString rpc method */ -export interface AddressBytesToStringRequestAmino { - address_bytes: Uint8Array; -} -export interface AddressBytesToStringRequestAminoMsg { - type: "cosmos-sdk/AddressBytesToStringRequest"; - value: AddressBytesToStringRequestAmino; -} -/** AddressBytesToStringRequest is the request type for AddressString rpc method */ -export interface AddressBytesToStringRequestSDKType { - address_bytes: Uint8Array; -} -/** AddressBytesToStringResponse is the response type for AddressString rpc method */ -export interface AddressBytesToStringResponse { - addressString: string; -} -export interface AddressBytesToStringResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse"; - value: Uint8Array; -} -/** AddressBytesToStringResponse is the response type for AddressString rpc method */ -export interface AddressBytesToStringResponseAmino { - address_string: string; -} -export interface AddressBytesToStringResponseAminoMsg { - type: "cosmos-sdk/AddressBytesToStringResponse"; - value: AddressBytesToStringResponseAmino; -} -/** AddressBytesToStringResponse is the response type for AddressString rpc method */ -export interface AddressBytesToStringResponseSDKType { - address_string: string; -} -/** AddressStringToBytesRequest is the request type for AccountBytes rpc method */ -export interface AddressStringToBytesRequest { - addressString: string; -} -export interface AddressStringToBytesRequestProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest"; - value: Uint8Array; -} -/** AddressStringToBytesRequest is the request type for AccountBytes rpc method */ -export interface AddressStringToBytesRequestAmino { - address_string: string; -} -export interface AddressStringToBytesRequestAminoMsg { - type: "cosmos-sdk/AddressStringToBytesRequest"; - value: AddressStringToBytesRequestAmino; -} -/** AddressStringToBytesRequest is the request type for AccountBytes rpc method */ -export interface AddressStringToBytesRequestSDKType { - address_string: string; -} -/** AddressStringToBytesResponse is the response type for AddressBytes rpc method */ -export interface AddressStringToBytesResponse { - addressBytes: Uint8Array; -} -export interface AddressStringToBytesResponseProtoMsg { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse"; - value: Uint8Array; -} -/** AddressStringToBytesResponse is the response type for AddressBytes rpc method */ -export interface AddressStringToBytesResponseAmino { - address_bytes: Uint8Array; -} -export interface AddressStringToBytesResponseAminoMsg { - type: "cosmos-sdk/AddressStringToBytesResponse"; - value: AddressStringToBytesResponseAmino; -} -/** AddressStringToBytesResponse is the response type for AddressBytes rpc method */ -export interface AddressStringToBytesResponseSDKType { - address_bytes: Uint8Array; -} -function createBaseQueryAccountsRequest(): QueryAccountsRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryAccountsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", - aminoType: "cosmos-sdk/QueryAccountsRequest", - encode(message: QueryAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAccountsRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAccountsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAccountsRequest { - const message = createBaseQueryAccountsRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAccountsRequestSDKType): QueryAccountsRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAccountsRequest): QueryAccountsRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAccountsRequestAmino): QueryAccountsRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAccountsRequest): QueryAccountsRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAccountsRequestAminoMsg): QueryAccountsRequest { - return QueryAccountsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAccountsRequest): QueryAccountsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAccountsRequest", - value: QueryAccountsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAccountsRequestProtoMsg): QueryAccountsRequest { - return QueryAccountsRequest.decode(message.value); - }, - toProto(message: QueryAccountsRequest): Uint8Array { - return QueryAccountsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAccountsRequest): QueryAccountsRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest", - value: QueryAccountsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAccountsResponse(): QueryAccountsResponse { - return { - accounts: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryAccountsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", - aminoType: "cosmos-sdk/QueryAccountsResponse", - encode(message: QueryAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAccountsResponse): unknown { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.accounts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAccountsResponse { - const message = createBaseQueryAccountsResponse(); - message.accounts = object.accounts?.map(e => Any.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAccountsResponseSDKType): QueryAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAccountsResponse): QueryAccountsResponseSDKType { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.accounts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAccountsResponseAmino): QueryAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAccountsResponse): QueryAccountsResponseAmino { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.accounts = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAccountsResponseAminoMsg): QueryAccountsResponse { - return QueryAccountsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAccountsResponse): QueryAccountsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAccountsResponse", - value: QueryAccountsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAccountsResponseProtoMsg): QueryAccountsResponse { - return QueryAccountsResponse.decode(message.value); - }, - toProto(message: QueryAccountsResponse): Uint8Array { - return QueryAccountsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAccountsResponse): QueryAccountsResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse", - value: QueryAccountsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAccountRequest(): QueryAccountRequest { - return { - address: "" - }; -} -export const QueryAccountRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", - aminoType: "cosmos-sdk/QueryAccountRequest", - encode(message: QueryAccountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAccountRequest { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: QueryAccountRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): QueryAccountRequest { - const message = createBaseQueryAccountRequest(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: QueryAccountRequestSDKType): QueryAccountRequest { - return { - address: object?.address - }; - }, - toSDK(message: QueryAccountRequest): QueryAccountRequestSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: QueryAccountRequestAmino): QueryAccountRequest { - return { - address: object.address - }; - }, - toAmino(message: QueryAccountRequest): QueryAccountRequestAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: QueryAccountRequestAminoMsg): QueryAccountRequest { - return QueryAccountRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAccountRequest): QueryAccountRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAccountRequest", - value: QueryAccountRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAccountRequestProtoMsg): QueryAccountRequest { - return QueryAccountRequest.decode(message.value); - }, - toProto(message: QueryAccountRequest): Uint8Array { - return QueryAccountRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAccountRequest): QueryAccountRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest", - value: QueryAccountRequest.encode(message).finish() - }; - } -}; -function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest { - return {}; -} -export const QueryModuleAccountsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", - aminoType: "cosmos-sdk/QueryModuleAccountsRequest", - encode(_: QueryModuleAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryModuleAccountsRequest { - return {}; - }, - toJSON(_: QueryModuleAccountsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryModuleAccountsRequest { - const message = createBaseQueryModuleAccountsRequest(); - return message; - }, - fromSDK(_: QueryModuleAccountsRequestSDKType): QueryModuleAccountsRequest { - return {}; - }, - toSDK(_: QueryModuleAccountsRequest): QueryModuleAccountsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryModuleAccountsRequestAmino): QueryModuleAccountsRequest { - return {}; - }, - toAmino(_: QueryModuleAccountsRequest): QueryModuleAccountsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryModuleAccountsRequestAminoMsg): QueryModuleAccountsRequest { - return QueryModuleAccountsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryModuleAccountsRequest", - value: QueryModuleAccountsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryModuleAccountsRequestProtoMsg): QueryModuleAccountsRequest { - return QueryModuleAccountsRequest.decode(message.value); - }, - toProto(message: QueryModuleAccountsRequest): Uint8Array { - return QueryModuleAccountsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest", - value: QueryModuleAccountsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAccountResponse(): QueryAccountResponse { - return { - account: Any.fromPartial({}) - }; -} -export const QueryAccountResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", - aminoType: "cosmos-sdk/QueryAccountResponse", - encode(message: QueryAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.account !== undefined) { - Any.encode(message.account, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAccountResponse { - return { - account: isSet(object.account) ? Any.fromJSON(object.account) : undefined - }; - }, - toJSON(message: QueryAccountResponse): unknown { - const obj: any = {}; - message.account !== undefined && (obj.account = message.account ? Any.toJSON(message.account) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAccountResponse { - const message = createBaseQueryAccountResponse(); - message.account = object.account !== undefined && object.account !== null ? Any.fromPartial(object.account) : undefined; - return message; - }, - fromSDK(object: QueryAccountResponseSDKType): QueryAccountResponse { - return { - account: object.account ? Any.fromSDK(object.account) : undefined - }; - }, - toSDK(message: QueryAccountResponse): QueryAccountResponseSDKType { - const obj: any = {}; - message.account !== undefined && (obj.account = message.account ? Any.toSDK(message.account) : undefined); - return obj; - }, - fromAmino(object: QueryAccountResponseAmino): QueryAccountResponse { - return { - account: object?.account ? Any.fromAmino(object.account) : undefined - }; - }, - toAmino(message: QueryAccountResponse): QueryAccountResponseAmino { - const obj: any = {}; - obj.account = message.account ? Any.toAmino(message.account) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAccountResponseAminoMsg): QueryAccountResponse { - return QueryAccountResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAccountResponse): QueryAccountResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAccountResponse", - value: QueryAccountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAccountResponseProtoMsg): QueryAccountResponse { - return QueryAccountResponse.decode(message.value); - }, - toProto(message: QueryAccountResponse): Uint8Array { - return QueryAccountResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAccountResponse): QueryAccountResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse", - value: QueryAccountResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse { - return { - accounts: [] - }; -} -export const QueryModuleAccountsResponse = { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", - aminoType: "cosmos-sdk/QueryModuleAccountsResponse", - encode(message: QueryModuleAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.accounts) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accounts.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryModuleAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryModuleAccountsResponse): unknown { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.accounts = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryModuleAccountsResponse { - const message = createBaseQueryModuleAccountsResponse(); - message.accounts = object.accounts?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryModuleAccountsResponseSDKType): QueryModuleAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseSDKType { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.accounts = []; - } - return obj; - }, - fromAmino(object: QueryModuleAccountsResponseAmino): QueryModuleAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAmino { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.accounts = []; - } - return obj; - }, - fromAminoMsg(object: QueryModuleAccountsResponseAminoMsg): QueryModuleAccountsResponse { - return QueryModuleAccountsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryModuleAccountsResponse", - value: QueryModuleAccountsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryModuleAccountsResponseProtoMsg): QueryModuleAccountsResponse { - return QueryModuleAccountsResponse.decode(message.value); - }, - toProto(message: QueryModuleAccountsResponse): Uint8Array { - return QueryModuleAccountsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse", - value: QueryModuleAccountsResponse.encode(message).finish() - }; - } -}; -function createBaseBech32PrefixRequest(): Bech32PrefixRequest { - return {}; -} -export const Bech32PrefixRequest = { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", - aminoType: "cosmos-sdk/Bech32PrefixRequest", - encode(_: Bech32PrefixRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Bech32PrefixRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBech32PrefixRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): Bech32PrefixRequest { - return {}; - }, - toJSON(_: Bech32PrefixRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): Bech32PrefixRequest { - const message = createBaseBech32PrefixRequest(); - return message; - }, - fromSDK(_: Bech32PrefixRequestSDKType): Bech32PrefixRequest { - return {}; - }, - toSDK(_: Bech32PrefixRequest): Bech32PrefixRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: Bech32PrefixRequestAmino): Bech32PrefixRequest { - return {}; - }, - toAmino(_: Bech32PrefixRequest): Bech32PrefixRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: Bech32PrefixRequestAminoMsg): Bech32PrefixRequest { - return Bech32PrefixRequest.fromAmino(object.value); - }, - toAminoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestAminoMsg { - return { - type: "cosmos-sdk/Bech32PrefixRequest", - value: Bech32PrefixRequest.toAmino(message) - }; - }, - fromProtoMsg(message: Bech32PrefixRequestProtoMsg): Bech32PrefixRequest { - return Bech32PrefixRequest.decode(message.value); - }, - toProto(message: Bech32PrefixRequest): Uint8Array { - return Bech32PrefixRequest.encode(message).finish(); - }, - toProtoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest", - value: Bech32PrefixRequest.encode(message).finish() - }; - } -}; -function createBaseBech32PrefixResponse(): Bech32PrefixResponse { - return { - bech32Prefix: "" - }; -} -export const Bech32PrefixResponse = { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", - aminoType: "cosmos-sdk/Bech32PrefixResponse", - encode(message: Bech32PrefixResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bech32Prefix !== "") { - writer.uint32(10).string(message.bech32Prefix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Bech32PrefixResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBech32PrefixResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bech32Prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Bech32PrefixResponse { - return { - bech32Prefix: isSet(object.bech32Prefix) ? String(object.bech32Prefix) : "" - }; - }, - toJSON(message: Bech32PrefixResponse): unknown { - const obj: any = {}; - message.bech32Prefix !== undefined && (obj.bech32Prefix = message.bech32Prefix); - return obj; - }, - fromPartial(object: DeepPartial): Bech32PrefixResponse { - const message = createBaseBech32PrefixResponse(); - message.bech32Prefix = object.bech32Prefix ?? ""; - return message; - }, - fromSDK(object: Bech32PrefixResponseSDKType): Bech32PrefixResponse { - return { - bech32Prefix: object?.bech32_prefix - }; - }, - toSDK(message: Bech32PrefixResponse): Bech32PrefixResponseSDKType { - const obj: any = {}; - obj.bech32_prefix = message.bech32Prefix; - return obj; - }, - fromAmino(object: Bech32PrefixResponseAmino): Bech32PrefixResponse { - return { - bech32Prefix: object.bech32_prefix - }; - }, - toAmino(message: Bech32PrefixResponse): Bech32PrefixResponseAmino { - const obj: any = {}; - obj.bech32_prefix = message.bech32Prefix; - return obj; - }, - fromAminoMsg(object: Bech32PrefixResponseAminoMsg): Bech32PrefixResponse { - return Bech32PrefixResponse.fromAmino(object.value); - }, - toAminoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseAminoMsg { - return { - type: "cosmos-sdk/Bech32PrefixResponse", - value: Bech32PrefixResponse.toAmino(message) - }; - }, - fromProtoMsg(message: Bech32PrefixResponseProtoMsg): Bech32PrefixResponse { - return Bech32PrefixResponse.decode(message.value); - }, - toProto(message: Bech32PrefixResponse): Uint8Array { - return Bech32PrefixResponse.encode(message).finish(); - }, - toProtoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse", - value: Bech32PrefixResponse.encode(message).finish() - }; - } -}; -function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest { - return { - addressBytes: new Uint8Array() - }; -} -export const AddressBytesToStringRequest = { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", - aminoType: "cosmos-sdk/AddressBytesToStringRequest", - encode(message: AddressBytesToStringRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressBytes.length !== 0) { - writer.uint32(10).bytes(message.addressBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressBytesToStringRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressBytesToStringRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AddressBytesToStringRequest { - return { - addressBytes: isSet(object.addressBytes) ? bytesFromBase64(object.addressBytes) : new Uint8Array() - }; - }, - toJSON(message: AddressBytesToStringRequest): unknown { - const obj: any = {}; - message.addressBytes !== undefined && (obj.addressBytes = base64FromBytes(message.addressBytes !== undefined ? message.addressBytes : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): AddressBytesToStringRequest { - const message = createBaseAddressBytesToStringRequest(); - message.addressBytes = object.addressBytes ?? new Uint8Array(); - return message; - }, - fromSDK(object: AddressBytesToStringRequestSDKType): AddressBytesToStringRequest { - return { - addressBytes: object?.address_bytes - }; - }, - toSDK(message: AddressBytesToStringRequest): AddressBytesToStringRequestSDKType { - const obj: any = {}; - obj.address_bytes = message.addressBytes; - return obj; - }, - fromAmino(object: AddressBytesToStringRequestAmino): AddressBytesToStringRequest { - return { - addressBytes: object.address_bytes - }; - }, - toAmino(message: AddressBytesToStringRequest): AddressBytesToStringRequestAmino { - const obj: any = {}; - obj.address_bytes = message.addressBytes; - return obj; - }, - fromAminoMsg(object: AddressBytesToStringRequestAminoMsg): AddressBytesToStringRequest { - return AddressBytesToStringRequest.fromAmino(object.value); - }, - toAminoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestAminoMsg { - return { - type: "cosmos-sdk/AddressBytesToStringRequest", - value: AddressBytesToStringRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AddressBytesToStringRequestProtoMsg): AddressBytesToStringRequest { - return AddressBytesToStringRequest.decode(message.value); - }, - toProto(message: AddressBytesToStringRequest): Uint8Array { - return AddressBytesToStringRequest.encode(message).finish(); - }, - toProtoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest", - value: AddressBytesToStringRequest.encode(message).finish() - }; - } -}; -function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse { - return { - addressString: "" - }; -} -export const AddressBytesToStringResponse = { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", - aminoType: "cosmos-sdk/AddressBytesToStringResponse", - encode(message: AddressBytesToStringResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressString !== "") { - writer.uint32(10).string(message.addressString); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressBytesToStringResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressBytesToStringResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressString = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AddressBytesToStringResponse { - return { - addressString: isSet(object.addressString) ? String(object.addressString) : "" - }; - }, - toJSON(message: AddressBytesToStringResponse): unknown { - const obj: any = {}; - message.addressString !== undefined && (obj.addressString = message.addressString); - return obj; - }, - fromPartial(object: DeepPartial): AddressBytesToStringResponse { - const message = createBaseAddressBytesToStringResponse(); - message.addressString = object.addressString ?? ""; - return message; - }, - fromSDK(object: AddressBytesToStringResponseSDKType): AddressBytesToStringResponse { - return { - addressString: object?.address_string - }; - }, - toSDK(message: AddressBytesToStringResponse): AddressBytesToStringResponseSDKType { - const obj: any = {}; - obj.address_string = message.addressString; - return obj; - }, - fromAmino(object: AddressBytesToStringResponseAmino): AddressBytesToStringResponse { - return { - addressString: object.address_string - }; - }, - toAmino(message: AddressBytesToStringResponse): AddressBytesToStringResponseAmino { - const obj: any = {}; - obj.address_string = message.addressString; - return obj; - }, - fromAminoMsg(object: AddressBytesToStringResponseAminoMsg): AddressBytesToStringResponse { - return AddressBytesToStringResponse.fromAmino(object.value); - }, - toAminoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseAminoMsg { - return { - type: "cosmos-sdk/AddressBytesToStringResponse", - value: AddressBytesToStringResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AddressBytesToStringResponseProtoMsg): AddressBytesToStringResponse { - return AddressBytesToStringResponse.decode(message.value); - }, - toProto(message: AddressBytesToStringResponse): Uint8Array { - return AddressBytesToStringResponse.encode(message).finish(); - }, - toProtoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse", - value: AddressBytesToStringResponse.encode(message).finish() - }; - } -}; -function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest { - return { - addressString: "" - }; -} -export const AddressStringToBytesRequest = { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", - aminoType: "cosmos-sdk/AddressStringToBytesRequest", - encode(message: AddressStringToBytesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressString !== "") { - writer.uint32(10).string(message.addressString); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressStringToBytesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressStringToBytesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressString = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AddressStringToBytesRequest { - return { - addressString: isSet(object.addressString) ? String(object.addressString) : "" - }; - }, - toJSON(message: AddressStringToBytesRequest): unknown { - const obj: any = {}; - message.addressString !== undefined && (obj.addressString = message.addressString); - return obj; - }, - fromPartial(object: DeepPartial): AddressStringToBytesRequest { - const message = createBaseAddressStringToBytesRequest(); - message.addressString = object.addressString ?? ""; - return message; - }, - fromSDK(object: AddressStringToBytesRequestSDKType): AddressStringToBytesRequest { - return { - addressString: object?.address_string - }; - }, - toSDK(message: AddressStringToBytesRequest): AddressStringToBytesRequestSDKType { - const obj: any = {}; - obj.address_string = message.addressString; - return obj; - }, - fromAmino(object: AddressStringToBytesRequestAmino): AddressStringToBytesRequest { - return { - addressString: object.address_string - }; - }, - toAmino(message: AddressStringToBytesRequest): AddressStringToBytesRequestAmino { - const obj: any = {}; - obj.address_string = message.addressString; - return obj; - }, - fromAminoMsg(object: AddressStringToBytesRequestAminoMsg): AddressStringToBytesRequest { - return AddressStringToBytesRequest.fromAmino(object.value); - }, - toAminoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestAminoMsg { - return { - type: "cosmos-sdk/AddressStringToBytesRequest", - value: AddressStringToBytesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AddressStringToBytesRequestProtoMsg): AddressStringToBytesRequest { - return AddressStringToBytesRequest.decode(message.value); - }, - toProto(message: AddressStringToBytesRequest): Uint8Array { - return AddressStringToBytesRequest.encode(message).finish(); - }, - toProtoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest", - value: AddressStringToBytesRequest.encode(message).finish() - }; - } -}; -function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse { - return { - addressBytes: new Uint8Array() - }; -} -export const AddressStringToBytesResponse = { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", - aminoType: "cosmos-sdk/AddressStringToBytesResponse", - encode(message: AddressStringToBytesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.addressBytes.length !== 0) { - writer.uint32(10).bytes(message.addressBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AddressStringToBytesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressStringToBytesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addressBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AddressStringToBytesResponse { - return { - addressBytes: isSet(object.addressBytes) ? bytesFromBase64(object.addressBytes) : new Uint8Array() - }; - }, - toJSON(message: AddressStringToBytesResponse): unknown { - const obj: any = {}; - message.addressBytes !== undefined && (obj.addressBytes = base64FromBytes(message.addressBytes !== undefined ? message.addressBytes : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): AddressStringToBytesResponse { - const message = createBaseAddressStringToBytesResponse(); - message.addressBytes = object.addressBytes ?? new Uint8Array(); - return message; - }, - fromSDK(object: AddressStringToBytesResponseSDKType): AddressStringToBytesResponse { - return { - addressBytes: object?.address_bytes - }; - }, - toSDK(message: AddressStringToBytesResponse): AddressStringToBytesResponseSDKType { - const obj: any = {}; - obj.address_bytes = message.addressBytes; - return obj; - }, - fromAmino(object: AddressStringToBytesResponseAmino): AddressStringToBytesResponse { - return { - addressBytes: object.address_bytes - }; - }, - toAmino(message: AddressStringToBytesResponse): AddressStringToBytesResponseAmino { - const obj: any = {}; - obj.address_bytes = message.addressBytes; - return obj; - }, - fromAminoMsg(object: AddressStringToBytesResponseAminoMsg): AddressStringToBytesResponse { - return AddressStringToBytesResponse.fromAmino(object.value); - }, - toAminoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseAminoMsg { - return { - type: "cosmos-sdk/AddressStringToBytesResponse", - value: AddressStringToBytesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AddressStringToBytesResponseProtoMsg): AddressStringToBytesResponse { - return AddressStringToBytesResponse.decode(message.value); - }, - toProto(message: AddressStringToBytesResponse): Uint8Array { - return AddressStringToBytesResponse.encode(message).finish(); - }, - toProtoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseProtoMsg { - return { - typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse", - value: AddressStringToBytesResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/authz.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/authz.ts deleted file mode 100644 index b1a98b40..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/authz.ts +++ /dev/null @@ -1,557 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -/** - * GenericAuthorization gives the grantee unrestricted permissions to execute - * the provided method on behalf of the granter's account. - */ -export interface GenericAuthorization { - /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ - msg: string; -} -export interface GenericAuthorizationProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization"; - value: Uint8Array; -} -/** - * GenericAuthorization gives the grantee unrestricted permissions to execute - * the provided method on behalf of the granter's account. - */ -export interface GenericAuthorizationAmino { - /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ - msg: string; -} -export interface GenericAuthorizationAminoMsg { - type: "cosmos-sdk/GenericAuthorization"; - value: GenericAuthorizationAmino; -} -/** - * GenericAuthorization gives the grantee unrestricted permissions to execute - * the provided method on behalf of the granter's account. - */ -export interface GenericAuthorizationSDKType { - msg: string; -} -/** - * Grant gives permissions to execute - * the provide method with expiration time. - */ -export interface Grant { - authorization: Any | undefined; - /** - * time when the grant will expire and will be pruned. If null, then the grant - * doesn't have a time expiration (other conditions in `authorization` - * may apply to invalidate the grant) - */ - expiration?: Date | undefined; -} -export interface GrantProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.Grant"; - value: Uint8Array; -} -/** - * Grant gives permissions to execute - * the provide method with expiration time. - */ -export interface GrantAmino { - authorization?: AnyAmino | undefined; - /** - * time when the grant will expire and will be pruned. If null, then the grant - * doesn't have a time expiration (other conditions in `authorization` - * may apply to invalidate the grant) - */ - expiration?: Date | undefined; -} -export interface GrantAminoMsg { - type: "cosmos-sdk/Grant"; - value: GrantAmino; -} -/** - * Grant gives permissions to execute - * the provide method with expiration time. - */ -export interface GrantSDKType { - authorization: AnySDKType | undefined; - expiration?: Date | undefined; -} -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - */ -export interface GrantAuthorization { - granter: string; - grantee: string; - authorization: Any | undefined; - expiration: Date | undefined; -} -export interface GrantAuthorizationProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization"; - value: Uint8Array; -} -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - */ -export interface GrantAuthorizationAmino { - granter: string; - grantee: string; - authorization?: AnyAmino | undefined; - expiration?: Date | undefined; -} -export interface GrantAuthorizationAminoMsg { - type: "cosmos-sdk/GrantAuthorization"; - value: GrantAuthorizationAmino; -} -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - */ -export interface GrantAuthorizationSDKType { - granter: string; - grantee: string; - authorization: AnySDKType | undefined; - expiration: Date | undefined; -} -/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */ -export interface GrantQueueItem { - /** msg_type_urls contains the list of TypeURL of a sdk.Msg. */ - msgTypeUrls: string[]; -} -export interface GrantQueueItemProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem"; - value: Uint8Array; -} -/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */ -export interface GrantQueueItemAmino { - /** msg_type_urls contains the list of TypeURL of a sdk.Msg. */ - msg_type_urls: string[]; -} -export interface GrantQueueItemAminoMsg { - type: "cosmos-sdk/GrantQueueItem"; - value: GrantQueueItemAmino; -} -/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */ -export interface GrantQueueItemSDKType { - msg_type_urls: string[]; -} -function createBaseGenericAuthorization(): GenericAuthorization { - return { - msg: "" - }; -} -export const GenericAuthorization = { - typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", - aminoType: "cosmos-sdk/GenericAuthorization", - encode(message: GenericAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msg !== "") { - writer.uint32(10).string(message.msg); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenericAuthorization { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenericAuthorization(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenericAuthorization { - return { - msg: isSet(object.msg) ? String(object.msg) : "" - }; - }, - toJSON(message: GenericAuthorization): unknown { - const obj: any = {}; - message.msg !== undefined && (obj.msg = message.msg); - return obj; - }, - fromPartial(object: DeepPartial): GenericAuthorization { - const message = createBaseGenericAuthorization(); - message.msg = object.msg ?? ""; - return message; - }, - fromSDK(object: GenericAuthorizationSDKType): GenericAuthorization { - return { - msg: object?.msg - }; - }, - toSDK(message: GenericAuthorization): GenericAuthorizationSDKType { - const obj: any = {}; - obj.msg = message.msg; - return obj; - }, - fromAmino(object: GenericAuthorizationAmino): GenericAuthorization { - return { - msg: object.msg - }; - }, - toAmino(message: GenericAuthorization): GenericAuthorizationAmino { - const obj: any = {}; - obj.msg = message.msg; - return obj; - }, - fromAminoMsg(object: GenericAuthorizationAminoMsg): GenericAuthorization { - return GenericAuthorization.fromAmino(object.value); - }, - toAminoMsg(message: GenericAuthorization): GenericAuthorizationAminoMsg { - return { - type: "cosmos-sdk/GenericAuthorization", - value: GenericAuthorization.toAmino(message) - }; - }, - fromProtoMsg(message: GenericAuthorizationProtoMsg): GenericAuthorization { - return GenericAuthorization.decode(message.value); - }, - toProto(message: GenericAuthorization): Uint8Array { - return GenericAuthorization.encode(message).finish(); - }, - toProtoMsg(message: GenericAuthorization): GenericAuthorizationProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization", - value: GenericAuthorization.encode(message).finish() - }; - } -}; -function createBaseGrant(): Grant { - return { - authorization: Any.fromPartial({}), - expiration: undefined - }; -} -export const Grant = { - typeUrl: "/cosmos.authz.v1beta1.Grant", - aminoType: "cosmos-sdk/Grant", - encode(message: Grant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(10).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Grant { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrant(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 2: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Grant { - return { - authorization: isSet(object.authorization) ? Any.fromJSON(object.authorization) : undefined, - expiration: isSet(object.expiration) ? new Date(object.expiration) : undefined - }; - }, - toJSON(message: Grant): unknown { - const obj: any = {}; - message.authorization !== undefined && (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = message.expiration.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): Grant { - const message = createBaseGrant(); - message.authorization = object.authorization !== undefined && object.authorization !== null ? Any.fromPartial(object.authorization) : undefined; - message.expiration = object.expiration ?? undefined; - return message; - }, - fromSDK(object: GrantSDKType): Grant { - return { - authorization: object.authorization ? Any.fromSDK(object.authorization) : undefined, - expiration: object.expiration ?? undefined - }; - }, - toSDK(message: Grant): GrantSDKType { - const obj: any = {}; - message.authorization !== undefined && (obj.authorization = message.authorization ? Any.toSDK(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = message.expiration ?? undefined); - return obj; - }, - fromAmino(object: GrantAmino): Grant { - return { - authorization: object?.authorization ? Any.fromAmino(object.authorization) : undefined, - expiration: object?.expiration - }; - }, - toAmino(message: Grant): GrantAmino { - const obj: any = {}; - obj.authorization = message.authorization ? Any.toAmino(message.authorization) : undefined; - obj.expiration = message.expiration; - return obj; - }, - fromAminoMsg(object: GrantAminoMsg): Grant { - return Grant.fromAmino(object.value); - }, - toAminoMsg(message: Grant): GrantAminoMsg { - return { - type: "cosmos-sdk/Grant", - value: Grant.toAmino(message) - }; - }, - fromProtoMsg(message: GrantProtoMsg): Grant { - return Grant.decode(message.value); - }, - toProto(message: Grant): Uint8Array { - return Grant.encode(message).finish(); - }, - toProtoMsg(message: Grant): GrantProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.Grant", - value: Grant.encode(message).finish() - }; - } -}; -function createBaseGrantAuthorization(): GrantAuthorization { - return { - granter: "", - grantee: "", - authorization: Any.fromPartial({}), - expiration: new Date() - }; -} -export const GrantAuthorization = { - typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", - aminoType: "cosmos-sdk/GrantAuthorization", - encode(message: GrantAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GrantAuthorization { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrantAuthorization(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 4: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GrantAuthorization { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - authorization: isSet(object.authorization) ? Any.fromJSON(object.authorization) : undefined, - expiration: isSet(object.expiration) ? new Date(object.expiration) : undefined - }; - }, - toJSON(message: GrantAuthorization): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.authorization !== undefined && (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = message.expiration.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): GrantAuthorization { - const message = createBaseGrantAuthorization(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.authorization = object.authorization !== undefined && object.authorization !== null ? Any.fromPartial(object.authorization) : undefined; - message.expiration = object.expiration ?? undefined; - return message; - }, - fromSDK(object: GrantAuthorizationSDKType): GrantAuthorization { - return { - granter: object?.granter, - grantee: object?.grantee, - authorization: object.authorization ? Any.fromSDK(object.authorization) : undefined, - expiration: object.expiration ?? undefined - }; - }, - toSDK(message: GrantAuthorization): GrantAuthorizationSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - message.authorization !== undefined && (obj.authorization = message.authorization ? Any.toSDK(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = message.expiration ?? undefined); - return obj; - }, - fromAmino(object: GrantAuthorizationAmino): GrantAuthorization { - return { - granter: object.granter, - grantee: object.grantee, - authorization: object?.authorization ? Any.fromAmino(object.authorization) : undefined, - expiration: object.expiration - }; - }, - toAmino(message: GrantAuthorization): GrantAuthorizationAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.authorization = message.authorization ? Any.toAmino(message.authorization) : undefined; - obj.expiration = message.expiration; - return obj; - }, - fromAminoMsg(object: GrantAuthorizationAminoMsg): GrantAuthorization { - return GrantAuthorization.fromAmino(object.value); - }, - toAminoMsg(message: GrantAuthorization): GrantAuthorizationAminoMsg { - return { - type: "cosmos-sdk/GrantAuthorization", - value: GrantAuthorization.toAmino(message) - }; - }, - fromProtoMsg(message: GrantAuthorizationProtoMsg): GrantAuthorization { - return GrantAuthorization.decode(message.value); - }, - toProto(message: GrantAuthorization): Uint8Array { - return GrantAuthorization.encode(message).finish(); - }, - toProtoMsg(message: GrantAuthorization): GrantAuthorizationProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization", - value: GrantAuthorization.encode(message).finish() - }; - } -}; -function createBaseGrantQueueItem(): GrantQueueItem { - return { - msgTypeUrls: [] - }; -} -export const GrantQueueItem = { - typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", - aminoType: "cosmos-sdk/GrantQueueItem", - encode(message: GrantQueueItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.msgTypeUrls) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GrantQueueItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrantQueueItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgTypeUrls.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GrantQueueItem { - return { - msgTypeUrls: Array.isArray(object?.msgTypeUrls) ? object.msgTypeUrls.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: GrantQueueItem): unknown { - const obj: any = {}; - if (message.msgTypeUrls) { - obj.msgTypeUrls = message.msgTypeUrls.map(e => e); - } else { - obj.msgTypeUrls = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GrantQueueItem { - const message = createBaseGrantQueueItem(); - message.msgTypeUrls = object.msgTypeUrls?.map(e => e) || []; - return message; - }, - fromSDK(object: GrantQueueItemSDKType): GrantQueueItem { - return { - msgTypeUrls: Array.isArray(object?.msg_type_urls) ? object.msg_type_urls.map((e: any) => e) : [] - }; - }, - toSDK(message: GrantQueueItem): GrantQueueItemSDKType { - const obj: any = {}; - if (message.msgTypeUrls) { - obj.msg_type_urls = message.msgTypeUrls.map(e => e); - } else { - obj.msg_type_urls = []; - } - return obj; - }, - fromAmino(object: GrantQueueItemAmino): GrantQueueItem { - return { - msgTypeUrls: Array.isArray(object?.msg_type_urls) ? object.msg_type_urls.map((e: any) => e) : [] - }; - }, - toAmino(message: GrantQueueItem): GrantQueueItemAmino { - const obj: any = {}; - if (message.msgTypeUrls) { - obj.msg_type_urls = message.msgTypeUrls.map(e => e); - } else { - obj.msg_type_urls = []; - } - return obj; - }, - fromAminoMsg(object: GrantQueueItemAminoMsg): GrantQueueItem { - return GrantQueueItem.fromAmino(object.value); - }, - toAminoMsg(message: GrantQueueItem): GrantQueueItemAminoMsg { - return { - type: "cosmos-sdk/GrantQueueItem", - value: GrantQueueItem.toAmino(message) - }; - }, - fromProtoMsg(message: GrantQueueItemProtoMsg): GrantQueueItem { - return GrantQueueItem.decode(message.value); - }, - toProto(message: GrantQueueItem): Uint8Array { - return GrantQueueItem.encode(message).finish(); - }, - toProtoMsg(message: GrantQueueItem): GrantQueueItemProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem", - value: GrantQueueItem.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/event.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/event.ts deleted file mode 100644 index cebacb9b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/event.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** EventGrant is emitted on Msg/Grant */ -export interface EventGrant { - /** Msg type URL for which an autorization is granted */ - msgTypeUrl: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} -export interface EventGrantProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.EventGrant"; - value: Uint8Array; -} -/** EventGrant is emitted on Msg/Grant */ -export interface EventGrantAmino { - /** Msg type URL for which an autorization is granted */ - msg_type_url: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} -export interface EventGrantAminoMsg { - type: "cosmos-sdk/EventGrant"; - value: EventGrantAmino; -} -/** EventGrant is emitted on Msg/Grant */ -export interface EventGrantSDKType { - msg_type_url: string; - granter: string; - grantee: string; -} -/** EventRevoke is emitted on Msg/Revoke */ -export interface EventRevoke { - /** Msg type URL for which an autorization is revoked */ - msgTypeUrl: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} -export interface EventRevokeProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.EventRevoke"; - value: Uint8Array; -} -/** EventRevoke is emitted on Msg/Revoke */ -export interface EventRevokeAmino { - /** Msg type URL for which an autorization is revoked */ - msg_type_url: string; - /** Granter account address */ - granter: string; - /** Grantee account address */ - grantee: string; -} -export interface EventRevokeAminoMsg { - type: "cosmos-sdk/EventRevoke"; - value: EventRevokeAmino; -} -/** EventRevoke is emitted on Msg/Revoke */ -export interface EventRevokeSDKType { - msg_type_url: string; - granter: string; - grantee: string; -} -function createBaseEventGrant(): EventGrant { - return { - msgTypeUrl: "", - granter: "", - grantee: "" - }; -} -export const EventGrant = { - typeUrl: "/cosmos.authz.v1beta1.EventGrant", - aminoType: "cosmos-sdk/EventGrant", - encode(message: EventGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgTypeUrl !== "") { - writer.uint32(18).string(message.msgTypeUrl); - } - if (message.granter !== "") { - writer.uint32(26).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(34).string(message.grantee); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventGrant { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventGrant(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.msgTypeUrl = reader.string(); - break; - case 3: - message.granter = reader.string(); - break; - case 4: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventGrant { - return { - msgTypeUrl: isSet(object.msgTypeUrl) ? String(object.msgTypeUrl) : "", - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "" - }; - }, - toJSON(message: EventGrant): unknown { - const obj: any = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object: DeepPartial): EventGrant { - const message = createBaseEventGrant(); - message.msgTypeUrl = object.msgTypeUrl ?? ""; - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - return message; - }, - fromSDK(object: EventGrantSDKType): EventGrant { - return { - msgTypeUrl: object?.msg_type_url, - granter: object?.granter, - grantee: object?.grantee - }; - }, - toSDK(message: EventGrant): EventGrantSDKType { - const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAmino(object: EventGrantAmino): EventGrant { - return { - msgTypeUrl: object.msg_type_url, - granter: object.granter, - grantee: object.grantee - }; - }, - toAmino(message: EventGrant): EventGrantAmino { - const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAminoMsg(object: EventGrantAminoMsg): EventGrant { - return EventGrant.fromAmino(object.value); - }, - toAminoMsg(message: EventGrant): EventGrantAminoMsg { - return { - type: "cosmos-sdk/EventGrant", - value: EventGrant.toAmino(message) - }; - }, - fromProtoMsg(message: EventGrantProtoMsg): EventGrant { - return EventGrant.decode(message.value); - }, - toProto(message: EventGrant): Uint8Array { - return EventGrant.encode(message).finish(); - }, - toProtoMsg(message: EventGrant): EventGrantProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.EventGrant", - value: EventGrant.encode(message).finish() - }; - } -}; -function createBaseEventRevoke(): EventRevoke { - return { - msgTypeUrl: "", - granter: "", - grantee: "" - }; -} -export const EventRevoke = { - typeUrl: "/cosmos.authz.v1beta1.EventRevoke", - aminoType: "cosmos-sdk/EventRevoke", - encode(message: EventRevoke, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgTypeUrl !== "") { - writer.uint32(18).string(message.msgTypeUrl); - } - if (message.granter !== "") { - writer.uint32(26).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(34).string(message.grantee); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventRevoke { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventRevoke(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.msgTypeUrl = reader.string(); - break; - case 3: - message.granter = reader.string(); - break; - case 4: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventRevoke { - return { - msgTypeUrl: isSet(object.msgTypeUrl) ? String(object.msgTypeUrl) : "", - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "" - }; - }, - toJSON(message: EventRevoke): unknown { - const obj: any = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object: DeepPartial): EventRevoke { - const message = createBaseEventRevoke(); - message.msgTypeUrl = object.msgTypeUrl ?? ""; - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - return message; - }, - fromSDK(object: EventRevokeSDKType): EventRevoke { - return { - msgTypeUrl: object?.msg_type_url, - granter: object?.granter, - grantee: object?.grantee - }; - }, - toSDK(message: EventRevoke): EventRevokeSDKType { - const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAmino(object: EventRevokeAmino): EventRevoke { - return { - msgTypeUrl: object.msg_type_url, - granter: object.granter, - grantee: object.grantee - }; - }, - toAmino(message: EventRevoke): EventRevokeAmino { - const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAminoMsg(object: EventRevokeAminoMsg): EventRevoke { - return EventRevoke.fromAmino(object.value); - }, - toAminoMsg(message: EventRevoke): EventRevokeAminoMsg { - return { - type: "cosmos-sdk/EventRevoke", - value: EventRevoke.toAmino(message) - }; - }, - fromProtoMsg(message: EventRevokeProtoMsg): EventRevoke { - return EventRevoke.decode(message.value); - }, - toProto(message: EventRevoke): Uint8Array { - return EventRevoke.encode(message).finish(); - }, - toProtoMsg(message: EventRevoke): EventRevokeProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.EventRevoke", - value: EventRevoke.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/genesis.ts deleted file mode 100644 index 3c061e7d..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/genesis.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { GrantAuthorization, GrantAuthorizationAmino, GrantAuthorizationSDKType } from "./authz"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** GenesisState defines the authz module's genesis state. */ -export interface GenesisState { - authorization: GrantAuthorization[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the authz module's genesis state. */ -export interface GenesisStateAmino { - authorization: GrantAuthorizationAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the authz module's genesis state. */ -export interface GenesisStateSDKType { - authorization: GrantAuthorizationSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - authorization: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.authz.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.authorization) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorization.push(GrantAuthorization.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - authorization: Array.isArray(object?.authorization) ? object.authorization.map((e: any) => GrantAuthorization.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.authorization) { - obj.authorization = message.authorization.map(e => e ? GrantAuthorization.toJSON(e) : undefined); - } else { - obj.authorization = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.authorization = object.authorization?.map(e => GrantAuthorization.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - authorization: Array.isArray(object?.authorization) ? object.authorization.map((e: any) => GrantAuthorization.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.authorization) { - obj.authorization = message.authorization.map(e => e ? GrantAuthorization.toSDK(e) : undefined); - } else { - obj.authorization = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - authorization: Array.isArray(object?.authorization) ? object.authorization.map((e: any) => GrantAuthorization.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.authorization) { - obj.authorization = message.authorization.map(e => e ? GrantAuthorization.toAmino(e) : undefined); - } else { - obj.authorization = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/query.rpc.Query.ts deleted file mode 100644 index a8639988..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryGrantsRequest, QueryGrantsResponse, QueryGranterGrantsRequest, QueryGranterGrantsResponse, QueryGranteeGrantsRequest, QueryGranteeGrantsResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Returns list of `Authorization`, granted to the grantee by the granter. */ - grants(request: QueryGrantsRequest): Promise; - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.46 - */ - granterGrants(request: QueryGranterGrantsRequest): Promise; - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.46 - */ - granteeGrants(request: QueryGranteeGrantsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.grants = this.grants.bind(this); - this.granterGrants = this.granterGrants.bind(this); - this.granteeGrants = this.granteeGrants.bind(this); - } - grants(request: QueryGrantsRequest): Promise { - const data = QueryGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data); - return promise.then(data => QueryGrantsResponse.decode(new BinaryReader(data))); - } - granterGrants(request: QueryGranterGrantsRequest): Promise { - const data = QueryGranterGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranterGrants", data); - return promise.then(data => QueryGranterGrantsResponse.decode(new BinaryReader(data))); - } - granteeGrants(request: QueryGranteeGrantsRequest): Promise { - const data = QueryGranteeGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranteeGrants", data); - return promise.then(data => QueryGranteeGrantsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - grants(request: QueryGrantsRequest): Promise { - return queryService.grants(request); - }, - granterGrants(request: QueryGranterGrantsRequest): Promise { - return queryService.granterGrants(request); - }, - granteeGrants(request: QueryGranteeGrantsRequest): Promise { - return queryService.granteeGrants(request); - } - }; -}; -export interface UseGrantsQuery extends ReactQueryParams { - request: QueryGrantsRequest; -} -export interface UseGranterGrantsQuery extends ReactQueryParams { - request: QueryGranterGrantsRequest; -} -export interface UseGranteeGrantsQuery extends ReactQueryParams { - request: QueryGranteeGrantsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useGrants = ({ - request, - options - }: UseGrantsQuery) => { - return useQuery(["grantsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.grants(request); - }, options); - }; - const useGranterGrants = ({ - request, - options - }: UseGranterGrantsQuery) => { - return useQuery(["granterGrantsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.granterGrants(request); - }, options); - }; - const useGranteeGrants = ({ - request, - options - }: UseGranteeGrantsQuery) => { - return useQuery(["granteeGrantsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.granteeGrants(request); - }, options); - }; - return { - /** Returns list of `Authorization`, granted to the grantee by the granter. */useGrants, - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.46 - */ - useGranterGrants, - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.46 - */ - useGranteeGrants - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryGrantsStore { - store = new QueryStore(queryService?.grants); - grants(request: QueryGrantsRequest) { - return this.store.getData(request); - } - } - class QueryGranterGrantsStore { - store = new QueryStore(queryService?.granterGrants); - granterGrants(request: QueryGranterGrantsRequest) { - return this.store.getData(request); - } - } - class QueryGranteeGrantsStore { - store = new QueryStore(queryService?.granteeGrants); - granteeGrants(request: QueryGranteeGrantsRequest) { - return this.store.getData(request); - } - } - return { - /** Returns list of `Authorization`, granted to the grantee by the granter. */QueryGrantsStore, - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.46 - */ - QueryGranterGrantsStore, - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.46 - */ - QueryGranteeGrantsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/query.ts deleted file mode 100644 index 4730de75..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/query.ts +++ /dev/null @@ -1,844 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Grant, GrantAmino, GrantSDKType, GrantAuthorization, GrantAuthorizationAmino, GrantAuthorizationSDKType } from "./authz"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ -export interface QueryGrantsRequest { - granter: string; - grantee: string; - /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ - msgTypeUrl: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGrantsRequestProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest"; - value: Uint8Array; -} -/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ -export interface QueryGrantsRequestAmino { - granter: string; - grantee: string; - /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ - msg_type_url: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGrantsRequestAminoMsg { - type: "cosmos-sdk/QueryGrantsRequest"; - value: QueryGrantsRequestAmino; -} -/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ -export interface QueryGrantsRequestSDKType { - granter: string; - grantee: string; - msg_type_url: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ -export interface QueryGrantsResponse { - /** authorizations is a list of grants granted for grantee by granter. */ - grants: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGrantsResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse"; - value: Uint8Array; -} -/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ -export interface QueryGrantsResponseAmino { - /** authorizations is a list of grants granted for grantee by granter. */ - grants: GrantAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGrantsResponseAminoMsg { - type: "cosmos-sdk/QueryGrantsResponse"; - value: QueryGrantsResponseAmino; -} -/** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ -export interface QueryGrantsResponseSDKType { - grants: GrantSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsRequest { - granter: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGranterGrantsRequestProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest"; - value: Uint8Array; -} -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsRequestAmino { - granter: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGranterGrantsRequestAminoMsg { - type: "cosmos-sdk/QueryGranterGrantsRequest"; - value: QueryGranterGrantsRequestAmino; -} -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsRequestSDKType { - granter: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGranterGrantsResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse"; - value: Uint8Array; -} -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsResponseAmino { - /** grants is a list of grants granted by the granter. */ - grants: GrantAuthorizationAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGranterGrantsResponseAminoMsg { - type: "cosmos-sdk/QueryGranterGrantsResponse"; - value: QueryGranterGrantsResponseAmino; -} -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsResponseSDKType { - grants: GrantAuthorizationSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ -export interface QueryGranteeGrantsRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGranteeGrantsRequestProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest"; - value: Uint8Array; -} -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ -export interface QueryGranteeGrantsRequestAmino { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGranteeGrantsRequestAminoMsg { - type: "cosmos-sdk/QueryGranteeGrantsRequest"; - value: QueryGranteeGrantsRequestAmino; -} -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ -export interface QueryGranteeGrantsRequestSDKType { - grantee: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ -export interface QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGranteeGrantsResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse"; - value: Uint8Array; -} -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ -export interface QueryGranteeGrantsResponseAmino { - /** grants is a list of grants granted to the grantee. */ - grants: GrantAuthorizationAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGranteeGrantsResponseAminoMsg { - type: "cosmos-sdk/QueryGranteeGrantsResponse"; - value: QueryGranteeGrantsResponseAmino; -} -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ -export interface QueryGranteeGrantsResponseSDKType { - grants: GrantAuthorizationSDKType[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryGrantsRequest(): QueryGrantsRequest { - return { - granter: "", - grantee: "", - msgTypeUrl: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGrantsRequest = { - typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest", - aminoType: "cosmos-sdk/QueryGrantsRequest", - encode(message: QueryGrantsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.msgTypeUrl !== "") { - writer.uint32(26).string(message.msgTypeUrl); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGrantsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGrantsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGrantsRequest { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - msgTypeUrl: isSet(object.msgTypeUrl) ? String(object.msgTypeUrl) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGrantsRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGrantsRequest { - const message = createBaseQueryGrantsRequest(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.msgTypeUrl = object.msgTypeUrl ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGrantsRequestSDKType): QueryGrantsRequest { - return { - granter: object?.granter, - grantee: object?.grantee, - msgTypeUrl: object?.msg_type_url, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGrantsRequest): QueryGrantsRequestSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.msg_type_url = message.msgTypeUrl; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGrantsRequestAmino): QueryGrantsRequest { - return { - granter: object.granter, - grantee: object.grantee, - msgTypeUrl: object.msg_type_url, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGrantsRequest): QueryGrantsRequestAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.msg_type_url = message.msgTypeUrl; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGrantsRequestAminoMsg): QueryGrantsRequest { - return QueryGrantsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGrantsRequest): QueryGrantsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGrantsRequest", - value: QueryGrantsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGrantsRequestProtoMsg): QueryGrantsRequest { - return QueryGrantsRequest.decode(message.value); - }, - toProto(message: QueryGrantsRequest): Uint8Array { - return QueryGrantsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGrantsRequest): QueryGrantsRequestProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.QueryGrantsRequest", - value: QueryGrantsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGrantsResponse(): QueryGrantsResponse { - return { - grants: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGrantsResponse = { - typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse", - aminoType: "cosmos-sdk/QueryGrantsResponse", - encode(message: QueryGrantsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.grants) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGrantsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGrantsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => Grant.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? Grant.toJSON(e) : undefined); - } else { - obj.grants = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGrantsResponse { - const message = createBaseQueryGrantsResponse(); - message.grants = object.grants?.map(e => Grant.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGrantsResponseSDKType): QueryGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => Grant.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGrantsResponse): QueryGrantsResponseSDKType { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? Grant.toSDK(e) : undefined); - } else { - obj.grants = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGrantsResponseAmino): QueryGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => Grant.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGrantsResponse): QueryGrantsResponseAmino { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? Grant.toAmino(e) : undefined); - } else { - obj.grants = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGrantsResponseAminoMsg): QueryGrantsResponse { - return QueryGrantsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGrantsResponse): QueryGrantsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGrantsResponse", - value: QueryGrantsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGrantsResponseProtoMsg): QueryGrantsResponse { - return QueryGrantsResponse.decode(message.value); - }, - toProto(message: QueryGrantsResponse): Uint8Array { - return QueryGrantsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGrantsResponse): QueryGrantsResponseProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.QueryGrantsResponse", - value: QueryGrantsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { - return { - granter: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGranterGrantsRequest = { - typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest", - aminoType: "cosmos-sdk/QueryGranterGrantsRequest", - encode(message: QueryGranterGrantsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGranterGrantsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranterGrantsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGranterGrantsRequest { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGranterGrantsRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGranterGrantsRequest { - const message = createBaseQueryGranterGrantsRequest(); - message.granter = object.granter ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGranterGrantsRequestSDKType): QueryGranterGrantsRequest { - return { - granter: object?.granter, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestSDKType { - const obj: any = {}; - obj.granter = message.granter; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGranterGrantsRequestAmino): QueryGranterGrantsRequest { - return { - granter: object.granter, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGranterGrantsRequestAminoMsg): QueryGranterGrantsRequest { - return QueryGranterGrantsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGranterGrantsRequest", - value: QueryGranterGrantsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGranterGrantsRequestProtoMsg): QueryGranterGrantsRequest { - return QueryGranterGrantsRequest.decode(message.value); - }, - toProto(message: QueryGranterGrantsRequest): Uint8Array { - return QueryGranterGrantsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGranterGrantsRequest): QueryGranterGrantsRequestProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsRequest", - value: QueryGranterGrantsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { - return { - grants: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGranterGrantsResponse = { - typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse", - aminoType: "cosmos-sdk/QueryGranterGrantsResponse", - encode(message: QueryGranterGrantsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGranterGrantsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranterGrantsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGranterGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => GrantAuthorization.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGranterGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? GrantAuthorization.toJSON(e) : undefined); - } else { - obj.grants = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGranterGrantsResponse { - const message = createBaseQueryGranterGrantsResponse(); - message.grants = object.grants?.map(e => GrantAuthorization.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGranterGrantsResponseSDKType): QueryGranterGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => GrantAuthorization.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseSDKType { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? GrantAuthorization.toSDK(e) : undefined); - } else { - obj.grants = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGranterGrantsResponseAmino): QueryGranterGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => GrantAuthorization.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseAmino { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? GrantAuthorization.toAmino(e) : undefined); - } else { - obj.grants = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGranterGrantsResponseAminoMsg): QueryGranterGrantsResponse { - return QueryGranterGrantsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGranterGrantsResponse", - value: QueryGranterGrantsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGranterGrantsResponseProtoMsg): QueryGranterGrantsResponse { - return QueryGranterGrantsResponse.decode(message.value); - }, - toProto(message: QueryGranterGrantsResponse): Uint8Array { - return QueryGranterGrantsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGranterGrantsResponse): QueryGranterGrantsResponseProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.QueryGranterGrantsResponse", - value: QueryGranterGrantsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { - return { - grantee: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGranteeGrantsRequest = { - typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest", - aminoType: "cosmos-sdk/QueryGranteeGrantsRequest", - encode(message: QueryGranteeGrantsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGranteeGrantsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranteeGrantsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGranteeGrantsRequest { - return { - grantee: isSet(object.grantee) ? String(object.grantee) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGranteeGrantsRequest): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGranteeGrantsRequest { - const message = createBaseQueryGranteeGrantsRequest(); - message.grantee = object.grantee ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGranteeGrantsRequestSDKType): QueryGranteeGrantsRequest { - return { - grantee: object?.grantee, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestSDKType { - const obj: any = {}; - obj.grantee = message.grantee; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGranteeGrantsRequestAmino): QueryGranteeGrantsRequest { - return { - grantee: object.grantee, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestAmino { - const obj: any = {}; - obj.grantee = message.grantee; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGranteeGrantsRequestAminoMsg): QueryGranteeGrantsRequest { - return QueryGranteeGrantsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGranteeGrantsRequest", - value: QueryGranteeGrantsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGranteeGrantsRequestProtoMsg): QueryGranteeGrantsRequest { - return QueryGranteeGrantsRequest.decode(message.value); - }, - toProto(message: QueryGranteeGrantsRequest): Uint8Array { - return QueryGranteeGrantsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGranteeGrantsRequest): QueryGranteeGrantsRequestProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest", - value: QueryGranteeGrantsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { - return { - grants: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGranteeGrantsResponse = { - typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse", - aminoType: "cosmos-sdk/QueryGranteeGrantsResponse", - encode(message: QueryGranteeGrantsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGranteeGrantsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranteeGrantsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGranteeGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => GrantAuthorization.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGranteeGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? GrantAuthorization.toJSON(e) : undefined); - } else { - obj.grants = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGranteeGrantsResponse { - const message = createBaseQueryGranteeGrantsResponse(); - message.grants = object.grants?.map(e => GrantAuthorization.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGranteeGrantsResponseSDKType): QueryGranteeGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => GrantAuthorization.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseSDKType { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? GrantAuthorization.toSDK(e) : undefined); - } else { - obj.grants = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGranteeGrantsResponseAmino): QueryGranteeGrantsResponse { - return { - grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => GrantAuthorization.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseAmino { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map(e => e ? GrantAuthorization.toAmino(e) : undefined); - } else { - obj.grants = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGranteeGrantsResponseAminoMsg): QueryGranteeGrantsResponse { - return QueryGranteeGrantsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGranteeGrantsResponse", - value: QueryGranteeGrantsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGranteeGrantsResponseProtoMsg): QueryGranteeGrantsResponse { - return QueryGranteeGrantsResponse.decode(message.value); - }, - toProto(message: QueryGranteeGrantsResponse): Uint8Array { - return QueryGranteeGrantsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGranteeGrantsResponse): QueryGranteeGrantsResponseProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse", - value: QueryGranteeGrantsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.amino.ts deleted file mode 100644 index dce86d05..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.amino.ts +++ /dev/null @@ -1,19 +0,0 @@ -//@ts-nocheck -import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; -export const AminoConverter = { - "/cosmos.authz.v1beta1.MsgGrant": { - aminoType: "cosmos-sdk/MsgGrant", - toAmino: MsgGrant.toAmino, - fromAmino: MsgGrant.fromAmino - }, - "/cosmos.authz.v1beta1.MsgExec": { - aminoType: "cosmos-sdk/MsgExec", - toAmino: MsgExec.toAmino, - fromAmino: MsgExec.fromAmino - }, - "/cosmos.authz.v1beta1.MsgRevoke": { - aminoType: "cosmos-sdk/MsgRevoke", - toAmino: MsgRevoke.toAmino, - fromAmino: MsgRevoke.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.registry.ts deleted file mode 100644 index c9004e62..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.registry.ts +++ /dev/null @@ -1,111 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - grant(value: MsgGrant) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - value: MsgGrant.encode(value).finish() - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - value: MsgExec.encode(value).finish() - }; - }, - revoke(value: MsgRevoke) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - value: MsgRevoke.encode(value).finish() - }; - } - }, - withTypeUrl: { - grant(value: MsgGrant) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - value - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - value - }; - }, - revoke(value: MsgRevoke) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - value - }; - } - }, - toJSON: { - grant(value: MsgGrant) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - value: MsgGrant.toJSON(value) - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - value: MsgExec.toJSON(value) - }; - }, - revoke(value: MsgRevoke) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - value: MsgRevoke.toJSON(value) - }; - } - }, - fromJSON: { - grant(value: any) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - value: MsgGrant.fromJSON(value) - }; - }, - exec(value: any) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - value: MsgExec.fromJSON(value) - }; - }, - revoke(value: any) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - value: MsgRevoke.fromJSON(value) - }; - } - }, - fromPartial: { - grant(value: MsgGrant) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - value: MsgGrant.fromPartial(value) - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - value: MsgExec.fromPartial(value) - }; - }, - revoke(value: MsgRevoke) { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - value: MsgRevoke.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 4f5bb4ee..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgGrant, MsgGrantResponse, MsgExec, MsgExecResponse, MsgRevoke, MsgRevokeResponse } from "./tx"; -/** Msg defines the authz Msg service. */ -export interface Msg { - /** - * Grant grants the provided authorization to the grantee on the granter's - * account with the provided expiration time. If there is already a grant - * for the given (granter, grantee, Authorization) triple, then the grant - * will be overwritten. - */ - grant(request: MsgGrant): Promise; - /** - * Exec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ - exec(request: MsgExec): Promise; - /** - * Revoke revokes any authorization corresponding to the provided method name on the - * granter's account that has been granted to the grantee. - */ - revoke(request: MsgRevoke): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.grant = this.grant.bind(this); - this.exec = this.exec.bind(this); - this.revoke = this.revoke.bind(this); - } - grant(request: MsgGrant): Promise { - const data = MsgGrant.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Grant", data); - return promise.then(data => MsgGrantResponse.decode(new BinaryReader(data))); - } - exec(request: MsgExec): Promise { - const data = MsgExec.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Exec", data); - return promise.then(data => MsgExecResponse.decode(new BinaryReader(data))); - } - revoke(request: MsgRevoke): Promise { - const data = MsgRevoke.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Revoke", data); - return promise.then(data => MsgRevokeResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.ts deleted file mode 100644 index 6717160e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/authz/v1beta1/tx.ts +++ /dev/null @@ -1,753 +0,0 @@ -import { Grant, GrantAmino, GrantSDKType } from "./authz"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** - * MsgGrant is a request type for Grant method. It declares authorization to the grantee - * on behalf of the granter with the provided expiration time. - */ -export interface MsgGrant { - granter: string; - grantee: string; - grant: Grant | undefined; -} -export interface MsgGrantProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant"; - value: Uint8Array; -} -/** - * MsgGrant is a request type for Grant method. It declares authorization to the grantee - * on behalf of the granter with the provided expiration time. - */ -export interface MsgGrantAmino { - granter: string; - grantee: string; - grant?: GrantAmino | undefined; -} -export interface MsgGrantAminoMsg { - type: "cosmos-sdk/MsgGrant"; - value: MsgGrantAmino; -} -/** - * MsgGrant is a request type for Grant method. It declares authorization to the grantee - * on behalf of the granter with the provided expiration time. - */ -export interface MsgGrantSDKType { - granter: string; - grantee: string; - grant: GrantSDKType | undefined; -} -/** MsgExecResponse defines the Msg/MsgExecResponse response type. */ -export interface MsgExecResponse { - results: Uint8Array[]; -} -export interface MsgExecResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse"; - value: Uint8Array; -} -/** MsgExecResponse defines the Msg/MsgExecResponse response type. */ -export interface MsgExecResponseAmino { - results: Uint8Array[]; -} -export interface MsgExecResponseAminoMsg { - type: "cosmos-sdk/MsgExecResponse"; - value: MsgExecResponseAmino; -} -/** MsgExecResponse defines the Msg/MsgExecResponse response type. */ -export interface MsgExecResponseSDKType { - results: Uint8Array[]; -} -/** - * MsgExec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ -export interface MsgExec { - grantee: string; - /** - * Authorization Msg requests to execute. Each msg must implement Authorization interface - * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - * triple and validate it. - */ - msgs: Any[]; -} -export interface MsgExecProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgExec"; - value: Uint8Array; -} -/** - * MsgExec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ -export interface MsgExecAmino { - grantee: string; - /** - * Authorization Msg requests to execute. Each msg must implement Authorization interface - * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - * triple and validate it. - */ - msgs: AnyAmino[]; -} -export interface MsgExecAminoMsg { - type: "cosmos-sdk/MsgExec"; - value: MsgExecAmino; -} -/** - * MsgExec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ -export interface MsgExecSDKType { - grantee: string; - msgs: AnySDKType[]; -} -/** MsgGrantResponse defines the Msg/MsgGrant response type. */ -export interface MsgGrantResponse {} -export interface MsgGrantResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse"; - value: Uint8Array; -} -/** MsgGrantResponse defines the Msg/MsgGrant response type. */ -export interface MsgGrantResponseAmino {} -export interface MsgGrantResponseAminoMsg { - type: "cosmos-sdk/MsgGrantResponse"; - value: MsgGrantResponseAmino; -} -/** MsgGrantResponse defines the Msg/MsgGrant response type. */ -export interface MsgGrantResponseSDKType {} -/** - * MsgRevoke revokes any authorization with the provided sdk.Msg type on the - * granter's account with that has been granted to the grantee. - */ -export interface MsgRevoke { - granter: string; - grantee: string; - msgTypeUrl: string; -} -export interface MsgRevokeProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke"; - value: Uint8Array; -} -/** - * MsgRevoke revokes any authorization with the provided sdk.Msg type on the - * granter's account with that has been granted to the grantee. - */ -export interface MsgRevokeAmino { - granter: string; - grantee: string; - msg_type_url: string; -} -export interface MsgRevokeAminoMsg { - type: "cosmos-sdk/MsgRevoke"; - value: MsgRevokeAmino; -} -/** - * MsgRevoke revokes any authorization with the provided sdk.Msg type on the - * granter's account with that has been granted to the grantee. - */ -export interface MsgRevokeSDKType { - granter: string; - grantee: string; - msg_type_url: string; -} -/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ -export interface MsgRevokeResponse {} -export interface MsgRevokeResponseProtoMsg { - typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse"; - value: Uint8Array; -} -/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ -export interface MsgRevokeResponseAmino {} -export interface MsgRevokeResponseAminoMsg { - type: "cosmos-sdk/MsgRevokeResponse"; - value: MsgRevokeResponseAmino; -} -/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ -export interface MsgRevokeResponseSDKType {} -function createBaseMsgGrant(): MsgGrant { - return { - granter: "", - grantee: "", - grant: Grant.fromPartial({}) - }; -} -export const MsgGrant = { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - aminoType: "cosmos-sdk/MsgGrant", - encode(message: MsgGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.grant !== undefined) { - Grant.encode(message.grant, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgGrant { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgGrant(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.grant = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgGrant { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - grant: isSet(object.grant) ? Grant.fromJSON(object.grant) : undefined - }; - }, - toJSON(message: MsgGrant): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.grant !== undefined && (obj.grant = message.grant ? Grant.toJSON(message.grant) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgGrant { - const message = createBaseMsgGrant(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.grant = object.grant !== undefined && object.grant !== null ? Grant.fromPartial(object.grant) : undefined; - return message; - }, - fromSDK(object: MsgGrantSDKType): MsgGrant { - return { - granter: object?.granter, - grantee: object?.grantee, - grant: object.grant ? Grant.fromSDK(object.grant) : undefined - }; - }, - toSDK(message: MsgGrant): MsgGrantSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - message.grant !== undefined && (obj.grant = message.grant ? Grant.toSDK(message.grant) : undefined); - return obj; - }, - fromAmino(object: MsgGrantAmino): MsgGrant { - return { - granter: object.granter, - grantee: object.grantee, - grant: object?.grant ? Grant.fromAmino(object.grant) : undefined - }; - }, - toAmino(message: MsgGrant): MsgGrantAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.grant = message.grant ? Grant.toAmino(message.grant) : undefined; - return obj; - }, - fromAminoMsg(object: MsgGrantAminoMsg): MsgGrant { - return MsgGrant.fromAmino(object.value); - }, - toAminoMsg(message: MsgGrant): MsgGrantAminoMsg { - return { - type: "cosmos-sdk/MsgGrant", - value: MsgGrant.toAmino(message) - }; - }, - fromProtoMsg(message: MsgGrantProtoMsg): MsgGrant { - return MsgGrant.decode(message.value); - }, - toProto(message: MsgGrant): Uint8Array { - return MsgGrant.encode(message).finish(); - }, - toProtoMsg(message: MsgGrant): MsgGrantProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrant", - value: MsgGrant.encode(message).finish() - }; - } -}; -function createBaseMsgExecResponse(): MsgExecResponse { - return { - results: [] - }; -} -export const MsgExecResponse = { - typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", - aminoType: "cosmos-sdk/MsgExecResponse", - encode(message: MsgExecResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.results) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.results.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExecResponse { - return { - results: Array.isArray(object?.results) ? object.results.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: MsgExecResponse): unknown { - const obj: any = {}; - if (message.results) { - obj.results = message.results.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.results = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgExecResponse { - const message = createBaseMsgExecResponse(); - message.results = object.results?.map(e => e) || []; - return message; - }, - fromSDK(object: MsgExecResponseSDKType): MsgExecResponse { - return { - results: Array.isArray(object?.results) ? object.results.map((e: any) => e) : [] - }; - }, - toSDK(message: MsgExecResponse): MsgExecResponseSDKType { - const obj: any = {}; - if (message.results) { - obj.results = message.results.map(e => e); - } else { - obj.results = []; - } - return obj; - }, - fromAmino(object: MsgExecResponseAmino): MsgExecResponse { - return { - results: Array.isArray(object?.results) ? object.results.map((e: any) => e) : [] - }; - }, - toAmino(message: MsgExecResponse): MsgExecResponseAmino { - const obj: any = {}; - if (message.results) { - obj.results = message.results.map(e => e); - } else { - obj.results = []; - } - return obj; - }, - fromAminoMsg(object: MsgExecResponseAminoMsg): MsgExecResponse { - return MsgExecResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExecResponse): MsgExecResponseAminoMsg { - return { - type: "cosmos-sdk/MsgExecResponse", - value: MsgExecResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecResponseProtoMsg): MsgExecResponse { - return MsgExecResponse.decode(message.value); - }, - toProto(message: MsgExecResponse): Uint8Array { - return MsgExecResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExecResponse): MsgExecResponseProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse", - value: MsgExecResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExec(): MsgExec { - return { - grantee: "", - msgs: [] - }; -} -export const MsgExec = { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - aminoType: "cosmos-sdk/MsgExec", - encode(message: MsgExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - for (const v of message.msgs) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExec { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.msgs.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExec { - return { - grantee: isSet(object.grantee) ? String(object.grantee) : "", - msgs: Array.isArray(object?.msgs) ? object.msgs.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgExec): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.msgs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgExec { - const message = createBaseMsgExec(); - message.grantee = object.grantee ?? ""; - message.msgs = object.msgs?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgExecSDKType): MsgExec { - return { - grantee: object?.grantee, - msgs: Array.isArray(object?.msgs) ? object.msgs.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgExec): MsgExecSDKType { - const obj: any = {}; - obj.grantee = message.grantee; - if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.msgs = []; - } - return obj; - }, - fromAmino(object: MsgExecAmino): MsgExec { - return { - grantee: object.grantee, - msgs: Array.isArray(object?.msgs) ? object.msgs.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgExec): MsgExecAmino { - const obj: any = {}; - obj.grantee = message.grantee; - if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.msgs = []; - } - return obj; - }, - fromAminoMsg(object: MsgExecAminoMsg): MsgExec { - return MsgExec.fromAmino(object.value); - }, - toAminoMsg(message: MsgExec): MsgExecAminoMsg { - return { - type: "cosmos-sdk/MsgExec", - value: MsgExec.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecProtoMsg): MsgExec { - return MsgExec.decode(message.value); - }, - toProto(message: MsgExec): Uint8Array { - return MsgExec.encode(message).finish(); - }, - toProtoMsg(message: MsgExec): MsgExecProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgExec", - value: MsgExec.encode(message).finish() - }; - } -}; -function createBaseMsgGrantResponse(): MsgGrantResponse { - return {}; -} -export const MsgGrantResponse = { - typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", - aminoType: "cosmos-sdk/MsgGrantResponse", - encode(_: MsgGrantResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgGrantResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgGrantResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgGrantResponse { - return {}; - }, - toJSON(_: MsgGrantResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgGrantResponse { - const message = createBaseMsgGrantResponse(); - return message; - }, - fromSDK(_: MsgGrantResponseSDKType): MsgGrantResponse { - return {}; - }, - toSDK(_: MsgGrantResponse): MsgGrantResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgGrantResponseAmino): MsgGrantResponse { - return {}; - }, - toAmino(_: MsgGrantResponse): MsgGrantResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgGrantResponseAminoMsg): MsgGrantResponse { - return MsgGrantResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgGrantResponse): MsgGrantResponseAminoMsg { - return { - type: "cosmos-sdk/MsgGrantResponse", - value: MsgGrantResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgGrantResponseProtoMsg): MsgGrantResponse { - return MsgGrantResponse.decode(message.value); - }, - toProto(message: MsgGrantResponse): Uint8Array { - return MsgGrantResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgGrantResponse): MsgGrantResponseProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse", - value: MsgGrantResponse.encode(message).finish() - }; - } -}; -function createBaseMsgRevoke(): MsgRevoke { - return { - granter: "", - grantee: "", - msgTypeUrl: "" - }; -} -export const MsgRevoke = { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - aminoType: "cosmos-sdk/MsgRevoke", - encode(message: MsgRevoke, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.msgTypeUrl !== "") { - writer.uint32(26).string(message.msgTypeUrl); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgRevoke { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRevoke(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.msgTypeUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgRevoke { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - msgTypeUrl: isSet(object.msgTypeUrl) ? String(object.msgTypeUrl) : "" - }; - }, - toJSON(message: MsgRevoke): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - return obj; - }, - fromPartial(object: DeepPartial): MsgRevoke { - const message = createBaseMsgRevoke(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.msgTypeUrl = object.msgTypeUrl ?? ""; - return message; - }, - fromSDK(object: MsgRevokeSDKType): MsgRevoke { - return { - granter: object?.granter, - grantee: object?.grantee, - msgTypeUrl: object?.msg_type_url - }; - }, - toSDK(message: MsgRevoke): MsgRevokeSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.msg_type_url = message.msgTypeUrl; - return obj; - }, - fromAmino(object: MsgRevokeAmino): MsgRevoke { - return { - granter: object.granter, - grantee: object.grantee, - msgTypeUrl: object.msg_type_url - }; - }, - toAmino(message: MsgRevoke): MsgRevokeAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.msg_type_url = message.msgTypeUrl; - return obj; - }, - fromAminoMsg(object: MsgRevokeAminoMsg): MsgRevoke { - return MsgRevoke.fromAmino(object.value); - }, - toAminoMsg(message: MsgRevoke): MsgRevokeAminoMsg { - return { - type: "cosmos-sdk/MsgRevoke", - value: MsgRevoke.toAmino(message) - }; - }, - fromProtoMsg(message: MsgRevokeProtoMsg): MsgRevoke { - return MsgRevoke.decode(message.value); - }, - toProto(message: MsgRevoke): Uint8Array { - return MsgRevoke.encode(message).finish(); - }, - toProtoMsg(message: MsgRevoke): MsgRevokeProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", - value: MsgRevoke.encode(message).finish() - }; - } -}; -function createBaseMsgRevokeResponse(): MsgRevokeResponse { - return {}; -} -export const MsgRevokeResponse = { - typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", - aminoType: "cosmos-sdk/MsgRevokeResponse", - encode(_: MsgRevokeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgRevokeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRevokeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgRevokeResponse { - return {}; - }, - toJSON(_: MsgRevokeResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgRevokeResponse { - const message = createBaseMsgRevokeResponse(); - return message; - }, - fromSDK(_: MsgRevokeResponseSDKType): MsgRevokeResponse { - return {}; - }, - toSDK(_: MsgRevokeResponse): MsgRevokeResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgRevokeResponseAmino): MsgRevokeResponse { - return {}; - }, - toAmino(_: MsgRevokeResponse): MsgRevokeResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgRevokeResponseAminoMsg): MsgRevokeResponse { - return MsgRevokeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgRevokeResponse): MsgRevokeResponseAminoMsg { - return { - type: "cosmos-sdk/MsgRevokeResponse", - value: MsgRevokeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgRevokeResponseProtoMsg): MsgRevokeResponse { - return MsgRevokeResponse.decode(message.value); - }, - toProto(message: MsgRevokeResponse): Uint8Array { - return MsgRevokeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgRevokeResponse): MsgRevokeResponseProtoMsg { - return { - typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse", - value: MsgRevokeResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/authz.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/authz.ts deleted file mode 100644 index 4a5d18a7..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/authz.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** - * SendAuthorization allows the grantee to spend up to spend_limit coins from - * the granter's account. - * - * Since: cosmos-sdk 0.43 - */ -export interface SendAuthorization { - spendLimit: Coin[]; -} -export interface SendAuthorizationProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.SendAuthorization"; - value: Uint8Array; -} -/** - * SendAuthorization allows the grantee to spend up to spend_limit coins from - * the granter's account. - * - * Since: cosmos-sdk 0.43 - */ -export interface SendAuthorizationAmino { - spend_limit: CoinAmino[]; -} -export interface SendAuthorizationAminoMsg { - type: "cosmos-sdk/SendAuthorization"; - value: SendAuthorizationAmino; -} -/** - * SendAuthorization allows the grantee to spend up to spend_limit coins from - * the granter's account. - * - * Since: cosmos-sdk 0.43 - */ -export interface SendAuthorizationSDKType { - spend_limit: CoinSDKType[]; -} -function createBaseSendAuthorization(): SendAuthorization { - return { - spendLimit: [] - }; -} -export const SendAuthorization = { - typeUrl: "/cosmos.bank.v1beta1.SendAuthorization", - aminoType: "cosmos-sdk/SendAuthorization", - encode(message: SendAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.spendLimit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SendAuthorization { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSendAuthorization(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spendLimit.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SendAuthorization { - return { - spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: SendAuthorization): unknown { - const obj: any = {}; - if (message.spendLimit) { - obj.spendLimit = message.spendLimit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.spendLimit = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SendAuthorization { - const message = createBaseSendAuthorization(); - message.spendLimit = object.spendLimit?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SendAuthorizationSDKType): SendAuthorization { - return { - spendLimit: Array.isArray(object?.spend_limit) ? object.spend_limit.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: SendAuthorization): SendAuthorizationSDKType { - const obj: any = {}; - if (message.spendLimit) { - obj.spend_limit = message.spendLimit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.spend_limit = []; - } - return obj; - }, - fromAmino(object: SendAuthorizationAmino): SendAuthorization { - return { - spendLimit: Array.isArray(object?.spend_limit) ? object.spend_limit.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: SendAuthorization): SendAuthorizationAmino { - const obj: any = {}; - if (message.spendLimit) { - obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.spend_limit = []; - } - return obj; - }, - fromAminoMsg(object: SendAuthorizationAminoMsg): SendAuthorization { - return SendAuthorization.fromAmino(object.value); - }, - toAminoMsg(message: SendAuthorization): SendAuthorizationAminoMsg { - return { - type: "cosmos-sdk/SendAuthorization", - value: SendAuthorization.toAmino(message) - }; - }, - fromProtoMsg(message: SendAuthorizationProtoMsg): SendAuthorization { - return SendAuthorization.decode(message.value); - }, - toProto(message: SendAuthorization): Uint8Array { - return SendAuthorization.encode(message).finish(); - }, - toProtoMsg(message: SendAuthorization): SendAuthorizationProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.SendAuthorization", - value: SendAuthorization.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/bank.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/bank.ts deleted file mode 100644 index 5e8a752e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/bank.ts +++ /dev/null @@ -1,1168 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Params defines the parameters for the bank module. */ -export interface Params { - sendEnabled: SendEnabled[]; - defaultSendEnabled: boolean; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the parameters for the bank module. */ -export interface ParamsAmino { - send_enabled: SendEnabledAmino[]; - default_send_enabled: boolean; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params defines the parameters for the bank module. */ -export interface ParamsSDKType { - send_enabled: SendEnabledSDKType[]; - default_send_enabled: boolean; -} -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabled { - denom: string; - enabled: boolean; -} -export interface SendEnabledProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.SendEnabled"; - value: Uint8Array; -} -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabledAmino { - denom: string; - enabled: boolean; -} -export interface SendEnabledAminoMsg { - type: "cosmos-sdk/SendEnabled"; - value: SendEnabledAmino; -} -/** - * SendEnabled maps coin denom to a send_enabled status (whether a denom is - * sendable). - */ -export interface SendEnabledSDKType { - denom: string; - enabled: boolean; -} -/** Input models transaction input. */ -export interface Input { - address: string; - coins: Coin[]; -} -export interface InputProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Input"; - value: Uint8Array; -} -/** Input models transaction input. */ -export interface InputAmino { - address: string; - coins: CoinAmino[]; -} -export interface InputAminoMsg { - type: "cosmos-sdk/Input"; - value: InputAmino; -} -/** Input models transaction input. */ -export interface InputSDKType { - address: string; - coins: CoinSDKType[]; -} -/** Output models transaction outputs. */ -export interface Output { - address: string; - coins: Coin[]; -} -export interface OutputProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Output"; - value: Uint8Array; -} -/** Output models transaction outputs. */ -export interface OutputAmino { - address: string; - coins: CoinAmino[]; -} -export interface OutputAminoMsg { - type: "cosmos-sdk/Output"; - value: OutputAmino; -} -/** Output models transaction outputs. */ -export interface OutputSDKType { - address: string; - coins: CoinSDKType[]; -} -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - */ -/** @deprecated */ -export interface Supply { - total: Coin[]; -} -export interface SupplyProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Supply"; - value: Uint8Array; -} -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - */ -/** @deprecated */ -export interface SupplyAmino { - total: CoinAmino[]; -} -export interface SupplyAminoMsg { - type: "cosmos-sdk/Supply"; - value: SupplyAmino; -} -/** - * Supply represents a struct that passively keeps track of the total supply - * amounts in the network. - * This message is deprecated now that supply is indexed by denom. - */ -/** @deprecated */ -export interface SupplySDKType { - total: CoinSDKType[]; -} -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnit { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * exponent represents power of 10 exponent that one must - * raise the base_denom to in order to equal the given DenomUnit's denom - * 1 denom = 10^exponent base_denom - * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - * exponent = 6, thus: 1 atom = 10^6 uatom). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} -export interface DenomUnitProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.DenomUnit"; - value: Uint8Array; -} -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnitAmino { - /** denom represents the string name of the given denom unit (e.g uatom). */ - denom: string; - /** - * exponent represents power of 10 exponent that one must - * raise the base_denom to in order to equal the given DenomUnit's denom - * 1 denom = 10^exponent base_denom - * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - * exponent = 6, thus: 1 atom = 10^6 uatom). - */ - exponent: number; - /** aliases is a list of string aliases for the given denom */ - aliases: string[]; -} -export interface DenomUnitAminoMsg { - type: "cosmos-sdk/DenomUnit"; - value: DenomUnitAmino; -} -/** - * DenomUnit represents a struct that describes a given - * denomination unit of the basic token. - */ -export interface DenomUnitSDKType { - denom: string; - exponent: number; - aliases: string[]; -} -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface Metadata { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denomUnits: DenomUnit[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; - /** - * name defines the name of the token (eg: Cosmos Atom) - * - * Since: cosmos-sdk 0.43 - */ - name: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol: string; - /** - * URI to a document (on or off-chain) that contains additional information. Optional. - * - * Since: cosmos-sdk 0.46 - */ - uri: string; - /** - * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that - * the document didn't change. Optional. - * - * Since: cosmos-sdk 0.46 - */ - uriHash: string; -} -export interface MetadataProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Metadata"; - value: Uint8Array; -} -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface MetadataAmino { - description: string; - /** denom_units represents the list of DenomUnit's for a given coin */ - denom_units: DenomUnitAmino[]; - /** base represents the base denom (should be the DenomUnit with exponent = 0). */ - base: string; - /** - * display indicates the suggested denom that should be - * displayed in clients. - */ - display: string; - /** - * name defines the name of the token (eg: Cosmos Atom) - * - * Since: cosmos-sdk 0.43 - */ - name: string; - /** - * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - * be the same as the display. - * - * Since: cosmos-sdk 0.43 - */ - symbol: string; - /** - * URI to a document (on or off-chain) that contains additional information. Optional. - * - * Since: cosmos-sdk 0.46 - */ - uri: string; - /** - * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that - * the document didn't change. Optional. - * - * Since: cosmos-sdk 0.46 - */ - uri_hash: string; -} -export interface MetadataAminoMsg { - type: "cosmos-sdk/Metadata"; - value: MetadataAmino; -} -/** - * Metadata represents a struct that describes - * a basic token. - */ -export interface MetadataSDKType { - description: string; - denom_units: DenomUnitSDKType[]; - base: string; - display: string; - name: string; - symbol: string; - uri: string; - uri_hash: string; -} -function createBaseParams(): Params { - return { - sendEnabled: [], - defaultSendEnabled: false - }; -} -export const Params = { - typeUrl: "/cosmos.bank.v1beta1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.sendEnabled) { - SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.defaultSendEnabled === true) { - writer.uint32(16).bool(message.defaultSendEnabled); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - sendEnabled: Array.isArray(object?.sendEnabled) ? object.sendEnabled.map((e: any) => SendEnabled.fromJSON(e)) : [], - defaultSendEnabled: isSet(object.defaultSendEnabled) ? Boolean(object.defaultSendEnabled) : false - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.sendEnabled) { - obj.sendEnabled = message.sendEnabled.map(e => e ? SendEnabled.toJSON(e) : undefined); - } else { - obj.sendEnabled = []; - } - message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.sendEnabled = object.sendEnabled?.map(e => SendEnabled.fromPartial(e)) || []; - message.defaultSendEnabled = object.defaultSendEnabled ?? false; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - sendEnabled: Array.isArray(object?.send_enabled) ? object.send_enabled.map((e: any) => SendEnabled.fromSDK(e)) : [], - defaultSendEnabled: object?.default_send_enabled - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - if (message.sendEnabled) { - obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toSDK(e) : undefined); - } else { - obj.send_enabled = []; - } - obj.default_send_enabled = message.defaultSendEnabled; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - sendEnabled: Array.isArray(object?.send_enabled) ? object.send_enabled.map((e: any) => SendEnabled.fromAmino(e)) : [], - defaultSendEnabled: object.default_send_enabled - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - if (message.sendEnabled) { - obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e) : undefined); - } else { - obj.send_enabled = []; - } - obj.default_send_enabled = message.defaultSendEnabled; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseSendEnabled(): SendEnabled { - return { - denom: "", - enabled: false - }; -} -export const SendEnabled = { - typeUrl: "/cosmos.bank.v1beta1.SendEnabled", - aminoType: "cosmos-sdk/SendEnabled", - encode(message: SendEnabled, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.enabled === true) { - writer.uint32(16).bool(message.enabled); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SendEnabled { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSendEnabled(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SendEnabled { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - enabled: isSet(object.enabled) ? Boolean(object.enabled) : false - }; - }, - toJSON(message: SendEnabled): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.enabled !== undefined && (obj.enabled = message.enabled); - return obj; - }, - fromPartial(object: DeepPartial): SendEnabled { - const message = createBaseSendEnabled(); - message.denom = object.denom ?? ""; - message.enabled = object.enabled ?? false; - return message; - }, - fromSDK(object: SendEnabledSDKType): SendEnabled { - return { - denom: object?.denom, - enabled: object?.enabled - }; - }, - toSDK(message: SendEnabled): SendEnabledSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.enabled = message.enabled; - return obj; - }, - fromAmino(object: SendEnabledAmino): SendEnabled { - return { - denom: object.denom, - enabled: object.enabled - }; - }, - toAmino(message: SendEnabled): SendEnabledAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.enabled = message.enabled; - return obj; - }, - fromAminoMsg(object: SendEnabledAminoMsg): SendEnabled { - return SendEnabled.fromAmino(object.value); - }, - toAminoMsg(message: SendEnabled): SendEnabledAminoMsg { - return { - type: "cosmos-sdk/SendEnabled", - value: SendEnabled.toAmino(message) - }; - }, - fromProtoMsg(message: SendEnabledProtoMsg): SendEnabled { - return SendEnabled.decode(message.value); - }, - toProto(message: SendEnabled): Uint8Array { - return SendEnabled.encode(message).finish(); - }, - toProtoMsg(message: SendEnabled): SendEnabledProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.SendEnabled", - value: SendEnabled.encode(message).finish() - }; - } -}; -function createBaseInput(): Input { - return { - address: "", - coins: [] - }; -} -export const Input = { - typeUrl: "/cosmos.bank.v1beta1.Input", - aminoType: "cosmos-sdk/Input", - encode(message: Input, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Input { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Input { - return { - address: isSet(object.address) ? String(object.address) : "", - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Input): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Input { - const message = createBaseInput(); - message.address = object.address ?? ""; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: InputSDKType): Input { - return { - address: object?.address, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Input): InputSDKType { - const obj: any = {}; - obj.address = message.address; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: InputAmino): Input { - return { - address: object.address, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Input): InputAmino { - const obj: any = {}; - obj.address = message.address; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: InputAminoMsg): Input { - return Input.fromAmino(object.value); - }, - toAminoMsg(message: Input): InputAminoMsg { - return { - type: "cosmos-sdk/Input", - value: Input.toAmino(message) - }; - }, - fromProtoMsg(message: InputProtoMsg): Input { - return Input.decode(message.value); - }, - toProto(message: Input): Uint8Array { - return Input.encode(message).finish(); - }, - toProtoMsg(message: Input): InputProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.Input", - value: Input.encode(message).finish() - }; - } -}; -function createBaseOutput(): Output { - return { - address: "", - coins: [] - }; -} -export const Output = { - typeUrl: "/cosmos.bank.v1beta1.Output", - aminoType: "cosmos-sdk/Output", - encode(message: Output, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Output { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOutput(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Output { - return { - address: isSet(object.address) ? String(object.address) : "", - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Output): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Output { - const message = createBaseOutput(); - message.address = object.address ?? ""; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: OutputSDKType): Output { - return { - address: object?.address, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Output): OutputSDKType { - const obj: any = {}; - obj.address = message.address; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: OutputAmino): Output { - return { - address: object.address, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Output): OutputAmino { - const obj: any = {}; - obj.address = message.address; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: OutputAminoMsg): Output { - return Output.fromAmino(object.value); - }, - toAminoMsg(message: Output): OutputAminoMsg { - return { - type: "cosmos-sdk/Output", - value: Output.toAmino(message) - }; - }, - fromProtoMsg(message: OutputProtoMsg): Output { - return Output.decode(message.value); - }, - toProto(message: Output): Uint8Array { - return Output.encode(message).finish(); - }, - toProtoMsg(message: Output): OutputProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.Output", - value: Output.encode(message).finish() - }; - } -}; -function createBaseSupply(): Supply { - return { - total: [] - }; -} -export const Supply = { - typeUrl: "/cosmos.bank.v1beta1.Supply", - aminoType: "cosmos-sdk/Supply", - encode(message: Supply, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.total) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Supply { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSupply(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Supply { - return { - total: Array.isArray(object?.total) ? object.total.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Supply): unknown { - const obj: any = {}; - if (message.total) { - obj.total = message.total.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.total = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Supply { - const message = createBaseSupply(); - message.total = object.total?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SupplySDKType): Supply { - return { - total: Array.isArray(object?.total) ? object.total.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Supply): SupplySDKType { - const obj: any = {}; - if (message.total) { - obj.total = message.total.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total = []; - } - return obj; - }, - fromAmino(object: SupplyAmino): Supply { - return { - total: Array.isArray(object?.total) ? object.total.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Supply): SupplyAmino { - const obj: any = {}; - if (message.total) { - obj.total = message.total.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total = []; - } - return obj; - }, - fromAminoMsg(object: SupplyAminoMsg): Supply { - return Supply.fromAmino(object.value); - }, - toAminoMsg(message: Supply): SupplyAminoMsg { - return { - type: "cosmos-sdk/Supply", - value: Supply.toAmino(message) - }; - }, - fromProtoMsg(message: SupplyProtoMsg): Supply { - return Supply.decode(message.value); - }, - toProto(message: Supply): Uint8Array { - return Supply.encode(message).finish(); - }, - toProtoMsg(message: Supply): SupplyProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.Supply", - value: Supply.encode(message).finish() - }; - } -}; -function createBaseDenomUnit(): DenomUnit { - return { - denom: "", - exponent: 0, - aliases: [] - }; -} -export const DenomUnit = { - typeUrl: "/cosmos.bank.v1beta1.DenomUnit", - aminoType: "cosmos-sdk/DenomUnit", - encode(message: DenomUnit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.exponent !== 0) { - writer.uint32(16).uint32(message.exponent); - } - for (const v of message.aliases) { - writer.uint32(26).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DenomUnit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDenomUnit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DenomUnit { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - exponent: isSet(object.exponent) ? Number(object.exponent) : 0, - aliases: Array.isArray(object?.aliases) ? object.aliases.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: DenomUnit): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.exponent !== undefined && (obj.exponent = Math.round(message.exponent)); - if (message.aliases) { - obj.aliases = message.aliases.map(e => e); - } else { - obj.aliases = []; - } - return obj; - }, - fromPartial(object: DeepPartial): DenomUnit { - const message = createBaseDenomUnit(); - message.denom = object.denom ?? ""; - message.exponent = object.exponent ?? 0; - message.aliases = object.aliases?.map(e => e) || []; - return message; - }, - fromSDK(object: DenomUnitSDKType): DenomUnit { - return { - denom: object?.denom, - exponent: object?.exponent, - aliases: Array.isArray(object?.aliases) ? object.aliases.map((e: any) => e) : [] - }; - }, - toSDK(message: DenomUnit): DenomUnitSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.exponent = message.exponent; - if (message.aliases) { - obj.aliases = message.aliases.map(e => e); - } else { - obj.aliases = []; - } - return obj; - }, - fromAmino(object: DenomUnitAmino): DenomUnit { - return { - denom: object.denom, - exponent: object.exponent, - aliases: Array.isArray(object?.aliases) ? object.aliases.map((e: any) => e) : [] - }; - }, - toAmino(message: DenomUnit): DenomUnitAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.exponent = message.exponent; - if (message.aliases) { - obj.aliases = message.aliases.map(e => e); - } else { - obj.aliases = []; - } - return obj; - }, - fromAminoMsg(object: DenomUnitAminoMsg): DenomUnit { - return DenomUnit.fromAmino(object.value); - }, - toAminoMsg(message: DenomUnit): DenomUnitAminoMsg { - return { - type: "cosmos-sdk/DenomUnit", - value: DenomUnit.toAmino(message) - }; - }, - fromProtoMsg(message: DenomUnitProtoMsg): DenomUnit { - return DenomUnit.decode(message.value); - }, - toProto(message: DenomUnit): Uint8Array { - return DenomUnit.encode(message).finish(); - }, - toProtoMsg(message: DenomUnit): DenomUnitProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.DenomUnit", - value: DenomUnit.encode(message).finish() - }; - } -}; -function createBaseMetadata(): Metadata { - return { - description: "", - denomUnits: [], - base: "", - display: "", - name: "", - symbol: "", - uri: "", - uriHash: "" - }; -} -export const Metadata = { - typeUrl: "/cosmos.bank.v1beta1.Metadata", - aminoType: "cosmos-sdk/Metadata", - encode(message: Metadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.description !== "") { - writer.uint32(10).string(message.description); - } - for (const v of message.denomUnits) { - DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.base !== "") { - writer.uint32(26).string(message.base); - } - if (message.display !== "") { - writer.uint32(34).string(message.display); - } - if (message.name !== "") { - writer.uint32(42).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(50).string(message.symbol); - } - if (message.uri !== "") { - writer.uint32(58).string(message.uri); - } - if (message.uriHash !== "") { - writer.uint32(66).string(message.uriHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Metadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - message.denomUnits.push(DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.symbol = reader.string(); - break; - case 7: - message.uri = reader.string(); - break; - case 8: - message.uriHash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Metadata { - return { - description: isSet(object.description) ? String(object.description) : "", - denomUnits: Array.isArray(object?.denomUnits) ? object.denomUnits.map((e: any) => DenomUnit.fromJSON(e)) : [], - base: isSet(object.base) ? String(object.base) : "", - display: isSet(object.display) ? String(object.display) : "", - name: isSet(object.name) ? String(object.name) : "", - symbol: isSet(object.symbol) ? String(object.symbol) : "", - uri: isSet(object.uri) ? String(object.uri) : "", - uriHash: isSet(object.uriHash) ? String(object.uriHash) : "" - }; - }, - toJSON(message: Metadata): unknown { - const obj: any = {}; - message.description !== undefined && (obj.description = message.description); - if (message.denomUnits) { - obj.denomUnits = message.denomUnits.map(e => e ? DenomUnit.toJSON(e) : undefined); - } else { - obj.denomUnits = []; - } - message.base !== undefined && (obj.base = message.base); - message.display !== undefined && (obj.display = message.display); - message.name !== undefined && (obj.name = message.name); - message.symbol !== undefined && (obj.symbol = message.symbol); - message.uri !== undefined && (obj.uri = message.uri); - message.uriHash !== undefined && (obj.uriHash = message.uriHash); - return obj; - }, - fromPartial(object: DeepPartial): Metadata { - const message = createBaseMetadata(); - message.description = object.description ?? ""; - message.denomUnits = object.denomUnits?.map(e => DenomUnit.fromPartial(e)) || []; - message.base = object.base ?? ""; - message.display = object.display ?? ""; - message.name = object.name ?? ""; - message.symbol = object.symbol ?? ""; - message.uri = object.uri ?? ""; - message.uriHash = object.uriHash ?? ""; - return message; - }, - fromSDK(object: MetadataSDKType): Metadata { - return { - description: object?.description, - denomUnits: Array.isArray(object?.denom_units) ? object.denom_units.map((e: any) => DenomUnit.fromSDK(e)) : [], - base: object?.base, - display: object?.display, - name: object?.name, - symbol: object?.symbol, - uri: object?.uri, - uriHash: object?.uri_hash - }; - }, - toSDK(message: Metadata): MetadataSDKType { - const obj: any = {}; - obj.description = message.description; - if (message.denomUnits) { - obj.denom_units = message.denomUnits.map(e => e ? DenomUnit.toSDK(e) : undefined); - } else { - obj.denom_units = []; - } - obj.base = message.base; - obj.display = message.display; - obj.name = message.name; - obj.symbol = message.symbol; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - return obj; - }, - fromAmino(object: MetadataAmino): Metadata { - return { - description: object.description, - denomUnits: Array.isArray(object?.denom_units) ? object.denom_units.map((e: any) => DenomUnit.fromAmino(e)) : [], - base: object.base, - display: object.display, - name: object.name, - symbol: object.symbol, - uri: object.uri, - uriHash: object.uri_hash - }; - }, - toAmino(message: Metadata): MetadataAmino { - const obj: any = {}; - obj.description = message.description; - if (message.denomUnits) { - obj.denom_units = message.denomUnits.map(e => e ? DenomUnit.toAmino(e) : undefined); - } else { - obj.denom_units = []; - } - obj.base = message.base; - obj.display = message.display; - obj.name = message.name; - obj.symbol = message.symbol; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - return obj; - }, - fromAminoMsg(object: MetadataAminoMsg): Metadata { - return Metadata.fromAmino(object.value); - }, - toAminoMsg(message: Metadata): MetadataAminoMsg { - return { - type: "cosmos-sdk/Metadata", - value: Metadata.toAmino(message) - }; - }, - fromProtoMsg(message: MetadataProtoMsg): Metadata { - return Metadata.decode(message.value); - }, - toProto(message: Metadata): Uint8Array { - return Metadata.encode(message).finish(); - }, - toProtoMsg(message: Metadata): MetadataProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.Metadata", - value: Metadata.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/genesis.ts deleted file mode 100644 index 51aa9f79..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/genesis.ts +++ /dev/null @@ -1,363 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType, Metadata, MetadataAmino, MetadataSDKType } from "./bank"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** balances is an array containing the balances of all the accounts. */ - balances: Balance[]; - /** - * supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - * balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - */ - supply: Coin[]; - /** denom_metadata defines the metadata of the differents coins. */ - denomMetadata: Metadata[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisStateAmino { - /** params defines all the paramaters of the module. */ - params?: ParamsAmino | undefined; - /** balances is an array containing the balances of all the accounts. */ - balances: BalanceAmino[]; - /** - * supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - * balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - */ - supply: CoinAmino[]; - /** denom_metadata defines the metadata of the differents coins. */ - denom_metadata: MetadataAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the bank module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - balances: BalanceSDKType[]; - supply: CoinSDKType[]; - denom_metadata: MetadataSDKType[]; -} -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface Balance { - /** address is the address of the balance holder. */ - address: string; - /** coins defines the different coins this balance holds. */ - coins: Coin[]; -} -export interface BalanceProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.Balance"; - value: Uint8Array; -} -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface BalanceAmino { - /** address is the address of the balance holder. */ - address: string; - /** coins defines the different coins this balance holds. */ - coins: CoinAmino[]; -} -export interface BalanceAminoMsg { - type: "cosmos-sdk/Balance"; - value: BalanceAmino; -} -/** - * Balance defines an account address and balance pair used in the bank module's - * genesis state. - */ -export interface BalanceSDKType { - address: string; - coins: CoinSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - balances: [], - supply: [], - denomMetadata: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.bank.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.balances) { - Balance.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.supply) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.denomMetadata) { - Metadata.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.balances.push(Balance.decode(reader, reader.uint32())); - break; - case 3: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.denomMetadata.push(Metadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Balance.fromJSON(e)) : [], - supply: Array.isArray(object?.supply) ? object.supply.map((e: any) => Coin.fromJSON(e)) : [], - denomMetadata: Array.isArray(object?.denomMetadata) ? object.denomMetadata.map((e: any) => Metadata.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.balances) { - obj.balances = message.balances.map(e => e ? Balance.toJSON(e) : undefined); - } else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.supply = []; - } - if (message.denomMetadata) { - obj.denomMetadata = message.denomMetadata.map(e => e ? Metadata.toJSON(e) : undefined); - } else { - obj.denomMetadata = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.balances = object.balances?.map(e => Balance.fromPartial(e)) || []; - message.supply = object.supply?.map(e => Coin.fromPartial(e)) || []; - message.denomMetadata = object.denomMetadata?.map(e => Metadata.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Balance.fromSDK(e)) : [], - supply: Array.isArray(object?.supply) ? object.supply.map((e: any) => Coin.fromSDK(e)) : [], - denomMetadata: Array.isArray(object?.denom_metadata) ? object.denom_metadata.map((e: any) => Metadata.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.balances) { - obj.balances = message.balances.map(e => e ? Balance.toSDK(e) : undefined); - } else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.supply = []; - } - if (message.denomMetadata) { - obj.denom_metadata = message.denomMetadata.map(e => e ? Metadata.toSDK(e) : undefined); - } else { - obj.denom_metadata = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Balance.fromAmino(e)) : [], - supply: Array.isArray(object?.supply) ? object.supply.map((e: any) => Coin.fromAmino(e)) : [], - denomMetadata: Array.isArray(object?.denom_metadata) ? object.denom_metadata.map((e: any) => Metadata.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Balance.toAmino(e) : undefined); - } else { - obj.balances = []; - } - if (message.supply) { - obj.supply = message.supply.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.supply = []; - } - if (message.denomMetadata) { - obj.denom_metadata = message.denomMetadata.map(e => e ? Metadata.toAmino(e) : undefined); - } else { - obj.denom_metadata = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseBalance(): Balance { - return { - address: "", - coins: [] - }; -} -export const Balance = { - typeUrl: "/cosmos.bank.v1beta1.Balance", - aminoType: "cosmos-sdk/Balance", - encode(message: Balance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Balance { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBalance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Balance { - return { - address: isSet(object.address) ? String(object.address) : "", - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Balance): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Balance { - const message = createBaseBalance(); - message.address = object.address ?? ""; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: BalanceSDKType): Balance { - return { - address: object?.address, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Balance): BalanceSDKType { - const obj: any = {}; - obj.address = message.address; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: BalanceAmino): Balance { - return { - address: object.address, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Balance): BalanceAmino { - const obj: any = {}; - obj.address = message.address; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: BalanceAminoMsg): Balance { - return Balance.fromAmino(object.value); - }, - toAminoMsg(message: Balance): BalanceAminoMsg { - return { - type: "cosmos-sdk/Balance", - value: Balance.toAmino(message) - }; - }, - fromProtoMsg(message: BalanceProtoMsg): Balance { - return Balance.decode(message.value); - }, - toProto(message: Balance): Uint8Array { - return Balance.encode(message).finish(); - }, - toProtoMsg(message: Balance): BalanceProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.Balance", - value: Balance.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/query.rpc.Query.ts deleted file mode 100644 index f93ca8be..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,358 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryBalanceRequest, QueryBalanceResponse, QueryAllBalancesRequest, QueryAllBalancesResponse, QuerySpendableBalancesRequest, QuerySpendableBalancesResponse, QueryTotalSupplyRequest, QueryTotalSupplyResponse, QuerySupplyOfRequest, QuerySupplyOfResponse, QueryParamsRequest, QueryParamsResponse, QueryDenomMetadataRequest, QueryDenomMetadataResponse, QueryDenomsMetadataRequest, QueryDenomsMetadataResponse, QueryDenomOwnersRequest, QueryDenomOwnersResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the balance of a single coin for a single account. */ - balance(request: QueryBalanceRequest): Promise; - /** AllBalances queries the balance of all coins for a single account. */ - allBalances(request: QueryAllBalancesRequest): Promise; - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - spendableBalances(request: QuerySpendableBalancesRequest): Promise; - /** TotalSupply queries the total supply of all coins. */ - totalSupply(request?: QueryTotalSupplyRequest): Promise; - /** SupplyOf queries the supply of a single coin. */ - supplyOf(request: QuerySupplyOfRequest): Promise; - /** Params queries the parameters of x/bank module. */ - params(request?: QueryParamsRequest): Promise; - /** DenomsMetadata queries the client metadata of a given coin denomination. */ - denomMetadata(request: QueryDenomMetadataRequest): Promise; - /** - * DenomsMetadata queries the client metadata for all registered coin - * denominations. - */ - denomsMetadata(request?: QueryDenomsMetadataRequest): Promise; - /** - * DenomOwners queries for all account addresses that own a particular token - * denomination. - */ - denomOwners(request: QueryDenomOwnersRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.balance = this.balance.bind(this); - this.allBalances = this.allBalances.bind(this); - this.spendableBalances = this.spendableBalances.bind(this); - this.totalSupply = this.totalSupply.bind(this); - this.supplyOf = this.supplyOf.bind(this); - this.params = this.params.bind(this); - this.denomMetadata = this.denomMetadata.bind(this); - this.denomsMetadata = this.denomsMetadata.bind(this); - this.denomOwners = this.denomOwners.bind(this); - } - balance(request: QueryBalanceRequest): Promise { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Balance", data); - return promise.then(data => QueryBalanceResponse.decode(new BinaryReader(data))); - } - allBalances(request: QueryAllBalancesRequest): Promise { - const data = QueryAllBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "AllBalances", data); - return promise.then(data => QueryAllBalancesResponse.decode(new BinaryReader(data))); - } - spendableBalances(request: QuerySpendableBalancesRequest): Promise { - const data = QuerySpendableBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SpendableBalances", data); - return promise.then(data => QuerySpendableBalancesResponse.decode(new BinaryReader(data))); - } - totalSupply(request: QueryTotalSupplyRequest = { - pagination: undefined - }): Promise { - const data = QueryTotalSupplyRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "TotalSupply", data); - return promise.then(data => QueryTotalSupplyResponse.decode(new BinaryReader(data))); - } - supplyOf(request: QuerySupplyOfRequest): Promise { - const data = QuerySupplyOfRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SupplyOf", data); - return promise.then(data => QuerySupplyOfResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - denomMetadata(request: QueryDenomMetadataRequest): Promise { - const data = QueryDenomMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomMetadata", data); - return promise.then(data => QueryDenomMetadataResponse.decode(new BinaryReader(data))); - } - denomsMetadata(request: QueryDenomsMetadataRequest = { - pagination: undefined - }): Promise { - const data = QueryDenomsMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomsMetadata", data); - return promise.then(data => QueryDenomsMetadataResponse.decode(new BinaryReader(data))); - } - denomOwners(request: QueryDenomOwnersRequest): Promise { - const data = QueryDenomOwnersRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomOwners", data); - return promise.then(data => QueryDenomOwnersResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - balance(request: QueryBalanceRequest): Promise { - return queryService.balance(request); - }, - allBalances(request: QueryAllBalancesRequest): Promise { - return queryService.allBalances(request); - }, - spendableBalances(request: QuerySpendableBalancesRequest): Promise { - return queryService.spendableBalances(request); - }, - totalSupply(request?: QueryTotalSupplyRequest): Promise { - return queryService.totalSupply(request); - }, - supplyOf(request: QuerySupplyOfRequest): Promise { - return queryService.supplyOf(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - denomMetadata(request: QueryDenomMetadataRequest): Promise { - return queryService.denomMetadata(request); - }, - denomsMetadata(request?: QueryDenomsMetadataRequest): Promise { - return queryService.denomsMetadata(request); - }, - denomOwners(request: QueryDenomOwnersRequest): Promise { - return queryService.denomOwners(request); - } - }; -}; -export interface UseBalanceQuery extends ReactQueryParams { - request: QueryBalanceRequest; -} -export interface UseAllBalancesQuery extends ReactQueryParams { - request: QueryAllBalancesRequest; -} -export interface UseSpendableBalancesQuery extends ReactQueryParams { - request: QuerySpendableBalancesRequest; -} -export interface UseTotalSupplyQuery extends ReactQueryParams { - request?: QueryTotalSupplyRequest; -} -export interface UseSupplyOfQuery extends ReactQueryParams { - request: QuerySupplyOfRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseDenomMetadataQuery extends ReactQueryParams { - request: QueryDenomMetadataRequest; -} -export interface UseDenomsMetadataQuery extends ReactQueryParams { - request?: QueryDenomsMetadataRequest; -} -export interface UseDenomOwnersQuery extends ReactQueryParams { - request: QueryDenomOwnersRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useBalance = ({ - request, - options - }: UseBalanceQuery) => { - return useQuery(["balanceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.balance(request); - }, options); - }; - const useAllBalances = ({ - request, - options - }: UseAllBalancesQuery) => { - return useQuery(["allBalancesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allBalances(request); - }, options); - }; - const useSpendableBalances = ({ - request, - options - }: UseSpendableBalancesQuery) => { - return useQuery(["spendableBalancesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.spendableBalances(request); - }, options); - }; - const useTotalSupply = ({ - request, - options - }: UseTotalSupplyQuery) => { - return useQuery(["totalSupplyQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalSupply(request); - }, options); - }; - const useSupplyOf = ({ - request, - options - }: UseSupplyOfQuery) => { - return useQuery(["supplyOfQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.supplyOf(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useDenomMetadata = ({ - request, - options - }: UseDenomMetadataQuery) => { - return useQuery(["denomMetadataQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomMetadata(request); - }, options); - }; - const useDenomsMetadata = ({ - request, - options - }: UseDenomsMetadataQuery) => { - return useQuery(["denomsMetadataQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomsMetadata(request); - }, options); - }; - const useDenomOwners = ({ - request, - options - }: UseDenomOwnersQuery) => { - return useQuery(["denomOwnersQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomOwners(request); - }, options); - }; - return { - /** Balance queries the balance of a single coin for a single account. */useBalance, - /** AllBalances queries the balance of all coins for a single account. */useAllBalances, - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - useSpendableBalances, - /** TotalSupply queries the total supply of all coins. */useTotalSupply, - /** SupplyOf queries the supply of a single coin. */useSupplyOf, - /** Params queries the parameters of x/bank module. */useParams, - /** DenomsMetadata queries the client metadata of a given coin denomination. */useDenomMetadata, - /** - * DenomsMetadata queries the client metadata for all registered coin - * denominations. - */ - useDenomsMetadata, - /** - * DenomOwners queries for all account addresses that own a particular token - * denomination. - */ - useDenomOwners - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryBalanceStore { - store = new QueryStore(queryService?.balance); - balance(request: QueryBalanceRequest) { - return this.store.getData(request); - } - } - class QueryAllBalancesStore { - store = new QueryStore(queryService?.allBalances); - allBalances(request: QueryAllBalancesRequest) { - return this.store.getData(request); - } - } - class QuerySpendableBalancesStore { - store = new QueryStore(queryService?.spendableBalances); - spendableBalances(request: QuerySpendableBalancesRequest) { - return this.store.getData(request); - } - } - class QueryTotalSupplyStore { - store = new QueryStore(queryService?.totalSupply); - totalSupply(request: QueryTotalSupplyRequest) { - return this.store.getData(request); - } - } - class QuerySupplyOfStore { - store = new QueryStore(queryService?.supplyOf); - supplyOf(request: QuerySupplyOfRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryDenomMetadataStore { - store = new QueryStore(queryService?.denomMetadata); - denomMetadata(request: QueryDenomMetadataRequest) { - return this.store.getData(request); - } - } - class QueryDenomsMetadataStore { - store = new QueryStore(queryService?.denomsMetadata); - denomsMetadata(request: QueryDenomsMetadataRequest) { - return this.store.getData(request); - } - } - class QueryDenomOwnersStore { - store = new QueryStore(queryService?.denomOwners); - denomOwners(request: QueryDenomOwnersRequest) { - return this.store.getData(request); - } - } - return { - /** Balance queries the balance of a single coin for a single account. */QueryBalanceStore, - /** AllBalances queries the balance of all coins for a single account. */QueryAllBalancesStore, - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - QuerySpendableBalancesStore, - /** TotalSupply queries the total supply of all coins. */QueryTotalSupplyStore, - /** SupplyOf queries the supply of a single coin. */QuerySupplyOfStore, - /** Params queries the parameters of x/bank module. */QueryParamsStore, - /** DenomsMetadata queries the client metadata of a given coin denomination. */QueryDenomMetadataStore, - /** - * DenomsMetadata queries the client metadata for all registered coin - * denominations. - */ - QueryDenomsMetadataStore, - /** - * DenomOwners queries for all account addresses that own a particular token - * denomination. - */ - QueryDenomOwnersStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/query.ts deleted file mode 100644 index 355173fe..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/query.ts +++ /dev/null @@ -1,2418 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Params, ParamsAmino, ParamsSDKType, Metadata, MetadataAmino, MetadataSDKType } from "./bank"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequest { - /** address is the address to query balances for. */ - address: string; - /** denom is the coin denom to query balances for. */ - denom: string; -} -export interface QueryBalanceRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest"; - value: Uint8Array; -} -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequestAmino { - /** address is the address to query balances for. */ - address: string; - /** denom is the coin denom to query balances for. */ - denom: string; -} -export interface QueryBalanceRequestAminoMsg { - type: "cosmos-sdk/QueryBalanceRequest"; - value: QueryBalanceRequestAmino; -} -/** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ -export interface QueryBalanceRequestSDKType { - address: string; - denom: string; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponse { - /** balance is the balance of the coin. */ - balance: Coin | undefined; -} -export interface QueryBalanceResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse"; - value: Uint8Array; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponseAmino { - /** balance is the balance of the coin. */ - balance?: CoinAmino | undefined; -} -export interface QueryBalanceResponseAminoMsg { - type: "cosmos-sdk/QueryBalanceResponse"; - value: QueryBalanceResponseAmino; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ -export interface QueryBalanceResponseSDKType { - balance: CoinSDKType | undefined; -} -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequest { - /** address is the address to query balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryAllBalancesRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest"; - value: Uint8Array; -} -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequestAmino { - /** address is the address to query balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryAllBalancesRequestAminoMsg { - type: "cosmos-sdk/QueryAllBalancesRequest"; - value: QueryAllBalancesRequestAmino; -} -/** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ -export interface QueryAllBalancesRequestSDKType { - address: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponse { - /** balances is the balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryAllBalancesResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse"; - value: Uint8Array; -} -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponseAmino { - /** balances is the balances of all the coins. */ - balances: CoinAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryAllBalancesResponseAminoMsg { - type: "cosmos-sdk/QueryAllBalancesResponse"; - value: QueryAllBalancesResponseAmino; -} -/** - * QueryAllBalancesResponse is the response type for the Query/AllBalances RPC - * method. - */ -export interface QueryAllBalancesResponseSDKType { - balances: CoinSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesRequest { - /** address is the address to query spendable balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QuerySpendableBalancesRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest"; - value: Uint8Array; -} -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesRequestAmino { - /** address is the address to query spendable balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QuerySpendableBalancesRequestAminoMsg { - type: "cosmos-sdk/QuerySpendableBalancesRequest"; - value: QuerySpendableBalancesRequestAmino; -} -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesRequestSDKType { - address: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QuerySpendableBalancesResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse"; - value: Uint8Array; -} -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesResponseAmino { - /** balances is the spendable balances of all the coins. */ - balances: CoinAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QuerySpendableBalancesResponseAminoMsg { - type: "cosmos-sdk/QuerySpendableBalancesResponse"; - value: QuerySpendableBalancesResponseAmino; -} -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesResponseSDKType { - balances: CoinSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequest { - /** - * pagination defines an optional pagination for the request. - * - * Since: cosmos-sdk 0.43 - */ - pagination: PageRequest | undefined; -} -export interface QueryTotalSupplyRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest"; - value: Uint8Array; -} -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequestAmino { - /** - * pagination defines an optional pagination for the request. - * - * Since: cosmos-sdk 0.43 - */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryTotalSupplyRequestAminoMsg { - type: "cosmos-sdk/QueryTotalSupplyRequest"; - value: QueryTotalSupplyRequestAmino; -} -/** - * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC - * method. - */ -export interface QueryTotalSupplyRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponse { - /** supply is the supply of the coins */ - supply: Coin[]; - /** - * pagination defines the pagination in the response. - * - * Since: cosmos-sdk 0.43 - */ - pagination: PageResponse | undefined; -} -export interface QueryTotalSupplyResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse"; - value: Uint8Array; -} -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponseAmino { - /** supply is the supply of the coins */ - supply: CoinAmino[]; - /** - * pagination defines the pagination in the response. - * - * Since: cosmos-sdk 0.43 - */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryTotalSupplyResponseAminoMsg { - type: "cosmos-sdk/QueryTotalSupplyResponse"; - value: QueryTotalSupplyResponseAmino; -} -/** - * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC - * method - */ -export interface QueryTotalSupplyResponseSDKType { - supply: CoinSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequest { - /** denom is the coin denom to query balances for. */ - denom: string; -} -export interface QuerySupplyOfRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest"; - value: Uint8Array; -} -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequestAmino { - /** denom is the coin denom to query balances for. */ - denom: string; -} -export interface QuerySupplyOfRequestAminoMsg { - type: "cosmos-sdk/QuerySupplyOfRequest"; - value: QuerySupplyOfRequestAmino; -} -/** QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfRequestSDKType { - denom: string; -} -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponse { - /** amount is the supply of the coin. */ - amount: Coin | undefined; -} -export interface QuerySupplyOfResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse"; - value: Uint8Array; -} -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponseAmino { - /** amount is the supply of the coin. */ - amount?: CoinAmino | undefined; -} -export interface QuerySupplyOfResponseAminoMsg { - type: "cosmos-sdk/QuerySupplyOfResponse"; - value: QuerySupplyOfResponseAmino; -} -/** QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. */ -export interface QuerySupplyOfResponseSDKType { - amount: CoinSDKType | undefined; -} -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponse { - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponseAmino { - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse defines the response type for querying x/bank parameters. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDenomsMetadataRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest"; - value: Uint8Array; -} -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDenomsMetadataRequestAminoMsg { - type: "cosmos-sdk/QueryDenomsMetadataRequest"; - value: QueryDenomsMetadataRequestAmino; -} -/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ -export interface QueryDenomsMetadataRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponse { - /** metadata provides the client information for all the registered tokens. */ - metadatas: Metadata[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDenomsMetadataResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse"; - value: Uint8Array; -} -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponseAmino { - /** metadata provides the client information for all the registered tokens. */ - metadatas: MetadataAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDenomsMetadataResponseAminoMsg { - type: "cosmos-sdk/QueryDenomsMetadataResponse"; - value: QueryDenomsMetadataResponseAmino; -} -/** - * QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC - * method. - */ -export interface QueryDenomsMetadataResponseSDKType { - metadatas: MetadataSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequest { - /** denom is the coin denom to query the metadata for. */ - denom: string; -} -export interface QueryDenomMetadataRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest"; - value: Uint8Array; -} -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequestAmino { - /** denom is the coin denom to query the metadata for. */ - denom: string; -} -export interface QueryDenomMetadataRequestAminoMsg { - type: "cosmos-sdk/QueryDenomMetadataRequest"; - value: QueryDenomMetadataRequestAmino; -} -/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */ -export interface QueryDenomMetadataRequestSDKType { - denom: string; -} -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponse { - /** metadata describes and provides all the client information for the requested token. */ - metadata: Metadata | undefined; -} -export interface QueryDenomMetadataResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse"; - value: Uint8Array; -} -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponseAmino { - /** metadata describes and provides all the client information for the requested token. */ - metadata?: MetadataAmino | undefined; -} -export interface QueryDenomMetadataResponseAminoMsg { - type: "cosmos-sdk/QueryDenomMetadataResponse"; - value: QueryDenomMetadataResponseAmino; -} -/** - * QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC - * method. - */ -export interface QueryDenomMetadataResponseSDKType { - metadata: MetadataSDKType | undefined; -} -/** - * QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, - * which queries for a paginated set of all account holders of a particular - * denomination. - */ -export interface QueryDenomOwnersRequest { - /** denom defines the coin denomination to query all account holders for. */ - denom: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDenomOwnersRequestProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest"; - value: Uint8Array; -} -/** - * QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, - * which queries for a paginated set of all account holders of a particular - * denomination. - */ -export interface QueryDenomOwnersRequestAmino { - /** denom defines the coin denomination to query all account holders for. */ - denom: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDenomOwnersRequestAminoMsg { - type: "cosmos-sdk/QueryDenomOwnersRequest"; - value: QueryDenomOwnersRequestAmino; -} -/** - * QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, - * which queries for a paginated set of all account holders of a particular - * denomination. - */ -export interface QueryDenomOwnersRequestSDKType { - denom: string; - pagination: PageRequestSDKType | undefined; -} -/** - * DenomOwner defines structure representing an account that owns or holds a - * particular denominated token. It contains the account address and account - * balance of the denominated token. - */ -export interface DenomOwner { - /** address defines the address that owns a particular denomination. */ - address: string; - /** balance is the balance of the denominated coin for an account. */ - balance: Coin | undefined; -} -export interface DenomOwnerProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.DenomOwner"; - value: Uint8Array; -} -/** - * DenomOwner defines structure representing an account that owns or holds a - * particular denominated token. It contains the account address and account - * balance of the denominated token. - */ -export interface DenomOwnerAmino { - /** address defines the address that owns a particular denomination. */ - address: string; - /** balance is the balance of the denominated coin for an account. */ - balance?: CoinAmino | undefined; -} -export interface DenomOwnerAminoMsg { - type: "cosmos-sdk/DenomOwner"; - value: DenomOwnerAmino; -} -/** - * DenomOwner defines structure representing an account that owns or holds a - * particular denominated token. It contains the account address and account - * balance of the denominated token. - */ -export interface DenomOwnerSDKType { - address: string; - balance: CoinSDKType | undefined; -} -/** QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. */ -export interface QueryDenomOwnersResponse { - denomOwners: DenomOwner[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDenomOwnersResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse"; - value: Uint8Array; -} -/** QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. */ -export interface QueryDenomOwnersResponseAmino { - denom_owners: DenomOwnerAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDenomOwnersResponseAminoMsg { - type: "cosmos-sdk/QueryDenomOwnersResponse"; - value: QueryDenomOwnersResponseAmino; -} -/** QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. */ -export interface QueryDenomOwnersResponseSDKType { - denom_owners: DenomOwnerSDKType[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryBalanceRequest(): QueryBalanceRequest { - return { - address: "", - denom: "" - }; -} -export const QueryBalanceRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", - aminoType: "cosmos-sdk/QueryBalanceRequest", - encode(message: QueryBalanceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryBalanceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBalanceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryBalanceRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QueryBalanceRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QueryBalanceRequest { - const message = createBaseQueryBalanceRequest(); - message.address = object.address ?? ""; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QueryBalanceRequestSDKType): QueryBalanceRequest { - return { - address: object?.address, - denom: object?.denom - }; - }, - toSDK(message: QueryBalanceRequest): QueryBalanceRequestSDKType { - const obj: any = {}; - obj.address = message.address; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QueryBalanceRequestAmino): QueryBalanceRequest { - return { - address: object.address, - denom: object.denom - }; - }, - toAmino(message: QueryBalanceRequest): QueryBalanceRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QueryBalanceRequestAminoMsg): QueryBalanceRequest { - return QueryBalanceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryBalanceRequest): QueryBalanceRequestAminoMsg { - return { - type: "cosmos-sdk/QueryBalanceRequest", - value: QueryBalanceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryBalanceRequestProtoMsg): QueryBalanceRequest { - return QueryBalanceRequest.decode(message.value); - }, - toProto(message: QueryBalanceRequest): Uint8Array { - return QueryBalanceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryBalanceRequest): QueryBalanceRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceRequest", - value: QueryBalanceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryBalanceResponse(): QueryBalanceResponse { - return { - balance: Coin.fromPartial({}) - }; -} -export const QueryBalanceResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", - aminoType: "cosmos-sdk/QueryBalanceResponse", - encode(message: QueryBalanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryBalanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBalanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryBalanceResponse { - return { - balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined - }; - }, - toJSON(message: QueryBalanceResponse): unknown { - const obj: any = {}; - message.balance !== undefined && (obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryBalanceResponse { - const message = createBaseQueryBalanceResponse(); - message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; - return message; - }, - fromSDK(object: QueryBalanceResponseSDKType): QueryBalanceResponse { - return { - balance: object.balance ? Coin.fromSDK(object.balance) : undefined - }; - }, - toSDK(message: QueryBalanceResponse): QueryBalanceResponseSDKType { - const obj: any = {}; - message.balance !== undefined && (obj.balance = message.balance ? Coin.toSDK(message.balance) : undefined); - return obj; - }, - fromAmino(object: QueryBalanceResponseAmino): QueryBalanceResponse { - return { - balance: object?.balance ? Coin.fromAmino(object.balance) : undefined - }; - }, - toAmino(message: QueryBalanceResponse): QueryBalanceResponseAmino { - const obj: any = {}; - obj.balance = message.balance ? Coin.toAmino(message.balance) : undefined; - return obj; - }, - fromAminoMsg(object: QueryBalanceResponseAminoMsg): QueryBalanceResponse { - return QueryBalanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryBalanceResponse): QueryBalanceResponseAminoMsg { - return { - type: "cosmos-sdk/QueryBalanceResponse", - value: QueryBalanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryBalanceResponseProtoMsg): QueryBalanceResponse { - return QueryBalanceResponse.decode(message.value); - }, - toProto(message: QueryBalanceResponse): Uint8Array { - return QueryBalanceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryBalanceResponse): QueryBalanceResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryBalanceResponse", - value: QueryBalanceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { - return { - address: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryAllBalancesRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", - aminoType: "cosmos-sdk/QueryAllBalancesRequest", - encode(message: QueryAllBalancesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllBalancesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllBalancesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllBalancesRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllBalancesRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllBalancesRequest { - const message = createBaseQueryAllBalancesRequest(); - message.address = object.address ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllBalancesRequestSDKType): QueryAllBalancesRequest { - return { - address: object?.address, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllBalancesRequest): QueryAllBalancesRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllBalancesRequestAmino): QueryAllBalancesRequest { - return { - address: object.address, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllBalancesRequest): QueryAllBalancesRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllBalancesRequestAminoMsg): QueryAllBalancesRequest { - return QueryAllBalancesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllBalancesRequest): QueryAllBalancesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAllBalancesRequest", - value: QueryAllBalancesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllBalancesRequestProtoMsg): QueryAllBalancesRequest { - return QueryAllBalancesRequest.decode(message.value); - }, - toProto(message: QueryAllBalancesRequest): Uint8Array { - return QueryAllBalancesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAllBalancesRequest): QueryAllBalancesRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesRequest", - value: QueryAllBalancesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { - return { - balances: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryAllBalancesResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", - aminoType: "cosmos-sdk/QueryAllBalancesResponse", - encode(message: QueryAllBalancesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.balances) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllBalancesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllBalancesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllBalancesResponse): unknown { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.balances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllBalancesResponse { - const message = createBaseQueryAllBalancesResponse(); - message.balances = object.balances?.map(e => Coin.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllBalancesResponseSDKType): QueryAllBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllBalancesResponse): QueryAllBalancesResponseSDKType { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.balances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllBalancesResponseAmino): QueryAllBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllBalancesResponse): QueryAllBalancesResponseAmino { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.balances = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllBalancesResponseAminoMsg): QueryAllBalancesResponse { - return QueryAllBalancesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllBalancesResponse): QueryAllBalancesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAllBalancesResponse", - value: QueryAllBalancesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllBalancesResponseProtoMsg): QueryAllBalancesResponse { - return QueryAllBalancesResponse.decode(message.value); - }, - toProto(message: QueryAllBalancesResponse): Uint8Array { - return QueryAllBalancesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAllBalancesResponse): QueryAllBalancesResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryAllBalancesResponse", - value: QueryAllBalancesResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { - return { - address: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QuerySpendableBalancesRequest = { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", - aminoType: "cosmos-sdk/QuerySpendableBalancesRequest", - encode(message: QuerySpendableBalancesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySpendableBalancesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpendableBalancesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySpendableBalancesRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QuerySpendableBalancesRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QuerySpendableBalancesRequest { - const message = createBaseQuerySpendableBalancesRequest(); - message.address = object.address ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QuerySpendableBalancesRequestSDKType): QuerySpendableBalancesRequest { - return { - address: object?.address, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QuerySpendableBalancesRequestAmino): QuerySpendableBalancesRequest { - return { - address: object.address, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySpendableBalancesRequestAminoMsg): QuerySpendableBalancesRequest { - return QuerySpendableBalancesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestAminoMsg { - return { - type: "cosmos-sdk/QuerySpendableBalancesRequest", - value: QuerySpendableBalancesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySpendableBalancesRequestProtoMsg): QuerySpendableBalancesRequest { - return QuerySpendableBalancesRequest.decode(message.value); - }, - toProto(message: QuerySpendableBalancesRequest): Uint8Array { - return QuerySpendableBalancesRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySpendableBalancesRequest): QuerySpendableBalancesRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest", - value: QuerySpendableBalancesRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { - return { - balances: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QuerySpendableBalancesResponse = { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", - aminoType: "cosmos-sdk/QuerySpendableBalancesResponse", - encode(message: QuerySpendableBalancesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.balances) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySpendableBalancesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpendableBalancesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySpendableBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QuerySpendableBalancesResponse): unknown { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.balances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QuerySpendableBalancesResponse { - const message = createBaseQuerySpendableBalancesResponse(); - message.balances = object.balances?.map(e => Coin.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QuerySpendableBalancesResponseSDKType): QuerySpendableBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QuerySpendableBalancesResponse): QuerySpendableBalancesResponseSDKType { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.balances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QuerySpendableBalancesResponseAmino): QuerySpendableBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QuerySpendableBalancesResponse): QuerySpendableBalancesResponseAmino { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.balances = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySpendableBalancesResponseAminoMsg): QuerySpendableBalancesResponse { - return QuerySpendableBalancesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySpendableBalancesResponse): QuerySpendableBalancesResponseAminoMsg { - return { - type: "cosmos-sdk/QuerySpendableBalancesResponse", - value: QuerySpendableBalancesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySpendableBalancesResponseProtoMsg): QuerySpendableBalancesResponse { - return QuerySpendableBalancesResponse.decode(message.value); - }, - toProto(message: QuerySpendableBalancesResponse): Uint8Array { - return QuerySpendableBalancesResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySpendableBalancesResponse): QuerySpendableBalancesResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse", - value: QuerySpendableBalancesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryTotalSupplyRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", - aminoType: "cosmos-sdk/QueryTotalSupplyRequest", - encode(message: QueryTotalSupplyRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalSupplyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalSupplyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalSupplyRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryTotalSupplyRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalSupplyRequest { - const message = createBaseQueryTotalSupplyRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryTotalSupplyRequestSDKType): QueryTotalSupplyRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryTotalSupplyRequest): QueryTotalSupplyRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryTotalSupplyRequestAmino): QueryTotalSupplyRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryTotalSupplyRequest): QueryTotalSupplyRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTotalSupplyRequestAminoMsg): QueryTotalSupplyRequest { - return QueryTotalSupplyRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalSupplyRequest): QueryTotalSupplyRequestAminoMsg { - return { - type: "cosmos-sdk/QueryTotalSupplyRequest", - value: QueryTotalSupplyRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalSupplyRequestProtoMsg): QueryTotalSupplyRequest { - return QueryTotalSupplyRequest.decode(message.value); - }, - toProto(message: QueryTotalSupplyRequest): Uint8Array { - return QueryTotalSupplyRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalSupplyRequest): QueryTotalSupplyRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyRequest", - value: QueryTotalSupplyRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { - return { - supply: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryTotalSupplyResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", - aminoType: "cosmos-sdk/QueryTotalSupplyResponse", - encode(message: QueryTotalSupplyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.supply) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalSupplyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalSupplyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.supply.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalSupplyResponse { - return { - supply: Array.isArray(object?.supply) ? object.supply.map((e: any) => Coin.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryTotalSupplyResponse): unknown { - const obj: any = {}; - if (message.supply) { - obj.supply = message.supply.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.supply = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalSupplyResponse { - const message = createBaseQueryTotalSupplyResponse(); - message.supply = object.supply?.map(e => Coin.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryTotalSupplyResponseSDKType): QueryTotalSupplyResponse { - return { - supply: Array.isArray(object?.supply) ? object.supply.map((e: any) => Coin.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryTotalSupplyResponse): QueryTotalSupplyResponseSDKType { - const obj: any = {}; - if (message.supply) { - obj.supply = message.supply.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.supply = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryTotalSupplyResponseAmino): QueryTotalSupplyResponse { - return { - supply: Array.isArray(object?.supply) ? object.supply.map((e: any) => Coin.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryTotalSupplyResponse): QueryTotalSupplyResponseAmino { - const obj: any = {}; - if (message.supply) { - obj.supply = message.supply.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.supply = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTotalSupplyResponseAminoMsg): QueryTotalSupplyResponse { - return QueryTotalSupplyResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalSupplyResponse): QueryTotalSupplyResponseAminoMsg { - return { - type: "cosmos-sdk/QueryTotalSupplyResponse", - value: QueryTotalSupplyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalSupplyResponseProtoMsg): QueryTotalSupplyResponse { - return QueryTotalSupplyResponse.decode(message.value); - }, - toProto(message: QueryTotalSupplyResponse): Uint8Array { - return QueryTotalSupplyResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalSupplyResponse): QueryTotalSupplyResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryTotalSupplyResponse", - value: QueryTotalSupplyResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { - return { - denom: "" - }; -} -export const QuerySupplyOfRequest = { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", - aminoType: "cosmos-sdk/QuerySupplyOfRequest", - encode(message: QuerySupplyOfRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySupplyOfRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySupplyOfRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySupplyOfRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QuerySupplyOfRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QuerySupplyOfRequest { - const message = createBaseQuerySupplyOfRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QuerySupplyOfRequestSDKType): QuerySupplyOfRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: QuerySupplyOfRequest): QuerySupplyOfRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QuerySupplyOfRequestAmino): QuerySupplyOfRequest { - return { - denom: object.denom - }; - }, - toAmino(message: QuerySupplyOfRequest): QuerySupplyOfRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QuerySupplyOfRequestAminoMsg): QuerySupplyOfRequest { - return QuerySupplyOfRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySupplyOfRequest): QuerySupplyOfRequestAminoMsg { - return { - type: "cosmos-sdk/QuerySupplyOfRequest", - value: QuerySupplyOfRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySupplyOfRequestProtoMsg): QuerySupplyOfRequest { - return QuerySupplyOfRequest.decode(message.value); - }, - toProto(message: QuerySupplyOfRequest): Uint8Array { - return QuerySupplyOfRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySupplyOfRequest): QuerySupplyOfRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfRequest", - value: QuerySupplyOfRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { - return { - amount: Coin.fromPartial({}) - }; -} -export const QuerySupplyOfResponse = { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", - aminoType: "cosmos-sdk/QuerySupplyOfResponse", - encode(message: QuerySupplyOfResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySupplyOfResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySupplyOfResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySupplyOfResponse { - return { - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined - }; - }, - toJSON(message: QuerySupplyOfResponse): unknown { - const obj: any = {}; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QuerySupplyOfResponse { - const message = createBaseQuerySupplyOfResponse(); - message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; - return message; - }, - fromSDK(object: QuerySupplyOfResponseSDKType): QuerySupplyOfResponse { - return { - amount: object.amount ? Coin.fromSDK(object.amount) : undefined - }; - }, - toSDK(message: QuerySupplyOfResponse): QuerySupplyOfResponseSDKType { - const obj: any = {}; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toSDK(message.amount) : undefined); - return obj; - }, - fromAmino(object: QuerySupplyOfResponseAmino): QuerySupplyOfResponse { - return { - amount: object?.amount ? Coin.fromAmino(object.amount) : undefined - }; - }, - toAmino(message: QuerySupplyOfResponse): QuerySupplyOfResponseAmino { - const obj: any = {}; - obj.amount = message.amount ? Coin.toAmino(message.amount) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySupplyOfResponseAminoMsg): QuerySupplyOfResponse { - return QuerySupplyOfResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySupplyOfResponse): QuerySupplyOfResponseAminoMsg { - return { - type: "cosmos-sdk/QuerySupplyOfResponse", - value: QuerySupplyOfResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySupplyOfResponseProtoMsg): QuerySupplyOfResponse { - return QuerySupplyOfResponse.decode(message.value); - }, - toProto(message: QuerySupplyOfResponse): Uint8Array { - return QuerySupplyOfResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySupplyOfResponse): QuerySupplyOfResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QuerySupplyOfResponse", - value: QuerySupplyOfResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDenomsMetadataRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", - aminoType: "cosmos-sdk/QueryDenomsMetadataRequest", - encode(message: QueryDenomsMetadataRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomsMetadataRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomsMetadataRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomsMetadataRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDenomsMetadataRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomsMetadataRequest { - const message = createBaseQueryDenomsMetadataRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDenomsMetadataRequestSDKType): QueryDenomsMetadataRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDenomsMetadataRequest): QueryDenomsMetadataRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDenomsMetadataRequestAmino): QueryDenomsMetadataRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDenomsMetadataRequest): QueryDenomsMetadataRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomsMetadataRequestAminoMsg): QueryDenomsMetadataRequest { - return QueryDenomsMetadataRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomsMetadataRequest): QueryDenomsMetadataRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDenomsMetadataRequest", - value: QueryDenomsMetadataRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomsMetadataRequestProtoMsg): QueryDenomsMetadataRequest { - return QueryDenomsMetadataRequest.decode(message.value); - }, - toProto(message: QueryDenomsMetadataRequest): Uint8Array { - return QueryDenomsMetadataRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomsMetadataRequest): QueryDenomsMetadataRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest", - value: QueryDenomsMetadataRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { - return { - metadatas: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDenomsMetadataResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", - aminoType: "cosmos-sdk/QueryDenomsMetadataResponse", - encode(message: QueryDenomsMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.metadatas) { - Metadata.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomsMetadataResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomsMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadatas.push(Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomsMetadataResponse { - return { - metadatas: Array.isArray(object?.metadatas) ? object.metadatas.map((e: any) => Metadata.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDenomsMetadataResponse): unknown { - const obj: any = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map(e => e ? Metadata.toJSON(e) : undefined); - } else { - obj.metadatas = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomsMetadataResponse { - const message = createBaseQueryDenomsMetadataResponse(); - message.metadatas = object.metadatas?.map(e => Metadata.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDenomsMetadataResponseSDKType): QueryDenomsMetadataResponse { - return { - metadatas: Array.isArray(object?.metadatas) ? object.metadatas.map((e: any) => Metadata.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDenomsMetadataResponse): QueryDenomsMetadataResponseSDKType { - const obj: any = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map(e => e ? Metadata.toSDK(e) : undefined); - } else { - obj.metadatas = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDenomsMetadataResponseAmino): QueryDenomsMetadataResponse { - return { - metadatas: Array.isArray(object?.metadatas) ? object.metadatas.map((e: any) => Metadata.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDenomsMetadataResponse): QueryDenomsMetadataResponseAmino { - const obj: any = {}; - if (message.metadatas) { - obj.metadatas = message.metadatas.map(e => e ? Metadata.toAmino(e) : undefined); - } else { - obj.metadatas = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomsMetadataResponseAminoMsg): QueryDenomsMetadataResponse { - return QueryDenomsMetadataResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomsMetadataResponse): QueryDenomsMetadataResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDenomsMetadataResponse", - value: QueryDenomsMetadataResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomsMetadataResponseProtoMsg): QueryDenomsMetadataResponse { - return QueryDenomsMetadataResponse.decode(message.value); - }, - toProto(message: QueryDenomsMetadataResponse): Uint8Array { - return QueryDenomsMetadataResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomsMetadataResponse): QueryDenomsMetadataResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse", - value: QueryDenomsMetadataResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { - return { - denom: "" - }; -} -export const QueryDenomMetadataRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", - aminoType: "cosmos-sdk/QueryDenomMetadataRequest", - encode(message: QueryDenomMetadataRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomMetadataRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomMetadataRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomMetadataRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QueryDenomMetadataRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomMetadataRequest { - const message = createBaseQueryDenomMetadataRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QueryDenomMetadataRequestSDKType): QueryDenomMetadataRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QueryDenomMetadataRequestAmino): QueryDenomMetadataRequest { - return { - denom: object.denom - }; - }, - toAmino(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QueryDenomMetadataRequestAminoMsg): QueryDenomMetadataRequest { - return QueryDenomMetadataRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDenomMetadataRequest", - value: QueryDenomMetadataRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomMetadataRequestProtoMsg): QueryDenomMetadataRequest { - return QueryDenomMetadataRequest.decode(message.value); - }, - toProto(message: QueryDenomMetadataRequest): Uint8Array { - return QueryDenomMetadataRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomMetadataRequest): QueryDenomMetadataRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataRequest", - value: QueryDenomMetadataRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { - return { - metadata: Metadata.fromPartial({}) - }; -} -export const QueryDenomMetadataResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", - aminoType: "cosmos-sdk/QueryDenomMetadataResponse", - encode(message: QueryDenomMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomMetadataResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomMetadataResponse { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined - }; - }, - toJSON(message: QueryDenomMetadataResponse): unknown { - const obj: any = {}; - message.metadata !== undefined && (obj.metadata = message.metadata ? Metadata.toJSON(message.metadata) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomMetadataResponse { - const message = createBaseQueryDenomMetadataResponse(); - message.metadata = object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined; - return message; - }, - fromSDK(object: QueryDenomMetadataResponseSDKType): QueryDenomMetadataResponse { - return { - metadata: object.metadata ? Metadata.fromSDK(object.metadata) : undefined - }; - }, - toSDK(message: QueryDenomMetadataResponse): QueryDenomMetadataResponseSDKType { - const obj: any = {}; - message.metadata !== undefined && (obj.metadata = message.metadata ? Metadata.toSDK(message.metadata) : undefined); - return obj; - }, - fromAmino(object: QueryDenomMetadataResponseAmino): QueryDenomMetadataResponse { - return { - metadata: object?.metadata ? Metadata.fromAmino(object.metadata) : undefined - }; - }, - toAmino(message: QueryDenomMetadataResponse): QueryDenomMetadataResponseAmino { - const obj: any = {}; - obj.metadata = message.metadata ? Metadata.toAmino(message.metadata) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomMetadataResponseAminoMsg): QueryDenomMetadataResponse { - return QueryDenomMetadataResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomMetadataResponse): QueryDenomMetadataResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDenomMetadataResponse", - value: QueryDenomMetadataResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomMetadataResponseProtoMsg): QueryDenomMetadataResponse { - return QueryDenomMetadataResponse.decode(message.value); - }, - toProto(message: QueryDenomMetadataResponse): Uint8Array { - return QueryDenomMetadataResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomMetadataResponse): QueryDenomMetadataResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomMetadataResponse", - value: QueryDenomMetadataResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomOwnersRequest(): QueryDenomOwnersRequest { - return { - denom: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDenomOwnersRequest = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", - aminoType: "cosmos-sdk/QueryDenomOwnersRequest", - encode(message: QueryDenomOwnersRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomOwnersRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomOwnersRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomOwnersRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDenomOwnersRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomOwnersRequest { - const message = createBaseQueryDenomOwnersRequest(); - message.denom = object.denom ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDenomOwnersRequestSDKType): QueryDenomOwnersRequest { - return { - denom: object?.denom, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDenomOwnersRequestAmino): QueryDenomOwnersRequest { - return { - denom: object.denom, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomOwnersRequestAminoMsg): QueryDenomOwnersRequest { - return QueryDenomOwnersRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDenomOwnersRequest", - value: QueryDenomOwnersRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomOwnersRequestProtoMsg): QueryDenomOwnersRequest { - return QueryDenomOwnersRequest.decode(message.value); - }, - toProto(message: QueryDenomOwnersRequest): Uint8Array { - return QueryDenomOwnersRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomOwnersRequest): QueryDenomOwnersRequestProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersRequest", - value: QueryDenomOwnersRequest.encode(message).finish() - }; - } -}; -function createBaseDenomOwner(): DenomOwner { - return { - address: "", - balance: Coin.fromPartial({}) - }; -} -export const DenomOwner = { - typeUrl: "/cosmos.bank.v1beta1.DenomOwner", - aminoType: "cosmos-sdk/DenomOwner", - encode(message: DenomOwner, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DenomOwner { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDenomOwner(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DenomOwner { - return { - address: isSet(object.address) ? String(object.address) : "", - balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined - }; - }, - toJSON(message: DenomOwner): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.balance !== undefined && (obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DenomOwner { - const message = createBaseDenomOwner(); - message.address = object.address ?? ""; - message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; - return message; - }, - fromSDK(object: DenomOwnerSDKType): DenomOwner { - return { - address: object?.address, - balance: object.balance ? Coin.fromSDK(object.balance) : undefined - }; - }, - toSDK(message: DenomOwner): DenomOwnerSDKType { - const obj: any = {}; - obj.address = message.address; - message.balance !== undefined && (obj.balance = message.balance ? Coin.toSDK(message.balance) : undefined); - return obj; - }, - fromAmino(object: DenomOwnerAmino): DenomOwner { - return { - address: object.address, - balance: object?.balance ? Coin.fromAmino(object.balance) : undefined - }; - }, - toAmino(message: DenomOwner): DenomOwnerAmino { - const obj: any = {}; - obj.address = message.address; - obj.balance = message.balance ? Coin.toAmino(message.balance) : undefined; - return obj; - }, - fromAminoMsg(object: DenomOwnerAminoMsg): DenomOwner { - return DenomOwner.fromAmino(object.value); - }, - toAminoMsg(message: DenomOwner): DenomOwnerAminoMsg { - return { - type: "cosmos-sdk/DenomOwner", - value: DenomOwner.toAmino(message) - }; - }, - fromProtoMsg(message: DenomOwnerProtoMsg): DenomOwner { - return DenomOwner.decode(message.value); - }, - toProto(message: DenomOwner): Uint8Array { - return DenomOwner.encode(message).finish(); - }, - toProtoMsg(message: DenomOwner): DenomOwnerProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.DenomOwner", - value: DenomOwner.encode(message).finish() - }; - } -}; -function createBaseQueryDenomOwnersResponse(): QueryDenomOwnersResponse { - return { - denomOwners: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDenomOwnersResponse = { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", - aminoType: "cosmos-sdk/QueryDenomOwnersResponse", - encode(message: QueryDenomOwnersResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.denomOwners) { - DenomOwner.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomOwnersResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomOwnersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomOwners.push(DenomOwner.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomOwnersResponse { - return { - denomOwners: Array.isArray(object?.denomOwners) ? object.denomOwners.map((e: any) => DenomOwner.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDenomOwnersResponse): unknown { - const obj: any = {}; - if (message.denomOwners) { - obj.denomOwners = message.denomOwners.map(e => e ? DenomOwner.toJSON(e) : undefined); - } else { - obj.denomOwners = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomOwnersResponse { - const message = createBaseQueryDenomOwnersResponse(); - message.denomOwners = object.denomOwners?.map(e => DenomOwner.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDenomOwnersResponseSDKType): QueryDenomOwnersResponse { - return { - denomOwners: Array.isArray(object?.denom_owners) ? object.denom_owners.map((e: any) => DenomOwner.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDenomOwnersResponse): QueryDenomOwnersResponseSDKType { - const obj: any = {}; - if (message.denomOwners) { - obj.denom_owners = message.denomOwners.map(e => e ? DenomOwner.toSDK(e) : undefined); - } else { - obj.denom_owners = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDenomOwnersResponseAmino): QueryDenomOwnersResponse { - return { - denomOwners: Array.isArray(object?.denom_owners) ? object.denom_owners.map((e: any) => DenomOwner.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDenomOwnersResponse): QueryDenomOwnersResponseAmino { - const obj: any = {}; - if (message.denomOwners) { - obj.denom_owners = message.denomOwners.map(e => e ? DenomOwner.toAmino(e) : undefined); - } else { - obj.denom_owners = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomOwnersResponseAminoMsg): QueryDenomOwnersResponse { - return QueryDenomOwnersResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomOwnersResponse): QueryDenomOwnersResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDenomOwnersResponse", - value: QueryDenomOwnersResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomOwnersResponseProtoMsg): QueryDenomOwnersResponse { - return QueryDenomOwnersResponse.decode(message.value); - }, - toProto(message: QueryDenomOwnersResponse): Uint8Array { - return QueryDenomOwnersResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomOwnersResponse): QueryDenomOwnersResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.QueryDenomOwnersResponse", - value: QueryDenomOwnersResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.amino.ts deleted file mode 100644 index 1aa9a243..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.amino.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MsgSend, MsgMultiSend } from "./tx"; -export const AminoConverter = { - "/cosmos.bank.v1beta1.MsgSend": { - aminoType: "cosmos-sdk/MsgSend", - toAmino: MsgSend.toAmino, - fromAmino: MsgSend.fromAmino - }, - "/cosmos.bank.v1beta1.MsgMultiSend": { - aminoType: "cosmos-sdk/MsgMultiSend", - toAmino: MsgMultiSend.toAmino, - fromAmino: MsgMultiSend.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.registry.ts deleted file mode 100644 index b39b85d4..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.registry.ts +++ /dev/null @@ -1,81 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSend, MsgMultiSend } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.bank.v1beta1.MsgSend", MsgSend], ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - value: MsgSend.encode(value).finish() - }; - }, - multiSend(value: MsgMultiSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - value: MsgMultiSend.encode(value).finish() - }; - } - }, - withTypeUrl: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - value - }; - }, - multiSend(value: MsgMultiSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - value - }; - } - }, - toJSON: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - value: MsgSend.toJSON(value) - }; - }, - multiSend(value: MsgMultiSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - value: MsgMultiSend.toJSON(value) - }; - } - }, - fromJSON: { - send(value: any) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - value: MsgSend.fromJSON(value) - }; - }, - multiSend(value: any) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - value: MsgMultiSend.fromJSON(value) - }; - } - }, - fromPartial: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - value: MsgSend.fromPartial(value) - }; - }, - multiSend(value: MsgMultiSend) { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - value: MsgMultiSend.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 370da8f4..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSend, MsgSendResponse, MsgMultiSend, MsgMultiSendResponse } from "./tx"; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** Send defines a method for sending coins from one account to another account. */ - send(request: MsgSend): Promise; - /** MultiSend defines a method for sending coins from some accounts to other accounts. */ - multiSend(request: MsgMultiSend): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.send = this.send.bind(this); - this.multiSend = this.multiSend.bind(this); - } - send(request: MsgSend): Promise { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data); - return promise.then(data => MsgSendResponse.decode(new BinaryReader(data))); - } - multiSend(request: MsgMultiSend): Promise { - const data = MsgMultiSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "MultiSend", data); - return promise.then(data => MsgMultiSendResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.ts deleted file mode 100644 index 51ddb08f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bank/v1beta1/tx.ts +++ /dev/null @@ -1,475 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Input, InputAmino, InputSDKType, Output, OutputAmino, OutputSDKType } from "./bank"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSend { - fromAddress: string; - toAddress: string; - amount: Coin[]; -} -export interface MsgSendProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgSend"; - value: Uint8Array; -} -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSendAmino { - from_address: string; - to_address: string; - amount: CoinAmino[]; -} -export interface MsgSendAminoMsg { - type: "cosmos-sdk/MsgSend"; - value: MsgSendAmino; -} -/** MsgSend represents a message to send coins from one account to another. */ -export interface MsgSendSDKType { - from_address: string; - to_address: string; - amount: CoinSDKType[]; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse {} -export interface MsgSendResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse"; - value: Uint8Array; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponseAmino {} -export interface MsgSendResponseAminoMsg { - type: "cosmos-sdk/MsgSendResponse"; - value: MsgSendResponseAmino; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponseSDKType {} -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSend { - inputs: Input[]; - outputs: Output[]; -} -export interface MsgMultiSendProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend"; - value: Uint8Array; -} -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSendAmino { - inputs: InputAmino[]; - outputs: OutputAmino[]; -} -export interface MsgMultiSendAminoMsg { - type: "cosmos-sdk/MsgMultiSend"; - value: MsgMultiSendAmino; -} -/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ -export interface MsgMultiSendSDKType { - inputs: InputSDKType[]; - outputs: OutputSDKType[]; -} -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponse {} -export interface MsgMultiSendResponseProtoMsg { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse"; - value: Uint8Array; -} -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponseAmino {} -export interface MsgMultiSendResponseAminoMsg { - type: "cosmos-sdk/MsgMultiSendResponse"; - value: MsgMultiSendResponseAmino; -} -/** MsgMultiSendResponse defines the Msg/MultiSend response type. */ -export interface MsgMultiSendResponseSDKType {} -function createBaseMsgSend(): MsgSend { - return { - fromAddress: "", - toAddress: "", - amount: [] - }; -} -export const MsgSend = { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - aminoType: "cosmos-sdk/MsgSend", - encode(message: MsgSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSend { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSend { - return { - fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "", - toAddress: isSet(object.toAddress) ? String(object.toAddress) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgSend): unknown { - const obj: any = {}; - message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgSend { - const message = createBaseMsgSend(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgSendSDKType): MsgSend { - return { - fromAddress: object?.from_address, - toAddress: object?.to_address, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgSend): MsgSendSDKType { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: MsgSendAmino): MsgSend { - return { - fromAddress: object.from_address, - toAddress: object.to_address, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgSend): MsgSendAmino { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: MsgSendAminoMsg): MsgSend { - return MsgSend.fromAmino(object.value); - }, - toAminoMsg(message: MsgSend): MsgSendAminoMsg { - return { - type: "cosmos-sdk/MsgSend", - value: MsgSend.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSendProtoMsg): MsgSend { - return MsgSend.decode(message.value); - }, - toProto(message: MsgSend): Uint8Array { - return MsgSend.encode(message).finish(); - }, - toProtoMsg(message: MsgSend): MsgSendProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSend", - value: MsgSend.encode(message).finish() - }; - } -}; -function createBaseMsgSendResponse(): MsgSendResponse { - return {}; -} -export const MsgSendResponse = { - typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", - aminoType: "cosmos-sdk/MsgSendResponse", - encode(_: MsgSendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSendResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSendResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSendResponse { - return {}; - }, - toJSON(_: MsgSendResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSendResponse { - const message = createBaseMsgSendResponse(); - return message; - }, - fromSDK(_: MsgSendResponseSDKType): MsgSendResponse { - return {}; - }, - toSDK(_: MsgSendResponse): MsgSendResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSendResponseAmino): MsgSendResponse { - return {}; - }, - toAmino(_: MsgSendResponse): MsgSendResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSendResponseAminoMsg): MsgSendResponse { - return MsgSendResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSendResponse): MsgSendResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSendResponse", - value: MsgSendResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSendResponseProtoMsg): MsgSendResponse { - return MsgSendResponse.decode(message.value); - }, - toProto(message: MsgSendResponse): Uint8Array { - return MsgSendResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSendResponse): MsgSendResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", - value: MsgSendResponse.encode(message).finish() - }; - } -}; -function createBaseMsgMultiSend(): MsgMultiSend { - return { - inputs: [], - outputs: [] - }; -} -export const MsgMultiSend = { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - aminoType: "cosmos-sdk/MsgMultiSend", - encode(message: MsgMultiSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.inputs) { - Input.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.outputs) { - Output.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMultiSend { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMultiSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inputs.push(Input.decode(reader, reader.uint32())); - break; - case 2: - message.outputs.push(Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgMultiSend { - return { - inputs: Array.isArray(object?.inputs) ? object.inputs.map((e: any) => Input.fromJSON(e)) : [], - outputs: Array.isArray(object?.outputs) ? object.outputs.map((e: any) => Output.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgMultiSend): unknown { - const obj: any = {}; - if (message.inputs) { - obj.inputs = message.inputs.map(e => e ? Input.toJSON(e) : undefined); - } else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map(e => e ? Output.toJSON(e) : undefined); - } else { - obj.outputs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgMultiSend { - const message = createBaseMsgMultiSend(); - message.inputs = object.inputs?.map(e => Input.fromPartial(e)) || []; - message.outputs = object.outputs?.map(e => Output.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgMultiSendSDKType): MsgMultiSend { - return { - inputs: Array.isArray(object?.inputs) ? object.inputs.map((e: any) => Input.fromSDK(e)) : [], - outputs: Array.isArray(object?.outputs) ? object.outputs.map((e: any) => Output.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgMultiSend): MsgMultiSendSDKType { - const obj: any = {}; - if (message.inputs) { - obj.inputs = message.inputs.map(e => e ? Input.toSDK(e) : undefined); - } else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map(e => e ? Output.toSDK(e) : undefined); - } else { - obj.outputs = []; - } - return obj; - }, - fromAmino(object: MsgMultiSendAmino): MsgMultiSend { - return { - inputs: Array.isArray(object?.inputs) ? object.inputs.map((e: any) => Input.fromAmino(e)) : [], - outputs: Array.isArray(object?.outputs) ? object.outputs.map((e: any) => Output.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgMultiSend): MsgMultiSendAmino { - const obj: any = {}; - if (message.inputs) { - obj.inputs = message.inputs.map(e => e ? Input.toAmino(e) : undefined); - } else { - obj.inputs = []; - } - if (message.outputs) { - obj.outputs = message.outputs.map(e => e ? Output.toAmino(e) : undefined); - } else { - obj.outputs = []; - } - return obj; - }, - fromAminoMsg(object: MsgMultiSendAminoMsg): MsgMultiSend { - return MsgMultiSend.fromAmino(object.value); - }, - toAminoMsg(message: MsgMultiSend): MsgMultiSendAminoMsg { - return { - type: "cosmos-sdk/MsgMultiSend", - value: MsgMultiSend.toAmino(message) - }; - }, - fromProtoMsg(message: MsgMultiSendProtoMsg): MsgMultiSend { - return MsgMultiSend.decode(message.value); - }, - toProto(message: MsgMultiSend): Uint8Array { - return MsgMultiSend.encode(message).finish(); - }, - toProtoMsg(message: MsgMultiSend): MsgMultiSendProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", - value: MsgMultiSend.encode(message).finish() - }; - } -}; -function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { - return {}; -} -export const MsgMultiSendResponse = { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", - aminoType: "cosmos-sdk/MsgMultiSendResponse", - encode(_: MsgMultiSendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMultiSendResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMultiSendResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgMultiSendResponse { - return {}; - }, - toJSON(_: MsgMultiSendResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgMultiSendResponse { - const message = createBaseMsgMultiSendResponse(); - return message; - }, - fromSDK(_: MsgMultiSendResponseSDKType): MsgMultiSendResponse { - return {}; - }, - toSDK(_: MsgMultiSendResponse): MsgMultiSendResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgMultiSendResponseAmino): MsgMultiSendResponse { - return {}; - }, - toAmino(_: MsgMultiSendResponse): MsgMultiSendResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgMultiSendResponseAminoMsg): MsgMultiSendResponse { - return MsgMultiSendResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgMultiSendResponse): MsgMultiSendResponseAminoMsg { - return { - type: "cosmos-sdk/MsgMultiSendResponse", - value: MsgMultiSendResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgMultiSendResponseProtoMsg): MsgMultiSendResponse { - return MsgMultiSendResponse.decode(message.value); - }, - toProto(message: MsgMultiSendResponse): Uint8Array { - return MsgMultiSendResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgMultiSendResponse): MsgMultiSendResponseProtoMsg { - return { - typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", - value: MsgMultiSendResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/abci/v1beta1/abci.ts b/examples/interchainjs/src/codegen/cosmos/base/abci/v1beta1/abci.ts deleted file mode 100644 index d9fa5a21..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/abci/v1beta1/abci.ts +++ /dev/null @@ -1,1853 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { Event, EventAmino, EventSDKType } from "../../../../tendermint/abci/types"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponse { - /** The block height */ - height: bigint; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - rawLog: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLog[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gasWanted: bigint; - /** Amount of gas consumed by transaction. */ - gasUsed: bigint; - /** The request transaction bytes. */ - tx: Any | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; - /** - * Events defines all the events emitted by processing a transaction. Note, - * these events include those emitted by processing all the messages and those - * emitted from the ante handler. Whereas Logs contains the events, with - * additional metadata, emitted only by processing the messages. - * - * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - */ - events: Event[]; -} -export interface TxResponseProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.TxResponse"; - value: Uint8Array; -} -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponseAmino { - /** The block height */ - height: string; - /** The transaction hash. */ - txhash: string; - /** Namespace for the Code */ - codespace: string; - /** Response code. */ - code: number; - /** Result bytes, if any. */ - data: string; - /** - * The output of the application's logger (raw string). May be - * non-deterministic. - */ - raw_log: string; - /** The output of the application's logger (typed). May be non-deterministic. */ - logs: ABCIMessageLogAmino[]; - /** Additional information. May be non-deterministic. */ - info: string; - /** Amount of gas requested for transaction. */ - gas_wanted: string; - /** Amount of gas consumed by transaction. */ - gas_used: string; - /** The request transaction bytes. */ - tx?: AnyAmino | undefined; - /** - * Time of the previous block. For heights > 1, it's the weighted median of - * the timestamps of the valid votes in the block.LastCommit. For height == 1, - * it's genesis time. - */ - timestamp: string; - /** - * Events defines all the events emitted by processing a transaction. Note, - * these events include those emitted by processing all the messages and those - * emitted from the ante handler. Whereas Logs contains the events, with - * additional metadata, emitted only by processing the messages. - * - * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - */ - events: EventAmino[]; -} -export interface TxResponseAminoMsg { - type: "cosmos-sdk/TxResponse"; - value: TxResponseAmino; -} -/** - * TxResponse defines a structure containing relevant tx data and metadata. The - * tags are stringified and the log is JSON decoded. - */ -export interface TxResponseSDKType { - height: bigint; - txhash: string; - codespace: string; - code: number; - data: string; - raw_log: string; - logs: ABCIMessageLogSDKType[]; - info: string; - gas_wanted: bigint; - gas_used: bigint; - tx: AnySDKType | undefined; - timestamp: string; - events: EventSDKType[]; -} -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLog { - msgIndex: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEvent[]; -} -export interface ABCIMessageLogProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog"; - value: Uint8Array; -} -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLogAmino { - msg_index: number; - log: string; - /** - * Events contains a slice of Event objects that were emitted during some - * execution. - */ - events: StringEventAmino[]; -} -export interface ABCIMessageLogAminoMsg { - type: "cosmos-sdk/ABCIMessageLog"; - value: ABCIMessageLogAmino; -} -/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ -export interface ABCIMessageLogSDKType { - msg_index: number; - log: string; - events: StringEventSDKType[]; -} -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEvent { - type: string; - attributes: Attribute[]; -} -export interface StringEventProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.StringEvent"; - value: Uint8Array; -} -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEventAmino { - type: string; - attributes: AttributeAmino[]; -} -export interface StringEventAminoMsg { - type: "cosmos-sdk/StringEvent"; - value: StringEventAmino; -} -/** - * StringEvent defines en Event object wrapper where all the attributes - * contain key/value pairs that are strings instead of raw bytes. - */ -export interface StringEventSDKType { - type: string; - attributes: AttributeSDKType[]; -} -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface Attribute { - key: string; - value: string; -} -export interface AttributeProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.Attribute"; - value: Uint8Array; -} -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface AttributeAmino { - key: string; - value: string; -} -export interface AttributeAminoMsg { - type: "cosmos-sdk/Attribute"; - value: AttributeAmino; -} -/** - * Attribute defines an attribute wrapper where the key and value are - * strings instead of raw bytes. - */ -export interface AttributeSDKType { - key: string; - value: string; -} -/** GasInfo defines tx execution gas context. */ -export interface GasInfo { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gasWanted: bigint; - /** GasUsed is the amount of gas actually consumed. */ - gasUsed: bigint; -} -export interface GasInfoProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.GasInfo"; - value: Uint8Array; -} -/** GasInfo defines tx execution gas context. */ -export interface GasInfoAmino { - /** GasWanted is the maximum units of work we allow this tx to perform. */ - gas_wanted: string; - /** GasUsed is the amount of gas actually consumed. */ - gas_used: string; -} -export interface GasInfoAminoMsg { - type: "cosmos-sdk/GasInfo"; - value: GasInfoAmino; -} -/** GasInfo defines tx execution gas context. */ -export interface GasInfoSDKType { - gas_wanted: bigint; - gas_used: bigint; -} -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface Result { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - * Deprecated. This field is still populated, but prefer msg_response instead - * because it also contains the Msg response typeURL. - */ - /** @deprecated */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: Event[]; - /** - * msg_responses contains the Msg handler responses type packed in Anys. - * - * Since: cosmos-sdk 0.46 - */ - msgResponses: Any[]; -} -export interface ResultProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.Result"; - value: Uint8Array; -} -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface ResultAmino { - /** - * Data is any data returned from message or handler execution. It MUST be - * length prefixed in order to separate data from multiple message executions. - * Deprecated. This field is still populated, but prefer msg_response instead - * because it also contains the Msg response typeURL. - */ - /** @deprecated */ - data: Uint8Array; - /** Log contains the log information from message or handler execution. */ - log: string; - /** - * Events contains a slice of Event objects that were emitted during message - * or handler execution. - */ - events: EventAmino[]; - /** - * msg_responses contains the Msg handler responses type packed in Anys. - * - * Since: cosmos-sdk 0.46 - */ - msg_responses: AnyAmino[]; -} -export interface ResultAminoMsg { - type: "cosmos-sdk/Result"; - value: ResultAmino; -} -/** Result is the union of ResponseFormat and ResponseCheckTx. */ -export interface ResultSDKType { - /** @deprecated */ - data: Uint8Array; - log: string; - events: EventSDKType[]; - msg_responses: AnySDKType[]; -} -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponse { - gasInfo: GasInfo | undefined; - result: Result | undefined; -} -export interface SimulationResponseProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse"; - value: Uint8Array; -} -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponseAmino { - gas_info?: GasInfoAmino | undefined; - result?: ResultAmino | undefined; -} -export interface SimulationResponseAminoMsg { - type: "cosmos-sdk/SimulationResponse"; - value: SimulationResponseAmino; -} -/** - * SimulationResponse defines the response generated when a transaction is - * successfully simulated. - */ -export interface SimulationResponseSDKType { - gas_info: GasInfoSDKType | undefined; - result: ResultSDKType | undefined; -} -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -/** @deprecated */ -export interface MsgData { - msgType: string; - data: Uint8Array; -} -export interface MsgDataProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.MsgData"; - value: Uint8Array; -} -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -/** @deprecated */ -export interface MsgDataAmino { - msg_type: string; - data: Uint8Array; -} -export interface MsgDataAminoMsg { - type: "cosmos-sdk/MsgData"; - value: MsgDataAmino; -} -/** - * MsgData defines the data returned in a Result object during message - * execution. - */ -/** @deprecated */ -export interface MsgDataSDKType { - msg_type: string; - data: Uint8Array; -} -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgData { - /** data field is deprecated and not populated. */ - /** @deprecated */ - data: MsgData[]; - /** - * msg_responses contains the Msg handler responses packed into Anys. - * - * Since: cosmos-sdk 0.46 - */ - msgResponses: Any[]; -} -export interface TxMsgDataProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData"; - value: Uint8Array; -} -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgDataAmino { - /** data field is deprecated and not populated. */ - /** @deprecated */ - data: MsgDataAmino[]; - /** - * msg_responses contains the Msg handler responses packed into Anys. - * - * Since: cosmos-sdk 0.46 - */ - msg_responses: AnyAmino[]; -} -export interface TxMsgDataAminoMsg { - type: "cosmos-sdk/TxMsgData"; - value: TxMsgDataAmino; -} -/** - * TxMsgData defines a list of MsgData. A transaction will have a MsgData object - * for each message. - */ -export interface TxMsgDataSDKType { - /** @deprecated */ - data: MsgDataSDKType[]; - msg_responses: AnySDKType[]; -} -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResult { - /** Count of all txs */ - totalCount: bigint; - /** Count of txs in current page */ - count: bigint; - /** Index of current page, start from 1 */ - pageNumber: bigint; - /** Count of total pages */ - pageTotal: bigint; - /** Max count txs per page */ - limit: bigint; - /** List of txs in current page */ - txs: TxResponse[]; -} -export interface SearchTxsResultProtoMsg { - typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult"; - value: Uint8Array; -} -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResultAmino { - /** Count of all txs */ - total_count: string; - /** Count of txs in current page */ - count: string; - /** Index of current page, start from 1 */ - page_number: string; - /** Count of total pages */ - page_total: string; - /** Max count txs per page */ - limit: string; - /** List of txs in current page */ - txs: TxResponseAmino[]; -} -export interface SearchTxsResultAminoMsg { - type: "cosmos-sdk/SearchTxsResult"; - value: SearchTxsResultAmino; -} -/** SearchTxsResult defines a structure for querying txs pageable */ -export interface SearchTxsResultSDKType { - total_count: bigint; - count: bigint; - page_number: bigint; - page_total: bigint; - limit: bigint; - txs: TxResponseSDKType[]; -} -function createBaseTxResponse(): TxResponse { - return { - height: BigInt(0), - txhash: "", - codespace: "", - code: 0, - data: "", - rawLog: "", - logs: [], - info: "", - gasWanted: BigInt(0), - gasUsed: BigInt(0), - tx: Any.fromPartial({}), - timestamp: "", - events: [] - }; -} -export const TxResponse = { - typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", - aminoType: "cosmos-sdk/TxResponse", - encode(message: TxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.txhash !== "") { - writer.uint32(18).string(message.txhash); - } - if (message.codespace !== "") { - writer.uint32(26).string(message.codespace); - } - if (message.code !== 0) { - writer.uint32(32).uint32(message.code); - } - if (message.data !== "") { - writer.uint32(42).string(message.data); - } - if (message.rawLog !== "") { - writer.uint32(50).string(message.rawLog); - } - for (const v of message.logs) { - ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.info !== "") { - writer.uint32(66).string(message.info); - } - if (message.gasWanted !== BigInt(0)) { - writer.uint32(72).int64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(80).int64(message.gasUsed); - } - if (message.tx !== undefined) { - Any.encode(message.tx, writer.uint32(90).fork()).ldelim(); - } - if (message.timestamp !== "") { - writer.uint32(98).string(message.timestamp); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(106).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - message.logs.push(ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = reader.int64(); - break; - case 10: - message.gasUsed = reader.int64(); - break; - case 11: - message.tx = Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - case 13: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxResponse { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - txhash: isSet(object.txhash) ? String(object.txhash) : "", - codespace: isSet(object.codespace) ? String(object.codespace) : "", - code: isSet(object.code) ? Number(object.code) : 0, - data: isSet(object.data) ? String(object.data) : "", - rawLog: isSet(object.rawLog) ? String(object.rawLog) : "", - logs: Array.isArray(object?.logs) ? object.logs.map((e: any) => ABCIMessageLog.fromJSON(e)) : [], - info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? BigInt(object.gasWanted.toString()) : BigInt(0), - gasUsed: isSet(object.gasUsed) ? BigInt(object.gasUsed.toString()) : BigInt(0), - tx: isSet(object.tx) ? Any.fromJSON(object.tx) : undefined, - timestamp: isSet(object.timestamp) ? String(object.timestamp) : "", - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [] - }; - }, - toJSON(message: TxResponse): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.txhash !== undefined && (obj.txhash = message.txhash); - message.codespace !== undefined && (obj.codespace = message.codespace); - message.code !== undefined && (obj.code = Math.round(message.code)); - message.data !== undefined && (obj.data = message.data); - message.rawLog !== undefined && (obj.rawLog = message.rawLog); - if (message.logs) { - obj.logs = message.logs.map(e => e ? ABCIMessageLog.toJSON(e) : undefined); - } else { - obj.logs = []; - } - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || BigInt(0)).toString()); - message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || BigInt(0)).toString()); - message.tx !== undefined && (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp); - if (message.events) { - obj.events = message.events.map(e => e ? Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromPartial(object: DeepPartial): TxResponse { - const message = createBaseTxResponse(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.txhash = object.txhash ?? ""; - message.codespace = object.codespace ?? ""; - message.code = object.code ?? 0; - message.data = object.data ?? ""; - message.rawLog = object.rawLog ?? ""; - message.logs = object.logs?.map(e => ABCIMessageLog.fromPartial(e)) || []; - message.info = object.info ?? ""; - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - message.tx = object.tx !== undefined && object.tx !== null ? Any.fromPartial(object.tx) : undefined; - message.timestamp = object.timestamp ?? ""; - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - return message; - }, - fromSDK(object: TxResponseSDKType): TxResponse { - return { - height: object?.height, - txhash: object?.txhash, - codespace: object?.codespace, - code: object?.code, - data: object?.data, - rawLog: object?.raw_log, - logs: Array.isArray(object?.logs) ? object.logs.map((e: any) => ABCIMessageLog.fromSDK(e)) : [], - info: object?.info, - gasWanted: object?.gas_wanted, - gasUsed: object?.gas_used, - tx: object.tx ? Any.fromSDK(object.tx) : undefined, - timestamp: object?.timestamp, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromSDK(e)) : [] - }; - }, - toSDK(message: TxResponse): TxResponseSDKType { - const obj: any = {}; - obj.height = message.height; - obj.txhash = message.txhash; - obj.codespace = message.codespace; - obj.code = message.code; - obj.data = message.data; - obj.raw_log = message.rawLog; - if (message.logs) { - obj.logs = message.logs.map(e => e ? ABCIMessageLog.toSDK(e) : undefined); - } else { - obj.logs = []; - } - obj.info = message.info; - obj.gas_wanted = message.gasWanted; - obj.gas_used = message.gasUsed; - message.tx !== undefined && (obj.tx = message.tx ? Any.toSDK(message.tx) : undefined); - obj.timestamp = message.timestamp; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toSDK(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAmino(object: TxResponseAmino): TxResponse { - return { - height: BigInt(object.height), - txhash: object.txhash, - codespace: object.codespace, - code: object.code, - data: object.data, - rawLog: object.raw_log, - logs: Array.isArray(object?.logs) ? object.logs.map((e: any) => ABCIMessageLog.fromAmino(e)) : [], - info: object.info, - gasWanted: BigInt(object.gas_wanted), - gasUsed: BigInt(object.gas_used), - tx: object?.tx ? Any.fromAmino(object.tx) : undefined, - timestamp: object.timestamp, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromAmino(e)) : [] - }; - }, - toAmino(message: TxResponse): TxResponseAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.txhash = message.txhash; - obj.codespace = message.codespace; - obj.code = message.code; - obj.data = message.data; - obj.raw_log = message.rawLog; - if (message.logs) { - obj.logs = message.logs.map(e => e ? ABCIMessageLog.toAmino(e) : undefined); - } else { - obj.logs = []; - } - obj.info = message.info; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; - obj.tx = message.tx ? Any.toAmino(message.tx) : undefined; - obj.timestamp = message.timestamp; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAminoMsg(object: TxResponseAminoMsg): TxResponse { - return TxResponse.fromAmino(object.value); - }, - toAminoMsg(message: TxResponse): TxResponseAminoMsg { - return { - type: "cosmos-sdk/TxResponse", - value: TxResponse.toAmino(message) - }; - }, - fromProtoMsg(message: TxResponseProtoMsg): TxResponse { - return TxResponse.decode(message.value); - }, - toProto(message: TxResponse): Uint8Array { - return TxResponse.encode(message).finish(); - }, - toProtoMsg(message: TxResponse): TxResponseProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.TxResponse", - value: TxResponse.encode(message).finish() - }; - } -}; -function createBaseABCIMessageLog(): ABCIMessageLog { - return { - msgIndex: 0, - log: "", - events: [] - }; -} -export const ABCIMessageLog = { - typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", - aminoType: "cosmos-sdk/ABCIMessageLog", - encode(message: ABCIMessageLog, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgIndex !== 0) { - writer.uint32(8).uint32(message.msgIndex); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - StringEvent.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ABCIMessageLog { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseABCIMessageLog(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ABCIMessageLog { - return { - msgIndex: isSet(object.msgIndex) ? Number(object.msgIndex) : 0, - log: isSet(object.log) ? String(object.log) : "", - events: Array.isArray(object?.events) ? object.events.map((e: any) => StringEvent.fromJSON(e)) : [] - }; - }, - toJSON(message: ABCIMessageLog): unknown { - const obj: any = {}; - message.msgIndex !== undefined && (obj.msgIndex = Math.round(message.msgIndex)); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map(e => e ? StringEvent.toJSON(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ABCIMessageLog { - const message = createBaseABCIMessageLog(); - message.msgIndex = object.msgIndex ?? 0; - message.log = object.log ?? ""; - message.events = object.events?.map(e => StringEvent.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ABCIMessageLogSDKType): ABCIMessageLog { - return { - msgIndex: object?.msg_index, - log: object?.log, - events: Array.isArray(object?.events) ? object.events.map((e: any) => StringEvent.fromSDK(e)) : [] - }; - }, - toSDK(message: ABCIMessageLog): ABCIMessageLogSDKType { - const obj: any = {}; - obj.msg_index = message.msgIndex; - obj.log = message.log; - if (message.events) { - obj.events = message.events.map(e => e ? StringEvent.toSDK(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAmino(object: ABCIMessageLogAmino): ABCIMessageLog { - return { - msgIndex: object.msg_index, - log: object.log, - events: Array.isArray(object?.events) ? object.events.map((e: any) => StringEvent.fromAmino(e)) : [] - }; - }, - toAmino(message: ABCIMessageLog): ABCIMessageLogAmino { - const obj: any = {}; - obj.msg_index = message.msgIndex; - obj.log = message.log; - if (message.events) { - obj.events = message.events.map(e => e ? StringEvent.toAmino(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAminoMsg(object: ABCIMessageLogAminoMsg): ABCIMessageLog { - return ABCIMessageLog.fromAmino(object.value); - }, - toAminoMsg(message: ABCIMessageLog): ABCIMessageLogAminoMsg { - return { - type: "cosmos-sdk/ABCIMessageLog", - value: ABCIMessageLog.toAmino(message) - }; - }, - fromProtoMsg(message: ABCIMessageLogProtoMsg): ABCIMessageLog { - return ABCIMessageLog.decode(message.value); - }, - toProto(message: ABCIMessageLog): Uint8Array { - return ABCIMessageLog.encode(message).finish(); - }, - toProtoMsg(message: ABCIMessageLog): ABCIMessageLogProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.ABCIMessageLog", - value: ABCIMessageLog.encode(message).finish() - }; - } -}; -function createBaseStringEvent(): StringEvent { - return { - type: "", - attributes: [] - }; -} -export const StringEvent = { - typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", - aminoType: "cosmos-sdk/StringEvent", - encode(message: StringEvent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - Attribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StringEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStringEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): StringEvent { - return { - type: isSet(object.type) ? String(object.type) : "", - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] - }; - }, - toJSON(message: StringEvent): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map(e => e ? Attribute.toJSON(e) : undefined); - } else { - obj.attributes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): StringEvent { - const message = createBaseStringEvent(); - message.type = object.type ?? ""; - message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; - return message; - }, - fromSDK(object: StringEventSDKType): StringEvent { - return { - type: object?.type, - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromSDK(e)) : [] - }; - }, - toSDK(message: StringEvent): StringEventSDKType { - const obj: any = {}; - obj.type = message.type; - if (message.attributes) { - obj.attributes = message.attributes.map(e => e ? Attribute.toSDK(e) : undefined); - } else { - obj.attributes = []; - } - return obj; - }, - fromAmino(object: StringEventAmino): StringEvent { - return { - type: object.type, - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromAmino(e)) : [] - }; - }, - toAmino(message: StringEvent): StringEventAmino { - const obj: any = {}; - obj.type = message.type; - if (message.attributes) { - obj.attributes = message.attributes.map(e => e ? Attribute.toAmino(e) : undefined); - } else { - obj.attributes = []; - } - return obj; - }, - fromAminoMsg(object: StringEventAminoMsg): StringEvent { - return StringEvent.fromAmino(object.value); - }, - toAminoMsg(message: StringEvent): StringEventAminoMsg { - return { - type: "cosmos-sdk/StringEvent", - value: StringEvent.toAmino(message) - }; - }, - fromProtoMsg(message: StringEventProtoMsg): StringEvent { - return StringEvent.decode(message.value); - }, - toProto(message: StringEvent): Uint8Array { - return StringEvent.encode(message).finish(); - }, - toProtoMsg(message: StringEvent): StringEventProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.StringEvent", - value: StringEvent.encode(message).finish() - }; - } -}; -function createBaseAttribute(): Attribute { - return { - key: "", - value: "" - }; -} -export const Attribute = { - typeUrl: "/cosmos.base.abci.v1beta1.Attribute", - aminoType: "cosmos-sdk/Attribute", - encode(message: Attribute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Attribute { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAttribute(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Attribute { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "" - }; - }, - toJSON(message: Attribute): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object: DeepPartial): Attribute { - const message = createBaseAttribute(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, - fromSDK(object: AttributeSDKType): Attribute { - return { - key: object?.key, - value: object?.value - }; - }, - toSDK(message: Attribute): AttributeSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: AttributeAmino): Attribute { - return { - key: object.key, - value: object.value - }; - }, - toAmino(message: Attribute): AttributeAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: AttributeAminoMsg): Attribute { - return Attribute.fromAmino(object.value); - }, - toAminoMsg(message: Attribute): AttributeAminoMsg { - return { - type: "cosmos-sdk/Attribute", - value: Attribute.toAmino(message) - }; - }, - fromProtoMsg(message: AttributeProtoMsg): Attribute { - return Attribute.decode(message.value); - }, - toProto(message: Attribute): Uint8Array { - return Attribute.encode(message).finish(); - }, - toProtoMsg(message: Attribute): AttributeProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.Attribute", - value: Attribute.encode(message).finish() - }; - } -}; -function createBaseGasInfo(): GasInfo { - return { - gasWanted: BigInt(0), - gasUsed: BigInt(0) - }; -} -export const GasInfo = { - typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", - aminoType: "cosmos-sdk/GasInfo", - encode(message: GasInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gasWanted !== BigInt(0)) { - writer.uint32(8).uint64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(16).uint64(message.gasUsed); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GasInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGasInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = reader.uint64(); - break; - case 2: - message.gasUsed = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GasInfo { - return { - gasWanted: isSet(object.gasWanted) ? BigInt(object.gasWanted.toString()) : BigInt(0), - gasUsed: isSet(object.gasUsed) ? BigInt(object.gasUsed.toString()) : BigInt(0) - }; - }, - toJSON(message: GasInfo): unknown { - const obj: any = {}; - message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || BigInt(0)).toString()); - message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GasInfo { - const message = createBaseGasInfo(); - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GasInfoSDKType): GasInfo { - return { - gasWanted: object?.gas_wanted, - gasUsed: object?.gas_used - }; - }, - toSDK(message: GasInfo): GasInfoSDKType { - const obj: any = {}; - obj.gas_wanted = message.gasWanted; - obj.gas_used = message.gasUsed; - return obj; - }, - fromAmino(object: GasInfoAmino): GasInfo { - return { - gasWanted: BigInt(object.gas_wanted), - gasUsed: BigInt(object.gas_used) - }; - }, - toAmino(message: GasInfo): GasInfoAmino { - const obj: any = {}; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GasInfoAminoMsg): GasInfo { - return GasInfo.fromAmino(object.value); - }, - toAminoMsg(message: GasInfo): GasInfoAminoMsg { - return { - type: "cosmos-sdk/GasInfo", - value: GasInfo.toAmino(message) - }; - }, - fromProtoMsg(message: GasInfoProtoMsg): GasInfo { - return GasInfo.decode(message.value); - }, - toProto(message: GasInfo): Uint8Array { - return GasInfo.encode(message).finish(); - }, - toProtoMsg(message: GasInfo): GasInfoProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.GasInfo", - value: GasInfo.encode(message).finish() - }; - } -}; -function createBaseResult(): Result { - return { - data: new Uint8Array(), - log: "", - events: [], - msgResponses: [] - }; -} -export const Result = { - typeUrl: "/cosmos.base.abci.v1beta1.Result", - aminoType: "cosmos-sdk/Result", - encode(message: Result, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(18).string(message.log); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.msgResponses) { - Any.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Result { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 4: - message.msgResponses.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Result { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - log: isSet(object.log) ? String(object.log) : "", - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], - msgResponses: Array.isArray(object?.msgResponses) ? object.msgResponses.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: Result): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - if (message.events) { - obj.events = message.events.map(e => e ? Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - if (message.msgResponses) { - obj.msgResponses = message.msgResponses.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.msgResponses = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Result { - const message = createBaseResult(); - message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.msgResponses = object.msgResponses?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ResultSDKType): Result { - return { - data: object?.data, - log: object?.log, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromSDK(e)) : [], - msgResponses: Array.isArray(object?.msg_responses) ? object.msg_responses.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: Result): ResultSDKType { - const obj: any = {}; - obj.data = message.data; - obj.log = message.log; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toSDK(e) : undefined); - } else { - obj.events = []; - } - if (message.msgResponses) { - obj.msg_responses = message.msgResponses.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.msg_responses = []; - } - return obj; - }, - fromAmino(object: ResultAmino): Result { - return { - data: object.data, - log: object.log, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromAmino(e)) : [], - msgResponses: Array.isArray(object?.msg_responses) ? object.msg_responses.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: Result): ResultAmino { - const obj: any = {}; - obj.data = message.data; - obj.log = message.log; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); - } else { - obj.events = []; - } - if (message.msgResponses) { - obj.msg_responses = message.msgResponses.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.msg_responses = []; - } - return obj; - }, - fromAminoMsg(object: ResultAminoMsg): Result { - return Result.fromAmino(object.value); - }, - toAminoMsg(message: Result): ResultAminoMsg { - return { - type: "cosmos-sdk/Result", - value: Result.toAmino(message) - }; - }, - fromProtoMsg(message: ResultProtoMsg): Result { - return Result.decode(message.value); - }, - toProto(message: Result): Uint8Array { - return Result.encode(message).finish(); - }, - toProtoMsg(message: Result): ResultProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.Result", - value: Result.encode(message).finish() - }; - } -}; -function createBaseSimulationResponse(): SimulationResponse { - return { - gasInfo: GasInfo.fromPartial({}), - result: Result.fromPartial({}) - }; -} -export const SimulationResponse = { - typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", - aminoType: "cosmos-sdk/SimulationResponse", - encode(message: SimulationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimulationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimulationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SimulationResponse { - return { - gasInfo: isSet(object.gasInfo) ? GasInfo.fromJSON(object.gasInfo) : undefined, - result: isSet(object.result) ? Result.fromJSON(object.result) : undefined - }; - }, - toJSON(message: SimulationResponse): unknown { - const obj: any = {}; - message.gasInfo !== undefined && (obj.gasInfo = message.gasInfo ? GasInfo.toJSON(message.gasInfo) : undefined); - message.result !== undefined && (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SimulationResponse { - const message = createBaseSimulationResponse(); - message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null ? GasInfo.fromPartial(object.gasInfo) : undefined; - message.result = object.result !== undefined && object.result !== null ? Result.fromPartial(object.result) : undefined; - return message; - }, - fromSDK(object: SimulationResponseSDKType): SimulationResponse { - return { - gasInfo: object.gas_info ? GasInfo.fromSDK(object.gas_info) : undefined, - result: object.result ? Result.fromSDK(object.result) : undefined - }; - }, - toSDK(message: SimulationResponse): SimulationResponseSDKType { - const obj: any = {}; - message.gasInfo !== undefined && (obj.gas_info = message.gasInfo ? GasInfo.toSDK(message.gasInfo) : undefined); - message.result !== undefined && (obj.result = message.result ? Result.toSDK(message.result) : undefined); - return obj; - }, - fromAmino(object: SimulationResponseAmino): SimulationResponse { - return { - gasInfo: object?.gas_info ? GasInfo.fromAmino(object.gas_info) : undefined, - result: object?.result ? Result.fromAmino(object.result) : undefined - }; - }, - toAmino(message: SimulationResponse): SimulationResponseAmino { - const obj: any = {}; - obj.gas_info = message.gasInfo ? GasInfo.toAmino(message.gasInfo) : undefined; - obj.result = message.result ? Result.toAmino(message.result) : undefined; - return obj; - }, - fromAminoMsg(object: SimulationResponseAminoMsg): SimulationResponse { - return SimulationResponse.fromAmino(object.value); - }, - toAminoMsg(message: SimulationResponse): SimulationResponseAminoMsg { - return { - type: "cosmos-sdk/SimulationResponse", - value: SimulationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SimulationResponseProtoMsg): SimulationResponse { - return SimulationResponse.decode(message.value); - }, - toProto(message: SimulationResponse): Uint8Array { - return SimulationResponse.encode(message).finish(); - }, - toProtoMsg(message: SimulationResponse): SimulationResponseProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.SimulationResponse", - value: SimulationResponse.encode(message).finish() - }; - } -}; -function createBaseMsgData(): MsgData { - return { - msgType: "", - data: new Uint8Array() - }; -} -export const MsgData = { - typeUrl: "/cosmos.base.abci.v1beta1.MsgData", - aminoType: "cosmos-sdk/MsgData", - encode(message: MsgData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgType !== "") { - writer.uint32(10).string(message.msgType); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgData { - return { - msgType: isSet(object.msgType) ? String(object.msgType) : "", - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: MsgData): unknown { - const obj: any = {}; - message.msgType !== undefined && (obj.msgType = message.msgType); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgData { - const message = createBaseMsgData(); - message.msgType = object.msgType ?? ""; - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgDataSDKType): MsgData { - return { - msgType: object?.msg_type, - data: object?.data - }; - }, - toSDK(message: MsgData): MsgDataSDKType { - const obj: any = {}; - obj.msg_type = message.msgType; - obj.data = message.data; - return obj; - }, - fromAmino(object: MsgDataAmino): MsgData { - return { - msgType: object.msg_type, - data: object.data - }; - }, - toAmino(message: MsgData): MsgDataAmino { - const obj: any = {}; - obj.msg_type = message.msgType; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: MsgDataAminoMsg): MsgData { - return MsgData.fromAmino(object.value); - }, - toAminoMsg(message: MsgData): MsgDataAminoMsg { - return { - type: "cosmos-sdk/MsgData", - value: MsgData.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDataProtoMsg): MsgData { - return MsgData.decode(message.value); - }, - toProto(message: MsgData): Uint8Array { - return MsgData.encode(message).finish(); - }, - toProtoMsg(message: MsgData): MsgDataProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.MsgData", - value: MsgData.encode(message).finish() - }; - } -}; -function createBaseTxMsgData(): TxMsgData { - return { - data: [], - msgResponses: [] - }; -} -export const TxMsgData = { - typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", - aminoType: "cosmos-sdk/TxMsgData", - encode(message: TxMsgData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.msgResponses) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxMsgData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxMsgData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(MsgData.decode(reader, reader.uint32())); - break; - case 2: - message.msgResponses.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxMsgData { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => MsgData.fromJSON(e)) : [], - msgResponses: Array.isArray(object?.msgResponses) ? object.msgResponses.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: TxMsgData): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? MsgData.toJSON(e) : undefined); - } else { - obj.data = []; - } - if (message.msgResponses) { - obj.msgResponses = message.msgResponses.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.msgResponses = []; - } - return obj; - }, - fromPartial(object: DeepPartial): TxMsgData { - const message = createBaseTxMsgData(); - message.data = object.data?.map(e => MsgData.fromPartial(e)) || []; - message.msgResponses = object.msgResponses?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: TxMsgDataSDKType): TxMsgData { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => MsgData.fromSDK(e)) : [], - msgResponses: Array.isArray(object?.msg_responses) ? object.msg_responses.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: TxMsgData): TxMsgDataSDKType { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? MsgData.toSDK(e) : undefined); - } else { - obj.data = []; - } - if (message.msgResponses) { - obj.msg_responses = message.msgResponses.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.msg_responses = []; - } - return obj; - }, - fromAmino(object: TxMsgDataAmino): TxMsgData { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => MsgData.fromAmino(e)) : [], - msgResponses: Array.isArray(object?.msg_responses) ? object.msg_responses.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: TxMsgData): TxMsgDataAmino { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? MsgData.toAmino(e) : undefined); - } else { - obj.data = []; - } - if (message.msgResponses) { - obj.msg_responses = message.msgResponses.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.msg_responses = []; - } - return obj; - }, - fromAminoMsg(object: TxMsgDataAminoMsg): TxMsgData { - return TxMsgData.fromAmino(object.value); - }, - toAminoMsg(message: TxMsgData): TxMsgDataAminoMsg { - return { - type: "cosmos-sdk/TxMsgData", - value: TxMsgData.toAmino(message) - }; - }, - fromProtoMsg(message: TxMsgDataProtoMsg): TxMsgData { - return TxMsgData.decode(message.value); - }, - toProto(message: TxMsgData): Uint8Array { - return TxMsgData.encode(message).finish(); - }, - toProtoMsg(message: TxMsgData): TxMsgDataProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.TxMsgData", - value: TxMsgData.encode(message).finish() - }; - } -}; -function createBaseSearchTxsResult(): SearchTxsResult { - return { - totalCount: BigInt(0), - count: BigInt(0), - pageNumber: BigInt(0), - pageTotal: BigInt(0), - limit: BigInt(0), - txs: [] - }; -} -export const SearchTxsResult = { - typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", - aminoType: "cosmos-sdk/SearchTxsResult", - encode(message: SearchTxsResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.totalCount !== BigInt(0)) { - writer.uint32(8).uint64(message.totalCount); - } - if (message.count !== BigInt(0)) { - writer.uint32(16).uint64(message.count); - } - if (message.pageNumber !== BigInt(0)) { - writer.uint32(24).uint64(message.pageNumber); - } - if (message.pageTotal !== BigInt(0)) { - writer.uint32(32).uint64(message.pageTotal); - } - if (message.limit !== BigInt(0)) { - writer.uint32(40).uint64(message.limit); - } - for (const v of message.txs) { - TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SearchTxsResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchTxsResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = reader.uint64(); - break; - case 2: - message.count = reader.uint64(); - break; - case 3: - message.pageNumber = reader.uint64(); - break; - case 4: - message.pageTotal = reader.uint64(); - break; - case 5: - message.limit = reader.uint64(); - break; - case 6: - message.txs.push(TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SearchTxsResult { - return { - totalCount: isSet(object.totalCount) ? BigInt(object.totalCount.toString()) : BigInt(0), - count: isSet(object.count) ? BigInt(object.count.toString()) : BigInt(0), - pageNumber: isSet(object.pageNumber) ? BigInt(object.pageNumber.toString()) : BigInt(0), - pageTotal: isSet(object.pageTotal) ? BigInt(object.pageTotal.toString()) : BigInt(0), - limit: isSet(object.limit) ? BigInt(object.limit.toString()) : BigInt(0), - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => TxResponse.fromJSON(e)) : [] - }; - }, - toJSON(message: SearchTxsResult): unknown { - const obj: any = {}; - message.totalCount !== undefined && (obj.totalCount = (message.totalCount || BigInt(0)).toString()); - message.count !== undefined && (obj.count = (message.count || BigInt(0)).toString()); - message.pageNumber !== undefined && (obj.pageNumber = (message.pageNumber || BigInt(0)).toString()); - message.pageTotal !== undefined && (obj.pageTotal = (message.pageTotal || BigInt(0)).toString()); - message.limit !== undefined && (obj.limit = (message.limit || BigInt(0)).toString()); - if (message.txs) { - obj.txs = message.txs.map(e => e ? TxResponse.toJSON(e) : undefined); - } else { - obj.txs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SearchTxsResult { - const message = createBaseSearchTxsResult(); - message.totalCount = object.totalCount !== undefined && object.totalCount !== null ? BigInt(object.totalCount.toString()) : BigInt(0); - message.count = object.count !== undefined && object.count !== null ? BigInt(object.count.toString()) : BigInt(0); - message.pageNumber = object.pageNumber !== undefined && object.pageNumber !== null ? BigInt(object.pageNumber.toString()) : BigInt(0); - message.pageTotal = object.pageTotal !== undefined && object.pageTotal !== null ? BigInt(object.pageTotal.toString()) : BigInt(0); - message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); - message.txs = object.txs?.map(e => TxResponse.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SearchTxsResultSDKType): SearchTxsResult { - return { - totalCount: object?.total_count, - count: object?.count, - pageNumber: object?.page_number, - pageTotal: object?.page_total, - limit: object?.limit, - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => TxResponse.fromSDK(e)) : [] - }; - }, - toSDK(message: SearchTxsResult): SearchTxsResultSDKType { - const obj: any = {}; - obj.total_count = message.totalCount; - obj.count = message.count; - obj.page_number = message.pageNumber; - obj.page_total = message.pageTotal; - obj.limit = message.limit; - if (message.txs) { - obj.txs = message.txs.map(e => e ? TxResponse.toSDK(e) : undefined); - } else { - obj.txs = []; - } - return obj; - }, - fromAmino(object: SearchTxsResultAmino): SearchTxsResult { - return { - totalCount: BigInt(object.total_count), - count: BigInt(object.count), - pageNumber: BigInt(object.page_number), - pageTotal: BigInt(object.page_total), - limit: BigInt(object.limit), - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => TxResponse.fromAmino(e)) : [] - }; - }, - toAmino(message: SearchTxsResult): SearchTxsResultAmino { - const obj: any = {}; - obj.total_count = message.totalCount ? message.totalCount.toString() : undefined; - obj.count = message.count ? message.count.toString() : undefined; - obj.page_number = message.pageNumber ? message.pageNumber.toString() : undefined; - obj.page_total = message.pageTotal ? message.pageTotal.toString() : undefined; - obj.limit = message.limit ? message.limit.toString() : undefined; - if (message.txs) { - obj.txs = message.txs.map(e => e ? TxResponse.toAmino(e) : undefined); - } else { - obj.txs = []; - } - return obj; - }, - fromAminoMsg(object: SearchTxsResultAminoMsg): SearchTxsResult { - return SearchTxsResult.fromAmino(object.value); - }, - toAminoMsg(message: SearchTxsResult): SearchTxsResultAminoMsg { - return { - type: "cosmos-sdk/SearchTxsResult", - value: SearchTxsResult.toAmino(message) - }; - }, - fromProtoMsg(message: SearchTxsResultProtoMsg): SearchTxsResult { - return SearchTxsResult.decode(message.value); - }, - toProto(message: SearchTxsResult): Uint8Array { - return SearchTxsResult.encode(message).finish(); - }, - toProtoMsg(message: SearchTxsResult): SearchTxsResultProtoMsg { - return { - typeUrl: "/cosmos.base.abci.v1beta1.SearchTxsResult", - value: SearchTxsResult.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/kv/v1beta1/kv.ts b/examples/interchainjs/src/codegen/cosmos/base/kv/v1beta1/kv.ts deleted file mode 100644 index c745bc07..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/kv/v1beta1/kv.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** Pairs defines a repeated slice of Pair objects. */ -export interface Pairs { - pairs: Pair[]; -} -export interface PairsProtoMsg { - typeUrl: "/cosmos.base.kv.v1beta1.Pairs"; - value: Uint8Array; -} -/** Pairs defines a repeated slice of Pair objects. */ -export interface PairsAmino { - pairs: PairAmino[]; -} -export interface PairsAminoMsg { - type: "cosmos-sdk/Pairs"; - value: PairsAmino; -} -/** Pairs defines a repeated slice of Pair objects. */ -export interface PairsSDKType { - pairs: PairSDKType[]; -} -/** Pair defines a key/value bytes tuple. */ -export interface Pair { - key: Uint8Array; - value: Uint8Array; -} -export interface PairProtoMsg { - typeUrl: "/cosmos.base.kv.v1beta1.Pair"; - value: Uint8Array; -} -/** Pair defines a key/value bytes tuple. */ -export interface PairAmino { - key: Uint8Array; - value: Uint8Array; -} -export interface PairAminoMsg { - type: "cosmos-sdk/Pair"; - value: PairAmino; -} -/** Pair defines a key/value bytes tuple. */ -export interface PairSDKType { - key: Uint8Array; - value: Uint8Array; -} -function createBasePairs(): Pairs { - return { - pairs: [] - }; -} -export const Pairs = { - typeUrl: "/cosmos.base.kv.v1beta1.Pairs", - aminoType: "cosmos-sdk/Pairs", - encode(message: Pairs, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pairs) { - Pair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Pairs { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePairs(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(Pair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Pairs { - return { - pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => Pair.fromJSON(e)) : [] - }; - }, - toJSON(message: Pairs): unknown { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map(e => e ? Pair.toJSON(e) : undefined); - } else { - obj.pairs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Pairs { - const message = createBasePairs(); - message.pairs = object.pairs?.map(e => Pair.fromPartial(e)) || []; - return message; - }, - fromSDK(object: PairsSDKType): Pairs { - return { - pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => Pair.fromSDK(e)) : [] - }; - }, - toSDK(message: Pairs): PairsSDKType { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map(e => e ? Pair.toSDK(e) : undefined); - } else { - obj.pairs = []; - } - return obj; - }, - fromAmino(object: PairsAmino): Pairs { - return { - pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => Pair.fromAmino(e)) : [] - }; - }, - toAmino(message: Pairs): PairsAmino { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map(e => e ? Pair.toAmino(e) : undefined); - } else { - obj.pairs = []; - } - return obj; - }, - fromAminoMsg(object: PairsAminoMsg): Pairs { - return Pairs.fromAmino(object.value); - }, - toAminoMsg(message: Pairs): PairsAminoMsg { - return { - type: "cosmos-sdk/Pairs", - value: Pairs.toAmino(message) - }; - }, - fromProtoMsg(message: PairsProtoMsg): Pairs { - return Pairs.decode(message.value); - }, - toProto(message: Pairs): Uint8Array { - return Pairs.encode(message).finish(); - }, - toProtoMsg(message: Pairs): PairsProtoMsg { - return { - typeUrl: "/cosmos.base.kv.v1beta1.Pairs", - value: Pairs.encode(message).finish() - }; - } -}; -function createBasePair(): Pair { - return { - key: new Uint8Array(), - value: new Uint8Array() - }; -} -export const Pair = { - typeUrl: "/cosmos.base.kv.v1beta1.Pair", - aminoType: "cosmos-sdk/Pair", - encode(message: Pair, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Pair { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePair(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Pair { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() - }; - }, - toJSON(message: Pair): unknown { - 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())); - return obj; - }, - fromPartial(object: DeepPartial): Pair { - const message = createBasePair(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - return message; - }, - fromSDK(object: PairSDKType): Pair { - return { - key: object?.key, - value: object?.value - }; - }, - toSDK(message: Pair): PairSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: PairAmino): Pair { - return { - key: object.key, - value: object.value - }; - }, - toAmino(message: Pair): PairAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: PairAminoMsg): Pair { - return Pair.fromAmino(object.value); - }, - toAminoMsg(message: Pair): PairAminoMsg { - return { - type: "cosmos-sdk/Pair", - value: Pair.toAmino(message) - }; - }, - fromProtoMsg(message: PairProtoMsg): Pair { - return Pair.decode(message.value); - }, - toProto(message: Pair): Uint8Array { - return Pair.encode(message).finish(); - }, - toProtoMsg(message: Pair): PairProtoMsg { - return { - typeUrl: "/cosmos.base.kv.v1beta1.Pair", - value: Pair.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/query/v1beta1/pagination.ts b/examples/interchainjs/src/codegen/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index 92a269bc..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,419 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequest { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: bigint; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: bigint; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - countTotal: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -export interface PageRequestProtoMsg { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest"; - value: Uint8Array; -} -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequestAmino { - /** - * key is a value returned in PageResponse.next_key to begin - * querying the next page most efficiently. Only one of offset or key - * should be set. - */ - key: Uint8Array; - /** - * offset is a numeric offset that can be used when key is unavailable. - * It is less efficient than using key. Only one of offset or key should - * be set. - */ - offset: string; - /** - * limit is the total number of results to be returned in the result page. - * If left empty it will default to a value to be set by each app. - */ - limit: string; - /** - * count_total is set to true to indicate that the result set should include - * a count of the total number of items available for pagination in UIs. - * count_total is only respected when offset is used. It is ignored when key - * is set. - */ - count_total: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; -} -export interface PageRequestAminoMsg { - type: "cosmos-sdk/PageRequest"; - value: PageRequestAmino; -} -/** - * PageRequest is to be embedded in gRPC request messages for efficient - * pagination. Ex: - * - * message SomeRequest { - * Foo some_parameter = 1; - * PageRequest pagination = 2; - * } - */ -export interface PageRequestSDKType { - key: Uint8Array; - offset: bigint; - limit: bigint; - count_total: boolean; - reverse: boolean; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponse { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently. It will be empty if - * there are no more results. - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: bigint; -} -export interface PageResponseProtoMsg { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse"; - value: Uint8Array; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponseAmino { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently. It will be empty if - * there are no more results. - */ - next_key: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: string; -} -export interface PageResponseAminoMsg { - type: "cosmos-sdk/PageResponse"; - value: PageResponseAmino; -} -/** - * PageResponse is to be embedded in gRPC response messages where the - * corresponding request message has used PageRequest. - * - * message SomeResponse { - * repeated Bar results = 1; - * PageResponse page = 2; - * } - */ -export interface PageResponseSDKType { - next_key: Uint8Array; - total: bigint; -} -function createBasePageRequest(): PageRequest { - return { - key: new Uint8Array(), - offset: BigInt(0), - limit: BigInt(0), - countTotal: false, - reverse: false - }; -} -export const PageRequest = { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest", - aminoType: "cosmos-sdk/PageRequest", - encode(message: PageRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.offset !== BigInt(0)) { - writer.uint32(16).uint64(message.offset); - } - if (message.limit !== BigInt(0)) { - writer.uint32(24).uint64(message.limit); - } - if (message.countTotal === true) { - writer.uint32(32).bool(message.countTotal); - } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePageRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = reader.uint64(); - break; - case 3: - message.limit = reader.uint64(); - break; - case 4: - message.countTotal = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PageRequest { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - offset: isSet(object.offset) ? BigInt(object.offset.toString()) : BigInt(0), - limit: isSet(object.limit) ? BigInt(object.limit.toString()) : BigInt(0), - countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false, - reverse: isSet(object.reverse) ? Boolean(object.reverse) : false - }; - }, - toJSON(message: PageRequest): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.offset !== undefined && (obj.offset = (message.offset || BigInt(0)).toString()); - message.limit !== undefined && (obj.limit = (message.limit || BigInt(0)).toString()); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - fromPartial(object: DeepPartial): PageRequest { - const message = createBasePageRequest(); - message.key = object.key ?? new Uint8Array(); - message.offset = object.offset !== undefined && object.offset !== null ? BigInt(object.offset.toString()) : BigInt(0); - message.limit = object.limit !== undefined && object.limit !== null ? BigInt(object.limit.toString()) : BigInt(0); - message.countTotal = object.countTotal ?? false; - message.reverse = object.reverse ?? false; - return message; - }, - fromSDK(object: PageRequestSDKType): PageRequest { - return { - key: object?.key, - offset: object?.offset, - limit: object?.limit, - countTotal: object?.count_total, - reverse: object?.reverse - }; - }, - toSDK(message: PageRequest): PageRequestSDKType { - const obj: any = {}; - obj.key = message.key; - obj.offset = message.offset; - obj.limit = message.limit; - obj.count_total = message.countTotal; - obj.reverse = message.reverse; - return obj; - }, - fromAmino(object: PageRequestAmino): PageRequest { - return { - key: object.key, - offset: BigInt(object.offset), - limit: BigInt(object.limit), - countTotal: object.count_total, - reverse: object.reverse - }; - }, - toAmino(message: PageRequest): PageRequestAmino { - const obj: any = {}; - obj.key = message.key; - obj.offset = message.offset ? message.offset.toString() : undefined; - obj.limit = message.limit ? message.limit.toString() : undefined; - obj.count_total = message.countTotal; - obj.reverse = message.reverse; - return obj; - }, - fromAminoMsg(object: PageRequestAminoMsg): PageRequest { - return PageRequest.fromAmino(object.value); - }, - toAminoMsg(message: PageRequest): PageRequestAminoMsg { - return { - type: "cosmos-sdk/PageRequest", - value: PageRequest.toAmino(message) - }; - }, - fromProtoMsg(message: PageRequestProtoMsg): PageRequest { - return PageRequest.decode(message.value); - }, - toProto(message: PageRequest): Uint8Array { - return PageRequest.encode(message).finish(); - }, - toProtoMsg(message: PageRequest): PageRequestProtoMsg { - return { - typeUrl: "/cosmos.base.query.v1beta1.PageRequest", - value: PageRequest.encode(message).finish() - }; - } -}; -function createBasePageResponse(): PageResponse { - return { - nextKey: new Uint8Array(), - total: BigInt(0) - }; -} -export const PageResponse = { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse", - aminoType: "cosmos-sdk/PageResponse", - encode(message: PageResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.nextKey.length !== 0) { - writer.uint32(10).bytes(message.nextKey); - } - if (message.total !== BigInt(0)) { - writer.uint32(16).uint64(message.total); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePageResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PageResponse { - return { - nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(), - total: isSet(object.total) ? BigInt(object.total.toString()) : BigInt(0) - }; - }, - toJSON(message: PageResponse): unknown { - const obj: any = {}; - message.nextKey !== undefined && (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); - message.total !== undefined && (obj.total = (message.total || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): PageResponse { - const message = createBasePageResponse(); - message.nextKey = object.nextKey ?? new Uint8Array(); - message.total = object.total !== undefined && object.total !== null ? BigInt(object.total.toString()) : BigInt(0); - return message; - }, - fromSDK(object: PageResponseSDKType): PageResponse { - return { - nextKey: object?.next_key, - total: object?.total - }; - }, - toSDK(message: PageResponse): PageResponseSDKType { - const obj: any = {}; - obj.next_key = message.nextKey; - obj.total = message.total; - return obj; - }, - fromAmino(object: PageResponseAmino): PageResponse { - return { - nextKey: object.next_key, - total: BigInt(object.total) - }; - }, - toAmino(message: PageResponse): PageResponseAmino { - const obj: any = {}; - obj.next_key = message.nextKey; - obj.total = message.total ? message.total.toString() : undefined; - return obj; - }, - fromAminoMsg(object: PageResponseAminoMsg): PageResponse { - return PageResponse.fromAmino(object.value); - }, - toAminoMsg(message: PageResponse): PageResponseAminoMsg { - return { - type: "cosmos-sdk/PageResponse", - value: PageResponse.toAmino(message) - }; - }, - fromProtoMsg(message: PageResponseProtoMsg): PageResponse { - return PageResponse.decode(message.value); - }, - toProto(message: PageResponse): Uint8Array { - return PageResponse.encode(message).finish(); - }, - toProtoMsg(message: PageResponse): PageResponseProtoMsg { - return { - typeUrl: "/cosmos.base.query.v1beta1.PageResponse", - value: PageResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/reflection/v1beta1/reflection.ts b/examples/interchainjs/src/codegen/cosmos/base/reflection/v1beta1/reflection.ts deleted file mode 100644 index 88dcae84..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/reflection/v1beta1/reflection.ts +++ /dev/null @@ -1,456 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, isSet } from "../../../../helpers"; -/** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesRequest {} -export interface ListAllInterfacesRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest"; - value: Uint8Array; -} -/** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesRequestAmino {} -export interface ListAllInterfacesRequestAminoMsg { - type: "cosmos-sdk/ListAllInterfacesRequest"; - value: ListAllInterfacesRequestAmino; -} -/** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesRequestSDKType {} -/** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesResponse { - /** interface_names is an array of all the registered interfaces. */ - interfaceNames: string[]; -} -export interface ListAllInterfacesResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse"; - value: Uint8Array; -} -/** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesResponseAmino { - /** interface_names is an array of all the registered interfaces. */ - interface_names: string[]; -} -export interface ListAllInterfacesResponseAminoMsg { - type: "cosmos-sdk/ListAllInterfacesResponse"; - value: ListAllInterfacesResponseAmino; -} -/** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesResponseSDKType { - interface_names: string[]; -} -/** - * ListImplementationsRequest is the request type of the ListImplementations - * RPC. - */ -export interface ListImplementationsRequest { - /** interface_name defines the interface to query the implementations for. */ - interfaceName: string; -} -export interface ListImplementationsRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest"; - value: Uint8Array; -} -/** - * ListImplementationsRequest is the request type of the ListImplementations - * RPC. - */ -export interface ListImplementationsRequestAmino { - /** interface_name defines the interface to query the implementations for. */ - interface_name: string; -} -export interface ListImplementationsRequestAminoMsg { - type: "cosmos-sdk/ListImplementationsRequest"; - value: ListImplementationsRequestAmino; -} -/** - * ListImplementationsRequest is the request type of the ListImplementations - * RPC. - */ -export interface ListImplementationsRequestSDKType { - interface_name: string; -} -/** - * ListImplementationsResponse is the response type of the ListImplementations - * RPC. - */ -export interface ListImplementationsResponse { - implementationMessageNames: string[]; -} -export interface ListImplementationsResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse"; - value: Uint8Array; -} -/** - * ListImplementationsResponse is the response type of the ListImplementations - * RPC. - */ -export interface ListImplementationsResponseAmino { - implementation_message_names: string[]; -} -export interface ListImplementationsResponseAminoMsg { - type: "cosmos-sdk/ListImplementationsResponse"; - value: ListImplementationsResponseAmino; -} -/** - * ListImplementationsResponse is the response type of the ListImplementations - * RPC. - */ -export interface ListImplementationsResponseSDKType { - implementation_message_names: string[]; -} -function createBaseListAllInterfacesRequest(): ListAllInterfacesRequest { - return {}; -} -export const ListAllInterfacesRequest = { - typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", - aminoType: "cosmos-sdk/ListAllInterfacesRequest", - encode(_: ListAllInterfacesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ListAllInterfacesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListAllInterfacesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): ListAllInterfacesRequest { - return {}; - }, - toJSON(_: ListAllInterfacesRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): ListAllInterfacesRequest { - const message = createBaseListAllInterfacesRequest(); - return message; - }, - fromSDK(_: ListAllInterfacesRequestSDKType): ListAllInterfacesRequest { - return {}; - }, - toSDK(_: ListAllInterfacesRequest): ListAllInterfacesRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: ListAllInterfacesRequestAmino): ListAllInterfacesRequest { - return {}; - }, - toAmino(_: ListAllInterfacesRequest): ListAllInterfacesRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: ListAllInterfacesRequestAminoMsg): ListAllInterfacesRequest { - return ListAllInterfacesRequest.fromAmino(object.value); - }, - toAminoMsg(message: ListAllInterfacesRequest): ListAllInterfacesRequestAminoMsg { - return { - type: "cosmos-sdk/ListAllInterfacesRequest", - value: ListAllInterfacesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ListAllInterfacesRequestProtoMsg): ListAllInterfacesRequest { - return ListAllInterfacesRequest.decode(message.value); - }, - toProto(message: ListAllInterfacesRequest): Uint8Array { - return ListAllInterfacesRequest.encode(message).finish(); - }, - toProtoMsg(message: ListAllInterfacesRequest): ListAllInterfacesRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", - value: ListAllInterfacesRequest.encode(message).finish() - }; - } -}; -function createBaseListAllInterfacesResponse(): ListAllInterfacesResponse { - return { - interfaceNames: [] - }; -} -export const ListAllInterfacesResponse = { - typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", - aminoType: "cosmos-sdk/ListAllInterfacesResponse", - encode(message: ListAllInterfacesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.interfaceNames) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ListAllInterfacesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListAllInterfacesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interfaceNames.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ListAllInterfacesResponse { - return { - interfaceNames: Array.isArray(object?.interfaceNames) ? object.interfaceNames.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ListAllInterfacesResponse): unknown { - const obj: any = {}; - if (message.interfaceNames) { - obj.interfaceNames = message.interfaceNames.map(e => e); - } else { - obj.interfaceNames = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ListAllInterfacesResponse { - const message = createBaseListAllInterfacesResponse(); - message.interfaceNames = object.interfaceNames?.map(e => e) || []; - return message; - }, - fromSDK(object: ListAllInterfacesResponseSDKType): ListAllInterfacesResponse { - return { - interfaceNames: Array.isArray(object?.interface_names) ? object.interface_names.map((e: any) => e) : [] - }; - }, - toSDK(message: ListAllInterfacesResponse): ListAllInterfacesResponseSDKType { - const obj: any = {}; - if (message.interfaceNames) { - obj.interface_names = message.interfaceNames.map(e => e); - } else { - obj.interface_names = []; - } - return obj; - }, - fromAmino(object: ListAllInterfacesResponseAmino): ListAllInterfacesResponse { - return { - interfaceNames: Array.isArray(object?.interface_names) ? object.interface_names.map((e: any) => e) : [] - }; - }, - toAmino(message: ListAllInterfacesResponse): ListAllInterfacesResponseAmino { - const obj: any = {}; - if (message.interfaceNames) { - obj.interface_names = message.interfaceNames.map(e => e); - } else { - obj.interface_names = []; - } - return obj; - }, - fromAminoMsg(object: ListAllInterfacesResponseAminoMsg): ListAllInterfacesResponse { - return ListAllInterfacesResponse.fromAmino(object.value); - }, - toAminoMsg(message: ListAllInterfacesResponse): ListAllInterfacesResponseAminoMsg { - return { - type: "cosmos-sdk/ListAllInterfacesResponse", - value: ListAllInterfacesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ListAllInterfacesResponseProtoMsg): ListAllInterfacesResponse { - return ListAllInterfacesResponse.decode(message.value); - }, - toProto(message: ListAllInterfacesResponse): Uint8Array { - return ListAllInterfacesResponse.encode(message).finish(); - }, - toProtoMsg(message: ListAllInterfacesResponse): ListAllInterfacesResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", - value: ListAllInterfacesResponse.encode(message).finish() - }; - } -}; -function createBaseListImplementationsRequest(): ListImplementationsRequest { - return { - interfaceName: "" - }; -} -export const ListImplementationsRequest = { - typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest", - aminoType: "cosmos-sdk/ListImplementationsRequest", - encode(message: ListImplementationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.interfaceName !== "") { - writer.uint32(10).string(message.interfaceName); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ListImplementationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListImplementationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interfaceName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ListImplementationsRequest { - return { - interfaceName: isSet(object.interfaceName) ? String(object.interfaceName) : "" - }; - }, - toJSON(message: ListImplementationsRequest): unknown { - const obj: any = {}; - message.interfaceName !== undefined && (obj.interfaceName = message.interfaceName); - return obj; - }, - fromPartial(object: DeepPartial): ListImplementationsRequest { - const message = createBaseListImplementationsRequest(); - message.interfaceName = object.interfaceName ?? ""; - return message; - }, - fromSDK(object: ListImplementationsRequestSDKType): ListImplementationsRequest { - return { - interfaceName: object?.interface_name - }; - }, - toSDK(message: ListImplementationsRequest): ListImplementationsRequestSDKType { - const obj: any = {}; - obj.interface_name = message.interfaceName; - return obj; - }, - fromAmino(object: ListImplementationsRequestAmino): ListImplementationsRequest { - return { - interfaceName: object.interface_name - }; - }, - toAmino(message: ListImplementationsRequest): ListImplementationsRequestAmino { - const obj: any = {}; - obj.interface_name = message.interfaceName; - return obj; - }, - fromAminoMsg(object: ListImplementationsRequestAminoMsg): ListImplementationsRequest { - return ListImplementationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: ListImplementationsRequest): ListImplementationsRequestAminoMsg { - return { - type: "cosmos-sdk/ListImplementationsRequest", - value: ListImplementationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ListImplementationsRequestProtoMsg): ListImplementationsRequest { - return ListImplementationsRequest.decode(message.value); - }, - toProto(message: ListImplementationsRequest): Uint8Array { - return ListImplementationsRequest.encode(message).finish(); - }, - toProtoMsg(message: ListImplementationsRequest): ListImplementationsRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest", - value: ListImplementationsRequest.encode(message).finish() - }; - } -}; -function createBaseListImplementationsResponse(): ListImplementationsResponse { - return { - implementationMessageNames: [] - }; -} -export const ListImplementationsResponse = { - typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse", - aminoType: "cosmos-sdk/ListImplementationsResponse", - encode(message: ListImplementationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.implementationMessageNames) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ListImplementationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListImplementationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.implementationMessageNames.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ListImplementationsResponse { - return { - implementationMessageNames: Array.isArray(object?.implementationMessageNames) ? object.implementationMessageNames.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ListImplementationsResponse): unknown { - const obj: any = {}; - if (message.implementationMessageNames) { - obj.implementationMessageNames = message.implementationMessageNames.map(e => e); - } else { - obj.implementationMessageNames = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ListImplementationsResponse { - const message = createBaseListImplementationsResponse(); - message.implementationMessageNames = object.implementationMessageNames?.map(e => e) || []; - return message; - }, - fromSDK(object: ListImplementationsResponseSDKType): ListImplementationsResponse { - return { - implementationMessageNames: Array.isArray(object?.implementation_message_names) ? object.implementation_message_names.map((e: any) => e) : [] - }; - }, - toSDK(message: ListImplementationsResponse): ListImplementationsResponseSDKType { - const obj: any = {}; - if (message.implementationMessageNames) { - obj.implementation_message_names = message.implementationMessageNames.map(e => e); - } else { - obj.implementation_message_names = []; - } - return obj; - }, - fromAmino(object: ListImplementationsResponseAmino): ListImplementationsResponse { - return { - implementationMessageNames: Array.isArray(object?.implementation_message_names) ? object.implementation_message_names.map((e: any) => e) : [] - }; - }, - toAmino(message: ListImplementationsResponse): ListImplementationsResponseAmino { - const obj: any = {}; - if (message.implementationMessageNames) { - obj.implementation_message_names = message.implementationMessageNames.map(e => e); - } else { - obj.implementation_message_names = []; - } - return obj; - }, - fromAminoMsg(object: ListImplementationsResponseAminoMsg): ListImplementationsResponse { - return ListImplementationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: ListImplementationsResponse): ListImplementationsResponseAminoMsg { - return { - type: "cosmos-sdk/ListImplementationsResponse", - value: ListImplementationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ListImplementationsResponseProtoMsg): ListImplementationsResponse { - return ListImplementationsResponse.decode(message.value); - }, - toProto(message: ListImplementationsResponse): Uint8Array { - return ListImplementationsResponse.encode(message).finish(); - }, - toProtoMsg(message: ListImplementationsResponse): ListImplementationsResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse", - value: ListImplementationsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/reflection/v2alpha1/reflection.ts b/examples/interchainjs/src/codegen/cosmos/base/reflection/v2alpha1/reflection.ts deleted file mode 100644 index 463c4030..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/reflection/v2alpha1/reflection.ts +++ /dev/null @@ -1,3188 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** AppDescriptor describes a cosmos-sdk based application */ -export interface AppDescriptor { - /** - * AuthnDescriptor provides information on how to authenticate transactions on the application - * NOTE: experimental and subject to change in future releases. - */ - authn: AuthnDescriptor | undefined; - /** chain provides the chain descriptor */ - chain: ChainDescriptor | undefined; - /** codec provides metadata information regarding codec related types */ - codec: CodecDescriptor | undefined; - /** configuration provides metadata information regarding the sdk.Config type */ - configuration: ConfigurationDescriptor | undefined; - /** query_services provides metadata information regarding the available queriable endpoints */ - queryServices: QueryServicesDescriptor | undefined; - /** tx provides metadata information regarding how to send transactions to the given application */ - tx: TxDescriptor | undefined; -} -export interface AppDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.AppDescriptor"; - value: Uint8Array; -} -/** AppDescriptor describes a cosmos-sdk based application */ -export interface AppDescriptorAmino { - /** - * AuthnDescriptor provides information on how to authenticate transactions on the application - * NOTE: experimental and subject to change in future releases. - */ - authn?: AuthnDescriptorAmino | undefined; - /** chain provides the chain descriptor */ - chain?: ChainDescriptorAmino | undefined; - /** codec provides metadata information regarding codec related types */ - codec?: CodecDescriptorAmino | undefined; - /** configuration provides metadata information regarding the sdk.Config type */ - configuration?: ConfigurationDescriptorAmino | undefined; - /** query_services provides metadata information regarding the available queriable endpoints */ - query_services?: QueryServicesDescriptorAmino | undefined; - /** tx provides metadata information regarding how to send transactions to the given application */ - tx?: TxDescriptorAmino | undefined; -} -export interface AppDescriptorAminoMsg { - type: "cosmos-sdk/AppDescriptor"; - value: AppDescriptorAmino; -} -/** AppDescriptor describes a cosmos-sdk based application */ -export interface AppDescriptorSDKType { - authn: AuthnDescriptorSDKType | undefined; - chain: ChainDescriptorSDKType | undefined; - codec: CodecDescriptorSDKType | undefined; - configuration: ConfigurationDescriptorSDKType | undefined; - query_services: QueryServicesDescriptorSDKType | undefined; - tx: TxDescriptorSDKType | undefined; -} -/** TxDescriptor describes the accepted transaction type */ -export interface TxDescriptor { - /** - * fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - * it is not meant to support polymorphism of transaction types, it is supposed to be used by - * reflection clients to understand if they can handle a specific transaction type in an application. - */ - fullname: string; - /** msgs lists the accepted application messages (sdk.Msg) */ - msgs: MsgDescriptor[]; -} -export interface TxDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.TxDescriptor"; - value: Uint8Array; -} -/** TxDescriptor describes the accepted transaction type */ -export interface TxDescriptorAmino { - /** - * fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - * it is not meant to support polymorphism of transaction types, it is supposed to be used by - * reflection clients to understand if they can handle a specific transaction type in an application. - */ - fullname: string; - /** msgs lists the accepted application messages (sdk.Msg) */ - msgs: MsgDescriptorAmino[]; -} -export interface TxDescriptorAminoMsg { - type: "cosmos-sdk/TxDescriptor"; - value: TxDescriptorAmino; -} -/** TxDescriptor describes the accepted transaction type */ -export interface TxDescriptorSDKType { - fullname: string; - msgs: MsgDescriptorSDKType[]; -} -/** - * AuthnDescriptor provides information on how to sign transactions without relying - * on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures - */ -export interface AuthnDescriptor { - /** sign_modes defines the supported signature algorithm */ - signModes: SigningModeDescriptor[]; -} -export interface AuthnDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.AuthnDescriptor"; - value: Uint8Array; -} -/** - * AuthnDescriptor provides information on how to sign transactions without relying - * on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures - */ -export interface AuthnDescriptorAmino { - /** sign_modes defines the supported signature algorithm */ - sign_modes: SigningModeDescriptorAmino[]; -} -export interface AuthnDescriptorAminoMsg { - type: "cosmos-sdk/AuthnDescriptor"; - value: AuthnDescriptorAmino; -} -/** - * AuthnDescriptor provides information on how to sign transactions without relying - * on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures - */ -export interface AuthnDescriptorSDKType { - sign_modes: SigningModeDescriptorSDKType[]; -} -/** - * SigningModeDescriptor provides information on a signing flow of the application - * NOTE(fdymylja): here we could go as far as providing an entire flow on how - * to sign a message given a SigningModeDescriptor, but it's better to think about - * this another time - */ -export interface SigningModeDescriptor { - /** name defines the unique name of the signing mode */ - name: string; - /** number is the unique int32 identifier for the sign_mode enum */ - number: number; - /** - * authn_info_provider_method_fullname defines the fullname of the method to call to get - * the metadata required to authenticate using the provided sign_modes - */ - authnInfoProviderMethodFullname: string; -} -export interface SigningModeDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.SigningModeDescriptor"; - value: Uint8Array; -} -/** - * SigningModeDescriptor provides information on a signing flow of the application - * NOTE(fdymylja): here we could go as far as providing an entire flow on how - * to sign a message given a SigningModeDescriptor, but it's better to think about - * this another time - */ -export interface SigningModeDescriptorAmino { - /** name defines the unique name of the signing mode */ - name: string; - /** number is the unique int32 identifier for the sign_mode enum */ - number: number; - /** - * authn_info_provider_method_fullname defines the fullname of the method to call to get - * the metadata required to authenticate using the provided sign_modes - */ - authn_info_provider_method_fullname: string; -} -export interface SigningModeDescriptorAminoMsg { - type: "cosmos-sdk/SigningModeDescriptor"; - value: SigningModeDescriptorAmino; -} -/** - * SigningModeDescriptor provides information on a signing flow of the application - * NOTE(fdymylja): here we could go as far as providing an entire flow on how - * to sign a message given a SigningModeDescriptor, but it's better to think about - * this another time - */ -export interface SigningModeDescriptorSDKType { - name: string; - number: number; - authn_info_provider_method_fullname: string; -} -/** ChainDescriptor describes chain information of the application */ -export interface ChainDescriptor { - /** id is the chain id */ - id: string; -} -export interface ChainDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.ChainDescriptor"; - value: Uint8Array; -} -/** ChainDescriptor describes chain information of the application */ -export interface ChainDescriptorAmino { - /** id is the chain id */ - id: string; -} -export interface ChainDescriptorAminoMsg { - type: "cosmos-sdk/ChainDescriptor"; - value: ChainDescriptorAmino; -} -/** ChainDescriptor describes chain information of the application */ -export interface ChainDescriptorSDKType { - id: string; -} -/** CodecDescriptor describes the registered interfaces and provides metadata information on the types */ -export interface CodecDescriptor { - /** interfaces is a list of the registerted interfaces descriptors */ - interfaces: InterfaceDescriptor[]; -} -export interface CodecDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.CodecDescriptor"; - value: Uint8Array; -} -/** CodecDescriptor describes the registered interfaces and provides metadata information on the types */ -export interface CodecDescriptorAmino { - /** interfaces is a list of the registerted interfaces descriptors */ - interfaces: InterfaceDescriptorAmino[]; -} -export interface CodecDescriptorAminoMsg { - type: "cosmos-sdk/CodecDescriptor"; - value: CodecDescriptorAmino; -} -/** CodecDescriptor describes the registered interfaces and provides metadata information on the types */ -export interface CodecDescriptorSDKType { - interfaces: InterfaceDescriptorSDKType[]; -} -/** InterfaceDescriptor describes the implementation of an interface */ -export interface InterfaceDescriptor { - /** fullname is the name of the interface */ - fullname: string; - /** - * interface_accepting_messages contains information regarding the proto messages which contain the interface as - * google.protobuf.Any field - */ - interfaceAcceptingMessages: InterfaceAcceptingMessageDescriptor[]; - /** interface_implementers is a list of the descriptors of the interface implementers */ - interfaceImplementers: InterfaceImplementerDescriptor[]; -} -export interface InterfaceDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceDescriptor"; - value: Uint8Array; -} -/** InterfaceDescriptor describes the implementation of an interface */ -export interface InterfaceDescriptorAmino { - /** fullname is the name of the interface */ - fullname: string; - /** - * interface_accepting_messages contains information regarding the proto messages which contain the interface as - * google.protobuf.Any field - */ - interface_accepting_messages: InterfaceAcceptingMessageDescriptorAmino[]; - /** interface_implementers is a list of the descriptors of the interface implementers */ - interface_implementers: InterfaceImplementerDescriptorAmino[]; -} -export interface InterfaceDescriptorAminoMsg { - type: "cosmos-sdk/InterfaceDescriptor"; - value: InterfaceDescriptorAmino; -} -/** InterfaceDescriptor describes the implementation of an interface */ -export interface InterfaceDescriptorSDKType { - fullname: string; - interface_accepting_messages: InterfaceAcceptingMessageDescriptorSDKType[]; - interface_implementers: InterfaceImplementerDescriptorSDKType[]; -} -/** InterfaceImplementerDescriptor describes an interface implementer */ -export interface InterfaceImplementerDescriptor { - /** fullname is the protobuf queryable name of the interface implementer */ - fullname: string; - /** - * type_url defines the type URL used when marshalling the type as any - * this is required so we can provide type safe google.protobuf.Any marshalling and - * unmarshalling, making sure that we don't accept just 'any' type - * in our interface fields - */ - typeUrl: string; -} -export interface InterfaceImplementerDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor"; - value: Uint8Array; -} -/** InterfaceImplementerDescriptor describes an interface implementer */ -export interface InterfaceImplementerDescriptorAmino { - /** fullname is the protobuf queryable name of the interface implementer */ - fullname: string; - /** - * type_url defines the type URL used when marshalling the type as any - * this is required so we can provide type safe google.protobuf.Any marshalling and - * unmarshalling, making sure that we don't accept just 'any' type - * in our interface fields - */ - type_url: string; -} -export interface InterfaceImplementerDescriptorAminoMsg { - type: "cosmos-sdk/InterfaceImplementerDescriptor"; - value: InterfaceImplementerDescriptorAmino; -} -/** InterfaceImplementerDescriptor describes an interface implementer */ -export interface InterfaceImplementerDescriptorSDKType { - fullname: string; - type_url: string; -} -/** - * InterfaceAcceptingMessageDescriptor describes a protobuf message which contains - * an interface represented as a google.protobuf.Any - */ -export interface InterfaceAcceptingMessageDescriptor { - /** fullname is the protobuf fullname of the type containing the interface */ - fullname: string; - /** - * field_descriptor_names is a list of the protobuf name (not fullname) of the field - * which contains the interface as google.protobuf.Any (the interface is the same, but - * it can be in multiple fields of the same proto message) - */ - fieldDescriptorNames: string[]; -} -export interface InterfaceAcceptingMessageDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor"; - value: Uint8Array; -} -/** - * InterfaceAcceptingMessageDescriptor describes a protobuf message which contains - * an interface represented as a google.protobuf.Any - */ -export interface InterfaceAcceptingMessageDescriptorAmino { - /** fullname is the protobuf fullname of the type containing the interface */ - fullname: string; - /** - * field_descriptor_names is a list of the protobuf name (not fullname) of the field - * which contains the interface as google.protobuf.Any (the interface is the same, but - * it can be in multiple fields of the same proto message) - */ - field_descriptor_names: string[]; -} -export interface InterfaceAcceptingMessageDescriptorAminoMsg { - type: "cosmos-sdk/InterfaceAcceptingMessageDescriptor"; - value: InterfaceAcceptingMessageDescriptorAmino; -} -/** - * InterfaceAcceptingMessageDescriptor describes a protobuf message which contains - * an interface represented as a google.protobuf.Any - */ -export interface InterfaceAcceptingMessageDescriptorSDKType { - fullname: string; - field_descriptor_names: string[]; -} -/** ConfigurationDescriptor contains metadata information on the sdk.Config */ -export interface ConfigurationDescriptor { - /** bech32_account_address_prefix is the account address prefix */ - bech32AccountAddressPrefix: string; -} -export interface ConfigurationDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.ConfigurationDescriptor"; - value: Uint8Array; -} -/** ConfigurationDescriptor contains metadata information on the sdk.Config */ -export interface ConfigurationDescriptorAmino { - /** bech32_account_address_prefix is the account address prefix */ - bech32_account_address_prefix: string; -} -export interface ConfigurationDescriptorAminoMsg { - type: "cosmos-sdk/ConfigurationDescriptor"; - value: ConfigurationDescriptorAmino; -} -/** ConfigurationDescriptor contains metadata information on the sdk.Config */ -export interface ConfigurationDescriptorSDKType { - bech32_account_address_prefix: string; -} -/** MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction */ -export interface MsgDescriptor { - /** msg_type_url contains the TypeURL of a sdk.Msg. */ - msgTypeUrl: string; -} -export interface MsgDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.MsgDescriptor"; - value: Uint8Array; -} -/** MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction */ -export interface MsgDescriptorAmino { - /** msg_type_url contains the TypeURL of a sdk.Msg. */ - msg_type_url: string; -} -export interface MsgDescriptorAminoMsg { - type: "cosmos-sdk/MsgDescriptor"; - value: MsgDescriptorAmino; -} -/** MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction */ -export interface MsgDescriptorSDKType { - msg_type_url: string; -} -/** GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC */ -export interface GetAuthnDescriptorRequest {} -export interface GetAuthnDescriptorRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest"; - value: Uint8Array; -} -/** GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC */ -export interface GetAuthnDescriptorRequestAmino {} -export interface GetAuthnDescriptorRequestAminoMsg { - type: "cosmos-sdk/GetAuthnDescriptorRequest"; - value: GetAuthnDescriptorRequestAmino; -} -/** GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC */ -export interface GetAuthnDescriptorRequestSDKType {} -/** GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC */ -export interface GetAuthnDescriptorResponse { - /** authn describes how to authenticate to the application when sending transactions */ - authn: AuthnDescriptor | undefined; -} -export interface GetAuthnDescriptorResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse"; - value: Uint8Array; -} -/** GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC */ -export interface GetAuthnDescriptorResponseAmino { - /** authn describes how to authenticate to the application when sending transactions */ - authn?: AuthnDescriptorAmino | undefined; -} -export interface GetAuthnDescriptorResponseAminoMsg { - type: "cosmos-sdk/GetAuthnDescriptorResponse"; - value: GetAuthnDescriptorResponseAmino; -} -/** GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC */ -export interface GetAuthnDescriptorResponseSDKType { - authn: AuthnDescriptorSDKType | undefined; -} -/** GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC */ -export interface GetChainDescriptorRequest {} -export interface GetChainDescriptorRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest"; - value: Uint8Array; -} -/** GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC */ -export interface GetChainDescriptorRequestAmino {} -export interface GetChainDescriptorRequestAminoMsg { - type: "cosmos-sdk/GetChainDescriptorRequest"; - value: GetChainDescriptorRequestAmino; -} -/** GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC */ -export interface GetChainDescriptorRequestSDKType {} -/** GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC */ -export interface GetChainDescriptorResponse { - /** chain describes application chain information */ - chain: ChainDescriptor | undefined; -} -export interface GetChainDescriptorResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse"; - value: Uint8Array; -} -/** GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC */ -export interface GetChainDescriptorResponseAmino { - /** chain describes application chain information */ - chain?: ChainDescriptorAmino | undefined; -} -export interface GetChainDescriptorResponseAminoMsg { - type: "cosmos-sdk/GetChainDescriptorResponse"; - value: GetChainDescriptorResponseAmino; -} -/** GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC */ -export interface GetChainDescriptorResponseSDKType { - chain: ChainDescriptorSDKType | undefined; -} -/** GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC */ -export interface GetCodecDescriptorRequest {} -export interface GetCodecDescriptorRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest"; - value: Uint8Array; -} -/** GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC */ -export interface GetCodecDescriptorRequestAmino {} -export interface GetCodecDescriptorRequestAminoMsg { - type: "cosmos-sdk/GetCodecDescriptorRequest"; - value: GetCodecDescriptorRequestAmino; -} -/** GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC */ -export interface GetCodecDescriptorRequestSDKType {} -/** GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC */ -export interface GetCodecDescriptorResponse { - /** codec describes the application codec such as registered interfaces and implementations */ - codec: CodecDescriptor | undefined; -} -export interface GetCodecDescriptorResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse"; - value: Uint8Array; -} -/** GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC */ -export interface GetCodecDescriptorResponseAmino { - /** codec describes the application codec such as registered interfaces and implementations */ - codec?: CodecDescriptorAmino | undefined; -} -export interface GetCodecDescriptorResponseAminoMsg { - type: "cosmos-sdk/GetCodecDescriptorResponse"; - value: GetCodecDescriptorResponseAmino; -} -/** GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC */ -export interface GetCodecDescriptorResponseSDKType { - codec: CodecDescriptorSDKType | undefined; -} -/** GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC */ -export interface GetConfigurationDescriptorRequest {} -export interface GetConfigurationDescriptorRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest"; - value: Uint8Array; -} -/** GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC */ -export interface GetConfigurationDescriptorRequestAmino {} -export interface GetConfigurationDescriptorRequestAminoMsg { - type: "cosmos-sdk/GetConfigurationDescriptorRequest"; - value: GetConfigurationDescriptorRequestAmino; -} -/** GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC */ -export interface GetConfigurationDescriptorRequestSDKType {} -/** GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC */ -export interface GetConfigurationDescriptorResponse { - /** config describes the application's sdk.Config */ - config: ConfigurationDescriptor | undefined; -} -export interface GetConfigurationDescriptorResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse"; - value: Uint8Array; -} -/** GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC */ -export interface GetConfigurationDescriptorResponseAmino { - /** config describes the application's sdk.Config */ - config?: ConfigurationDescriptorAmino | undefined; -} -export interface GetConfigurationDescriptorResponseAminoMsg { - type: "cosmos-sdk/GetConfigurationDescriptorResponse"; - value: GetConfigurationDescriptorResponseAmino; -} -/** GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC */ -export interface GetConfigurationDescriptorResponseSDKType { - config: ConfigurationDescriptorSDKType | undefined; -} -/** GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC */ -export interface GetQueryServicesDescriptorRequest {} -export interface GetQueryServicesDescriptorRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest"; - value: Uint8Array; -} -/** GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC */ -export interface GetQueryServicesDescriptorRequestAmino {} -export interface GetQueryServicesDescriptorRequestAminoMsg { - type: "cosmos-sdk/GetQueryServicesDescriptorRequest"; - value: GetQueryServicesDescriptorRequestAmino; -} -/** GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC */ -export interface GetQueryServicesDescriptorRequestSDKType {} -/** GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC */ -export interface GetQueryServicesDescriptorResponse { - /** queries provides information on the available queryable services */ - queries: QueryServicesDescriptor | undefined; -} -export interface GetQueryServicesDescriptorResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse"; - value: Uint8Array; -} -/** GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC */ -export interface GetQueryServicesDescriptorResponseAmino { - /** queries provides information on the available queryable services */ - queries?: QueryServicesDescriptorAmino | undefined; -} -export interface GetQueryServicesDescriptorResponseAminoMsg { - type: "cosmos-sdk/GetQueryServicesDescriptorResponse"; - value: GetQueryServicesDescriptorResponseAmino; -} -/** GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC */ -export interface GetQueryServicesDescriptorResponseSDKType { - queries: QueryServicesDescriptorSDKType | undefined; -} -/** GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC */ -export interface GetTxDescriptorRequest {} -export interface GetTxDescriptorRequestProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest"; - value: Uint8Array; -} -/** GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC */ -export interface GetTxDescriptorRequestAmino {} -export interface GetTxDescriptorRequestAminoMsg { - type: "cosmos-sdk/GetTxDescriptorRequest"; - value: GetTxDescriptorRequestAmino; -} -/** GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC */ -export interface GetTxDescriptorRequestSDKType {} -/** GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC */ -export interface GetTxDescriptorResponse { - /** - * tx provides information on msgs that can be forwarded to the application - * alongside the accepted transaction protobuf type - */ - tx: TxDescriptor | undefined; -} -export interface GetTxDescriptorResponseProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse"; - value: Uint8Array; -} -/** GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC */ -export interface GetTxDescriptorResponseAmino { - /** - * tx provides information on msgs that can be forwarded to the application - * alongside the accepted transaction protobuf type - */ - tx?: TxDescriptorAmino | undefined; -} -export interface GetTxDescriptorResponseAminoMsg { - type: "cosmos-sdk/GetTxDescriptorResponse"; - value: GetTxDescriptorResponseAmino; -} -/** GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC */ -export interface GetTxDescriptorResponseSDKType { - tx: TxDescriptorSDKType | undefined; -} -/** QueryServicesDescriptor contains the list of cosmos-sdk queriable services */ -export interface QueryServicesDescriptor { - /** query_services is a list of cosmos-sdk QueryServiceDescriptor */ - queryServices: QueryServiceDescriptor[]; -} -export interface QueryServicesDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryServicesDescriptor"; - value: Uint8Array; -} -/** QueryServicesDescriptor contains the list of cosmos-sdk queriable services */ -export interface QueryServicesDescriptorAmino { - /** query_services is a list of cosmos-sdk QueryServiceDescriptor */ - query_services: QueryServiceDescriptorAmino[]; -} -export interface QueryServicesDescriptorAminoMsg { - type: "cosmos-sdk/QueryServicesDescriptor"; - value: QueryServicesDescriptorAmino; -} -/** QueryServicesDescriptor contains the list of cosmos-sdk queriable services */ -export interface QueryServicesDescriptorSDKType { - query_services: QueryServiceDescriptorSDKType[]; -} -/** QueryServiceDescriptor describes a cosmos-sdk queryable service */ -export interface QueryServiceDescriptor { - /** fullname is the protobuf fullname of the service descriptor */ - fullname: string; - /** is_module describes if this service is actually exposed by an application's module */ - isModule: boolean; - /** methods provides a list of query service methods */ - methods: QueryMethodDescriptor[]; -} -export interface QueryServiceDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryServiceDescriptor"; - value: Uint8Array; -} -/** QueryServiceDescriptor describes a cosmos-sdk queryable service */ -export interface QueryServiceDescriptorAmino { - /** fullname is the protobuf fullname of the service descriptor */ - fullname: string; - /** is_module describes if this service is actually exposed by an application's module */ - is_module: boolean; - /** methods provides a list of query service methods */ - methods: QueryMethodDescriptorAmino[]; -} -export interface QueryServiceDescriptorAminoMsg { - type: "cosmos-sdk/QueryServiceDescriptor"; - value: QueryServiceDescriptorAmino; -} -/** QueryServiceDescriptor describes a cosmos-sdk queryable service */ -export interface QueryServiceDescriptorSDKType { - fullname: string; - is_module: boolean; - methods: QueryMethodDescriptorSDKType[]; -} -/** - * QueryMethodDescriptor describes a queryable method of a query service - * no other info is provided beside method name and tendermint queryable path - * because it would be redundant with the grpc reflection service - */ -export interface QueryMethodDescriptor { - /** name is the protobuf name (not fullname) of the method */ - name: string; - /** - * full_query_path is the path that can be used to query - * this method via tendermint abci.Query - */ - fullQueryPath: string; -} -export interface QueryMethodDescriptorProtoMsg { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryMethodDescriptor"; - value: Uint8Array; -} -/** - * QueryMethodDescriptor describes a queryable method of a query service - * no other info is provided beside method name and tendermint queryable path - * because it would be redundant with the grpc reflection service - */ -export interface QueryMethodDescriptorAmino { - /** name is the protobuf name (not fullname) of the method */ - name: string; - /** - * full_query_path is the path that can be used to query - * this method via tendermint abci.Query - */ - full_query_path: string; -} -export interface QueryMethodDescriptorAminoMsg { - type: "cosmos-sdk/QueryMethodDescriptor"; - value: QueryMethodDescriptorAmino; -} -/** - * QueryMethodDescriptor describes a queryable method of a query service - * no other info is provided beside method name and tendermint queryable path - * because it would be redundant with the grpc reflection service - */ -export interface QueryMethodDescriptorSDKType { - name: string; - full_query_path: string; -} -function createBaseAppDescriptor(): AppDescriptor { - return { - authn: AuthnDescriptor.fromPartial({}), - chain: ChainDescriptor.fromPartial({}), - codec: CodecDescriptor.fromPartial({}), - configuration: ConfigurationDescriptor.fromPartial({}), - queryServices: QueryServicesDescriptor.fromPartial({}), - tx: TxDescriptor.fromPartial({}) - }; -} -export const AppDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.AppDescriptor", - aminoType: "cosmos-sdk/AppDescriptor", - encode(message: AppDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authn !== undefined) { - AuthnDescriptor.encode(message.authn, writer.uint32(10).fork()).ldelim(); - } - if (message.chain !== undefined) { - ChainDescriptor.encode(message.chain, writer.uint32(18).fork()).ldelim(); - } - if (message.codec !== undefined) { - CodecDescriptor.encode(message.codec, writer.uint32(26).fork()).ldelim(); - } - if (message.configuration !== undefined) { - ConfigurationDescriptor.encode(message.configuration, writer.uint32(34).fork()).ldelim(); - } - if (message.queryServices !== undefined) { - QueryServicesDescriptor.encode(message.queryServices, writer.uint32(42).fork()).ldelim(); - } - if (message.tx !== undefined) { - TxDescriptor.encode(message.tx, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AppDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAppDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authn = AuthnDescriptor.decode(reader, reader.uint32()); - break; - case 2: - message.chain = ChainDescriptor.decode(reader, reader.uint32()); - break; - case 3: - message.codec = CodecDescriptor.decode(reader, reader.uint32()); - break; - case 4: - message.configuration = ConfigurationDescriptor.decode(reader, reader.uint32()); - break; - case 5: - message.queryServices = QueryServicesDescriptor.decode(reader, reader.uint32()); - break; - case 6: - message.tx = TxDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AppDescriptor { - return { - authn: isSet(object.authn) ? AuthnDescriptor.fromJSON(object.authn) : undefined, - chain: isSet(object.chain) ? ChainDescriptor.fromJSON(object.chain) : undefined, - codec: isSet(object.codec) ? CodecDescriptor.fromJSON(object.codec) : undefined, - configuration: isSet(object.configuration) ? ConfigurationDescriptor.fromJSON(object.configuration) : undefined, - queryServices: isSet(object.queryServices) ? QueryServicesDescriptor.fromJSON(object.queryServices) : undefined, - tx: isSet(object.tx) ? TxDescriptor.fromJSON(object.tx) : undefined - }; - }, - toJSON(message: AppDescriptor): unknown { - const obj: any = {}; - message.authn !== undefined && (obj.authn = message.authn ? AuthnDescriptor.toJSON(message.authn) : undefined); - message.chain !== undefined && (obj.chain = message.chain ? ChainDescriptor.toJSON(message.chain) : undefined); - message.codec !== undefined && (obj.codec = message.codec ? CodecDescriptor.toJSON(message.codec) : undefined); - message.configuration !== undefined && (obj.configuration = message.configuration ? ConfigurationDescriptor.toJSON(message.configuration) : undefined); - message.queryServices !== undefined && (obj.queryServices = message.queryServices ? QueryServicesDescriptor.toJSON(message.queryServices) : undefined); - message.tx !== undefined && (obj.tx = message.tx ? TxDescriptor.toJSON(message.tx) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AppDescriptor { - const message = createBaseAppDescriptor(); - message.authn = object.authn !== undefined && object.authn !== null ? AuthnDescriptor.fromPartial(object.authn) : undefined; - message.chain = object.chain !== undefined && object.chain !== null ? ChainDescriptor.fromPartial(object.chain) : undefined; - message.codec = object.codec !== undefined && object.codec !== null ? CodecDescriptor.fromPartial(object.codec) : undefined; - message.configuration = object.configuration !== undefined && object.configuration !== null ? ConfigurationDescriptor.fromPartial(object.configuration) : undefined; - message.queryServices = object.queryServices !== undefined && object.queryServices !== null ? QueryServicesDescriptor.fromPartial(object.queryServices) : undefined; - message.tx = object.tx !== undefined && object.tx !== null ? TxDescriptor.fromPartial(object.tx) : undefined; - return message; - }, - fromSDK(object: AppDescriptorSDKType): AppDescriptor { - return { - authn: object.authn ? AuthnDescriptor.fromSDK(object.authn) : undefined, - chain: object.chain ? ChainDescriptor.fromSDK(object.chain) : undefined, - codec: object.codec ? CodecDescriptor.fromSDK(object.codec) : undefined, - configuration: object.configuration ? ConfigurationDescriptor.fromSDK(object.configuration) : undefined, - queryServices: object.query_services ? QueryServicesDescriptor.fromSDK(object.query_services) : undefined, - tx: object.tx ? TxDescriptor.fromSDK(object.tx) : undefined - }; - }, - toSDK(message: AppDescriptor): AppDescriptorSDKType { - const obj: any = {}; - message.authn !== undefined && (obj.authn = message.authn ? AuthnDescriptor.toSDK(message.authn) : undefined); - message.chain !== undefined && (obj.chain = message.chain ? ChainDescriptor.toSDK(message.chain) : undefined); - message.codec !== undefined && (obj.codec = message.codec ? CodecDescriptor.toSDK(message.codec) : undefined); - message.configuration !== undefined && (obj.configuration = message.configuration ? ConfigurationDescriptor.toSDK(message.configuration) : undefined); - message.queryServices !== undefined && (obj.query_services = message.queryServices ? QueryServicesDescriptor.toSDK(message.queryServices) : undefined); - message.tx !== undefined && (obj.tx = message.tx ? TxDescriptor.toSDK(message.tx) : undefined); - return obj; - }, - fromAmino(object: AppDescriptorAmino): AppDescriptor { - return { - authn: object?.authn ? AuthnDescriptor.fromAmino(object.authn) : undefined, - chain: object?.chain ? ChainDescriptor.fromAmino(object.chain) : undefined, - codec: object?.codec ? CodecDescriptor.fromAmino(object.codec) : undefined, - configuration: object?.configuration ? ConfigurationDescriptor.fromAmino(object.configuration) : undefined, - queryServices: object?.query_services ? QueryServicesDescriptor.fromAmino(object.query_services) : undefined, - tx: object?.tx ? TxDescriptor.fromAmino(object.tx) : undefined - }; - }, - toAmino(message: AppDescriptor): AppDescriptorAmino { - const obj: any = {}; - obj.authn = message.authn ? AuthnDescriptor.toAmino(message.authn) : undefined; - obj.chain = message.chain ? ChainDescriptor.toAmino(message.chain) : undefined; - obj.codec = message.codec ? CodecDescriptor.toAmino(message.codec) : undefined; - obj.configuration = message.configuration ? ConfigurationDescriptor.toAmino(message.configuration) : undefined; - obj.query_services = message.queryServices ? QueryServicesDescriptor.toAmino(message.queryServices) : undefined; - obj.tx = message.tx ? TxDescriptor.toAmino(message.tx) : undefined; - return obj; - }, - fromAminoMsg(object: AppDescriptorAminoMsg): AppDescriptor { - return AppDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: AppDescriptor): AppDescriptorAminoMsg { - return { - type: "cosmos-sdk/AppDescriptor", - value: AppDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: AppDescriptorProtoMsg): AppDescriptor { - return AppDescriptor.decode(message.value); - }, - toProto(message: AppDescriptor): Uint8Array { - return AppDescriptor.encode(message).finish(); - }, - toProtoMsg(message: AppDescriptor): AppDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.AppDescriptor", - value: AppDescriptor.encode(message).finish() - }; - } -}; -function createBaseTxDescriptor(): TxDescriptor { - return { - fullname: "", - msgs: [] - }; -} -export const TxDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.TxDescriptor", - aminoType: "cosmos-sdk/TxDescriptor", - encode(message: TxDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fullname !== "") { - writer.uint32(10).string(message.fullname); - } - for (const v of message.msgs) { - MsgDescriptor.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullname = reader.string(); - break; - case 2: - message.msgs.push(MsgDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxDescriptor { - return { - fullname: isSet(object.fullname) ? String(object.fullname) : "", - msgs: Array.isArray(object?.msgs) ? object.msgs.map((e: any) => MsgDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: TxDescriptor): unknown { - const obj: any = {}; - message.fullname !== undefined && (obj.fullname = message.fullname); - if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? MsgDescriptor.toJSON(e) : undefined); - } else { - obj.msgs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): TxDescriptor { - const message = createBaseTxDescriptor(); - message.fullname = object.fullname ?? ""; - message.msgs = object.msgs?.map(e => MsgDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: TxDescriptorSDKType): TxDescriptor { - return { - fullname: object?.fullname, - msgs: Array.isArray(object?.msgs) ? object.msgs.map((e: any) => MsgDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: TxDescriptor): TxDescriptorSDKType { - const obj: any = {}; - obj.fullname = message.fullname; - if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? MsgDescriptor.toSDK(e) : undefined); - } else { - obj.msgs = []; - } - return obj; - }, - fromAmino(object: TxDescriptorAmino): TxDescriptor { - return { - fullname: object.fullname, - msgs: Array.isArray(object?.msgs) ? object.msgs.map((e: any) => MsgDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: TxDescriptor): TxDescriptorAmino { - const obj: any = {}; - obj.fullname = message.fullname; - if (message.msgs) { - obj.msgs = message.msgs.map(e => e ? MsgDescriptor.toAmino(e) : undefined); - } else { - obj.msgs = []; - } - return obj; - }, - fromAminoMsg(object: TxDescriptorAminoMsg): TxDescriptor { - return TxDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: TxDescriptor): TxDescriptorAminoMsg { - return { - type: "cosmos-sdk/TxDescriptor", - value: TxDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: TxDescriptorProtoMsg): TxDescriptor { - return TxDescriptor.decode(message.value); - }, - toProto(message: TxDescriptor): Uint8Array { - return TxDescriptor.encode(message).finish(); - }, - toProtoMsg(message: TxDescriptor): TxDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.TxDescriptor", - value: TxDescriptor.encode(message).finish() - }; - } -}; -function createBaseAuthnDescriptor(): AuthnDescriptor { - return { - signModes: [] - }; -} -export const AuthnDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.AuthnDescriptor", - aminoType: "cosmos-sdk/AuthnDescriptor", - encode(message: AuthnDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.signModes) { - SigningModeDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AuthnDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthnDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signModes.push(SigningModeDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AuthnDescriptor { - return { - signModes: Array.isArray(object?.signModes) ? object.signModes.map((e: any) => SigningModeDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: AuthnDescriptor): unknown { - const obj: any = {}; - if (message.signModes) { - obj.signModes = message.signModes.map(e => e ? SigningModeDescriptor.toJSON(e) : undefined); - } else { - obj.signModes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AuthnDescriptor { - const message = createBaseAuthnDescriptor(); - message.signModes = object.signModes?.map(e => SigningModeDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AuthnDescriptorSDKType): AuthnDescriptor { - return { - signModes: Array.isArray(object?.sign_modes) ? object.sign_modes.map((e: any) => SigningModeDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: AuthnDescriptor): AuthnDescriptorSDKType { - const obj: any = {}; - if (message.signModes) { - obj.sign_modes = message.signModes.map(e => e ? SigningModeDescriptor.toSDK(e) : undefined); - } else { - obj.sign_modes = []; - } - return obj; - }, - fromAmino(object: AuthnDescriptorAmino): AuthnDescriptor { - return { - signModes: Array.isArray(object?.sign_modes) ? object.sign_modes.map((e: any) => SigningModeDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: AuthnDescriptor): AuthnDescriptorAmino { - const obj: any = {}; - if (message.signModes) { - obj.sign_modes = message.signModes.map(e => e ? SigningModeDescriptor.toAmino(e) : undefined); - } else { - obj.sign_modes = []; - } - return obj; - }, - fromAminoMsg(object: AuthnDescriptorAminoMsg): AuthnDescriptor { - return AuthnDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: AuthnDescriptor): AuthnDescriptorAminoMsg { - return { - type: "cosmos-sdk/AuthnDescriptor", - value: AuthnDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: AuthnDescriptorProtoMsg): AuthnDescriptor { - return AuthnDescriptor.decode(message.value); - }, - toProto(message: AuthnDescriptor): Uint8Array { - return AuthnDescriptor.encode(message).finish(); - }, - toProtoMsg(message: AuthnDescriptor): AuthnDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.AuthnDescriptor", - value: AuthnDescriptor.encode(message).finish() - }; - } -}; -function createBaseSigningModeDescriptor(): SigningModeDescriptor { - return { - name: "", - number: 0, - authnInfoProviderMethodFullname: "" - }; -} -export const SigningModeDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.SigningModeDescriptor", - aminoType: "cosmos-sdk/SigningModeDescriptor", - encode(message: SigningModeDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.authnInfoProviderMethodFullname !== "") { - writer.uint32(26).string(message.authnInfoProviderMethodFullname); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SigningModeDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSigningModeDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.authnInfoProviderMethodFullname = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SigningModeDescriptor { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - authnInfoProviderMethodFullname: isSet(object.authnInfoProviderMethodFullname) ? String(object.authnInfoProviderMethodFullname) : "" - }; - }, - toJSON(message: SigningModeDescriptor): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.authnInfoProviderMethodFullname !== undefined && (obj.authnInfoProviderMethodFullname = message.authnInfoProviderMethodFullname); - return obj; - }, - fromPartial(object: DeepPartial): SigningModeDescriptor { - const message = createBaseSigningModeDescriptor(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.authnInfoProviderMethodFullname = object.authnInfoProviderMethodFullname ?? ""; - return message; - }, - fromSDK(object: SigningModeDescriptorSDKType): SigningModeDescriptor { - return { - name: object?.name, - number: object?.number, - authnInfoProviderMethodFullname: object?.authn_info_provider_method_fullname - }; - }, - toSDK(message: SigningModeDescriptor): SigningModeDescriptorSDKType { - const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - obj.authn_info_provider_method_fullname = message.authnInfoProviderMethodFullname; - return obj; - }, - fromAmino(object: SigningModeDescriptorAmino): SigningModeDescriptor { - return { - name: object.name, - number: object.number, - authnInfoProviderMethodFullname: object.authn_info_provider_method_fullname - }; - }, - toAmino(message: SigningModeDescriptor): SigningModeDescriptorAmino { - const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - obj.authn_info_provider_method_fullname = message.authnInfoProviderMethodFullname; - return obj; - }, - fromAminoMsg(object: SigningModeDescriptorAminoMsg): SigningModeDescriptor { - return SigningModeDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: SigningModeDescriptor): SigningModeDescriptorAminoMsg { - return { - type: "cosmos-sdk/SigningModeDescriptor", - value: SigningModeDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: SigningModeDescriptorProtoMsg): SigningModeDescriptor { - return SigningModeDescriptor.decode(message.value); - }, - toProto(message: SigningModeDescriptor): Uint8Array { - return SigningModeDescriptor.encode(message).finish(); - }, - toProtoMsg(message: SigningModeDescriptor): SigningModeDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.SigningModeDescriptor", - value: SigningModeDescriptor.encode(message).finish() - }; - } -}; -function createBaseChainDescriptor(): ChainDescriptor { - return { - id: "" - }; -} -export const ChainDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.ChainDescriptor", - aminoType: "cosmos-sdk/ChainDescriptor", - encode(message: ChainDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ChainDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChainDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ChainDescriptor { - return { - id: isSet(object.id) ? String(object.id) : "" - }; - }, - toJSON(message: ChainDescriptor): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - return obj; - }, - fromPartial(object: DeepPartial): ChainDescriptor { - const message = createBaseChainDescriptor(); - message.id = object.id ?? ""; - return message; - }, - fromSDK(object: ChainDescriptorSDKType): ChainDescriptor { - return { - id: object?.id - }; - }, - toSDK(message: ChainDescriptor): ChainDescriptorSDKType { - const obj: any = {}; - obj.id = message.id; - return obj; - }, - fromAmino(object: ChainDescriptorAmino): ChainDescriptor { - return { - id: object.id - }; - }, - toAmino(message: ChainDescriptor): ChainDescriptorAmino { - const obj: any = {}; - obj.id = message.id; - return obj; - }, - fromAminoMsg(object: ChainDescriptorAminoMsg): ChainDescriptor { - return ChainDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: ChainDescriptor): ChainDescriptorAminoMsg { - return { - type: "cosmos-sdk/ChainDescriptor", - value: ChainDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: ChainDescriptorProtoMsg): ChainDescriptor { - return ChainDescriptor.decode(message.value); - }, - toProto(message: ChainDescriptor): Uint8Array { - return ChainDescriptor.encode(message).finish(); - }, - toProtoMsg(message: ChainDescriptor): ChainDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.ChainDescriptor", - value: ChainDescriptor.encode(message).finish() - }; - } -}; -function createBaseCodecDescriptor(): CodecDescriptor { - return { - interfaces: [] - }; -} -export const CodecDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.CodecDescriptor", - aminoType: "cosmos-sdk/CodecDescriptor", - encode(message: CodecDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.interfaces) { - InterfaceDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CodecDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCodecDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interfaces.push(InterfaceDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CodecDescriptor { - return { - interfaces: Array.isArray(object?.interfaces) ? object.interfaces.map((e: any) => InterfaceDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: CodecDescriptor): unknown { - const obj: any = {}; - if (message.interfaces) { - obj.interfaces = message.interfaces.map(e => e ? InterfaceDescriptor.toJSON(e) : undefined); - } else { - obj.interfaces = []; - } - return obj; - }, - fromPartial(object: DeepPartial): CodecDescriptor { - const message = createBaseCodecDescriptor(); - message.interfaces = object.interfaces?.map(e => InterfaceDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: CodecDescriptorSDKType): CodecDescriptor { - return { - interfaces: Array.isArray(object?.interfaces) ? object.interfaces.map((e: any) => InterfaceDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: CodecDescriptor): CodecDescriptorSDKType { - const obj: any = {}; - if (message.interfaces) { - obj.interfaces = message.interfaces.map(e => e ? InterfaceDescriptor.toSDK(e) : undefined); - } else { - obj.interfaces = []; - } - return obj; - }, - fromAmino(object: CodecDescriptorAmino): CodecDescriptor { - return { - interfaces: Array.isArray(object?.interfaces) ? object.interfaces.map((e: any) => InterfaceDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: CodecDescriptor): CodecDescriptorAmino { - const obj: any = {}; - if (message.interfaces) { - obj.interfaces = message.interfaces.map(e => e ? InterfaceDescriptor.toAmino(e) : undefined); - } else { - obj.interfaces = []; - } - return obj; - }, - fromAminoMsg(object: CodecDescriptorAminoMsg): CodecDescriptor { - return CodecDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: CodecDescriptor): CodecDescriptorAminoMsg { - return { - type: "cosmos-sdk/CodecDescriptor", - value: CodecDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: CodecDescriptorProtoMsg): CodecDescriptor { - return CodecDescriptor.decode(message.value); - }, - toProto(message: CodecDescriptor): Uint8Array { - return CodecDescriptor.encode(message).finish(); - }, - toProtoMsg(message: CodecDescriptor): CodecDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.CodecDescriptor", - value: CodecDescriptor.encode(message).finish() - }; - } -}; -function createBaseInterfaceDescriptor(): InterfaceDescriptor { - return { - fullname: "", - interfaceAcceptingMessages: [], - interfaceImplementers: [] - }; -} -export const InterfaceDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceDescriptor", - aminoType: "cosmos-sdk/InterfaceDescriptor", - encode(message: InterfaceDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fullname !== "") { - writer.uint32(10).string(message.fullname); - } - for (const v of message.interfaceAcceptingMessages) { - InterfaceAcceptingMessageDescriptor.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.interfaceImplementers) { - InterfaceImplementerDescriptor.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InterfaceDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInterfaceDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullname = reader.string(); - break; - case 2: - message.interfaceAcceptingMessages.push(InterfaceAcceptingMessageDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.interfaceImplementers.push(InterfaceImplementerDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InterfaceDescriptor { - return { - fullname: isSet(object.fullname) ? String(object.fullname) : "", - interfaceAcceptingMessages: Array.isArray(object?.interfaceAcceptingMessages) ? object.interfaceAcceptingMessages.map((e: any) => InterfaceAcceptingMessageDescriptor.fromJSON(e)) : [], - interfaceImplementers: Array.isArray(object?.interfaceImplementers) ? object.interfaceImplementers.map((e: any) => InterfaceImplementerDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: InterfaceDescriptor): unknown { - const obj: any = {}; - message.fullname !== undefined && (obj.fullname = message.fullname); - if (message.interfaceAcceptingMessages) { - obj.interfaceAcceptingMessages = message.interfaceAcceptingMessages.map(e => e ? InterfaceAcceptingMessageDescriptor.toJSON(e) : undefined); - } else { - obj.interfaceAcceptingMessages = []; - } - if (message.interfaceImplementers) { - obj.interfaceImplementers = message.interfaceImplementers.map(e => e ? InterfaceImplementerDescriptor.toJSON(e) : undefined); - } else { - obj.interfaceImplementers = []; - } - return obj; - }, - fromPartial(object: DeepPartial): InterfaceDescriptor { - const message = createBaseInterfaceDescriptor(); - message.fullname = object.fullname ?? ""; - message.interfaceAcceptingMessages = object.interfaceAcceptingMessages?.map(e => InterfaceAcceptingMessageDescriptor.fromPartial(e)) || []; - message.interfaceImplementers = object.interfaceImplementers?.map(e => InterfaceImplementerDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: InterfaceDescriptorSDKType): InterfaceDescriptor { - return { - fullname: object?.fullname, - interfaceAcceptingMessages: Array.isArray(object?.interface_accepting_messages) ? object.interface_accepting_messages.map((e: any) => InterfaceAcceptingMessageDescriptor.fromSDK(e)) : [], - interfaceImplementers: Array.isArray(object?.interface_implementers) ? object.interface_implementers.map((e: any) => InterfaceImplementerDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: InterfaceDescriptor): InterfaceDescriptorSDKType { - const obj: any = {}; - obj.fullname = message.fullname; - if (message.interfaceAcceptingMessages) { - obj.interface_accepting_messages = message.interfaceAcceptingMessages.map(e => e ? InterfaceAcceptingMessageDescriptor.toSDK(e) : undefined); - } else { - obj.interface_accepting_messages = []; - } - if (message.interfaceImplementers) { - obj.interface_implementers = message.interfaceImplementers.map(e => e ? InterfaceImplementerDescriptor.toSDK(e) : undefined); - } else { - obj.interface_implementers = []; - } - return obj; - }, - fromAmino(object: InterfaceDescriptorAmino): InterfaceDescriptor { - return { - fullname: object.fullname, - interfaceAcceptingMessages: Array.isArray(object?.interface_accepting_messages) ? object.interface_accepting_messages.map((e: any) => InterfaceAcceptingMessageDescriptor.fromAmino(e)) : [], - interfaceImplementers: Array.isArray(object?.interface_implementers) ? object.interface_implementers.map((e: any) => InterfaceImplementerDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: InterfaceDescriptor): InterfaceDescriptorAmino { - const obj: any = {}; - obj.fullname = message.fullname; - if (message.interfaceAcceptingMessages) { - obj.interface_accepting_messages = message.interfaceAcceptingMessages.map(e => e ? InterfaceAcceptingMessageDescriptor.toAmino(e) : undefined); - } else { - obj.interface_accepting_messages = []; - } - if (message.interfaceImplementers) { - obj.interface_implementers = message.interfaceImplementers.map(e => e ? InterfaceImplementerDescriptor.toAmino(e) : undefined); - } else { - obj.interface_implementers = []; - } - return obj; - }, - fromAminoMsg(object: InterfaceDescriptorAminoMsg): InterfaceDescriptor { - return InterfaceDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: InterfaceDescriptor): InterfaceDescriptorAminoMsg { - return { - type: "cosmos-sdk/InterfaceDescriptor", - value: InterfaceDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: InterfaceDescriptorProtoMsg): InterfaceDescriptor { - return InterfaceDescriptor.decode(message.value); - }, - toProto(message: InterfaceDescriptor): Uint8Array { - return InterfaceDescriptor.encode(message).finish(); - }, - toProtoMsg(message: InterfaceDescriptor): InterfaceDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceDescriptor", - value: InterfaceDescriptor.encode(message).finish() - }; - } -}; -function createBaseInterfaceImplementerDescriptor(): InterfaceImplementerDescriptor { - return { - fullname: "", - typeUrl: "" - }; -} -export const InterfaceImplementerDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", - aminoType: "cosmos-sdk/InterfaceImplementerDescriptor", - encode(message: InterfaceImplementerDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fullname !== "") { - writer.uint32(10).string(message.fullname); - } - if (message.typeUrl !== "") { - writer.uint32(18).string(message.typeUrl); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InterfaceImplementerDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInterfaceImplementerDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullname = reader.string(); - break; - case 2: - message.typeUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InterfaceImplementerDescriptor { - return { - fullname: isSet(object.fullname) ? String(object.fullname) : "", - typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "" - }; - }, - toJSON(message: InterfaceImplementerDescriptor): unknown { - const obj: any = {}; - message.fullname !== undefined && (obj.fullname = message.fullname); - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - return obj; - }, - fromPartial(object: DeepPartial): InterfaceImplementerDescriptor { - const message = createBaseInterfaceImplementerDescriptor(); - message.fullname = object.fullname ?? ""; - message.typeUrl = object.typeUrl ?? ""; - return message; - }, - fromSDK(object: InterfaceImplementerDescriptorSDKType): InterfaceImplementerDescriptor { - return { - fullname: object?.fullname, - typeUrl: object?.type_url - }; - }, - toSDK(message: InterfaceImplementerDescriptor): InterfaceImplementerDescriptorSDKType { - const obj: any = {}; - obj.fullname = message.fullname; - obj.type_url = message.typeUrl; - return obj; - }, - fromAmino(object: InterfaceImplementerDescriptorAmino): InterfaceImplementerDescriptor { - return { - fullname: object.fullname, - typeUrl: object.type_url - }; - }, - toAmino(message: InterfaceImplementerDescriptor): InterfaceImplementerDescriptorAmino { - const obj: any = {}; - obj.fullname = message.fullname; - obj.type_url = message.typeUrl; - return obj; - }, - fromAminoMsg(object: InterfaceImplementerDescriptorAminoMsg): InterfaceImplementerDescriptor { - return InterfaceImplementerDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: InterfaceImplementerDescriptor): InterfaceImplementerDescriptorAminoMsg { - return { - type: "cosmos-sdk/InterfaceImplementerDescriptor", - value: InterfaceImplementerDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: InterfaceImplementerDescriptorProtoMsg): InterfaceImplementerDescriptor { - return InterfaceImplementerDescriptor.decode(message.value); - }, - toProto(message: InterfaceImplementerDescriptor): Uint8Array { - return InterfaceImplementerDescriptor.encode(message).finish(); - }, - toProtoMsg(message: InterfaceImplementerDescriptor): InterfaceImplementerDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", - value: InterfaceImplementerDescriptor.encode(message).finish() - }; - } -}; -function createBaseInterfaceAcceptingMessageDescriptor(): InterfaceAcceptingMessageDescriptor { - return { - fullname: "", - fieldDescriptorNames: [] - }; -} -export const InterfaceAcceptingMessageDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", - aminoType: "cosmos-sdk/InterfaceAcceptingMessageDescriptor", - encode(message: InterfaceAcceptingMessageDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fullname !== "") { - writer.uint32(10).string(message.fullname); - } - for (const v of message.fieldDescriptorNames) { - writer.uint32(18).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InterfaceAcceptingMessageDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInterfaceAcceptingMessageDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullname = reader.string(); - break; - case 2: - message.fieldDescriptorNames.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InterfaceAcceptingMessageDescriptor { - return { - fullname: isSet(object.fullname) ? String(object.fullname) : "", - fieldDescriptorNames: Array.isArray(object?.fieldDescriptorNames) ? object.fieldDescriptorNames.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: InterfaceAcceptingMessageDescriptor): unknown { - const obj: any = {}; - message.fullname !== undefined && (obj.fullname = message.fullname); - if (message.fieldDescriptorNames) { - obj.fieldDescriptorNames = message.fieldDescriptorNames.map(e => e); - } else { - obj.fieldDescriptorNames = []; - } - return obj; - }, - fromPartial(object: DeepPartial): InterfaceAcceptingMessageDescriptor { - const message = createBaseInterfaceAcceptingMessageDescriptor(); - message.fullname = object.fullname ?? ""; - message.fieldDescriptorNames = object.fieldDescriptorNames?.map(e => e) || []; - return message; - }, - fromSDK(object: InterfaceAcceptingMessageDescriptorSDKType): InterfaceAcceptingMessageDescriptor { - return { - fullname: object?.fullname, - fieldDescriptorNames: Array.isArray(object?.field_descriptor_names) ? object.field_descriptor_names.map((e: any) => e) : [] - }; - }, - toSDK(message: InterfaceAcceptingMessageDescriptor): InterfaceAcceptingMessageDescriptorSDKType { - const obj: any = {}; - obj.fullname = message.fullname; - if (message.fieldDescriptorNames) { - obj.field_descriptor_names = message.fieldDescriptorNames.map(e => e); - } else { - obj.field_descriptor_names = []; - } - return obj; - }, - fromAmino(object: InterfaceAcceptingMessageDescriptorAmino): InterfaceAcceptingMessageDescriptor { - return { - fullname: object.fullname, - fieldDescriptorNames: Array.isArray(object?.field_descriptor_names) ? object.field_descriptor_names.map((e: any) => e) : [] - }; - }, - toAmino(message: InterfaceAcceptingMessageDescriptor): InterfaceAcceptingMessageDescriptorAmino { - const obj: any = {}; - obj.fullname = message.fullname; - if (message.fieldDescriptorNames) { - obj.field_descriptor_names = message.fieldDescriptorNames.map(e => e); - } else { - obj.field_descriptor_names = []; - } - return obj; - }, - fromAminoMsg(object: InterfaceAcceptingMessageDescriptorAminoMsg): InterfaceAcceptingMessageDescriptor { - return InterfaceAcceptingMessageDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: InterfaceAcceptingMessageDescriptor): InterfaceAcceptingMessageDescriptorAminoMsg { - return { - type: "cosmos-sdk/InterfaceAcceptingMessageDescriptor", - value: InterfaceAcceptingMessageDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: InterfaceAcceptingMessageDescriptorProtoMsg): InterfaceAcceptingMessageDescriptor { - return InterfaceAcceptingMessageDescriptor.decode(message.value); - }, - toProto(message: InterfaceAcceptingMessageDescriptor): Uint8Array { - return InterfaceAcceptingMessageDescriptor.encode(message).finish(); - }, - toProtoMsg(message: InterfaceAcceptingMessageDescriptor): InterfaceAcceptingMessageDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", - value: InterfaceAcceptingMessageDescriptor.encode(message).finish() - }; - } -}; -function createBaseConfigurationDescriptor(): ConfigurationDescriptor { - return { - bech32AccountAddressPrefix: "" - }; -} -export const ConfigurationDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", - aminoType: "cosmos-sdk/ConfigurationDescriptor", - encode(message: ConfigurationDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bech32AccountAddressPrefix !== "") { - writer.uint32(10).string(message.bech32AccountAddressPrefix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConfigurationDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConfigurationDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bech32AccountAddressPrefix = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConfigurationDescriptor { - return { - bech32AccountAddressPrefix: isSet(object.bech32AccountAddressPrefix) ? String(object.bech32AccountAddressPrefix) : "" - }; - }, - toJSON(message: ConfigurationDescriptor): unknown { - const obj: any = {}; - message.bech32AccountAddressPrefix !== undefined && (obj.bech32AccountAddressPrefix = message.bech32AccountAddressPrefix); - return obj; - }, - fromPartial(object: DeepPartial): ConfigurationDescriptor { - const message = createBaseConfigurationDescriptor(); - message.bech32AccountAddressPrefix = object.bech32AccountAddressPrefix ?? ""; - return message; - }, - fromSDK(object: ConfigurationDescriptorSDKType): ConfigurationDescriptor { - return { - bech32AccountAddressPrefix: object?.bech32_account_address_prefix - }; - }, - toSDK(message: ConfigurationDescriptor): ConfigurationDescriptorSDKType { - const obj: any = {}; - obj.bech32_account_address_prefix = message.bech32AccountAddressPrefix; - return obj; - }, - fromAmino(object: ConfigurationDescriptorAmino): ConfigurationDescriptor { - return { - bech32AccountAddressPrefix: object.bech32_account_address_prefix - }; - }, - toAmino(message: ConfigurationDescriptor): ConfigurationDescriptorAmino { - const obj: any = {}; - obj.bech32_account_address_prefix = message.bech32AccountAddressPrefix; - return obj; - }, - fromAminoMsg(object: ConfigurationDescriptorAminoMsg): ConfigurationDescriptor { - return ConfigurationDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: ConfigurationDescriptor): ConfigurationDescriptorAminoMsg { - return { - type: "cosmos-sdk/ConfigurationDescriptor", - value: ConfigurationDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: ConfigurationDescriptorProtoMsg): ConfigurationDescriptor { - return ConfigurationDescriptor.decode(message.value); - }, - toProto(message: ConfigurationDescriptor): Uint8Array { - return ConfigurationDescriptor.encode(message).finish(); - }, - toProtoMsg(message: ConfigurationDescriptor): ConfigurationDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", - value: ConfigurationDescriptor.encode(message).finish() - }; - } -}; -function createBaseMsgDescriptor(): MsgDescriptor { - return { - msgTypeUrl: "" - }; -} -export const MsgDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.MsgDescriptor", - aminoType: "cosmos-sdk/MsgDescriptor", - encode(message: MsgDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.msgTypeUrl !== "") { - writer.uint32(10).string(message.msgTypeUrl); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgTypeUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgDescriptor { - return { - msgTypeUrl: isSet(object.msgTypeUrl) ? String(object.msgTypeUrl) : "" - }; - }, - toJSON(message: MsgDescriptor): unknown { - const obj: any = {}; - message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl); - return obj; - }, - fromPartial(object: DeepPartial): MsgDescriptor { - const message = createBaseMsgDescriptor(); - message.msgTypeUrl = object.msgTypeUrl ?? ""; - return message; - }, - fromSDK(object: MsgDescriptorSDKType): MsgDescriptor { - return { - msgTypeUrl: object?.msg_type_url - }; - }, - toSDK(message: MsgDescriptor): MsgDescriptorSDKType { - const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - return obj; - }, - fromAmino(object: MsgDescriptorAmino): MsgDescriptor { - return { - msgTypeUrl: object.msg_type_url - }; - }, - toAmino(message: MsgDescriptor): MsgDescriptorAmino { - const obj: any = {}; - obj.msg_type_url = message.msgTypeUrl; - return obj; - }, - fromAminoMsg(object: MsgDescriptorAminoMsg): MsgDescriptor { - return MsgDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: MsgDescriptor): MsgDescriptorAminoMsg { - return { - type: "cosmos-sdk/MsgDescriptor", - value: MsgDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDescriptorProtoMsg): MsgDescriptor { - return MsgDescriptor.decode(message.value); - }, - toProto(message: MsgDescriptor): Uint8Array { - return MsgDescriptor.encode(message).finish(); - }, - toProtoMsg(message: MsgDescriptor): MsgDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.MsgDescriptor", - value: MsgDescriptor.encode(message).finish() - }; - } -}; -function createBaseGetAuthnDescriptorRequest(): GetAuthnDescriptorRequest { - return {}; -} -export const GetAuthnDescriptorRequest = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", - aminoType: "cosmos-sdk/GetAuthnDescriptorRequest", - encode(_: GetAuthnDescriptorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetAuthnDescriptorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAuthnDescriptorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetAuthnDescriptorRequest { - return {}; - }, - toJSON(_: GetAuthnDescriptorRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetAuthnDescriptorRequest { - const message = createBaseGetAuthnDescriptorRequest(); - return message; - }, - fromSDK(_: GetAuthnDescriptorRequestSDKType): GetAuthnDescriptorRequest { - return {}; - }, - toSDK(_: GetAuthnDescriptorRequest): GetAuthnDescriptorRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetAuthnDescriptorRequestAmino): GetAuthnDescriptorRequest { - return {}; - }, - toAmino(_: GetAuthnDescriptorRequest): GetAuthnDescriptorRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetAuthnDescriptorRequestAminoMsg): GetAuthnDescriptorRequest { - return GetAuthnDescriptorRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetAuthnDescriptorRequest): GetAuthnDescriptorRequestAminoMsg { - return { - type: "cosmos-sdk/GetAuthnDescriptorRequest", - value: GetAuthnDescriptorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetAuthnDescriptorRequestProtoMsg): GetAuthnDescriptorRequest { - return GetAuthnDescriptorRequest.decode(message.value); - }, - toProto(message: GetAuthnDescriptorRequest): Uint8Array { - return GetAuthnDescriptorRequest.encode(message).finish(); - }, - toProtoMsg(message: GetAuthnDescriptorRequest): GetAuthnDescriptorRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", - value: GetAuthnDescriptorRequest.encode(message).finish() - }; - } -}; -function createBaseGetAuthnDescriptorResponse(): GetAuthnDescriptorResponse { - return { - authn: AuthnDescriptor.fromPartial({}) - }; -} -export const GetAuthnDescriptorResponse = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", - aminoType: "cosmos-sdk/GetAuthnDescriptorResponse", - encode(message: GetAuthnDescriptorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authn !== undefined) { - AuthnDescriptor.encode(message.authn, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetAuthnDescriptorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAuthnDescriptorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authn = AuthnDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetAuthnDescriptorResponse { - return { - authn: isSet(object.authn) ? AuthnDescriptor.fromJSON(object.authn) : undefined - }; - }, - toJSON(message: GetAuthnDescriptorResponse): unknown { - const obj: any = {}; - message.authn !== undefined && (obj.authn = message.authn ? AuthnDescriptor.toJSON(message.authn) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetAuthnDescriptorResponse { - const message = createBaseGetAuthnDescriptorResponse(); - message.authn = object.authn !== undefined && object.authn !== null ? AuthnDescriptor.fromPartial(object.authn) : undefined; - return message; - }, - fromSDK(object: GetAuthnDescriptorResponseSDKType): GetAuthnDescriptorResponse { - return { - authn: object.authn ? AuthnDescriptor.fromSDK(object.authn) : undefined - }; - }, - toSDK(message: GetAuthnDescriptorResponse): GetAuthnDescriptorResponseSDKType { - const obj: any = {}; - message.authn !== undefined && (obj.authn = message.authn ? AuthnDescriptor.toSDK(message.authn) : undefined); - return obj; - }, - fromAmino(object: GetAuthnDescriptorResponseAmino): GetAuthnDescriptorResponse { - return { - authn: object?.authn ? AuthnDescriptor.fromAmino(object.authn) : undefined - }; - }, - toAmino(message: GetAuthnDescriptorResponse): GetAuthnDescriptorResponseAmino { - const obj: any = {}; - obj.authn = message.authn ? AuthnDescriptor.toAmino(message.authn) : undefined; - return obj; - }, - fromAminoMsg(object: GetAuthnDescriptorResponseAminoMsg): GetAuthnDescriptorResponse { - return GetAuthnDescriptorResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetAuthnDescriptorResponse): GetAuthnDescriptorResponseAminoMsg { - return { - type: "cosmos-sdk/GetAuthnDescriptorResponse", - value: GetAuthnDescriptorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetAuthnDescriptorResponseProtoMsg): GetAuthnDescriptorResponse { - return GetAuthnDescriptorResponse.decode(message.value); - }, - toProto(message: GetAuthnDescriptorResponse): Uint8Array { - return GetAuthnDescriptorResponse.encode(message).finish(); - }, - toProtoMsg(message: GetAuthnDescriptorResponse): GetAuthnDescriptorResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", - value: GetAuthnDescriptorResponse.encode(message).finish() - }; - } -}; -function createBaseGetChainDescriptorRequest(): GetChainDescriptorRequest { - return {}; -} -export const GetChainDescriptorRequest = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", - aminoType: "cosmos-sdk/GetChainDescriptorRequest", - encode(_: GetChainDescriptorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetChainDescriptorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetChainDescriptorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetChainDescriptorRequest { - return {}; - }, - toJSON(_: GetChainDescriptorRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetChainDescriptorRequest { - const message = createBaseGetChainDescriptorRequest(); - return message; - }, - fromSDK(_: GetChainDescriptorRequestSDKType): GetChainDescriptorRequest { - return {}; - }, - toSDK(_: GetChainDescriptorRequest): GetChainDescriptorRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetChainDescriptorRequestAmino): GetChainDescriptorRequest { - return {}; - }, - toAmino(_: GetChainDescriptorRequest): GetChainDescriptorRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetChainDescriptorRequestAminoMsg): GetChainDescriptorRequest { - return GetChainDescriptorRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetChainDescriptorRequest): GetChainDescriptorRequestAminoMsg { - return { - type: "cosmos-sdk/GetChainDescriptorRequest", - value: GetChainDescriptorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetChainDescriptorRequestProtoMsg): GetChainDescriptorRequest { - return GetChainDescriptorRequest.decode(message.value); - }, - toProto(message: GetChainDescriptorRequest): Uint8Array { - return GetChainDescriptorRequest.encode(message).finish(); - }, - toProtoMsg(message: GetChainDescriptorRequest): GetChainDescriptorRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", - value: GetChainDescriptorRequest.encode(message).finish() - }; - } -}; -function createBaseGetChainDescriptorResponse(): GetChainDescriptorResponse { - return { - chain: ChainDescriptor.fromPartial({}) - }; -} -export const GetChainDescriptorResponse = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", - aminoType: "cosmos-sdk/GetChainDescriptorResponse", - encode(message: GetChainDescriptorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.chain !== undefined) { - ChainDescriptor.encode(message.chain, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetChainDescriptorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetChainDescriptorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chain = ChainDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetChainDescriptorResponse { - return { - chain: isSet(object.chain) ? ChainDescriptor.fromJSON(object.chain) : undefined - }; - }, - toJSON(message: GetChainDescriptorResponse): unknown { - const obj: any = {}; - message.chain !== undefined && (obj.chain = message.chain ? ChainDescriptor.toJSON(message.chain) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetChainDescriptorResponse { - const message = createBaseGetChainDescriptorResponse(); - message.chain = object.chain !== undefined && object.chain !== null ? ChainDescriptor.fromPartial(object.chain) : undefined; - return message; - }, - fromSDK(object: GetChainDescriptorResponseSDKType): GetChainDescriptorResponse { - return { - chain: object.chain ? ChainDescriptor.fromSDK(object.chain) : undefined - }; - }, - toSDK(message: GetChainDescriptorResponse): GetChainDescriptorResponseSDKType { - const obj: any = {}; - message.chain !== undefined && (obj.chain = message.chain ? ChainDescriptor.toSDK(message.chain) : undefined); - return obj; - }, - fromAmino(object: GetChainDescriptorResponseAmino): GetChainDescriptorResponse { - return { - chain: object?.chain ? ChainDescriptor.fromAmino(object.chain) : undefined - }; - }, - toAmino(message: GetChainDescriptorResponse): GetChainDescriptorResponseAmino { - const obj: any = {}; - obj.chain = message.chain ? ChainDescriptor.toAmino(message.chain) : undefined; - return obj; - }, - fromAminoMsg(object: GetChainDescriptorResponseAminoMsg): GetChainDescriptorResponse { - return GetChainDescriptorResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetChainDescriptorResponse): GetChainDescriptorResponseAminoMsg { - return { - type: "cosmos-sdk/GetChainDescriptorResponse", - value: GetChainDescriptorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetChainDescriptorResponseProtoMsg): GetChainDescriptorResponse { - return GetChainDescriptorResponse.decode(message.value); - }, - toProto(message: GetChainDescriptorResponse): Uint8Array { - return GetChainDescriptorResponse.encode(message).finish(); - }, - toProtoMsg(message: GetChainDescriptorResponse): GetChainDescriptorResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", - value: GetChainDescriptorResponse.encode(message).finish() - }; - } -}; -function createBaseGetCodecDescriptorRequest(): GetCodecDescriptorRequest { - return {}; -} -export const GetCodecDescriptorRequest = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", - aminoType: "cosmos-sdk/GetCodecDescriptorRequest", - encode(_: GetCodecDescriptorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetCodecDescriptorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetCodecDescriptorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetCodecDescriptorRequest { - return {}; - }, - toJSON(_: GetCodecDescriptorRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetCodecDescriptorRequest { - const message = createBaseGetCodecDescriptorRequest(); - return message; - }, - fromSDK(_: GetCodecDescriptorRequestSDKType): GetCodecDescriptorRequest { - return {}; - }, - toSDK(_: GetCodecDescriptorRequest): GetCodecDescriptorRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetCodecDescriptorRequestAmino): GetCodecDescriptorRequest { - return {}; - }, - toAmino(_: GetCodecDescriptorRequest): GetCodecDescriptorRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetCodecDescriptorRequestAminoMsg): GetCodecDescriptorRequest { - return GetCodecDescriptorRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetCodecDescriptorRequest): GetCodecDescriptorRequestAminoMsg { - return { - type: "cosmos-sdk/GetCodecDescriptorRequest", - value: GetCodecDescriptorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetCodecDescriptorRequestProtoMsg): GetCodecDescriptorRequest { - return GetCodecDescriptorRequest.decode(message.value); - }, - toProto(message: GetCodecDescriptorRequest): Uint8Array { - return GetCodecDescriptorRequest.encode(message).finish(); - }, - toProtoMsg(message: GetCodecDescriptorRequest): GetCodecDescriptorRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", - value: GetCodecDescriptorRequest.encode(message).finish() - }; - } -}; -function createBaseGetCodecDescriptorResponse(): GetCodecDescriptorResponse { - return { - codec: CodecDescriptor.fromPartial({}) - }; -} -export const GetCodecDescriptorResponse = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", - aminoType: "cosmos-sdk/GetCodecDescriptorResponse", - encode(message: GetCodecDescriptorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codec !== undefined) { - CodecDescriptor.encode(message.codec, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetCodecDescriptorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetCodecDescriptorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codec = CodecDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetCodecDescriptorResponse { - return { - codec: isSet(object.codec) ? CodecDescriptor.fromJSON(object.codec) : undefined - }; - }, - toJSON(message: GetCodecDescriptorResponse): unknown { - const obj: any = {}; - message.codec !== undefined && (obj.codec = message.codec ? CodecDescriptor.toJSON(message.codec) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetCodecDescriptorResponse { - const message = createBaseGetCodecDescriptorResponse(); - message.codec = object.codec !== undefined && object.codec !== null ? CodecDescriptor.fromPartial(object.codec) : undefined; - return message; - }, - fromSDK(object: GetCodecDescriptorResponseSDKType): GetCodecDescriptorResponse { - return { - codec: object.codec ? CodecDescriptor.fromSDK(object.codec) : undefined - }; - }, - toSDK(message: GetCodecDescriptorResponse): GetCodecDescriptorResponseSDKType { - const obj: any = {}; - message.codec !== undefined && (obj.codec = message.codec ? CodecDescriptor.toSDK(message.codec) : undefined); - return obj; - }, - fromAmino(object: GetCodecDescriptorResponseAmino): GetCodecDescriptorResponse { - return { - codec: object?.codec ? CodecDescriptor.fromAmino(object.codec) : undefined - }; - }, - toAmino(message: GetCodecDescriptorResponse): GetCodecDescriptorResponseAmino { - const obj: any = {}; - obj.codec = message.codec ? CodecDescriptor.toAmino(message.codec) : undefined; - return obj; - }, - fromAminoMsg(object: GetCodecDescriptorResponseAminoMsg): GetCodecDescriptorResponse { - return GetCodecDescriptorResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetCodecDescriptorResponse): GetCodecDescriptorResponseAminoMsg { - return { - type: "cosmos-sdk/GetCodecDescriptorResponse", - value: GetCodecDescriptorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetCodecDescriptorResponseProtoMsg): GetCodecDescriptorResponse { - return GetCodecDescriptorResponse.decode(message.value); - }, - toProto(message: GetCodecDescriptorResponse): Uint8Array { - return GetCodecDescriptorResponse.encode(message).finish(); - }, - toProtoMsg(message: GetCodecDescriptorResponse): GetCodecDescriptorResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", - value: GetCodecDescriptorResponse.encode(message).finish() - }; - } -}; -function createBaseGetConfigurationDescriptorRequest(): GetConfigurationDescriptorRequest { - return {}; -} -export const GetConfigurationDescriptorRequest = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", - aminoType: "cosmos-sdk/GetConfigurationDescriptorRequest", - encode(_: GetConfigurationDescriptorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetConfigurationDescriptorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetConfigurationDescriptorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetConfigurationDescriptorRequest { - return {}; - }, - toJSON(_: GetConfigurationDescriptorRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetConfigurationDescriptorRequest { - const message = createBaseGetConfigurationDescriptorRequest(); - return message; - }, - fromSDK(_: GetConfigurationDescriptorRequestSDKType): GetConfigurationDescriptorRequest { - return {}; - }, - toSDK(_: GetConfigurationDescriptorRequest): GetConfigurationDescriptorRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetConfigurationDescriptorRequestAmino): GetConfigurationDescriptorRequest { - return {}; - }, - toAmino(_: GetConfigurationDescriptorRequest): GetConfigurationDescriptorRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetConfigurationDescriptorRequestAminoMsg): GetConfigurationDescriptorRequest { - return GetConfigurationDescriptorRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetConfigurationDescriptorRequest): GetConfigurationDescriptorRequestAminoMsg { - return { - type: "cosmos-sdk/GetConfigurationDescriptorRequest", - value: GetConfigurationDescriptorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetConfigurationDescriptorRequestProtoMsg): GetConfigurationDescriptorRequest { - return GetConfigurationDescriptorRequest.decode(message.value); - }, - toProto(message: GetConfigurationDescriptorRequest): Uint8Array { - return GetConfigurationDescriptorRequest.encode(message).finish(); - }, - toProtoMsg(message: GetConfigurationDescriptorRequest): GetConfigurationDescriptorRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", - value: GetConfigurationDescriptorRequest.encode(message).finish() - }; - } -}; -function createBaseGetConfigurationDescriptorResponse(): GetConfigurationDescriptorResponse { - return { - config: ConfigurationDescriptor.fromPartial({}) - }; -} -export const GetConfigurationDescriptorResponse = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", - aminoType: "cosmos-sdk/GetConfigurationDescriptorResponse", - encode(message: GetConfigurationDescriptorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.config !== undefined) { - ConfigurationDescriptor.encode(message.config, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetConfigurationDescriptorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetConfigurationDescriptorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.config = ConfigurationDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetConfigurationDescriptorResponse { - return { - config: isSet(object.config) ? ConfigurationDescriptor.fromJSON(object.config) : undefined - }; - }, - toJSON(message: GetConfigurationDescriptorResponse): unknown { - const obj: any = {}; - message.config !== undefined && (obj.config = message.config ? ConfigurationDescriptor.toJSON(message.config) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetConfigurationDescriptorResponse { - const message = createBaseGetConfigurationDescriptorResponse(); - message.config = object.config !== undefined && object.config !== null ? ConfigurationDescriptor.fromPartial(object.config) : undefined; - return message; - }, - fromSDK(object: GetConfigurationDescriptorResponseSDKType): GetConfigurationDescriptorResponse { - return { - config: object.config ? ConfigurationDescriptor.fromSDK(object.config) : undefined - }; - }, - toSDK(message: GetConfigurationDescriptorResponse): GetConfigurationDescriptorResponseSDKType { - const obj: any = {}; - message.config !== undefined && (obj.config = message.config ? ConfigurationDescriptor.toSDK(message.config) : undefined); - return obj; - }, - fromAmino(object: GetConfigurationDescriptorResponseAmino): GetConfigurationDescriptorResponse { - return { - config: object?.config ? ConfigurationDescriptor.fromAmino(object.config) : undefined - }; - }, - toAmino(message: GetConfigurationDescriptorResponse): GetConfigurationDescriptorResponseAmino { - const obj: any = {}; - obj.config = message.config ? ConfigurationDescriptor.toAmino(message.config) : undefined; - return obj; - }, - fromAminoMsg(object: GetConfigurationDescriptorResponseAminoMsg): GetConfigurationDescriptorResponse { - return GetConfigurationDescriptorResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetConfigurationDescriptorResponse): GetConfigurationDescriptorResponseAminoMsg { - return { - type: "cosmos-sdk/GetConfigurationDescriptorResponse", - value: GetConfigurationDescriptorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetConfigurationDescriptorResponseProtoMsg): GetConfigurationDescriptorResponse { - return GetConfigurationDescriptorResponse.decode(message.value); - }, - toProto(message: GetConfigurationDescriptorResponse): Uint8Array { - return GetConfigurationDescriptorResponse.encode(message).finish(); - }, - toProtoMsg(message: GetConfigurationDescriptorResponse): GetConfigurationDescriptorResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", - value: GetConfigurationDescriptorResponse.encode(message).finish() - }; - } -}; -function createBaseGetQueryServicesDescriptorRequest(): GetQueryServicesDescriptorRequest { - return {}; -} -export const GetQueryServicesDescriptorRequest = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", - aminoType: "cosmos-sdk/GetQueryServicesDescriptorRequest", - encode(_: GetQueryServicesDescriptorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetQueryServicesDescriptorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetQueryServicesDescriptorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetQueryServicesDescriptorRequest { - return {}; - }, - toJSON(_: GetQueryServicesDescriptorRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetQueryServicesDescriptorRequest { - const message = createBaseGetQueryServicesDescriptorRequest(); - return message; - }, - fromSDK(_: GetQueryServicesDescriptorRequestSDKType): GetQueryServicesDescriptorRequest { - return {}; - }, - toSDK(_: GetQueryServicesDescriptorRequest): GetQueryServicesDescriptorRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetQueryServicesDescriptorRequestAmino): GetQueryServicesDescriptorRequest { - return {}; - }, - toAmino(_: GetQueryServicesDescriptorRequest): GetQueryServicesDescriptorRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetQueryServicesDescriptorRequestAminoMsg): GetQueryServicesDescriptorRequest { - return GetQueryServicesDescriptorRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetQueryServicesDescriptorRequest): GetQueryServicesDescriptorRequestAminoMsg { - return { - type: "cosmos-sdk/GetQueryServicesDescriptorRequest", - value: GetQueryServicesDescriptorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetQueryServicesDescriptorRequestProtoMsg): GetQueryServicesDescriptorRequest { - return GetQueryServicesDescriptorRequest.decode(message.value); - }, - toProto(message: GetQueryServicesDescriptorRequest): Uint8Array { - return GetQueryServicesDescriptorRequest.encode(message).finish(); - }, - toProtoMsg(message: GetQueryServicesDescriptorRequest): GetQueryServicesDescriptorRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", - value: GetQueryServicesDescriptorRequest.encode(message).finish() - }; - } -}; -function createBaseGetQueryServicesDescriptorResponse(): GetQueryServicesDescriptorResponse { - return { - queries: QueryServicesDescriptor.fromPartial({}) - }; -} -export const GetQueryServicesDescriptorResponse = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", - aminoType: "cosmos-sdk/GetQueryServicesDescriptorResponse", - encode(message: GetQueryServicesDescriptorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.queries !== undefined) { - QueryServicesDescriptor.encode(message.queries, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetQueryServicesDescriptorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetQueryServicesDescriptorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.queries = QueryServicesDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetQueryServicesDescriptorResponse { - return { - queries: isSet(object.queries) ? QueryServicesDescriptor.fromJSON(object.queries) : undefined - }; - }, - toJSON(message: GetQueryServicesDescriptorResponse): unknown { - const obj: any = {}; - message.queries !== undefined && (obj.queries = message.queries ? QueryServicesDescriptor.toJSON(message.queries) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetQueryServicesDescriptorResponse { - const message = createBaseGetQueryServicesDescriptorResponse(); - message.queries = object.queries !== undefined && object.queries !== null ? QueryServicesDescriptor.fromPartial(object.queries) : undefined; - return message; - }, - fromSDK(object: GetQueryServicesDescriptorResponseSDKType): GetQueryServicesDescriptorResponse { - return { - queries: object.queries ? QueryServicesDescriptor.fromSDK(object.queries) : undefined - }; - }, - toSDK(message: GetQueryServicesDescriptorResponse): GetQueryServicesDescriptorResponseSDKType { - const obj: any = {}; - message.queries !== undefined && (obj.queries = message.queries ? QueryServicesDescriptor.toSDK(message.queries) : undefined); - return obj; - }, - fromAmino(object: GetQueryServicesDescriptorResponseAmino): GetQueryServicesDescriptorResponse { - return { - queries: object?.queries ? QueryServicesDescriptor.fromAmino(object.queries) : undefined - }; - }, - toAmino(message: GetQueryServicesDescriptorResponse): GetQueryServicesDescriptorResponseAmino { - const obj: any = {}; - obj.queries = message.queries ? QueryServicesDescriptor.toAmino(message.queries) : undefined; - return obj; - }, - fromAminoMsg(object: GetQueryServicesDescriptorResponseAminoMsg): GetQueryServicesDescriptorResponse { - return GetQueryServicesDescriptorResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetQueryServicesDescriptorResponse): GetQueryServicesDescriptorResponseAminoMsg { - return { - type: "cosmos-sdk/GetQueryServicesDescriptorResponse", - value: GetQueryServicesDescriptorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetQueryServicesDescriptorResponseProtoMsg): GetQueryServicesDescriptorResponse { - return GetQueryServicesDescriptorResponse.decode(message.value); - }, - toProto(message: GetQueryServicesDescriptorResponse): Uint8Array { - return GetQueryServicesDescriptorResponse.encode(message).finish(); - }, - toProtoMsg(message: GetQueryServicesDescriptorResponse): GetQueryServicesDescriptorResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", - value: GetQueryServicesDescriptorResponse.encode(message).finish() - }; - } -}; -function createBaseGetTxDescriptorRequest(): GetTxDescriptorRequest { - return {}; -} -export const GetTxDescriptorRequest = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", - aminoType: "cosmos-sdk/GetTxDescriptorRequest", - encode(_: GetTxDescriptorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxDescriptorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxDescriptorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetTxDescriptorRequest { - return {}; - }, - toJSON(_: GetTxDescriptorRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetTxDescriptorRequest { - const message = createBaseGetTxDescriptorRequest(); - return message; - }, - fromSDK(_: GetTxDescriptorRequestSDKType): GetTxDescriptorRequest { - return {}; - }, - toSDK(_: GetTxDescriptorRequest): GetTxDescriptorRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetTxDescriptorRequestAmino): GetTxDescriptorRequest { - return {}; - }, - toAmino(_: GetTxDescriptorRequest): GetTxDescriptorRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetTxDescriptorRequestAminoMsg): GetTxDescriptorRequest { - return GetTxDescriptorRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetTxDescriptorRequest): GetTxDescriptorRequestAminoMsg { - return { - type: "cosmos-sdk/GetTxDescriptorRequest", - value: GetTxDescriptorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetTxDescriptorRequestProtoMsg): GetTxDescriptorRequest { - return GetTxDescriptorRequest.decode(message.value); - }, - toProto(message: GetTxDescriptorRequest): Uint8Array { - return GetTxDescriptorRequest.encode(message).finish(); - }, - toProtoMsg(message: GetTxDescriptorRequest): GetTxDescriptorRequestProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", - value: GetTxDescriptorRequest.encode(message).finish() - }; - } -}; -function createBaseGetTxDescriptorResponse(): GetTxDescriptorResponse { - return { - tx: TxDescriptor.fromPartial({}) - }; -} -export const GetTxDescriptorResponse = { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", - aminoType: "cosmos-sdk/GetTxDescriptorResponse", - encode(message: GetTxDescriptorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - TxDescriptor.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxDescriptorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxDescriptorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = TxDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetTxDescriptorResponse { - return { - tx: isSet(object.tx) ? TxDescriptor.fromJSON(object.tx) : undefined - }; - }, - toJSON(message: GetTxDescriptorResponse): unknown { - const obj: any = {}; - message.tx !== undefined && (obj.tx = message.tx ? TxDescriptor.toJSON(message.tx) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetTxDescriptorResponse { - const message = createBaseGetTxDescriptorResponse(); - message.tx = object.tx !== undefined && object.tx !== null ? TxDescriptor.fromPartial(object.tx) : undefined; - return message; - }, - fromSDK(object: GetTxDescriptorResponseSDKType): GetTxDescriptorResponse { - return { - tx: object.tx ? TxDescriptor.fromSDK(object.tx) : undefined - }; - }, - toSDK(message: GetTxDescriptorResponse): GetTxDescriptorResponseSDKType { - const obj: any = {}; - message.tx !== undefined && (obj.tx = message.tx ? TxDescriptor.toSDK(message.tx) : undefined); - return obj; - }, - fromAmino(object: GetTxDescriptorResponseAmino): GetTxDescriptorResponse { - return { - tx: object?.tx ? TxDescriptor.fromAmino(object.tx) : undefined - }; - }, - toAmino(message: GetTxDescriptorResponse): GetTxDescriptorResponseAmino { - const obj: any = {}; - obj.tx = message.tx ? TxDescriptor.toAmino(message.tx) : undefined; - return obj; - }, - fromAminoMsg(object: GetTxDescriptorResponseAminoMsg): GetTxDescriptorResponse { - return GetTxDescriptorResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetTxDescriptorResponse): GetTxDescriptorResponseAminoMsg { - return { - type: "cosmos-sdk/GetTxDescriptorResponse", - value: GetTxDescriptorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetTxDescriptorResponseProtoMsg): GetTxDescriptorResponse { - return GetTxDescriptorResponse.decode(message.value); - }, - toProto(message: GetTxDescriptorResponse): Uint8Array { - return GetTxDescriptorResponse.encode(message).finish(); - }, - toProtoMsg(message: GetTxDescriptorResponse): GetTxDescriptorResponseProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", - value: GetTxDescriptorResponse.encode(message).finish() - }; - } -}; -function createBaseQueryServicesDescriptor(): QueryServicesDescriptor { - return { - queryServices: [] - }; -} -export const QueryServicesDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", - aminoType: "cosmos-sdk/QueryServicesDescriptor", - encode(message: QueryServicesDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.queryServices) { - QueryServiceDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryServicesDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryServicesDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.queryServices.push(QueryServiceDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryServicesDescriptor { - return { - queryServices: Array.isArray(object?.queryServices) ? object.queryServices.map((e: any) => QueryServiceDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryServicesDescriptor): unknown { - const obj: any = {}; - if (message.queryServices) { - obj.queryServices = message.queryServices.map(e => e ? QueryServiceDescriptor.toJSON(e) : undefined); - } else { - obj.queryServices = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryServicesDescriptor { - const message = createBaseQueryServicesDescriptor(); - message.queryServices = object.queryServices?.map(e => QueryServiceDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryServicesDescriptorSDKType): QueryServicesDescriptor { - return { - queryServices: Array.isArray(object?.query_services) ? object.query_services.map((e: any) => QueryServiceDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryServicesDescriptor): QueryServicesDescriptorSDKType { - const obj: any = {}; - if (message.queryServices) { - obj.query_services = message.queryServices.map(e => e ? QueryServiceDescriptor.toSDK(e) : undefined); - } else { - obj.query_services = []; - } - return obj; - }, - fromAmino(object: QueryServicesDescriptorAmino): QueryServicesDescriptor { - return { - queryServices: Array.isArray(object?.query_services) ? object.query_services.map((e: any) => QueryServiceDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryServicesDescriptor): QueryServicesDescriptorAmino { - const obj: any = {}; - if (message.queryServices) { - obj.query_services = message.queryServices.map(e => e ? QueryServiceDescriptor.toAmino(e) : undefined); - } else { - obj.query_services = []; - } - return obj; - }, - fromAminoMsg(object: QueryServicesDescriptorAminoMsg): QueryServicesDescriptor { - return QueryServicesDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: QueryServicesDescriptor): QueryServicesDescriptorAminoMsg { - return { - type: "cosmos-sdk/QueryServicesDescriptor", - value: QueryServicesDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: QueryServicesDescriptorProtoMsg): QueryServicesDescriptor { - return QueryServicesDescriptor.decode(message.value); - }, - toProto(message: QueryServicesDescriptor): Uint8Array { - return QueryServicesDescriptor.encode(message).finish(); - }, - toProtoMsg(message: QueryServicesDescriptor): QueryServicesDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", - value: QueryServicesDescriptor.encode(message).finish() - }; - } -}; -function createBaseQueryServiceDescriptor(): QueryServiceDescriptor { - return { - fullname: "", - isModule: false, - methods: [] - }; -} -export const QueryServiceDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", - aminoType: "cosmos-sdk/QueryServiceDescriptor", - encode(message: QueryServiceDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fullname !== "") { - writer.uint32(10).string(message.fullname); - } - if (message.isModule === true) { - writer.uint32(16).bool(message.isModule); - } - for (const v of message.methods) { - QueryMethodDescriptor.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryServiceDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryServiceDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullname = reader.string(); - break; - case 2: - message.isModule = reader.bool(); - break; - case 3: - message.methods.push(QueryMethodDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryServiceDescriptor { - return { - fullname: isSet(object.fullname) ? String(object.fullname) : "", - isModule: isSet(object.isModule) ? Boolean(object.isModule) : false, - methods: Array.isArray(object?.methods) ? object.methods.map((e: any) => QueryMethodDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryServiceDescriptor): unknown { - const obj: any = {}; - message.fullname !== undefined && (obj.fullname = message.fullname); - message.isModule !== undefined && (obj.isModule = message.isModule); - if (message.methods) { - obj.methods = message.methods.map(e => e ? QueryMethodDescriptor.toJSON(e) : undefined); - } else { - obj.methods = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryServiceDescriptor { - const message = createBaseQueryServiceDescriptor(); - message.fullname = object.fullname ?? ""; - message.isModule = object.isModule ?? false; - message.methods = object.methods?.map(e => QueryMethodDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryServiceDescriptorSDKType): QueryServiceDescriptor { - return { - fullname: object?.fullname, - isModule: object?.is_module, - methods: Array.isArray(object?.methods) ? object.methods.map((e: any) => QueryMethodDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryServiceDescriptor): QueryServiceDescriptorSDKType { - const obj: any = {}; - obj.fullname = message.fullname; - obj.is_module = message.isModule; - if (message.methods) { - obj.methods = message.methods.map(e => e ? QueryMethodDescriptor.toSDK(e) : undefined); - } else { - obj.methods = []; - } - return obj; - }, - fromAmino(object: QueryServiceDescriptorAmino): QueryServiceDescriptor { - return { - fullname: object.fullname, - isModule: object.is_module, - methods: Array.isArray(object?.methods) ? object.methods.map((e: any) => QueryMethodDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryServiceDescriptor): QueryServiceDescriptorAmino { - const obj: any = {}; - obj.fullname = message.fullname; - obj.is_module = message.isModule; - if (message.methods) { - obj.methods = message.methods.map(e => e ? QueryMethodDescriptor.toAmino(e) : undefined); - } else { - obj.methods = []; - } - return obj; - }, - fromAminoMsg(object: QueryServiceDescriptorAminoMsg): QueryServiceDescriptor { - return QueryServiceDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: QueryServiceDescriptor): QueryServiceDescriptorAminoMsg { - return { - type: "cosmos-sdk/QueryServiceDescriptor", - value: QueryServiceDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: QueryServiceDescriptorProtoMsg): QueryServiceDescriptor { - return QueryServiceDescriptor.decode(message.value); - }, - toProto(message: QueryServiceDescriptor): Uint8Array { - return QueryServiceDescriptor.encode(message).finish(); - }, - toProtoMsg(message: QueryServiceDescriptor): QueryServiceDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", - value: QueryServiceDescriptor.encode(message).finish() - }; - } -}; -function createBaseQueryMethodDescriptor(): QueryMethodDescriptor { - return { - name: "", - fullQueryPath: "" - }; -} -export const QueryMethodDescriptor = { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", - aminoType: "cosmos-sdk/QueryMethodDescriptor", - encode(message: QueryMethodDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.fullQueryPath !== "") { - writer.uint32(18).string(message.fullQueryPath); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryMethodDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryMethodDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.fullQueryPath = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryMethodDescriptor { - return { - name: isSet(object.name) ? String(object.name) : "", - fullQueryPath: isSet(object.fullQueryPath) ? String(object.fullQueryPath) : "" - }; - }, - toJSON(message: QueryMethodDescriptor): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.fullQueryPath !== undefined && (obj.fullQueryPath = message.fullQueryPath); - return obj; - }, - fromPartial(object: DeepPartial): QueryMethodDescriptor { - const message = createBaseQueryMethodDescriptor(); - message.name = object.name ?? ""; - message.fullQueryPath = object.fullQueryPath ?? ""; - return message; - }, - fromSDK(object: QueryMethodDescriptorSDKType): QueryMethodDescriptor { - return { - name: object?.name, - fullQueryPath: object?.full_query_path - }; - }, - toSDK(message: QueryMethodDescriptor): QueryMethodDescriptorSDKType { - const obj: any = {}; - obj.name = message.name; - obj.full_query_path = message.fullQueryPath; - return obj; - }, - fromAmino(object: QueryMethodDescriptorAmino): QueryMethodDescriptor { - return { - name: object.name, - fullQueryPath: object.full_query_path - }; - }, - toAmino(message: QueryMethodDescriptor): QueryMethodDescriptorAmino { - const obj: any = {}; - obj.name = message.name; - obj.full_query_path = message.fullQueryPath; - return obj; - }, - fromAminoMsg(object: QueryMethodDescriptorAminoMsg): QueryMethodDescriptor { - return QueryMethodDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: QueryMethodDescriptor): QueryMethodDescriptorAminoMsg { - return { - type: "cosmos-sdk/QueryMethodDescriptor", - value: QueryMethodDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: QueryMethodDescriptorProtoMsg): QueryMethodDescriptor { - return QueryMethodDescriptor.decode(message.value); - }, - toProto(message: QueryMethodDescriptor): Uint8Array { - return QueryMethodDescriptor.encode(message).finish(); - }, - toProtoMsg(message: QueryMethodDescriptor): QueryMethodDescriptorProtoMsg { - return { - typeUrl: "/cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", - value: QueryMethodDescriptor.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/snapshots/v1beta1/snapshot.ts b/examples/interchainjs/src/codegen/cosmos/base/snapshots/v1beta1/snapshot.ts deleted file mode 100644 index 0d340164..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/snapshots/v1beta1/snapshot.ts +++ /dev/null @@ -1,1242 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; -/** Snapshot contains Tendermint state sync snapshot info. */ -export interface Snapshot { - height: bigint; - format: number; - chunks: number; - hash: Uint8Array; - metadata: Metadata | undefined; -} -export interface SnapshotProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.Snapshot"; - value: Uint8Array; -} -/** Snapshot contains Tendermint state sync snapshot info. */ -export interface SnapshotAmino { - height: string; - format: number; - chunks: number; - hash: Uint8Array; - metadata?: MetadataAmino | undefined; -} -export interface SnapshotAminoMsg { - type: "cosmos-sdk/Snapshot"; - value: SnapshotAmino; -} -/** Snapshot contains Tendermint state sync snapshot info. */ -export interface SnapshotSDKType { - height: bigint; - format: number; - chunks: number; - hash: Uint8Array; - metadata: MetadataSDKType | undefined; -} -/** Metadata contains SDK-specific snapshot metadata. */ -export interface Metadata { - /** SHA-256 chunk hashes */ - chunkHashes: Uint8Array[]; -} -export interface MetadataProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.Metadata"; - value: Uint8Array; -} -/** Metadata contains SDK-specific snapshot metadata. */ -export interface MetadataAmino { - /** SHA-256 chunk hashes */ - chunk_hashes: Uint8Array[]; -} -export interface MetadataAminoMsg { - type: "cosmos-sdk/Metadata"; - value: MetadataAmino; -} -/** Metadata contains SDK-specific snapshot metadata. */ -export interface MetadataSDKType { - chunk_hashes: Uint8Array[]; -} -/** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ -export interface SnapshotItem { - store?: SnapshotStoreItem | undefined; - iavl?: SnapshotIAVLItem | undefined; - extension?: SnapshotExtensionMeta | undefined; - extensionPayload?: SnapshotExtensionPayload | undefined; - kv?: SnapshotKVItem | undefined; - schema?: SnapshotSchema | undefined; -} -export interface SnapshotItemProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotItem"; - value: Uint8Array; -} -/** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ -export interface SnapshotItemAmino { - store?: SnapshotStoreItemAmino | undefined; - iavl?: SnapshotIAVLItemAmino | undefined; - extension?: SnapshotExtensionMetaAmino | undefined; - extension_payload?: SnapshotExtensionPayloadAmino | undefined; - kv?: SnapshotKVItemAmino | undefined; - schema?: SnapshotSchemaAmino | undefined; -} -export interface SnapshotItemAminoMsg { - type: "cosmos-sdk/SnapshotItem"; - value: SnapshotItemAmino; -} -/** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ -export interface SnapshotItemSDKType { - store?: SnapshotStoreItemSDKType | undefined; - iavl?: SnapshotIAVLItemSDKType | undefined; - extension?: SnapshotExtensionMetaSDKType | undefined; - extension_payload?: SnapshotExtensionPayloadSDKType | undefined; - kv?: SnapshotKVItemSDKType | undefined; - schema?: SnapshotSchemaSDKType | undefined; -} -/** SnapshotStoreItem contains metadata about a snapshotted store. */ -export interface SnapshotStoreItem { - name: string; -} -export interface SnapshotStoreItemProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotStoreItem"; - value: Uint8Array; -} -/** SnapshotStoreItem contains metadata about a snapshotted store. */ -export interface SnapshotStoreItemAmino { - name: string; -} -export interface SnapshotStoreItemAminoMsg { - type: "cosmos-sdk/SnapshotStoreItem"; - value: SnapshotStoreItemAmino; -} -/** SnapshotStoreItem contains metadata about a snapshotted store. */ -export interface SnapshotStoreItemSDKType { - name: string; -} -/** SnapshotIAVLItem is an exported IAVL node. */ -export interface SnapshotIAVLItem { - key: Uint8Array; - value: Uint8Array; - /** version is block height */ - version: bigint; - /** height is depth of the tree. */ - height: number; -} -export interface SnapshotIAVLItemProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotIAVLItem"; - value: Uint8Array; -} -/** SnapshotIAVLItem is an exported IAVL node. */ -export interface SnapshotIAVLItemAmino { - key: Uint8Array; - value: Uint8Array; - /** version is block height */ - version: string; - /** height is depth of the tree. */ - height: number; -} -export interface SnapshotIAVLItemAminoMsg { - type: "cosmos-sdk/SnapshotIAVLItem"; - value: SnapshotIAVLItemAmino; -} -/** SnapshotIAVLItem is an exported IAVL node. */ -export interface SnapshotIAVLItemSDKType { - key: Uint8Array; - value: Uint8Array; - version: bigint; - height: number; -} -/** SnapshotExtensionMeta contains metadata about an external snapshotter. */ -export interface SnapshotExtensionMeta { - name: string; - format: number; -} -export interface SnapshotExtensionMetaProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta"; - value: Uint8Array; -} -/** SnapshotExtensionMeta contains metadata about an external snapshotter. */ -export interface SnapshotExtensionMetaAmino { - name: string; - format: number; -} -export interface SnapshotExtensionMetaAminoMsg { - type: "cosmos-sdk/SnapshotExtensionMeta"; - value: SnapshotExtensionMetaAmino; -} -/** SnapshotExtensionMeta contains metadata about an external snapshotter. */ -export interface SnapshotExtensionMetaSDKType { - name: string; - format: number; -} -/** SnapshotExtensionPayload contains payloads of an external snapshotter. */ -export interface SnapshotExtensionPayload { - payload: Uint8Array; -} -export interface SnapshotExtensionPayloadProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload"; - value: Uint8Array; -} -/** SnapshotExtensionPayload contains payloads of an external snapshotter. */ -export interface SnapshotExtensionPayloadAmino { - payload: Uint8Array; -} -export interface SnapshotExtensionPayloadAminoMsg { - type: "cosmos-sdk/SnapshotExtensionPayload"; - value: SnapshotExtensionPayloadAmino; -} -/** SnapshotExtensionPayload contains payloads of an external snapshotter. */ -export interface SnapshotExtensionPayloadSDKType { - payload: Uint8Array; -} -/** SnapshotKVItem is an exported Key/Value Pair */ -export interface SnapshotKVItem { - key: Uint8Array; - value: Uint8Array; -} -export interface SnapshotKVItemProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotKVItem"; - value: Uint8Array; -} -/** SnapshotKVItem is an exported Key/Value Pair */ -export interface SnapshotKVItemAmino { - key: Uint8Array; - value: Uint8Array; -} -export interface SnapshotKVItemAminoMsg { - type: "cosmos-sdk/SnapshotKVItem"; - value: SnapshotKVItemAmino; -} -/** SnapshotKVItem is an exported Key/Value Pair */ -export interface SnapshotKVItemSDKType { - key: Uint8Array; - value: Uint8Array; -} -/** SnapshotSchema is an exported schema of smt store */ -export interface SnapshotSchema { - keys: Uint8Array[]; -} -export interface SnapshotSchemaProtoMsg { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotSchema"; - value: Uint8Array; -} -/** SnapshotSchema is an exported schema of smt store */ -export interface SnapshotSchemaAmino { - keys: Uint8Array[]; -} -export interface SnapshotSchemaAminoMsg { - type: "cosmos-sdk/SnapshotSchema"; - value: SnapshotSchemaAmino; -} -/** SnapshotSchema is an exported schema of smt store */ -export interface SnapshotSchemaSDKType { - keys: Uint8Array[]; -} -function createBaseSnapshot(): Snapshot { - return { - height: BigInt(0), - format: 0, - chunks: 0, - hash: new Uint8Array(), - metadata: Metadata.fromPartial({}) - }; -} -export const Snapshot = { - typeUrl: "/cosmos.base.snapshots.v1beta1.Snapshot", - aminoType: "cosmos-sdk/Snapshot", - encode(message: Snapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Snapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.uint64(); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Snapshot { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - format: isSet(object.format) ? Number(object.format) : 0, - chunks: isSet(object.chunks) ? Number(object.chunks) : 0, - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined - }; - }, - toJSON(message: Snapshot): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.format !== undefined && (obj.format = Math.round(message.format)); - message.chunks !== undefined && (obj.chunks = Math.round(message.chunks)); - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.metadata !== undefined && (obj.metadata = message.metadata ? Metadata.toJSON(message.metadata) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Snapshot { - const message = createBaseSnapshot(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.format = object.format ?? 0; - message.chunks = object.chunks ?? 0; - message.hash = object.hash ?? new Uint8Array(); - message.metadata = object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined; - return message; - }, - fromSDK(object: SnapshotSDKType): Snapshot { - return { - height: object?.height, - format: object?.format, - chunks: object?.chunks, - hash: object?.hash, - metadata: object.metadata ? Metadata.fromSDK(object.metadata) : undefined - }; - }, - toSDK(message: Snapshot): SnapshotSDKType { - const obj: any = {}; - obj.height = message.height; - obj.format = message.format; - obj.chunks = message.chunks; - obj.hash = message.hash; - message.metadata !== undefined && (obj.metadata = message.metadata ? Metadata.toSDK(message.metadata) : undefined); - return obj; - }, - fromAmino(object: SnapshotAmino): Snapshot { - return { - height: BigInt(object.height), - format: object.format, - chunks: object.chunks, - hash: object.hash, - metadata: object?.metadata ? Metadata.fromAmino(object.metadata) : undefined - }; - }, - toAmino(message: Snapshot): SnapshotAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.format = message.format; - obj.chunks = message.chunks; - obj.hash = message.hash; - obj.metadata = message.metadata ? Metadata.toAmino(message.metadata) : undefined; - return obj; - }, - fromAminoMsg(object: SnapshotAminoMsg): Snapshot { - return Snapshot.fromAmino(object.value); - }, - toAminoMsg(message: Snapshot): SnapshotAminoMsg { - return { - type: "cosmos-sdk/Snapshot", - value: Snapshot.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotProtoMsg): Snapshot { - return Snapshot.decode(message.value); - }, - toProto(message: Snapshot): Uint8Array { - return Snapshot.encode(message).finish(); - }, - toProtoMsg(message: Snapshot): SnapshotProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.Snapshot", - value: Snapshot.encode(message).finish() - }; - } -}; -function createBaseMetadata(): Metadata { - return { - chunkHashes: [] - }; -} -export const Metadata = { - typeUrl: "/cosmos.base.snapshots.v1beta1.Metadata", - aminoType: "cosmos-sdk/Metadata", - encode(message: Metadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.chunkHashes) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Metadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunkHashes.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Metadata { - return { - chunkHashes: Array.isArray(object?.chunkHashes) ? object.chunkHashes.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: Metadata): unknown { - const obj: any = {}; - if (message.chunkHashes) { - obj.chunkHashes = message.chunkHashes.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.chunkHashes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Metadata { - const message = createBaseMetadata(); - message.chunkHashes = object.chunkHashes?.map(e => e) || []; - return message; - }, - fromSDK(object: MetadataSDKType): Metadata { - return { - chunkHashes: Array.isArray(object?.chunk_hashes) ? object.chunk_hashes.map((e: any) => e) : [] - }; - }, - toSDK(message: Metadata): MetadataSDKType { - const obj: any = {}; - if (message.chunkHashes) { - obj.chunk_hashes = message.chunkHashes.map(e => e); - } else { - obj.chunk_hashes = []; - } - return obj; - }, - fromAmino(object: MetadataAmino): Metadata { - return { - chunkHashes: Array.isArray(object?.chunk_hashes) ? object.chunk_hashes.map((e: any) => e) : [] - }; - }, - toAmino(message: Metadata): MetadataAmino { - const obj: any = {}; - if (message.chunkHashes) { - obj.chunk_hashes = message.chunkHashes.map(e => e); - } else { - obj.chunk_hashes = []; - } - return obj; - }, - fromAminoMsg(object: MetadataAminoMsg): Metadata { - return Metadata.fromAmino(object.value); - }, - toAminoMsg(message: Metadata): MetadataAminoMsg { - return { - type: "cosmos-sdk/Metadata", - value: Metadata.toAmino(message) - }; - }, - fromProtoMsg(message: MetadataProtoMsg): Metadata { - return Metadata.decode(message.value); - }, - toProto(message: Metadata): Uint8Array { - return Metadata.encode(message).finish(); - }, - toProtoMsg(message: Metadata): MetadataProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.Metadata", - value: Metadata.encode(message).finish() - }; - } -}; -function createBaseSnapshotItem(): SnapshotItem { - return { - store: undefined, - iavl: undefined, - extension: undefined, - extensionPayload: undefined, - kv: undefined, - schema: undefined - }; -} -export const SnapshotItem = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotItem", - aminoType: "cosmos-sdk/SnapshotItem", - encode(message: SnapshotItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.store !== undefined) { - SnapshotStoreItem.encode(message.store, writer.uint32(10).fork()).ldelim(); - } - if (message.iavl !== undefined) { - SnapshotIAVLItem.encode(message.iavl, writer.uint32(18).fork()).ldelim(); - } - if (message.extension !== undefined) { - SnapshotExtensionMeta.encode(message.extension, writer.uint32(26).fork()).ldelim(); - } - if (message.extensionPayload !== undefined) { - SnapshotExtensionPayload.encode(message.extensionPayload, writer.uint32(34).fork()).ldelim(); - } - if (message.kv !== undefined) { - SnapshotKVItem.encode(message.kv, writer.uint32(42).fork()).ldelim(); - } - if (message.schema !== undefined) { - SnapshotSchema.encode(message.schema, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.store = SnapshotStoreItem.decode(reader, reader.uint32()); - break; - case 2: - message.iavl = SnapshotIAVLItem.decode(reader, reader.uint32()); - break; - case 3: - message.extension = SnapshotExtensionMeta.decode(reader, reader.uint32()); - break; - case 4: - message.extensionPayload = SnapshotExtensionPayload.decode(reader, reader.uint32()); - break; - case 5: - message.kv = SnapshotKVItem.decode(reader, reader.uint32()); - break; - case 6: - message.schema = SnapshotSchema.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotItem { - return { - store: isSet(object.store) ? SnapshotStoreItem.fromJSON(object.store) : undefined, - iavl: isSet(object.iavl) ? SnapshotIAVLItem.fromJSON(object.iavl) : undefined, - extension: isSet(object.extension) ? SnapshotExtensionMeta.fromJSON(object.extension) : undefined, - extensionPayload: isSet(object.extensionPayload) ? SnapshotExtensionPayload.fromJSON(object.extensionPayload) : undefined, - kv: isSet(object.kv) ? SnapshotKVItem.fromJSON(object.kv) : undefined, - schema: isSet(object.schema) ? SnapshotSchema.fromJSON(object.schema) : undefined - }; - }, - toJSON(message: SnapshotItem): unknown { - const obj: any = {}; - message.store !== undefined && (obj.store = message.store ? SnapshotStoreItem.toJSON(message.store) : undefined); - message.iavl !== undefined && (obj.iavl = message.iavl ? SnapshotIAVLItem.toJSON(message.iavl) : undefined); - message.extension !== undefined && (obj.extension = message.extension ? SnapshotExtensionMeta.toJSON(message.extension) : undefined); - message.extensionPayload !== undefined && (obj.extensionPayload = message.extensionPayload ? SnapshotExtensionPayload.toJSON(message.extensionPayload) : undefined); - message.kv !== undefined && (obj.kv = message.kv ? SnapshotKVItem.toJSON(message.kv) : undefined); - message.schema !== undefined && (obj.schema = message.schema ? SnapshotSchema.toJSON(message.schema) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SnapshotItem { - const message = createBaseSnapshotItem(); - message.store = object.store !== undefined && object.store !== null ? SnapshotStoreItem.fromPartial(object.store) : undefined; - message.iavl = object.iavl !== undefined && object.iavl !== null ? SnapshotIAVLItem.fromPartial(object.iavl) : undefined; - message.extension = object.extension !== undefined && object.extension !== null ? SnapshotExtensionMeta.fromPartial(object.extension) : undefined; - message.extensionPayload = object.extensionPayload !== undefined && object.extensionPayload !== null ? SnapshotExtensionPayload.fromPartial(object.extensionPayload) : undefined; - message.kv = object.kv !== undefined && object.kv !== null ? SnapshotKVItem.fromPartial(object.kv) : undefined; - message.schema = object.schema !== undefined && object.schema !== null ? SnapshotSchema.fromPartial(object.schema) : undefined; - return message; - }, - fromSDK(object: SnapshotItemSDKType): SnapshotItem { - return { - store: object.store ? SnapshotStoreItem.fromSDK(object.store) : undefined, - iavl: object.iavl ? SnapshotIAVLItem.fromSDK(object.iavl) : undefined, - extension: object.extension ? SnapshotExtensionMeta.fromSDK(object.extension) : undefined, - extensionPayload: object.extension_payload ? SnapshotExtensionPayload.fromSDK(object.extension_payload) : undefined, - kv: object.kv ? SnapshotKVItem.fromSDK(object.kv) : undefined, - schema: object.schema ? SnapshotSchema.fromSDK(object.schema) : undefined - }; - }, - toSDK(message: SnapshotItem): SnapshotItemSDKType { - const obj: any = {}; - message.store !== undefined && (obj.store = message.store ? SnapshotStoreItem.toSDK(message.store) : undefined); - message.iavl !== undefined && (obj.iavl = message.iavl ? SnapshotIAVLItem.toSDK(message.iavl) : undefined); - message.extension !== undefined && (obj.extension = message.extension ? SnapshotExtensionMeta.toSDK(message.extension) : undefined); - message.extensionPayload !== undefined && (obj.extension_payload = message.extensionPayload ? SnapshotExtensionPayload.toSDK(message.extensionPayload) : undefined); - message.kv !== undefined && (obj.kv = message.kv ? SnapshotKVItem.toSDK(message.kv) : undefined); - message.schema !== undefined && (obj.schema = message.schema ? SnapshotSchema.toSDK(message.schema) : undefined); - return obj; - }, - fromAmino(object: SnapshotItemAmino): SnapshotItem { - return { - store: object?.store ? SnapshotStoreItem.fromAmino(object.store) : undefined, - iavl: object?.iavl ? SnapshotIAVLItem.fromAmino(object.iavl) : undefined, - extension: object?.extension ? SnapshotExtensionMeta.fromAmino(object.extension) : undefined, - extensionPayload: object?.extension_payload ? SnapshotExtensionPayload.fromAmino(object.extension_payload) : undefined, - kv: object?.kv ? SnapshotKVItem.fromAmino(object.kv) : undefined, - schema: object?.schema ? SnapshotSchema.fromAmino(object.schema) : undefined - }; - }, - toAmino(message: SnapshotItem): SnapshotItemAmino { - const obj: any = {}; - obj.store = message.store ? SnapshotStoreItem.toAmino(message.store) : undefined; - obj.iavl = message.iavl ? SnapshotIAVLItem.toAmino(message.iavl) : undefined; - obj.extension = message.extension ? SnapshotExtensionMeta.toAmino(message.extension) : undefined; - obj.extension_payload = message.extensionPayload ? SnapshotExtensionPayload.toAmino(message.extensionPayload) : undefined; - obj.kv = message.kv ? SnapshotKVItem.toAmino(message.kv) : undefined; - obj.schema = message.schema ? SnapshotSchema.toAmino(message.schema) : undefined; - return obj; - }, - fromAminoMsg(object: SnapshotItemAminoMsg): SnapshotItem { - return SnapshotItem.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotItem): SnapshotItemAminoMsg { - return { - type: "cosmos-sdk/SnapshotItem", - value: SnapshotItem.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotItemProtoMsg): SnapshotItem { - return SnapshotItem.decode(message.value); - }, - toProto(message: SnapshotItem): Uint8Array { - return SnapshotItem.encode(message).finish(); - }, - toProtoMsg(message: SnapshotItem): SnapshotItemProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotItem", - value: SnapshotItem.encode(message).finish() - }; - } -}; -function createBaseSnapshotStoreItem(): SnapshotStoreItem { - return { - name: "" - }; -} -export const SnapshotStoreItem = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotStoreItem", - aminoType: "cosmos-sdk/SnapshotStoreItem", - encode(message: SnapshotStoreItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotStoreItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotStoreItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotStoreItem { - return { - name: isSet(object.name) ? String(object.name) : "" - }; - }, - toJSON(message: SnapshotStoreItem): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - fromPartial(object: DeepPartial): SnapshotStoreItem { - const message = createBaseSnapshotStoreItem(); - message.name = object.name ?? ""; - return message; - }, - fromSDK(object: SnapshotStoreItemSDKType): SnapshotStoreItem { - return { - name: object?.name - }; - }, - toSDK(message: SnapshotStoreItem): SnapshotStoreItemSDKType { - const obj: any = {}; - obj.name = message.name; - return obj; - }, - fromAmino(object: SnapshotStoreItemAmino): SnapshotStoreItem { - return { - name: object.name - }; - }, - toAmino(message: SnapshotStoreItem): SnapshotStoreItemAmino { - const obj: any = {}; - obj.name = message.name; - return obj; - }, - fromAminoMsg(object: SnapshotStoreItemAminoMsg): SnapshotStoreItem { - return SnapshotStoreItem.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotStoreItem): SnapshotStoreItemAminoMsg { - return { - type: "cosmos-sdk/SnapshotStoreItem", - value: SnapshotStoreItem.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotStoreItemProtoMsg): SnapshotStoreItem { - return SnapshotStoreItem.decode(message.value); - }, - toProto(message: SnapshotStoreItem): Uint8Array { - return SnapshotStoreItem.encode(message).finish(); - }, - toProtoMsg(message: SnapshotStoreItem): SnapshotStoreItemProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotStoreItem", - value: SnapshotStoreItem.encode(message).finish() - }; - } -}; -function createBaseSnapshotIAVLItem(): SnapshotIAVLItem { - return { - key: new Uint8Array(), - value: new Uint8Array(), - version: BigInt(0), - height: 0 - }; -} -export const SnapshotIAVLItem = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", - aminoType: "cosmos-sdk/SnapshotIAVLItem", - encode(message: SnapshotIAVLItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.version !== BigInt(0)) { - writer.uint32(24).int64(message.version); - } - if (message.height !== 0) { - writer.uint32(32).int32(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotIAVLItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotIAVLItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.version = reader.int64(); - break; - case 4: - message.height = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotIAVLItem { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - version: isSet(object.version) ? BigInt(object.version.toString()) : BigInt(0), - height: isSet(object.height) ? Number(object.height) : 0 - }; - }, - toJSON(message: SnapshotIAVLItem): unknown { - 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())); - message.version !== undefined && (obj.version = (message.version || BigInt(0)).toString()); - message.height !== undefined && (obj.height = Math.round(message.height)); - return obj; - }, - fromPartial(object: DeepPartial): SnapshotIAVLItem { - const message = createBaseSnapshotIAVLItem(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - message.height = object.height ?? 0; - return message; - }, - fromSDK(object: SnapshotIAVLItemSDKType): SnapshotIAVLItem { - return { - key: object?.key, - value: object?.value, - version: object?.version, - height: object?.height - }; - }, - toSDK(message: SnapshotIAVLItem): SnapshotIAVLItemSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.version = message.version; - obj.height = message.height; - return obj; - }, - fromAmino(object: SnapshotIAVLItemAmino): SnapshotIAVLItem { - return { - key: object.key, - value: object.value, - version: BigInt(object.version), - height: object.height - }; - }, - toAmino(message: SnapshotIAVLItem): SnapshotIAVLItemAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.version = message.version ? message.version.toString() : undefined; - obj.height = message.height; - return obj; - }, - fromAminoMsg(object: SnapshotIAVLItemAminoMsg): SnapshotIAVLItem { - return SnapshotIAVLItem.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotIAVLItem): SnapshotIAVLItemAminoMsg { - return { - type: "cosmos-sdk/SnapshotIAVLItem", - value: SnapshotIAVLItem.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotIAVLItemProtoMsg): SnapshotIAVLItem { - return SnapshotIAVLItem.decode(message.value); - }, - toProto(message: SnapshotIAVLItem): Uint8Array { - return SnapshotIAVLItem.encode(message).finish(); - }, - toProtoMsg(message: SnapshotIAVLItem): SnapshotIAVLItemProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", - value: SnapshotIAVLItem.encode(message).finish() - }; - } -}; -function createBaseSnapshotExtensionMeta(): SnapshotExtensionMeta { - return { - name: "", - format: 0 - }; -} -export const SnapshotExtensionMeta = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", - aminoType: "cosmos-sdk/SnapshotExtensionMeta", - encode(message: SnapshotExtensionMeta, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotExtensionMeta { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotExtensionMeta(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.format = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotExtensionMeta { - return { - name: isSet(object.name) ? String(object.name) : "", - format: isSet(object.format) ? Number(object.format) : 0 - }; - }, - toJSON(message: SnapshotExtensionMeta): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.format !== undefined && (obj.format = Math.round(message.format)); - return obj; - }, - fromPartial(object: DeepPartial): SnapshotExtensionMeta { - const message = createBaseSnapshotExtensionMeta(); - message.name = object.name ?? ""; - message.format = object.format ?? 0; - return message; - }, - fromSDK(object: SnapshotExtensionMetaSDKType): SnapshotExtensionMeta { - return { - name: object?.name, - format: object?.format - }; - }, - toSDK(message: SnapshotExtensionMeta): SnapshotExtensionMetaSDKType { - const obj: any = {}; - obj.name = message.name; - obj.format = message.format; - return obj; - }, - fromAmino(object: SnapshotExtensionMetaAmino): SnapshotExtensionMeta { - return { - name: object.name, - format: object.format - }; - }, - toAmino(message: SnapshotExtensionMeta): SnapshotExtensionMetaAmino { - const obj: any = {}; - obj.name = message.name; - obj.format = message.format; - return obj; - }, - fromAminoMsg(object: SnapshotExtensionMetaAminoMsg): SnapshotExtensionMeta { - return SnapshotExtensionMeta.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotExtensionMeta): SnapshotExtensionMetaAminoMsg { - return { - type: "cosmos-sdk/SnapshotExtensionMeta", - value: SnapshotExtensionMeta.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotExtensionMetaProtoMsg): SnapshotExtensionMeta { - return SnapshotExtensionMeta.decode(message.value); - }, - toProto(message: SnapshotExtensionMeta): Uint8Array { - return SnapshotExtensionMeta.encode(message).finish(); - }, - toProtoMsg(message: SnapshotExtensionMeta): SnapshotExtensionMetaProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", - value: SnapshotExtensionMeta.encode(message).finish() - }; - } -}; -function createBaseSnapshotExtensionPayload(): SnapshotExtensionPayload { - return { - payload: new Uint8Array() - }; -} -export const SnapshotExtensionPayload = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", - aminoType: "cosmos-sdk/SnapshotExtensionPayload", - encode(message: SnapshotExtensionPayload, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.payload.length !== 0) { - writer.uint32(10).bytes(message.payload); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotExtensionPayload { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotExtensionPayload(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payload = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotExtensionPayload { - return { - payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array() - }; - }, - toJSON(message: SnapshotExtensionPayload): unknown { - const obj: any = {}; - message.payload !== undefined && (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): SnapshotExtensionPayload { - const message = createBaseSnapshotExtensionPayload(); - message.payload = object.payload ?? new Uint8Array(); - return message; - }, - fromSDK(object: SnapshotExtensionPayloadSDKType): SnapshotExtensionPayload { - return { - payload: object?.payload - }; - }, - toSDK(message: SnapshotExtensionPayload): SnapshotExtensionPayloadSDKType { - const obj: any = {}; - obj.payload = message.payload; - return obj; - }, - fromAmino(object: SnapshotExtensionPayloadAmino): SnapshotExtensionPayload { - return { - payload: object.payload - }; - }, - toAmino(message: SnapshotExtensionPayload): SnapshotExtensionPayloadAmino { - const obj: any = {}; - obj.payload = message.payload; - return obj; - }, - fromAminoMsg(object: SnapshotExtensionPayloadAminoMsg): SnapshotExtensionPayload { - return SnapshotExtensionPayload.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotExtensionPayload): SnapshotExtensionPayloadAminoMsg { - return { - type: "cosmos-sdk/SnapshotExtensionPayload", - value: SnapshotExtensionPayload.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotExtensionPayloadProtoMsg): SnapshotExtensionPayload { - return SnapshotExtensionPayload.decode(message.value); - }, - toProto(message: SnapshotExtensionPayload): Uint8Array { - return SnapshotExtensionPayload.encode(message).finish(); - }, - toProtoMsg(message: SnapshotExtensionPayload): SnapshotExtensionPayloadProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", - value: SnapshotExtensionPayload.encode(message).finish() - }; - } -}; -function createBaseSnapshotKVItem(): SnapshotKVItem { - return { - key: new Uint8Array(), - value: new Uint8Array() - }; -} -export const SnapshotKVItem = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotKVItem", - aminoType: "cosmos-sdk/SnapshotKVItem", - encode(message: SnapshotKVItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotKVItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotKVItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotKVItem { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() - }; - }, - toJSON(message: SnapshotKVItem): unknown { - 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())); - return obj; - }, - fromPartial(object: DeepPartial): SnapshotKVItem { - const message = createBaseSnapshotKVItem(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - return message; - }, - fromSDK(object: SnapshotKVItemSDKType): SnapshotKVItem { - return { - key: object?.key, - value: object?.value - }; - }, - toSDK(message: SnapshotKVItem): SnapshotKVItemSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: SnapshotKVItemAmino): SnapshotKVItem { - return { - key: object.key, - value: object.value - }; - }, - toAmino(message: SnapshotKVItem): SnapshotKVItemAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: SnapshotKVItemAminoMsg): SnapshotKVItem { - return SnapshotKVItem.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotKVItem): SnapshotKVItemAminoMsg { - return { - type: "cosmos-sdk/SnapshotKVItem", - value: SnapshotKVItem.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotKVItemProtoMsg): SnapshotKVItem { - return SnapshotKVItem.decode(message.value); - }, - toProto(message: SnapshotKVItem): Uint8Array { - return SnapshotKVItem.encode(message).finish(); - }, - toProtoMsg(message: SnapshotKVItem): SnapshotKVItemProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotKVItem", - value: SnapshotKVItem.encode(message).finish() - }; - } -}; -function createBaseSnapshotSchema(): SnapshotSchema { - return { - keys: [] - }; -} -export const SnapshotSchema = { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotSchema", - aminoType: "cosmos-sdk/SnapshotSchema", - encode(message: SnapshotSchema, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.keys) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SnapshotSchema { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotSchema(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keys.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SnapshotSchema { - return { - keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: SnapshotSchema): unknown { - const obj: any = {}; - if (message.keys) { - obj.keys = message.keys.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.keys = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SnapshotSchema { - const message = createBaseSnapshotSchema(); - message.keys = object.keys?.map(e => e) || []; - return message; - }, - fromSDK(object: SnapshotSchemaSDKType): SnapshotSchema { - return { - keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => e) : [] - }; - }, - toSDK(message: SnapshotSchema): SnapshotSchemaSDKType { - const obj: any = {}; - if (message.keys) { - obj.keys = message.keys.map(e => e); - } else { - obj.keys = []; - } - return obj; - }, - fromAmino(object: SnapshotSchemaAmino): SnapshotSchema { - return { - keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => e) : [] - }; - }, - toAmino(message: SnapshotSchema): SnapshotSchemaAmino { - const obj: any = {}; - if (message.keys) { - obj.keys = message.keys.map(e => e); - } else { - obj.keys = []; - } - return obj; - }, - fromAminoMsg(object: SnapshotSchemaAminoMsg): SnapshotSchema { - return SnapshotSchema.fromAmino(object.value); - }, - toAminoMsg(message: SnapshotSchema): SnapshotSchemaAminoMsg { - return { - type: "cosmos-sdk/SnapshotSchema", - value: SnapshotSchema.toAmino(message) - }; - }, - fromProtoMsg(message: SnapshotSchemaProtoMsg): SnapshotSchema { - return SnapshotSchema.decode(message.value); - }, - toProto(message: SnapshotSchema): Uint8Array { - return SnapshotSchema.encode(message).finish(); - }, - toProtoMsg(message: SnapshotSchema): SnapshotSchemaProtoMsg { - return { - typeUrl: "/cosmos.base.snapshots.v1beta1.SnapshotSchema", - value: SnapshotSchema.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/store/v1beta1/commit_info.ts b/examples/interchainjs/src/codegen/cosmos/base/store/v1beta1/commit_info.ts deleted file mode 100644 index 935c1b00..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/store/v1beta1/commit_info.ts +++ /dev/null @@ -1,416 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * CommitInfo defines commit information used by the multi-store when committing - * a version/height. - */ -export interface CommitInfo { - version: bigint; - storeInfos: StoreInfo[]; -} -export interface CommitInfoProtoMsg { - typeUrl: "/cosmos.base.store.v1beta1.CommitInfo"; - value: Uint8Array; -} -/** - * CommitInfo defines commit information used by the multi-store when committing - * a version/height. - */ -export interface CommitInfoAmino { - version: string; - store_infos: StoreInfoAmino[]; -} -export interface CommitInfoAminoMsg { - type: "cosmos-sdk/CommitInfo"; - value: CommitInfoAmino; -} -/** - * CommitInfo defines commit information used by the multi-store when committing - * a version/height. - */ -export interface CommitInfoSDKType { - version: bigint; - store_infos: StoreInfoSDKType[]; -} -/** - * StoreInfo defines store-specific commit information. It contains a reference - * between a store name and the commit ID. - */ -export interface StoreInfo { - name: string; - commitId: CommitID | undefined; -} -export interface StoreInfoProtoMsg { - typeUrl: "/cosmos.base.store.v1beta1.StoreInfo"; - value: Uint8Array; -} -/** - * StoreInfo defines store-specific commit information. It contains a reference - * between a store name and the commit ID. - */ -export interface StoreInfoAmino { - name: string; - commit_id?: CommitIDAmino | undefined; -} -export interface StoreInfoAminoMsg { - type: "cosmos-sdk/StoreInfo"; - value: StoreInfoAmino; -} -/** - * StoreInfo defines store-specific commit information. It contains a reference - * between a store name and the commit ID. - */ -export interface StoreInfoSDKType { - name: string; - commit_id: CommitIDSDKType | undefined; -} -/** - * CommitID defines the committment information when a specific store is - * committed. - */ -export interface CommitID { - version: bigint; - hash: Uint8Array; -} -export interface CommitIDProtoMsg { - typeUrl: "/cosmos.base.store.v1beta1.CommitID"; - value: Uint8Array; -} -/** - * CommitID defines the committment information when a specific store is - * committed. - */ -export interface CommitIDAmino { - version: string; - hash: Uint8Array; -} -export interface CommitIDAminoMsg { - type: "cosmos-sdk/CommitID"; - value: CommitIDAmino; -} -/** - * CommitID defines the committment information when a specific store is - * committed. - */ -export interface CommitIDSDKType { - version: bigint; - hash: Uint8Array; -} -function createBaseCommitInfo(): CommitInfo { - return { - version: BigInt(0), - storeInfos: [] - }; -} -export const CommitInfo = { - typeUrl: "/cosmos.base.store.v1beta1.CommitInfo", - aminoType: "cosmos-sdk/CommitInfo", - encode(message: CommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== BigInt(0)) { - writer.uint32(8).int64(message.version); - } - for (const v of message.storeInfos) { - StoreInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommitInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommitInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.int64(); - break; - case 2: - message.storeInfos.push(StoreInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommitInfo { - return { - version: isSet(object.version) ? BigInt(object.version.toString()) : BigInt(0), - storeInfos: Array.isArray(object?.storeInfos) ? object.storeInfos.map((e: any) => StoreInfo.fromJSON(e)) : [] - }; - }, - toJSON(message: CommitInfo): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = (message.version || BigInt(0)).toString()); - if (message.storeInfos) { - obj.storeInfos = message.storeInfos.map(e => e ? StoreInfo.toJSON(e) : undefined); - } else { - obj.storeInfos = []; - } - return obj; - }, - fromPartial(object: DeepPartial): CommitInfo { - const message = createBaseCommitInfo(); - message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - message.storeInfos = object.storeInfos?.map(e => StoreInfo.fromPartial(e)) || []; - return message; - }, - fromSDK(object: CommitInfoSDKType): CommitInfo { - return { - version: object?.version, - storeInfos: Array.isArray(object?.store_infos) ? object.store_infos.map((e: any) => StoreInfo.fromSDK(e)) : [] - }; - }, - toSDK(message: CommitInfo): CommitInfoSDKType { - const obj: any = {}; - obj.version = message.version; - if (message.storeInfos) { - obj.store_infos = message.storeInfos.map(e => e ? StoreInfo.toSDK(e) : undefined); - } else { - obj.store_infos = []; - } - return obj; - }, - fromAmino(object: CommitInfoAmino): CommitInfo { - return { - version: BigInt(object.version), - storeInfos: Array.isArray(object?.store_infos) ? object.store_infos.map((e: any) => StoreInfo.fromAmino(e)) : [] - }; - }, - toAmino(message: CommitInfo): CommitInfoAmino { - const obj: any = {}; - obj.version = message.version ? message.version.toString() : undefined; - if (message.storeInfos) { - obj.store_infos = message.storeInfos.map(e => e ? StoreInfo.toAmino(e) : undefined); - } else { - obj.store_infos = []; - } - return obj; - }, - fromAminoMsg(object: CommitInfoAminoMsg): CommitInfo { - return CommitInfo.fromAmino(object.value); - }, - toAminoMsg(message: CommitInfo): CommitInfoAminoMsg { - return { - type: "cosmos-sdk/CommitInfo", - value: CommitInfo.toAmino(message) - }; - }, - fromProtoMsg(message: CommitInfoProtoMsg): CommitInfo { - return CommitInfo.decode(message.value); - }, - toProto(message: CommitInfo): Uint8Array { - return CommitInfo.encode(message).finish(); - }, - toProtoMsg(message: CommitInfo): CommitInfoProtoMsg { - return { - typeUrl: "/cosmos.base.store.v1beta1.CommitInfo", - value: CommitInfo.encode(message).finish() - }; - } -}; -function createBaseStoreInfo(): StoreInfo { - return { - name: "", - commitId: CommitID.fromPartial({}) - }; -} -export const StoreInfo = { - typeUrl: "/cosmos.base.store.v1beta1.StoreInfo", - aminoType: "cosmos-sdk/StoreInfo", - encode(message: StoreInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.commitId !== undefined) { - CommitID.encode(message.commitId, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StoreInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStoreInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.commitId = CommitID.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): StoreInfo { - return { - name: isSet(object.name) ? String(object.name) : "", - commitId: isSet(object.commitId) ? CommitID.fromJSON(object.commitId) : undefined - }; - }, - toJSON(message: StoreInfo): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.commitId !== undefined && (obj.commitId = message.commitId ? CommitID.toJSON(message.commitId) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): StoreInfo { - const message = createBaseStoreInfo(); - message.name = object.name ?? ""; - message.commitId = object.commitId !== undefined && object.commitId !== null ? CommitID.fromPartial(object.commitId) : undefined; - return message; - }, - fromSDK(object: StoreInfoSDKType): StoreInfo { - return { - name: object?.name, - commitId: object.commit_id ? CommitID.fromSDK(object.commit_id) : undefined - }; - }, - toSDK(message: StoreInfo): StoreInfoSDKType { - const obj: any = {}; - obj.name = message.name; - message.commitId !== undefined && (obj.commit_id = message.commitId ? CommitID.toSDK(message.commitId) : undefined); - return obj; - }, - fromAmino(object: StoreInfoAmino): StoreInfo { - return { - name: object.name, - commitId: object?.commit_id ? CommitID.fromAmino(object.commit_id) : undefined - }; - }, - toAmino(message: StoreInfo): StoreInfoAmino { - const obj: any = {}; - obj.name = message.name; - obj.commit_id = message.commitId ? CommitID.toAmino(message.commitId) : undefined; - return obj; - }, - fromAminoMsg(object: StoreInfoAminoMsg): StoreInfo { - return StoreInfo.fromAmino(object.value); - }, - toAminoMsg(message: StoreInfo): StoreInfoAminoMsg { - return { - type: "cosmos-sdk/StoreInfo", - value: StoreInfo.toAmino(message) - }; - }, - fromProtoMsg(message: StoreInfoProtoMsg): StoreInfo { - return StoreInfo.decode(message.value); - }, - toProto(message: StoreInfo): Uint8Array { - return StoreInfo.encode(message).finish(); - }, - toProtoMsg(message: StoreInfo): StoreInfoProtoMsg { - return { - typeUrl: "/cosmos.base.store.v1beta1.StoreInfo", - value: StoreInfo.encode(message).finish() - }; - } -}; -function createBaseCommitID(): CommitID { - return { - version: BigInt(0), - hash: new Uint8Array() - }; -} -export const CommitID = { - typeUrl: "/cosmos.base.store.v1beta1.CommitID", - aminoType: "cosmos-sdk/CommitID", - encode(message: CommitID, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== BigInt(0)) { - writer.uint32(8).int64(message.version); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommitID { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommitID(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.int64(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommitID { - return { - version: isSet(object.version) ? BigInt(object.version.toString()) : BigInt(0), - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array() - }; - }, - toJSON(message: CommitID): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = (message.version || BigInt(0)).toString()); - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): CommitID { - const message = createBaseCommitID(); - message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - message.hash = object.hash ?? new Uint8Array(); - return message; - }, - fromSDK(object: CommitIDSDKType): CommitID { - return { - version: object?.version, - hash: object?.hash - }; - }, - toSDK(message: CommitID): CommitIDSDKType { - const obj: any = {}; - obj.version = message.version; - obj.hash = message.hash; - return obj; - }, - fromAmino(object: CommitIDAmino): CommitID { - return { - version: BigInt(object.version), - hash: object.hash - }; - }, - toAmino(message: CommitID): CommitIDAmino { - const obj: any = {}; - obj.version = message.version ? message.version.toString() : undefined; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: CommitIDAminoMsg): CommitID { - return CommitID.fromAmino(object.value); - }, - toAminoMsg(message: CommitID): CommitIDAminoMsg { - return { - type: "cosmos-sdk/CommitID", - value: CommitID.toAmino(message) - }; - }, - fromProtoMsg(message: CommitIDProtoMsg): CommitID { - return CommitID.decode(message.value); - }, - toProto(message: CommitID): Uint8Array { - return CommitID.encode(message).finish(); - }, - toProtoMsg(message: CommitID): CommitIDProtoMsg { - return { - typeUrl: "/cosmos.base.store.v1beta1.CommitID", - value: CommitID.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/store/v1beta1/listening.ts b/examples/interchainjs/src/codegen/cosmos/base/store/v1beta1/listening.ts deleted file mode 100644 index 1aa651a9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/store/v1beta1/listening.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; -/** - * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) - * It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and - * Deletes - * - * Since: cosmos-sdk 0.43 - */ -export interface StoreKVPair { - /** the store key for the KVStore this pair originates from */ - storeKey: string; - /** true indicates a delete operation, false indicates a set operation */ - delete: boolean; - key: Uint8Array; - value: Uint8Array; -} -export interface StoreKVPairProtoMsg { - typeUrl: "/cosmos.base.store.v1beta1.StoreKVPair"; - value: Uint8Array; -} -/** - * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) - * It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and - * Deletes - * - * Since: cosmos-sdk 0.43 - */ -export interface StoreKVPairAmino { - /** the store key for the KVStore this pair originates from */ - store_key: string; - /** true indicates a delete operation, false indicates a set operation */ - delete: boolean; - key: Uint8Array; - value: Uint8Array; -} -export interface StoreKVPairAminoMsg { - type: "cosmos-sdk/StoreKVPair"; - value: StoreKVPairAmino; -} -/** - * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) - * It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and - * Deletes - * - * Since: cosmos-sdk 0.43 - */ -export interface StoreKVPairSDKType { - store_key: string; - delete: boolean; - key: Uint8Array; - value: Uint8Array; -} -function createBaseStoreKVPair(): StoreKVPair { - return { - storeKey: "", - delete: false, - key: new Uint8Array(), - value: new Uint8Array() - }; -} -export const StoreKVPair = { - typeUrl: "/cosmos.base.store.v1beta1.StoreKVPair", - aminoType: "cosmos-sdk/StoreKVPair", - encode(message: StoreKVPair, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.storeKey !== "") { - writer.uint32(10).string(message.storeKey); - } - if (message.delete === true) { - writer.uint32(16).bool(message.delete); - } - if (message.key.length !== 0) { - writer.uint32(26).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(34).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StoreKVPair { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStoreKVPair(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.storeKey = reader.string(); - break; - case 2: - message.delete = reader.bool(); - break; - case 3: - message.key = reader.bytes(); - break; - case 4: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): StoreKVPair { - return { - storeKey: isSet(object.storeKey) ? String(object.storeKey) : "", - delete: isSet(object.delete) ? Boolean(object.delete) : false, - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() - }; - }, - toJSON(message: StoreKVPair): unknown { - const obj: any = {}; - message.storeKey !== undefined && (obj.storeKey = message.storeKey); - message.delete !== undefined && (obj.delete = message.delete); - 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())); - return obj; - }, - fromPartial(object: DeepPartial): StoreKVPair { - const message = createBaseStoreKVPair(); - message.storeKey = object.storeKey ?? ""; - message.delete = object.delete ?? false; - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - return message; - }, - fromSDK(object: StoreKVPairSDKType): StoreKVPair { - return { - storeKey: object?.store_key, - delete: object?.delete, - key: object?.key, - value: object?.value - }; - }, - toSDK(message: StoreKVPair): StoreKVPairSDKType { - const obj: any = {}; - obj.store_key = message.storeKey; - obj.delete = message.delete; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: StoreKVPairAmino): StoreKVPair { - return { - storeKey: object.store_key, - delete: object.delete, - key: object.key, - value: object.value - }; - }, - toAmino(message: StoreKVPair): StoreKVPairAmino { - const obj: any = {}; - obj.store_key = message.storeKey; - obj.delete = message.delete; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: StoreKVPairAminoMsg): StoreKVPair { - return StoreKVPair.fromAmino(object.value); - }, - toAminoMsg(message: StoreKVPair): StoreKVPairAminoMsg { - return { - type: "cosmos-sdk/StoreKVPair", - value: StoreKVPair.toAmino(message) - }; - }, - fromProtoMsg(message: StoreKVPairProtoMsg): StoreKVPair { - return StoreKVPair.decode(message.value); - }, - toProto(message: StoreKVPair): Uint8Array { - return StoreKVPair.encode(message).finish(); - }, - toProtoMsg(message: StoreKVPair): StoreKVPairProtoMsg { - return { - typeUrl: "/cosmos.base.store.v1beta1.StoreKVPair", - value: StoreKVPair.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts b/examples/interchainjs/src/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts deleted file mode 100644 index 3eebc66c..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../../mobx"; -import { GetNodeInfoRequest, GetNodeInfoResponse, GetSyncingRequest, GetSyncingResponse, GetLatestBlockRequest, GetLatestBlockResponse, GetBlockByHeightRequest, GetBlockByHeightResponse, GetLatestValidatorSetRequest, GetLatestValidatorSetResponse, GetValidatorSetByHeightRequest, GetValidatorSetByHeightResponse } from "./query"; -/** Service defines the gRPC querier service for tendermint queries. */ -export interface Service { - /** GetNodeInfo queries the current node info. */ - getNodeInfo(request?: GetNodeInfoRequest): Promise; - /** GetSyncing queries node syncing. */ - getSyncing(request?: GetSyncingRequest): Promise; - /** GetLatestBlock returns the latest block. */ - getLatestBlock(request?: GetLatestBlockRequest): Promise; - /** GetBlockByHeight queries block for given height. */ - getBlockByHeight(request: GetBlockByHeightRequest): Promise; - /** GetLatestValidatorSet queries latest validator-set. */ - getLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise; - /** GetValidatorSetByHeight queries validator-set at a given height. */ - getValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise; -} -export class ServiceClientImpl implements Service { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.getNodeInfo = this.getNodeInfo.bind(this); - this.getSyncing = this.getSyncing.bind(this); - this.getLatestBlock = this.getLatestBlock.bind(this); - this.getBlockByHeight = this.getBlockByHeight.bind(this); - this.getLatestValidatorSet = this.getLatestValidatorSet.bind(this); - this.getValidatorSetByHeight = this.getValidatorSetByHeight.bind(this); - } - getNodeInfo(request: GetNodeInfoRequest = {}): Promise { - const data = GetNodeInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetNodeInfo", data); - return promise.then(data => GetNodeInfoResponse.decode(new BinaryReader(data))); - } - getSyncing(request: GetSyncingRequest = {}): Promise { - const data = GetSyncingRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetSyncing", data); - return promise.then(data => GetSyncingResponse.decode(new BinaryReader(data))); - } - getLatestBlock(request: GetLatestBlockRequest = {}): Promise { - const data = GetLatestBlockRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetLatestBlock", data); - return promise.then(data => GetLatestBlockResponse.decode(new BinaryReader(data))); - } - getBlockByHeight(request: GetBlockByHeightRequest): Promise { - const data = GetBlockByHeightRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetBlockByHeight", data); - return promise.then(data => GetBlockByHeightResponse.decode(new BinaryReader(data))); - } - getLatestValidatorSet(request: GetLatestValidatorSetRequest = { - pagination: undefined - }): Promise { - const data = GetLatestValidatorSetRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetLatestValidatorSet", data); - return promise.then(data => GetLatestValidatorSetResponse.decode(new BinaryReader(data))); - } - getValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise { - const data = GetValidatorSetByHeightRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetValidatorSetByHeight", data); - return promise.then(data => GetValidatorSetByHeightResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new ServiceClientImpl(rpc); - return { - getNodeInfo(request?: GetNodeInfoRequest): Promise { - return queryService.getNodeInfo(request); - }, - getSyncing(request?: GetSyncingRequest): Promise { - return queryService.getSyncing(request); - }, - getLatestBlock(request?: GetLatestBlockRequest): Promise { - return queryService.getLatestBlock(request); - }, - getBlockByHeight(request: GetBlockByHeightRequest): Promise { - return queryService.getBlockByHeight(request); - }, - getLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise { - return queryService.getLatestValidatorSet(request); - }, - getValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise { - return queryService.getValidatorSetByHeight(request); - } - }; -}; -export interface UseGetNodeInfoQuery extends ReactQueryParams { - request?: GetNodeInfoRequest; -} -export interface UseGetSyncingQuery extends ReactQueryParams { - request?: GetSyncingRequest; -} -export interface UseGetLatestBlockQuery extends ReactQueryParams { - request?: GetLatestBlockRequest; -} -export interface UseGetBlockByHeightQuery extends ReactQueryParams { - request: GetBlockByHeightRequest; -} -export interface UseGetLatestValidatorSetQuery extends ReactQueryParams { - request?: GetLatestValidatorSetRequest; -} -export interface UseGetValidatorSetByHeightQuery extends ReactQueryParams { - request: GetValidatorSetByHeightRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): ServiceClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new ServiceClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useGetNodeInfo = ({ - request, - options - }: UseGetNodeInfoQuery) => { - return useQuery(["getNodeInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getNodeInfo(request); - }, options); - }; - const useGetSyncing = ({ - request, - options - }: UseGetSyncingQuery) => { - return useQuery(["getSyncingQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getSyncing(request); - }, options); - }; - const useGetLatestBlock = ({ - request, - options - }: UseGetLatestBlockQuery) => { - return useQuery(["getLatestBlockQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getLatestBlock(request); - }, options); - }; - const useGetBlockByHeight = ({ - request, - options - }: UseGetBlockByHeightQuery) => { - return useQuery(["getBlockByHeightQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getBlockByHeight(request); - }, options); - }; - const useGetLatestValidatorSet = ({ - request, - options - }: UseGetLatestValidatorSetQuery) => { - return useQuery(["getLatestValidatorSetQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getLatestValidatorSet(request); - }, options); - }; - const useGetValidatorSetByHeight = ({ - request, - options - }: UseGetValidatorSetByHeightQuery) => { - return useQuery(["getValidatorSetByHeightQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getValidatorSetByHeight(request); - }, options); - }; - return { - /** GetNodeInfo queries the current node info. */useGetNodeInfo, - /** GetSyncing queries node syncing. */useGetSyncing, - /** GetLatestBlock returns the latest block. */useGetLatestBlock, - /** GetBlockByHeight queries block for given height. */useGetBlockByHeight, - /** GetLatestValidatorSet queries latest validator-set. */useGetLatestValidatorSet, - /** GetValidatorSetByHeight queries validator-set at a given height. */useGetValidatorSetByHeight - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryGetNodeInfoStore { - store = new QueryStore(queryService?.getNodeInfo); - getNodeInfo(request: GetNodeInfoRequest) { - return this.store.getData(request); - } - } - class QueryGetSyncingStore { - store = new QueryStore(queryService?.getSyncing); - getSyncing(request: GetSyncingRequest) { - return this.store.getData(request); - } - } - class QueryGetLatestBlockStore { - store = new QueryStore(queryService?.getLatestBlock); - getLatestBlock(request: GetLatestBlockRequest) { - return this.store.getData(request); - } - } - class QueryGetBlockByHeightStore { - store = new QueryStore(queryService?.getBlockByHeight); - getBlockByHeight(request: GetBlockByHeightRequest) { - return this.store.getData(request); - } - } - class QueryGetLatestValidatorSetStore { - store = new QueryStore(queryService?.getLatestValidatorSet); - getLatestValidatorSet(request: GetLatestValidatorSetRequest) { - return this.store.getData(request); - } - } - class QueryGetValidatorSetByHeightStore { - store = new QueryStore(queryService?.getValidatorSetByHeight); - getValidatorSetByHeight(request: GetValidatorSetByHeightRequest) { - return this.store.getData(request); - } - } - return { - /** GetNodeInfo queries the current node info. */QueryGetNodeInfoStore, - /** GetSyncing queries node syncing. */QueryGetSyncingStore, - /** GetLatestBlock returns the latest block. */QueryGetLatestBlockStore, - /** GetBlockByHeight queries block for given height. */QueryGetBlockByHeightStore, - /** GetLatestValidatorSet queries latest validator-set. */QueryGetLatestValidatorSetStore, - /** GetValidatorSetByHeight queries validator-set at a given height. */QueryGetValidatorSetByHeightStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/tendermint/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/base/tendermint/v1beta1/query.ts deleted file mode 100644 index 743c0698..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/tendermint/v1beta1/query.ts +++ /dev/null @@ -1,1947 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../query/v1beta1/pagination"; -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { BlockID, BlockIDAmino, BlockIDSDKType } from "../../../../tendermint/types/types"; -import { Block, BlockAmino, BlockSDKType } from "../../../../tendermint/types/block"; -import { NodeInfo, NodeInfoAmino, NodeInfoSDKType } from "../../../../tendermint/p2p/types"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightRequest { - height: bigint; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface GetValidatorSetByHeightRequestProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest"; - value: Uint8Array; -} -/** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightRequestAmino { - height: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface GetValidatorSetByHeightRequestAminoMsg { - type: "cosmos-sdk/GetValidatorSetByHeightRequest"; - value: GetValidatorSetByHeightRequestAmino; -} -/** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightRequestSDKType { - height: bigint; - pagination: PageRequestSDKType | undefined; -} -/** GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightResponse { - blockHeight: bigint; - validators: Validator[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface GetValidatorSetByHeightResponseProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse"; - value: Uint8Array; -} -/** GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightResponseAmino { - block_height: string; - validators: ValidatorAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface GetValidatorSetByHeightResponseAminoMsg { - type: "cosmos-sdk/GetValidatorSetByHeightResponse"; - value: GetValidatorSetByHeightResponseAmino; -} -/** GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetValidatorSetByHeightResponseSDKType { - block_height: bigint; - validators: ValidatorSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetRequest { - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface GetLatestValidatorSetRequestProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest"; - value: Uint8Array; -} -/** GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetRequestAmino { - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface GetLatestValidatorSetRequestAminoMsg { - type: "cosmos-sdk/GetLatestValidatorSetRequest"; - value: GetLatestValidatorSetRequestAmino; -} -/** GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetResponse { - blockHeight: bigint; - validators: Validator[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface GetLatestValidatorSetResponseProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse"; - value: Uint8Array; -} -/** GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetResponseAmino { - block_height: string; - validators: ValidatorAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface GetLatestValidatorSetResponseAminoMsg { - type: "cosmos-sdk/GetLatestValidatorSetResponse"; - value: GetLatestValidatorSetResponseAmino; -} -/** GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ -export interface GetLatestValidatorSetResponseSDKType { - block_height: bigint; - validators: ValidatorSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** Validator is the type for the validator-set. */ -export interface Validator { - address: string; - pubKey: Any | undefined; - votingPower: bigint; - proposerPriority: bigint; -} -export interface ValidatorProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.Validator"; - value: Uint8Array; -} -/** Validator is the type for the validator-set. */ -export interface ValidatorAmino { - address: string; - pub_key?: AnyAmino | undefined; - voting_power: string; - proposer_priority: string; -} -export interface ValidatorAminoMsg { - type: "cosmos-sdk/Validator"; - value: ValidatorAmino; -} -/** Validator is the type for the validator-set. */ -export interface ValidatorSDKType { - address: string; - pub_key: AnySDKType | undefined; - voting_power: bigint; - proposer_priority: bigint; -} -/** GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightRequest { - height: bigint; -} -export interface GetBlockByHeightRequestProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest"; - value: Uint8Array; -} -/** GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightRequestAmino { - height: string; -} -export interface GetBlockByHeightRequestAminoMsg { - type: "cosmos-sdk/GetBlockByHeightRequest"; - value: GetBlockByHeightRequestAmino; -} -/** GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightRequestSDKType { - height: bigint; -} -/** GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightResponse { - blockId: BlockID | undefined; - block: Block | undefined; -} -export interface GetBlockByHeightResponseProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse"; - value: Uint8Array; -} -/** GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightResponseAmino { - block_id?: BlockIDAmino | undefined; - block?: BlockAmino | undefined; -} -export interface GetBlockByHeightResponseAminoMsg { - type: "cosmos-sdk/GetBlockByHeightResponse"; - value: GetBlockByHeightResponseAmino; -} -/** GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. */ -export interface GetBlockByHeightResponseSDKType { - block_id: BlockIDSDKType | undefined; - block: BlockSDKType | undefined; -} -/** GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockRequest {} -export interface GetLatestBlockRequestProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestBlockRequest"; - value: Uint8Array; -} -/** GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockRequestAmino {} -export interface GetLatestBlockRequestAminoMsg { - type: "cosmos-sdk/GetLatestBlockRequest"; - value: GetLatestBlockRequestAmino; -} -/** GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockRequestSDKType {} -/** GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockResponse { - blockId: BlockID | undefined; - block: Block | undefined; -} -export interface GetLatestBlockResponseProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse"; - value: Uint8Array; -} -/** GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockResponseAmino { - block_id?: BlockIDAmino | undefined; - block?: BlockAmino | undefined; -} -export interface GetLatestBlockResponseAminoMsg { - type: "cosmos-sdk/GetLatestBlockResponse"; - value: GetLatestBlockResponseAmino; -} -/** GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockResponseSDKType { - block_id: BlockIDSDKType | undefined; - block: BlockSDKType | undefined; -} -/** GetSyncingRequest is the request type for the Query/GetSyncing RPC method. */ -export interface GetSyncingRequest {} -export interface GetSyncingRequestProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetSyncingRequest"; - value: Uint8Array; -} -/** GetSyncingRequest is the request type for the Query/GetSyncing RPC method. */ -export interface GetSyncingRequestAmino {} -export interface GetSyncingRequestAminoMsg { - type: "cosmos-sdk/GetSyncingRequest"; - value: GetSyncingRequestAmino; -} -/** GetSyncingRequest is the request type for the Query/GetSyncing RPC method. */ -export interface GetSyncingRequestSDKType {} -/** GetSyncingResponse is the response type for the Query/GetSyncing RPC method. */ -export interface GetSyncingResponse { - syncing: boolean; -} -export interface GetSyncingResponseProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetSyncingResponse"; - value: Uint8Array; -} -/** GetSyncingResponse is the response type for the Query/GetSyncing RPC method. */ -export interface GetSyncingResponseAmino { - syncing: boolean; -} -export interface GetSyncingResponseAminoMsg { - type: "cosmos-sdk/GetSyncingResponse"; - value: GetSyncingResponseAmino; -} -/** GetSyncingResponse is the response type for the Query/GetSyncing RPC method. */ -export interface GetSyncingResponseSDKType { - syncing: boolean; -} -/** GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoRequest {} -export interface GetNodeInfoRequestProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetNodeInfoRequest"; - value: Uint8Array; -} -/** GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoRequestAmino {} -export interface GetNodeInfoRequestAminoMsg { - type: "cosmos-sdk/GetNodeInfoRequest"; - value: GetNodeInfoRequestAmino; -} -/** GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoRequestSDKType {} -/** GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoResponse { - nodeInfo: NodeInfo | undefined; - applicationVersion: VersionInfo | undefined; -} -export interface GetNodeInfoResponseProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse"; - value: Uint8Array; -} -/** GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoResponseAmino { - node_info?: NodeInfoAmino | undefined; - application_version?: VersionInfoAmino | undefined; -} -export interface GetNodeInfoResponseAminoMsg { - type: "cosmos-sdk/GetNodeInfoResponse"; - value: GetNodeInfoResponseAmino; -} -/** GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoResponseSDKType { - node_info: NodeInfoSDKType | undefined; - application_version: VersionInfoSDKType | undefined; -} -/** VersionInfo is the type for the GetNodeInfoResponse message. */ -export interface VersionInfo { - name: string; - appName: string; - version: string; - gitCommit: string; - buildTags: string; - goVersion: string; - buildDeps: Module[]; - /** Since: cosmos-sdk 0.43 */ - cosmosSdkVersion: string; -} -export interface VersionInfoProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.VersionInfo"; - value: Uint8Array; -} -/** VersionInfo is the type for the GetNodeInfoResponse message. */ -export interface VersionInfoAmino { - name: string; - app_name: string; - version: string; - git_commit: string; - build_tags: string; - go_version: string; - build_deps: ModuleAmino[]; - /** Since: cosmos-sdk 0.43 */ - cosmos_sdk_version: string; -} -export interface VersionInfoAminoMsg { - type: "cosmos-sdk/VersionInfo"; - value: VersionInfoAmino; -} -/** VersionInfo is the type for the GetNodeInfoResponse message. */ -export interface VersionInfoSDKType { - name: string; - app_name: string; - version: string; - git_commit: string; - build_tags: string; - go_version: string; - build_deps: ModuleSDKType[]; - cosmos_sdk_version: string; -} -/** Module is the type for VersionInfo */ -export interface Module { - /** module path */ - path: string; - /** module version */ - version: string; - /** checksum */ - sum: string; -} -export interface ModuleProtoMsg { - typeUrl: "/cosmos.base.tendermint.v1beta1.Module"; - value: Uint8Array; -} -/** Module is the type for VersionInfo */ -export interface ModuleAmino { - /** module path */ - path: string; - /** module version */ - version: string; - /** checksum */ - sum: string; -} -export interface ModuleAminoMsg { - type: "cosmos-sdk/Module"; - value: ModuleAmino; -} -/** Module is the type for VersionInfo */ -export interface ModuleSDKType { - path: string; - version: string; - sum: string; -} -function createBaseGetValidatorSetByHeightRequest(): GetValidatorSetByHeightRequest { - return { - height: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const GetValidatorSetByHeightRequest = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", - aminoType: "cosmos-sdk/GetValidatorSetByHeightRequest", - encode(message: GetValidatorSetByHeightRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetValidatorSetByHeightRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetValidatorSetByHeightRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetValidatorSetByHeightRequest { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetValidatorSetByHeightRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetValidatorSetByHeightRequest { - const message = createBaseGetValidatorSetByHeightRequest(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetValidatorSetByHeightRequestSDKType): GetValidatorSetByHeightRequest { - return { - height: object?.height, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetValidatorSetByHeightRequest): GetValidatorSetByHeightRequestSDKType { - const obj: any = {}; - obj.height = message.height; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetValidatorSetByHeightRequestAmino): GetValidatorSetByHeightRequest { - return { - height: BigInt(object.height), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetValidatorSetByHeightRequest): GetValidatorSetByHeightRequestAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetValidatorSetByHeightRequestAminoMsg): GetValidatorSetByHeightRequest { - return GetValidatorSetByHeightRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetValidatorSetByHeightRequest): GetValidatorSetByHeightRequestAminoMsg { - return { - type: "cosmos-sdk/GetValidatorSetByHeightRequest", - value: GetValidatorSetByHeightRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetValidatorSetByHeightRequestProtoMsg): GetValidatorSetByHeightRequest { - return GetValidatorSetByHeightRequest.decode(message.value); - }, - toProto(message: GetValidatorSetByHeightRequest): Uint8Array { - return GetValidatorSetByHeightRequest.encode(message).finish(); - }, - toProtoMsg(message: GetValidatorSetByHeightRequest): GetValidatorSetByHeightRequestProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", - value: GetValidatorSetByHeightRequest.encode(message).finish() - }; - } -}; -function createBaseGetValidatorSetByHeightResponse(): GetValidatorSetByHeightResponse { - return { - blockHeight: BigInt(0), - validators: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const GetValidatorSetByHeightResponse = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", - aminoType: "cosmos-sdk/GetValidatorSetByHeightResponse", - encode(message: GetValidatorSetByHeightResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockHeight !== BigInt(0)) { - writer.uint32(8).int64(message.blockHeight); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetValidatorSetByHeightResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetValidatorSetByHeightResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockHeight = reader.int64(); - break; - case 2: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetValidatorSetByHeightResponse { - return { - blockHeight: isSet(object.blockHeight) ? BigInt(object.blockHeight.toString()) : BigInt(0), - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetValidatorSetByHeightResponse): unknown { - const obj: any = {}; - message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || BigInt(0)).toString()); - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetValidatorSetByHeightResponse { - const message = createBaseGetValidatorSetByHeightResponse(); - message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? BigInt(object.blockHeight.toString()) : BigInt(0); - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetValidatorSetByHeightResponseSDKType): GetValidatorSetByHeightResponse { - return { - blockHeight: object?.block_height, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetValidatorSetByHeightResponse): GetValidatorSetByHeightResponseSDKType { - const obj: any = {}; - obj.block_height = message.blockHeight; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetValidatorSetByHeightResponseAmino): GetValidatorSetByHeightResponse { - return { - blockHeight: BigInt(object.block_height), - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetValidatorSetByHeightResponse): GetValidatorSetByHeightResponseAmino { - const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetValidatorSetByHeightResponseAminoMsg): GetValidatorSetByHeightResponse { - return GetValidatorSetByHeightResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetValidatorSetByHeightResponse): GetValidatorSetByHeightResponseAminoMsg { - return { - type: "cosmos-sdk/GetValidatorSetByHeightResponse", - value: GetValidatorSetByHeightResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetValidatorSetByHeightResponseProtoMsg): GetValidatorSetByHeightResponse { - return GetValidatorSetByHeightResponse.decode(message.value); - }, - toProto(message: GetValidatorSetByHeightResponse): Uint8Array { - return GetValidatorSetByHeightResponse.encode(message).finish(); - }, - toProtoMsg(message: GetValidatorSetByHeightResponse): GetValidatorSetByHeightResponseProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", - value: GetValidatorSetByHeightResponse.encode(message).finish() - }; - } -}; -function createBaseGetLatestValidatorSetRequest(): GetLatestValidatorSetRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const GetLatestValidatorSetRequest = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest", - aminoType: "cosmos-sdk/GetLatestValidatorSetRequest", - encode(message: GetLatestValidatorSetRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetLatestValidatorSetRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetLatestValidatorSetRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetLatestValidatorSetRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetLatestValidatorSetRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetLatestValidatorSetRequest { - const message = createBaseGetLatestValidatorSetRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetLatestValidatorSetRequestSDKType): GetLatestValidatorSetRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetLatestValidatorSetRequest): GetLatestValidatorSetRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetLatestValidatorSetRequestAmino): GetLatestValidatorSetRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetLatestValidatorSetRequest): GetLatestValidatorSetRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetLatestValidatorSetRequestAminoMsg): GetLatestValidatorSetRequest { - return GetLatestValidatorSetRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetLatestValidatorSetRequest): GetLatestValidatorSetRequestAminoMsg { - return { - type: "cosmos-sdk/GetLatestValidatorSetRequest", - value: GetLatestValidatorSetRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetLatestValidatorSetRequestProtoMsg): GetLatestValidatorSetRequest { - return GetLatestValidatorSetRequest.decode(message.value); - }, - toProto(message: GetLatestValidatorSetRequest): Uint8Array { - return GetLatestValidatorSetRequest.encode(message).finish(); - }, - toProtoMsg(message: GetLatestValidatorSetRequest): GetLatestValidatorSetRequestProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest", - value: GetLatestValidatorSetRequest.encode(message).finish() - }; - } -}; -function createBaseGetLatestValidatorSetResponse(): GetLatestValidatorSetResponse { - return { - blockHeight: BigInt(0), - validators: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const GetLatestValidatorSetResponse = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", - aminoType: "cosmos-sdk/GetLatestValidatorSetResponse", - encode(message: GetLatestValidatorSetResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockHeight !== BigInt(0)) { - writer.uint32(8).int64(message.blockHeight); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetLatestValidatorSetResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetLatestValidatorSetResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockHeight = reader.int64(); - break; - case 2: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetLatestValidatorSetResponse { - return { - blockHeight: isSet(object.blockHeight) ? BigInt(object.blockHeight.toString()) : BigInt(0), - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetLatestValidatorSetResponse): unknown { - const obj: any = {}; - message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || BigInt(0)).toString()); - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetLatestValidatorSetResponse { - const message = createBaseGetLatestValidatorSetResponse(); - message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? BigInt(object.blockHeight.toString()) : BigInt(0); - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetLatestValidatorSetResponseSDKType): GetLatestValidatorSetResponse { - return { - blockHeight: object?.block_height, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetLatestValidatorSetResponse): GetLatestValidatorSetResponseSDKType { - const obj: any = {}; - obj.block_height = message.blockHeight; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetLatestValidatorSetResponseAmino): GetLatestValidatorSetResponse { - return { - blockHeight: BigInt(object.block_height), - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetLatestValidatorSetResponse): GetLatestValidatorSetResponseAmino { - const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetLatestValidatorSetResponseAminoMsg): GetLatestValidatorSetResponse { - return GetLatestValidatorSetResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetLatestValidatorSetResponse): GetLatestValidatorSetResponseAminoMsg { - return { - type: "cosmos-sdk/GetLatestValidatorSetResponse", - value: GetLatestValidatorSetResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetLatestValidatorSetResponseProtoMsg): GetLatestValidatorSetResponse { - return GetLatestValidatorSetResponse.decode(message.value); - }, - toProto(message: GetLatestValidatorSetResponse): Uint8Array { - return GetLatestValidatorSetResponse.encode(message).finish(); - }, - toProtoMsg(message: GetLatestValidatorSetResponse): GetLatestValidatorSetResponseProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", - value: GetLatestValidatorSetResponse.encode(message).finish() - }; - } -}; -function createBaseValidator(): Validator { - return { - address: "", - pubKey: Any.fromPartial({}), - votingPower: BigInt(0), - proposerPriority: BigInt(0) - }; -} -export const Validator = { - typeUrl: "/cosmos.base.tendermint.v1beta1.Validator", - aminoType: "cosmos-sdk/Validator", - encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== BigInt(0)) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== BigInt(0)) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Validator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = reader.int64(); - break; - case 4: - message.proposerPriority = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Validator { - return { - address: isSet(object.address) ? String(object.address) : "", - pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? BigInt(object.votingPower.toString()) : BigInt(0), - proposerPriority: isSet(object.proposerPriority) ? BigInt(object.proposerPriority.toString()) : BigInt(0) - }; - }, - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pubKey !== undefined && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined); - message.votingPower !== undefined && (obj.votingPower = (message.votingPower || BigInt(0)).toString()); - message.proposerPriority !== undefined && (obj.proposerPriority = (message.proposerPriority || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Validator { - const message = createBaseValidator(); - message.address = object.address ?? ""; - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? Any.fromPartial(object.pubKey) : undefined; - message.votingPower = object.votingPower !== undefined && object.votingPower !== null ? BigInt(object.votingPower.toString()) : BigInt(0); - message.proposerPriority = object.proposerPriority !== undefined && object.proposerPriority !== null ? BigInt(object.proposerPriority.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorSDKType): Validator { - return { - address: object?.address, - pubKey: object.pub_key ? Any.fromSDK(object.pub_key) : undefined, - votingPower: object?.voting_power, - proposerPriority: object?.proposer_priority - }; - }, - toSDK(message: Validator): ValidatorSDKType { - const obj: any = {}; - obj.address = message.address; - message.pubKey !== undefined && (obj.pub_key = message.pubKey ? Any.toSDK(message.pubKey) : undefined); - obj.voting_power = message.votingPower; - obj.proposer_priority = message.proposerPriority; - return obj; - }, - fromAmino(object: ValidatorAmino): Validator { - return { - address: object.address, - pubKey: object?.pub_key ? Any.fromAmino(object.pub_key) : undefined, - votingPower: BigInt(object.voting_power), - proposerPriority: BigInt(object.proposer_priority) - }; - }, - toAmino(message: Validator): ValidatorAmino { - const obj: any = {}; - obj.address = message.address; - obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : undefined; - obj.voting_power = message.votingPower ? message.votingPower.toString() : undefined; - obj.proposer_priority = message.proposerPriority ? message.proposerPriority.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorAminoMsg): Validator { - return Validator.fromAmino(object.value); - }, - toAminoMsg(message: Validator): ValidatorAminoMsg { - return { - type: "cosmos-sdk/Validator", - value: Validator.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorProtoMsg): Validator { - return Validator.decode(message.value); - }, - toProto(message: Validator): Uint8Array { - return Validator.encode(message).finish(); - }, - toProtoMsg(message: Validator): ValidatorProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.Validator", - value: Validator.encode(message).finish() - }; - } -}; -function createBaseGetBlockByHeightRequest(): GetBlockByHeightRequest { - return { - height: BigInt(0) - }; -} -export const GetBlockByHeightRequest = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest", - aminoType: "cosmos-sdk/GetBlockByHeightRequest", - encode(message: GetBlockByHeightRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetBlockByHeightRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockByHeightRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetBlockByHeightRequest { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0) - }; - }, - toJSON(message: GetBlockByHeightRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GetBlockByHeightRequest { - const message = createBaseGetBlockByHeightRequest(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GetBlockByHeightRequestSDKType): GetBlockByHeightRequest { - return { - height: object?.height - }; - }, - toSDK(message: GetBlockByHeightRequest): GetBlockByHeightRequestSDKType { - const obj: any = {}; - obj.height = message.height; - return obj; - }, - fromAmino(object: GetBlockByHeightRequestAmino): GetBlockByHeightRequest { - return { - height: BigInt(object.height) - }; - }, - toAmino(message: GetBlockByHeightRequest): GetBlockByHeightRequestAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GetBlockByHeightRequestAminoMsg): GetBlockByHeightRequest { - return GetBlockByHeightRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetBlockByHeightRequest): GetBlockByHeightRequestAminoMsg { - return { - type: "cosmos-sdk/GetBlockByHeightRequest", - value: GetBlockByHeightRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetBlockByHeightRequestProtoMsg): GetBlockByHeightRequest { - return GetBlockByHeightRequest.decode(message.value); - }, - toProto(message: GetBlockByHeightRequest): Uint8Array { - return GetBlockByHeightRequest.encode(message).finish(); - }, - toProtoMsg(message: GetBlockByHeightRequest): GetBlockByHeightRequestProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest", - value: GetBlockByHeightRequest.encode(message).finish() - }; - } -}; -function createBaseGetBlockByHeightResponse(): GetBlockByHeightResponse { - return { - blockId: BlockID.fromPartial({}), - block: Block.fromPartial({}) - }; -} -export const GetBlockByHeightResponse = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse", - aminoType: "cosmos-sdk/GetBlockByHeightResponse", - encode(message: GetBlockByHeightResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetBlockByHeightResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockByHeightResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block = Block.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetBlockByHeightResponse { - return { - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - block: isSet(object.block) ? Block.fromJSON(object.block) : undefined - }; - }, - toJSON(message: GetBlockByHeightResponse): unknown { - const obj: any = {}; - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetBlockByHeightResponse { - const message = createBaseGetBlockByHeightResponse(); - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.block = object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; - return message; - }, - fromSDK(object: GetBlockByHeightResponseSDKType): GetBlockByHeightResponse { - return { - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - block: object.block ? Block.fromSDK(object.block) : undefined - }; - }, - toSDK(message: GetBlockByHeightResponse): GetBlockByHeightResponseSDKType { - const obj: any = {}; - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toSDK(message.block) : undefined); - return obj; - }, - fromAmino(object: GetBlockByHeightResponseAmino): GetBlockByHeightResponse { - return { - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - block: object?.block ? Block.fromAmino(object.block) : undefined - }; - }, - toAmino(message: GetBlockByHeightResponse): GetBlockByHeightResponseAmino { - const obj: any = {}; - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - obj.block = message.block ? Block.toAmino(message.block) : undefined; - return obj; - }, - fromAminoMsg(object: GetBlockByHeightResponseAminoMsg): GetBlockByHeightResponse { - return GetBlockByHeightResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetBlockByHeightResponse): GetBlockByHeightResponseAminoMsg { - return { - type: "cosmos-sdk/GetBlockByHeightResponse", - value: GetBlockByHeightResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetBlockByHeightResponseProtoMsg): GetBlockByHeightResponse { - return GetBlockByHeightResponse.decode(message.value); - }, - toProto(message: GetBlockByHeightResponse): Uint8Array { - return GetBlockByHeightResponse.encode(message).finish(); - }, - toProtoMsg(message: GetBlockByHeightResponse): GetBlockByHeightResponseProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse", - value: GetBlockByHeightResponse.encode(message).finish() - }; - } -}; -function createBaseGetLatestBlockRequest(): GetLatestBlockRequest { - return {}; -} -export const GetLatestBlockRequest = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestBlockRequest", - aminoType: "cosmos-sdk/GetLatestBlockRequest", - encode(_: GetLatestBlockRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetLatestBlockRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetLatestBlockRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetLatestBlockRequest { - return {}; - }, - toJSON(_: GetLatestBlockRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetLatestBlockRequest { - const message = createBaseGetLatestBlockRequest(); - return message; - }, - fromSDK(_: GetLatestBlockRequestSDKType): GetLatestBlockRequest { - return {}; - }, - toSDK(_: GetLatestBlockRequest): GetLatestBlockRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetLatestBlockRequestAmino): GetLatestBlockRequest { - return {}; - }, - toAmino(_: GetLatestBlockRequest): GetLatestBlockRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetLatestBlockRequestAminoMsg): GetLatestBlockRequest { - return GetLatestBlockRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetLatestBlockRequest): GetLatestBlockRequestAminoMsg { - return { - type: "cosmos-sdk/GetLatestBlockRequest", - value: GetLatestBlockRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetLatestBlockRequestProtoMsg): GetLatestBlockRequest { - return GetLatestBlockRequest.decode(message.value); - }, - toProto(message: GetLatestBlockRequest): Uint8Array { - return GetLatestBlockRequest.encode(message).finish(); - }, - toProtoMsg(message: GetLatestBlockRequest): GetLatestBlockRequestProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestBlockRequest", - value: GetLatestBlockRequest.encode(message).finish() - }; - } -}; -function createBaseGetLatestBlockResponse(): GetLatestBlockResponse { - return { - blockId: BlockID.fromPartial({}), - block: Block.fromPartial({}) - }; -} -export const GetLatestBlockResponse = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse", - aminoType: "cosmos-sdk/GetLatestBlockResponse", - encode(message: GetLatestBlockResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetLatestBlockResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetLatestBlockResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block = Block.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetLatestBlockResponse { - return { - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - block: isSet(object.block) ? Block.fromJSON(object.block) : undefined - }; - }, - toJSON(message: GetLatestBlockResponse): unknown { - const obj: any = {}; - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetLatestBlockResponse { - const message = createBaseGetLatestBlockResponse(); - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.block = object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; - return message; - }, - fromSDK(object: GetLatestBlockResponseSDKType): GetLatestBlockResponse { - return { - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - block: object.block ? Block.fromSDK(object.block) : undefined - }; - }, - toSDK(message: GetLatestBlockResponse): GetLatestBlockResponseSDKType { - const obj: any = {}; - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toSDK(message.block) : undefined); - return obj; - }, - fromAmino(object: GetLatestBlockResponseAmino): GetLatestBlockResponse { - return { - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - block: object?.block ? Block.fromAmino(object.block) : undefined - }; - }, - toAmino(message: GetLatestBlockResponse): GetLatestBlockResponseAmino { - const obj: any = {}; - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - obj.block = message.block ? Block.toAmino(message.block) : undefined; - return obj; - }, - fromAminoMsg(object: GetLatestBlockResponseAminoMsg): GetLatestBlockResponse { - return GetLatestBlockResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetLatestBlockResponse): GetLatestBlockResponseAminoMsg { - return { - type: "cosmos-sdk/GetLatestBlockResponse", - value: GetLatestBlockResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetLatestBlockResponseProtoMsg): GetLatestBlockResponse { - return GetLatestBlockResponse.decode(message.value); - }, - toProto(message: GetLatestBlockResponse): Uint8Array { - return GetLatestBlockResponse.encode(message).finish(); - }, - toProtoMsg(message: GetLatestBlockResponse): GetLatestBlockResponseProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse", - value: GetLatestBlockResponse.encode(message).finish() - }; - } -}; -function createBaseGetSyncingRequest(): GetSyncingRequest { - return {}; -} -export const GetSyncingRequest = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetSyncingRequest", - aminoType: "cosmos-sdk/GetSyncingRequest", - encode(_: GetSyncingRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetSyncingRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSyncingRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetSyncingRequest { - return {}; - }, - toJSON(_: GetSyncingRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetSyncingRequest { - const message = createBaseGetSyncingRequest(); - return message; - }, - fromSDK(_: GetSyncingRequestSDKType): GetSyncingRequest { - return {}; - }, - toSDK(_: GetSyncingRequest): GetSyncingRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetSyncingRequestAmino): GetSyncingRequest { - return {}; - }, - toAmino(_: GetSyncingRequest): GetSyncingRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetSyncingRequestAminoMsg): GetSyncingRequest { - return GetSyncingRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetSyncingRequest): GetSyncingRequestAminoMsg { - return { - type: "cosmos-sdk/GetSyncingRequest", - value: GetSyncingRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetSyncingRequestProtoMsg): GetSyncingRequest { - return GetSyncingRequest.decode(message.value); - }, - toProto(message: GetSyncingRequest): Uint8Array { - return GetSyncingRequest.encode(message).finish(); - }, - toProtoMsg(message: GetSyncingRequest): GetSyncingRequestProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetSyncingRequest", - value: GetSyncingRequest.encode(message).finish() - }; - } -}; -function createBaseGetSyncingResponse(): GetSyncingResponse { - return { - syncing: false - }; -} -export const GetSyncingResponse = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetSyncingResponse", - aminoType: "cosmos-sdk/GetSyncingResponse", - encode(message: GetSyncingResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.syncing === true) { - writer.uint32(8).bool(message.syncing); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetSyncingResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSyncingResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.syncing = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetSyncingResponse { - return { - syncing: isSet(object.syncing) ? Boolean(object.syncing) : false - }; - }, - toJSON(message: GetSyncingResponse): unknown { - const obj: any = {}; - message.syncing !== undefined && (obj.syncing = message.syncing); - return obj; - }, - fromPartial(object: DeepPartial): GetSyncingResponse { - const message = createBaseGetSyncingResponse(); - message.syncing = object.syncing ?? false; - return message; - }, - fromSDK(object: GetSyncingResponseSDKType): GetSyncingResponse { - return { - syncing: object?.syncing - }; - }, - toSDK(message: GetSyncingResponse): GetSyncingResponseSDKType { - const obj: any = {}; - obj.syncing = message.syncing; - return obj; - }, - fromAmino(object: GetSyncingResponseAmino): GetSyncingResponse { - return { - syncing: object.syncing - }; - }, - toAmino(message: GetSyncingResponse): GetSyncingResponseAmino { - const obj: any = {}; - obj.syncing = message.syncing; - return obj; - }, - fromAminoMsg(object: GetSyncingResponseAminoMsg): GetSyncingResponse { - return GetSyncingResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetSyncingResponse): GetSyncingResponseAminoMsg { - return { - type: "cosmos-sdk/GetSyncingResponse", - value: GetSyncingResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetSyncingResponseProtoMsg): GetSyncingResponse { - return GetSyncingResponse.decode(message.value); - }, - toProto(message: GetSyncingResponse): Uint8Array { - return GetSyncingResponse.encode(message).finish(); - }, - toProtoMsg(message: GetSyncingResponse): GetSyncingResponseProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetSyncingResponse", - value: GetSyncingResponse.encode(message).finish() - }; - } -}; -function createBaseGetNodeInfoRequest(): GetNodeInfoRequest { - return {}; -} -export const GetNodeInfoRequest = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetNodeInfoRequest", - aminoType: "cosmos-sdk/GetNodeInfoRequest", - encode(_: GetNodeInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetNodeInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetNodeInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): GetNodeInfoRequest { - return {}; - }, - toJSON(_: GetNodeInfoRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): GetNodeInfoRequest { - const message = createBaseGetNodeInfoRequest(); - return message; - }, - fromSDK(_: GetNodeInfoRequestSDKType): GetNodeInfoRequest { - return {}; - }, - toSDK(_: GetNodeInfoRequest): GetNodeInfoRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: GetNodeInfoRequestAmino): GetNodeInfoRequest { - return {}; - }, - toAmino(_: GetNodeInfoRequest): GetNodeInfoRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: GetNodeInfoRequestAminoMsg): GetNodeInfoRequest { - return GetNodeInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetNodeInfoRequest): GetNodeInfoRequestAminoMsg { - return { - type: "cosmos-sdk/GetNodeInfoRequest", - value: GetNodeInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetNodeInfoRequestProtoMsg): GetNodeInfoRequest { - return GetNodeInfoRequest.decode(message.value); - }, - toProto(message: GetNodeInfoRequest): Uint8Array { - return GetNodeInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: GetNodeInfoRequest): GetNodeInfoRequestProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetNodeInfoRequest", - value: GetNodeInfoRequest.encode(message).finish() - }; - } -}; -function createBaseGetNodeInfoResponse(): GetNodeInfoResponse { - return { - nodeInfo: NodeInfo.fromPartial({}), - applicationVersion: VersionInfo.fromPartial({}) - }; -} -export const GetNodeInfoResponse = { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse", - aminoType: "cosmos-sdk/GetNodeInfoResponse", - encode(message: GetNodeInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.nodeInfo !== undefined) { - NodeInfo.encode(message.nodeInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.applicationVersion !== undefined) { - VersionInfo.encode(message.applicationVersion, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetNodeInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetNodeInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nodeInfo = NodeInfo.decode(reader, reader.uint32()); - break; - case 2: - message.applicationVersion = VersionInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetNodeInfoResponse { - return { - nodeInfo: isSet(object.nodeInfo) ? NodeInfo.fromJSON(object.nodeInfo) : undefined, - applicationVersion: isSet(object.applicationVersion) ? VersionInfo.fromJSON(object.applicationVersion) : undefined - }; - }, - toJSON(message: GetNodeInfoResponse): unknown { - const obj: any = {}; - message.nodeInfo !== undefined && (obj.nodeInfo = message.nodeInfo ? NodeInfo.toJSON(message.nodeInfo) : undefined); - message.applicationVersion !== undefined && (obj.applicationVersion = message.applicationVersion ? VersionInfo.toJSON(message.applicationVersion) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetNodeInfoResponse { - const message = createBaseGetNodeInfoResponse(); - message.nodeInfo = object.nodeInfo !== undefined && object.nodeInfo !== null ? NodeInfo.fromPartial(object.nodeInfo) : undefined; - message.applicationVersion = object.applicationVersion !== undefined && object.applicationVersion !== null ? VersionInfo.fromPartial(object.applicationVersion) : undefined; - return message; - }, - fromSDK(object: GetNodeInfoResponseSDKType): GetNodeInfoResponse { - return { - nodeInfo: object.node_info ? NodeInfo.fromSDK(object.node_info) : undefined, - applicationVersion: object.application_version ? VersionInfo.fromSDK(object.application_version) : undefined - }; - }, - toSDK(message: GetNodeInfoResponse): GetNodeInfoResponseSDKType { - const obj: any = {}; - message.nodeInfo !== undefined && (obj.node_info = message.nodeInfo ? NodeInfo.toSDK(message.nodeInfo) : undefined); - message.applicationVersion !== undefined && (obj.application_version = message.applicationVersion ? VersionInfo.toSDK(message.applicationVersion) : undefined); - return obj; - }, - fromAmino(object: GetNodeInfoResponseAmino): GetNodeInfoResponse { - return { - nodeInfo: object?.node_info ? NodeInfo.fromAmino(object.node_info) : undefined, - applicationVersion: object?.application_version ? VersionInfo.fromAmino(object.application_version) : undefined - }; - }, - toAmino(message: GetNodeInfoResponse): GetNodeInfoResponseAmino { - const obj: any = {}; - obj.node_info = message.nodeInfo ? NodeInfo.toAmino(message.nodeInfo) : undefined; - obj.application_version = message.applicationVersion ? VersionInfo.toAmino(message.applicationVersion) : undefined; - return obj; - }, - fromAminoMsg(object: GetNodeInfoResponseAminoMsg): GetNodeInfoResponse { - return GetNodeInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetNodeInfoResponse): GetNodeInfoResponseAminoMsg { - return { - type: "cosmos-sdk/GetNodeInfoResponse", - value: GetNodeInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetNodeInfoResponseProtoMsg): GetNodeInfoResponse { - return GetNodeInfoResponse.decode(message.value); - }, - toProto(message: GetNodeInfoResponse): Uint8Array { - return GetNodeInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: GetNodeInfoResponse): GetNodeInfoResponseProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse", - value: GetNodeInfoResponse.encode(message).finish() - }; - } -}; -function createBaseVersionInfo(): VersionInfo { - return { - name: "", - appName: "", - version: "", - gitCommit: "", - buildTags: "", - goVersion: "", - buildDeps: [], - cosmosSdkVersion: "" - }; -} -export const VersionInfo = { - typeUrl: "/cosmos.base.tendermint.v1beta1.VersionInfo", - aminoType: "cosmos-sdk/VersionInfo", - encode(message: VersionInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.appName !== "") { - writer.uint32(18).string(message.appName); - } - if (message.version !== "") { - writer.uint32(26).string(message.version); - } - if (message.gitCommit !== "") { - writer.uint32(34).string(message.gitCommit); - } - if (message.buildTags !== "") { - writer.uint32(42).string(message.buildTags); - } - if (message.goVersion !== "") { - writer.uint32(50).string(message.goVersion); - } - for (const v of message.buildDeps) { - Module.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.cosmosSdkVersion !== "") { - writer.uint32(66).string(message.cosmosSdkVersion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VersionInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVersionInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.appName = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - case 4: - message.gitCommit = reader.string(); - break; - case 5: - message.buildTags = reader.string(); - break; - case 6: - message.goVersion = reader.string(); - break; - case 7: - message.buildDeps.push(Module.decode(reader, reader.uint32())); - break; - case 8: - message.cosmosSdkVersion = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): VersionInfo { - return { - name: isSet(object.name) ? String(object.name) : "", - appName: isSet(object.appName) ? String(object.appName) : "", - version: isSet(object.version) ? String(object.version) : "", - gitCommit: isSet(object.gitCommit) ? String(object.gitCommit) : "", - buildTags: isSet(object.buildTags) ? String(object.buildTags) : "", - goVersion: isSet(object.goVersion) ? String(object.goVersion) : "", - buildDeps: Array.isArray(object?.buildDeps) ? object.buildDeps.map((e: any) => Module.fromJSON(e)) : [], - cosmosSdkVersion: isSet(object.cosmosSdkVersion) ? String(object.cosmosSdkVersion) : "" - }; - }, - toJSON(message: VersionInfo): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.appName !== undefined && (obj.appName = message.appName); - message.version !== undefined && (obj.version = message.version); - message.gitCommit !== undefined && (obj.gitCommit = message.gitCommit); - message.buildTags !== undefined && (obj.buildTags = message.buildTags); - message.goVersion !== undefined && (obj.goVersion = message.goVersion); - if (message.buildDeps) { - obj.buildDeps = message.buildDeps.map(e => e ? Module.toJSON(e) : undefined); - } else { - obj.buildDeps = []; - } - message.cosmosSdkVersion !== undefined && (obj.cosmosSdkVersion = message.cosmosSdkVersion); - return obj; - }, - fromPartial(object: DeepPartial): VersionInfo { - const message = createBaseVersionInfo(); - message.name = object.name ?? ""; - message.appName = object.appName ?? ""; - message.version = object.version ?? ""; - message.gitCommit = object.gitCommit ?? ""; - message.buildTags = object.buildTags ?? ""; - message.goVersion = object.goVersion ?? ""; - message.buildDeps = object.buildDeps?.map(e => Module.fromPartial(e)) || []; - message.cosmosSdkVersion = object.cosmosSdkVersion ?? ""; - return message; - }, - fromSDK(object: VersionInfoSDKType): VersionInfo { - return { - name: object?.name, - appName: object?.app_name, - version: object?.version, - gitCommit: object?.git_commit, - buildTags: object?.build_tags, - goVersion: object?.go_version, - buildDeps: Array.isArray(object?.build_deps) ? object.build_deps.map((e: any) => Module.fromSDK(e)) : [], - cosmosSdkVersion: object?.cosmos_sdk_version - }; - }, - toSDK(message: VersionInfo): VersionInfoSDKType { - const obj: any = {}; - obj.name = message.name; - obj.app_name = message.appName; - obj.version = message.version; - obj.git_commit = message.gitCommit; - obj.build_tags = message.buildTags; - obj.go_version = message.goVersion; - if (message.buildDeps) { - obj.build_deps = message.buildDeps.map(e => e ? Module.toSDK(e) : undefined); - } else { - obj.build_deps = []; - } - obj.cosmos_sdk_version = message.cosmosSdkVersion; - return obj; - }, - fromAmino(object: VersionInfoAmino): VersionInfo { - return { - name: object.name, - appName: object.app_name, - version: object.version, - gitCommit: object.git_commit, - buildTags: object.build_tags, - goVersion: object.go_version, - buildDeps: Array.isArray(object?.build_deps) ? object.build_deps.map((e: any) => Module.fromAmino(e)) : [], - cosmosSdkVersion: object.cosmos_sdk_version - }; - }, - toAmino(message: VersionInfo): VersionInfoAmino { - const obj: any = {}; - obj.name = message.name; - obj.app_name = message.appName; - obj.version = message.version; - obj.git_commit = message.gitCommit; - obj.build_tags = message.buildTags; - obj.go_version = message.goVersion; - if (message.buildDeps) { - obj.build_deps = message.buildDeps.map(e => e ? Module.toAmino(e) : undefined); - } else { - obj.build_deps = []; - } - obj.cosmos_sdk_version = message.cosmosSdkVersion; - return obj; - }, - fromAminoMsg(object: VersionInfoAminoMsg): VersionInfo { - return VersionInfo.fromAmino(object.value); - }, - toAminoMsg(message: VersionInfo): VersionInfoAminoMsg { - return { - type: "cosmos-sdk/VersionInfo", - value: VersionInfo.toAmino(message) - }; - }, - fromProtoMsg(message: VersionInfoProtoMsg): VersionInfo { - return VersionInfo.decode(message.value); - }, - toProto(message: VersionInfo): Uint8Array { - return VersionInfo.encode(message).finish(); - }, - toProtoMsg(message: VersionInfo): VersionInfoProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.VersionInfo", - value: VersionInfo.encode(message).finish() - }; - } -}; -function createBaseModule(): Module { - return { - path: "", - version: "", - sum: "" - }; -} -export const Module = { - typeUrl: "/cosmos.base.tendermint.v1beta1.Module", - aminoType: "cosmos-sdk/Module", - encode(message: Module, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.sum !== "") { - writer.uint32(26).string(message.sum); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Module { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.sum = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Module { - return { - path: isSet(object.path) ? String(object.path) : "", - version: isSet(object.version) ? String(object.version) : "", - sum: isSet(object.sum) ? String(object.sum) : "" - }; - }, - toJSON(message: Module): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path); - message.version !== undefined && (obj.version = message.version); - message.sum !== undefined && (obj.sum = message.sum); - return obj; - }, - fromPartial(object: DeepPartial): Module { - const message = createBaseModule(); - message.path = object.path ?? ""; - message.version = object.version ?? ""; - message.sum = object.sum ?? ""; - return message; - }, - fromSDK(object: ModuleSDKType): Module { - return { - path: object?.path, - version: object?.version, - sum: object?.sum - }; - }, - toSDK(message: Module): ModuleSDKType { - const obj: any = {}; - obj.path = message.path; - obj.version = message.version; - obj.sum = message.sum; - return obj; - }, - fromAmino(object: ModuleAmino): Module { - return { - path: object.path, - version: object.version, - sum: object.sum - }; - }, - toAmino(message: Module): ModuleAmino { - const obj: any = {}; - obj.path = message.path; - obj.version = message.version; - obj.sum = message.sum; - return obj; - }, - fromAminoMsg(object: ModuleAminoMsg): Module { - return Module.fromAmino(object.value); - }, - toAminoMsg(message: Module): ModuleAminoMsg { - return { - type: "cosmos-sdk/Module", - value: Module.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleProtoMsg): Module { - return Module.decode(message.value); - }, - toProto(message: Module): Uint8Array { - return Module.encode(message).finish(); - }, - toProtoMsg(message: Module): ModuleProtoMsg { - return { - typeUrl: "/cosmos.base.tendermint.v1beta1.Module", - value: Module.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/base/v1beta1/coin.ts b/examples/interchainjs/src/codegen/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index 8c060ace..00000000 --- a/examples/interchainjs/src/codegen/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,498 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - denom: string; - amount: string; -} -export interface CoinProtoMsg { - typeUrl: "/cosmos.base.v1beta1.Coin"; - value: Uint8Array; -} -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface CoinAmino { - denom: string; - amount: string; -} -export interface CoinAminoMsg { - type: "cosmos-sdk/Coin"; - value: CoinAmino; -} -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface CoinSDKType { - denom: string; - amount: string; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - denom: string; - amount: string; -} -export interface DecCoinProtoMsg { - typeUrl: "/cosmos.base.v1beta1.DecCoin"; - value: Uint8Array; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoinAmino { - denom: string; - amount: string; -} -export interface DecCoinAminoMsg { - type: "cosmos-sdk/DecCoin"; - value: DecCoinAmino; -} -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoinSDKType { - denom: string; - amount: string; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - int: string; -} -export interface IntProtoProtoMsg { - typeUrl: "/cosmos.base.v1beta1.IntProto"; - value: Uint8Array; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProtoAmino { - int: string; -} -export interface IntProtoAminoMsg { - type: "cosmos-sdk/IntProto"; - value: IntProtoAmino; -} -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProtoSDKType { - int: string; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - dec: string; -} -export interface DecProtoProtoMsg { - typeUrl: "/cosmos.base.v1beta1.DecProto"; - value: Uint8Array; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProtoAmino { - dec: string; -} -export interface DecProtoAminoMsg { - type: "cosmos-sdk/DecProto"; - value: DecProtoAmino; -} -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProtoSDKType { - dec: string; -} -function createBaseCoin(): Coin { - return { - denom: "", - amount: "" - }; -} -export const Coin = { - typeUrl: "/cosmos.base.v1beta1.Coin", - aminoType: "cosmos-sdk/Coin", - encode(message: Coin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Coin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCoin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Coin { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "" - }; - }, - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object: DeepPartial): Coin { - const message = createBaseCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - return message; - }, - fromSDK(object: CoinSDKType): Coin { - return { - denom: object?.denom, - amount: object?.amount - }; - }, - toSDK(message: Coin): CoinSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; - return obj; - }, - fromAmino(object: CoinAmino): Coin { - return { - denom: object.denom, - amount: object.amount - }; - }, - toAmino(message: Coin): CoinAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; - return obj; - }, - fromAminoMsg(object: CoinAminoMsg): Coin { - return Coin.fromAmino(object.value); - }, - toAminoMsg(message: Coin): CoinAminoMsg { - return { - type: "cosmos-sdk/Coin", - value: Coin.toAmino(message) - }; - }, - fromProtoMsg(message: CoinProtoMsg): Coin { - return Coin.decode(message.value); - }, - toProto(message: Coin): Uint8Array { - return Coin.encode(message).finish(); - }, - toProtoMsg(message: Coin): CoinProtoMsg { - return { - typeUrl: "/cosmos.base.v1beta1.Coin", - value: Coin.encode(message).finish() - }; - } -}; -function createBaseDecCoin(): DecCoin { - return { - denom: "", - amount: "" - }; -} -export const DecCoin = { - typeUrl: "/cosmos.base.v1beta1.DecCoin", - aminoType: "cosmos-sdk/DecCoin", - encode(message: DecCoin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecCoin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DecCoin { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "" - }; - }, - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object: DeepPartial): DecCoin { - const message = createBaseDecCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - return message; - }, - fromSDK(object: DecCoinSDKType): DecCoin { - return { - denom: object?.denom, - amount: object?.amount - }; - }, - toSDK(message: DecCoin): DecCoinSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; - return obj; - }, - fromAmino(object: DecCoinAmino): DecCoin { - return { - denom: object.denom, - amount: object.amount - }; - }, - toAmino(message: DecCoin): DecCoinAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; - return obj; - }, - fromAminoMsg(object: DecCoinAminoMsg): DecCoin { - return DecCoin.fromAmino(object.value); - }, - toAminoMsg(message: DecCoin): DecCoinAminoMsg { - return { - type: "cosmos-sdk/DecCoin", - value: DecCoin.toAmino(message) - }; - }, - fromProtoMsg(message: DecCoinProtoMsg): DecCoin { - return DecCoin.decode(message.value); - }, - toProto(message: DecCoin): Uint8Array { - return DecCoin.encode(message).finish(); - }, - toProtoMsg(message: DecCoin): DecCoinProtoMsg { - return { - typeUrl: "/cosmos.base.v1beta1.DecCoin", - value: DecCoin.encode(message).finish() - }; - } -}; -function createBaseIntProto(): IntProto { - return { - int: "" - }; -} -export const IntProto = { - typeUrl: "/cosmos.base.v1beta1.IntProto", - aminoType: "cosmos-sdk/IntProto", - encode(message: IntProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IntProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIntProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.int = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): IntProto { - return { - int: isSet(object.int) ? String(object.int) : "" - }; - }, - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - fromPartial(object: DeepPartial): IntProto { - const message = createBaseIntProto(); - message.int = object.int ?? ""; - return message; - }, - fromSDK(object: IntProtoSDKType): IntProto { - return { - int: object?.int - }; - }, - toSDK(message: IntProto): IntProtoSDKType { - const obj: any = {}; - obj.int = message.int; - return obj; - }, - fromAmino(object: IntProtoAmino): IntProto { - return { - int: object.int - }; - }, - toAmino(message: IntProto): IntProtoAmino { - const obj: any = {}; - obj.int = message.int; - return obj; - }, - fromAminoMsg(object: IntProtoAminoMsg): IntProto { - return IntProto.fromAmino(object.value); - }, - toAminoMsg(message: IntProto): IntProtoAminoMsg { - return { - type: "cosmos-sdk/IntProto", - value: IntProto.toAmino(message) - }; - }, - fromProtoMsg(message: IntProtoProtoMsg): IntProto { - return IntProto.decode(message.value); - }, - toProto(message: IntProto): Uint8Array { - return IntProto.encode(message).finish(); - }, - toProtoMsg(message: IntProto): IntProtoProtoMsg { - return { - typeUrl: "/cosmos.base.v1beta1.IntProto", - value: IntProto.encode(message).finish() - }; - } -}; -function createBaseDecProto(): DecProto { - return { - dec: "" - }; -} -export const DecProto = { - typeUrl: "/cosmos.base.v1beta1.DecProto", - aminoType: "cosmos-sdk/DecProto", - encode(message: DecProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DecProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dec = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DecProto { - return { - dec: isSet(object.dec) ? String(object.dec) : "" - }; - }, - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - fromPartial(object: DeepPartial): DecProto { - const message = createBaseDecProto(); - message.dec = object.dec ?? ""; - return message; - }, - fromSDK(object: DecProtoSDKType): DecProto { - return { - dec: object?.dec - }; - }, - toSDK(message: DecProto): DecProtoSDKType { - const obj: any = {}; - obj.dec = message.dec; - return obj; - }, - fromAmino(object: DecProtoAmino): DecProto { - return { - dec: object.dec - }; - }, - toAmino(message: DecProto): DecProtoAmino { - const obj: any = {}; - obj.dec = message.dec; - return obj; - }, - fromAminoMsg(object: DecProtoAminoMsg): DecProto { - return DecProto.fromAmino(object.value); - }, - toAminoMsg(message: DecProto): DecProtoAminoMsg { - return { - type: "cosmos-sdk/DecProto", - value: DecProto.toAmino(message) - }; - }, - fromProtoMsg(message: DecProtoProtoMsg): DecProto { - return DecProto.decode(message.value); - }, - toProto(message: DecProto): Uint8Array { - return DecProto.encode(message).finish(); - }, - toProtoMsg(message: DecProto): DecProtoProtoMsg { - return { - typeUrl: "/cosmos.base.v1beta1.DecProto", - value: DecProto.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/bundle.ts b/examples/interchainjs/src/codegen/cosmos/bundle.ts deleted file mode 100644 index 29c9a5cc..00000000 --- a/examples/interchainjs/src/codegen/cosmos/bundle.ts +++ /dev/null @@ -1,460 +0,0 @@ -import * as _2 from "./app/v1alpha1/config"; -import * as _3 from "./app/v1alpha1/module"; -import * as _4 from "./app/v1alpha1/query"; -import * as _5 from "./auth/v1beta1/auth"; -import * as _6 from "./auth/v1beta1/genesis"; -import * as _7 from "./auth/v1beta1/query"; -import * as _8 from "./authz/v1beta1/authz"; -import * as _9 from "./authz/v1beta1/event"; -import * as _10 from "./authz/v1beta1/genesis"; -import * as _11 from "./authz/v1beta1/query"; -import * as _12 from "./authz/v1beta1/tx"; -import * as _13 from "./bank/v1beta1/authz"; -import * as _14 from "./bank/v1beta1/bank"; -import * as _15 from "./bank/v1beta1/genesis"; -import * as _16 from "./bank/v1beta1/query"; -import * as _17 from "./bank/v1beta1/tx"; -import * as _18 from "./base/abci/v1beta1/abci"; -import * as _19 from "./base/kv/v1beta1/kv"; -import * as _20 from "./base/query/v1beta1/pagination"; -import * as _21 from "./base/reflection/v1beta1/reflection"; -import * as _22 from "./base/reflection/v2alpha1/reflection"; -import * as _23 from "./base/snapshots/v1beta1/snapshot"; -import * as _24 from "./base/store/v1beta1/commit_info"; -import * as _25 from "./base/store/v1beta1/listening"; -import * as _26 from "./base/tendermint/v1beta1/query"; -import * as _27 from "./base/v1beta1/coin"; -import * as _28 from "./capability/v1beta1/capability"; -import * as _29 from "./capability/v1beta1/genesis"; -import * as _30 from "./crisis/v1beta1/genesis"; -import * as _31 from "./crisis/v1beta1/tx"; -import * as _32 from "./crypto/ed25519/keys"; -import * as _33 from "./crypto/hd/v1/hd"; -import * as _34 from "./crypto/keyring/v1/record"; -import * as _35 from "./crypto/multisig/keys"; -import * as _36 from "./crypto/secp256k1/keys"; -import * as _37 from "./crypto/secp256r1/keys"; -import * as _38 from "./distribution/v1beta1/distribution"; -import * as _39 from "./distribution/v1beta1/genesis"; -import * as _40 from "./distribution/v1beta1/query"; -import * as _41 from "./distribution/v1beta1/tx"; -import * as _42 from "./evidence/v1beta1/evidence"; -import * as _43 from "./evidence/v1beta1/genesis"; -import * as _44 from "./evidence/v1beta1/query"; -import * as _45 from "./evidence/v1beta1/tx"; -import * as _46 from "./feegrant/v1beta1/feegrant"; -import * as _47 from "./feegrant/v1beta1/genesis"; -import * as _48 from "./feegrant/v1beta1/query"; -import * as _49 from "./feegrant/v1beta1/tx"; -import * as _50 from "./genutil/v1beta1/genesis"; -import * as _51 from "./gov/v1/genesis"; -import * as _52 from "./gov/v1/gov"; -import * as _53 from "./gov/v1/query"; -import * as _54 from "./gov/v1/tx"; -import * as _55 from "./gov/v1beta1/genesis"; -import * as _56 from "./gov/v1beta1/gov"; -import * as _57 from "./gov/v1beta1/query"; -import * as _58 from "./gov/v1beta1/tx"; -import * as _59 from "./group/v1/events"; -import * as _60 from "./group/v1/genesis"; -import * as _61 from "./group/v1/query"; -import * as _62 from "./group/v1/tx"; -import * as _63 from "./group/v1/types"; -import * as _64 from "./mint/v1beta1/genesis"; -import * as _65 from "./mint/v1beta1/mint"; -import * as _66 from "./mint/v1beta1/query"; -import * as _67 from "./msg/v1/msg"; -import * as _68 from "./nft/v1beta1/event"; -import * as _69 from "./nft/v1beta1/genesis"; -import * as _70 from "./nft/v1beta1/nft"; -import * as _71 from "./nft/v1beta1/query"; -import * as _72 from "./nft/v1beta1/tx"; -import * as _73 from "./orm/v1/orm"; -import * as _74 from "./orm/v1alpha1/schema"; -import * as _75 from "./params/v1beta1/params"; -import * as _76 from "./params/v1beta1/query"; -import * as _77 from "./slashing/v1beta1/genesis"; -import * as _78 from "./slashing/v1beta1/query"; -import * as _79 from "./slashing/v1beta1/slashing"; -import * as _80 from "./slashing/v1beta1/tx"; -import * as _81 from "./staking/v1beta1/authz"; -import * as _82 from "./staking/v1beta1/genesis"; -import * as _83 from "./staking/v1beta1/query"; -import * as _84 from "./staking/v1beta1/staking"; -import * as _85 from "./staking/v1beta1/tx"; -import * as _86 from "./tx/signing/v1beta1/signing"; -import * as _87 from "./tx/v1beta1/service"; -import * as _88 from "./tx/v1beta1/tx"; -import * as _89 from "./upgrade/v1beta1/query"; -import * as _90 from "./upgrade/v1beta1/tx"; -import * as _91 from "./upgrade/v1beta1/upgrade"; -import * as _92 from "./vesting/v1beta1/tx"; -import * as _93 from "./vesting/v1beta1/vesting"; -import * as _194 from "./authz/v1beta1/tx.amino"; -import * as _195 from "./bank/v1beta1/tx.amino"; -import * as _196 from "./crisis/v1beta1/tx.amino"; -import * as _197 from "./distribution/v1beta1/tx.amino"; -import * as _198 from "./evidence/v1beta1/tx.amino"; -import * as _199 from "./feegrant/v1beta1/tx.amino"; -import * as _200 from "./gov/v1/tx.amino"; -import * as _201 from "./gov/v1beta1/tx.amino"; -import * as _202 from "./group/v1/tx.amino"; -import * as _203 from "./nft/v1beta1/tx.amino"; -import * as _204 from "./slashing/v1beta1/tx.amino"; -import * as _205 from "./staking/v1beta1/tx.amino"; -import * as _206 from "./upgrade/v1beta1/tx.amino"; -import * as _207 from "./vesting/v1beta1/tx.amino"; -import * as _208 from "./authz/v1beta1/tx.registry"; -import * as _209 from "./bank/v1beta1/tx.registry"; -import * as _210 from "./crisis/v1beta1/tx.registry"; -import * as _211 from "./distribution/v1beta1/tx.registry"; -import * as _212 from "./evidence/v1beta1/tx.registry"; -import * as _213 from "./feegrant/v1beta1/tx.registry"; -import * as _214 from "./gov/v1/tx.registry"; -import * as _215 from "./gov/v1beta1/tx.registry"; -import * as _216 from "./group/v1/tx.registry"; -import * as _217 from "./nft/v1beta1/tx.registry"; -import * as _218 from "./slashing/v1beta1/tx.registry"; -import * as _219 from "./staking/v1beta1/tx.registry"; -import * as _220 from "./upgrade/v1beta1/tx.registry"; -import * as _221 from "./vesting/v1beta1/tx.registry"; -import * as _222 from "./app/v1alpha1/query.rpc.Query"; -import * as _223 from "./auth/v1beta1/query.rpc.Query"; -import * as _224 from "./authz/v1beta1/query.rpc.Query"; -import * as _225 from "./bank/v1beta1/query.rpc.Query"; -import * as _226 from "./base/tendermint/v1beta1/query.rpc.Service"; -import * as _227 from "./distribution/v1beta1/query.rpc.Query"; -import * as _228 from "./evidence/v1beta1/query.rpc.Query"; -import * as _229 from "./feegrant/v1beta1/query.rpc.Query"; -import * as _230 from "./gov/v1/query.rpc.Query"; -import * as _231 from "./gov/v1beta1/query.rpc.Query"; -import * as _232 from "./group/v1/query.rpc.Query"; -import * as _233 from "./mint/v1beta1/query.rpc.Query"; -import * as _234 from "./nft/v1beta1/query.rpc.Query"; -import * as _235 from "./params/v1beta1/query.rpc.Query"; -import * as _236 from "./slashing/v1beta1/query.rpc.Query"; -import * as _237 from "./staking/v1beta1/query.rpc.Query"; -import * as _238 from "./tx/v1beta1/service.rpc.Service"; -import * as _239 from "./upgrade/v1beta1/query.rpc.Query"; -import * as _240 from "./authz/v1beta1/tx.rpc.msg"; -import * as _241 from "./bank/v1beta1/tx.rpc.msg"; -import * as _242 from "./crisis/v1beta1/tx.rpc.msg"; -import * as _243 from "./distribution/v1beta1/tx.rpc.msg"; -import * as _244 from "./evidence/v1beta1/tx.rpc.msg"; -import * as _245 from "./feegrant/v1beta1/tx.rpc.msg"; -import * as _246 from "./gov/v1/tx.rpc.msg"; -import * as _247 from "./gov/v1beta1/tx.rpc.msg"; -import * as _248 from "./group/v1/tx.rpc.msg"; -import * as _249 from "./nft/v1beta1/tx.rpc.msg"; -import * as _250 from "./slashing/v1beta1/tx.rpc.msg"; -import * as _251 from "./staking/v1beta1/tx.rpc.msg"; -import * as _252 from "./upgrade/v1beta1/tx.rpc.msg"; -import * as _253 from "./vesting/v1beta1/tx.rpc.msg"; -import * as _309 from "./rpc.query"; -import * as _310 from "./rpc.tx"; -export namespace cosmos { - export namespace app { - export const v1alpha1 = { - ..._2, - ..._3, - ..._4, - ..._222 - }; - } - export namespace auth { - export const v1beta1 = { - ..._5, - ..._6, - ..._7, - ..._223 - }; - } - export namespace authz { - export const v1beta1 = { - ..._8, - ..._9, - ..._10, - ..._11, - ..._12, - ..._194, - ..._208, - ..._224, - ..._240 - }; - } - export namespace bank { - export const v1beta1 = { - ..._13, - ..._14, - ..._15, - ..._16, - ..._17, - ..._195, - ..._209, - ..._225, - ..._241 - }; - } - export namespace base { - export namespace abci { - export const v1beta1 = { - ..._18 - }; - } - export namespace kv { - export const v1beta1 = { - ..._19 - }; - } - export namespace query { - export const v1beta1 = { - ..._20 - }; - } - export namespace reflection { - export const v1beta1 = { - ..._21 - }; - export const v2alpha1 = { - ..._22 - }; - } - export namespace snapshots { - export const v1beta1 = { - ..._23 - }; - } - export namespace store { - export const v1beta1 = { - ..._24, - ..._25 - }; - } - export namespace tendermint { - export const v1beta1 = { - ..._26, - ..._226 - }; - } - export const v1beta1 = { - ..._27 - }; - } - export namespace capability { - export const v1beta1 = { - ..._28, - ..._29 - }; - } - export namespace crisis { - export const v1beta1 = { - ..._30, - ..._31, - ..._196, - ..._210, - ..._242 - }; - } - export namespace crypto { - export const ed25519 = { - ..._32 - }; - export namespace hd { - export const v1 = { - ..._33 - }; - } - export namespace keyring { - export const v1 = { - ..._34 - }; - } - export const multisig = { - ..._35 - }; - export const secp256k1 = { - ..._36 - }; - export const secp256r1 = { - ..._37 - }; - } - export namespace distribution { - export const v1beta1 = { - ..._38, - ..._39, - ..._40, - ..._41, - ..._197, - ..._211, - ..._227, - ..._243 - }; - } - export namespace evidence { - export const v1beta1 = { - ..._42, - ..._43, - ..._44, - ..._45, - ..._198, - ..._212, - ..._228, - ..._244 - }; - } - export namespace feegrant { - export const v1beta1 = { - ..._46, - ..._47, - ..._48, - ..._49, - ..._199, - ..._213, - ..._229, - ..._245 - }; - } - export namespace genutil { - export const v1beta1 = { - ..._50 - }; - } - export namespace gov { - export const v1 = { - ..._51, - ..._52, - ..._53, - ..._54, - ..._200, - ..._214, - ..._230, - ..._246 - }; - export const v1beta1 = { - ..._55, - ..._56, - ..._57, - ..._58, - ..._201, - ..._215, - ..._231, - ..._247 - }; - } - export namespace group { - export const v1 = { - ..._59, - ..._60, - ..._61, - ..._62, - ..._63, - ..._202, - ..._216, - ..._232, - ..._248 - }; - } - export namespace mint { - export const v1beta1 = { - ..._64, - ..._65, - ..._66, - ..._233 - }; - } - export namespace msg { - export const v1 = { - ..._67 - }; - } - export namespace nft { - export const v1beta1 = { - ..._68, - ..._69, - ..._70, - ..._71, - ..._72, - ..._203, - ..._217, - ..._234, - ..._249 - }; - } - export namespace orm { - export const v1 = { - ..._73 - }; - export const v1alpha1 = { - ..._74 - }; - } - export namespace params { - export const v1beta1 = { - ..._75, - ..._76, - ..._235 - }; - } - export namespace slashing { - export const v1beta1 = { - ..._77, - ..._78, - ..._79, - ..._80, - ..._204, - ..._218, - ..._236, - ..._250 - }; - } - export namespace staking { - export const v1beta1 = { - ..._81, - ..._82, - ..._83, - ..._84, - ..._85, - ..._205, - ..._219, - ..._237, - ..._251 - }; - } - export namespace tx { - export namespace signing { - export const v1beta1 = { - ..._86 - }; - } - export const v1beta1 = { - ..._87, - ..._88, - ..._238 - }; - } - export namespace upgrade { - export const v1beta1 = { - ..._89, - ..._90, - ..._91, - ..._206, - ..._220, - ..._239, - ..._252 - }; - } - export namespace vesting { - export const v1beta1 = { - ..._92, - ..._93, - ..._207, - ..._221, - ..._253 - }; - } - export const ClientFactory = { - ..._309, - ..._310 - }; -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/capability/v1beta1/capability.ts b/examples/interchainjs/src/codegen/cosmos/capability/v1beta1/capability.ts deleted file mode 100644 index 3ccdfd4b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/capability/v1beta1/capability.ts +++ /dev/null @@ -1,382 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * Capability defines an implementation of an object capability. The index - * provided to a Capability must be globally unique. - */ -export interface Capability { - index: bigint; -} -export interface CapabilityProtoMsg { - typeUrl: "/cosmos.capability.v1beta1.Capability"; - value: Uint8Array; -} -/** - * Capability defines an implementation of an object capability. The index - * provided to a Capability must be globally unique. - */ -export interface CapabilityAmino { - index: string; -} -export interface CapabilityAminoMsg { - type: "cosmos-sdk/Capability"; - value: CapabilityAmino; -} -/** - * Capability defines an implementation of an object capability. The index - * provided to a Capability must be globally unique. - */ -export interface CapabilitySDKType { - index: bigint; -} -/** - * Owner defines a single capability owner. An owner is defined by the name of - * capability and the module name. - */ -export interface Owner { - module: string; - name: string; -} -export interface OwnerProtoMsg { - typeUrl: "/cosmos.capability.v1beta1.Owner"; - value: Uint8Array; -} -/** - * Owner defines a single capability owner. An owner is defined by the name of - * capability and the module name. - */ -export interface OwnerAmino { - module: string; - name: string; -} -export interface OwnerAminoMsg { - type: "cosmos-sdk/Owner"; - value: OwnerAmino; -} -/** - * Owner defines a single capability owner. An owner is defined by the name of - * capability and the module name. - */ -export interface OwnerSDKType { - module: string; - name: string; -} -/** - * CapabilityOwners defines a set of owners of a single Capability. The set of - * owners must be unique. - */ -export interface CapabilityOwners { - owners: Owner[]; -} -export interface CapabilityOwnersProtoMsg { - typeUrl: "/cosmos.capability.v1beta1.CapabilityOwners"; - value: Uint8Array; -} -/** - * CapabilityOwners defines a set of owners of a single Capability. The set of - * owners must be unique. - */ -export interface CapabilityOwnersAmino { - owners: OwnerAmino[]; -} -export interface CapabilityOwnersAminoMsg { - type: "cosmos-sdk/CapabilityOwners"; - value: CapabilityOwnersAmino; -} -/** - * CapabilityOwners defines a set of owners of a single Capability. The set of - * owners must be unique. - */ -export interface CapabilityOwnersSDKType { - owners: OwnerSDKType[]; -} -function createBaseCapability(): Capability { - return { - index: BigInt(0) - }; -} -export const Capability = { - typeUrl: "/cosmos.capability.v1beta1.Capability", - aminoType: "cosmos-sdk/Capability", - encode(message: Capability, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== BigInt(0)) { - writer.uint32(8).uint64(message.index); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Capability { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCapability(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Capability { - return { - index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0) - }; - }, - toJSON(message: Capability): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = (message.index || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Capability { - const message = createBaseCapability(); - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - return message; - }, - fromSDK(object: CapabilitySDKType): Capability { - return { - index: object?.index - }; - }, - toSDK(message: Capability): CapabilitySDKType { - const obj: any = {}; - obj.index = message.index; - return obj; - }, - fromAmino(object: CapabilityAmino): Capability { - return { - index: BigInt(object.index) - }; - }, - toAmino(message: Capability): CapabilityAmino { - const obj: any = {}; - obj.index = message.index ? message.index.toString() : undefined; - return obj; - }, - fromAminoMsg(object: CapabilityAminoMsg): Capability { - return Capability.fromAmino(object.value); - }, - toAminoMsg(message: Capability): CapabilityAminoMsg { - return { - type: "cosmos-sdk/Capability", - value: Capability.toAmino(message) - }; - }, - fromProtoMsg(message: CapabilityProtoMsg): Capability { - return Capability.decode(message.value); - }, - toProto(message: Capability): Uint8Array { - return Capability.encode(message).finish(); - }, - toProtoMsg(message: Capability): CapabilityProtoMsg { - return { - typeUrl: "/cosmos.capability.v1beta1.Capability", - value: Capability.encode(message).finish() - }; - } -}; -function createBaseOwner(): Owner { - return { - module: "", - name: "" - }; -} -export const Owner = { - typeUrl: "/cosmos.capability.v1beta1.Owner", - aminoType: "cosmos-sdk/Owner", - encode(message: Owner, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.module !== "") { - writer.uint32(10).string(message.module); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Owner { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOwner(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.module = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Owner { - return { - module: isSet(object.module) ? String(object.module) : "", - name: isSet(object.name) ? String(object.name) : "" - }; - }, - toJSON(message: Owner): unknown { - const obj: any = {}; - message.module !== undefined && (obj.module = message.module); - message.name !== undefined && (obj.name = message.name); - return obj; - }, - fromPartial(object: DeepPartial): Owner { - const message = createBaseOwner(); - message.module = object.module ?? ""; - message.name = object.name ?? ""; - return message; - }, - fromSDK(object: OwnerSDKType): Owner { - return { - module: object?.module, - name: object?.name - }; - }, - toSDK(message: Owner): OwnerSDKType { - const obj: any = {}; - obj.module = message.module; - obj.name = message.name; - return obj; - }, - fromAmino(object: OwnerAmino): Owner { - return { - module: object.module, - name: object.name - }; - }, - toAmino(message: Owner): OwnerAmino { - const obj: any = {}; - obj.module = message.module; - obj.name = message.name; - return obj; - }, - fromAminoMsg(object: OwnerAminoMsg): Owner { - return Owner.fromAmino(object.value); - }, - toAminoMsg(message: Owner): OwnerAminoMsg { - return { - type: "cosmos-sdk/Owner", - value: Owner.toAmino(message) - }; - }, - fromProtoMsg(message: OwnerProtoMsg): Owner { - return Owner.decode(message.value); - }, - toProto(message: Owner): Uint8Array { - return Owner.encode(message).finish(); - }, - toProtoMsg(message: Owner): OwnerProtoMsg { - return { - typeUrl: "/cosmos.capability.v1beta1.Owner", - value: Owner.encode(message).finish() - }; - } -}; -function createBaseCapabilityOwners(): CapabilityOwners { - return { - owners: [] - }; -} -export const CapabilityOwners = { - typeUrl: "/cosmos.capability.v1beta1.CapabilityOwners", - aminoType: "cosmos-sdk/CapabilityOwners", - encode(message: CapabilityOwners, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.owners) { - Owner.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CapabilityOwners { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCapabilityOwners(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owners.push(Owner.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CapabilityOwners { - return { - owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => Owner.fromJSON(e)) : [] - }; - }, - toJSON(message: CapabilityOwners): unknown { - const obj: any = {}; - if (message.owners) { - obj.owners = message.owners.map(e => e ? Owner.toJSON(e) : undefined); - } else { - obj.owners = []; - } - return obj; - }, - fromPartial(object: DeepPartial): CapabilityOwners { - const message = createBaseCapabilityOwners(); - message.owners = object.owners?.map(e => Owner.fromPartial(e)) || []; - return message; - }, - fromSDK(object: CapabilityOwnersSDKType): CapabilityOwners { - return { - owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => Owner.fromSDK(e)) : [] - }; - }, - toSDK(message: CapabilityOwners): CapabilityOwnersSDKType { - const obj: any = {}; - if (message.owners) { - obj.owners = message.owners.map(e => e ? Owner.toSDK(e) : undefined); - } else { - obj.owners = []; - } - return obj; - }, - fromAmino(object: CapabilityOwnersAmino): CapabilityOwners { - return { - owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => Owner.fromAmino(e)) : [] - }; - }, - toAmino(message: CapabilityOwners): CapabilityOwnersAmino { - const obj: any = {}; - if (message.owners) { - obj.owners = message.owners.map(e => e ? Owner.toAmino(e) : undefined); - } else { - obj.owners = []; - } - return obj; - }, - fromAminoMsg(object: CapabilityOwnersAminoMsg): CapabilityOwners { - return CapabilityOwners.fromAmino(object.value); - }, - toAminoMsg(message: CapabilityOwners): CapabilityOwnersAminoMsg { - return { - type: "cosmos-sdk/CapabilityOwners", - value: CapabilityOwners.toAmino(message) - }; - }, - fromProtoMsg(message: CapabilityOwnersProtoMsg): CapabilityOwners { - return CapabilityOwners.decode(message.value); - }, - toProto(message: CapabilityOwners): Uint8Array { - return CapabilityOwners.encode(message).finish(); - }, - toProtoMsg(message: CapabilityOwners): CapabilityOwnersProtoMsg { - return { - typeUrl: "/cosmos.capability.v1beta1.CapabilityOwners", - value: CapabilityOwners.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/capability/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/capability/v1beta1/genesis.ts deleted file mode 100644 index 365d37ff..00000000 --- a/examples/interchainjs/src/codegen/cosmos/capability/v1beta1/genesis.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { CapabilityOwners, CapabilityOwnersAmino, CapabilityOwnersSDKType } from "./capability"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisOwners defines the capability owners with their corresponding index. */ -export interface GenesisOwners { - /** index is the index of the capability owner. */ - index: bigint; - /** index_owners are the owners at the given index. */ - indexOwners: CapabilityOwners | undefined; -} -export interface GenesisOwnersProtoMsg { - typeUrl: "/cosmos.capability.v1beta1.GenesisOwners"; - value: Uint8Array; -} -/** GenesisOwners defines the capability owners with their corresponding index. */ -export interface GenesisOwnersAmino { - /** index is the index of the capability owner. */ - index: string; - /** index_owners are the owners at the given index. */ - index_owners?: CapabilityOwnersAmino | undefined; -} -export interface GenesisOwnersAminoMsg { - type: "cosmos-sdk/GenesisOwners"; - value: GenesisOwnersAmino; -} -/** GenesisOwners defines the capability owners with their corresponding index. */ -export interface GenesisOwnersSDKType { - index: bigint; - index_owners: CapabilityOwnersSDKType | undefined; -} -/** GenesisState defines the capability module's genesis state. */ -export interface GenesisState { - /** index is the capability global index. */ - index: bigint; - /** - * owners represents a map from index to owners of the capability index - * index key is string to allow amino marshalling. - */ - owners: GenesisOwners[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.capability.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the capability module's genesis state. */ -export interface GenesisStateAmino { - /** index is the capability global index. */ - index: string; - /** - * owners represents a map from index to owners of the capability index - * index key is string to allow amino marshalling. - */ - owners: GenesisOwnersAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the capability module's genesis state. */ -export interface GenesisStateSDKType { - index: bigint; - owners: GenesisOwnersSDKType[]; -} -function createBaseGenesisOwners(): GenesisOwners { - return { - index: BigInt(0), - indexOwners: CapabilityOwners.fromPartial({}) - }; -} -export const GenesisOwners = { - typeUrl: "/cosmos.capability.v1beta1.GenesisOwners", - aminoType: "cosmos-sdk/GenesisOwners", - encode(message: GenesisOwners, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== BigInt(0)) { - writer.uint32(8).uint64(message.index); - } - if (message.indexOwners !== undefined) { - CapabilityOwners.encode(message.indexOwners, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisOwners { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisOwners(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint64(); - break; - case 2: - message.indexOwners = CapabilityOwners.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisOwners { - return { - index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0), - indexOwners: isSet(object.indexOwners) ? CapabilityOwners.fromJSON(object.indexOwners) : undefined - }; - }, - toJSON(message: GenesisOwners): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = (message.index || BigInt(0)).toString()); - message.indexOwners !== undefined && (obj.indexOwners = message.indexOwners ? CapabilityOwners.toJSON(message.indexOwners) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisOwners { - const message = createBaseGenesisOwners(); - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.indexOwners = object.indexOwners !== undefined && object.indexOwners !== null ? CapabilityOwners.fromPartial(object.indexOwners) : undefined; - return message; - }, - fromSDK(object: GenesisOwnersSDKType): GenesisOwners { - return { - index: object?.index, - indexOwners: object.index_owners ? CapabilityOwners.fromSDK(object.index_owners) : undefined - }; - }, - toSDK(message: GenesisOwners): GenesisOwnersSDKType { - const obj: any = {}; - obj.index = message.index; - message.indexOwners !== undefined && (obj.index_owners = message.indexOwners ? CapabilityOwners.toSDK(message.indexOwners) : undefined); - return obj; - }, - fromAmino(object: GenesisOwnersAmino): GenesisOwners { - return { - index: BigInt(object.index), - indexOwners: object?.index_owners ? CapabilityOwners.fromAmino(object.index_owners) : undefined - }; - }, - toAmino(message: GenesisOwners): GenesisOwnersAmino { - const obj: any = {}; - obj.index = message.index ? message.index.toString() : undefined; - obj.index_owners = message.indexOwners ? CapabilityOwners.toAmino(message.indexOwners) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisOwnersAminoMsg): GenesisOwners { - return GenesisOwners.fromAmino(object.value); - }, - toAminoMsg(message: GenesisOwners): GenesisOwnersAminoMsg { - return { - type: "cosmos-sdk/GenesisOwners", - value: GenesisOwners.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisOwnersProtoMsg): GenesisOwners { - return GenesisOwners.decode(message.value); - }, - toProto(message: GenesisOwners): Uint8Array { - return GenesisOwners.encode(message).finish(); - }, - toProtoMsg(message: GenesisOwners): GenesisOwnersProtoMsg { - return { - typeUrl: "/cosmos.capability.v1beta1.GenesisOwners", - value: GenesisOwners.encode(message).finish() - }; - } -}; -function createBaseGenesisState(): GenesisState { - return { - index: BigInt(0), - owners: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.capability.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== BigInt(0)) { - writer.uint32(8).uint64(message.index); - } - for (const v of message.owners) { - GenesisOwners.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint64(); - break; - case 2: - message.owners.push(GenesisOwners.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0), - owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => GenesisOwners.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = (message.index || BigInt(0)).toString()); - if (message.owners) { - obj.owners = message.owners.map(e => e ? GenesisOwners.toJSON(e) : undefined); - } else { - obj.owners = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.owners = object.owners?.map(e => GenesisOwners.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - index: object?.index, - owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => GenesisOwners.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.index = message.index; - if (message.owners) { - obj.owners = message.owners.map(e => e ? GenesisOwners.toSDK(e) : undefined); - } else { - obj.owners = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - index: BigInt(object.index), - owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => GenesisOwners.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.index = message.index ? message.index.toString() : undefined; - if (message.owners) { - obj.owners = message.owners.map(e => e ? GenesisOwners.toAmino(e) : undefined); - } else { - obj.owners = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.capability.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/client.ts b/examples/interchainjs/src/codegen/cosmos/client.ts deleted file mode 100644 index d7164686..00000000 --- a/examples/interchainjs/src/codegen/cosmos/client.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as cosmosAuthzV1beta1TxRegistry from "./authz/v1beta1/tx.registry"; -import * as cosmosBankV1beta1TxRegistry from "./bank/v1beta1/tx.registry"; -import * as cosmosCrisisV1beta1TxRegistry from "./crisis/v1beta1/tx.registry"; -import * as cosmosDistributionV1beta1TxRegistry from "./distribution/v1beta1/tx.registry"; -import * as cosmosEvidenceV1beta1TxRegistry from "./evidence/v1beta1/tx.registry"; -import * as cosmosFeegrantV1beta1TxRegistry from "./feegrant/v1beta1/tx.registry"; -import * as cosmosGovV1TxRegistry from "./gov/v1/tx.registry"; -import * as cosmosGovV1beta1TxRegistry from "./gov/v1beta1/tx.registry"; -import * as cosmosGroupV1TxRegistry from "./group/v1/tx.registry"; -import * as cosmosNftV1beta1TxRegistry from "./nft/v1beta1/tx.registry"; -import * as cosmosSlashingV1beta1TxRegistry from "./slashing/v1beta1/tx.registry"; -import * as cosmosStakingV1beta1TxRegistry from "./staking/v1beta1/tx.registry"; -import * as cosmosUpgradeV1beta1TxRegistry from "./upgrade/v1beta1/tx.registry"; -import * as cosmosVestingV1beta1TxRegistry from "./vesting/v1beta1/tx.registry"; -import * as cosmosAuthzV1beta1TxAmino from "./authz/v1beta1/tx.amino"; -import * as cosmosBankV1beta1TxAmino from "./bank/v1beta1/tx.amino"; -import * as cosmosCrisisV1beta1TxAmino from "./crisis/v1beta1/tx.amino"; -import * as cosmosDistributionV1beta1TxAmino from "./distribution/v1beta1/tx.amino"; -import * as cosmosEvidenceV1beta1TxAmino from "./evidence/v1beta1/tx.amino"; -import * as cosmosFeegrantV1beta1TxAmino from "./feegrant/v1beta1/tx.amino"; -import * as cosmosGovV1TxAmino from "./gov/v1/tx.amino"; -import * as cosmosGovV1beta1TxAmino from "./gov/v1beta1/tx.amino"; -import * as cosmosGroupV1TxAmino from "./group/v1/tx.amino"; -import * as cosmosNftV1beta1TxAmino from "./nft/v1beta1/tx.amino"; -import * as cosmosSlashingV1beta1TxAmino from "./slashing/v1beta1/tx.amino"; -import * as cosmosStakingV1beta1TxAmino from "./staking/v1beta1/tx.amino"; -import * as cosmosUpgradeV1beta1TxAmino from "./upgrade/v1beta1/tx.amino"; -import * as cosmosVestingV1beta1TxAmino from "./vesting/v1beta1/tx.amino"; -export const cosmosAminoConverters = { - ...cosmosAuthzV1beta1TxAmino.AminoConverter, - ...cosmosBankV1beta1TxAmino.AminoConverter, - ...cosmosCrisisV1beta1TxAmino.AminoConverter, - ...cosmosDistributionV1beta1TxAmino.AminoConverter, - ...cosmosEvidenceV1beta1TxAmino.AminoConverter, - ...cosmosFeegrantV1beta1TxAmino.AminoConverter, - ...cosmosGovV1TxAmino.AminoConverter, - ...cosmosGovV1beta1TxAmino.AminoConverter, - ...cosmosGroupV1TxAmino.AminoConverter, - ...cosmosNftV1beta1TxAmino.AminoConverter, - ...cosmosSlashingV1beta1TxAmino.AminoConverter, - ...cosmosStakingV1beta1TxAmino.AminoConverter, - ...cosmosUpgradeV1beta1TxAmino.AminoConverter, - ...cosmosVestingV1beta1TxAmino.AminoConverter -}; -export const cosmosProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...cosmosAuthzV1beta1TxRegistry.registry, ...cosmosBankV1beta1TxRegistry.registry, ...cosmosCrisisV1beta1TxRegistry.registry, ...cosmosDistributionV1beta1TxRegistry.registry, ...cosmosEvidenceV1beta1TxRegistry.registry, ...cosmosFeegrantV1beta1TxRegistry.registry, ...cosmosGovV1TxRegistry.registry, ...cosmosGovV1beta1TxRegistry.registry, ...cosmosGroupV1TxRegistry.registry, ...cosmosNftV1beta1TxRegistry.registry, ...cosmosSlashingV1beta1TxRegistry.registry, ...cosmosStakingV1beta1TxRegistry.registry, ...cosmosUpgradeV1beta1TxRegistry.registry, ...cosmosVestingV1beta1TxRegistry.registry]; -export const getSigningCosmosClientOptions = (): { - registry: Registry; - aminoTypes: AminoTypes; -} => { - const registry = new Registry([...cosmosProtoRegistry]); - const aminoTypes = new AminoTypes({ - ...cosmosAminoConverters - }); - return { - registry, - aminoTypes - }; -}; -export const getSigningCosmosClient = async ({ - rpcEndpoint, - signer -}: { - rpcEndpoint: string | HttpEndpoint; - signer: OfflineSigner; -}) => { - const { - registry, - aminoTypes - } = getSigningCosmosClientOptions(); - const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry: (registry as any), - aminoTypes - }); - return client; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/genesis.ts deleted file mode 100644 index 2767034f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/genesis.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisState { - /** - * constant_fee is the fee used to verify the invariant in the crisis - * module. - */ - constantFee: Coin | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.crisis.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisStateAmino { - /** - * constant_fee is the fee used to verify the invariant in the crisis - * module. - */ - constant_fee?: CoinAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the crisis module's genesis state. */ -export interface GenesisStateSDKType { - constant_fee: CoinSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - constantFee: Coin.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/cosmos.crisis.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.constantFee !== undefined) { - Coin.encode(message.constantFee, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.constantFee = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - constantFee: isSet(object.constantFee) ? Coin.fromJSON(object.constantFee) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.constantFee !== undefined && (obj.constantFee = message.constantFee ? Coin.toJSON(message.constantFee) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.constantFee = object.constantFee !== undefined && object.constantFee !== null ? Coin.fromPartial(object.constantFee) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - constantFee: object.constant_fee ? Coin.fromSDK(object.constant_fee) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.constantFee !== undefined && (obj.constant_fee = message.constantFee ? Coin.toSDK(message.constantFee) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - constantFee: object?.constant_fee ? Coin.fromAmino(object.constant_fee) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.constant_fee = message.constantFee ? Coin.toAmino(message.constantFee) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.crisis.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.amino.ts deleted file mode 100644 index 5269268b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.amino.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MsgVerifyInvariant } from "./tx"; -export const AminoConverter = { - "/cosmos.crisis.v1beta1.MsgVerifyInvariant": { - aminoType: "cosmos-sdk/MsgVerifyInvariant", - toAmino: MsgVerifyInvariant.toAmino, - fromAmino: MsgVerifyInvariant.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.registry.ts deleted file mode 100644 index d586b8ac..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.registry.ts +++ /dev/null @@ -1,51 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgVerifyInvariant } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - verifyInvariant(value: MsgVerifyInvariant) { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - value: MsgVerifyInvariant.encode(value).finish() - }; - } - }, - withTypeUrl: { - verifyInvariant(value: MsgVerifyInvariant) { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - value - }; - } - }, - toJSON: { - verifyInvariant(value: MsgVerifyInvariant) { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - value: MsgVerifyInvariant.toJSON(value) - }; - } - }, - fromJSON: { - verifyInvariant(value: any) { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - value: MsgVerifyInvariant.fromJSON(value) - }; - } - }, - fromPartial: { - verifyInvariant(value: MsgVerifyInvariant) { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - value: MsgVerifyInvariant.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index b0b9ea1f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgVerifyInvariant, MsgVerifyInvariantResponse } from "./tx"; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** VerifyInvariant defines a method to verify a particular invariance. */ - verifyInvariant(request: MsgVerifyInvariant): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.verifyInvariant = this.verifyInvariant.bind(this); - } - verifyInvariant(request: MsgVerifyInvariant): Promise { - const data = MsgVerifyInvariant.encode(request).finish(); - const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "VerifyInvariant", data); - return promise.then(data => MsgVerifyInvariantResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.ts deleted file mode 100644 index c35927a3..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crisis/v1beta1/tx.ts +++ /dev/null @@ -1,228 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariant { - sender: string; - invariantModuleName: string; - invariantRoute: string; -} -export interface MsgVerifyInvariantProtoMsg { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant"; - value: Uint8Array; -} -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariantAmino { - sender: string; - invariant_module_name: string; - invariant_route: string; -} -export interface MsgVerifyInvariantAminoMsg { - type: "cosmos-sdk/MsgVerifyInvariant"; - value: MsgVerifyInvariantAmino; -} -/** MsgVerifyInvariant represents a message to verify a particular invariance. */ -export interface MsgVerifyInvariantSDKType { - sender: string; - invariant_module_name: string; - invariant_route: string; -} -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponse {} -export interface MsgVerifyInvariantResponseProtoMsg { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariantResponse"; - value: Uint8Array; -} -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponseAmino {} -export interface MsgVerifyInvariantResponseAminoMsg { - type: "cosmos-sdk/MsgVerifyInvariantResponse"; - value: MsgVerifyInvariantResponseAmino; -} -/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */ -export interface MsgVerifyInvariantResponseSDKType {} -function createBaseMsgVerifyInvariant(): MsgVerifyInvariant { - return { - sender: "", - invariantModuleName: "", - invariantRoute: "" - }; -} -export const MsgVerifyInvariant = { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - aminoType: "cosmos-sdk/MsgVerifyInvariant", - encode(message: MsgVerifyInvariant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.invariantModuleName !== "") { - writer.uint32(18).string(message.invariantModuleName); - } - if (message.invariantRoute !== "") { - writer.uint32(26).string(message.invariantRoute); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVerifyInvariant { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVerifyInvariant(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.invariantModuleName = reader.string(); - break; - case 3: - message.invariantRoute = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgVerifyInvariant { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - invariantModuleName: isSet(object.invariantModuleName) ? String(object.invariantModuleName) : "", - invariantRoute: isSet(object.invariantRoute) ? String(object.invariantRoute) : "" - }; - }, - toJSON(message: MsgVerifyInvariant): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.invariantModuleName !== undefined && (obj.invariantModuleName = message.invariantModuleName); - message.invariantRoute !== undefined && (obj.invariantRoute = message.invariantRoute); - return obj; - }, - fromPartial(object: DeepPartial): MsgVerifyInvariant { - const message = createBaseMsgVerifyInvariant(); - message.sender = object.sender ?? ""; - message.invariantModuleName = object.invariantModuleName ?? ""; - message.invariantRoute = object.invariantRoute ?? ""; - return message; - }, - fromSDK(object: MsgVerifyInvariantSDKType): MsgVerifyInvariant { - return { - sender: object?.sender, - invariantModuleName: object?.invariant_module_name, - invariantRoute: object?.invariant_route - }; - }, - toSDK(message: MsgVerifyInvariant): MsgVerifyInvariantSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.invariant_module_name = message.invariantModuleName; - obj.invariant_route = message.invariantRoute; - return obj; - }, - fromAmino(object: MsgVerifyInvariantAmino): MsgVerifyInvariant { - return { - sender: object.sender, - invariantModuleName: object.invariant_module_name, - invariantRoute: object.invariant_route - }; - }, - toAmino(message: MsgVerifyInvariant): MsgVerifyInvariantAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.invariant_module_name = message.invariantModuleName; - obj.invariant_route = message.invariantRoute; - return obj; - }, - fromAminoMsg(object: MsgVerifyInvariantAminoMsg): MsgVerifyInvariant { - return MsgVerifyInvariant.fromAmino(object.value); - }, - toAminoMsg(message: MsgVerifyInvariant): MsgVerifyInvariantAminoMsg { - return { - type: "cosmos-sdk/MsgVerifyInvariant", - value: MsgVerifyInvariant.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVerifyInvariantProtoMsg): MsgVerifyInvariant { - return MsgVerifyInvariant.decode(message.value); - }, - toProto(message: MsgVerifyInvariant): Uint8Array { - return MsgVerifyInvariant.encode(message).finish(); - }, - toProtoMsg(message: MsgVerifyInvariant): MsgVerifyInvariantProtoMsg { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", - value: MsgVerifyInvariant.encode(message).finish() - }; - } -}; -function createBaseMsgVerifyInvariantResponse(): MsgVerifyInvariantResponse { - return {}; -} -export const MsgVerifyInvariantResponse = { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariantResponse", - aminoType: "cosmos-sdk/MsgVerifyInvariantResponse", - encode(_: MsgVerifyInvariantResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVerifyInvariantResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVerifyInvariantResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgVerifyInvariantResponse { - return {}; - }, - toJSON(_: MsgVerifyInvariantResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgVerifyInvariantResponse { - const message = createBaseMsgVerifyInvariantResponse(); - return message; - }, - fromSDK(_: MsgVerifyInvariantResponseSDKType): MsgVerifyInvariantResponse { - return {}; - }, - toSDK(_: MsgVerifyInvariantResponse): MsgVerifyInvariantResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgVerifyInvariantResponseAmino): MsgVerifyInvariantResponse { - return {}; - }, - toAmino(_: MsgVerifyInvariantResponse): MsgVerifyInvariantResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgVerifyInvariantResponseAminoMsg): MsgVerifyInvariantResponse { - return MsgVerifyInvariantResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgVerifyInvariantResponse): MsgVerifyInvariantResponseAminoMsg { - return { - type: "cosmos-sdk/MsgVerifyInvariantResponse", - value: MsgVerifyInvariantResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVerifyInvariantResponseProtoMsg): MsgVerifyInvariantResponse { - return MsgVerifyInvariantResponse.decode(message.value); - }, - toProto(message: MsgVerifyInvariantResponse): Uint8Array { - return MsgVerifyInvariantResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgVerifyInvariantResponse): MsgVerifyInvariantResponseProtoMsg { - return { - typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariantResponse", - value: MsgVerifyInvariantResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/ed25519/keys.ts b/examples/interchainjs/src/codegen/cosmos/crypto/ed25519/keys.ts deleted file mode 100644 index b9b2b146..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/ed25519/keys.ts +++ /dev/null @@ -1,245 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** - * PubKey is an ed25519 public key for handling Tendermint keys in SDK. - * It's needed for Any serialization and SDK compatibility. - * It must not be used in a non Tendermint key context because it doesn't implement - * ADR-28. Nevertheless, you will like to use ed25519 in app user level - * then you must create a new proto message and follow ADR-28 for Address construction. - */ -export interface PubKey { - key: Uint8Array; -} -export interface PubKeyProtoMsg { - typeUrl: "/cosmos.crypto.ed25519.PubKey"; - value: Uint8Array; -} -/** - * PubKey is an ed25519 public key for handling Tendermint keys in SDK. - * It's needed for Any serialization and SDK compatibility. - * It must not be used in a non Tendermint key context because it doesn't implement - * ADR-28. Nevertheless, you will like to use ed25519 in app user level - * then you must create a new proto message and follow ADR-28 for Address construction. - */ -export interface PubKeyAmino { - key: Uint8Array; -} -export interface PubKeyAminoMsg { - type: "cosmos-sdk/PubKey"; - value: PubKeyAmino; -} -/** - * PubKey is an ed25519 public key for handling Tendermint keys in SDK. - * It's needed for Any serialization and SDK compatibility. - * It must not be used in a non Tendermint key context because it doesn't implement - * ADR-28. Nevertheless, you will like to use ed25519 in app user level - * then you must create a new proto message and follow ADR-28 for Address construction. - */ -export interface PubKeySDKType { - key: Uint8Array; -} -/** - * Deprecated: PrivKey defines a ed25519 private key. - * NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. - */ -export interface PrivKey { - key: Uint8Array; -} -export interface PrivKeyProtoMsg { - typeUrl: "/cosmos.crypto.ed25519.PrivKey"; - value: Uint8Array; -} -/** - * Deprecated: PrivKey defines a ed25519 private key. - * NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. - */ -export interface PrivKeyAmino { - key: Uint8Array; -} -export interface PrivKeyAminoMsg { - type: "cosmos-sdk/PrivKey"; - value: PrivKeyAmino; -} -/** - * Deprecated: PrivKey defines a ed25519 private key. - * NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. - */ -export interface PrivKeySDKType { - key: Uint8Array; -} -function createBasePubKey(): PubKey { - return { - key: new Uint8Array() - }; -} -export const PubKey = { - typeUrl: "/cosmos.crypto.ed25519.PubKey", - aminoType: "cosmos-sdk/PubKey", - encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PubKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePubKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PubKey { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() - }; - }, - toJSON(message: PubKey): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PubKey { - const message = createBasePubKey(); - message.key = object.key ?? new Uint8Array(); - return message; - }, - fromSDK(object: PubKeySDKType): PubKey { - return { - key: object?.key - }; - }, - toSDK(message: PubKey): PubKeySDKType { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAmino(object: PubKeyAmino): PubKey { - return { - key: object.key - }; - }, - toAmino(message: PubKey): PubKeyAmino { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAminoMsg(object: PubKeyAminoMsg): PubKey { - return PubKey.fromAmino(object.value); - }, - toAminoMsg(message: PubKey): PubKeyAminoMsg { - return { - type: "cosmos-sdk/PubKey", - value: PubKey.toAmino(message) - }; - }, - fromProtoMsg(message: PubKeyProtoMsg): PubKey { - return PubKey.decode(message.value); - }, - toProto(message: PubKey): Uint8Array { - return PubKey.encode(message).finish(); - }, - toProtoMsg(message: PubKey): PubKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.ed25519.PubKey", - value: PubKey.encode(message).finish() - }; - } -}; -function createBasePrivKey(): PrivKey { - return { - key: new Uint8Array() - }; -} -export const PrivKey = { - typeUrl: "/cosmos.crypto.ed25519.PrivKey", - aminoType: "cosmos-sdk/PrivKey", - encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PrivKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePrivKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PrivKey { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() - }; - }, - toJSON(message: PrivKey): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PrivKey { - const message = createBasePrivKey(); - message.key = object.key ?? new Uint8Array(); - return message; - }, - fromSDK(object: PrivKeySDKType): PrivKey { - return { - key: object?.key - }; - }, - toSDK(message: PrivKey): PrivKeySDKType { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAmino(object: PrivKeyAmino): PrivKey { - return { - key: object.key - }; - }, - toAmino(message: PrivKey): PrivKeyAmino { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAminoMsg(object: PrivKeyAminoMsg): PrivKey { - return PrivKey.fromAmino(object.value); - }, - toAminoMsg(message: PrivKey): PrivKeyAminoMsg { - return { - type: "cosmos-sdk/PrivKey", - value: PrivKey.toAmino(message) - }; - }, - fromProtoMsg(message: PrivKeyProtoMsg): PrivKey { - return PrivKey.decode(message.value); - }, - toProto(message: PrivKey): Uint8Array { - return PrivKey.encode(message).finish(); - }, - toProtoMsg(message: PrivKey): PrivKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.ed25519.PrivKey", - value: PrivKey.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/hd/v1/hd.ts b/examples/interchainjs/src/codegen/cosmos/crypto/hd/v1/hd.ts deleted file mode 100644 index db832a7c..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/hd/v1/hd.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** BIP44Params is used as path field in ledger item in Record. */ -export interface BIP44Params { - /** purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation */ - purpose: number; - /** coin_type is a constant that improves privacy */ - coinType: number; - /** account splits the key space into independent user identities */ - account: number; - /** - * change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - * chain. - */ - change: boolean; - /** address_index is used as child index in BIP32 derivation */ - addressIndex: number; -} -export interface BIP44ParamsProtoMsg { - typeUrl: "/cosmos.crypto.hd.v1.BIP44Params"; - value: Uint8Array; -} -/** BIP44Params is used as path field in ledger item in Record. */ -export interface BIP44ParamsAmino { - /** purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation */ - purpose: number; - /** coin_type is a constant that improves privacy */ - coin_type: number; - /** account splits the key space into independent user identities */ - account: number; - /** - * change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - * chain. - */ - change: boolean; - /** address_index is used as child index in BIP32 derivation */ - address_index: number; -} -export interface BIP44ParamsAminoMsg { - type: "cosmos-sdk/BIP44Params"; - value: BIP44ParamsAmino; -} -/** BIP44Params is used as path field in ledger item in Record. */ -export interface BIP44ParamsSDKType { - purpose: number; - coin_type: number; - account: number; - change: boolean; - address_index: number; -} -function createBaseBIP44Params(): BIP44Params { - return { - purpose: 0, - coinType: 0, - account: 0, - change: false, - addressIndex: 0 - }; -} -export const BIP44Params = { - typeUrl: "/cosmos.crypto.hd.v1.BIP44Params", - aminoType: "cosmos-sdk/BIP44Params", - encode(message: BIP44Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.purpose !== 0) { - writer.uint32(8).uint32(message.purpose); - } - if (message.coinType !== 0) { - writer.uint32(16).uint32(message.coinType); - } - if (message.account !== 0) { - writer.uint32(24).uint32(message.account); - } - if (message.change === true) { - writer.uint32(32).bool(message.change); - } - if (message.addressIndex !== 0) { - writer.uint32(40).uint32(message.addressIndex); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BIP44Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBIP44Params(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.purpose = reader.uint32(); - break; - case 2: - message.coinType = reader.uint32(); - break; - case 3: - message.account = reader.uint32(); - break; - case 4: - message.change = reader.bool(); - break; - case 5: - message.addressIndex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BIP44Params { - return { - purpose: isSet(object.purpose) ? Number(object.purpose) : 0, - coinType: isSet(object.coinType) ? Number(object.coinType) : 0, - account: isSet(object.account) ? Number(object.account) : 0, - change: isSet(object.change) ? Boolean(object.change) : false, - addressIndex: isSet(object.addressIndex) ? Number(object.addressIndex) : 0 - }; - }, - toJSON(message: BIP44Params): unknown { - const obj: any = {}; - message.purpose !== undefined && (obj.purpose = Math.round(message.purpose)); - message.coinType !== undefined && (obj.coinType = Math.round(message.coinType)); - message.account !== undefined && (obj.account = Math.round(message.account)); - message.change !== undefined && (obj.change = message.change); - message.addressIndex !== undefined && (obj.addressIndex = Math.round(message.addressIndex)); - return obj; - }, - fromPartial(object: DeepPartial): BIP44Params { - const message = createBaseBIP44Params(); - message.purpose = object.purpose ?? 0; - message.coinType = object.coinType ?? 0; - message.account = object.account ?? 0; - message.change = object.change ?? false; - message.addressIndex = object.addressIndex ?? 0; - return message; - }, - fromSDK(object: BIP44ParamsSDKType): BIP44Params { - return { - purpose: object?.purpose, - coinType: object?.coin_type, - account: object?.account, - change: object?.change, - addressIndex: object?.address_index - }; - }, - toSDK(message: BIP44Params): BIP44ParamsSDKType { - const obj: any = {}; - obj.purpose = message.purpose; - obj.coin_type = message.coinType; - obj.account = message.account; - obj.change = message.change; - obj.address_index = message.addressIndex; - return obj; - }, - fromAmino(object: BIP44ParamsAmino): BIP44Params { - return { - purpose: object.purpose, - coinType: object.coin_type, - account: object.account, - change: object.change, - addressIndex: object.address_index - }; - }, - toAmino(message: BIP44Params): BIP44ParamsAmino { - const obj: any = {}; - obj.purpose = message.purpose; - obj.coin_type = message.coinType; - obj.account = message.account; - obj.change = message.change; - obj.address_index = message.addressIndex; - return obj; - }, - fromAminoMsg(object: BIP44ParamsAminoMsg): BIP44Params { - return BIP44Params.fromAmino(object.value); - }, - toAminoMsg(message: BIP44Params): BIP44ParamsAminoMsg { - return { - type: "cosmos-sdk/BIP44Params", - value: BIP44Params.toAmino(message) - }; - }, - fromProtoMsg(message: BIP44ParamsProtoMsg): BIP44Params { - return BIP44Params.decode(message.value); - }, - toProto(message: BIP44Params): Uint8Array { - return BIP44Params.encode(message).finish(); - }, - toProtoMsg(message: BIP44Params): BIP44ParamsProtoMsg { - return { - typeUrl: "/cosmos.crypto.hd.v1.BIP44Params", - value: BIP44Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/keyring/v1/record.ts b/examples/interchainjs/src/codegen/cosmos/crypto/keyring/v1/record.ts deleted file mode 100644 index 218aad33..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/keyring/v1/record.ts +++ /dev/null @@ -1,619 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { BIP44Params, BIP44ParamsAmino, BIP44ParamsSDKType } from "../../hd/v1/hd"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** Record is used for representing a key in the keyring. */ -export interface Record { - /** name represents a name of Record */ - name: string; - /** pub_key represents a public key in any format */ - pubKey: Any | undefined; - /** local stores the public information about a locally stored key */ - local?: Record_Local | undefined; - /** ledger stores the public information about a Ledger key */ - ledger?: Record_Ledger | undefined; - /** Multi does not store any information. */ - multi?: Record_Multi | undefined; - /** Offline does not store any information. */ - offline?: Record_Offline | undefined; -} -export interface RecordProtoMsg { - typeUrl: "/cosmos.crypto.keyring.v1.Record"; - value: Uint8Array; -} -/** Record is used for representing a key in the keyring. */ -export interface RecordAmino { - /** name represents a name of Record */ - name: string; - /** pub_key represents a public key in any format */ - pub_key?: AnyAmino | undefined; - /** local stores the public information about a locally stored key */ - local?: Record_LocalAmino | undefined; - /** ledger stores the public information about a Ledger key */ - ledger?: Record_LedgerAmino | undefined; - /** Multi does not store any information. */ - multi?: Record_MultiAmino | undefined; - /** Offline does not store any information. */ - offline?: Record_OfflineAmino | undefined; -} -export interface RecordAminoMsg { - type: "cosmos-sdk/Record"; - value: RecordAmino; -} -/** Record is used for representing a key in the keyring. */ -export interface RecordSDKType { - name: string; - pub_key: AnySDKType | undefined; - local?: Record_LocalSDKType | undefined; - ledger?: Record_LedgerSDKType | undefined; - multi?: Record_MultiSDKType | undefined; - offline?: Record_OfflineSDKType | undefined; -} -/** - * Item is a keyring item stored in a keyring backend. - * Local item - */ -export interface Record_Local { - privKey: Any | undefined; - privKeyType: string; -} -export interface Record_LocalProtoMsg { - typeUrl: "/cosmos.crypto.keyring.v1.Local"; - value: Uint8Array; -} -/** - * Item is a keyring item stored in a keyring backend. - * Local item - */ -export interface Record_LocalAmino { - priv_key?: AnyAmino | undefined; - priv_key_type: string; -} -export interface Record_LocalAminoMsg { - type: "cosmos-sdk/Local"; - value: Record_LocalAmino; -} -/** - * Item is a keyring item stored in a keyring backend. - * Local item - */ -export interface Record_LocalSDKType { - priv_key: AnySDKType | undefined; - priv_key_type: string; -} -/** Ledger item */ -export interface Record_Ledger { - path: BIP44Params | undefined; -} -export interface Record_LedgerProtoMsg { - typeUrl: "/cosmos.crypto.keyring.v1.Ledger"; - value: Uint8Array; -} -/** Ledger item */ -export interface Record_LedgerAmino { - path?: BIP44ParamsAmino | undefined; -} -export interface Record_LedgerAminoMsg { - type: "cosmos-sdk/Ledger"; - value: Record_LedgerAmino; -} -/** Ledger item */ -export interface Record_LedgerSDKType { - path: BIP44ParamsSDKType | undefined; -} -/** Multi item */ -export interface Record_Multi {} -export interface Record_MultiProtoMsg { - typeUrl: "/cosmos.crypto.keyring.v1.Multi"; - value: Uint8Array; -} -/** Multi item */ -export interface Record_MultiAmino {} -export interface Record_MultiAminoMsg { - type: "cosmos-sdk/Multi"; - value: Record_MultiAmino; -} -/** Multi item */ -export interface Record_MultiSDKType {} -/** Offline item */ -export interface Record_Offline {} -export interface Record_OfflineProtoMsg { - typeUrl: "/cosmos.crypto.keyring.v1.Offline"; - value: Uint8Array; -} -/** Offline item */ -export interface Record_OfflineAmino {} -export interface Record_OfflineAminoMsg { - type: "cosmos-sdk/Offline"; - value: Record_OfflineAmino; -} -/** Offline item */ -export interface Record_OfflineSDKType {} -function createBaseRecord(): Record { - return { - name: "", - pubKey: Any.fromPartial({}), - local: undefined, - ledger: undefined, - multi: undefined, - offline: undefined - }; -} -export const Record = { - typeUrl: "/cosmos.crypto.keyring.v1.Record", - aminoType: "cosmos-sdk/Record", - encode(message: Record, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.pubKey !== undefined) { - Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.local !== undefined) { - Record_Local.encode(message.local, writer.uint32(26).fork()).ldelim(); - } - if (message.ledger !== undefined) { - Record_Ledger.encode(message.ledger, writer.uint32(34).fork()).ldelim(); - } - if (message.multi !== undefined) { - Record_Multi.encode(message.multi, writer.uint32(42).fork()).ldelim(); - } - if (message.offline !== undefined) { - Record_Offline.encode(message.offline, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Record { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pubKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.local = Record_Local.decode(reader, reader.uint32()); - break; - case 4: - message.ledger = Record_Ledger.decode(reader, reader.uint32()); - break; - case 5: - message.multi = Record_Multi.decode(reader, reader.uint32()); - break; - case 6: - message.offline = Record_Offline.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Record { - return { - name: isSet(object.name) ? String(object.name) : "", - pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - local: isSet(object.local) ? Record_Local.fromJSON(object.local) : undefined, - ledger: isSet(object.ledger) ? Record_Ledger.fromJSON(object.ledger) : undefined, - multi: isSet(object.multi) ? Record_Multi.fromJSON(object.multi) : undefined, - offline: isSet(object.offline) ? Record_Offline.fromJSON(object.offline) : undefined - }; - }, - toJSON(message: Record): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.pubKey !== undefined && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined); - message.local !== undefined && (obj.local = message.local ? Record_Local.toJSON(message.local) : undefined); - message.ledger !== undefined && (obj.ledger = message.ledger ? Record_Ledger.toJSON(message.ledger) : undefined); - message.multi !== undefined && (obj.multi = message.multi ? Record_Multi.toJSON(message.multi) : undefined); - message.offline !== undefined && (obj.offline = message.offline ? Record_Offline.toJSON(message.offline) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Record { - const message = createBaseRecord(); - message.name = object.name ?? ""; - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? Any.fromPartial(object.pubKey) : undefined; - message.local = object.local !== undefined && object.local !== null ? Record_Local.fromPartial(object.local) : undefined; - message.ledger = object.ledger !== undefined && object.ledger !== null ? Record_Ledger.fromPartial(object.ledger) : undefined; - message.multi = object.multi !== undefined && object.multi !== null ? Record_Multi.fromPartial(object.multi) : undefined; - message.offline = object.offline !== undefined && object.offline !== null ? Record_Offline.fromPartial(object.offline) : undefined; - return message; - }, - fromSDK(object: RecordSDKType): Record { - return { - name: object?.name, - pubKey: object.pub_key ? Any.fromSDK(object.pub_key) : undefined, - local: object.local ? Record_Local.fromSDK(object.local) : undefined, - ledger: object.ledger ? Record_Ledger.fromSDK(object.ledger) : undefined, - multi: object.multi ? Record_Multi.fromSDK(object.multi) : undefined, - offline: object.offline ? Record_Offline.fromSDK(object.offline) : undefined - }; - }, - toSDK(message: Record): RecordSDKType { - const obj: any = {}; - obj.name = message.name; - message.pubKey !== undefined && (obj.pub_key = message.pubKey ? Any.toSDK(message.pubKey) : undefined); - message.local !== undefined && (obj.local = message.local ? Record_Local.toSDK(message.local) : undefined); - message.ledger !== undefined && (obj.ledger = message.ledger ? Record_Ledger.toSDK(message.ledger) : undefined); - message.multi !== undefined && (obj.multi = message.multi ? Record_Multi.toSDK(message.multi) : undefined); - message.offline !== undefined && (obj.offline = message.offline ? Record_Offline.toSDK(message.offline) : undefined); - return obj; - }, - fromAmino(object: RecordAmino): Record { - return { - name: object.name, - pubKey: object?.pub_key ? Any.fromAmino(object.pub_key) : undefined, - local: object?.local ? Record_Local.fromAmino(object.local) : undefined, - ledger: object?.ledger ? Record_Ledger.fromAmino(object.ledger) : undefined, - multi: object?.multi ? Record_Multi.fromAmino(object.multi) : undefined, - offline: object?.offline ? Record_Offline.fromAmino(object.offline) : undefined - }; - }, - toAmino(message: Record): RecordAmino { - const obj: any = {}; - obj.name = message.name; - obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : undefined; - obj.local = message.local ? Record_Local.toAmino(message.local) : undefined; - obj.ledger = message.ledger ? Record_Ledger.toAmino(message.ledger) : undefined; - obj.multi = message.multi ? Record_Multi.toAmino(message.multi) : undefined; - obj.offline = message.offline ? Record_Offline.toAmino(message.offline) : undefined; - return obj; - }, - fromAminoMsg(object: RecordAminoMsg): Record { - return Record.fromAmino(object.value); - }, - toAminoMsg(message: Record): RecordAminoMsg { - return { - type: "cosmos-sdk/Record", - value: Record.toAmino(message) - }; - }, - fromProtoMsg(message: RecordProtoMsg): Record { - return Record.decode(message.value); - }, - toProto(message: Record): Uint8Array { - return Record.encode(message).finish(); - }, - toProtoMsg(message: Record): RecordProtoMsg { - return { - typeUrl: "/cosmos.crypto.keyring.v1.Record", - value: Record.encode(message).finish() - }; - } -}; -function createBaseRecord_Local(): Record_Local { - return { - privKey: Any.fromPartial({}), - privKeyType: "" - }; -} -export const Record_Local = { - typeUrl: "/cosmos.crypto.keyring.v1.Local", - aminoType: "cosmos-sdk/Local", - encode(message: Record_Local, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.privKey !== undefined) { - Any.encode(message.privKey, writer.uint32(10).fork()).ldelim(); - } - if (message.privKeyType !== "") { - writer.uint32(18).string(message.privKeyType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Record_Local { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRecord_Local(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.privKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.privKeyType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Record_Local { - return { - privKey: isSet(object.privKey) ? Any.fromJSON(object.privKey) : undefined, - privKeyType: isSet(object.privKeyType) ? String(object.privKeyType) : "" - }; - }, - toJSON(message: Record_Local): unknown { - const obj: any = {}; - message.privKey !== undefined && (obj.privKey = message.privKey ? Any.toJSON(message.privKey) : undefined); - message.privKeyType !== undefined && (obj.privKeyType = message.privKeyType); - return obj; - }, - fromPartial(object: DeepPartial): Record_Local { - const message = createBaseRecord_Local(); - message.privKey = object.privKey !== undefined && object.privKey !== null ? Any.fromPartial(object.privKey) : undefined; - message.privKeyType = object.privKeyType ?? ""; - return message; - }, - fromSDK(object: Record_LocalSDKType): Record_Local { - return { - privKey: object.priv_key ? Any.fromSDK(object.priv_key) : undefined, - privKeyType: object?.priv_key_type - }; - }, - toSDK(message: Record_Local): Record_LocalSDKType { - const obj: any = {}; - message.privKey !== undefined && (obj.priv_key = message.privKey ? Any.toSDK(message.privKey) : undefined); - obj.priv_key_type = message.privKeyType; - return obj; - }, - fromAmino(object: Record_LocalAmino): Record_Local { - return { - privKey: object?.priv_key ? Any.fromAmino(object.priv_key) : undefined, - privKeyType: object.priv_key_type - }; - }, - toAmino(message: Record_Local): Record_LocalAmino { - const obj: any = {}; - obj.priv_key = message.privKey ? Any.toAmino(message.privKey) : undefined; - obj.priv_key_type = message.privKeyType; - return obj; - }, - fromAminoMsg(object: Record_LocalAminoMsg): Record_Local { - return Record_Local.fromAmino(object.value); - }, - toAminoMsg(message: Record_Local): Record_LocalAminoMsg { - return { - type: "cosmos-sdk/Local", - value: Record_Local.toAmino(message) - }; - }, - fromProtoMsg(message: Record_LocalProtoMsg): Record_Local { - return Record_Local.decode(message.value); - }, - toProto(message: Record_Local): Uint8Array { - return Record_Local.encode(message).finish(); - }, - toProtoMsg(message: Record_Local): Record_LocalProtoMsg { - return { - typeUrl: "/cosmos.crypto.keyring.v1.Local", - value: Record_Local.encode(message).finish() - }; - } -}; -function createBaseRecord_Ledger(): Record_Ledger { - return { - path: BIP44Params.fromPartial({}) - }; -} -export const Record_Ledger = { - typeUrl: "/cosmos.crypto.keyring.v1.Ledger", - aminoType: "cosmos-sdk/Ledger", - encode(message: Record_Ledger, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path !== undefined) { - BIP44Params.encode(message.path, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Record_Ledger { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRecord_Ledger(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = BIP44Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Record_Ledger { - return { - path: isSet(object.path) ? BIP44Params.fromJSON(object.path) : undefined - }; - }, - toJSON(message: Record_Ledger): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path ? BIP44Params.toJSON(message.path) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Record_Ledger { - const message = createBaseRecord_Ledger(); - message.path = object.path !== undefined && object.path !== null ? BIP44Params.fromPartial(object.path) : undefined; - return message; - }, - fromSDK(object: Record_LedgerSDKType): Record_Ledger { - return { - path: object.path ? BIP44Params.fromSDK(object.path) : undefined - }; - }, - toSDK(message: Record_Ledger): Record_LedgerSDKType { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path ? BIP44Params.toSDK(message.path) : undefined); - return obj; - }, - fromAmino(object: Record_LedgerAmino): Record_Ledger { - return { - path: object?.path ? BIP44Params.fromAmino(object.path) : undefined - }; - }, - toAmino(message: Record_Ledger): Record_LedgerAmino { - const obj: any = {}; - obj.path = message.path ? BIP44Params.toAmino(message.path) : undefined; - return obj; - }, - fromAminoMsg(object: Record_LedgerAminoMsg): Record_Ledger { - return Record_Ledger.fromAmino(object.value); - }, - toAminoMsg(message: Record_Ledger): Record_LedgerAminoMsg { - return { - type: "cosmos-sdk/Ledger", - value: Record_Ledger.toAmino(message) - }; - }, - fromProtoMsg(message: Record_LedgerProtoMsg): Record_Ledger { - return Record_Ledger.decode(message.value); - }, - toProto(message: Record_Ledger): Uint8Array { - return Record_Ledger.encode(message).finish(); - }, - toProtoMsg(message: Record_Ledger): Record_LedgerProtoMsg { - return { - typeUrl: "/cosmos.crypto.keyring.v1.Ledger", - value: Record_Ledger.encode(message).finish() - }; - } -}; -function createBaseRecord_Multi(): Record_Multi { - return {}; -} -export const Record_Multi = { - typeUrl: "/cosmos.crypto.keyring.v1.Multi", - aminoType: "cosmos-sdk/Multi", - encode(_: Record_Multi, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Record_Multi { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRecord_Multi(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): Record_Multi { - return {}; - }, - toJSON(_: Record_Multi): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): Record_Multi { - const message = createBaseRecord_Multi(); - return message; - }, - fromSDK(_: Record_MultiSDKType): Record_Multi { - return {}; - }, - toSDK(_: Record_Multi): Record_MultiSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: Record_MultiAmino): Record_Multi { - return {}; - }, - toAmino(_: Record_Multi): Record_MultiAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: Record_MultiAminoMsg): Record_Multi { - return Record_Multi.fromAmino(object.value); - }, - toAminoMsg(message: Record_Multi): Record_MultiAminoMsg { - return { - type: "cosmos-sdk/Multi", - value: Record_Multi.toAmino(message) - }; - }, - fromProtoMsg(message: Record_MultiProtoMsg): Record_Multi { - return Record_Multi.decode(message.value); - }, - toProto(message: Record_Multi): Uint8Array { - return Record_Multi.encode(message).finish(); - }, - toProtoMsg(message: Record_Multi): Record_MultiProtoMsg { - return { - typeUrl: "/cosmos.crypto.keyring.v1.Multi", - value: Record_Multi.encode(message).finish() - }; - } -}; -function createBaseRecord_Offline(): Record_Offline { - return {}; -} -export const Record_Offline = { - typeUrl: "/cosmos.crypto.keyring.v1.Offline", - aminoType: "cosmos-sdk/Offline", - encode(_: Record_Offline, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Record_Offline { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRecord_Offline(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): Record_Offline { - return {}; - }, - toJSON(_: Record_Offline): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): Record_Offline { - const message = createBaseRecord_Offline(); - return message; - }, - fromSDK(_: Record_OfflineSDKType): Record_Offline { - return {}; - }, - toSDK(_: Record_Offline): Record_OfflineSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: Record_OfflineAmino): Record_Offline { - return {}; - }, - toAmino(_: Record_Offline): Record_OfflineAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: Record_OfflineAminoMsg): Record_Offline { - return Record_Offline.fromAmino(object.value); - }, - toAminoMsg(message: Record_Offline): Record_OfflineAminoMsg { - return { - type: "cosmos-sdk/Offline", - value: Record_Offline.toAmino(message) - }; - }, - fromProtoMsg(message: Record_OfflineProtoMsg): Record_Offline { - return Record_Offline.decode(message.value); - }, - toProto(message: Record_Offline): Uint8Array { - return Record_Offline.encode(message).finish(); - }, - toProtoMsg(message: Record_Offline): Record_OfflineProtoMsg { - return { - typeUrl: "/cosmos.crypto.keyring.v1.Offline", - value: Record_Offline.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/multisig/keys.ts b/examples/interchainjs/src/codegen/cosmos/crypto/multisig/keys.ts deleted file mode 100644 index f71973d9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/multisig/keys.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * LegacyAminoPubKey specifies a public key type - * which nests multiple public keys and a threshold, - * it uses legacy amino address rules. - */ -export interface LegacyAminoPubKey { - threshold: number; - publicKeys: Any[]; -} -export interface LegacyAminoPubKeyProtoMsg { - typeUrl: "/cosmos.crypto.multisig.LegacyAminoPubKey"; - value: Uint8Array; -} -/** - * LegacyAminoPubKey specifies a public key type - * which nests multiple public keys and a threshold, - * it uses legacy amino address rules. - */ -export interface LegacyAminoPubKeyAmino { - threshold: number; - public_keys: AnyAmino[]; -} -export interface LegacyAminoPubKeyAminoMsg { - type: "cosmos-sdk/LegacyAminoPubKey"; - value: LegacyAminoPubKeyAmino; -} -/** - * LegacyAminoPubKey specifies a public key type - * which nests multiple public keys and a threshold, - * it uses legacy amino address rules. - */ -export interface LegacyAminoPubKeySDKType { - threshold: number; - public_keys: AnySDKType[]; -} -function createBaseLegacyAminoPubKey(): LegacyAminoPubKey { - return { - threshold: 0, - publicKeys: [] - }; -} -export const LegacyAminoPubKey = { - typeUrl: "/cosmos.crypto.multisig.LegacyAminoPubKey", - aminoType: "cosmos-sdk/LegacyAminoPubKey", - encode(message: LegacyAminoPubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.threshold !== 0) { - writer.uint32(8).uint32(message.threshold); - } - for (const v of message.publicKeys) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LegacyAminoPubKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLegacyAminoPubKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threshold = reader.uint32(); - break; - case 2: - message.publicKeys.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LegacyAminoPubKey { - return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - publicKeys: Array.isArray(object?.publicKeys) ? object.publicKeys.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: LegacyAminoPubKey): unknown { - const obj: any = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - if (message.publicKeys) { - obj.publicKeys = message.publicKeys.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.publicKeys = []; - } - return obj; - }, - fromPartial(object: DeepPartial): LegacyAminoPubKey { - const message = createBaseLegacyAminoPubKey(); - message.threshold = object.threshold ?? 0; - message.publicKeys = object.publicKeys?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: LegacyAminoPubKeySDKType): LegacyAminoPubKey { - return { - threshold: object?.threshold, - publicKeys: Array.isArray(object?.public_keys) ? object.public_keys.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: LegacyAminoPubKey): LegacyAminoPubKeySDKType { - const obj: any = {}; - obj.threshold = message.threshold; - if (message.publicKeys) { - obj.public_keys = message.publicKeys.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.public_keys = []; - } - return obj; - }, - fromAmino(object: LegacyAminoPubKeyAmino): LegacyAminoPubKey { - return { - threshold: object.threshold, - publicKeys: Array.isArray(object?.public_keys) ? object.public_keys.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: LegacyAminoPubKey): LegacyAminoPubKeyAmino { - const obj: any = {}; - obj.threshold = message.threshold; - if (message.publicKeys) { - obj.public_keys = message.publicKeys.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.public_keys = []; - } - return obj; - }, - fromAminoMsg(object: LegacyAminoPubKeyAminoMsg): LegacyAminoPubKey { - return LegacyAminoPubKey.fromAmino(object.value); - }, - toAminoMsg(message: LegacyAminoPubKey): LegacyAminoPubKeyAminoMsg { - return { - type: "cosmos-sdk/LegacyAminoPubKey", - value: LegacyAminoPubKey.toAmino(message) - }; - }, - fromProtoMsg(message: LegacyAminoPubKeyProtoMsg): LegacyAminoPubKey { - return LegacyAminoPubKey.decode(message.value); - }, - toProto(message: LegacyAminoPubKey): Uint8Array { - return LegacyAminoPubKey.encode(message).finish(); - }, - toProtoMsg(message: LegacyAminoPubKey): LegacyAminoPubKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.multisig.LegacyAminoPubKey", - value: LegacyAminoPubKey.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts b/examples/interchainjs/src/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts deleted file mode 100644 index bce69288..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { bytesFromBase64, base64FromBytes, DeepPartial, isSet } from "../../../../helpers"; -/** - * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. - * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers - * signed and with which modes. - */ -export interface MultiSignature { - signatures: Uint8Array[]; -} -export interface MultiSignatureProtoMsg { - typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature"; - value: Uint8Array; -} -/** - * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. - * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers - * signed and with which modes. - */ -export interface MultiSignatureAmino { - signatures: Uint8Array[]; -} -export interface MultiSignatureAminoMsg { - type: "cosmos-sdk/MultiSignature"; - value: MultiSignatureAmino; -} -/** - * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. - * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers - * signed and with which modes. - */ -export interface MultiSignatureSDKType { - signatures: Uint8Array[]; -} -/** - * CompactBitArray is an implementation of a space efficient bit array. - * This is used to ensure that the encoded data takes up a minimal amount of - * space after proto encoding. - * This is not thread safe, and is not intended for concurrent usage. - */ -export interface CompactBitArray { - extraBitsStored: number; - elems: Uint8Array; -} -export interface CompactBitArrayProtoMsg { - typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray"; - value: Uint8Array; -} -/** - * CompactBitArray is an implementation of a space efficient bit array. - * This is used to ensure that the encoded data takes up a minimal amount of - * space after proto encoding. - * This is not thread safe, and is not intended for concurrent usage. - */ -export interface CompactBitArrayAmino { - extra_bits_stored: number; - elems: Uint8Array; -} -export interface CompactBitArrayAminoMsg { - type: "cosmos-sdk/CompactBitArray"; - value: CompactBitArrayAmino; -} -/** - * CompactBitArray is an implementation of a space efficient bit array. - * This is used to ensure that the encoded data takes up a minimal amount of - * space after proto encoding. - * This is not thread safe, and is not intended for concurrent usage. - */ -export interface CompactBitArraySDKType { - extra_bits_stored: number; - elems: Uint8Array; -} -function createBaseMultiSignature(): MultiSignature { - return { - signatures: [] - }; -} -export const MultiSignature = { - typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", - aminoType: "cosmos-sdk/MultiSignature", - encode(message: MultiSignature, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.signatures) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MultiSignature { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMultiSignature(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MultiSignature { - return { - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: MultiSignature): unknown { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MultiSignature { - const message = createBaseMultiSignature(); - message.signatures = object.signatures?.map(e => e) || []; - return message; - }, - fromSDK(object: MultiSignatureSDKType): MultiSignature { - return { - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => e) : [] - }; - }, - toSDK(message: MultiSignature): MultiSignatureSDKType { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e); - } else { - obj.signatures = []; - } - return obj; - }, - fromAmino(object: MultiSignatureAmino): MultiSignature { - return { - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => e) : [] - }; - }, - toAmino(message: MultiSignature): MultiSignatureAmino { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e); - } else { - obj.signatures = []; - } - return obj; - }, - fromAminoMsg(object: MultiSignatureAminoMsg): MultiSignature { - return MultiSignature.fromAmino(object.value); - }, - toAminoMsg(message: MultiSignature): MultiSignatureAminoMsg { - return { - type: "cosmos-sdk/MultiSignature", - value: MultiSignature.toAmino(message) - }; - }, - fromProtoMsg(message: MultiSignatureProtoMsg): MultiSignature { - return MultiSignature.decode(message.value); - }, - toProto(message: MultiSignature): Uint8Array { - return MultiSignature.encode(message).finish(); - }, - toProtoMsg(message: MultiSignature): MultiSignatureProtoMsg { - return { - typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature", - value: MultiSignature.encode(message).finish() - }; - } -}; -function createBaseCompactBitArray(): CompactBitArray { - return { - extraBitsStored: 0, - elems: new Uint8Array() - }; -} -export const CompactBitArray = { - typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", - aminoType: "cosmos-sdk/CompactBitArray", - encode(message: CompactBitArray, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.extraBitsStored !== 0) { - writer.uint32(8).uint32(message.extraBitsStored); - } - if (message.elems.length !== 0) { - writer.uint32(18).bytes(message.elems); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CompactBitArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCompactBitArray(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.extraBitsStored = reader.uint32(); - break; - case 2: - message.elems = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CompactBitArray { - return { - extraBitsStored: isSet(object.extraBitsStored) ? Number(object.extraBitsStored) : 0, - elems: isSet(object.elems) ? bytesFromBase64(object.elems) : new Uint8Array() - }; - }, - toJSON(message: CompactBitArray): unknown { - const obj: any = {}; - message.extraBitsStored !== undefined && (obj.extraBitsStored = Math.round(message.extraBitsStored)); - message.elems !== undefined && (obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): CompactBitArray { - const message = createBaseCompactBitArray(); - message.extraBitsStored = object.extraBitsStored ?? 0; - message.elems = object.elems ?? new Uint8Array(); - return message; - }, - fromSDK(object: CompactBitArraySDKType): CompactBitArray { - return { - extraBitsStored: object?.extra_bits_stored, - elems: object?.elems - }; - }, - toSDK(message: CompactBitArray): CompactBitArraySDKType { - const obj: any = {}; - obj.extra_bits_stored = message.extraBitsStored; - obj.elems = message.elems; - return obj; - }, - fromAmino(object: CompactBitArrayAmino): CompactBitArray { - return { - extraBitsStored: object.extra_bits_stored, - elems: object.elems - }; - }, - toAmino(message: CompactBitArray): CompactBitArrayAmino { - const obj: any = {}; - obj.extra_bits_stored = message.extraBitsStored; - obj.elems = message.elems; - return obj; - }, - fromAminoMsg(object: CompactBitArrayAminoMsg): CompactBitArray { - return CompactBitArray.fromAmino(object.value); - }, - toAminoMsg(message: CompactBitArray): CompactBitArrayAminoMsg { - return { - type: "cosmos-sdk/CompactBitArray", - value: CompactBitArray.toAmino(message) - }; - }, - fromProtoMsg(message: CompactBitArrayProtoMsg): CompactBitArray { - return CompactBitArray.decode(message.value); - }, - toProto(message: CompactBitArray): Uint8Array { - return CompactBitArray.encode(message).finish(); - }, - toProtoMsg(message: CompactBitArray): CompactBitArrayProtoMsg { - return { - typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray", - value: CompactBitArray.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/secp256k1/keys.ts b/examples/interchainjs/src/codegen/cosmos/crypto/secp256k1/keys.ts deleted file mode 100644 index 8af8760f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/secp256k1/keys.ts +++ /dev/null @@ -1,236 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** - * PubKey defines a secp256k1 public key - * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte - * if the y-coordinate is the lexicographically largest of the two associated with - * the x-coordinate. Otherwise the first byte is a 0x03. - * This prefix is followed with the x-coordinate. - */ -export interface PubKey { - key: Uint8Array; -} -export interface PubKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256k1.PubKey"; - value: Uint8Array; -} -/** - * PubKey defines a secp256k1 public key - * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte - * if the y-coordinate is the lexicographically largest of the two associated with - * the x-coordinate. Otherwise the first byte is a 0x03. - * This prefix is followed with the x-coordinate. - */ -export interface PubKeyAmino { - key: Uint8Array; -} -export interface PubKeyAminoMsg { - type: "cosmos-sdk/PubKey"; - value: PubKeyAmino; -} -/** - * PubKey defines a secp256k1 public key - * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte - * if the y-coordinate is the lexicographically largest of the two associated with - * the x-coordinate. Otherwise the first byte is a 0x03. - * This prefix is followed with the x-coordinate. - */ -export interface PubKeySDKType { - key: Uint8Array; -} -/** PrivKey defines a secp256k1 private key. */ -export interface PrivKey { - key: Uint8Array; -} -export interface PrivKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey"; - value: Uint8Array; -} -/** PrivKey defines a secp256k1 private key. */ -export interface PrivKeyAmino { - key: Uint8Array; -} -export interface PrivKeyAminoMsg { - type: "cosmos-sdk/PrivKey"; - value: PrivKeyAmino; -} -/** PrivKey defines a secp256k1 private key. */ -export interface PrivKeySDKType { - key: Uint8Array; -} -function createBasePubKey(): PubKey { - return { - key: new Uint8Array() - }; -} -export const PubKey = { - typeUrl: "/cosmos.crypto.secp256k1.PubKey", - aminoType: "cosmos-sdk/PubKey", - encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PubKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePubKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PubKey { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() - }; - }, - toJSON(message: PubKey): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PubKey { - const message = createBasePubKey(); - message.key = object.key ?? new Uint8Array(); - return message; - }, - fromSDK(object: PubKeySDKType): PubKey { - return { - key: object?.key - }; - }, - toSDK(message: PubKey): PubKeySDKType { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAmino(object: PubKeyAmino): PubKey { - return { - key: object.key - }; - }, - toAmino(message: PubKey): PubKeyAmino { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAminoMsg(object: PubKeyAminoMsg): PubKey { - return PubKey.fromAmino(object.value); - }, - toAminoMsg(message: PubKey): PubKeyAminoMsg { - return { - type: "cosmos-sdk/PubKey", - value: PubKey.toAmino(message) - }; - }, - fromProtoMsg(message: PubKeyProtoMsg): PubKey { - return PubKey.decode(message.value); - }, - toProto(message: PubKey): Uint8Array { - return PubKey.encode(message).finish(); - }, - toProtoMsg(message: PubKey): PubKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.secp256k1.PubKey", - value: PubKey.encode(message).finish() - }; - } -}; -function createBasePrivKey(): PrivKey { - return { - key: new Uint8Array() - }; -} -export const PrivKey = { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey", - aminoType: "cosmos-sdk/PrivKey", - encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PrivKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePrivKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PrivKey { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() - }; - }, - toJSON(message: PrivKey): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PrivKey { - const message = createBasePrivKey(); - message.key = object.key ?? new Uint8Array(); - return message; - }, - fromSDK(object: PrivKeySDKType): PrivKey { - return { - key: object?.key - }; - }, - toSDK(message: PrivKey): PrivKeySDKType { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAmino(object: PrivKeyAmino): PrivKey { - return { - key: object.key - }; - }, - toAmino(message: PrivKey): PrivKeyAmino { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAminoMsg(object: PrivKeyAminoMsg): PrivKey { - return PrivKey.fromAmino(object.value); - }, - toAminoMsg(message: PrivKey): PrivKeyAminoMsg { - return { - type: "cosmos-sdk/PrivKey", - value: PrivKey.toAmino(message) - }; - }, - fromProtoMsg(message: PrivKeyProtoMsg): PrivKey { - return PrivKey.decode(message.value); - }, - toProto(message: PrivKey): Uint8Array { - return PrivKey.encode(message).finish(); - }, - toProtoMsg(message: PrivKey): PrivKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.secp256k1.PrivKey", - value: PrivKey.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/crypto/secp256r1/keys.ts b/examples/interchainjs/src/codegen/cosmos/crypto/secp256r1/keys.ts deleted file mode 100644 index 6028bcaf..00000000 --- a/examples/interchainjs/src/codegen/cosmos/crypto/secp256r1/keys.ts +++ /dev/null @@ -1,228 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** PubKey defines a secp256r1 ECDSA public key. */ -export interface PubKey { - /** - * Point on secp256r1 curve in a compressed representation as specified in section - * 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - */ - key: Uint8Array; -} -export interface PubKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256r1.PubKey"; - value: Uint8Array; -} -/** PubKey defines a secp256r1 ECDSA public key. */ -export interface PubKeyAmino { - /** - * Point on secp256r1 curve in a compressed representation as specified in section - * 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - */ - key: Uint8Array; -} -export interface PubKeyAminoMsg { - type: "cosmos-sdk/PubKey"; - value: PubKeyAmino; -} -/** PubKey defines a secp256r1 ECDSA public key. */ -export interface PubKeySDKType { - key: Uint8Array; -} -/** PrivKey defines a secp256r1 ECDSA private key. */ -export interface PrivKey { - /** secret number serialized using big-endian encoding */ - secret: Uint8Array; -} -export interface PrivKeyProtoMsg { - typeUrl: "/cosmos.crypto.secp256r1.PrivKey"; - value: Uint8Array; -} -/** PrivKey defines a secp256r1 ECDSA private key. */ -export interface PrivKeyAmino { - /** secret number serialized using big-endian encoding */ - secret: Uint8Array; -} -export interface PrivKeyAminoMsg { - type: "cosmos-sdk/PrivKey"; - value: PrivKeyAmino; -} -/** PrivKey defines a secp256r1 ECDSA private key. */ -export interface PrivKeySDKType { - secret: Uint8Array; -} -function createBasePubKey(): PubKey { - return { - key: new Uint8Array() - }; -} -export const PubKey = { - typeUrl: "/cosmos.crypto.secp256r1.PubKey", - aminoType: "cosmos-sdk/PubKey", - encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PubKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePubKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PubKey { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() - }; - }, - toJSON(message: PubKey): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PubKey { - const message = createBasePubKey(); - message.key = object.key ?? new Uint8Array(); - return message; - }, - fromSDK(object: PubKeySDKType): PubKey { - return { - key: object?.key - }; - }, - toSDK(message: PubKey): PubKeySDKType { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAmino(object: PubKeyAmino): PubKey { - return { - key: object.key - }; - }, - toAmino(message: PubKey): PubKeyAmino { - const obj: any = {}; - obj.key = message.key; - return obj; - }, - fromAminoMsg(object: PubKeyAminoMsg): PubKey { - return PubKey.fromAmino(object.value); - }, - toAminoMsg(message: PubKey): PubKeyAminoMsg { - return { - type: "cosmos-sdk/PubKey", - value: PubKey.toAmino(message) - }; - }, - fromProtoMsg(message: PubKeyProtoMsg): PubKey { - return PubKey.decode(message.value); - }, - toProto(message: PubKey): Uint8Array { - return PubKey.encode(message).finish(); - }, - toProtoMsg(message: PubKey): PubKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.secp256r1.PubKey", - value: PubKey.encode(message).finish() - }; - } -}; -function createBasePrivKey(): PrivKey { - return { - secret: new Uint8Array() - }; -} -export const PrivKey = { - typeUrl: "/cosmos.crypto.secp256r1.PrivKey", - aminoType: "cosmos-sdk/PrivKey", - encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.secret.length !== 0) { - writer.uint32(10).bytes(message.secret); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PrivKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePrivKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.secret = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PrivKey { - return { - secret: isSet(object.secret) ? bytesFromBase64(object.secret) : new Uint8Array() - }; - }, - toJSON(message: PrivKey): unknown { - const obj: any = {}; - message.secret !== undefined && (obj.secret = base64FromBytes(message.secret !== undefined ? message.secret : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PrivKey { - const message = createBasePrivKey(); - message.secret = object.secret ?? new Uint8Array(); - return message; - }, - fromSDK(object: PrivKeySDKType): PrivKey { - return { - secret: object?.secret - }; - }, - toSDK(message: PrivKey): PrivKeySDKType { - const obj: any = {}; - obj.secret = message.secret; - return obj; - }, - fromAmino(object: PrivKeyAmino): PrivKey { - return { - secret: object.secret - }; - }, - toAmino(message: PrivKey): PrivKeyAmino { - const obj: any = {}; - obj.secret = message.secret; - return obj; - }, - fromAminoMsg(object: PrivKeyAminoMsg): PrivKey { - return PrivKey.fromAmino(object.value); - }, - toAminoMsg(message: PrivKey): PrivKeyAminoMsg { - return { - type: "cosmos-sdk/PrivKey", - value: PrivKey.toAmino(message) - }; - }, - fromProtoMsg(message: PrivKeyProtoMsg): PrivKey { - return PrivKey.decode(message.value); - }, - toProto(message: PrivKey): Uint8Array { - return PrivKey.encode(message).finish(); - }, - toProtoMsg(message: PrivKey): PrivKeyProtoMsg { - return { - typeUrl: "/cosmos.crypto.secp256r1.PrivKey", - value: PrivKey.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/distribution.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/distribution.ts deleted file mode 100644 index 7c829453..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/distribution.ts +++ /dev/null @@ -1,1803 +0,0 @@ -import { DecCoin, DecCoinAmino, DecCoinSDKType, Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { Decimal } from "@cosmjs/math"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Params defines the set of params for the distribution module. */ -export interface Params { - communityTax: string; - baseProposerReward: string; - bonusProposerReward: string; - withdrawAddrEnabled: boolean; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the set of params for the distribution module. */ -export interface ParamsAmino { - community_tax: string; - base_proposer_reward: string; - bonus_proposer_reward: string; - withdraw_addr_enabled: boolean; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params defines the set of params for the distribution module. */ -export interface ParamsSDKType { - community_tax: string; - base_proposer_reward: string; - bonus_proposer_reward: string; - withdraw_addr_enabled: boolean; -} -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewards { - cumulativeRewardRatio: DecCoin[]; - referenceCount: number; -} -export interface ValidatorHistoricalRewardsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards"; - value: Uint8Array; -} -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewardsAmino { - cumulative_reward_ratio: DecCoinAmino[]; - reference_count: number; -} -export interface ValidatorHistoricalRewardsAminoMsg { - type: "cosmos-sdk/ValidatorHistoricalRewards"; - value: ValidatorHistoricalRewardsAmino; -} -/** - * ValidatorHistoricalRewards represents historical rewards for a validator. - * Height is implicit within the store key. - * Cumulative reward ratio is the sum from the zeroeth period - * until this period of rewards / tokens, per the spec. - * The reference count indicates the number of objects - * which might need to reference this historical entry at any point. - * ReferenceCount = - * number of outstanding delegations which ended the associated period (and - * might need to read that record) - * + number of slashes which ended the associated period (and might need to - * read that record) - * + one per validator for the zeroeth period, set on initialization - */ -export interface ValidatorHistoricalRewardsSDKType { - cumulative_reward_ratio: DecCoinSDKType[]; - reference_count: number; -} -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewards { - rewards: DecCoin[]; - period: bigint; -} -export interface ValidatorCurrentRewardsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards"; - value: Uint8Array; -} -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewardsAmino { - rewards: DecCoinAmino[]; - period: string; -} -export interface ValidatorCurrentRewardsAminoMsg { - type: "cosmos-sdk/ValidatorCurrentRewards"; - value: ValidatorCurrentRewardsAmino; -} -/** - * ValidatorCurrentRewards represents current rewards and current - * period for a validator kept as a running counter and incremented - * each block as long as the validator's tokens remain constant. - */ -export interface ValidatorCurrentRewardsSDKType { - rewards: DecCoinSDKType[]; - period: bigint; -} -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommission { - commission: DecCoin[]; -} -export interface ValidatorAccumulatedCommissionProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission"; - value: Uint8Array; -} -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommissionAmino { - commission: DecCoinAmino[]; -} -export interface ValidatorAccumulatedCommissionAminoMsg { - type: "cosmos-sdk/ValidatorAccumulatedCommission"; - value: ValidatorAccumulatedCommissionAmino; -} -/** - * ValidatorAccumulatedCommission represents accumulated commission - * for a validator kept as a running counter, can be withdrawn at any time. - */ -export interface ValidatorAccumulatedCommissionSDKType { - commission: DecCoinSDKType[]; -} -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewards { - rewards: DecCoin[]; -} -export interface ValidatorOutstandingRewardsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards"; - value: Uint8Array; -} -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewardsAmino { - rewards: DecCoinAmino[]; -} -export interface ValidatorOutstandingRewardsAminoMsg { - type: "cosmos-sdk/ValidatorOutstandingRewards"; - value: ValidatorOutstandingRewardsAmino; -} -/** - * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - * for a validator inexpensive to track, allows simple sanity checks. - */ -export interface ValidatorOutstandingRewardsSDKType { - rewards: DecCoinSDKType[]; -} -/** - * ValidatorSlashEvent represents a validator slash event. - * Height is implicit within the store key. - * This is needed to calculate appropriate amount of staking tokens - * for delegations which are withdrawn after a slash has occurred. - */ -export interface ValidatorSlashEvent { - validatorPeriod: bigint; - fraction: string; -} -export interface ValidatorSlashEventProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent"; - value: Uint8Array; -} -/** - * ValidatorSlashEvent represents a validator slash event. - * Height is implicit within the store key. - * This is needed to calculate appropriate amount of staking tokens - * for delegations which are withdrawn after a slash has occurred. - */ -export interface ValidatorSlashEventAmino { - validator_period: string; - fraction: string; -} -export interface ValidatorSlashEventAminoMsg { - type: "cosmos-sdk/ValidatorSlashEvent"; - value: ValidatorSlashEventAmino; -} -/** - * ValidatorSlashEvent represents a validator slash event. - * Height is implicit within the store key. - * This is needed to calculate appropriate amount of staking tokens - * for delegations which are withdrawn after a slash has occurred. - */ -export interface ValidatorSlashEventSDKType { - validator_period: bigint; - fraction: string; -} -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEvents { - validatorSlashEvents: ValidatorSlashEvent[]; -} -export interface ValidatorSlashEventsProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents"; - value: Uint8Array; -} -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEventsAmino { - validator_slash_events: ValidatorSlashEventAmino[]; -} -export interface ValidatorSlashEventsAminoMsg { - type: "cosmos-sdk/ValidatorSlashEvents"; - value: ValidatorSlashEventsAmino; -} -/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */ -export interface ValidatorSlashEventsSDKType { - validator_slash_events: ValidatorSlashEventSDKType[]; -} -/** FeePool is the global fee pool for distribution. */ -export interface FeePool { - communityPool: DecCoin[]; -} -export interface FeePoolProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.FeePool"; - value: Uint8Array; -} -/** FeePool is the global fee pool for distribution. */ -export interface FeePoolAmino { - community_pool: DecCoinAmino[]; -} -export interface FeePoolAminoMsg { - type: "cosmos-sdk/FeePool"; - value: FeePoolAmino; -} -/** FeePool is the global fee pool for distribution. */ -export interface FeePoolSDKType { - community_pool: DecCoinSDKType[]; -} -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposal { - title: string; - description: string; - recipient: string; - amount: Coin[]; -} -export interface CommunityPoolSpendProposalProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal"; - value: Uint8Array; -} -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposalAmino { - title: string; - description: string; - recipient: string; - amount: CoinAmino[]; -} -export interface CommunityPoolSpendProposalAminoMsg { - type: "cosmos-sdk/CommunityPoolSpendProposal"; - value: CommunityPoolSpendProposalAmino; -} -/** - * CommunityPoolSpendProposal details a proposal for use of community funds, - * together with how many coins are proposed to be spent, and to which - * recipient account. - */ -export interface CommunityPoolSpendProposalSDKType { - title: string; - description: string; - recipient: string; - amount: CoinSDKType[]; -} -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfo { - previousPeriod: bigint; - stake: string; - height: bigint; -} -export interface DelegatorStartingInfoProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo"; - value: Uint8Array; -} -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfoAmino { - previous_period: string; - stake: string; - height: string; -} -export interface DelegatorStartingInfoAminoMsg { - type: "cosmos-sdk/DelegatorStartingInfo"; - value: DelegatorStartingInfoAmino; -} -/** - * DelegatorStartingInfo represents the starting info for a delegator reward - * period. It tracks the previous validator period, the delegation's amount of - * staking token, and the creation height (to check later on if any slashes have - * occurred). NOTE: Even though validators are slashed to whole staking tokens, - * the delegators within the validator may be left with less than a full token, - * thus sdk.Dec is used. - */ -export interface DelegatorStartingInfoSDKType { - previous_period: bigint; - stake: string; - height: bigint; -} -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorReward { - validatorAddress: string; - reward: DecCoin[]; -} -export interface DelegationDelegatorRewardProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward"; - value: Uint8Array; -} -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorRewardAmino { - validator_address: string; - reward: DecCoinAmino[]; -} -export interface DelegationDelegatorRewardAminoMsg { - type: "cosmos-sdk/DelegationDelegatorReward"; - value: DelegationDelegatorRewardAmino; -} -/** - * DelegationDelegatorReward represents the properties - * of a delegator's delegation reward. - */ -export interface DelegationDelegatorRewardSDKType { - validator_address: string; - reward: DecCoinSDKType[]; -} -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDeposit { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} -export interface CommunityPoolSpendProposalWithDepositProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit"; - value: Uint8Array; -} -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDepositAmino { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} -export interface CommunityPoolSpendProposalWithDepositAminoMsg { - type: "cosmos-sdk/CommunityPoolSpendProposalWithDeposit"; - value: CommunityPoolSpendProposalWithDepositAmino; -} -/** - * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal - * with a deposit - */ -export interface CommunityPoolSpendProposalWithDepositSDKType { - title: string; - description: string; - recipient: string; - amount: string; - deposit: string; -} -function createBaseParams(): Params { - return { - communityTax: "", - baseProposerReward: "", - bonusProposerReward: "", - withdrawAddrEnabled: false - }; -} -export const Params = { - typeUrl: "/cosmos.distribution.v1beta1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.communityTax !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.communityTax, 18).atomics); - } - if (message.baseProposerReward !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.baseProposerReward, 18).atomics); - } - if (message.bonusProposerReward !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.bonusProposerReward, 18).atomics); - } - if (message.withdrawAddrEnabled === true) { - writer.uint32(32).bool(message.withdrawAddrEnabled); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityTax = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 2: - message.baseProposerReward = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.bonusProposerReward = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 4: - message.withdrawAddrEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - communityTax: isSet(object.communityTax) ? String(object.communityTax) : "", - baseProposerReward: isSet(object.baseProposerReward) ? String(object.baseProposerReward) : "", - bonusProposerReward: isSet(object.bonusProposerReward) ? String(object.bonusProposerReward) : "", - withdrawAddrEnabled: isSet(object.withdrawAddrEnabled) ? Boolean(object.withdrawAddrEnabled) : false - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.communityTax !== undefined && (obj.communityTax = message.communityTax); - message.baseProposerReward !== undefined && (obj.baseProposerReward = message.baseProposerReward); - message.bonusProposerReward !== undefined && (obj.bonusProposerReward = message.bonusProposerReward); - message.withdrawAddrEnabled !== undefined && (obj.withdrawAddrEnabled = message.withdrawAddrEnabled); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.communityTax = object.communityTax ?? ""; - message.baseProposerReward = object.baseProposerReward ?? ""; - message.bonusProposerReward = object.bonusProposerReward ?? ""; - message.withdrawAddrEnabled = object.withdrawAddrEnabled ?? false; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - communityTax: object?.community_tax, - baseProposerReward: object?.base_proposer_reward, - bonusProposerReward: object?.bonus_proposer_reward, - withdrawAddrEnabled: object?.withdraw_addr_enabled - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.community_tax = message.communityTax; - obj.base_proposer_reward = message.baseProposerReward; - obj.bonus_proposer_reward = message.bonusProposerReward; - obj.withdraw_addr_enabled = message.withdrawAddrEnabled; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - communityTax: object.community_tax, - baseProposerReward: object.base_proposer_reward, - bonusProposerReward: object.bonus_proposer_reward, - withdrawAddrEnabled: object.withdraw_addr_enabled - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.community_tax = message.communityTax; - obj.base_proposer_reward = message.baseProposerReward; - obj.bonus_proposer_reward = message.bonusProposerReward; - obj.withdraw_addr_enabled = message.withdrawAddrEnabled; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { - return { - cumulativeRewardRatio: [], - referenceCount: 0 - }; -} -export const ValidatorHistoricalRewards = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", - aminoType: "cosmos-sdk/ValidatorHistoricalRewards", - encode(message: ValidatorHistoricalRewards, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.cumulativeRewardRatio) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.referenceCount !== 0) { - writer.uint32(16).uint32(message.referenceCount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorHistoricalRewards { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorHistoricalRewards(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cumulativeRewardRatio.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.referenceCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorHistoricalRewards { - return { - cumulativeRewardRatio: Array.isArray(object?.cumulativeRewardRatio) ? object.cumulativeRewardRatio.map((e: any) => DecCoin.fromJSON(e)) : [], - referenceCount: isSet(object.referenceCount) ? Number(object.referenceCount) : 0 - }; - }, - toJSON(message: ValidatorHistoricalRewards): unknown { - const obj: any = {}; - if (message.cumulativeRewardRatio) { - obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.cumulativeRewardRatio = []; - } - message.referenceCount !== undefined && (obj.referenceCount = Math.round(message.referenceCount)); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorHistoricalRewards { - const message = createBaseValidatorHistoricalRewards(); - message.cumulativeRewardRatio = object.cumulativeRewardRatio?.map(e => DecCoin.fromPartial(e)) || []; - message.referenceCount = object.referenceCount ?? 0; - return message; - }, - fromSDK(object: ValidatorHistoricalRewardsSDKType): ValidatorHistoricalRewards { - return { - cumulativeRewardRatio: Array.isArray(object?.cumulative_reward_ratio) ? object.cumulative_reward_ratio.map((e: any) => DecCoin.fromSDK(e)) : [], - referenceCount: object?.reference_count - }; - }, - toSDK(message: ValidatorHistoricalRewards): ValidatorHistoricalRewardsSDKType { - const obj: any = {}; - if (message.cumulativeRewardRatio) { - obj.cumulative_reward_ratio = message.cumulativeRewardRatio.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.cumulative_reward_ratio = []; - } - obj.reference_count = message.referenceCount; - return obj; - }, - fromAmino(object: ValidatorHistoricalRewardsAmino): ValidatorHistoricalRewards { - return { - cumulativeRewardRatio: Array.isArray(object?.cumulative_reward_ratio) ? object.cumulative_reward_ratio.map((e: any) => DecCoin.fromAmino(e)) : [], - referenceCount: object.reference_count - }; - }, - toAmino(message: ValidatorHistoricalRewards): ValidatorHistoricalRewardsAmino { - const obj: any = {}; - if (message.cumulativeRewardRatio) { - obj.cumulative_reward_ratio = message.cumulativeRewardRatio.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.cumulative_reward_ratio = []; - } - obj.reference_count = message.referenceCount; - return obj; - }, - fromAminoMsg(object: ValidatorHistoricalRewardsAminoMsg): ValidatorHistoricalRewards { - return ValidatorHistoricalRewards.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorHistoricalRewards): ValidatorHistoricalRewardsAminoMsg { - return { - type: "cosmos-sdk/ValidatorHistoricalRewards", - value: ValidatorHistoricalRewards.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorHistoricalRewardsProtoMsg): ValidatorHistoricalRewards { - return ValidatorHistoricalRewards.decode(message.value); - }, - toProto(message: ValidatorHistoricalRewards): Uint8Array { - return ValidatorHistoricalRewards.encode(message).finish(); - }, - toProtoMsg(message: ValidatorHistoricalRewards): ValidatorHistoricalRewardsProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards", - value: ValidatorHistoricalRewards.encode(message).finish() - }; - } -}; -function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { - return { - rewards: [], - period: BigInt(0) - }; -} -export const ValidatorCurrentRewards = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", - aminoType: "cosmos-sdk/ValidatorCurrentRewards", - encode(message: ValidatorCurrentRewards, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== BigInt(0)) { - writer.uint32(16).uint64(message.period); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorCurrentRewards { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorCurrentRewards(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - case 2: - message.period = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorCurrentRewards { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [], - period: isSet(object.period) ? BigInt(object.period.toString()) : BigInt(0) - }; - }, - toJSON(message: ValidatorCurrentRewards): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.rewards = []; - } - message.period !== undefined && (obj.period = (message.period || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorCurrentRewards { - const message = createBaseValidatorCurrentRewards(); - message.rewards = object.rewards?.map(e => DecCoin.fromPartial(e)) || []; - message.period = object.period !== undefined && object.period !== null ? BigInt(object.period.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorCurrentRewardsSDKType): ValidatorCurrentRewards { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromSDK(e)) : [], - period: object?.period - }; - }, - toSDK(message: ValidatorCurrentRewards): ValidatorCurrentRewardsSDKType { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.rewards = []; - } - obj.period = message.period; - return obj; - }, - fromAmino(object: ValidatorCurrentRewardsAmino): ValidatorCurrentRewards { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromAmino(e)) : [], - period: BigInt(object.period) - }; - }, - toAmino(message: ValidatorCurrentRewards): ValidatorCurrentRewardsAmino { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.rewards = []; - } - obj.period = message.period ? message.period.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorCurrentRewardsAminoMsg): ValidatorCurrentRewards { - return ValidatorCurrentRewards.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorCurrentRewards): ValidatorCurrentRewardsAminoMsg { - return { - type: "cosmos-sdk/ValidatorCurrentRewards", - value: ValidatorCurrentRewards.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorCurrentRewardsProtoMsg): ValidatorCurrentRewards { - return ValidatorCurrentRewards.decode(message.value); - }, - toProto(message: ValidatorCurrentRewards): Uint8Array { - return ValidatorCurrentRewards.encode(message).finish(); - }, - toProtoMsg(message: ValidatorCurrentRewards): ValidatorCurrentRewardsProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewards", - value: ValidatorCurrentRewards.encode(message).finish() - }; - } -}; -function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission { - return { - commission: [] - }; -} -export const ValidatorAccumulatedCommission = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", - aminoType: "cosmos-sdk/ValidatorAccumulatedCommission", - encode(message: ValidatorAccumulatedCommission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.commission) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorAccumulatedCommission { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorAccumulatedCommission(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorAccumulatedCommission { - return { - commission: Array.isArray(object?.commission) ? object.commission.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: ValidatorAccumulatedCommission): unknown { - const obj: any = {}; - if (message.commission) { - obj.commission = message.commission.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.commission = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValidatorAccumulatedCommission { - const message = createBaseValidatorAccumulatedCommission(); - message.commission = object.commission?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ValidatorAccumulatedCommissionSDKType): ValidatorAccumulatedCommission { - return { - commission: Array.isArray(object?.commission) ? object.commission.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: ValidatorAccumulatedCommission): ValidatorAccumulatedCommissionSDKType { - const obj: any = {}; - if (message.commission) { - obj.commission = message.commission.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.commission = []; - } - return obj; - }, - fromAmino(object: ValidatorAccumulatedCommissionAmino): ValidatorAccumulatedCommission { - return { - commission: Array.isArray(object?.commission) ? object.commission.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: ValidatorAccumulatedCommission): ValidatorAccumulatedCommissionAmino { - const obj: any = {}; - if (message.commission) { - obj.commission = message.commission.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.commission = []; - } - return obj; - }, - fromAminoMsg(object: ValidatorAccumulatedCommissionAminoMsg): ValidatorAccumulatedCommission { - return ValidatorAccumulatedCommission.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorAccumulatedCommission): ValidatorAccumulatedCommissionAminoMsg { - return { - type: "cosmos-sdk/ValidatorAccumulatedCommission", - value: ValidatorAccumulatedCommission.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorAccumulatedCommissionProtoMsg): ValidatorAccumulatedCommission { - return ValidatorAccumulatedCommission.decode(message.value); - }, - toProto(message: ValidatorAccumulatedCommission): Uint8Array { - return ValidatorAccumulatedCommission.encode(message).finish(); - }, - toProtoMsg(message: ValidatorAccumulatedCommission): ValidatorAccumulatedCommissionProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", - value: ValidatorAccumulatedCommission.encode(message).finish() - }; - } -}; -function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { - return { - rewards: [] - }; -} -export const ValidatorOutstandingRewards = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", - aminoType: "cosmos-sdk/ValidatorOutstandingRewards", - encode(message: ValidatorOutstandingRewards, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorOutstandingRewards { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorOutstandingRewards(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorOutstandingRewards { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: ValidatorOutstandingRewards): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValidatorOutstandingRewards { - const message = createBaseValidatorOutstandingRewards(); - message.rewards = object.rewards?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ValidatorOutstandingRewardsSDKType): ValidatorOutstandingRewards { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: ValidatorOutstandingRewards): ValidatorOutstandingRewardsSDKType { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromAmino(object: ValidatorOutstandingRewardsAmino): ValidatorOutstandingRewards { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: ValidatorOutstandingRewards): ValidatorOutstandingRewardsAmino { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromAminoMsg(object: ValidatorOutstandingRewardsAminoMsg): ValidatorOutstandingRewards { - return ValidatorOutstandingRewards.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorOutstandingRewards): ValidatorOutstandingRewardsAminoMsg { - return { - type: "cosmos-sdk/ValidatorOutstandingRewards", - value: ValidatorOutstandingRewards.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorOutstandingRewardsProtoMsg): ValidatorOutstandingRewards { - return ValidatorOutstandingRewards.decode(message.value); - }, - toProto(message: ValidatorOutstandingRewards): Uint8Array { - return ValidatorOutstandingRewards.encode(message).finish(); - }, - toProtoMsg(message: ValidatorOutstandingRewards): ValidatorOutstandingRewardsProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards", - value: ValidatorOutstandingRewards.encode(message).finish() - }; - } -}; -function createBaseValidatorSlashEvent(): ValidatorSlashEvent { - return { - validatorPeriod: BigInt(0), - fraction: "" - }; -} -export const ValidatorSlashEvent = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", - aminoType: "cosmos-sdk/ValidatorSlashEvent", - encode(message: ValidatorSlashEvent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorPeriod !== BigInt(0)) { - writer.uint32(8).uint64(message.validatorPeriod); - } - if (message.fraction !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.fraction, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorSlashEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorSlashEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorPeriod = reader.uint64(); - break; - case 2: - message.fraction = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorSlashEvent { - return { - validatorPeriod: isSet(object.validatorPeriod) ? BigInt(object.validatorPeriod.toString()) : BigInt(0), - fraction: isSet(object.fraction) ? String(object.fraction) : "" - }; - }, - toJSON(message: ValidatorSlashEvent): unknown { - const obj: any = {}; - message.validatorPeriod !== undefined && (obj.validatorPeriod = (message.validatorPeriod || BigInt(0)).toString()); - message.fraction !== undefined && (obj.fraction = message.fraction); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorSlashEvent { - const message = createBaseValidatorSlashEvent(); - message.validatorPeriod = object.validatorPeriod !== undefined && object.validatorPeriod !== null ? BigInt(object.validatorPeriod.toString()) : BigInt(0); - message.fraction = object.fraction ?? ""; - return message; - }, - fromSDK(object: ValidatorSlashEventSDKType): ValidatorSlashEvent { - return { - validatorPeriod: object?.validator_period, - fraction: object?.fraction - }; - }, - toSDK(message: ValidatorSlashEvent): ValidatorSlashEventSDKType { - const obj: any = {}; - obj.validator_period = message.validatorPeriod; - obj.fraction = message.fraction; - return obj; - }, - fromAmino(object: ValidatorSlashEventAmino): ValidatorSlashEvent { - return { - validatorPeriod: BigInt(object.validator_period), - fraction: object.fraction - }; - }, - toAmino(message: ValidatorSlashEvent): ValidatorSlashEventAmino { - const obj: any = {}; - obj.validator_period = message.validatorPeriod ? message.validatorPeriod.toString() : undefined; - obj.fraction = message.fraction; - return obj; - }, - fromAminoMsg(object: ValidatorSlashEventAminoMsg): ValidatorSlashEvent { - return ValidatorSlashEvent.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorSlashEvent): ValidatorSlashEventAminoMsg { - return { - type: "cosmos-sdk/ValidatorSlashEvent", - value: ValidatorSlashEvent.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorSlashEventProtoMsg): ValidatorSlashEvent { - return ValidatorSlashEvent.decode(message.value); - }, - toProto(message: ValidatorSlashEvent): Uint8Array { - return ValidatorSlashEvent.encode(message).finish(); - }, - toProtoMsg(message: ValidatorSlashEvent): ValidatorSlashEventProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvent", - value: ValidatorSlashEvent.encode(message).finish() - }; - } -}; -function createBaseValidatorSlashEvents(): ValidatorSlashEvents { - return { - validatorSlashEvents: [] - }; -} -export const ValidatorSlashEvents = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", - aminoType: "cosmos-sdk/ValidatorSlashEvents", - encode(message: ValidatorSlashEvents, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validatorSlashEvents) { - ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorSlashEvents { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorSlashEvents(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorSlashEvents.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorSlashEvents { - return { - validatorSlashEvents: Array.isArray(object?.validatorSlashEvents) ? object.validatorSlashEvents.map((e: any) => ValidatorSlashEvent.fromJSON(e)) : [] - }; - }, - toJSON(message: ValidatorSlashEvents): unknown { - const obj: any = {}; - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map(e => e ? ValidatorSlashEvent.toJSON(e) : undefined); - } else { - obj.validatorSlashEvents = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValidatorSlashEvents { - const message = createBaseValidatorSlashEvents(); - message.validatorSlashEvents = object.validatorSlashEvents?.map(e => ValidatorSlashEvent.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ValidatorSlashEventsSDKType): ValidatorSlashEvents { - return { - validatorSlashEvents: Array.isArray(object?.validator_slash_events) ? object.validator_slash_events.map((e: any) => ValidatorSlashEvent.fromSDK(e)) : [] - }; - }, - toSDK(message: ValidatorSlashEvents): ValidatorSlashEventsSDKType { - const obj: any = {}; - if (message.validatorSlashEvents) { - obj.validator_slash_events = message.validatorSlashEvents.map(e => e ? ValidatorSlashEvent.toSDK(e) : undefined); - } else { - obj.validator_slash_events = []; - } - return obj; - }, - fromAmino(object: ValidatorSlashEventsAmino): ValidatorSlashEvents { - return { - validatorSlashEvents: Array.isArray(object?.validator_slash_events) ? object.validator_slash_events.map((e: any) => ValidatorSlashEvent.fromAmino(e)) : [] - }; - }, - toAmino(message: ValidatorSlashEvents): ValidatorSlashEventsAmino { - const obj: any = {}; - if (message.validatorSlashEvents) { - obj.validator_slash_events = message.validatorSlashEvents.map(e => e ? ValidatorSlashEvent.toAmino(e) : undefined); - } else { - obj.validator_slash_events = []; - } - return obj; - }, - fromAminoMsg(object: ValidatorSlashEventsAminoMsg): ValidatorSlashEvents { - return ValidatorSlashEvents.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorSlashEvents): ValidatorSlashEventsAminoMsg { - return { - type: "cosmos-sdk/ValidatorSlashEvents", - value: ValidatorSlashEvents.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorSlashEventsProtoMsg): ValidatorSlashEvents { - return ValidatorSlashEvents.decode(message.value); - }, - toProto(message: ValidatorSlashEvents): Uint8Array { - return ValidatorSlashEvents.encode(message).finish(); - }, - toProtoMsg(message: ValidatorSlashEvents): ValidatorSlashEventsProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEvents", - value: ValidatorSlashEvents.encode(message).finish() - }; - } -}; -function createBaseFeePool(): FeePool { - return { - communityPool: [] - }; -} -export const FeePool = { - typeUrl: "/cosmos.distribution.v1beta1.FeePool", - aminoType: "cosmos-sdk/FeePool", - encode(message: FeePool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.communityPool) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FeePool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeePool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.communityPool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FeePool { - return { - communityPool: Array.isArray(object?.communityPool) ? object.communityPool.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: FeePool): unknown { - const obj: any = {}; - if (message.communityPool) { - obj.communityPool = message.communityPool.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.communityPool = []; - } - return obj; - }, - fromPartial(object: DeepPartial): FeePool { - const message = createBaseFeePool(); - message.communityPool = object.communityPool?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: FeePoolSDKType): FeePool { - return { - communityPool: Array.isArray(object?.community_pool) ? object.community_pool.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: FeePool): FeePoolSDKType { - const obj: any = {}; - if (message.communityPool) { - obj.community_pool = message.communityPool.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.community_pool = []; - } - return obj; - }, - fromAmino(object: FeePoolAmino): FeePool { - return { - communityPool: Array.isArray(object?.community_pool) ? object.community_pool.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: FeePool): FeePoolAmino { - const obj: any = {}; - if (message.communityPool) { - obj.community_pool = message.communityPool.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.community_pool = []; - } - return obj; - }, - fromAminoMsg(object: FeePoolAminoMsg): FeePool { - return FeePool.fromAmino(object.value); - }, - toAminoMsg(message: FeePool): FeePoolAminoMsg { - return { - type: "cosmos-sdk/FeePool", - value: FeePool.toAmino(message) - }; - }, - fromProtoMsg(message: FeePoolProtoMsg): FeePool { - return FeePool.decode(message.value); - }, - toProto(message: FeePool): Uint8Array { - return FeePool.encode(message).finish(); - }, - toProtoMsg(message: FeePool): FeePoolProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.FeePool", - value: FeePool.encode(message).finish() - }; - } -}; -function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { - return { - title: "", - description: "", - recipient: "", - amount: [] - }; -} -export const CommunityPoolSpendProposal = { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", - aminoType: "cosmos-sdk/CommunityPoolSpendProposal", - encode(message: CommunityPoolSpendProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommunityPoolSpendProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommunityPoolSpendProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommunityPoolSpendProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - recipient: isSet(object.recipient) ? String(object.recipient) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: CommunityPoolSpendProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): CommunityPoolSpendProposal { - const message = createBaseCommunityPoolSpendProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.recipient = object.recipient ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: CommunityPoolSpendProposalSDKType): CommunityPoolSpendProposal { - return { - title: object?.title, - description: object?.description, - recipient: object?.recipient, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.recipient = message.recipient; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: CommunityPoolSpendProposalAmino): CommunityPoolSpendProposal { - return { - title: object.title, - description: object.description, - recipient: object.recipient, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.recipient = message.recipient; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: CommunityPoolSpendProposalAminoMsg): CommunityPoolSpendProposal { - return CommunityPoolSpendProposal.fromAmino(object.value); - }, - toAminoMsg(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalAminoMsg { - return { - type: "cosmos-sdk/CommunityPoolSpendProposal", - value: CommunityPoolSpendProposal.toAmino(message) - }; - }, - fromProtoMsg(message: CommunityPoolSpendProposalProtoMsg): CommunityPoolSpendProposal { - return CommunityPoolSpendProposal.decode(message.value); - }, - toProto(message: CommunityPoolSpendProposal): Uint8Array { - return CommunityPoolSpendProposal.encode(message).finish(); - }, - toProtoMsg(message: CommunityPoolSpendProposal): CommunityPoolSpendProposalProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", - value: CommunityPoolSpendProposal.encode(message).finish() - }; - } -}; -function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { - return { - previousPeriod: BigInt(0), - stake: "", - height: BigInt(0) - }; -} -export const DelegatorStartingInfo = { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", - aminoType: "cosmos-sdk/DelegatorStartingInfo", - encode(message: DelegatorStartingInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.previousPeriod !== BigInt(0)) { - writer.uint32(8).uint64(message.previousPeriod); - } - if (message.stake !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.stake, 18).atomics); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).uint64(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelegatorStartingInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegatorStartingInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.previousPeriod = reader.uint64(); - break; - case 2: - message.stake = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DelegatorStartingInfo { - return { - previousPeriod: isSet(object.previousPeriod) ? BigInt(object.previousPeriod.toString()) : BigInt(0), - stake: isSet(object.stake) ? String(object.stake) : "", - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0) - }; - }, - toJSON(message: DelegatorStartingInfo): unknown { - const obj: any = {}; - message.previousPeriod !== undefined && (obj.previousPeriod = (message.previousPeriod || BigInt(0)).toString()); - message.stake !== undefined && (obj.stake = message.stake); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): DelegatorStartingInfo { - const message = createBaseDelegatorStartingInfo(); - message.previousPeriod = object.previousPeriod !== undefined && object.previousPeriod !== null ? BigInt(object.previousPeriod.toString()) : BigInt(0); - message.stake = object.stake ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - return message; - }, - fromSDK(object: DelegatorStartingInfoSDKType): DelegatorStartingInfo { - return { - previousPeriod: object?.previous_period, - stake: object?.stake, - height: object?.height - }; - }, - toSDK(message: DelegatorStartingInfo): DelegatorStartingInfoSDKType { - const obj: any = {}; - obj.previous_period = message.previousPeriod; - obj.stake = message.stake; - obj.height = message.height; - return obj; - }, - fromAmino(object: DelegatorStartingInfoAmino): DelegatorStartingInfo { - return { - previousPeriod: BigInt(object.previous_period), - stake: object.stake, - height: BigInt(object.height) - }; - }, - toAmino(message: DelegatorStartingInfo): DelegatorStartingInfoAmino { - const obj: any = {}; - obj.previous_period = message.previousPeriod ? message.previousPeriod.toString() : undefined; - obj.stake = message.stake; - obj.height = message.height ? message.height.toString() : undefined; - return obj; - }, - fromAminoMsg(object: DelegatorStartingInfoAminoMsg): DelegatorStartingInfo { - return DelegatorStartingInfo.fromAmino(object.value); - }, - toAminoMsg(message: DelegatorStartingInfo): DelegatorStartingInfoAminoMsg { - return { - type: "cosmos-sdk/DelegatorStartingInfo", - value: DelegatorStartingInfo.toAmino(message) - }; - }, - fromProtoMsg(message: DelegatorStartingInfoProtoMsg): DelegatorStartingInfo { - return DelegatorStartingInfo.decode(message.value); - }, - toProto(message: DelegatorStartingInfo): Uint8Array { - return DelegatorStartingInfo.encode(message).finish(); - }, - toProtoMsg(message: DelegatorStartingInfo): DelegatorStartingInfoProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfo", - value: DelegatorStartingInfo.encode(message).finish() - }; - } -}; -function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { - return { - validatorAddress: "", - reward: [] - }; -} -export const DelegationDelegatorReward = { - typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", - aminoType: "cosmos-sdk/DelegationDelegatorReward", - encode(message: DelegationDelegatorReward, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.reward) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelegationDelegatorReward { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegationDelegatorReward(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.reward.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DelegationDelegatorReward { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - reward: Array.isArray(object?.reward) ? object.reward.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: DelegationDelegatorReward): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - if (message.reward) { - obj.reward = message.reward.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.reward = []; - } - return obj; - }, - fromPartial(object: DeepPartial): DelegationDelegatorReward { - const message = createBaseDelegationDelegatorReward(); - message.validatorAddress = object.validatorAddress ?? ""; - message.reward = object.reward?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: DelegationDelegatorRewardSDKType): DelegationDelegatorReward { - return { - validatorAddress: object?.validator_address, - reward: Array.isArray(object?.reward) ? object.reward.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: DelegationDelegatorReward): DelegationDelegatorRewardSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - if (message.reward) { - obj.reward = message.reward.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.reward = []; - } - return obj; - }, - fromAmino(object: DelegationDelegatorRewardAmino): DelegationDelegatorReward { - return { - validatorAddress: object.validator_address, - reward: Array.isArray(object?.reward) ? object.reward.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: DelegationDelegatorReward): DelegationDelegatorRewardAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - if (message.reward) { - obj.reward = message.reward.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.reward = []; - } - return obj; - }, - fromAminoMsg(object: DelegationDelegatorRewardAminoMsg): DelegationDelegatorReward { - return DelegationDelegatorReward.fromAmino(object.value); - }, - toAminoMsg(message: DelegationDelegatorReward): DelegationDelegatorRewardAminoMsg { - return { - type: "cosmos-sdk/DelegationDelegatorReward", - value: DelegationDelegatorReward.toAmino(message) - }; - }, - fromProtoMsg(message: DelegationDelegatorRewardProtoMsg): DelegationDelegatorReward { - return DelegationDelegatorReward.decode(message.value); - }, - toProto(message: DelegationDelegatorReward): Uint8Array { - return DelegationDelegatorReward.encode(message).finish(); - }, - toProtoMsg(message: DelegationDelegatorReward): DelegationDelegatorRewardProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.DelegationDelegatorReward", - value: DelegationDelegatorReward.encode(message).finish() - }; - } -}; -function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { - return { - title: "", - description: "", - recipient: "", - amount: "", - deposit: "" - }; -} -export const CommunityPoolSpendProposalWithDeposit = { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", - aminoType: "cosmos-sdk/CommunityPoolSpendProposalWithDeposit", - encode(message: CommunityPoolSpendProposalWithDeposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.recipient !== "") { - writer.uint32(26).string(message.recipient); - } - if (message.amount !== "") { - writer.uint32(34).string(message.amount); - } - if (message.deposit !== "") { - writer.uint32(42).string(message.deposit); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommunityPoolSpendProposalWithDeposit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommunityPoolSpendProposalWithDeposit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.recipient = reader.string(); - break; - case 4: - message.amount = reader.string(); - break; - case 5: - message.deposit = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommunityPoolSpendProposalWithDeposit { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - recipient: isSet(object.recipient) ? String(object.recipient) : "", - amount: isSet(object.amount) ? String(object.amount) : "", - deposit: isSet(object.deposit) ? String(object.deposit) : "" - }; - }, - toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.recipient !== undefined && (obj.recipient = message.recipient); - message.amount !== undefined && (obj.amount = message.amount); - message.deposit !== undefined && (obj.deposit = message.deposit); - return obj; - }, - fromPartial(object: DeepPartial): CommunityPoolSpendProposalWithDeposit { - const message = createBaseCommunityPoolSpendProposalWithDeposit(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.recipient = object.recipient ?? ""; - message.amount = object.amount ?? ""; - message.deposit = object.deposit ?? ""; - return message; - }, - fromSDK(object: CommunityPoolSpendProposalWithDepositSDKType): CommunityPoolSpendProposalWithDeposit { - return { - title: object?.title, - description: object?.description, - recipient: object?.recipient, - amount: object?.amount, - deposit: object?.deposit - }; - }, - toSDK(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.recipient = message.recipient; - obj.amount = message.amount; - obj.deposit = message.deposit; - return obj; - }, - fromAmino(object: CommunityPoolSpendProposalWithDepositAmino): CommunityPoolSpendProposalWithDeposit { - return { - title: object.title, - description: object.description, - recipient: object.recipient, - amount: object.amount, - deposit: object.deposit - }; - }, - toAmino(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.recipient = message.recipient; - obj.amount = message.amount; - obj.deposit = message.deposit; - return obj; - }, - fromAminoMsg(object: CommunityPoolSpendProposalWithDepositAminoMsg): CommunityPoolSpendProposalWithDeposit { - return CommunityPoolSpendProposalWithDeposit.fromAmino(object.value); - }, - toAminoMsg(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositAminoMsg { - return { - type: "cosmos-sdk/CommunityPoolSpendProposalWithDeposit", - value: CommunityPoolSpendProposalWithDeposit.toAmino(message) - }; - }, - fromProtoMsg(message: CommunityPoolSpendProposalWithDepositProtoMsg): CommunityPoolSpendProposalWithDeposit { - return CommunityPoolSpendProposalWithDeposit.decode(message.value); - }, - toProto(message: CommunityPoolSpendProposalWithDeposit): Uint8Array { - return CommunityPoolSpendProposalWithDeposit.encode(message).finish(); - }, - toProtoMsg(message: CommunityPoolSpendProposalWithDeposit): CommunityPoolSpendProposalWithDepositProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", - value: CommunityPoolSpendProposalWithDeposit.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/genesis.ts deleted file mode 100644 index 552ca3fc..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/genesis.ts +++ /dev/null @@ -1,1390 +0,0 @@ -import { DecCoin, DecCoinAmino, DecCoinSDKType } from "../../base/v1beta1/coin"; -import { ValidatorAccumulatedCommission, ValidatorAccumulatedCommissionAmino, ValidatorAccumulatedCommissionSDKType, ValidatorHistoricalRewards, ValidatorHistoricalRewardsAmino, ValidatorHistoricalRewardsSDKType, ValidatorCurrentRewards, ValidatorCurrentRewardsAmino, ValidatorCurrentRewardsSDKType, DelegatorStartingInfo, DelegatorStartingInfoAmino, DelegatorStartingInfoSDKType, ValidatorSlashEvent, ValidatorSlashEventAmino, ValidatorSlashEventSDKType, Params, ParamsAmino, ParamsSDKType, FeePool, FeePoolAmino, FeePoolSDKType } from "./distribution"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfo { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** withdraw_address is the address to withdraw the delegation rewards to. */ - withdrawAddress: string; -} -export interface DelegatorWithdrawInfoProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorWithdrawInfo"; - value: Uint8Array; -} -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfoAmino { - /** delegator_address is the address of the delegator. */ - delegator_address: string; - /** withdraw_address is the address to withdraw the delegation rewards to. */ - withdraw_address: string; -} -export interface DelegatorWithdrawInfoAminoMsg { - type: "cosmos-sdk/DelegatorWithdrawInfo"; - value: DelegatorWithdrawInfoAmino; -} -/** - * DelegatorWithdrawInfo is the address for where distributions rewards are - * withdrawn to by default this struct is only used at genesis to feed in - * default withdraw addresses. - */ -export interface DelegatorWithdrawInfoSDKType { - delegator_address: string; - withdraw_address: string; -} -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** outstanding_rewards represents the oustanding rewards of a validator. */ - outstandingRewards: DecCoin[]; -} -export interface ValidatorOutstandingRewardsRecordProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord"; - value: Uint8Array; -} -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecordAmino { - /** validator_address is the address of the validator. */ - validator_address: string; - /** outstanding_rewards represents the oustanding rewards of a validator. */ - outstanding_rewards: DecCoinAmino[]; -} -export interface ValidatorOutstandingRewardsRecordAminoMsg { - type: "cosmos-sdk/ValidatorOutstandingRewardsRecord"; - value: ValidatorOutstandingRewardsRecordAmino; -} -/** ValidatorOutstandingRewardsRecord is used for import/export via genesis json. */ -export interface ValidatorOutstandingRewardsRecordSDKType { - validator_address: string; - outstanding_rewards: DecCoinSDKType[]; -} -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** accumulated is the accumulated commission of a validator. */ - accumulated: ValidatorAccumulatedCommission | undefined; -} -export interface ValidatorAccumulatedCommissionRecordProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord"; - value: Uint8Array; -} -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecordAmino { - /** validator_address is the address of the validator. */ - validator_address: string; - /** accumulated is the accumulated commission of a validator. */ - accumulated?: ValidatorAccumulatedCommissionAmino | undefined; -} -export interface ValidatorAccumulatedCommissionRecordAminoMsg { - type: "cosmos-sdk/ValidatorAccumulatedCommissionRecord"; - value: ValidatorAccumulatedCommissionRecordAmino; -} -/** - * ValidatorAccumulatedCommissionRecord is used for import / export via genesis - * json. - */ -export interface ValidatorAccumulatedCommissionRecordSDKType { - validator_address: string; - accumulated: ValidatorAccumulatedCommissionSDKType | undefined; -} -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** period defines the period the historical rewards apply to. */ - period: bigint; - /** rewards defines the historical rewards of a validator. */ - rewards: ValidatorHistoricalRewards | undefined; -} -export interface ValidatorHistoricalRewardsRecordProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord"; - value: Uint8Array; -} -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecordAmino { - /** validator_address is the address of the validator. */ - validator_address: string; - /** period defines the period the historical rewards apply to. */ - period: string; - /** rewards defines the historical rewards of a validator. */ - rewards?: ValidatorHistoricalRewardsAmino | undefined; -} -export interface ValidatorHistoricalRewardsRecordAminoMsg { - type: "cosmos-sdk/ValidatorHistoricalRewardsRecord"; - value: ValidatorHistoricalRewardsRecordAmino; -} -/** - * ValidatorHistoricalRewardsRecord is used for import / export via genesis - * json. - */ -export interface ValidatorHistoricalRewardsRecordSDKType { - validator_address: string; - period: bigint; - rewards: ValidatorHistoricalRewardsSDKType | undefined; -} -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** rewards defines the current rewards of a validator. */ - rewards: ValidatorCurrentRewards | undefined; -} -export interface ValidatorCurrentRewardsRecordProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord"; - value: Uint8Array; -} -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecordAmino { - /** validator_address is the address of the validator. */ - validator_address: string; - /** rewards defines the current rewards of a validator. */ - rewards?: ValidatorCurrentRewardsAmino | undefined; -} -export interface ValidatorCurrentRewardsRecordAminoMsg { - type: "cosmos-sdk/ValidatorCurrentRewardsRecord"; - value: ValidatorCurrentRewardsRecordAmino; -} -/** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ -export interface ValidatorCurrentRewardsRecordSDKType { - validator_address: string; - rewards: ValidatorCurrentRewardsSDKType | undefined; -} -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecord { - /** delegator_address is the address of the delegator. */ - delegatorAddress: string; - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** starting_info defines the starting info of a delegator. */ - startingInfo: DelegatorStartingInfo | undefined; -} -export interface DelegatorStartingInfoRecordProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfoRecord"; - value: Uint8Array; -} -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecordAmino { - /** delegator_address is the address of the delegator. */ - delegator_address: string; - /** validator_address is the address of the validator. */ - validator_address: string; - /** starting_info defines the starting info of a delegator. */ - starting_info?: DelegatorStartingInfoAmino | undefined; -} -export interface DelegatorStartingInfoRecordAminoMsg { - type: "cosmos-sdk/DelegatorStartingInfoRecord"; - value: DelegatorStartingInfoRecordAmino; -} -/** DelegatorStartingInfoRecord used for import / export via genesis json. */ -export interface DelegatorStartingInfoRecordSDKType { - delegator_address: string; - validator_address: string; - starting_info: DelegatorStartingInfoSDKType | undefined; -} -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecord { - /** validator_address is the address of the validator. */ - validatorAddress: string; - /** height defines the block height at which the slash event occured. */ - height: bigint; - /** period is the period of the slash event. */ - period: bigint; - /** validator_slash_event describes the slash event. */ - validatorSlashEvent: ValidatorSlashEvent | undefined; -} -export interface ValidatorSlashEventRecordProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEventRecord"; - value: Uint8Array; -} -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecordAmino { - /** validator_address is the address of the validator. */ - validator_address: string; - /** height defines the block height at which the slash event occured. */ - height: string; - /** period is the period of the slash event. */ - period: string; - /** validator_slash_event describes the slash event. */ - validator_slash_event?: ValidatorSlashEventAmino | undefined; -} -export interface ValidatorSlashEventRecordAminoMsg { - type: "cosmos-sdk/ValidatorSlashEventRecord"; - value: ValidatorSlashEventRecordAmino; -} -/** ValidatorSlashEventRecord is used for import / export via genesis json. */ -export interface ValidatorSlashEventRecordSDKType { - validator_address: string; - height: bigint; - period: bigint; - validator_slash_event: ValidatorSlashEventSDKType | undefined; -} -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - /** fee_pool defines the fee pool at genesis. */ - feePool: FeePool | undefined; - /** fee_pool defines the delegator withdraw infos at genesis. */ - delegatorWithdrawInfos: DelegatorWithdrawInfo[]; - /** fee_pool defines the previous proposer at genesis. */ - previousProposer: string; - /** fee_pool defines the outstanding rewards of all validators at genesis. */ - outstandingRewards: ValidatorOutstandingRewardsRecord[]; - /** fee_pool defines the accumulated commisions of all validators at genesis. */ - validatorAccumulatedCommissions: ValidatorAccumulatedCommissionRecord[]; - /** fee_pool defines the historical rewards of all validators at genesis. */ - validatorHistoricalRewards: ValidatorHistoricalRewardsRecord[]; - /** fee_pool defines the current rewards of all validators at genesis. */ - validatorCurrentRewards: ValidatorCurrentRewardsRecord[]; - /** fee_pool defines the delegator starting infos at genesis. */ - delegatorStartingInfos: DelegatorStartingInfoRecord[]; - /** fee_pool defines the validator slash events at genesis. */ - validatorSlashEvents: ValidatorSlashEventRecord[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisStateAmino { - /** params defines all the paramaters of the module. */ - params?: ParamsAmino | undefined; - /** fee_pool defines the fee pool at genesis. */ - fee_pool?: FeePoolAmino | undefined; - /** fee_pool defines the delegator withdraw infos at genesis. */ - delegator_withdraw_infos: DelegatorWithdrawInfoAmino[]; - /** fee_pool defines the previous proposer at genesis. */ - previous_proposer: string; - /** fee_pool defines the outstanding rewards of all validators at genesis. */ - outstanding_rewards: ValidatorOutstandingRewardsRecordAmino[]; - /** fee_pool defines the accumulated commisions of all validators at genesis. */ - validator_accumulated_commissions: ValidatorAccumulatedCommissionRecordAmino[]; - /** fee_pool defines the historical rewards of all validators at genesis. */ - validator_historical_rewards: ValidatorHistoricalRewardsRecordAmino[]; - /** fee_pool defines the current rewards of all validators at genesis. */ - validator_current_rewards: ValidatorCurrentRewardsRecordAmino[]; - /** fee_pool defines the delegator starting infos at genesis. */ - delegator_starting_infos: DelegatorStartingInfoRecordAmino[]; - /** fee_pool defines the validator slash events at genesis. */ - validator_slash_events: ValidatorSlashEventRecordAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the distribution module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - fee_pool: FeePoolSDKType | undefined; - delegator_withdraw_infos: DelegatorWithdrawInfoSDKType[]; - previous_proposer: string; - outstanding_rewards: ValidatorOutstandingRewardsRecordSDKType[]; - validator_accumulated_commissions: ValidatorAccumulatedCommissionRecordSDKType[]; - validator_historical_rewards: ValidatorHistoricalRewardsRecordSDKType[]; - validator_current_rewards: ValidatorCurrentRewardsRecordSDKType[]; - delegator_starting_infos: DelegatorStartingInfoRecordSDKType[]; - validator_slash_events: ValidatorSlashEventRecordSDKType[]; -} -function createBaseDelegatorWithdrawInfo(): DelegatorWithdrawInfo { - return { - delegatorAddress: "", - withdrawAddress: "" - }; -} -export const DelegatorWithdrawInfo = { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorWithdrawInfo", - aminoType: "cosmos-sdk/DelegatorWithdrawInfo", - encode(message: DelegatorWithdrawInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelegatorWithdrawInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegatorWithdrawInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DelegatorWithdrawInfo { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : "" - }; - }, - toJSON(message: DelegatorWithdrawInfo): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object: DeepPartial): DelegatorWithdrawInfo { - const message = createBaseDelegatorWithdrawInfo(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.withdrawAddress = object.withdrawAddress ?? ""; - return message; - }, - fromSDK(object: DelegatorWithdrawInfoSDKType): DelegatorWithdrawInfo { - return { - delegatorAddress: object?.delegator_address, - withdrawAddress: object?.withdraw_address - }; - }, - toSDK(message: DelegatorWithdrawInfo): DelegatorWithdrawInfoSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress; - return obj; - }, - fromAmino(object: DelegatorWithdrawInfoAmino): DelegatorWithdrawInfo { - return { - delegatorAddress: object.delegator_address, - withdrawAddress: object.withdraw_address - }; - }, - toAmino(message: DelegatorWithdrawInfo): DelegatorWithdrawInfoAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress; - return obj; - }, - fromAminoMsg(object: DelegatorWithdrawInfoAminoMsg): DelegatorWithdrawInfo { - return DelegatorWithdrawInfo.fromAmino(object.value); - }, - toAminoMsg(message: DelegatorWithdrawInfo): DelegatorWithdrawInfoAminoMsg { - return { - type: "cosmos-sdk/DelegatorWithdrawInfo", - value: DelegatorWithdrawInfo.toAmino(message) - }; - }, - fromProtoMsg(message: DelegatorWithdrawInfoProtoMsg): DelegatorWithdrawInfo { - return DelegatorWithdrawInfo.decode(message.value); - }, - toProto(message: DelegatorWithdrawInfo): Uint8Array { - return DelegatorWithdrawInfo.encode(message).finish(); - }, - toProtoMsg(message: DelegatorWithdrawInfo): DelegatorWithdrawInfoProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorWithdrawInfo", - value: DelegatorWithdrawInfo.encode(message).finish() - }; - } -}; -function createBaseValidatorOutstandingRewardsRecord(): ValidatorOutstandingRewardsRecord { - return { - validatorAddress: "", - outstandingRewards: [] - }; -} -export const ValidatorOutstandingRewardsRecord = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord", - aminoType: "cosmos-sdk/ValidatorOutstandingRewardsRecord", - encode(message: ValidatorOutstandingRewardsRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - for (const v of message.outstandingRewards) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorOutstandingRewardsRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorOutstandingRewardsRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.outstandingRewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorOutstandingRewardsRecord { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - outstandingRewards: Array.isArray(object?.outstandingRewards) ? object.outstandingRewards.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: ValidatorOutstandingRewardsRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.outstandingRewards = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValidatorOutstandingRewardsRecord { - const message = createBaseValidatorOutstandingRewardsRecord(); - message.validatorAddress = object.validatorAddress ?? ""; - message.outstandingRewards = object.outstandingRewards?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ValidatorOutstandingRewardsRecordSDKType): ValidatorOutstandingRewardsRecord { - return { - validatorAddress: object?.validator_address, - outstandingRewards: Array.isArray(object?.outstanding_rewards) ? object.outstanding_rewards.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: ValidatorOutstandingRewardsRecord): ValidatorOutstandingRewardsRecordSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - if (message.outstandingRewards) { - obj.outstanding_rewards = message.outstandingRewards.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.outstanding_rewards = []; - } - return obj; - }, - fromAmino(object: ValidatorOutstandingRewardsRecordAmino): ValidatorOutstandingRewardsRecord { - return { - validatorAddress: object.validator_address, - outstandingRewards: Array.isArray(object?.outstanding_rewards) ? object.outstanding_rewards.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: ValidatorOutstandingRewardsRecord): ValidatorOutstandingRewardsRecordAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - if (message.outstandingRewards) { - obj.outstanding_rewards = message.outstandingRewards.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.outstanding_rewards = []; - } - return obj; - }, - fromAminoMsg(object: ValidatorOutstandingRewardsRecordAminoMsg): ValidatorOutstandingRewardsRecord { - return ValidatorOutstandingRewardsRecord.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorOutstandingRewardsRecord): ValidatorOutstandingRewardsRecordAminoMsg { - return { - type: "cosmos-sdk/ValidatorOutstandingRewardsRecord", - value: ValidatorOutstandingRewardsRecord.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorOutstandingRewardsRecordProtoMsg): ValidatorOutstandingRewardsRecord { - return ValidatorOutstandingRewardsRecord.decode(message.value); - }, - toProto(message: ValidatorOutstandingRewardsRecord): Uint8Array { - return ValidatorOutstandingRewardsRecord.encode(message).finish(); - }, - toProtoMsg(message: ValidatorOutstandingRewardsRecord): ValidatorOutstandingRewardsRecordProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord", - value: ValidatorOutstandingRewardsRecord.encode(message).finish() - }; - } -}; -function createBaseValidatorAccumulatedCommissionRecord(): ValidatorAccumulatedCommissionRecord { - return { - validatorAddress: "", - accumulated: ValidatorAccumulatedCommission.fromPartial({}) - }; -} -export const ValidatorAccumulatedCommissionRecord = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", - aminoType: "cosmos-sdk/ValidatorAccumulatedCommissionRecord", - encode(message: ValidatorAccumulatedCommissionRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.accumulated !== undefined) { - ValidatorAccumulatedCommission.encode(message.accumulated, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorAccumulatedCommissionRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorAccumulatedCommissionRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.accumulated = ValidatorAccumulatedCommission.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorAccumulatedCommissionRecord { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - accumulated: isSet(object.accumulated) ? ValidatorAccumulatedCommission.fromJSON(object.accumulated) : undefined - }; - }, - toJSON(message: ValidatorAccumulatedCommissionRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.accumulated !== undefined && (obj.accumulated = message.accumulated ? ValidatorAccumulatedCommission.toJSON(message.accumulated) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorAccumulatedCommissionRecord { - const message = createBaseValidatorAccumulatedCommissionRecord(); - message.validatorAddress = object.validatorAddress ?? ""; - message.accumulated = object.accumulated !== undefined && object.accumulated !== null ? ValidatorAccumulatedCommission.fromPartial(object.accumulated) : undefined; - return message; - }, - fromSDK(object: ValidatorAccumulatedCommissionRecordSDKType): ValidatorAccumulatedCommissionRecord { - return { - validatorAddress: object?.validator_address, - accumulated: object.accumulated ? ValidatorAccumulatedCommission.fromSDK(object.accumulated) : undefined - }; - }, - toSDK(message: ValidatorAccumulatedCommissionRecord): ValidatorAccumulatedCommissionRecordSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - message.accumulated !== undefined && (obj.accumulated = message.accumulated ? ValidatorAccumulatedCommission.toSDK(message.accumulated) : undefined); - return obj; - }, - fromAmino(object: ValidatorAccumulatedCommissionRecordAmino): ValidatorAccumulatedCommissionRecord { - return { - validatorAddress: object.validator_address, - accumulated: object?.accumulated ? ValidatorAccumulatedCommission.fromAmino(object.accumulated) : undefined - }; - }, - toAmino(message: ValidatorAccumulatedCommissionRecord): ValidatorAccumulatedCommissionRecordAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.accumulated = message.accumulated ? ValidatorAccumulatedCommission.toAmino(message.accumulated) : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorAccumulatedCommissionRecordAminoMsg): ValidatorAccumulatedCommissionRecord { - return ValidatorAccumulatedCommissionRecord.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorAccumulatedCommissionRecord): ValidatorAccumulatedCommissionRecordAminoMsg { - return { - type: "cosmos-sdk/ValidatorAccumulatedCommissionRecord", - value: ValidatorAccumulatedCommissionRecord.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorAccumulatedCommissionRecordProtoMsg): ValidatorAccumulatedCommissionRecord { - return ValidatorAccumulatedCommissionRecord.decode(message.value); - }, - toProto(message: ValidatorAccumulatedCommissionRecord): Uint8Array { - return ValidatorAccumulatedCommissionRecord.encode(message).finish(); - }, - toProtoMsg(message: ValidatorAccumulatedCommissionRecord): ValidatorAccumulatedCommissionRecordProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", - value: ValidatorAccumulatedCommissionRecord.encode(message).finish() - }; - } -}; -function createBaseValidatorHistoricalRewardsRecord(): ValidatorHistoricalRewardsRecord { - return { - validatorAddress: "", - period: BigInt(0), - rewards: ValidatorHistoricalRewards.fromPartial({}) - }; -} -export const ValidatorHistoricalRewardsRecord = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord", - aminoType: "cosmos-sdk/ValidatorHistoricalRewardsRecord", - encode(message: ValidatorHistoricalRewardsRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.period !== BigInt(0)) { - writer.uint32(16).uint64(message.period); - } - if (message.rewards !== undefined) { - ValidatorHistoricalRewards.encode(message.rewards, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorHistoricalRewardsRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorHistoricalRewardsRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.period = reader.uint64(); - break; - case 3: - message.rewards = ValidatorHistoricalRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorHistoricalRewardsRecord { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - period: isSet(object.period) ? BigInt(object.period.toString()) : BigInt(0), - rewards: isSet(object.rewards) ? ValidatorHistoricalRewards.fromJSON(object.rewards) : undefined - }; - }, - toJSON(message: ValidatorHistoricalRewardsRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.period !== undefined && (obj.period = (message.period || BigInt(0)).toString()); - message.rewards !== undefined && (obj.rewards = message.rewards ? ValidatorHistoricalRewards.toJSON(message.rewards) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorHistoricalRewardsRecord { - const message = createBaseValidatorHistoricalRewardsRecord(); - message.validatorAddress = object.validatorAddress ?? ""; - message.period = object.period !== undefined && object.period !== null ? BigInt(object.period.toString()) : BigInt(0); - message.rewards = object.rewards !== undefined && object.rewards !== null ? ValidatorHistoricalRewards.fromPartial(object.rewards) : undefined; - return message; - }, - fromSDK(object: ValidatorHistoricalRewardsRecordSDKType): ValidatorHistoricalRewardsRecord { - return { - validatorAddress: object?.validator_address, - period: object?.period, - rewards: object.rewards ? ValidatorHistoricalRewards.fromSDK(object.rewards) : undefined - }; - }, - toSDK(message: ValidatorHistoricalRewardsRecord): ValidatorHistoricalRewardsRecordSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.period = message.period; - message.rewards !== undefined && (obj.rewards = message.rewards ? ValidatorHistoricalRewards.toSDK(message.rewards) : undefined); - return obj; - }, - fromAmino(object: ValidatorHistoricalRewardsRecordAmino): ValidatorHistoricalRewardsRecord { - return { - validatorAddress: object.validator_address, - period: BigInt(object.period), - rewards: object?.rewards ? ValidatorHistoricalRewards.fromAmino(object.rewards) : undefined - }; - }, - toAmino(message: ValidatorHistoricalRewardsRecord): ValidatorHistoricalRewardsRecordAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.period = message.period ? message.period.toString() : undefined; - obj.rewards = message.rewards ? ValidatorHistoricalRewards.toAmino(message.rewards) : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorHistoricalRewardsRecordAminoMsg): ValidatorHistoricalRewardsRecord { - return ValidatorHistoricalRewardsRecord.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorHistoricalRewardsRecord): ValidatorHistoricalRewardsRecordAminoMsg { - return { - type: "cosmos-sdk/ValidatorHistoricalRewardsRecord", - value: ValidatorHistoricalRewardsRecord.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorHistoricalRewardsRecordProtoMsg): ValidatorHistoricalRewardsRecord { - return ValidatorHistoricalRewardsRecord.decode(message.value); - }, - toProto(message: ValidatorHistoricalRewardsRecord): Uint8Array { - return ValidatorHistoricalRewardsRecord.encode(message).finish(); - }, - toProtoMsg(message: ValidatorHistoricalRewardsRecord): ValidatorHistoricalRewardsRecordProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord", - value: ValidatorHistoricalRewardsRecord.encode(message).finish() - }; - } -}; -function createBaseValidatorCurrentRewardsRecord(): ValidatorCurrentRewardsRecord { - return { - validatorAddress: "", - rewards: ValidatorCurrentRewards.fromPartial({}) - }; -} -export const ValidatorCurrentRewardsRecord = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord", - aminoType: "cosmos-sdk/ValidatorCurrentRewardsRecord", - encode(message: ValidatorCurrentRewardsRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.rewards !== undefined) { - ValidatorCurrentRewards.encode(message.rewards, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorCurrentRewardsRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorCurrentRewardsRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.rewards = ValidatorCurrentRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorCurrentRewardsRecord { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - rewards: isSet(object.rewards) ? ValidatorCurrentRewards.fromJSON(object.rewards) : undefined - }; - }, - toJSON(message: ValidatorCurrentRewardsRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.rewards !== undefined && (obj.rewards = message.rewards ? ValidatorCurrentRewards.toJSON(message.rewards) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorCurrentRewardsRecord { - const message = createBaseValidatorCurrentRewardsRecord(); - message.validatorAddress = object.validatorAddress ?? ""; - message.rewards = object.rewards !== undefined && object.rewards !== null ? ValidatorCurrentRewards.fromPartial(object.rewards) : undefined; - return message; - }, - fromSDK(object: ValidatorCurrentRewardsRecordSDKType): ValidatorCurrentRewardsRecord { - return { - validatorAddress: object?.validator_address, - rewards: object.rewards ? ValidatorCurrentRewards.fromSDK(object.rewards) : undefined - }; - }, - toSDK(message: ValidatorCurrentRewardsRecord): ValidatorCurrentRewardsRecordSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - message.rewards !== undefined && (obj.rewards = message.rewards ? ValidatorCurrentRewards.toSDK(message.rewards) : undefined); - return obj; - }, - fromAmino(object: ValidatorCurrentRewardsRecordAmino): ValidatorCurrentRewardsRecord { - return { - validatorAddress: object.validator_address, - rewards: object?.rewards ? ValidatorCurrentRewards.fromAmino(object.rewards) : undefined - }; - }, - toAmino(message: ValidatorCurrentRewardsRecord): ValidatorCurrentRewardsRecordAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.rewards = message.rewards ? ValidatorCurrentRewards.toAmino(message.rewards) : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorCurrentRewardsRecordAminoMsg): ValidatorCurrentRewardsRecord { - return ValidatorCurrentRewardsRecord.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorCurrentRewardsRecord): ValidatorCurrentRewardsRecordAminoMsg { - return { - type: "cosmos-sdk/ValidatorCurrentRewardsRecord", - value: ValidatorCurrentRewardsRecord.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorCurrentRewardsRecordProtoMsg): ValidatorCurrentRewardsRecord { - return ValidatorCurrentRewardsRecord.decode(message.value); - }, - toProto(message: ValidatorCurrentRewardsRecord): Uint8Array { - return ValidatorCurrentRewardsRecord.encode(message).finish(); - }, - toProtoMsg(message: ValidatorCurrentRewardsRecord): ValidatorCurrentRewardsRecordProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord", - value: ValidatorCurrentRewardsRecord.encode(message).finish() - }; - } -}; -function createBaseDelegatorStartingInfoRecord(): DelegatorStartingInfoRecord { - return { - delegatorAddress: "", - validatorAddress: "", - startingInfo: DelegatorStartingInfo.fromPartial({}) - }; -} -export const DelegatorStartingInfoRecord = { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfoRecord", - aminoType: "cosmos-sdk/DelegatorStartingInfoRecord", - encode(message: DelegatorStartingInfoRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.startingInfo !== undefined) { - DelegatorStartingInfo.encode(message.startingInfo, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelegatorStartingInfoRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegatorStartingInfoRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.startingInfo = DelegatorStartingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DelegatorStartingInfoRecord { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - startingInfo: isSet(object.startingInfo) ? DelegatorStartingInfo.fromJSON(object.startingInfo) : undefined - }; - }, - toJSON(message: DelegatorStartingInfoRecord): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.startingInfo !== undefined && (obj.startingInfo = message.startingInfo ? DelegatorStartingInfo.toJSON(message.startingInfo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DelegatorStartingInfoRecord { - const message = createBaseDelegatorStartingInfoRecord(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.startingInfo = object.startingInfo !== undefined && object.startingInfo !== null ? DelegatorStartingInfo.fromPartial(object.startingInfo) : undefined; - return message; - }, - fromSDK(object: DelegatorStartingInfoRecordSDKType): DelegatorStartingInfoRecord { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - startingInfo: object.starting_info ? DelegatorStartingInfo.fromSDK(object.starting_info) : undefined - }; - }, - toSDK(message: DelegatorStartingInfoRecord): DelegatorStartingInfoRecordSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - message.startingInfo !== undefined && (obj.starting_info = message.startingInfo ? DelegatorStartingInfo.toSDK(message.startingInfo) : undefined); - return obj; - }, - fromAmino(object: DelegatorStartingInfoRecordAmino): DelegatorStartingInfoRecord { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - startingInfo: object?.starting_info ? DelegatorStartingInfo.fromAmino(object.starting_info) : undefined - }; - }, - toAmino(message: DelegatorStartingInfoRecord): DelegatorStartingInfoRecordAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.starting_info = message.startingInfo ? DelegatorStartingInfo.toAmino(message.startingInfo) : undefined; - return obj; - }, - fromAminoMsg(object: DelegatorStartingInfoRecordAminoMsg): DelegatorStartingInfoRecord { - return DelegatorStartingInfoRecord.fromAmino(object.value); - }, - toAminoMsg(message: DelegatorStartingInfoRecord): DelegatorStartingInfoRecordAminoMsg { - return { - type: "cosmos-sdk/DelegatorStartingInfoRecord", - value: DelegatorStartingInfoRecord.toAmino(message) - }; - }, - fromProtoMsg(message: DelegatorStartingInfoRecordProtoMsg): DelegatorStartingInfoRecord { - return DelegatorStartingInfoRecord.decode(message.value); - }, - toProto(message: DelegatorStartingInfoRecord): Uint8Array { - return DelegatorStartingInfoRecord.encode(message).finish(); - }, - toProtoMsg(message: DelegatorStartingInfoRecord): DelegatorStartingInfoRecordProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.DelegatorStartingInfoRecord", - value: DelegatorStartingInfoRecord.encode(message).finish() - }; - } -}; -function createBaseValidatorSlashEventRecord(): ValidatorSlashEventRecord { - return { - validatorAddress: "", - height: BigInt(0), - period: BigInt(0), - validatorSlashEvent: ValidatorSlashEvent.fromPartial({}) - }; -} -export const ValidatorSlashEventRecord = { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEventRecord", - aminoType: "cosmos-sdk/ValidatorSlashEventRecord", - encode(message: ValidatorSlashEventRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.height !== BigInt(0)) { - writer.uint32(16).uint64(message.height); - } - if (message.period !== BigInt(0)) { - writer.uint32(24).uint64(message.period); - } - if (message.validatorSlashEvent !== undefined) { - ValidatorSlashEvent.encode(message.validatorSlashEvent, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorSlashEventRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorSlashEventRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.height = reader.uint64(); - break; - case 3: - message.period = reader.uint64(); - break; - case 4: - message.validatorSlashEvent = ValidatorSlashEvent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorSlashEventRecord { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - period: isSet(object.period) ? BigInt(object.period.toString()) : BigInt(0), - validatorSlashEvent: isSet(object.validatorSlashEvent) ? ValidatorSlashEvent.fromJSON(object.validatorSlashEvent) : undefined - }; - }, - toJSON(message: ValidatorSlashEventRecord): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.period !== undefined && (obj.period = (message.period || BigInt(0)).toString()); - message.validatorSlashEvent !== undefined && (obj.validatorSlashEvent = message.validatorSlashEvent ? ValidatorSlashEvent.toJSON(message.validatorSlashEvent) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorSlashEventRecord { - const message = createBaseValidatorSlashEventRecord(); - message.validatorAddress = object.validatorAddress ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.period = object.period !== undefined && object.period !== null ? BigInt(object.period.toString()) : BigInt(0); - message.validatorSlashEvent = object.validatorSlashEvent !== undefined && object.validatorSlashEvent !== null ? ValidatorSlashEvent.fromPartial(object.validatorSlashEvent) : undefined; - return message; - }, - fromSDK(object: ValidatorSlashEventRecordSDKType): ValidatorSlashEventRecord { - return { - validatorAddress: object?.validator_address, - height: object?.height, - period: object?.period, - validatorSlashEvent: object.validator_slash_event ? ValidatorSlashEvent.fromSDK(object.validator_slash_event) : undefined - }; - }, - toSDK(message: ValidatorSlashEventRecord): ValidatorSlashEventRecordSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.height = message.height; - obj.period = message.period; - message.validatorSlashEvent !== undefined && (obj.validator_slash_event = message.validatorSlashEvent ? ValidatorSlashEvent.toSDK(message.validatorSlashEvent) : undefined); - return obj; - }, - fromAmino(object: ValidatorSlashEventRecordAmino): ValidatorSlashEventRecord { - return { - validatorAddress: object.validator_address, - height: BigInt(object.height), - period: BigInt(object.period), - validatorSlashEvent: object?.validator_slash_event ? ValidatorSlashEvent.fromAmino(object.validator_slash_event) : undefined - }; - }, - toAmino(message: ValidatorSlashEventRecord): ValidatorSlashEventRecordAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.height = message.height ? message.height.toString() : undefined; - obj.period = message.period ? message.period.toString() : undefined; - obj.validator_slash_event = message.validatorSlashEvent ? ValidatorSlashEvent.toAmino(message.validatorSlashEvent) : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorSlashEventRecordAminoMsg): ValidatorSlashEventRecord { - return ValidatorSlashEventRecord.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorSlashEventRecord): ValidatorSlashEventRecordAminoMsg { - return { - type: "cosmos-sdk/ValidatorSlashEventRecord", - value: ValidatorSlashEventRecord.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorSlashEventRecordProtoMsg): ValidatorSlashEventRecord { - return ValidatorSlashEventRecord.decode(message.value); - }, - toProto(message: ValidatorSlashEventRecord): Uint8Array { - return ValidatorSlashEventRecord.encode(message).finish(); - }, - toProtoMsg(message: ValidatorSlashEventRecord): ValidatorSlashEventRecordProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.ValidatorSlashEventRecord", - value: ValidatorSlashEventRecord.encode(message).finish() - }; - } -}; -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - feePool: FeePool.fromPartial({}), - delegatorWithdrawInfos: [], - previousProposer: "", - outstandingRewards: [], - validatorAccumulatedCommissions: [], - validatorHistoricalRewards: [], - validatorCurrentRewards: [], - delegatorStartingInfos: [], - validatorSlashEvents: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.distribution.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.feePool !== undefined) { - FeePool.encode(message.feePool, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatorWithdrawInfos) { - DelegatorWithdrawInfo.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.previousProposer !== "") { - writer.uint32(34).string(message.previousProposer); - } - for (const v of message.outstandingRewards) { - ValidatorOutstandingRewardsRecord.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.validatorAccumulatedCommissions) { - ValidatorAccumulatedCommissionRecord.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.validatorHistoricalRewards) { - ValidatorHistoricalRewardsRecord.encode(v!, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.validatorCurrentRewards) { - ValidatorCurrentRewardsRecord.encode(v!, writer.uint32(66).fork()).ldelim(); - } - for (const v of message.delegatorStartingInfos) { - DelegatorStartingInfoRecord.encode(v!, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.validatorSlashEvents) { - ValidatorSlashEventRecord.encode(v!, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.feePool = FeePool.decode(reader, reader.uint32()); - break; - case 3: - message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.decode(reader, reader.uint32())); - break; - case 4: - message.previousProposer = reader.string(); - break; - case 5: - message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32())); - break; - case 7: - message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32())); - break; - case 8: - message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.decode(reader, reader.uint32())); - break; - case 9: - message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.decode(reader, reader.uint32())); - break; - case 10: - message.validatorSlashEvents.push(ValidatorSlashEventRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - feePool: isSet(object.feePool) ? FeePool.fromJSON(object.feePool) : undefined, - delegatorWithdrawInfos: Array.isArray(object?.delegatorWithdrawInfos) ? object.delegatorWithdrawInfos.map((e: any) => DelegatorWithdrawInfo.fromJSON(e)) : [], - previousProposer: isSet(object.previousProposer) ? String(object.previousProposer) : "", - outstandingRewards: Array.isArray(object?.outstandingRewards) ? object.outstandingRewards.map((e: any) => ValidatorOutstandingRewardsRecord.fromJSON(e)) : [], - validatorAccumulatedCommissions: Array.isArray(object?.validatorAccumulatedCommissions) ? object.validatorAccumulatedCommissions.map((e: any) => ValidatorAccumulatedCommissionRecord.fromJSON(e)) : [], - validatorHistoricalRewards: Array.isArray(object?.validatorHistoricalRewards) ? object.validatorHistoricalRewards.map((e: any) => ValidatorHistoricalRewardsRecord.fromJSON(e)) : [], - validatorCurrentRewards: Array.isArray(object?.validatorCurrentRewards) ? object.validatorCurrentRewards.map((e: any) => ValidatorCurrentRewardsRecord.fromJSON(e)) : [], - delegatorStartingInfos: Array.isArray(object?.delegatorStartingInfos) ? object.delegatorStartingInfos.map((e: any) => DelegatorStartingInfoRecord.fromJSON(e)) : [], - validatorSlashEvents: Array.isArray(object?.validatorSlashEvents) ? object.validatorSlashEvents.map((e: any) => ValidatorSlashEventRecord.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.feePool !== undefined && (obj.feePool = message.feePool ? FeePool.toJSON(message.feePool) : undefined); - if (message.delegatorWithdrawInfos) { - obj.delegatorWithdrawInfos = message.delegatorWithdrawInfos.map(e => e ? DelegatorWithdrawInfo.toJSON(e) : undefined); - } else { - obj.delegatorWithdrawInfos = []; - } - message.previousProposer !== undefined && (obj.previousProposer = message.previousProposer); - if (message.outstandingRewards) { - obj.outstandingRewards = message.outstandingRewards.map(e => e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined); - } else { - obj.outstandingRewards = []; - } - if (message.validatorAccumulatedCommissions) { - obj.validatorAccumulatedCommissions = message.validatorAccumulatedCommissions.map(e => e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined); - } else { - obj.validatorAccumulatedCommissions = []; - } - if (message.validatorHistoricalRewards) { - obj.validatorHistoricalRewards = message.validatorHistoricalRewards.map(e => e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined); - } else { - obj.validatorHistoricalRewards = []; - } - if (message.validatorCurrentRewards) { - obj.validatorCurrentRewards = message.validatorCurrentRewards.map(e => e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined); - } else { - obj.validatorCurrentRewards = []; - } - if (message.delegatorStartingInfos) { - obj.delegatorStartingInfos = message.delegatorStartingInfos.map(e => e ? DelegatorStartingInfoRecord.toJSON(e) : undefined); - } else { - obj.delegatorStartingInfos = []; - } - if (message.validatorSlashEvents) { - obj.validatorSlashEvents = message.validatorSlashEvents.map(e => e ? ValidatorSlashEventRecord.toJSON(e) : undefined); - } else { - obj.validatorSlashEvents = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.feePool = object.feePool !== undefined && object.feePool !== null ? FeePool.fromPartial(object.feePool) : undefined; - message.delegatorWithdrawInfos = object.delegatorWithdrawInfos?.map(e => DelegatorWithdrawInfo.fromPartial(e)) || []; - message.previousProposer = object.previousProposer ?? ""; - message.outstandingRewards = object.outstandingRewards?.map(e => ValidatorOutstandingRewardsRecord.fromPartial(e)) || []; - message.validatorAccumulatedCommissions = object.validatorAccumulatedCommissions?.map(e => ValidatorAccumulatedCommissionRecord.fromPartial(e)) || []; - message.validatorHistoricalRewards = object.validatorHistoricalRewards?.map(e => ValidatorHistoricalRewardsRecord.fromPartial(e)) || []; - message.validatorCurrentRewards = object.validatorCurrentRewards?.map(e => ValidatorCurrentRewardsRecord.fromPartial(e)) || []; - message.delegatorStartingInfos = object.delegatorStartingInfos?.map(e => DelegatorStartingInfoRecord.fromPartial(e)) || []; - message.validatorSlashEvents = object.validatorSlashEvents?.map(e => ValidatorSlashEventRecord.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - feePool: object.fee_pool ? FeePool.fromSDK(object.fee_pool) : undefined, - delegatorWithdrawInfos: Array.isArray(object?.delegator_withdraw_infos) ? object.delegator_withdraw_infos.map((e: any) => DelegatorWithdrawInfo.fromSDK(e)) : [], - previousProposer: object?.previous_proposer, - outstandingRewards: Array.isArray(object?.outstanding_rewards) ? object.outstanding_rewards.map((e: any) => ValidatorOutstandingRewardsRecord.fromSDK(e)) : [], - validatorAccumulatedCommissions: Array.isArray(object?.validator_accumulated_commissions) ? object.validator_accumulated_commissions.map((e: any) => ValidatorAccumulatedCommissionRecord.fromSDK(e)) : [], - validatorHistoricalRewards: Array.isArray(object?.validator_historical_rewards) ? object.validator_historical_rewards.map((e: any) => ValidatorHistoricalRewardsRecord.fromSDK(e)) : [], - validatorCurrentRewards: Array.isArray(object?.validator_current_rewards) ? object.validator_current_rewards.map((e: any) => ValidatorCurrentRewardsRecord.fromSDK(e)) : [], - delegatorStartingInfos: Array.isArray(object?.delegator_starting_infos) ? object.delegator_starting_infos.map((e: any) => DelegatorStartingInfoRecord.fromSDK(e)) : [], - validatorSlashEvents: Array.isArray(object?.validator_slash_events) ? object.validator_slash_events.map((e: any) => ValidatorSlashEventRecord.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - message.feePool !== undefined && (obj.fee_pool = message.feePool ? FeePool.toSDK(message.feePool) : undefined); - if (message.delegatorWithdrawInfos) { - obj.delegator_withdraw_infos = message.delegatorWithdrawInfos.map(e => e ? DelegatorWithdrawInfo.toSDK(e) : undefined); - } else { - obj.delegator_withdraw_infos = []; - } - obj.previous_proposer = message.previousProposer; - if (message.outstandingRewards) { - obj.outstanding_rewards = message.outstandingRewards.map(e => e ? ValidatorOutstandingRewardsRecord.toSDK(e) : undefined); - } else { - obj.outstanding_rewards = []; - } - if (message.validatorAccumulatedCommissions) { - obj.validator_accumulated_commissions = message.validatorAccumulatedCommissions.map(e => e ? ValidatorAccumulatedCommissionRecord.toSDK(e) : undefined); - } else { - obj.validator_accumulated_commissions = []; - } - if (message.validatorHistoricalRewards) { - obj.validator_historical_rewards = message.validatorHistoricalRewards.map(e => e ? ValidatorHistoricalRewardsRecord.toSDK(e) : undefined); - } else { - obj.validator_historical_rewards = []; - } - if (message.validatorCurrentRewards) { - obj.validator_current_rewards = message.validatorCurrentRewards.map(e => e ? ValidatorCurrentRewardsRecord.toSDK(e) : undefined); - } else { - obj.validator_current_rewards = []; - } - if (message.delegatorStartingInfos) { - obj.delegator_starting_infos = message.delegatorStartingInfos.map(e => e ? DelegatorStartingInfoRecord.toSDK(e) : undefined); - } else { - obj.delegator_starting_infos = []; - } - if (message.validatorSlashEvents) { - obj.validator_slash_events = message.validatorSlashEvents.map(e => e ? ValidatorSlashEventRecord.toSDK(e) : undefined); - } else { - obj.validator_slash_events = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - feePool: object?.fee_pool ? FeePool.fromAmino(object.fee_pool) : undefined, - delegatorWithdrawInfos: Array.isArray(object?.delegator_withdraw_infos) ? object.delegator_withdraw_infos.map((e: any) => DelegatorWithdrawInfo.fromAmino(e)) : [], - previousProposer: object.previous_proposer, - outstandingRewards: Array.isArray(object?.outstanding_rewards) ? object.outstanding_rewards.map((e: any) => ValidatorOutstandingRewardsRecord.fromAmino(e)) : [], - validatorAccumulatedCommissions: Array.isArray(object?.validator_accumulated_commissions) ? object.validator_accumulated_commissions.map((e: any) => ValidatorAccumulatedCommissionRecord.fromAmino(e)) : [], - validatorHistoricalRewards: Array.isArray(object?.validator_historical_rewards) ? object.validator_historical_rewards.map((e: any) => ValidatorHistoricalRewardsRecord.fromAmino(e)) : [], - validatorCurrentRewards: Array.isArray(object?.validator_current_rewards) ? object.validator_current_rewards.map((e: any) => ValidatorCurrentRewardsRecord.fromAmino(e)) : [], - delegatorStartingInfos: Array.isArray(object?.delegator_starting_infos) ? object.delegator_starting_infos.map((e: any) => DelegatorStartingInfoRecord.fromAmino(e)) : [], - validatorSlashEvents: Array.isArray(object?.validator_slash_events) ? object.validator_slash_events.map((e: any) => ValidatorSlashEventRecord.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - obj.fee_pool = message.feePool ? FeePool.toAmino(message.feePool) : undefined; - if (message.delegatorWithdrawInfos) { - obj.delegator_withdraw_infos = message.delegatorWithdrawInfos.map(e => e ? DelegatorWithdrawInfo.toAmino(e) : undefined); - } else { - obj.delegator_withdraw_infos = []; - } - obj.previous_proposer = message.previousProposer; - if (message.outstandingRewards) { - obj.outstanding_rewards = message.outstandingRewards.map(e => e ? ValidatorOutstandingRewardsRecord.toAmino(e) : undefined); - } else { - obj.outstanding_rewards = []; - } - if (message.validatorAccumulatedCommissions) { - obj.validator_accumulated_commissions = message.validatorAccumulatedCommissions.map(e => e ? ValidatorAccumulatedCommissionRecord.toAmino(e) : undefined); - } else { - obj.validator_accumulated_commissions = []; - } - if (message.validatorHistoricalRewards) { - obj.validator_historical_rewards = message.validatorHistoricalRewards.map(e => e ? ValidatorHistoricalRewardsRecord.toAmino(e) : undefined); - } else { - obj.validator_historical_rewards = []; - } - if (message.validatorCurrentRewards) { - obj.validator_current_rewards = message.validatorCurrentRewards.map(e => e ? ValidatorCurrentRewardsRecord.toAmino(e) : undefined); - } else { - obj.validator_current_rewards = []; - } - if (message.delegatorStartingInfos) { - obj.delegator_starting_infos = message.delegatorStartingInfos.map(e => e ? DelegatorStartingInfoRecord.toAmino(e) : undefined); - } else { - obj.delegator_starting_infos = []; - } - if (message.validatorSlashEvents) { - obj.validator_slash_events = message.validatorSlashEvents.map(e => e ? ValidatorSlashEventRecord.toAmino(e) : undefined); - } else { - obj.validator_slash_events = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 085c07f4..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,332 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, QueryValidatorOutstandingRewardsRequest, QueryValidatorOutstandingRewardsResponse, QueryValidatorCommissionRequest, QueryValidatorCommissionResponse, QueryValidatorSlashesRequest, QueryValidatorSlashesResponse, QueryDelegationRewardsRequest, QueryDelegationRewardsResponse, QueryDelegationTotalRewardsRequest, QueryDelegationTotalRewardsResponse, QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse, QueryDelegatorWithdrawAddressRequest, QueryDelegatorWithdrawAddressResponse, QueryCommunityPoolRequest, QueryCommunityPoolResponse } from "./query"; -/** Query defines the gRPC querier service for distribution module. */ -export interface Query { - /** Params queries params of the distribution module. */ - params(request?: QueryParamsRequest): Promise; - /** ValidatorOutstandingRewards queries rewards of a validator address. */ - validatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise; - /** ValidatorCommission queries accumulated commission for a validator. */ - validatorCommission(request: QueryValidatorCommissionRequest): Promise; - /** ValidatorSlashes queries slash events of a validator. */ - validatorSlashes(request: QueryValidatorSlashesRequest): Promise; - /** DelegationRewards queries the total rewards accrued by a delegation. */ - delegationRewards(request: QueryDelegationRewardsRequest): Promise; - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - delegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise; - /** DelegatorValidators queries the validators of a delegator. */ - delegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ - delegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise; - /** CommunityPool queries the community pool coins. */ - communityPool(request?: QueryCommunityPoolRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.validatorOutstandingRewards = this.validatorOutstandingRewards.bind(this); - this.validatorCommission = this.validatorCommission.bind(this); - this.validatorSlashes = this.validatorSlashes.bind(this); - this.delegationRewards = this.delegationRewards.bind(this); - this.delegationTotalRewards = this.delegationTotalRewards.bind(this); - this.delegatorValidators = this.delegatorValidators.bind(this); - this.delegatorWithdrawAddress = this.delegatorWithdrawAddress.bind(this); - this.communityPool = this.communityPool.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - validatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise { - const data = QueryValidatorOutstandingRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorOutstandingRewards", data); - return promise.then(data => QueryValidatorOutstandingRewardsResponse.decode(new BinaryReader(data))); - } - validatorCommission(request: QueryValidatorCommissionRequest): Promise { - const data = QueryValidatorCommissionRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorCommission", data); - return promise.then(data => QueryValidatorCommissionResponse.decode(new BinaryReader(data))); - } - validatorSlashes(request: QueryValidatorSlashesRequest): Promise { - const data = QueryValidatorSlashesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "ValidatorSlashes", data); - return promise.then(data => QueryValidatorSlashesResponse.decode(new BinaryReader(data))); - } - delegationRewards(request: QueryDelegationRewardsRequest): Promise { - const data = QueryDelegationRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegationRewards", data); - return promise.then(data => QueryDelegationRewardsResponse.decode(new BinaryReader(data))); - } - delegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise { - const data = QueryDelegationTotalRewardsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegationTotalRewards", data); - return promise.then(data => QueryDelegationTotalRewardsResponse.decode(new BinaryReader(data))); - } - delegatorValidators(request: QueryDelegatorValidatorsRequest): Promise { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegatorValidators", data); - return promise.then(data => QueryDelegatorValidatorsResponse.decode(new BinaryReader(data))); - } - delegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise { - const data = QueryDelegatorWithdrawAddressRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "DelegatorWithdrawAddress", data); - return promise.then(data => QueryDelegatorWithdrawAddressResponse.decode(new BinaryReader(data))); - } - communityPool(request: QueryCommunityPoolRequest = {}): Promise { - const data = QueryCommunityPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Query", "CommunityPool", data); - return promise.then(data => QueryCommunityPoolResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - validatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest): Promise { - return queryService.validatorOutstandingRewards(request); - }, - validatorCommission(request: QueryValidatorCommissionRequest): Promise { - return queryService.validatorCommission(request); - }, - validatorSlashes(request: QueryValidatorSlashesRequest): Promise { - return queryService.validatorSlashes(request); - }, - delegationRewards(request: QueryDelegationRewardsRequest): Promise { - return queryService.delegationRewards(request); - }, - delegationTotalRewards(request: QueryDelegationTotalRewardsRequest): Promise { - return queryService.delegationTotalRewards(request); - }, - delegatorValidators(request: QueryDelegatorValidatorsRequest): Promise { - return queryService.delegatorValidators(request); - }, - delegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise { - return queryService.delegatorWithdrawAddress(request); - }, - communityPool(request?: QueryCommunityPoolRequest): Promise { - return queryService.communityPool(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseValidatorOutstandingRewardsQuery extends ReactQueryParams { - request: QueryValidatorOutstandingRewardsRequest; -} -export interface UseValidatorCommissionQuery extends ReactQueryParams { - request: QueryValidatorCommissionRequest; -} -export interface UseValidatorSlashesQuery extends ReactQueryParams { - request: QueryValidatorSlashesRequest; -} -export interface UseDelegationRewardsQuery extends ReactQueryParams { - request: QueryDelegationRewardsRequest; -} -export interface UseDelegationTotalRewardsQuery extends ReactQueryParams { - request: QueryDelegationTotalRewardsRequest; -} -export interface UseDelegatorValidatorsQuery extends ReactQueryParams { - request: QueryDelegatorValidatorsRequest; -} -export interface UseDelegatorWithdrawAddressQuery extends ReactQueryParams { - request: QueryDelegatorWithdrawAddressRequest; -} -export interface UseCommunityPoolQuery extends ReactQueryParams { - request?: QueryCommunityPoolRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useValidatorOutstandingRewards = ({ - request, - options - }: UseValidatorOutstandingRewardsQuery) => { - return useQuery(["validatorOutstandingRewardsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validatorOutstandingRewards(request); - }, options); - }; - const useValidatorCommission = ({ - request, - options - }: UseValidatorCommissionQuery) => { - return useQuery(["validatorCommissionQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validatorCommission(request); - }, options); - }; - const useValidatorSlashes = ({ - request, - options - }: UseValidatorSlashesQuery) => { - return useQuery(["validatorSlashesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validatorSlashes(request); - }, options); - }; - const useDelegationRewards = ({ - request, - options - }: UseDelegationRewardsQuery) => { - return useQuery(["delegationRewardsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegationRewards(request); - }, options); - }; - const useDelegationTotalRewards = ({ - request, - options - }: UseDelegationTotalRewardsQuery) => { - return useQuery(["delegationTotalRewardsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegationTotalRewards(request); - }, options); - }; - const useDelegatorValidators = ({ - request, - options - }: UseDelegatorValidatorsQuery) => { - return useQuery(["delegatorValidatorsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegatorValidators(request); - }, options); - }; - const useDelegatorWithdrawAddress = ({ - request, - options - }: UseDelegatorWithdrawAddressQuery) => { - return useQuery(["delegatorWithdrawAddressQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegatorWithdrawAddress(request); - }, options); - }; - const useCommunityPool = ({ - request, - options - }: UseCommunityPoolQuery) => { - return useQuery(["communityPoolQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.communityPool(request); - }, options); - }; - return { - /** Params queries params of the distribution module. */useParams, - /** ValidatorOutstandingRewards queries rewards of a validator address. */useValidatorOutstandingRewards, - /** ValidatorCommission queries accumulated commission for a validator. */useValidatorCommission, - /** ValidatorSlashes queries slash events of a validator. */useValidatorSlashes, - /** DelegationRewards queries the total rewards accrued by a delegation. */useDelegationRewards, - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - useDelegationTotalRewards, - /** DelegatorValidators queries the validators of a delegator. */useDelegatorValidators, - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */useDelegatorWithdrawAddress, - /** CommunityPool queries the community pool coins. */useCommunityPool - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryValidatorOutstandingRewardsStore { - store = new QueryStore(queryService?.validatorOutstandingRewards); - validatorOutstandingRewards(request: QueryValidatorOutstandingRewardsRequest) { - return this.store.getData(request); - } - } - class QueryValidatorCommissionStore { - store = new QueryStore(queryService?.validatorCommission); - validatorCommission(request: QueryValidatorCommissionRequest) { - return this.store.getData(request); - } - } - class QueryValidatorSlashesStore { - store = new QueryStore(queryService?.validatorSlashes); - validatorSlashes(request: QueryValidatorSlashesRequest) { - return this.store.getData(request); - } - } - class QueryDelegationRewardsStore { - store = new QueryStore(queryService?.delegationRewards); - delegationRewards(request: QueryDelegationRewardsRequest) { - return this.store.getData(request); - } - } - class QueryDelegationTotalRewardsStore { - store = new QueryStore(queryService?.delegationTotalRewards); - delegationTotalRewards(request: QueryDelegationTotalRewardsRequest) { - return this.store.getData(request); - } - } - class QueryDelegatorValidatorsStore { - store = new QueryStore(queryService?.delegatorValidators); - delegatorValidators(request: QueryDelegatorValidatorsRequest) { - return this.store.getData(request); - } - } - class QueryDelegatorWithdrawAddressStore { - store = new QueryStore(queryService?.delegatorWithdrawAddress); - delegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest) { - return this.store.getData(request); - } - } - class QueryCommunityPoolStore { - store = new QueryStore(queryService?.communityPool); - communityPool(request: QueryCommunityPoolRequest) { - return this.store.getData(request); - } - } - return { - /** Params queries params of the distribution module. */QueryParamsStore, - /** ValidatorOutstandingRewards queries rewards of a validator address. */QueryValidatorOutstandingRewardsStore, - /** ValidatorCommission queries accumulated commission for a validator. */QueryValidatorCommissionStore, - /** ValidatorSlashes queries slash events of a validator. */QueryValidatorSlashesStore, - /** DelegationRewards queries the total rewards accrued by a delegation. */QueryDelegationRewardsStore, - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - QueryDelegationTotalRewardsStore, - /** DelegatorValidators queries the validators of a delegator. */QueryDelegatorValidatorsStore, - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */QueryDelegatorWithdrawAddressStore, - /** CommunityPool queries the community pool coins. */QueryCommunityPoolStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/query.ts deleted file mode 100644 index e644674c..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/query.ts +++ /dev/null @@ -1,2261 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Params, ParamsAmino, ParamsSDKType, ValidatorOutstandingRewards, ValidatorOutstandingRewardsAmino, ValidatorOutstandingRewardsSDKType, ValidatorAccumulatedCommission, ValidatorAccumulatedCommissionAmino, ValidatorAccumulatedCommissionSDKType, ValidatorSlashEvent, ValidatorSlashEventAmino, ValidatorSlashEventSDKType, DelegationDelegatorReward, DelegationDelegatorRewardAmino, DelegationDelegatorRewardSDKType } from "./distribution"; -import { DecCoin, DecCoinAmino, DecCoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -export interface QueryValidatorOutstandingRewardsRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest"; - value: Uint8Array; -} -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequestAmino { - /** validator_address defines the validator address to query for. */ - validator_address: string; -} -export interface QueryValidatorOutstandingRewardsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorOutstandingRewardsRequest"; - value: QueryValidatorOutstandingRewardsRequestAmino; -} -/** - * QueryValidatorOutstandingRewardsRequest is the request type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsRequestSDKType { - validator_address: string; -} -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponse { - rewards: ValidatorOutstandingRewards | undefined; -} -export interface QueryValidatorOutstandingRewardsResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse"; - value: Uint8Array; -} -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponseAmino { - rewards?: ValidatorOutstandingRewardsAmino | undefined; -} -export interface QueryValidatorOutstandingRewardsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorOutstandingRewardsResponse"; - value: QueryValidatorOutstandingRewardsResponseAmino; -} -/** - * QueryValidatorOutstandingRewardsResponse is the response type for the - * Query/ValidatorOutstandingRewards RPC method. - */ -export interface QueryValidatorOutstandingRewardsResponseSDKType { - rewards: ValidatorOutstandingRewardsSDKType | undefined; -} -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -export interface QueryValidatorCommissionRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest"; - value: Uint8Array; -} -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequestAmino { - /** validator_address defines the validator address to query for. */ - validator_address: string; -} -export interface QueryValidatorCommissionRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorCommissionRequest"; - value: QueryValidatorCommissionRequestAmino; -} -/** - * QueryValidatorCommissionRequest is the request type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionRequestSDKType { - validator_address: string; -} -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponse { - /** commission defines the commision the validator received. */ - commission: ValidatorAccumulatedCommission | undefined; -} -export interface QueryValidatorCommissionResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse"; - value: Uint8Array; -} -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponseAmino { - /** commission defines the commision the validator received. */ - commission?: ValidatorAccumulatedCommissionAmino | undefined; -} -export interface QueryValidatorCommissionResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorCommissionResponse"; - value: QueryValidatorCommissionResponseAmino; -} -/** - * QueryValidatorCommissionResponse is the response type for the - * Query/ValidatorCommission RPC method - */ -export interface QueryValidatorCommissionResponseSDKType { - commission: ValidatorAccumulatedCommissionSDKType | undefined; -} -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequest { - /** validator_address defines the validator address to query for. */ - validatorAddress: string; - /** starting_height defines the optional starting height to query the slashes. */ - startingHeight: bigint; - /** starting_height defines the optional ending height to query the slashes. */ - endingHeight: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryValidatorSlashesRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest"; - value: Uint8Array; -} -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequestAmino { - /** validator_address defines the validator address to query for. */ - validator_address: string; - /** starting_height defines the optional starting height to query the slashes. */ - starting_height: string; - /** starting_height defines the optional ending height to query the slashes. */ - ending_height: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryValidatorSlashesRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorSlashesRequest"; - value: QueryValidatorSlashesRequestAmino; -} -/** - * QueryValidatorSlashesRequest is the request type for the - * Query/ValidatorSlashes RPC method - */ -export interface QueryValidatorSlashesRequestSDKType { - validator_address: string; - starting_height: bigint; - ending_height: bigint; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponse { - /** slashes defines the slashes the validator received. */ - slashes: ValidatorSlashEvent[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryValidatorSlashesResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse"; - value: Uint8Array; -} -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponseAmino { - /** slashes defines the slashes the validator received. */ - slashes: ValidatorSlashEventAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryValidatorSlashesResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorSlashesResponse"; - value: QueryValidatorSlashesResponseAmino; -} -/** - * QueryValidatorSlashesResponse is the response type for the - * Query/ValidatorSlashes RPC method. - */ -export interface QueryValidatorSlashesResponseSDKType { - slashes: ValidatorSlashEventSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; - /** validator_address defines the validator address to query for. */ - validatorAddress: string; -} -export interface QueryDelegationRewardsRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest"; - value: Uint8Array; -} -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequestAmino { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; - /** validator_address defines the validator address to query for. */ - validator_address: string; -} -export interface QueryDelegationRewardsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegationRewardsRequest"; - value: QueryDelegationRewardsRequestAmino; -} -/** - * QueryDelegationRewardsRequest is the request type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsRequestSDKType { - delegator_address: string; - validator_address: string; -} -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponse { - /** rewards defines the rewards accrued by a delegation. */ - rewards: DecCoin[]; -} -export interface QueryDelegationRewardsResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse"; - value: Uint8Array; -} -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponseAmino { - /** rewards defines the rewards accrued by a delegation. */ - rewards: DecCoinAmino[]; -} -export interface QueryDelegationRewardsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegationRewardsResponse"; - value: QueryDelegationRewardsResponseAmino; -} -/** - * QueryDelegationRewardsResponse is the response type for the - * Query/DelegationRewards RPC method. - */ -export interface QueryDelegationRewardsResponseSDKType { - rewards: DecCoinSDKType[]; -} -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -export interface QueryDelegationTotalRewardsRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest"; - value: Uint8Array; -} -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequestAmino { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; -} -export interface QueryDelegationTotalRewardsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegationTotalRewardsRequest"; - value: QueryDelegationTotalRewardsRequestAmino; -} -/** - * QueryDelegationTotalRewardsRequest is the request type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsRequestSDKType { - delegator_address: string; -} -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponse { - /** rewards defines all the rewards accrued by a delegator. */ - rewards: DelegationDelegatorReward[]; - /** total defines the sum of all the rewards. */ - total: DecCoin[]; -} -export interface QueryDelegationTotalRewardsResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse"; - value: Uint8Array; -} -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponseAmino { - /** rewards defines all the rewards accrued by a delegator. */ - rewards: DelegationDelegatorRewardAmino[]; - /** total defines the sum of all the rewards. */ - total: DecCoinAmino[]; -} -export interface QueryDelegationTotalRewardsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegationTotalRewardsResponse"; - value: QueryDelegationTotalRewardsResponseAmino; -} -/** - * QueryDelegationTotalRewardsResponse is the response type for the - * Query/DelegationTotalRewards RPC method. - */ -export interface QueryDelegationTotalRewardsResponseSDKType { - rewards: DelegationDelegatorRewardSDKType[]; - total: DecCoinSDKType[]; -} -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -export interface QueryDelegatorValidatorsRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest"; - value: Uint8Array; -} -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequestAmino { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; -} -export interface QueryDelegatorValidatorsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorsRequest"; - value: QueryDelegatorValidatorsRequestAmino; -} -/** - * QueryDelegatorValidatorsRequest is the request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequestSDKType { - delegator_address: string; -} -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the validators a delegator is delegating for. */ - validators: string[]; -} -export interface QueryDelegatorValidatorsResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse"; - value: Uint8Array; -} -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponseAmino { - /** validators defines the validators a delegator is delegating for. */ - validators: string[]; -} -export interface QueryDelegatorValidatorsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorsResponse"; - value: QueryDelegatorValidatorsResponseAmino; -} -/** - * QueryDelegatorValidatorsResponse is the response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponseSDKType { - validators: string[]; -} -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequest { - /** delegator_address defines the delegator address to query for. */ - delegatorAddress: string; -} -export interface QueryDelegatorWithdrawAddressRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest"; - value: Uint8Array; -} -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequestAmino { - /** delegator_address defines the delegator address to query for. */ - delegator_address: string; -} -export interface QueryDelegatorWithdrawAddressRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorWithdrawAddressRequest"; - value: QueryDelegatorWithdrawAddressRequestAmino; -} -/** - * QueryDelegatorWithdrawAddressRequest is the request type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressRequestSDKType { - delegator_address: string; -} -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponse { - /** withdraw_address defines the delegator address to query for. */ - withdrawAddress: string; -} -export interface QueryDelegatorWithdrawAddressResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse"; - value: Uint8Array; -} -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponseAmino { - /** withdraw_address defines the delegator address to query for. */ - withdraw_address: string; -} -export interface QueryDelegatorWithdrawAddressResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorWithdrawAddressResponse"; - value: QueryDelegatorWithdrawAddressResponseAmino; -} -/** - * QueryDelegatorWithdrawAddressResponse is the response type for the - * Query/DelegatorWithdrawAddress RPC method. - */ -export interface QueryDelegatorWithdrawAddressResponseSDKType { - withdraw_address: string; -} -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequest {} -export interface QueryCommunityPoolRequestProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryCommunityPoolRequest"; - value: Uint8Array; -} -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequestAmino {} -export interface QueryCommunityPoolRequestAminoMsg { - type: "cosmos-sdk/QueryCommunityPoolRequest"; - value: QueryCommunityPoolRequestAmino; -} -/** - * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC - * method. - */ -export interface QueryCommunityPoolRequestSDKType {} -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponse { - /** pool defines community pool's coins. */ - pool: DecCoin[]; -} -export interface QueryCommunityPoolResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.QueryCommunityPoolResponse"; - value: Uint8Array; -} -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponseAmino { - /** pool defines community pool's coins. */ - pool: DecCoinAmino[]; -} -export interface QueryCommunityPoolResponseAminoMsg { - type: "cosmos-sdk/QueryCommunityPoolResponse"; - value: QueryCommunityPoolResponseAmino; -} -/** - * QueryCommunityPoolResponse is the response type for the Query/CommunityPool - * RPC method. - */ -export interface QueryCommunityPoolResponseSDKType { - pool: DecCoinSDKType[]; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorOutstandingRewardsRequest(): QueryValidatorOutstandingRewardsRequest { - return { - validatorAddress: "" - }; -} -export const QueryValidatorOutstandingRewardsRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", - aminoType: "cosmos-sdk/QueryValidatorOutstandingRewardsRequest", - encode(message: QueryValidatorOutstandingRewardsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorOutstandingRewardsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorOutstandingRewardsRequest { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" - }; - }, - toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorOutstandingRewardsRequest { - const message = createBaseQueryValidatorOutstandingRewardsRequest(); - message.validatorAddress = object.validatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryValidatorOutstandingRewardsRequestSDKType): QueryValidatorOutstandingRewardsRequest { - return { - validatorAddress: object?.validator_address - }; - }, - toSDK(message: QueryValidatorOutstandingRewardsRequest): QueryValidatorOutstandingRewardsRequestSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAmino(object: QueryValidatorOutstandingRewardsRequestAmino): QueryValidatorOutstandingRewardsRequest { - return { - validatorAddress: object.validator_address - }; - }, - toAmino(message: QueryValidatorOutstandingRewardsRequest): QueryValidatorOutstandingRewardsRequestAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAminoMsg(object: QueryValidatorOutstandingRewardsRequestAminoMsg): QueryValidatorOutstandingRewardsRequest { - return QueryValidatorOutstandingRewardsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorOutstandingRewardsRequest): QueryValidatorOutstandingRewardsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorOutstandingRewardsRequest", - value: QueryValidatorOutstandingRewardsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorOutstandingRewardsRequestProtoMsg): QueryValidatorOutstandingRewardsRequest { - return QueryValidatorOutstandingRewardsRequest.decode(message.value); - }, - toProto(message: QueryValidatorOutstandingRewardsRequest): Uint8Array { - return QueryValidatorOutstandingRewardsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorOutstandingRewardsRequest): QueryValidatorOutstandingRewardsRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", - value: QueryValidatorOutstandingRewardsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorOutstandingRewardsResponse(): QueryValidatorOutstandingRewardsResponse { - return { - rewards: ValidatorOutstandingRewards.fromPartial({}) - }; -} -export const QueryValidatorOutstandingRewardsResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", - aminoType: "cosmos-sdk/QueryValidatorOutstandingRewardsResponse", - encode(message: QueryValidatorOutstandingRewardsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.rewards !== undefined) { - ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorOutstandingRewardsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards = ValidatorOutstandingRewards.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorOutstandingRewardsResponse { - return { - rewards: isSet(object.rewards) ? ValidatorOutstandingRewards.fromJSON(object.rewards) : undefined - }; - }, - toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown { - const obj: any = {}; - message.rewards !== undefined && (obj.rewards = message.rewards ? ValidatorOutstandingRewards.toJSON(message.rewards) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorOutstandingRewardsResponse { - const message = createBaseQueryValidatorOutstandingRewardsResponse(); - message.rewards = object.rewards !== undefined && object.rewards !== null ? ValidatorOutstandingRewards.fromPartial(object.rewards) : undefined; - return message; - }, - fromSDK(object: QueryValidatorOutstandingRewardsResponseSDKType): QueryValidatorOutstandingRewardsResponse { - return { - rewards: object.rewards ? ValidatorOutstandingRewards.fromSDK(object.rewards) : undefined - }; - }, - toSDK(message: QueryValidatorOutstandingRewardsResponse): QueryValidatorOutstandingRewardsResponseSDKType { - const obj: any = {}; - message.rewards !== undefined && (obj.rewards = message.rewards ? ValidatorOutstandingRewards.toSDK(message.rewards) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorOutstandingRewardsResponseAmino): QueryValidatorOutstandingRewardsResponse { - return { - rewards: object?.rewards ? ValidatorOutstandingRewards.fromAmino(object.rewards) : undefined - }; - }, - toAmino(message: QueryValidatorOutstandingRewardsResponse): QueryValidatorOutstandingRewardsResponseAmino { - const obj: any = {}; - obj.rewards = message.rewards ? ValidatorOutstandingRewards.toAmino(message.rewards) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorOutstandingRewardsResponseAminoMsg): QueryValidatorOutstandingRewardsResponse { - return QueryValidatorOutstandingRewardsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorOutstandingRewardsResponse): QueryValidatorOutstandingRewardsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorOutstandingRewardsResponse", - value: QueryValidatorOutstandingRewardsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorOutstandingRewardsResponseProtoMsg): QueryValidatorOutstandingRewardsResponse { - return QueryValidatorOutstandingRewardsResponse.decode(message.value); - }, - toProto(message: QueryValidatorOutstandingRewardsResponse): Uint8Array { - return QueryValidatorOutstandingRewardsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorOutstandingRewardsResponse): QueryValidatorOutstandingRewardsResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", - value: QueryValidatorOutstandingRewardsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorCommissionRequest(): QueryValidatorCommissionRequest { - return { - validatorAddress: "" - }; -} -export const QueryValidatorCommissionRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest", - aminoType: "cosmos-sdk/QueryValidatorCommissionRequest", - encode(message: QueryValidatorCommissionRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorCommissionRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorCommissionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorCommissionRequest { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" - }; - }, - toJSON(message: QueryValidatorCommissionRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorCommissionRequest { - const message = createBaseQueryValidatorCommissionRequest(); - message.validatorAddress = object.validatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryValidatorCommissionRequestSDKType): QueryValidatorCommissionRequest { - return { - validatorAddress: object?.validator_address - }; - }, - toSDK(message: QueryValidatorCommissionRequest): QueryValidatorCommissionRequestSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAmino(object: QueryValidatorCommissionRequestAmino): QueryValidatorCommissionRequest { - return { - validatorAddress: object.validator_address - }; - }, - toAmino(message: QueryValidatorCommissionRequest): QueryValidatorCommissionRequestAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAminoMsg(object: QueryValidatorCommissionRequestAminoMsg): QueryValidatorCommissionRequest { - return QueryValidatorCommissionRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorCommissionRequest): QueryValidatorCommissionRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorCommissionRequest", - value: QueryValidatorCommissionRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorCommissionRequestProtoMsg): QueryValidatorCommissionRequest { - return QueryValidatorCommissionRequest.decode(message.value); - }, - toProto(message: QueryValidatorCommissionRequest): Uint8Array { - return QueryValidatorCommissionRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorCommissionRequest): QueryValidatorCommissionRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest", - value: QueryValidatorCommissionRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorCommissionResponse(): QueryValidatorCommissionResponse { - return { - commission: ValidatorAccumulatedCommission.fromPartial({}) - }; -} -export const QueryValidatorCommissionResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse", - aminoType: "cosmos-sdk/QueryValidatorCommissionResponse", - encode(message: QueryValidatorCommissionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.commission !== undefined) { - ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorCommissionResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorCommissionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commission = ValidatorAccumulatedCommission.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorCommissionResponse { - return { - commission: isSet(object.commission) ? ValidatorAccumulatedCommission.fromJSON(object.commission) : undefined - }; - }, - toJSON(message: QueryValidatorCommissionResponse): unknown { - const obj: any = {}; - message.commission !== undefined && (obj.commission = message.commission ? ValidatorAccumulatedCommission.toJSON(message.commission) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorCommissionResponse { - const message = createBaseQueryValidatorCommissionResponse(); - message.commission = object.commission !== undefined && object.commission !== null ? ValidatorAccumulatedCommission.fromPartial(object.commission) : undefined; - return message; - }, - fromSDK(object: QueryValidatorCommissionResponseSDKType): QueryValidatorCommissionResponse { - return { - commission: object.commission ? ValidatorAccumulatedCommission.fromSDK(object.commission) : undefined - }; - }, - toSDK(message: QueryValidatorCommissionResponse): QueryValidatorCommissionResponseSDKType { - const obj: any = {}; - message.commission !== undefined && (obj.commission = message.commission ? ValidatorAccumulatedCommission.toSDK(message.commission) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorCommissionResponseAmino): QueryValidatorCommissionResponse { - return { - commission: object?.commission ? ValidatorAccumulatedCommission.fromAmino(object.commission) : undefined - }; - }, - toAmino(message: QueryValidatorCommissionResponse): QueryValidatorCommissionResponseAmino { - const obj: any = {}; - obj.commission = message.commission ? ValidatorAccumulatedCommission.toAmino(message.commission) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorCommissionResponseAminoMsg): QueryValidatorCommissionResponse { - return QueryValidatorCommissionResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorCommissionResponse): QueryValidatorCommissionResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorCommissionResponse", - value: QueryValidatorCommissionResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorCommissionResponseProtoMsg): QueryValidatorCommissionResponse { - return QueryValidatorCommissionResponse.decode(message.value); - }, - toProto(message: QueryValidatorCommissionResponse): Uint8Array { - return QueryValidatorCommissionResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorCommissionResponse): QueryValidatorCommissionResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse", - value: QueryValidatorCommissionResponse.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorSlashesRequest(): QueryValidatorSlashesRequest { - return { - validatorAddress: "", - startingHeight: BigInt(0), - endingHeight: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryValidatorSlashesRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest", - aminoType: "cosmos-sdk/QueryValidatorSlashesRequest", - encode(message: QueryValidatorSlashesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.startingHeight !== BigInt(0)) { - writer.uint32(16).uint64(message.startingHeight); - } - if (message.endingHeight !== BigInt(0)) { - writer.uint32(24).uint64(message.endingHeight); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorSlashesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorSlashesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.startingHeight = reader.uint64(); - break; - case 3: - message.endingHeight = reader.uint64(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorSlashesRequest { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - startingHeight: isSet(object.startingHeight) ? BigInt(object.startingHeight.toString()) : BigInt(0), - endingHeight: isSet(object.endingHeight) ? BigInt(object.endingHeight.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorSlashesRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.startingHeight !== undefined && (obj.startingHeight = (message.startingHeight || BigInt(0)).toString()); - message.endingHeight !== undefined && (obj.endingHeight = (message.endingHeight || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorSlashesRequest { - const message = createBaseQueryValidatorSlashesRequest(); - message.validatorAddress = object.validatorAddress ?? ""; - message.startingHeight = object.startingHeight !== undefined && object.startingHeight !== null ? BigInt(object.startingHeight.toString()) : BigInt(0); - message.endingHeight = object.endingHeight !== undefined && object.endingHeight !== null ? BigInt(object.endingHeight.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorSlashesRequestSDKType): QueryValidatorSlashesRequest { - return { - validatorAddress: object?.validator_address, - startingHeight: object?.starting_height, - endingHeight: object?.ending_height, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorSlashesRequest): QueryValidatorSlashesRequestSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.starting_height = message.startingHeight; - obj.ending_height = message.endingHeight; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorSlashesRequestAmino): QueryValidatorSlashesRequest { - return { - validatorAddress: object.validator_address, - startingHeight: BigInt(object.starting_height), - endingHeight: BigInt(object.ending_height), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorSlashesRequest): QueryValidatorSlashesRequestAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.starting_height = message.startingHeight ? message.startingHeight.toString() : undefined; - obj.ending_height = message.endingHeight ? message.endingHeight.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorSlashesRequestAminoMsg): QueryValidatorSlashesRequest { - return QueryValidatorSlashesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorSlashesRequest): QueryValidatorSlashesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorSlashesRequest", - value: QueryValidatorSlashesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorSlashesRequestProtoMsg): QueryValidatorSlashesRequest { - return QueryValidatorSlashesRequest.decode(message.value); - }, - toProto(message: QueryValidatorSlashesRequest): Uint8Array { - return QueryValidatorSlashesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorSlashesRequest): QueryValidatorSlashesRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest", - value: QueryValidatorSlashesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorSlashesResponse(): QueryValidatorSlashesResponse { - return { - slashes: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryValidatorSlashesResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse", - aminoType: "cosmos-sdk/QueryValidatorSlashesResponse", - encode(message: QueryValidatorSlashesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.slashes) { - ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorSlashesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorSlashesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.slashes.push(ValidatorSlashEvent.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorSlashesResponse { - return { - slashes: Array.isArray(object?.slashes) ? object.slashes.map((e: any) => ValidatorSlashEvent.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorSlashesResponse): unknown { - const obj: any = {}; - if (message.slashes) { - obj.slashes = message.slashes.map(e => e ? ValidatorSlashEvent.toJSON(e) : undefined); - } else { - obj.slashes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorSlashesResponse { - const message = createBaseQueryValidatorSlashesResponse(); - message.slashes = object.slashes?.map(e => ValidatorSlashEvent.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorSlashesResponseSDKType): QueryValidatorSlashesResponse { - return { - slashes: Array.isArray(object?.slashes) ? object.slashes.map((e: any) => ValidatorSlashEvent.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorSlashesResponse): QueryValidatorSlashesResponseSDKType { - const obj: any = {}; - if (message.slashes) { - obj.slashes = message.slashes.map(e => e ? ValidatorSlashEvent.toSDK(e) : undefined); - } else { - obj.slashes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorSlashesResponseAmino): QueryValidatorSlashesResponse { - return { - slashes: Array.isArray(object?.slashes) ? object.slashes.map((e: any) => ValidatorSlashEvent.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorSlashesResponse): QueryValidatorSlashesResponseAmino { - const obj: any = {}; - if (message.slashes) { - obj.slashes = message.slashes.map(e => e ? ValidatorSlashEvent.toAmino(e) : undefined); - } else { - obj.slashes = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorSlashesResponseAminoMsg): QueryValidatorSlashesResponse { - return QueryValidatorSlashesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorSlashesResponse): QueryValidatorSlashesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorSlashesResponse", - value: QueryValidatorSlashesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorSlashesResponseProtoMsg): QueryValidatorSlashesResponse { - return QueryValidatorSlashesResponse.decode(message.value); - }, - toProto(message: QueryValidatorSlashesResponse): Uint8Array { - return QueryValidatorSlashesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorSlashesResponse): QueryValidatorSlashesResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse", - value: QueryValidatorSlashesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegationRewardsRequest(): QueryDelegationRewardsRequest { - return { - delegatorAddress: "", - validatorAddress: "" - }; -} -export const QueryDelegationRewardsRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest", - aminoType: "cosmos-sdk/QueryDelegationRewardsRequest", - encode(message: QueryDelegationRewardsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegationRewardsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegationRewardsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegationRewardsRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" - }; - }, - toJSON(message: QueryDelegationRewardsRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegationRewardsRequest { - const message = createBaseQueryDelegationRewardsRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryDelegationRewardsRequestSDKType): QueryDelegationRewardsRequest { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address - }; - }, - toSDK(message: QueryDelegationRewardsRequest): QueryDelegationRewardsRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAmino(object: QueryDelegationRewardsRequestAmino): QueryDelegationRewardsRequest { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address - }; - }, - toAmino(message: QueryDelegationRewardsRequest): QueryDelegationRewardsRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAminoMsg(object: QueryDelegationRewardsRequestAminoMsg): QueryDelegationRewardsRequest { - return QueryDelegationRewardsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegationRewardsRequest): QueryDelegationRewardsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegationRewardsRequest", - value: QueryDelegationRewardsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegationRewardsRequestProtoMsg): QueryDelegationRewardsRequest { - return QueryDelegationRewardsRequest.decode(message.value); - }, - toProto(message: QueryDelegationRewardsRequest): Uint8Array { - return QueryDelegationRewardsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegationRewardsRequest): QueryDelegationRewardsRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest", - value: QueryDelegationRewardsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegationRewardsResponse(): QueryDelegationRewardsResponse { - return { - rewards: [] - }; -} -export const QueryDelegationRewardsResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse", - aminoType: "cosmos-sdk/QueryDelegationRewardsResponse", - encode(message: QueryDelegationRewardsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.rewards) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegationRewardsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegationRewardsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegationRewardsResponse { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryDelegationRewardsResponse): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegationRewardsResponse { - const message = createBaseQueryDelegationRewardsResponse(); - message.rewards = object.rewards?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryDelegationRewardsResponseSDKType): QueryDelegationRewardsResponse { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryDelegationRewardsResponse): QueryDelegationRewardsResponseSDKType { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromAmino(object: QueryDelegationRewardsResponseAmino): QueryDelegationRewardsResponse { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryDelegationRewardsResponse): QueryDelegationRewardsResponseAmino { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromAminoMsg(object: QueryDelegationRewardsResponseAminoMsg): QueryDelegationRewardsResponse { - return QueryDelegationRewardsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegationRewardsResponse): QueryDelegationRewardsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegationRewardsResponse", - value: QueryDelegationRewardsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegationRewardsResponseProtoMsg): QueryDelegationRewardsResponse { - return QueryDelegationRewardsResponse.decode(message.value); - }, - toProto(message: QueryDelegationRewardsResponse): Uint8Array { - return QueryDelegationRewardsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegationRewardsResponse): QueryDelegationRewardsResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse", - value: QueryDelegationRewardsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegationTotalRewardsRequest(): QueryDelegationTotalRewardsRequest { - return { - delegatorAddress: "" - }; -} -export const QueryDelegationTotalRewardsRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest", - aminoType: "cosmos-sdk/QueryDelegationTotalRewardsRequest", - encode(message: QueryDelegationTotalRewardsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegationTotalRewardsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegationTotalRewardsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegationTotalRewardsRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" - }; - }, - toJSON(message: QueryDelegationTotalRewardsRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsRequest { - const message = createBaseQueryDelegationTotalRewardsRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryDelegationTotalRewardsRequestSDKType): QueryDelegationTotalRewardsRequest { - return { - delegatorAddress: object?.delegator_address - }; - }, - toSDK(message: QueryDelegationTotalRewardsRequest): QueryDelegationTotalRewardsRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAmino(object: QueryDelegationTotalRewardsRequestAmino): QueryDelegationTotalRewardsRequest { - return { - delegatorAddress: object.delegator_address - }; - }, - toAmino(message: QueryDelegationTotalRewardsRequest): QueryDelegationTotalRewardsRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAminoMsg(object: QueryDelegationTotalRewardsRequestAminoMsg): QueryDelegationTotalRewardsRequest { - return QueryDelegationTotalRewardsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegationTotalRewardsRequest): QueryDelegationTotalRewardsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegationTotalRewardsRequest", - value: QueryDelegationTotalRewardsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegationTotalRewardsRequestProtoMsg): QueryDelegationTotalRewardsRequest { - return QueryDelegationTotalRewardsRequest.decode(message.value); - }, - toProto(message: QueryDelegationTotalRewardsRequest): Uint8Array { - return QueryDelegationTotalRewardsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegationTotalRewardsRequest): QueryDelegationTotalRewardsRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest", - value: QueryDelegationTotalRewardsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegationTotalRewardsResponse(): QueryDelegationTotalRewardsResponse { - return { - rewards: [], - total: [] - }; -} -export const QueryDelegationTotalRewardsResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse", - aminoType: "cosmos-sdk/QueryDelegationTotalRewardsResponse", - encode(message: QueryDelegationTotalRewardsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.rewards) { - DelegationDelegatorReward.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.total) { - DecCoin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegationTotalRewardsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegationTotalRewardsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rewards.push(DelegationDelegatorReward.decode(reader, reader.uint32())); - break; - case 2: - message.total.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegationTotalRewardsResponse { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DelegationDelegatorReward.fromJSON(e)) : [], - total: Array.isArray(object?.total) ? object.total.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryDelegationTotalRewardsResponse): unknown { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DelegationDelegatorReward.toJSON(e) : undefined); - } else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.total = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsResponse { - const message = createBaseQueryDelegationTotalRewardsResponse(); - message.rewards = object.rewards?.map(e => DelegationDelegatorReward.fromPartial(e)) || []; - message.total = object.total?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryDelegationTotalRewardsResponseSDKType): QueryDelegationTotalRewardsResponse { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DelegationDelegatorReward.fromSDK(e)) : [], - total: Array.isArray(object?.total) ? object.total.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryDelegationTotalRewardsResponse): QueryDelegationTotalRewardsResponseSDKType { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DelegationDelegatorReward.toSDK(e) : undefined); - } else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.total = []; - } - return obj; - }, - fromAmino(object: QueryDelegationTotalRewardsResponseAmino): QueryDelegationTotalRewardsResponse { - return { - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DelegationDelegatorReward.fromAmino(e)) : [], - total: Array.isArray(object?.total) ? object.total.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryDelegationTotalRewardsResponse): QueryDelegationTotalRewardsResponseAmino { - const obj: any = {}; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? DelegationDelegatorReward.toAmino(e) : undefined); - } else { - obj.rewards = []; - } - if (message.total) { - obj.total = message.total.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.total = []; - } - return obj; - }, - fromAminoMsg(object: QueryDelegationTotalRewardsResponseAminoMsg): QueryDelegationTotalRewardsResponse { - return QueryDelegationTotalRewardsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegationTotalRewardsResponse): QueryDelegationTotalRewardsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegationTotalRewardsResponse", - value: QueryDelegationTotalRewardsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegationTotalRewardsResponseProtoMsg): QueryDelegationTotalRewardsResponse { - return QueryDelegationTotalRewardsResponse.decode(message.value); - }, - toProto(message: QueryDelegationTotalRewardsResponse): Uint8Array { - return QueryDelegationTotalRewardsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegationTotalRewardsResponse): QueryDelegationTotalRewardsResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse", - value: QueryDelegationTotalRewardsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { - return { - delegatorAddress: "" - }; -} -export const QueryDelegatorValidatorsRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest", - aminoType: "cosmos-sdk/QueryDelegatorValidatorsRequest", - encode(message: QueryDelegatorValidatorsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorValidatorsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorValidatorsRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" - }; - }, - toJSON(message: QueryDelegatorValidatorsRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { - const message = createBaseQueryDelegatorValidatorsRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryDelegatorValidatorsRequestSDKType): QueryDelegatorValidatorsRequest { - return { - delegatorAddress: object?.delegator_address - }; - }, - toSDK(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAmino(object: QueryDelegatorValidatorsRequestAmino): QueryDelegatorValidatorsRequest { - return { - delegatorAddress: object.delegator_address - }; - }, - toAmino(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAminoMsg(object: QueryDelegatorValidatorsRequestAminoMsg): QueryDelegatorValidatorsRequest { - return QueryDelegatorValidatorsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorValidatorsRequest", - value: QueryDelegatorValidatorsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorValidatorsRequestProtoMsg): QueryDelegatorValidatorsRequest { - return QueryDelegatorValidatorsRequest.decode(message.value); - }, - toProto(message: QueryDelegatorValidatorsRequest): Uint8Array { - return QueryDelegatorValidatorsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest", - value: QueryDelegatorValidatorsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { - return { - validators: [] - }; -} -export const QueryDelegatorValidatorsResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse", - aminoType: "cosmos-sdk/QueryDelegatorValidatorsResponse", - encode(message: QueryDelegatorValidatorsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validators) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorValidatorsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: QueryDelegatorValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e); - } else { - obj.validators = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse { - const message = createBaseQueryDelegatorValidatorsResponse(); - message.validators = object.validators?.map(e => e) || []; - return message; - }, - fromSDK(object: QueryDelegatorValidatorsResponseSDKType): QueryDelegatorValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => e) : [] - }; - }, - toSDK(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseSDKType { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e); - } else { - obj.validators = []; - } - return obj; - }, - fromAmino(object: QueryDelegatorValidatorsResponseAmino): QueryDelegatorValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => e) : [] - }; - }, - toAmino(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseAmino { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e); - } else { - obj.validators = []; - } - return obj; - }, - fromAminoMsg(object: QueryDelegatorValidatorsResponseAminoMsg): QueryDelegatorValidatorsResponse { - return QueryDelegatorValidatorsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorValidatorsResponse", - value: QueryDelegatorValidatorsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorValidatorsResponseProtoMsg): QueryDelegatorValidatorsResponse { - return QueryDelegatorValidatorsResponse.decode(message.value); - }, - toProto(message: QueryDelegatorValidatorsResponse): Uint8Array { - return QueryDelegatorValidatorsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse", - value: QueryDelegatorValidatorsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorWithdrawAddressRequest(): QueryDelegatorWithdrawAddressRequest { - return { - delegatorAddress: "" - }; -} -export const QueryDelegatorWithdrawAddressRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", - aminoType: "cosmos-sdk/QueryDelegatorWithdrawAddressRequest", - encode(message: QueryDelegatorWithdrawAddressRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorWithdrawAddressRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorWithdrawAddressRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" - }; - }, - toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorWithdrawAddressRequest { - const message = createBaseQueryDelegatorWithdrawAddressRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryDelegatorWithdrawAddressRequestSDKType): QueryDelegatorWithdrawAddressRequest { - return { - delegatorAddress: object?.delegator_address - }; - }, - toSDK(message: QueryDelegatorWithdrawAddressRequest): QueryDelegatorWithdrawAddressRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAmino(object: QueryDelegatorWithdrawAddressRequestAmino): QueryDelegatorWithdrawAddressRequest { - return { - delegatorAddress: object.delegator_address - }; - }, - toAmino(message: QueryDelegatorWithdrawAddressRequest): QueryDelegatorWithdrawAddressRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAminoMsg(object: QueryDelegatorWithdrawAddressRequestAminoMsg): QueryDelegatorWithdrawAddressRequest { - return QueryDelegatorWithdrawAddressRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorWithdrawAddressRequest): QueryDelegatorWithdrawAddressRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorWithdrawAddressRequest", - value: QueryDelegatorWithdrawAddressRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorWithdrawAddressRequestProtoMsg): QueryDelegatorWithdrawAddressRequest { - return QueryDelegatorWithdrawAddressRequest.decode(message.value); - }, - toProto(message: QueryDelegatorWithdrawAddressRequest): Uint8Array { - return QueryDelegatorWithdrawAddressRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorWithdrawAddressRequest): QueryDelegatorWithdrawAddressRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", - value: QueryDelegatorWithdrawAddressRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorWithdrawAddressResponse(): QueryDelegatorWithdrawAddressResponse { - return { - withdrawAddress: "" - }; -} -export const QueryDelegatorWithdrawAddressResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", - aminoType: "cosmos-sdk/QueryDelegatorWithdrawAddressResponse", - encode(message: QueryDelegatorWithdrawAddressResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.withdrawAddress !== "") { - writer.uint32(10).string(message.withdrawAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorWithdrawAddressResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorWithdrawAddressResponse { - return { - withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : "" - }; - }, - toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown { - const obj: any = {}; - message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorWithdrawAddressResponse { - const message = createBaseQueryDelegatorWithdrawAddressResponse(); - message.withdrawAddress = object.withdrawAddress ?? ""; - return message; - }, - fromSDK(object: QueryDelegatorWithdrawAddressResponseSDKType): QueryDelegatorWithdrawAddressResponse { - return { - withdrawAddress: object?.withdraw_address - }; - }, - toSDK(message: QueryDelegatorWithdrawAddressResponse): QueryDelegatorWithdrawAddressResponseSDKType { - const obj: any = {}; - obj.withdraw_address = message.withdrawAddress; - return obj; - }, - fromAmino(object: QueryDelegatorWithdrawAddressResponseAmino): QueryDelegatorWithdrawAddressResponse { - return { - withdrawAddress: object.withdraw_address - }; - }, - toAmino(message: QueryDelegatorWithdrawAddressResponse): QueryDelegatorWithdrawAddressResponseAmino { - const obj: any = {}; - obj.withdraw_address = message.withdrawAddress; - return obj; - }, - fromAminoMsg(object: QueryDelegatorWithdrawAddressResponseAminoMsg): QueryDelegatorWithdrawAddressResponse { - return QueryDelegatorWithdrawAddressResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorWithdrawAddressResponse): QueryDelegatorWithdrawAddressResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorWithdrawAddressResponse", - value: QueryDelegatorWithdrawAddressResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorWithdrawAddressResponseProtoMsg): QueryDelegatorWithdrawAddressResponse { - return QueryDelegatorWithdrawAddressResponse.decode(message.value); - }, - toProto(message: QueryDelegatorWithdrawAddressResponse): Uint8Array { - return QueryDelegatorWithdrawAddressResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorWithdrawAddressResponse): QueryDelegatorWithdrawAddressResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", - value: QueryDelegatorWithdrawAddressResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCommunityPoolRequest(): QueryCommunityPoolRequest { - return {}; -} -export const QueryCommunityPoolRequest = { - typeUrl: "/cosmos.distribution.v1beta1.QueryCommunityPoolRequest", - aminoType: "cosmos-sdk/QueryCommunityPoolRequest", - encode(_: QueryCommunityPoolRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCommunityPoolRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCommunityPoolRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryCommunityPoolRequest { - return {}; - }, - toJSON(_: QueryCommunityPoolRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryCommunityPoolRequest { - const message = createBaseQueryCommunityPoolRequest(); - return message; - }, - fromSDK(_: QueryCommunityPoolRequestSDKType): QueryCommunityPoolRequest { - return {}; - }, - toSDK(_: QueryCommunityPoolRequest): QueryCommunityPoolRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryCommunityPoolRequestAmino): QueryCommunityPoolRequest { - return {}; - }, - toAmino(_: QueryCommunityPoolRequest): QueryCommunityPoolRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryCommunityPoolRequestAminoMsg): QueryCommunityPoolRequest { - return QueryCommunityPoolRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCommunityPoolRequest): QueryCommunityPoolRequestAminoMsg { - return { - type: "cosmos-sdk/QueryCommunityPoolRequest", - value: QueryCommunityPoolRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCommunityPoolRequestProtoMsg): QueryCommunityPoolRequest { - return QueryCommunityPoolRequest.decode(message.value); - }, - toProto(message: QueryCommunityPoolRequest): Uint8Array { - return QueryCommunityPoolRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCommunityPoolRequest): QueryCommunityPoolRequestProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryCommunityPoolRequest", - value: QueryCommunityPoolRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCommunityPoolResponse(): QueryCommunityPoolResponse { - return { - pool: [] - }; -} -export const QueryCommunityPoolResponse = { - typeUrl: "/cosmos.distribution.v1beta1.QueryCommunityPoolResponse", - aminoType: "cosmos-sdk/QueryCommunityPoolResponse", - encode(message: QueryCommunityPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pool) { - DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCommunityPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCommunityPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool.push(DecCoin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCommunityPoolResponse { - return { - pool: Array.isArray(object?.pool) ? object.pool.map((e: any) => DecCoin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryCommunityPoolResponse): unknown { - const obj: any = {}; - if (message.pool) { - obj.pool = message.pool.map(e => e ? DecCoin.toJSON(e) : undefined); - } else { - obj.pool = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryCommunityPoolResponse { - const message = createBaseQueryCommunityPoolResponse(); - message.pool = object.pool?.map(e => DecCoin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryCommunityPoolResponseSDKType): QueryCommunityPoolResponse { - return { - pool: Array.isArray(object?.pool) ? object.pool.map((e: any) => DecCoin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryCommunityPoolResponse): QueryCommunityPoolResponseSDKType { - const obj: any = {}; - if (message.pool) { - obj.pool = message.pool.map(e => e ? DecCoin.toSDK(e) : undefined); - } else { - obj.pool = []; - } - return obj; - }, - fromAmino(object: QueryCommunityPoolResponseAmino): QueryCommunityPoolResponse { - return { - pool: Array.isArray(object?.pool) ? object.pool.map((e: any) => DecCoin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryCommunityPoolResponse): QueryCommunityPoolResponseAmino { - const obj: any = {}; - if (message.pool) { - obj.pool = message.pool.map(e => e ? DecCoin.toAmino(e) : undefined); - } else { - obj.pool = []; - } - return obj; - }, - fromAminoMsg(object: QueryCommunityPoolResponseAminoMsg): QueryCommunityPoolResponse { - return QueryCommunityPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCommunityPoolResponse): QueryCommunityPoolResponseAminoMsg { - return { - type: "cosmos-sdk/QueryCommunityPoolResponse", - value: QueryCommunityPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCommunityPoolResponseProtoMsg): QueryCommunityPoolResponse { - return QueryCommunityPoolResponse.decode(message.value); - }, - toProto(message: QueryCommunityPoolResponse): Uint8Array { - return QueryCommunityPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCommunityPoolResponse): QueryCommunityPoolResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.QueryCommunityPoolResponse", - value: QueryCommunityPoolResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.amino.ts deleted file mode 100644 index 5b1270cb..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.amino.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool } from "./tx"; -export const AminoConverter = { - "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress": { - aminoType: "cosmos-sdk/MsgModifyWithdrawAddress", - toAmino: MsgSetWithdrawAddress.toAmino, - fromAmino: MsgSetWithdrawAddress.fromAmino - }, - "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward": { - aminoType: "cosmos-sdk/MsgWithdrawDelegationReward", - toAmino: MsgWithdrawDelegatorReward.toAmino, - fromAmino: MsgWithdrawDelegatorReward.fromAmino - }, - "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission": { - aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission", - toAmino: MsgWithdrawValidatorCommission.toAmino, - fromAmino: MsgWithdrawValidatorCommission.fromAmino - }, - "/cosmos.distribution.v1beta1.MsgFundCommunityPool": { - aminoType: "cosmos-sdk/MsgFundCommunityPool", - toAmino: MsgFundCommunityPool.toAmino, - fromAmino: MsgFundCommunityPool.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.registry.ts deleted file mode 100644 index 39f7df87..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.registry.ts +++ /dev/null @@ -1,141 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - setWithdrawAddress(value: MsgSetWithdrawAddress) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - value: MsgSetWithdrawAddress.encode(value).finish() - }; - }, - withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - value: MsgWithdrawDelegatorReward.encode(value).finish() - }; - }, - withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - value: MsgWithdrawValidatorCommission.encode(value).finish() - }; - }, - fundCommunityPool(value: MsgFundCommunityPool) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - value: MsgFundCommunityPool.encode(value).finish() - }; - } - }, - withTypeUrl: { - setWithdrawAddress(value: MsgSetWithdrawAddress) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - value - }; - }, - withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - value - }; - }, - withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - value - }; - }, - fundCommunityPool(value: MsgFundCommunityPool) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - value - }; - } - }, - toJSON: { - setWithdrawAddress(value: MsgSetWithdrawAddress) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - value: MsgSetWithdrawAddress.toJSON(value) - }; - }, - withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - value: MsgWithdrawDelegatorReward.toJSON(value) - }; - }, - withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - value: MsgWithdrawValidatorCommission.toJSON(value) - }; - }, - fundCommunityPool(value: MsgFundCommunityPool) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - value: MsgFundCommunityPool.toJSON(value) - }; - } - }, - fromJSON: { - setWithdrawAddress(value: any) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - value: MsgSetWithdrawAddress.fromJSON(value) - }; - }, - withdrawDelegatorReward(value: any) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - value: MsgWithdrawDelegatorReward.fromJSON(value) - }; - }, - withdrawValidatorCommission(value: any) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - value: MsgWithdrawValidatorCommission.fromJSON(value) - }; - }, - fundCommunityPool(value: any) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - value: MsgFundCommunityPool.fromJSON(value) - }; - } - }, - fromPartial: { - setWithdrawAddress(value: MsgSetWithdrawAddress) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - value: MsgSetWithdrawAddress.fromPartial(value) - }; - }, - withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - value: MsgWithdrawDelegatorReward.fromPartial(value) - }; - }, - withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - value: MsgWithdrawValidatorCommission.fromPartial(value) - }; - }, - fundCommunityPool(value: MsgFundCommunityPool) { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - value: MsgFundCommunityPool.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index c66ec3e0..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSetWithdrawAddress, MsgSetWithdrawAddressResponse, MsgWithdrawDelegatorReward, MsgWithdrawDelegatorRewardResponse, MsgWithdrawValidatorCommission, MsgWithdrawValidatorCommissionResponse, MsgFundCommunityPool, MsgFundCommunityPoolResponse } from "./tx"; -/** Msg defines the distribution Msg service. */ -export interface Msg { - /** - * SetWithdrawAddress defines a method to change the withdraw address - * for a delegator (or validator self-delegation). - */ - setWithdrawAddress(request: MsgSetWithdrawAddress): Promise; - /** - * WithdrawDelegatorReward defines a method to withdraw rewards of delegator - * from a single validator. - */ - withdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; - /** - * WithdrawValidatorCommission defines a method to withdraw the - * full commission to the validator address. - */ - withdrawValidatorCommission(request: MsgWithdrawValidatorCommission): Promise; - /** - * FundCommunityPool defines a method to allow an account to directly - * fund the community pool. - */ - fundCommunityPool(request: MsgFundCommunityPool): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.setWithdrawAddress = this.setWithdrawAddress.bind(this); - this.withdrawDelegatorReward = this.withdrawDelegatorReward.bind(this); - this.withdrawValidatorCommission = this.withdrawValidatorCommission.bind(this); - this.fundCommunityPool = this.fundCommunityPool.bind(this); - } - setWithdrawAddress(request: MsgSetWithdrawAddress): Promise { - const data = MsgSetWithdrawAddress.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "SetWithdrawAddress", data); - return promise.then(data => MsgSetWithdrawAddressResponse.decode(new BinaryReader(data))); - } - withdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise { - const data = MsgWithdrawDelegatorReward.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "WithdrawDelegatorReward", data); - return promise.then(data => MsgWithdrawDelegatorRewardResponse.decode(new BinaryReader(data))); - } - withdrawValidatorCommission(request: MsgWithdrawValidatorCommission): Promise { - const data = MsgWithdrawValidatorCommission.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "WithdrawValidatorCommission", data); - return promise.then(data => MsgWithdrawValidatorCommissionResponse.decode(new BinaryReader(data))); - } - fundCommunityPool(request: MsgFundCommunityPool): Promise { - const data = MsgFundCommunityPool.encode(request).finish(); - const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "FundCommunityPool", data); - return promise.then(data => MsgFundCommunityPoolResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.ts deleted file mode 100644 index bd219c24..00000000 --- a/examples/interchainjs/src/codegen/cosmos/distribution/v1beta1/tx.ts +++ /dev/null @@ -1,942 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddress { - delegatorAddress: string; - withdrawAddress: string; -} -export interface MsgSetWithdrawAddressProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress"; - value: Uint8Array; -} -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddressAmino { - delegator_address: string; - withdraw_address: string; -} -export interface MsgSetWithdrawAddressAminoMsg { - type: "cosmos-sdk/MsgModifyWithdrawAddress"; - value: MsgSetWithdrawAddressAmino; -} -/** - * MsgSetWithdrawAddress sets the withdraw address for - * a delegator (or validator self-delegation). - */ -export interface MsgSetWithdrawAddressSDKType { - delegator_address: string; - withdraw_address: string; -} -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponse {} -export interface MsgSetWithdrawAddressResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse"; - value: Uint8Array; -} -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponseAmino {} -export interface MsgSetWithdrawAddressResponseAminoMsg { - type: "cosmos-sdk/MsgSetWithdrawAddressResponse"; - value: MsgSetWithdrawAddressResponseAmino; -} -/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */ -export interface MsgSetWithdrawAddressResponseSDKType {} -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorReward { - delegatorAddress: string; - validatorAddress: string; -} -export interface MsgWithdrawDelegatorRewardProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"; - value: Uint8Array; -} -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorRewardAmino { - delegator_address: string; - validator_address: string; -} -export interface MsgWithdrawDelegatorRewardAminoMsg { - type: "cosmos-sdk/MsgWithdrawDelegationReward"; - value: MsgWithdrawDelegatorRewardAmino; -} -/** - * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator - * from a single validator. - */ -export interface MsgWithdrawDelegatorRewardSDKType { - delegator_address: string; - validator_address: string; -} -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponse { - amount: Coin[]; -} -export interface MsgWithdrawDelegatorRewardResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse"; - value: Uint8Array; -} -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponseAmino { - amount: CoinAmino[]; -} -export interface MsgWithdrawDelegatorRewardResponseAminoMsg { - type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse"; - value: MsgWithdrawDelegatorRewardResponseAmino; -} -/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ -export interface MsgWithdrawDelegatorRewardResponseSDKType { - amount: CoinSDKType[]; -} -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommission { - validatorAddress: string; -} -export interface MsgWithdrawValidatorCommissionProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"; - value: Uint8Array; -} -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommissionAmino { - validator_address: string; -} -export interface MsgWithdrawValidatorCommissionAminoMsg { - type: "cosmos-sdk/MsgWithdrawValidatorCommission"; - value: MsgWithdrawValidatorCommissionAmino; -} -/** - * MsgWithdrawValidatorCommission withdraws the full commission to the validator - * address. - */ -export interface MsgWithdrawValidatorCommissionSDKType { - validator_address: string; -} -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponse { - amount: Coin[]; -} -export interface MsgWithdrawValidatorCommissionResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse"; - value: Uint8Array; -} -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponseAmino { - amount: CoinAmino[]; -} -export interface MsgWithdrawValidatorCommissionResponseAminoMsg { - type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse"; - value: MsgWithdrawValidatorCommissionResponseAmino; -} -/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ -export interface MsgWithdrawValidatorCommissionResponseSDKType { - amount: CoinSDKType[]; -} -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPool { - amount: Coin[]; - depositor: string; -} -export interface MsgFundCommunityPoolProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool"; - value: Uint8Array; -} -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPoolAmino { - amount: CoinAmino[]; - depositor: string; -} -export interface MsgFundCommunityPoolAminoMsg { - type: "cosmos-sdk/MsgFundCommunityPool"; - value: MsgFundCommunityPoolAmino; -} -/** - * MsgFundCommunityPool allows an account to directly - * fund the community pool. - */ -export interface MsgFundCommunityPoolSDKType { - amount: CoinSDKType[]; - depositor: string; -} -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponse {} -export interface MsgFundCommunityPoolResponseProtoMsg { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse"; - value: Uint8Array; -} -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponseAmino {} -export interface MsgFundCommunityPoolResponseAminoMsg { - type: "cosmos-sdk/MsgFundCommunityPoolResponse"; - value: MsgFundCommunityPoolResponseAmino; -} -/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ -export interface MsgFundCommunityPoolResponseSDKType {} -function createBaseMsgSetWithdrawAddress(): MsgSetWithdrawAddress { - return { - delegatorAddress: "", - withdrawAddress: "" - }; -} -export const MsgSetWithdrawAddress = { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - aminoType: "cosmos-sdk/MsgModifyWithdrawAddress", - encode(message: MsgSetWithdrawAddress, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.withdrawAddress !== "") { - writer.uint32(18).string(message.withdrawAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSetWithdrawAddress { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSetWithdrawAddress(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.withdrawAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSetWithdrawAddress { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : "" - }; - }, - toJSON(message: MsgSetWithdrawAddress): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress); - return obj; - }, - fromPartial(object: DeepPartial): MsgSetWithdrawAddress { - const message = createBaseMsgSetWithdrawAddress(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.withdrawAddress = object.withdrawAddress ?? ""; - return message; - }, - fromSDK(object: MsgSetWithdrawAddressSDKType): MsgSetWithdrawAddress { - return { - delegatorAddress: object?.delegator_address, - withdrawAddress: object?.withdraw_address - }; - }, - toSDK(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress; - return obj; - }, - fromAmino(object: MsgSetWithdrawAddressAmino): MsgSetWithdrawAddress { - return { - delegatorAddress: object.delegator_address, - withdrawAddress: object.withdraw_address - }; - }, - toAmino(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.withdraw_address = message.withdrawAddress; - return obj; - }, - fromAminoMsg(object: MsgSetWithdrawAddressAminoMsg): MsgSetWithdrawAddress { - return MsgSetWithdrawAddress.fromAmino(object.value); - }, - toAminoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAminoMsg { - return { - type: "cosmos-sdk/MsgModifyWithdrawAddress", - value: MsgSetWithdrawAddress.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSetWithdrawAddressProtoMsg): MsgSetWithdrawAddress { - return MsgSetWithdrawAddress.decode(message.value); - }, - toProto(message: MsgSetWithdrawAddress): Uint8Array { - return MsgSetWithdrawAddress.encode(message).finish(); - }, - toProtoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - value: MsgSetWithdrawAddress.encode(message).finish() - }; - } -}; -function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse { - return {}; -} -export const MsgSetWithdrawAddressResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", - aminoType: "cosmos-sdk/MsgSetWithdrawAddressResponse", - encode(_: MsgSetWithdrawAddressResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSetWithdrawAddressResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSetWithdrawAddressResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSetWithdrawAddressResponse { - return {}; - }, - toJSON(_: MsgSetWithdrawAddressResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSetWithdrawAddressResponse { - const message = createBaseMsgSetWithdrawAddressResponse(); - return message; - }, - fromSDK(_: MsgSetWithdrawAddressResponseSDKType): MsgSetWithdrawAddressResponse { - return {}; - }, - toSDK(_: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSetWithdrawAddressResponseAmino): MsgSetWithdrawAddressResponse { - return {}; - }, - toAmino(_: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSetWithdrawAddressResponseAminoMsg): MsgSetWithdrawAddressResponse { - return MsgSetWithdrawAddressResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSetWithdrawAddressResponse", - value: MsgSetWithdrawAddressResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSetWithdrawAddressResponseProtoMsg): MsgSetWithdrawAddressResponse { - return MsgSetWithdrawAddressResponse.decode(message.value); - }, - toProto(message: MsgSetWithdrawAddressResponse): Uint8Array { - return MsgSetWithdrawAddressResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", - value: MsgSetWithdrawAddressResponse.encode(message).finish() - }; - } -}; -function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { - return { - delegatorAddress: "", - validatorAddress: "" - }; -} -export const MsgWithdrawDelegatorReward = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - aminoType: "cosmos-sdk/MsgWithdrawDelegationReward", - encode(message: MsgWithdrawDelegatorReward, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawDelegatorReward { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawDelegatorReward(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgWithdrawDelegatorReward { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" - }; - }, - toJSON(message: MsgWithdrawDelegatorReward): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): MsgWithdrawDelegatorReward { - const message = createBaseMsgWithdrawDelegatorReward(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - return message; - }, - fromSDK(object: MsgWithdrawDelegatorRewardSDKType): MsgWithdrawDelegatorReward { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address - }; - }, - toSDK(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAmino(object: MsgWithdrawDelegatorRewardAmino): MsgWithdrawDelegatorReward { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address - }; - }, - toAmino(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAminoMsg(object: MsgWithdrawDelegatorRewardAminoMsg): MsgWithdrawDelegatorReward { - return MsgWithdrawDelegatorReward.fromAmino(object.value); - }, - toAminoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAminoMsg { - return { - type: "cosmos-sdk/MsgWithdrawDelegationReward", - value: MsgWithdrawDelegatorReward.toAmino(message) - }; - }, - fromProtoMsg(message: MsgWithdrawDelegatorRewardProtoMsg): MsgWithdrawDelegatorReward { - return MsgWithdrawDelegatorReward.decode(message.value); - }, - toProto(message: MsgWithdrawDelegatorReward): Uint8Array { - return MsgWithdrawDelegatorReward.encode(message).finish(); - }, - toProtoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - value: MsgWithdrawDelegatorReward.encode(message).finish() - }; - } -}; -function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse { - return { - amount: [] - }; -} -export const MsgWithdrawDelegatorRewardResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", - aminoType: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse", - encode(message: MsgWithdrawDelegatorRewardResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawDelegatorRewardResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawDelegatorRewardResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgWithdrawDelegatorRewardResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgWithdrawDelegatorRewardResponse): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgWithdrawDelegatorRewardResponse { - const message = createBaseMsgWithdrawDelegatorRewardResponse(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgWithdrawDelegatorRewardResponseSDKType): MsgWithdrawDelegatorRewardResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseSDKType { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: MsgWithdrawDelegatorRewardResponseAmino): MsgWithdrawDelegatorRewardResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAmino { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: MsgWithdrawDelegatorRewardResponseAminoMsg): MsgWithdrawDelegatorRewardResponse { - return MsgWithdrawDelegatorRewardResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAminoMsg { - return { - type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse", - value: MsgWithdrawDelegatorRewardResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgWithdrawDelegatorRewardResponseProtoMsg): MsgWithdrawDelegatorRewardResponse { - return MsgWithdrawDelegatorRewardResponse.decode(message.value); - }, - toProto(message: MsgWithdrawDelegatorRewardResponse): Uint8Array { - return MsgWithdrawDelegatorRewardResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", - value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() - }; - } -}; -function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { - return { - validatorAddress: "" - }; -} -export const MsgWithdrawValidatorCommission = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission", - encode(message: MsgWithdrawValidatorCommission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawValidatorCommission { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawValidatorCommission(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgWithdrawValidatorCommission { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" - }; - }, - toJSON(message: MsgWithdrawValidatorCommission): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): MsgWithdrawValidatorCommission { - const message = createBaseMsgWithdrawValidatorCommission(); - message.validatorAddress = object.validatorAddress ?? ""; - return message; - }, - fromSDK(object: MsgWithdrawValidatorCommissionSDKType): MsgWithdrawValidatorCommission { - return { - validatorAddress: object?.validator_address - }; - }, - toSDK(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAmino(object: MsgWithdrawValidatorCommissionAmino): MsgWithdrawValidatorCommission { - return { - validatorAddress: object.validator_address - }; - }, - toAmino(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAminoMsg(object: MsgWithdrawValidatorCommissionAminoMsg): MsgWithdrawValidatorCommission { - return MsgWithdrawValidatorCommission.fromAmino(object.value); - }, - toAminoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAminoMsg { - return { - type: "cosmos-sdk/MsgWithdrawValidatorCommission", - value: MsgWithdrawValidatorCommission.toAmino(message) - }; - }, - fromProtoMsg(message: MsgWithdrawValidatorCommissionProtoMsg): MsgWithdrawValidatorCommission { - return MsgWithdrawValidatorCommission.decode(message.value); - }, - toProto(message: MsgWithdrawValidatorCommission): Uint8Array { - return MsgWithdrawValidatorCommission.encode(message).finish(); - }, - toProtoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - value: MsgWithdrawValidatorCommission.encode(message).finish() - }; - } -}; -function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse { - return { - amount: [] - }; -} -export const MsgWithdrawValidatorCommissionResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", - aminoType: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse", - encode(message: MsgWithdrawValidatorCommissionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawValidatorCommissionResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawValidatorCommissionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgWithdrawValidatorCommissionResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgWithdrawValidatorCommissionResponse): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgWithdrawValidatorCommissionResponse { - const message = createBaseMsgWithdrawValidatorCommissionResponse(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgWithdrawValidatorCommissionResponseSDKType): MsgWithdrawValidatorCommissionResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseSDKType { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: MsgWithdrawValidatorCommissionResponseAmino): MsgWithdrawValidatorCommissionResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAmino { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: MsgWithdrawValidatorCommissionResponseAminoMsg): MsgWithdrawValidatorCommissionResponse { - return MsgWithdrawValidatorCommissionResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAminoMsg { - return { - type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse", - value: MsgWithdrawValidatorCommissionResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgWithdrawValidatorCommissionResponseProtoMsg): MsgWithdrawValidatorCommissionResponse { - return MsgWithdrawValidatorCommissionResponse.decode(message.value); - }, - toProto(message: MsgWithdrawValidatorCommissionResponse): Uint8Array { - return MsgWithdrawValidatorCommissionResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", - value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() - }; - } -}; -function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { - return { - amount: [], - depositor: "" - }; -} -export const MsgFundCommunityPool = { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - aminoType: "cosmos-sdk/MsgFundCommunityPool", - encode(message: MsgFundCommunityPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgFundCommunityPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgFundCommunityPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgFundCommunityPool { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - depositor: isSet(object.depositor) ? String(object.depositor) : "" - }; - }, - toJSON(message: MsgFundCommunityPool): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object: DeepPartial): MsgFundCommunityPool { - const message = createBaseMsgFundCommunityPool(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.depositor = object.depositor ?? ""; - return message; - }, - fromSDK(object: MsgFundCommunityPoolSDKType): MsgFundCommunityPool { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [], - depositor: object?.depositor - }; - }, - toSDK(message: MsgFundCommunityPool): MsgFundCommunityPoolSDKType { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - obj.depositor = message.depositor; - return obj; - }, - fromAmino(object: MsgFundCommunityPoolAmino): MsgFundCommunityPool { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [], - depositor: object.depositor - }; - }, - toAmino(message: MsgFundCommunityPool): MsgFundCommunityPoolAmino { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - obj.depositor = message.depositor; - return obj; - }, - fromAminoMsg(object: MsgFundCommunityPoolAminoMsg): MsgFundCommunityPool { - return MsgFundCommunityPool.fromAmino(object.value); - }, - toAminoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolAminoMsg { - return { - type: "cosmos-sdk/MsgFundCommunityPool", - value: MsgFundCommunityPool.toAmino(message) - }; - }, - fromProtoMsg(message: MsgFundCommunityPoolProtoMsg): MsgFundCommunityPool { - return MsgFundCommunityPool.decode(message.value); - }, - toProto(message: MsgFundCommunityPool): Uint8Array { - return MsgFundCommunityPool.encode(message).finish(); - }, - toProtoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - value: MsgFundCommunityPool.encode(message).finish() - }; - } -}; -function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse { - return {}; -} -export const MsgFundCommunityPoolResponse = { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", - aminoType: "cosmos-sdk/MsgFundCommunityPoolResponse", - encode(_: MsgFundCommunityPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgFundCommunityPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgFundCommunityPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgFundCommunityPoolResponse { - return {}; - }, - toJSON(_: MsgFundCommunityPoolResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgFundCommunityPoolResponse { - const message = createBaseMsgFundCommunityPoolResponse(); - return message; - }, - fromSDK(_: MsgFundCommunityPoolResponseSDKType): MsgFundCommunityPoolResponse { - return {}; - }, - toSDK(_: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgFundCommunityPoolResponseAmino): MsgFundCommunityPoolResponse { - return {}; - }, - toAmino(_: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgFundCommunityPoolResponseAminoMsg): MsgFundCommunityPoolResponse { - return MsgFundCommunityPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAminoMsg { - return { - type: "cosmos-sdk/MsgFundCommunityPoolResponse", - value: MsgFundCommunityPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgFundCommunityPoolResponseProtoMsg): MsgFundCommunityPoolResponse { - return MsgFundCommunityPoolResponse.decode(message.value); - }, - toProto(message: MsgFundCommunityPoolResponse): Uint8Array { - return MsgFundCommunityPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseProtoMsg { - return { - typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", - value: MsgFundCommunityPoolResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/evidence.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/evidence.ts deleted file mode 100644 index f52a7813..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/evidence.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface Equivocation { - height: bigint; - time: Date | undefined; - power: bigint; - consensusAddress: string; -} -export interface EquivocationProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.Equivocation"; - value: Uint8Array; -} -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface EquivocationAmino { - height: string; - time?: Date | undefined; - power: string; - consensus_address: string; -} -export interface EquivocationAminoMsg { - type: "cosmos-sdk/Equivocation"; - value: EquivocationAmino; -} -/** - * Equivocation implements the Evidence interface and defines evidence of double - * signing misbehavior. - */ -export interface EquivocationSDKType { - height: bigint; - time: Date | undefined; - power: bigint; - consensus_address: string; -} -function createBaseEquivocation(): Equivocation { - return { - height: BigInt(0), - time: new Date(), - power: BigInt(0), - consensusAddress: "" - }; -} -export const Equivocation = { - typeUrl: "/cosmos.evidence.v1beta1.Equivocation", - aminoType: "cosmos-sdk/Equivocation", - encode(message: Equivocation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(18).fork()).ldelim(); - } - if (message.power !== BigInt(0)) { - writer.uint32(24).int64(message.power); - } - if (message.consensusAddress !== "") { - writer.uint32(34).string(message.consensusAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Equivocation { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEquivocation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.power = reader.int64(); - break; - case 4: - message.consensusAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Equivocation { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - time: isSet(object.time) ? new Date(object.time) : undefined, - power: isSet(object.power) ? BigInt(object.power.toString()) : BigInt(0), - consensusAddress: isSet(object.consensusAddress) ? String(object.consensusAddress) : "" - }; - }, - toJSON(message: Equivocation): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.time !== undefined && (obj.time = message.time.toISOString()); - message.power !== undefined && (obj.power = (message.power || BigInt(0)).toString()); - message.consensusAddress !== undefined && (obj.consensusAddress = message.consensusAddress); - return obj; - }, - fromPartial(object: DeepPartial): Equivocation { - const message = createBaseEquivocation(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.power = object.power !== undefined && object.power !== null ? BigInt(object.power.toString()) : BigInt(0); - message.consensusAddress = object.consensusAddress ?? ""; - return message; - }, - fromSDK(object: EquivocationSDKType): Equivocation { - return { - height: object?.height, - time: object.time ?? undefined, - power: object?.power, - consensusAddress: object?.consensus_address - }; - }, - toSDK(message: Equivocation): EquivocationSDKType { - const obj: any = {}; - obj.height = message.height; - message.time !== undefined && (obj.time = message.time ?? undefined); - obj.power = message.power; - obj.consensus_address = message.consensusAddress; - return obj; - }, - fromAmino(object: EquivocationAmino): Equivocation { - return { - height: BigInt(object.height), - time: object.time, - power: BigInt(object.power), - consensusAddress: object.consensus_address - }; - }, - toAmino(message: Equivocation): EquivocationAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.time = message.time; - obj.power = message.power ? message.power.toString() : undefined; - obj.consensus_address = message.consensusAddress; - return obj; - }, - fromAminoMsg(object: EquivocationAminoMsg): Equivocation { - return Equivocation.fromAmino(object.value); - }, - toAminoMsg(message: Equivocation): EquivocationAminoMsg { - return { - type: "cosmos-sdk/Equivocation", - value: Equivocation.toAmino(message) - }; - }, - fromProtoMsg(message: EquivocationProtoMsg): Equivocation { - return Equivocation.decode(message.value); - }, - toProto(message: Equivocation): Uint8Array { - return Equivocation.encode(message).finish(); - }, - toProtoMsg(message: Equivocation): EquivocationProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.Equivocation", - value: Equivocation.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/genesis.ts deleted file mode 100644 index 9d8a7fb8..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/genesis.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisState { - /** evidence defines all the evidence at genesis. */ - evidence: Any[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisStateAmino { - /** evidence defines all the evidence at genesis. */ - evidence: AnyAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the evidence module's genesis state. */ -export interface GenesisStateSDKType { - evidence: AnySDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - evidence: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.evidence.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.evidence) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.evidence = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.evidence = object.evidence?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.evidence = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.evidence = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 8ce8eba9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryEvidenceRequest, QueryEvidenceResponse, QueryAllEvidenceRequest, QueryAllEvidenceResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Evidence queries evidence based on evidence hash. */ - evidence(request: QueryEvidenceRequest): Promise; - /** AllEvidence queries all evidence. */ - allEvidence(request?: QueryAllEvidenceRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.evidence = this.evidence.bind(this); - this.allEvidence = this.allEvidence.bind(this); - } - evidence(request: QueryEvidenceRequest): Promise { - const data = QueryEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Query", "Evidence", data); - return promise.then(data => QueryEvidenceResponse.decode(new BinaryReader(data))); - } - allEvidence(request: QueryAllEvidenceRequest = { - pagination: undefined - }): Promise { - const data = QueryAllEvidenceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Query", "AllEvidence", data); - return promise.then(data => QueryAllEvidenceResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - evidence(request: QueryEvidenceRequest): Promise { - return queryService.evidence(request); - }, - allEvidence(request?: QueryAllEvidenceRequest): Promise { - return queryService.allEvidence(request); - } - }; -}; -export interface UseEvidenceQuery extends ReactQueryParams { - request: QueryEvidenceRequest; -} -export interface UseAllEvidenceQuery extends ReactQueryParams { - request?: QueryAllEvidenceRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useEvidence = ({ - request, - options - }: UseEvidenceQuery) => { - return useQuery(["evidenceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.evidence(request); - }, options); - }; - const useAllEvidence = ({ - request, - options - }: UseAllEvidenceQuery) => { - return useQuery(["allEvidenceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allEvidence(request); - }, options); - }; - return { - /** Evidence queries evidence based on evidence hash. */useEvidence, - /** AllEvidence queries all evidence. */useAllEvidence - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryEvidenceStore { - store = new QueryStore(queryService?.evidence); - evidence(request: QueryEvidenceRequest) { - return this.store.getData(request); - } - } - class QueryAllEvidenceStore { - store = new QueryStore(queryService?.allEvidence); - allEvidence(request: QueryAllEvidenceRequest) { - return this.store.getData(request); - } - } - return { - /** Evidence queries evidence based on evidence hash. */QueryEvidenceStore, - /** AllEvidence queries all evidence. */QueryAllEvidenceStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/query.ts deleted file mode 100644 index df83ace0..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/query.ts +++ /dev/null @@ -1,493 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequest { - /** evidence_hash defines the hash of the requested evidence. */ - evidenceHash: Uint8Array; -} -export interface QueryEvidenceRequestProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.QueryEvidenceRequest"; - value: Uint8Array; -} -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequestAmino { - /** evidence_hash defines the hash of the requested evidence. */ - evidence_hash: Uint8Array; -} -export interface QueryEvidenceRequestAminoMsg { - type: "cosmos-sdk/QueryEvidenceRequest"; - value: QueryEvidenceRequestAmino; -} -/** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ -export interface QueryEvidenceRequestSDKType { - evidence_hash: Uint8Array; -} -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponse { - /** evidence returns the requested evidence. */ - evidence: Any | undefined; -} -export interface QueryEvidenceResponseProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.QueryEvidenceResponse"; - value: Uint8Array; -} -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponseAmino { - /** evidence returns the requested evidence. */ - evidence?: AnyAmino | undefined; -} -export interface QueryEvidenceResponseAminoMsg { - type: "cosmos-sdk/QueryEvidenceResponse"; - value: QueryEvidenceResponseAmino; -} -/** QueryEvidenceResponse is the response type for the Query/Evidence RPC method. */ -export interface QueryEvidenceResponseSDKType { - evidence: AnySDKType | undefined; -} -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryAllEvidenceRequestProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.QueryAllEvidenceRequest"; - value: Uint8Array; -} -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryAllEvidenceRequestAminoMsg { - type: "cosmos-sdk/QueryAllEvidenceRequest"; - value: QueryAllEvidenceRequestAmino; -} -/** - * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponse { - /** evidence returns all evidences. */ - evidence: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryAllEvidenceResponseProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.QueryAllEvidenceResponse"; - value: Uint8Array; -} -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponseAmino { - /** evidence returns all evidences. */ - evidence: AnyAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryAllEvidenceResponseAminoMsg { - type: "cosmos-sdk/QueryAllEvidenceResponse"; - value: QueryAllEvidenceResponseAmino; -} -/** - * QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC - * method. - */ -export interface QueryAllEvidenceResponseSDKType { - evidence: AnySDKType[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryEvidenceRequest(): QueryEvidenceRequest { - return { - evidenceHash: new Uint8Array() - }; -} -export const QueryEvidenceRequest = { - typeUrl: "/cosmos.evidence.v1beta1.QueryEvidenceRequest", - aminoType: "cosmos-sdk/QueryEvidenceRequest", - encode(message: QueryEvidenceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.evidenceHash.length !== 0) { - writer.uint32(10).bytes(message.evidenceHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryEvidenceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryEvidenceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidenceHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryEvidenceRequest { - return { - evidenceHash: isSet(object.evidenceHash) ? bytesFromBase64(object.evidenceHash) : new Uint8Array() - }; - }, - toJSON(message: QueryEvidenceRequest): unknown { - const obj: any = {}; - message.evidenceHash !== undefined && (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined ? message.evidenceHash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryEvidenceRequest { - const message = createBaseQueryEvidenceRequest(); - message.evidenceHash = object.evidenceHash ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryEvidenceRequestSDKType): QueryEvidenceRequest { - return { - evidenceHash: object?.evidence_hash - }; - }, - toSDK(message: QueryEvidenceRequest): QueryEvidenceRequestSDKType { - const obj: any = {}; - obj.evidence_hash = message.evidenceHash; - return obj; - }, - fromAmino(object: QueryEvidenceRequestAmino): QueryEvidenceRequest { - return { - evidenceHash: object.evidence_hash - }; - }, - toAmino(message: QueryEvidenceRequest): QueryEvidenceRequestAmino { - const obj: any = {}; - obj.evidence_hash = message.evidenceHash; - return obj; - }, - fromAminoMsg(object: QueryEvidenceRequestAminoMsg): QueryEvidenceRequest { - return QueryEvidenceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryEvidenceRequest): QueryEvidenceRequestAminoMsg { - return { - type: "cosmos-sdk/QueryEvidenceRequest", - value: QueryEvidenceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryEvidenceRequestProtoMsg): QueryEvidenceRequest { - return QueryEvidenceRequest.decode(message.value); - }, - toProto(message: QueryEvidenceRequest): Uint8Array { - return QueryEvidenceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryEvidenceRequest): QueryEvidenceRequestProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.QueryEvidenceRequest", - value: QueryEvidenceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryEvidenceResponse(): QueryEvidenceResponse { - return { - evidence: Any.fromPartial({}) - }; -} -export const QueryEvidenceResponse = { - typeUrl: "/cosmos.evidence.v1beta1.QueryEvidenceResponse", - aminoType: "cosmos-sdk/QueryEvidenceResponse", - encode(message: QueryEvidenceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryEvidenceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryEvidenceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryEvidenceResponse { - return { - evidence: isSet(object.evidence) ? Any.fromJSON(object.evidence) : undefined - }; - }, - toJSON(message: QueryEvidenceResponse): unknown { - const obj: any = {}; - message.evidence !== undefined && (obj.evidence = message.evidence ? Any.toJSON(message.evidence) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryEvidenceResponse { - const message = createBaseQueryEvidenceResponse(); - message.evidence = object.evidence !== undefined && object.evidence !== null ? Any.fromPartial(object.evidence) : undefined; - return message; - }, - fromSDK(object: QueryEvidenceResponseSDKType): QueryEvidenceResponse { - return { - evidence: object.evidence ? Any.fromSDK(object.evidence) : undefined - }; - }, - toSDK(message: QueryEvidenceResponse): QueryEvidenceResponseSDKType { - const obj: any = {}; - message.evidence !== undefined && (obj.evidence = message.evidence ? Any.toSDK(message.evidence) : undefined); - return obj; - }, - fromAmino(object: QueryEvidenceResponseAmino): QueryEvidenceResponse { - return { - evidence: object?.evidence ? Any.fromAmino(object.evidence) : undefined - }; - }, - toAmino(message: QueryEvidenceResponse): QueryEvidenceResponseAmino { - const obj: any = {}; - obj.evidence = message.evidence ? Any.toAmino(message.evidence) : undefined; - return obj; - }, - fromAminoMsg(object: QueryEvidenceResponseAminoMsg): QueryEvidenceResponse { - return QueryEvidenceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryEvidenceResponse): QueryEvidenceResponseAminoMsg { - return { - type: "cosmos-sdk/QueryEvidenceResponse", - value: QueryEvidenceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryEvidenceResponseProtoMsg): QueryEvidenceResponse { - return QueryEvidenceResponse.decode(message.value); - }, - toProto(message: QueryEvidenceResponse): Uint8Array { - return QueryEvidenceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryEvidenceResponse): QueryEvidenceResponseProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.QueryEvidenceResponse", - value: QueryEvidenceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAllEvidenceRequest(): QueryAllEvidenceRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryAllEvidenceRequest = { - typeUrl: "/cosmos.evidence.v1beta1.QueryAllEvidenceRequest", - aminoType: "cosmos-sdk/QueryAllEvidenceRequest", - encode(message: QueryAllEvidenceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllEvidenceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllEvidenceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllEvidenceRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllEvidenceRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllEvidenceRequest { - const message = createBaseQueryAllEvidenceRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllEvidenceRequestSDKType): QueryAllEvidenceRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllEvidenceRequest): QueryAllEvidenceRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllEvidenceRequestAmino): QueryAllEvidenceRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllEvidenceRequest): QueryAllEvidenceRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllEvidenceRequestAminoMsg): QueryAllEvidenceRequest { - return QueryAllEvidenceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllEvidenceRequest): QueryAllEvidenceRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAllEvidenceRequest", - value: QueryAllEvidenceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllEvidenceRequestProtoMsg): QueryAllEvidenceRequest { - return QueryAllEvidenceRequest.decode(message.value); - }, - toProto(message: QueryAllEvidenceRequest): Uint8Array { - return QueryAllEvidenceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAllEvidenceRequest): QueryAllEvidenceRequestProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.QueryAllEvidenceRequest", - value: QueryAllEvidenceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAllEvidenceResponse(): QueryAllEvidenceResponse { - return { - evidence: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryAllEvidenceResponse = { - typeUrl: "/cosmos.evidence.v1beta1.QueryAllEvidenceResponse", - aminoType: "cosmos-sdk/QueryAllEvidenceResponse", - encode(message: QueryAllEvidenceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.evidence) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllEvidenceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllEvidenceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllEvidenceResponse { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Any.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllEvidenceResponse): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.evidence = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllEvidenceResponse { - const message = createBaseQueryAllEvidenceResponse(); - message.evidence = object.evidence?.map(e => Any.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllEvidenceResponseSDKType): QueryAllEvidenceResponse { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Any.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllEvidenceResponse): QueryAllEvidenceResponseSDKType { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.evidence = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllEvidenceResponseAmino): QueryAllEvidenceResponse { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Any.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllEvidenceResponse): QueryAllEvidenceResponseAmino { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.evidence = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllEvidenceResponseAminoMsg): QueryAllEvidenceResponse { - return QueryAllEvidenceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllEvidenceResponse): QueryAllEvidenceResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAllEvidenceResponse", - value: QueryAllEvidenceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllEvidenceResponseProtoMsg): QueryAllEvidenceResponse { - return QueryAllEvidenceResponse.decode(message.value); - }, - toProto(message: QueryAllEvidenceResponse): Uint8Array { - return QueryAllEvidenceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAllEvidenceResponse): QueryAllEvidenceResponseProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.QueryAllEvidenceResponse", - value: QueryAllEvidenceResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.amino.ts deleted file mode 100644 index a9da4176..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.amino.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MsgSubmitEvidence } from "./tx"; -export const AminoConverter = { - "/cosmos.evidence.v1beta1.MsgSubmitEvidence": { - aminoType: "cosmos-sdk/MsgSubmitEvidence", - toAmino: MsgSubmitEvidence.toAmino, - fromAmino: MsgSubmitEvidence.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.registry.ts deleted file mode 100644 index 832e6151..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.registry.ts +++ /dev/null @@ -1,51 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSubmitEvidence } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.evidence.v1beta1.MsgSubmitEvidence", MsgSubmitEvidence]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - submitEvidence(value: MsgSubmitEvidence) { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - value: MsgSubmitEvidence.encode(value).finish() - }; - } - }, - withTypeUrl: { - submitEvidence(value: MsgSubmitEvidence) { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - value - }; - } - }, - toJSON: { - submitEvidence(value: MsgSubmitEvidence) { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - value: MsgSubmitEvidence.toJSON(value) - }; - } - }, - fromJSON: { - submitEvidence(value: any) { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - value: MsgSubmitEvidence.fromJSON(value) - }; - } - }, - fromPartial: { - submitEvidence(value: MsgSubmitEvidence) { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - value: MsgSubmitEvidence.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 50e7473e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSubmitEvidence, MsgSubmitEvidenceResponse } from "./tx"; -/** Msg defines the evidence Msg service. */ -export interface Msg { - /** - * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - * counterfactual signing. - */ - submitEvidence(request: MsgSubmitEvidence): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.submitEvidence = this.submitEvidence.bind(this); - } - submitEvidence(request: MsgSubmitEvidence): Promise { - const data = MsgSubmitEvidence.encode(request).finish(); - const promise = this.rpc.request("cosmos.evidence.v1beta1.Msg", "SubmitEvidence", data); - return promise.then(data => MsgSubmitEvidenceResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.ts deleted file mode 100644 index 8cee8ba5..00000000 --- a/examples/interchainjs/src/codegen/cosmos/evidence/v1beta1/tx.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidence { - submitter: string; - evidence: Any | undefined; -} -export interface MsgSubmitEvidenceProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence"; - value: Uint8Array; -} -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidenceAmino { - submitter: string; - evidence?: AnyAmino | undefined; -} -export interface MsgSubmitEvidenceAminoMsg { - type: "cosmos-sdk/MsgSubmitEvidence"; - value: MsgSubmitEvidenceAmino; -} -/** - * MsgSubmitEvidence represents a message that supports submitting arbitrary - * Evidence of misbehavior such as equivocation or counterfactual signing. - */ -export interface MsgSubmitEvidenceSDKType { - submitter: string; - evidence: AnySDKType | undefined; -} -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponse { - /** hash defines the hash of the evidence. */ - hash: Uint8Array; -} -export interface MsgSubmitEvidenceResponseProtoMsg { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse"; - value: Uint8Array; -} -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponseAmino { - /** hash defines the hash of the evidence. */ - hash: Uint8Array; -} -export interface MsgSubmitEvidenceResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitEvidenceResponse"; - value: MsgSubmitEvidenceResponseAmino; -} -/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ -export interface MsgSubmitEvidenceResponseSDKType { - hash: Uint8Array; -} -function createBaseMsgSubmitEvidence(): MsgSubmitEvidence { - return { - submitter: "", - evidence: Any.fromPartial({}) - }; -} -export const MsgSubmitEvidence = { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - aminoType: "cosmos-sdk/MsgSubmitEvidence", - encode(message: MsgSubmitEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.submitter !== "") { - writer.uint32(10).string(message.submitter); - } - if (message.evidence !== undefined) { - Any.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitEvidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.submitter = reader.string(); - break; - case 2: - message.evidence = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitEvidence { - return { - submitter: isSet(object.submitter) ? String(object.submitter) : "", - evidence: isSet(object.evidence) ? Any.fromJSON(object.evidence) : undefined - }; - }, - toJSON(message: MsgSubmitEvidence): unknown { - const obj: any = {}; - message.submitter !== undefined && (obj.submitter = message.submitter); - message.evidence !== undefined && (obj.evidence = message.evidence ? Any.toJSON(message.evidence) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitEvidence { - const message = createBaseMsgSubmitEvidence(); - message.submitter = object.submitter ?? ""; - message.evidence = object.evidence !== undefined && object.evidence !== null ? Any.fromPartial(object.evidence) : undefined; - return message; - }, - fromSDK(object: MsgSubmitEvidenceSDKType): MsgSubmitEvidence { - return { - submitter: object?.submitter, - evidence: object.evidence ? Any.fromSDK(object.evidence) : undefined - }; - }, - toSDK(message: MsgSubmitEvidence): MsgSubmitEvidenceSDKType { - const obj: any = {}; - obj.submitter = message.submitter; - message.evidence !== undefined && (obj.evidence = message.evidence ? Any.toSDK(message.evidence) : undefined); - return obj; - }, - fromAmino(object: MsgSubmitEvidenceAmino): MsgSubmitEvidence { - return { - submitter: object.submitter, - evidence: object?.evidence ? Any.fromAmino(object.evidence) : undefined - }; - }, - toAmino(message: MsgSubmitEvidence): MsgSubmitEvidenceAmino { - const obj: any = {}; - obj.submitter = message.submitter; - obj.evidence = message.evidence ? Any.toAmino(message.evidence) : undefined; - return obj; - }, - fromAminoMsg(object: MsgSubmitEvidenceAminoMsg): MsgSubmitEvidence { - return MsgSubmitEvidence.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitEvidence): MsgSubmitEvidenceAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitEvidence", - value: MsgSubmitEvidence.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitEvidenceProtoMsg): MsgSubmitEvidence { - return MsgSubmitEvidence.decode(message.value); - }, - toProto(message: MsgSubmitEvidence): Uint8Array { - return MsgSubmitEvidence.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitEvidence): MsgSubmitEvidenceProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", - value: MsgSubmitEvidence.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitEvidenceResponse(): MsgSubmitEvidenceResponse { - return { - hash: new Uint8Array() - }; -} -export const MsgSubmitEvidenceResponse = { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse", - aminoType: "cosmos-sdk/MsgSubmitEvidenceResponse", - encode(message: MsgSubmitEvidenceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitEvidenceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitEvidenceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitEvidenceResponse { - return { - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array() - }; - }, - toJSON(message: MsgSubmitEvidenceResponse): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitEvidenceResponse { - const message = createBaseMsgSubmitEvidenceResponse(); - message.hash = object.hash ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgSubmitEvidenceResponseSDKType): MsgSubmitEvidenceResponse { - return { - hash: object?.hash - }; - }, - toSDK(message: MsgSubmitEvidenceResponse): MsgSubmitEvidenceResponseSDKType { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAmino(object: MsgSubmitEvidenceResponseAmino): MsgSubmitEvidenceResponse { - return { - hash: object.hash - }; - }, - toAmino(message: MsgSubmitEvidenceResponse): MsgSubmitEvidenceResponseAmino { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: MsgSubmitEvidenceResponseAminoMsg): MsgSubmitEvidenceResponse { - return MsgSubmitEvidenceResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitEvidenceResponse): MsgSubmitEvidenceResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitEvidenceResponse", - value: MsgSubmitEvidenceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitEvidenceResponseProtoMsg): MsgSubmitEvidenceResponse { - return MsgSubmitEvidenceResponse.decode(message.value); - }, - toProto(message: MsgSubmitEvidenceResponse): Uint8Array { - return MsgSubmitEvidenceResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitEvidenceResponse): MsgSubmitEvidenceResponseProtoMsg { - return { - typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse", - value: MsgSubmitEvidenceResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/feegrant.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/feegrant.ts deleted file mode 100644 index 8d2691db..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/feegrant.ts +++ /dev/null @@ -1,692 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -/** - * BasicAllowance implements Allowance with a one-time grant of tokens - * that optionally expires. The grantee can use up to SpendLimit to cover fees. - */ -export interface BasicAllowance { - /** - * spend_limit specifies the maximum amount of tokens that can be spent - * by this allowance and will be updated as tokens are spent. If it is - * empty, there is no spend limit and any amount of coins can be spent. - */ - spendLimit: Coin[]; - /** expiration specifies an optional time when this allowance expires */ - expiration: Date | undefined; -} -export interface BasicAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.BasicAllowance"; - value: Uint8Array; -} -/** - * BasicAllowance implements Allowance with a one-time grant of tokens - * that optionally expires. The grantee can use up to SpendLimit to cover fees. - */ -export interface BasicAllowanceAmino { - /** - * spend_limit specifies the maximum amount of tokens that can be spent - * by this allowance and will be updated as tokens are spent. If it is - * empty, there is no spend limit and any amount of coins can be spent. - */ - spend_limit: CoinAmino[]; - /** expiration specifies an optional time when this allowance expires */ - expiration?: Date | undefined; -} -export interface BasicAllowanceAminoMsg { - type: "cosmos-sdk/BasicAllowance"; - value: BasicAllowanceAmino; -} -/** - * BasicAllowance implements Allowance with a one-time grant of tokens - * that optionally expires. The grantee can use up to SpendLimit to cover fees. - */ -export interface BasicAllowanceSDKType { - spend_limit: CoinSDKType[]; - expiration: Date | undefined; -} -/** - * PeriodicAllowance extends Allowance to allow for both a maximum cap, - * as well as a limit per time period. - */ -export interface PeriodicAllowance { - /** basic specifies a struct of `BasicAllowance` */ - basic: BasicAllowance | undefined; - /** - * period specifies the time duration in which period_spend_limit coins can - * be spent before that allowance is reset - */ - period: Duration | undefined; - /** - * period_spend_limit specifies the maximum number of coins that can be spent - * in the period - */ - periodSpendLimit: Coin[]; - /** period_can_spend is the number of coins left to be spent before the period_reset time */ - periodCanSpend: Coin[]; - /** - * period_reset is the time at which this period resets and a new one begins, - * it is calculated from the start time of the first transaction after the - * last period ended - */ - periodReset: Date | undefined; -} -export interface PeriodicAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.PeriodicAllowance"; - value: Uint8Array; -} -/** - * PeriodicAllowance extends Allowance to allow for both a maximum cap, - * as well as a limit per time period. - */ -export interface PeriodicAllowanceAmino { - /** basic specifies a struct of `BasicAllowance` */ - basic?: BasicAllowanceAmino | undefined; - /** - * period specifies the time duration in which period_spend_limit coins can - * be spent before that allowance is reset - */ - period?: DurationAmino | undefined; - /** - * period_spend_limit specifies the maximum number of coins that can be spent - * in the period - */ - period_spend_limit: CoinAmino[]; - /** period_can_spend is the number of coins left to be spent before the period_reset time */ - period_can_spend: CoinAmino[]; - /** - * period_reset is the time at which this period resets and a new one begins, - * it is calculated from the start time of the first transaction after the - * last period ended - */ - period_reset?: Date | undefined; -} -export interface PeriodicAllowanceAminoMsg { - type: "cosmos-sdk/PeriodicAllowance"; - value: PeriodicAllowanceAmino; -} -/** - * PeriodicAllowance extends Allowance to allow for both a maximum cap, - * as well as a limit per time period. - */ -export interface PeriodicAllowanceSDKType { - basic: BasicAllowanceSDKType | undefined; - period: DurationSDKType | undefined; - period_spend_limit: CoinSDKType[]; - period_can_spend: CoinSDKType[]; - period_reset: Date | undefined; -} -/** AllowedMsgAllowance creates allowance only for specified message types. */ -export interface AllowedMsgAllowance { - /** allowance can be any of basic and periodic fee allowance. */ - allowance: Any | undefined; - /** allowed_messages are the messages for which the grantee has the access. */ - allowedMessages: string[]; -} -export interface AllowedMsgAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.AllowedMsgAllowance"; - value: Uint8Array; -} -/** AllowedMsgAllowance creates allowance only for specified message types. */ -export interface AllowedMsgAllowanceAmino { - /** allowance can be any of basic and periodic fee allowance. */ - allowance?: AnyAmino | undefined; - /** allowed_messages are the messages for which the grantee has the access. */ - allowed_messages: string[]; -} -export interface AllowedMsgAllowanceAminoMsg { - type: "cosmos-sdk/AllowedMsgAllowance"; - value: AllowedMsgAllowanceAmino; -} -/** AllowedMsgAllowance creates allowance only for specified message types. */ -export interface AllowedMsgAllowanceSDKType { - allowance: AnySDKType | undefined; - allowed_messages: string[]; -} -/** Grant is stored in the KVStore to record a grant with full context */ -export interface Grant { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic, periodic, allowed fee allowance. */ - allowance: Any | undefined; -} -export interface GrantProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.Grant"; - value: Uint8Array; -} -/** Grant is stored in the KVStore to record a grant with full context */ -export interface GrantAmino { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic, periodic, allowed fee allowance. */ - allowance?: AnyAmino | undefined; -} -export interface GrantAminoMsg { - type: "cosmos-sdk/Grant"; - value: GrantAmino; -} -/** Grant is stored in the KVStore to record a grant with full context */ -export interface GrantSDKType { - granter: string; - grantee: string; - allowance: AnySDKType | undefined; -} -function createBaseBasicAllowance(): BasicAllowance { - return { - spendLimit: [], - expiration: new Date() - }; -} -export const BasicAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.BasicAllowance", - aminoType: "cosmos-sdk/BasicAllowance", - encode(message: BasicAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.spendLimit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BasicAllowance { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBasicAllowance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spendLimit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BasicAllowance { - return { - spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e: any) => Coin.fromJSON(e)) : [], - expiration: isSet(object.expiration) ? new Date(object.expiration) : undefined - }; - }, - toJSON(message: BasicAllowance): unknown { - const obj: any = {}; - if (message.spendLimit) { - obj.spendLimit = message.spendLimit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.spendLimit = []; - } - message.expiration !== undefined && (obj.expiration = message.expiration.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): BasicAllowance { - const message = createBaseBasicAllowance(); - message.spendLimit = object.spendLimit?.map(e => Coin.fromPartial(e)) || []; - message.expiration = object.expiration ?? undefined; - return message; - }, - fromSDK(object: BasicAllowanceSDKType): BasicAllowance { - return { - spendLimit: Array.isArray(object?.spend_limit) ? object.spend_limit.map((e: any) => Coin.fromSDK(e)) : [], - expiration: object.expiration ?? undefined - }; - }, - toSDK(message: BasicAllowance): BasicAllowanceSDKType { - const obj: any = {}; - if (message.spendLimit) { - obj.spend_limit = message.spendLimit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.spend_limit = []; - } - message.expiration !== undefined && (obj.expiration = message.expiration ?? undefined); - return obj; - }, - fromAmino(object: BasicAllowanceAmino): BasicAllowance { - return { - spendLimit: Array.isArray(object?.spend_limit) ? object.spend_limit.map((e: any) => Coin.fromAmino(e)) : [], - expiration: object.expiration - }; - }, - toAmino(message: BasicAllowance): BasicAllowanceAmino { - const obj: any = {}; - if (message.spendLimit) { - obj.spend_limit = message.spendLimit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.spend_limit = []; - } - obj.expiration = message.expiration; - return obj; - }, - fromAminoMsg(object: BasicAllowanceAminoMsg): BasicAllowance { - return BasicAllowance.fromAmino(object.value); - }, - toAminoMsg(message: BasicAllowance): BasicAllowanceAminoMsg { - return { - type: "cosmos-sdk/BasicAllowance", - value: BasicAllowance.toAmino(message) - }; - }, - fromProtoMsg(message: BasicAllowanceProtoMsg): BasicAllowance { - return BasicAllowance.decode(message.value); - }, - toProto(message: BasicAllowance): Uint8Array { - return BasicAllowance.encode(message).finish(); - }, - toProtoMsg(message: BasicAllowance): BasicAllowanceProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.BasicAllowance", - value: BasicAllowance.encode(message).finish() - }; - } -}; -function createBasePeriodicAllowance(): PeriodicAllowance { - return { - basic: BasicAllowance.fromPartial({}), - period: Duration.fromPartial({}), - periodSpendLimit: [], - periodCanSpend: [], - periodReset: new Date() - }; -} -export const PeriodicAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.PeriodicAllowance", - aminoType: "cosmos-sdk/PeriodicAllowance", - encode(message: PeriodicAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.basic !== undefined) { - BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim(); - } - if (message.period !== undefined) { - Duration.encode(message.period, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.periodSpendLimit) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.periodCanSpend) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.periodReset !== undefined) { - Timestamp.encode(toTimestamp(message.periodReset), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PeriodicAllowance { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeriodicAllowance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.basic = BasicAllowance.decode(reader, reader.uint32()); - break; - case 2: - message.period = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.periodSpendLimit.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.periodCanSpend.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.periodReset = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PeriodicAllowance { - return { - basic: isSet(object.basic) ? BasicAllowance.fromJSON(object.basic) : undefined, - period: isSet(object.period) ? Duration.fromJSON(object.period) : undefined, - periodSpendLimit: Array.isArray(object?.periodSpendLimit) ? object.periodSpendLimit.map((e: any) => Coin.fromJSON(e)) : [], - periodCanSpend: Array.isArray(object?.periodCanSpend) ? object.periodCanSpend.map((e: any) => Coin.fromJSON(e)) : [], - periodReset: isSet(object.periodReset) ? new Date(object.periodReset) : undefined - }; - }, - toJSON(message: PeriodicAllowance): unknown { - const obj: any = {}; - message.basic !== undefined && (obj.basic = message.basic ? BasicAllowance.toJSON(message.basic) : undefined); - message.period !== undefined && (obj.period = message.period ? Duration.toJSON(message.period) : undefined); - if (message.periodSpendLimit) { - obj.periodSpendLimit = message.periodSpendLimit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.periodSpendLimit = []; - } - if (message.periodCanSpend) { - obj.periodCanSpend = message.periodCanSpend.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.periodCanSpend = []; - } - message.periodReset !== undefined && (obj.periodReset = message.periodReset.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): PeriodicAllowance { - const message = createBasePeriodicAllowance(); - message.basic = object.basic !== undefined && object.basic !== null ? BasicAllowance.fromPartial(object.basic) : undefined; - message.period = object.period !== undefined && object.period !== null ? Duration.fromPartial(object.period) : undefined; - message.periodSpendLimit = object.periodSpendLimit?.map(e => Coin.fromPartial(e)) || []; - message.periodCanSpend = object.periodCanSpend?.map(e => Coin.fromPartial(e)) || []; - message.periodReset = object.periodReset ?? undefined; - return message; - }, - fromSDK(object: PeriodicAllowanceSDKType): PeriodicAllowance { - return { - basic: object.basic ? BasicAllowance.fromSDK(object.basic) : undefined, - period: object.period ? Duration.fromSDK(object.period) : undefined, - periodSpendLimit: Array.isArray(object?.period_spend_limit) ? object.period_spend_limit.map((e: any) => Coin.fromSDK(e)) : [], - periodCanSpend: Array.isArray(object?.period_can_spend) ? object.period_can_spend.map((e: any) => Coin.fromSDK(e)) : [], - periodReset: object.period_reset ?? undefined - }; - }, - toSDK(message: PeriodicAllowance): PeriodicAllowanceSDKType { - const obj: any = {}; - message.basic !== undefined && (obj.basic = message.basic ? BasicAllowance.toSDK(message.basic) : undefined); - message.period !== undefined && (obj.period = message.period ? Duration.toSDK(message.period) : undefined); - if (message.periodSpendLimit) { - obj.period_spend_limit = message.periodSpendLimit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.period_spend_limit = []; - } - if (message.periodCanSpend) { - obj.period_can_spend = message.periodCanSpend.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.period_can_spend = []; - } - message.periodReset !== undefined && (obj.period_reset = message.periodReset ?? undefined); - return obj; - }, - fromAmino(object: PeriodicAllowanceAmino): PeriodicAllowance { - return { - basic: object?.basic ? BasicAllowance.fromAmino(object.basic) : undefined, - period: object?.period ? Duration.fromAmino(object.period) : undefined, - periodSpendLimit: Array.isArray(object?.period_spend_limit) ? object.period_spend_limit.map((e: any) => Coin.fromAmino(e)) : [], - periodCanSpend: Array.isArray(object?.period_can_spend) ? object.period_can_spend.map((e: any) => Coin.fromAmino(e)) : [], - periodReset: object.period_reset - }; - }, - toAmino(message: PeriodicAllowance): PeriodicAllowanceAmino { - const obj: any = {}; - obj.basic = message.basic ? BasicAllowance.toAmino(message.basic) : undefined; - obj.period = message.period ? Duration.toAmino(message.period) : undefined; - if (message.periodSpendLimit) { - obj.period_spend_limit = message.periodSpendLimit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.period_spend_limit = []; - } - if (message.periodCanSpend) { - obj.period_can_spend = message.periodCanSpend.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.period_can_spend = []; - } - obj.period_reset = message.periodReset; - return obj; - }, - fromAminoMsg(object: PeriodicAllowanceAminoMsg): PeriodicAllowance { - return PeriodicAllowance.fromAmino(object.value); - }, - toAminoMsg(message: PeriodicAllowance): PeriodicAllowanceAminoMsg { - return { - type: "cosmos-sdk/PeriodicAllowance", - value: PeriodicAllowance.toAmino(message) - }; - }, - fromProtoMsg(message: PeriodicAllowanceProtoMsg): PeriodicAllowance { - return PeriodicAllowance.decode(message.value); - }, - toProto(message: PeriodicAllowance): Uint8Array { - return PeriodicAllowance.encode(message).finish(); - }, - toProtoMsg(message: PeriodicAllowance): PeriodicAllowanceProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.PeriodicAllowance", - value: PeriodicAllowance.encode(message).finish() - }; - } -}; -function createBaseAllowedMsgAllowance(): AllowedMsgAllowance { - return { - allowance: Any.fromPartial({}), - allowedMessages: [] - }; -} -export const AllowedMsgAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.AllowedMsgAllowance", - aminoType: "cosmos-sdk/AllowedMsgAllowance", - encode(message: AllowedMsgAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.allowedMessages) { - writer.uint32(18).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AllowedMsgAllowance { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAllowedMsgAllowance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowance = Any.decode(reader, reader.uint32()); - break; - case 2: - message.allowedMessages.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AllowedMsgAllowance { - return { - allowance: isSet(object.allowance) ? Any.fromJSON(object.allowance) : undefined, - allowedMessages: Array.isArray(object?.allowedMessages) ? object.allowedMessages.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: AllowedMsgAllowance): unknown { - const obj: any = {}; - message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toJSON(message.allowance) : undefined); - if (message.allowedMessages) { - obj.allowedMessages = message.allowedMessages.map(e => e); - } else { - obj.allowedMessages = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AllowedMsgAllowance { - const message = createBaseAllowedMsgAllowance(); - message.allowance = object.allowance !== undefined && object.allowance !== null ? Any.fromPartial(object.allowance) : undefined; - message.allowedMessages = object.allowedMessages?.map(e => e) || []; - return message; - }, - fromSDK(object: AllowedMsgAllowanceSDKType): AllowedMsgAllowance { - return { - allowance: object.allowance ? Any.fromSDK(object.allowance) : undefined, - allowedMessages: Array.isArray(object?.allowed_messages) ? object.allowed_messages.map((e: any) => e) : [] - }; - }, - toSDK(message: AllowedMsgAllowance): AllowedMsgAllowanceSDKType { - const obj: any = {}; - message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toSDK(message.allowance) : undefined); - if (message.allowedMessages) { - obj.allowed_messages = message.allowedMessages.map(e => e); - } else { - obj.allowed_messages = []; - } - return obj; - }, - fromAmino(object: AllowedMsgAllowanceAmino): AllowedMsgAllowance { - return { - allowance: object?.allowance ? Any.fromAmino(object.allowance) : undefined, - allowedMessages: Array.isArray(object?.allowed_messages) ? object.allowed_messages.map((e: any) => e) : [] - }; - }, - toAmino(message: AllowedMsgAllowance): AllowedMsgAllowanceAmino { - const obj: any = {}; - obj.allowance = message.allowance ? Any.toAmino(message.allowance) : undefined; - if (message.allowedMessages) { - obj.allowed_messages = message.allowedMessages.map(e => e); - } else { - obj.allowed_messages = []; - } - return obj; - }, - fromAminoMsg(object: AllowedMsgAllowanceAminoMsg): AllowedMsgAllowance { - return AllowedMsgAllowance.fromAmino(object.value); - }, - toAminoMsg(message: AllowedMsgAllowance): AllowedMsgAllowanceAminoMsg { - return { - type: "cosmos-sdk/AllowedMsgAllowance", - value: AllowedMsgAllowance.toAmino(message) - }; - }, - fromProtoMsg(message: AllowedMsgAllowanceProtoMsg): AllowedMsgAllowance { - return AllowedMsgAllowance.decode(message.value); - }, - toProto(message: AllowedMsgAllowance): Uint8Array { - return AllowedMsgAllowance.encode(message).finish(); - }, - toProtoMsg(message: AllowedMsgAllowance): AllowedMsgAllowanceProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.AllowedMsgAllowance", - value: AllowedMsgAllowance.encode(message).finish() - }; - } -}; -function createBaseGrant(): Grant { - return { - granter: "", - grantee: "", - allowance: Any.fromPartial({}) - }; -} -export const Grant = { - typeUrl: "/cosmos.feegrant.v1beta1.Grant", - aminoType: "cosmos-sdk/Grant", - encode(message: Grant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Grant { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrant(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Grant { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - allowance: isSet(object.allowance) ? Any.fromJSON(object.allowance) : undefined - }; - }, - toJSON(message: Grant): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toJSON(message.allowance) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Grant { - const message = createBaseGrant(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.allowance = object.allowance !== undefined && object.allowance !== null ? Any.fromPartial(object.allowance) : undefined; - return message; - }, - fromSDK(object: GrantSDKType): Grant { - return { - granter: object?.granter, - grantee: object?.grantee, - allowance: object.allowance ? Any.fromSDK(object.allowance) : undefined - }; - }, - toSDK(message: Grant): GrantSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toSDK(message.allowance) : undefined); - return obj; - }, - fromAmino(object: GrantAmino): Grant { - return { - granter: object.granter, - grantee: object.grantee, - allowance: object?.allowance ? Any.fromAmino(object.allowance) : undefined - }; - }, - toAmino(message: Grant): GrantAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.allowance = message.allowance ? Any.toAmino(message.allowance) : undefined; - return obj; - }, - fromAminoMsg(object: GrantAminoMsg): Grant { - return Grant.fromAmino(object.value); - }, - toAminoMsg(message: Grant): GrantAminoMsg { - return { - type: "cosmos-sdk/Grant", - value: Grant.toAmino(message) - }; - }, - fromProtoMsg(message: GrantProtoMsg): Grant { - return Grant.decode(message.value); - }, - toProto(message: Grant): Uint8Array { - return Grant.encode(message).finish(); - }, - toProtoMsg(message: Grant): GrantProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.Grant", - value: Grant.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/genesis.ts deleted file mode 100644 index bb020f5a..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/genesis.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Grant, GrantAmino, GrantSDKType } from "./feegrant"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** GenesisState contains a set of fee allowances, persisted from the store */ -export interface GenesisState { - allowances: Grant[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState contains a set of fee allowances, persisted from the store */ -export interface GenesisStateAmino { - allowances: GrantAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState contains a set of fee allowances, persisted from the store */ -export interface GenesisStateSDKType { - allowances: GrantSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - allowances: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.feegrant.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toJSON(e) : undefined); - } else { - obj.allowances = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.allowances = object.allowances?.map(e => Grant.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toSDK(e) : undefined); - } else { - obj.allowances = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e) : undefined); - } else { - obj.allowances = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 1dc263bc..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryAllowanceRequest, QueryAllowanceResponse, QueryAllowancesRequest, QueryAllowancesResponse, QueryAllowancesByGranterRequest, QueryAllowancesByGranterResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Allowance returns fee granted to the grantee by the granter. */ - allowance(request: QueryAllowanceRequest): Promise; - /** Allowances returns all the grants for address. */ - allowances(request: QueryAllowancesRequest): Promise; - /** - * AllowancesByGranter returns all the grants given by an address - * Since v0.46 - */ - allowancesByGranter(request: QueryAllowancesByGranterRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.allowance = this.allowance.bind(this); - this.allowances = this.allowances.bind(this); - this.allowancesByGranter = this.allowancesByGranter.bind(this); - } - allowance(request: QueryAllowanceRequest): Promise { - const data = QueryAllowanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowance", data); - return promise.then(data => QueryAllowanceResponse.decode(new BinaryReader(data))); - } - allowances(request: QueryAllowancesRequest): Promise { - const data = QueryAllowancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowances", data); - return promise.then(data => QueryAllowancesResponse.decode(new BinaryReader(data))); - } - allowancesByGranter(request: QueryAllowancesByGranterRequest): Promise { - const data = QueryAllowancesByGranterRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "AllowancesByGranter", data); - return promise.then(data => QueryAllowancesByGranterResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - allowance(request: QueryAllowanceRequest): Promise { - return queryService.allowance(request); - }, - allowances(request: QueryAllowancesRequest): Promise { - return queryService.allowances(request); - }, - allowancesByGranter(request: QueryAllowancesByGranterRequest): Promise { - return queryService.allowancesByGranter(request); - } - }; -}; -export interface UseAllowanceQuery extends ReactQueryParams { - request: QueryAllowanceRequest; -} -export interface UseAllowancesQuery extends ReactQueryParams { - request: QueryAllowancesRequest; -} -export interface UseAllowancesByGranterQuery extends ReactQueryParams { - request: QueryAllowancesByGranterRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useAllowance = ({ - request, - options - }: UseAllowanceQuery) => { - return useQuery(["allowanceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allowance(request); - }, options); - }; - const useAllowances = ({ - request, - options - }: UseAllowancesQuery) => { - return useQuery(["allowancesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allowances(request); - }, options); - }; - const useAllowancesByGranter = ({ - request, - options - }: UseAllowancesByGranterQuery) => { - return useQuery(["allowancesByGranterQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allowancesByGranter(request); - }, options); - }; - return { - /** Allowance returns fee granted to the grantee by the granter. */useAllowance, - /** Allowances returns all the grants for address. */useAllowances, - /** - * AllowancesByGranter returns all the grants given by an address - * Since v0.46 - */ - useAllowancesByGranter - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryAllowanceStore { - store = new QueryStore(queryService?.allowance); - allowance(request: QueryAllowanceRequest) { - return this.store.getData(request); - } - } - class QueryAllowancesStore { - store = new QueryStore(queryService?.allowances); - allowances(request: QueryAllowancesRequest) { - return this.store.getData(request); - } - } - class QueryAllowancesByGranterStore { - store = new QueryStore(queryService?.allowancesByGranter); - allowancesByGranter(request: QueryAllowancesByGranterRequest) { - return this.store.getData(request); - } - } - return { - /** Allowance returns fee granted to the grantee by the granter. */QueryAllowanceStore, - /** Allowances returns all the grants for address. */QueryAllowancesStore, - /** - * AllowancesByGranter returns all the grants given by an address - * Since v0.46 - */ - QueryAllowancesByGranterStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/query.ts deleted file mode 100644 index ac0cd19c..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/query.ts +++ /dev/null @@ -1,779 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Grant, GrantAmino, GrantSDKType } from "./feegrant"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ -export interface QueryAllowanceRequest { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} -export interface QueryAllowanceRequestProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowanceRequest"; - value: Uint8Array; -} -/** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ -export interface QueryAllowanceRequestAmino { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} -export interface QueryAllowanceRequestAminoMsg { - type: "cosmos-sdk/QueryAllowanceRequest"; - value: QueryAllowanceRequestAmino; -} -/** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ -export interface QueryAllowanceRequestSDKType { - granter: string; - grantee: string; -} -/** QueryAllowanceResponse is the response type for the Query/Allowance RPC method. */ -export interface QueryAllowanceResponse { - /** allowance is a allowance granted for grantee by granter. */ - allowance: Grant | undefined; -} -export interface QueryAllowanceResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowanceResponse"; - value: Uint8Array; -} -/** QueryAllowanceResponse is the response type for the Query/Allowance RPC method. */ -export interface QueryAllowanceResponseAmino { - /** allowance is a allowance granted for grantee by granter. */ - allowance?: GrantAmino | undefined; -} -export interface QueryAllowanceResponseAminoMsg { - type: "cosmos-sdk/QueryAllowanceResponse"; - value: QueryAllowanceResponseAmino; -} -/** QueryAllowanceResponse is the response type for the Query/Allowance RPC method. */ -export interface QueryAllowanceResponseSDKType { - allowance: GrantSDKType | undefined; -} -/** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ -export interface QueryAllowancesRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryAllowancesRequestProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesRequest"; - value: Uint8Array; -} -/** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ -export interface QueryAllowancesRequestAmino { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryAllowancesRequestAminoMsg { - type: "cosmos-sdk/QueryAllowancesRequest"; - value: QueryAllowancesRequestAmino; -} -/** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ -export interface QueryAllowancesRequestSDKType { - grantee: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryAllowancesResponse is the response type for the Query/Allowances RPC method. */ -export interface QueryAllowancesResponse { - /** allowances are allowance's granted for grantee by granter. */ - allowances: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface QueryAllowancesResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesResponse"; - value: Uint8Array; -} -/** QueryAllowancesResponse is the response type for the Query/Allowances RPC method. */ -export interface QueryAllowancesResponseAmino { - /** allowances are allowance's granted for grantee by granter. */ - allowances: GrantAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryAllowancesResponseAminoMsg { - type: "cosmos-sdk/QueryAllowancesResponse"; - value: QueryAllowancesResponseAmino; -} -/** QueryAllowancesResponse is the response type for the Query/Allowances RPC method. */ -export interface QueryAllowancesResponseSDKType { - allowances: GrantSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterRequest { - granter: string; - /** pagination defines an pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryAllowancesByGranterRequestProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest"; - value: Uint8Array; -} -/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterRequestAmino { - granter: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryAllowancesByGranterRequestAminoMsg { - type: "cosmos-sdk/QueryAllowancesByGranterRequest"; - value: QueryAllowancesByGranterRequestAmino; -} -/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterRequestSDKType { - granter: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterResponse { - /** allowances that have been issued by the granter. */ - allowances: Grant[]; - /** pagination defines an pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface QueryAllowancesByGranterResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse"; - value: Uint8Array; -} -/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterResponseAmino { - /** allowances that have been issued by the granter. */ - allowances: GrantAmino[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryAllowancesByGranterResponseAminoMsg { - type: "cosmos-sdk/QueryAllowancesByGranterResponse"; - value: QueryAllowancesByGranterResponseAmino; -} -/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterResponseSDKType { - allowances: GrantSDKType[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryAllowanceRequest(): QueryAllowanceRequest { - return { - granter: "", - grantee: "" - }; -} -export const QueryAllowanceRequest = { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowanceRequest", - aminoType: "cosmos-sdk/QueryAllowanceRequest", - encode(message: QueryAllowanceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllowanceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowanceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllowanceRequest { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "" - }; - }, - toJSON(message: QueryAllowanceRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllowanceRequest { - const message = createBaseQueryAllowanceRequest(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - return message; - }, - fromSDK(object: QueryAllowanceRequestSDKType): QueryAllowanceRequest { - return { - granter: object?.granter, - grantee: object?.grantee - }; - }, - toSDK(message: QueryAllowanceRequest): QueryAllowanceRequestSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAmino(object: QueryAllowanceRequestAmino): QueryAllowanceRequest { - return { - granter: object.granter, - grantee: object.grantee - }; - }, - toAmino(message: QueryAllowanceRequest): QueryAllowanceRequestAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAminoMsg(object: QueryAllowanceRequestAminoMsg): QueryAllowanceRequest { - return QueryAllowanceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllowanceRequest): QueryAllowanceRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAllowanceRequest", - value: QueryAllowanceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllowanceRequestProtoMsg): QueryAllowanceRequest { - return QueryAllowanceRequest.decode(message.value); - }, - toProto(message: QueryAllowanceRequest): Uint8Array { - return QueryAllowanceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAllowanceRequest): QueryAllowanceRequestProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowanceRequest", - value: QueryAllowanceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAllowanceResponse(): QueryAllowanceResponse { - return { - allowance: Grant.fromPartial({}) - }; -} -export const QueryAllowanceResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowanceResponse", - aminoType: "cosmos-sdk/QueryAllowanceResponse", - encode(message: QueryAllowanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.allowance !== undefined) { - Grant.encode(message.allowance, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllowanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowance = Grant.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllowanceResponse { - return { - allowance: isSet(object.allowance) ? Grant.fromJSON(object.allowance) : undefined - }; - }, - toJSON(message: QueryAllowanceResponse): unknown { - const obj: any = {}; - message.allowance !== undefined && (obj.allowance = message.allowance ? Grant.toJSON(message.allowance) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllowanceResponse { - const message = createBaseQueryAllowanceResponse(); - message.allowance = object.allowance !== undefined && object.allowance !== null ? Grant.fromPartial(object.allowance) : undefined; - return message; - }, - fromSDK(object: QueryAllowanceResponseSDKType): QueryAllowanceResponse { - return { - allowance: object.allowance ? Grant.fromSDK(object.allowance) : undefined - }; - }, - toSDK(message: QueryAllowanceResponse): QueryAllowanceResponseSDKType { - const obj: any = {}; - message.allowance !== undefined && (obj.allowance = message.allowance ? Grant.toSDK(message.allowance) : undefined); - return obj; - }, - fromAmino(object: QueryAllowanceResponseAmino): QueryAllowanceResponse { - return { - allowance: object?.allowance ? Grant.fromAmino(object.allowance) : undefined - }; - }, - toAmino(message: QueryAllowanceResponse): QueryAllowanceResponseAmino { - const obj: any = {}; - obj.allowance = message.allowance ? Grant.toAmino(message.allowance) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllowanceResponseAminoMsg): QueryAllowanceResponse { - return QueryAllowanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllowanceResponse): QueryAllowanceResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAllowanceResponse", - value: QueryAllowanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllowanceResponseProtoMsg): QueryAllowanceResponse { - return QueryAllowanceResponse.decode(message.value); - }, - toProto(message: QueryAllowanceResponse): Uint8Array { - return QueryAllowanceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAllowanceResponse): QueryAllowanceResponseProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowanceResponse", - value: QueryAllowanceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAllowancesRequest(): QueryAllowancesRequest { - return { - grantee: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryAllowancesRequest = { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesRequest", - aminoType: "cosmos-sdk/QueryAllowancesRequest", - encode(message: QueryAllowancesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllowancesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowancesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllowancesRequest { - return { - grantee: isSet(object.grantee) ? String(object.grantee) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllowancesRequest): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllowancesRequest { - const message = createBaseQueryAllowancesRequest(); - message.grantee = object.grantee ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllowancesRequestSDKType): QueryAllowancesRequest { - return { - grantee: object?.grantee, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllowancesRequest): QueryAllowancesRequestSDKType { - const obj: any = {}; - obj.grantee = message.grantee; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllowancesRequestAmino): QueryAllowancesRequest { - return { - grantee: object.grantee, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllowancesRequest): QueryAllowancesRequestAmino { - const obj: any = {}; - obj.grantee = message.grantee; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllowancesRequestAminoMsg): QueryAllowancesRequest { - return QueryAllowancesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllowancesRequest): QueryAllowancesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAllowancesRequest", - value: QueryAllowancesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllowancesRequestProtoMsg): QueryAllowancesRequest { - return QueryAllowancesRequest.decode(message.value); - }, - toProto(message: QueryAllowancesRequest): Uint8Array { - return QueryAllowancesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAllowancesRequest): QueryAllowancesRequestProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesRequest", - value: QueryAllowancesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAllowancesResponse(): QueryAllowancesResponse { - return { - allowances: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryAllowancesResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesResponse", - aminoType: "cosmos-sdk/QueryAllowancesResponse", - encode(message: QueryAllowancesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllowancesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowancesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllowancesResponse { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllowancesResponse): unknown { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toJSON(e) : undefined); - } else { - obj.allowances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllowancesResponse { - const message = createBaseQueryAllowancesResponse(); - message.allowances = object.allowances?.map(e => Grant.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllowancesResponseSDKType): QueryAllowancesResponse { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllowancesResponse): QueryAllowancesResponseSDKType { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toSDK(e) : undefined); - } else { - obj.allowances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllowancesResponseAmino): QueryAllowancesResponse { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllowancesResponse): QueryAllowancesResponseAmino { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e) : undefined); - } else { - obj.allowances = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllowancesResponseAminoMsg): QueryAllowancesResponse { - return QueryAllowancesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllowancesResponse): QueryAllowancesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAllowancesResponse", - value: QueryAllowancesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllowancesResponseProtoMsg): QueryAllowancesResponse { - return QueryAllowancesResponse.decode(message.value); - }, - toProto(message: QueryAllowancesResponse): Uint8Array { - return QueryAllowancesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAllowancesResponse): QueryAllowancesResponseProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesResponse", - value: QueryAllowancesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAllowancesByGranterRequest(): QueryAllowancesByGranterRequest { - return { - granter: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryAllowancesByGranterRequest = { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest", - aminoType: "cosmos-sdk/QueryAllowancesByGranterRequest", - encode(message: QueryAllowancesByGranterRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllowancesByGranterRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowancesByGranterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllowancesByGranterRequest { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllowancesByGranterRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllowancesByGranterRequest { - const message = createBaseQueryAllowancesByGranterRequest(); - message.granter = object.granter ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllowancesByGranterRequestSDKType): QueryAllowancesByGranterRequest { - return { - granter: object?.granter, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllowancesByGranterRequest): QueryAllowancesByGranterRequestSDKType { - const obj: any = {}; - obj.granter = message.granter; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllowancesByGranterRequestAmino): QueryAllowancesByGranterRequest { - return { - granter: object.granter, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllowancesByGranterRequest): QueryAllowancesByGranterRequestAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllowancesByGranterRequestAminoMsg): QueryAllowancesByGranterRequest { - return QueryAllowancesByGranterRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllowancesByGranterRequest): QueryAllowancesByGranterRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAllowancesByGranterRequest", - value: QueryAllowancesByGranterRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllowancesByGranterRequestProtoMsg): QueryAllowancesByGranterRequest { - return QueryAllowancesByGranterRequest.decode(message.value); - }, - toProto(message: QueryAllowancesByGranterRequest): Uint8Array { - return QueryAllowancesByGranterRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAllowancesByGranterRequest): QueryAllowancesByGranterRequestProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest", - value: QueryAllowancesByGranterRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAllowancesByGranterResponse(): QueryAllowancesByGranterResponse { - return { - allowances: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryAllowancesByGranterResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse", - aminoType: "cosmos-sdk/QueryAllowancesByGranterResponse", - encode(message: QueryAllowancesByGranterResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllowancesByGranterResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowancesByGranterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllowancesByGranterResponse { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllowancesByGranterResponse): unknown { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toJSON(e) : undefined); - } else { - obj.allowances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllowancesByGranterResponse { - const message = createBaseQueryAllowancesByGranterResponse(); - message.allowances = object.allowances?.map(e => Grant.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllowancesByGranterResponseSDKType): QueryAllowancesByGranterResponse { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllowancesByGranterResponse): QueryAllowancesByGranterResponseSDKType { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toSDK(e) : undefined); - } else { - obj.allowances = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllowancesByGranterResponseAmino): QueryAllowancesByGranterResponse { - return { - allowances: Array.isArray(object?.allowances) ? object.allowances.map((e: any) => Grant.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllowancesByGranterResponse): QueryAllowancesByGranterResponseAmino { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map(e => e ? Grant.toAmino(e) : undefined); - } else { - obj.allowances = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllowancesByGranterResponseAminoMsg): QueryAllowancesByGranterResponse { - return QueryAllowancesByGranterResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllowancesByGranterResponse): QueryAllowancesByGranterResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAllowancesByGranterResponse", - value: QueryAllowancesByGranterResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllowancesByGranterResponseProtoMsg): QueryAllowancesByGranterResponse { - return QueryAllowancesByGranterResponse.decode(message.value); - }, - toProto(message: QueryAllowancesByGranterResponse): Uint8Array { - return QueryAllowancesByGranterResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAllowancesByGranterResponse): QueryAllowancesByGranterResponseProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse", - value: QueryAllowancesByGranterResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.amino.ts deleted file mode 100644 index 1a5cbbbd..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.amino.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MsgGrantAllowance, MsgRevokeAllowance } from "./tx"; -export const AminoConverter = { - "/cosmos.feegrant.v1beta1.MsgGrantAllowance": { - aminoType: "cosmos-sdk/MsgGrantAllowance", - toAmino: MsgGrantAllowance.toAmino, - fromAmino: MsgGrantAllowance.fromAmino - }, - "/cosmos.feegrant.v1beta1.MsgRevokeAllowance": { - aminoType: "cosmos-sdk/MsgRevokeAllowance", - toAmino: MsgRevokeAllowance.toAmino, - fromAmino: MsgRevokeAllowance.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.registry.ts deleted file mode 100644 index fdac3ac5..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.registry.ts +++ /dev/null @@ -1,81 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgGrantAllowance, MsgRevokeAllowance } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - grantAllowance(value: MsgGrantAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - value: MsgGrantAllowance.encode(value).finish() - }; - }, - revokeAllowance(value: MsgRevokeAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - value: MsgRevokeAllowance.encode(value).finish() - }; - } - }, - withTypeUrl: { - grantAllowance(value: MsgGrantAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - value - }; - }, - revokeAllowance(value: MsgRevokeAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - value - }; - } - }, - toJSON: { - grantAllowance(value: MsgGrantAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - value: MsgGrantAllowance.toJSON(value) - }; - }, - revokeAllowance(value: MsgRevokeAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - value: MsgRevokeAllowance.toJSON(value) - }; - } - }, - fromJSON: { - grantAllowance(value: any) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - value: MsgGrantAllowance.fromJSON(value) - }; - }, - revokeAllowance(value: any) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - value: MsgRevokeAllowance.fromJSON(value) - }; - } - }, - fromPartial: { - grantAllowance(value: MsgGrantAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - value: MsgGrantAllowance.fromPartial(value) - }; - }, - revokeAllowance(value: MsgRevokeAllowance) { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - value: MsgRevokeAllowance.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 34b65501..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgGrantAllowance, MsgGrantAllowanceResponse, MsgRevokeAllowance, MsgRevokeAllowanceResponse } from "./tx"; -/** Msg defines the feegrant msg service. */ -export interface Msg { - /** - * GrantAllowance grants fee allowance to the grantee on the granter's - * account with the provided expiration time. - */ - grantAllowance(request: MsgGrantAllowance): Promise; - /** - * RevokeAllowance revokes any fee allowance of granter's account that - * has been granted to the grantee. - */ - revokeAllowance(request: MsgRevokeAllowance): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.grantAllowance = this.grantAllowance.bind(this); - this.revokeAllowance = this.revokeAllowance.bind(this); - } - grantAllowance(request: MsgGrantAllowance): Promise { - const data = MsgGrantAllowance.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Msg", "GrantAllowance", data); - return promise.then(data => MsgGrantAllowanceResponse.decode(new BinaryReader(data))); - } - revokeAllowance(request: MsgRevokeAllowance): Promise { - const data = MsgRevokeAllowance.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Msg", "RevokeAllowance", data); - return promise.then(data => MsgRevokeAllowanceResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.ts deleted file mode 100644 index 7ec32ba9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/feegrant/v1beta1/tx.ts +++ /dev/null @@ -1,457 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgGrantAllowance adds permission for Grantee to spend up to Allowance - * of fees from the account of Granter. - */ -export interface MsgGrantAllowance { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic, periodic, allowed fee allowance. */ - allowance: Any | undefined; -} -export interface MsgGrantAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance"; - value: Uint8Array; -} -/** - * MsgGrantAllowance adds permission for Grantee to spend up to Allowance - * of fees from the account of Granter. - */ -export interface MsgGrantAllowanceAmino { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; - /** allowance can be any of basic, periodic, allowed fee allowance. */ - allowance?: AnyAmino | undefined; -} -export interface MsgGrantAllowanceAminoMsg { - type: "cosmos-sdk/MsgGrantAllowance"; - value: MsgGrantAllowanceAmino; -} -/** - * MsgGrantAllowance adds permission for Grantee to spend up to Allowance - * of fees from the account of Granter. - */ -export interface MsgGrantAllowanceSDKType { - granter: string; - grantee: string; - allowance: AnySDKType | undefined; -} -/** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ -export interface MsgGrantAllowanceResponse {} -export interface MsgGrantAllowanceResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse"; - value: Uint8Array; -} -/** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ -export interface MsgGrantAllowanceResponseAmino {} -export interface MsgGrantAllowanceResponseAminoMsg { - type: "cosmos-sdk/MsgGrantAllowanceResponse"; - value: MsgGrantAllowanceResponseAmino; -} -/** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ -export interface MsgGrantAllowanceResponseSDKType {} -/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ -export interface MsgRevokeAllowance { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} -export interface MsgRevokeAllowanceProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance"; - value: Uint8Array; -} -/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ -export interface MsgRevokeAllowanceAmino { - /** granter is the address of the user granting an allowance of their funds. */ - granter: string; - /** grantee is the address of the user being granted an allowance of another user's funds. */ - grantee: string; -} -export interface MsgRevokeAllowanceAminoMsg { - type: "cosmos-sdk/MsgRevokeAllowance"; - value: MsgRevokeAllowanceAmino; -} -/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ -export interface MsgRevokeAllowanceSDKType { - granter: string; - grantee: string; -} -/** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ -export interface MsgRevokeAllowanceResponse {} -export interface MsgRevokeAllowanceResponseProtoMsg { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse"; - value: Uint8Array; -} -/** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ -export interface MsgRevokeAllowanceResponseAmino {} -export interface MsgRevokeAllowanceResponseAminoMsg { - type: "cosmos-sdk/MsgRevokeAllowanceResponse"; - value: MsgRevokeAllowanceResponseAmino; -} -/** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ -export interface MsgRevokeAllowanceResponseSDKType {} -function createBaseMsgGrantAllowance(): MsgGrantAllowance { - return { - granter: "", - grantee: "", - allowance: Any.fromPartial({}) - }; -} -export const MsgGrantAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - aminoType: "cosmos-sdk/MsgGrantAllowance", - encode(message: MsgGrantAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.allowance !== undefined) { - Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgGrantAllowance { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgGrantAllowance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.allowance = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgGrantAllowance { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - allowance: isSet(object.allowance) ? Any.fromJSON(object.allowance) : undefined - }; - }, - toJSON(message: MsgGrantAllowance): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toJSON(message.allowance) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgGrantAllowance { - const message = createBaseMsgGrantAllowance(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.allowance = object.allowance !== undefined && object.allowance !== null ? Any.fromPartial(object.allowance) : undefined; - return message; - }, - fromSDK(object: MsgGrantAllowanceSDKType): MsgGrantAllowance { - return { - granter: object?.granter, - grantee: object?.grantee, - allowance: object.allowance ? Any.fromSDK(object.allowance) : undefined - }; - }, - toSDK(message: MsgGrantAllowance): MsgGrantAllowanceSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toSDK(message.allowance) : undefined); - return obj; - }, - fromAmino(object: MsgGrantAllowanceAmino): MsgGrantAllowance { - return { - granter: object.granter, - grantee: object.grantee, - allowance: object?.allowance ? Any.fromAmino(object.allowance) : undefined - }; - }, - toAmino(message: MsgGrantAllowance): MsgGrantAllowanceAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - obj.allowance = message.allowance ? Any.toAmino(message.allowance) : undefined; - return obj; - }, - fromAminoMsg(object: MsgGrantAllowanceAminoMsg): MsgGrantAllowance { - return MsgGrantAllowance.fromAmino(object.value); - }, - toAminoMsg(message: MsgGrantAllowance): MsgGrantAllowanceAminoMsg { - return { - type: "cosmos-sdk/MsgGrantAllowance", - value: MsgGrantAllowance.toAmino(message) - }; - }, - fromProtoMsg(message: MsgGrantAllowanceProtoMsg): MsgGrantAllowance { - return MsgGrantAllowance.decode(message.value); - }, - toProto(message: MsgGrantAllowance): Uint8Array { - return MsgGrantAllowance.encode(message).finish(); - }, - toProtoMsg(message: MsgGrantAllowance): MsgGrantAllowanceProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - value: MsgGrantAllowance.encode(message).finish() - }; - } -}; -function createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse { - return {}; -} -export const MsgGrantAllowanceResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", - aminoType: "cosmos-sdk/MsgGrantAllowanceResponse", - encode(_: MsgGrantAllowanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgGrantAllowanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgGrantAllowanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgGrantAllowanceResponse { - return {}; - }, - toJSON(_: MsgGrantAllowanceResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgGrantAllowanceResponse { - const message = createBaseMsgGrantAllowanceResponse(); - return message; - }, - fromSDK(_: MsgGrantAllowanceResponseSDKType): MsgGrantAllowanceResponse { - return {}; - }, - toSDK(_: MsgGrantAllowanceResponse): MsgGrantAllowanceResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgGrantAllowanceResponseAmino): MsgGrantAllowanceResponse { - return {}; - }, - toAmino(_: MsgGrantAllowanceResponse): MsgGrantAllowanceResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgGrantAllowanceResponseAminoMsg): MsgGrantAllowanceResponse { - return MsgGrantAllowanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgGrantAllowanceResponse): MsgGrantAllowanceResponseAminoMsg { - return { - type: "cosmos-sdk/MsgGrantAllowanceResponse", - value: MsgGrantAllowanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgGrantAllowanceResponseProtoMsg): MsgGrantAllowanceResponse { - return MsgGrantAllowanceResponse.decode(message.value); - }, - toProto(message: MsgGrantAllowanceResponse): Uint8Array { - return MsgGrantAllowanceResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgGrantAllowanceResponse): MsgGrantAllowanceResponseProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", - value: MsgGrantAllowanceResponse.encode(message).finish() - }; - } -}; -function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { - return { - granter: "", - grantee: "" - }; -} -export const MsgRevokeAllowance = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - aminoType: "cosmos-sdk/MsgRevokeAllowance", - encode(message: MsgRevokeAllowance, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgRevokeAllowance { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRevokeAllowance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgRevokeAllowance { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "" - }; - }, - toJSON(message: MsgRevokeAllowance): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - return obj; - }, - fromPartial(object: DeepPartial): MsgRevokeAllowance { - const message = createBaseMsgRevokeAllowance(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - return message; - }, - fromSDK(object: MsgRevokeAllowanceSDKType): MsgRevokeAllowance { - return { - granter: object?.granter, - grantee: object?.grantee - }; - }, - toSDK(message: MsgRevokeAllowance): MsgRevokeAllowanceSDKType { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAmino(object: MsgRevokeAllowanceAmino): MsgRevokeAllowance { - return { - granter: object.granter, - grantee: object.grantee - }; - }, - toAmino(message: MsgRevokeAllowance): MsgRevokeAllowanceAmino { - const obj: any = {}; - obj.granter = message.granter; - obj.grantee = message.grantee; - return obj; - }, - fromAminoMsg(object: MsgRevokeAllowanceAminoMsg): MsgRevokeAllowance { - return MsgRevokeAllowance.fromAmino(object.value); - }, - toAminoMsg(message: MsgRevokeAllowance): MsgRevokeAllowanceAminoMsg { - return { - type: "cosmos-sdk/MsgRevokeAllowance", - value: MsgRevokeAllowance.toAmino(message) - }; - }, - fromProtoMsg(message: MsgRevokeAllowanceProtoMsg): MsgRevokeAllowance { - return MsgRevokeAllowance.decode(message.value); - }, - toProto(message: MsgRevokeAllowance): Uint8Array { - return MsgRevokeAllowance.encode(message).finish(); - }, - toProtoMsg(message: MsgRevokeAllowance): MsgRevokeAllowanceProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - value: MsgRevokeAllowance.encode(message).finish() - }; - } -}; -function createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse { - return {}; -} -export const MsgRevokeAllowanceResponse = { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", - aminoType: "cosmos-sdk/MsgRevokeAllowanceResponse", - encode(_: MsgRevokeAllowanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgRevokeAllowanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRevokeAllowanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgRevokeAllowanceResponse { - return {}; - }, - toJSON(_: MsgRevokeAllowanceResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgRevokeAllowanceResponse { - const message = createBaseMsgRevokeAllowanceResponse(); - return message; - }, - fromSDK(_: MsgRevokeAllowanceResponseSDKType): MsgRevokeAllowanceResponse { - return {}; - }, - toSDK(_: MsgRevokeAllowanceResponse): MsgRevokeAllowanceResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgRevokeAllowanceResponseAmino): MsgRevokeAllowanceResponse { - return {}; - }, - toAmino(_: MsgRevokeAllowanceResponse): MsgRevokeAllowanceResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgRevokeAllowanceResponseAminoMsg): MsgRevokeAllowanceResponse { - return MsgRevokeAllowanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgRevokeAllowanceResponse): MsgRevokeAllowanceResponseAminoMsg { - return { - type: "cosmos-sdk/MsgRevokeAllowanceResponse", - value: MsgRevokeAllowanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgRevokeAllowanceResponseProtoMsg): MsgRevokeAllowanceResponse { - return MsgRevokeAllowanceResponse.decode(message.value); - }, - toProto(message: MsgRevokeAllowanceResponse): Uint8Array { - return MsgRevokeAllowanceResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgRevokeAllowanceResponse): MsgRevokeAllowanceResponseProtoMsg { - return { - typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", - value: MsgRevokeAllowanceResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/genutil/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/genutil/v1beta1/genesis.ts deleted file mode 100644 index fdbf5b44..00000000 --- a/examples/interchainjs/src/codegen/cosmos/genutil/v1beta1/genesis.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** GenesisState defines the raw genesis transaction in JSON. */ -export interface GenesisState { - /** gen_txs defines the genesis transactions. */ - genTxs: Uint8Array[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.genutil.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the raw genesis transaction in JSON. */ -export interface GenesisStateAmino { - /** gen_txs defines the genesis transactions. */ - gen_txs: Uint8Array[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the raw genesis transaction in JSON. */ -export interface GenesisStateSDKType { - gen_txs: Uint8Array[]; -} -function createBaseGenesisState(): GenesisState { - return { - genTxs: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.genutil.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.genTxs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.genTxs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - genTxs: Array.isArray(object?.genTxs) ? object.genTxs.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.genTxs) { - obj.genTxs = message.genTxs.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.genTxs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.genTxs = object.genTxs?.map(e => e) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - genTxs: Array.isArray(object?.gen_txs) ? object.gen_txs.map((e: any) => e) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.genTxs) { - obj.gen_txs = message.genTxs.map(e => e); - } else { - obj.gen_txs = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - genTxs: Array.isArray(object?.gen_txs) ? object.gen_txs.map((e: any) => e) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.genTxs) { - obj.gen_txs = message.genTxs.map(e => e); - } else { - obj.gen_txs = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.genutil.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/genesis.ts deleted file mode 100644 index dd3a154e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/genesis.ts +++ /dev/null @@ -1,263 +0,0 @@ -import { Deposit, DepositAmino, DepositSDKType, Vote, VoteAmino, VoteSDKType, Proposal, ProposalAmino, ProposalSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType } from "./gov"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisState { - /** starting_proposal_id is the ID of the starting proposal. */ - startingProposalId: bigint; - /** deposits defines all the deposits present at genesis. */ - deposits: Deposit[]; - /** votes defines all the votes present at genesis. */ - votes: Vote[]; - /** proposals defines all the proposals present at genesis. */ - proposals: Proposal[]; - /** params defines all the paramaters of related to deposit. */ - depositParams: DepositParams | undefined; - /** params defines all the paramaters of related to voting. */ - votingParams: VotingParams | undefined; - /** params defines all the paramaters of related to tally. */ - tallyParams: TallyParams | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.gov.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisStateAmino { - /** starting_proposal_id is the ID of the starting proposal. */ - starting_proposal_id: string; - /** deposits defines all the deposits present at genesis. */ - deposits: DepositAmino[]; - /** votes defines all the votes present at genesis. */ - votes: VoteAmino[]; - /** proposals defines all the proposals present at genesis. */ - proposals: ProposalAmino[]; - /** params defines all the paramaters of related to deposit. */ - deposit_params?: DepositParamsAmino | undefined; - /** params defines all the paramaters of related to voting. */ - voting_params?: VotingParamsAmino | undefined; - /** params defines all the paramaters of related to tally. */ - tally_params?: TallyParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/v1/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisStateSDKType { - starting_proposal_id: bigint; - deposits: DepositSDKType[]; - votes: VoteSDKType[]; - proposals: ProposalSDKType[]; - deposit_params: DepositParamsSDKType | undefined; - voting_params: VotingParamsSDKType | undefined; - tally_params: TallyParamsSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - startingProposalId: BigInt(0), - deposits: [], - votes: [], - proposals: [], - depositParams: DepositParams.fromPartial({}), - votingParams: VotingParams.fromPartial({}), - tallyParams: TallyParams.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/cosmos.gov.v1.GenesisState", - aminoType: "cosmos-sdk/v1/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.startingProposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.startingProposalId); - } - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(42).fork()).ldelim(); - } - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(50).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startingProposalId = reader.uint64(); - break; - case 2: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 3: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 4: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 5: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 6: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 7: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - startingProposalId: isSet(object.startingProposalId) ? BigInt(object.startingProposalId.toString()) : BigInt(0), - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromJSON(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromJSON(e)) : [], - depositParams: isSet(object.depositParams) ? DepositParams.fromJSON(object.depositParams) : undefined, - votingParams: isSet(object.votingParams) ? VotingParams.fromJSON(object.votingParams) : undefined, - tallyParams: isSet(object.tallyParams) ? TallyParams.fromJSON(object.tallyParams) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.startingProposalId !== undefined && (obj.startingProposalId = (message.startingProposalId || BigInt(0)).toString()); - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toJSON(e) : undefined); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toJSON(e) : undefined); - } else { - obj.proposals = []; - } - message.depositParams !== undefined && (obj.depositParams = message.depositParams ? DepositParams.toJSON(message.depositParams) : undefined); - message.votingParams !== undefined && (obj.votingParams = message.votingParams ? VotingParams.toJSON(message.votingParams) : undefined); - message.tallyParams !== undefined && (obj.tallyParams = message.tallyParams ? TallyParams.toJSON(message.tallyParams) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.startingProposalId = object.startingProposalId !== undefined && object.startingProposalId !== null ? BigInt(object.startingProposalId.toString()) : BigInt(0); - message.deposits = object.deposits?.map(e => Deposit.fromPartial(e)) || []; - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || []; - message.depositParams = object.depositParams !== undefined && object.depositParams !== null ? DepositParams.fromPartial(object.depositParams) : undefined; - message.votingParams = object.votingParams !== undefined && object.votingParams !== null ? VotingParams.fromPartial(object.votingParams) : undefined; - message.tallyParams = object.tallyParams !== undefined && object.tallyParams !== null ? TallyParams.fromPartial(object.tallyParams) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - startingProposalId: object?.starting_proposal_id, - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromSDK(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [], - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromSDK(e)) : [], - depositParams: object.deposit_params ? DepositParams.fromSDK(object.deposit_params) : undefined, - votingParams: object.voting_params ? VotingParams.fromSDK(object.voting_params) : undefined, - tallyParams: object.tally_params ? TallyParams.fromSDK(object.tally_params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.starting_proposal_id = message.startingProposalId; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toSDK(e) : undefined); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toSDK(e) : undefined); - } else { - obj.proposals = []; - } - message.depositParams !== undefined && (obj.deposit_params = message.depositParams ? DepositParams.toSDK(message.depositParams) : undefined); - message.votingParams !== undefined && (obj.voting_params = message.votingParams ? VotingParams.toSDK(message.votingParams) : undefined); - message.tallyParams !== undefined && (obj.tally_params = message.tallyParams ? TallyParams.toSDK(message.tallyParams) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - startingProposalId: BigInt(object.starting_proposal_id), - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromAmino(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [], - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromAmino(e)) : [], - depositParams: object?.deposit_params ? DepositParams.fromAmino(object.deposit_params) : undefined, - votingParams: object?.voting_params ? VotingParams.fromAmino(object.voting_params) : undefined, - tallyParams: object?.tally_params ? TallyParams.fromAmino(object.tally_params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.starting_proposal_id = message.startingProposalId ? message.startingProposalId.toString() : undefined; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e) : undefined); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined); - } else { - obj.proposals = []; - } - obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams) : undefined; - obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams) : undefined; - obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/v1/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/gov.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/gov.ts deleted file mode 100644 index 93cc5463..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/gov.ts +++ /dev/null @@ -1,1483 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VOTE_OPTION_UNSPECIFIED = 0, - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VOTE_OPTION_YES = 1, - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VOTE_OPTION_ABSTAIN = 2, - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VOTE_OPTION_NO = 3, - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VOTE_OPTION_NO_WITH_VETO = 4, - UNRECOGNIZED = -1, -} -export const VoteOptionSDKType = VoteOption; -export const VoteOptionAmino = VoteOption; -export function voteOptionFromJSON(object: any): VoteOption { - switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; - } -} -export function voteOptionToJSON(object: VoteOption): string { - switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - PROPOSAL_STATUS_VOTING_PERIOD = 2, - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - PROPOSAL_STATUS_PASSED = 3, - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - PROPOSAL_STATUS_REJECTED = 4, - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - PROPOSAL_STATUS_FAILED = 5, - UNRECOGNIZED = -1, -} -export const ProposalStatusSDKType = ProposalStatus; -export const ProposalStatusAmino = ProposalStatus; -export function proposalStatusFromJSON(object: any): ProposalStatus { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} -export function proposalStatusToJSON(object: ProposalStatus): string { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** WeightedVoteOption defines a unit of vote for vote split. */ -export interface WeightedVoteOption { - option: VoteOption; - weight: string; -} -export interface WeightedVoteOptionProtoMsg { - typeUrl: "/cosmos.gov.v1.WeightedVoteOption"; - value: Uint8Array; -} -/** WeightedVoteOption defines a unit of vote for vote split. */ -export interface WeightedVoteOptionAmino { - option: VoteOption; - weight: string; -} -export interface WeightedVoteOptionAminoMsg { - type: "cosmos-sdk/v1/WeightedVoteOption"; - value: WeightedVoteOptionAmino; -} -/** WeightedVoteOption defines a unit of vote for vote split. */ -export interface WeightedVoteOptionSDKType { - option: VoteOption; - weight: string; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface Deposit { - proposalId: bigint; - depositor: string; - amount: Coin[]; -} -export interface DepositProtoMsg { - typeUrl: "/cosmos.gov.v1.Deposit"; - value: Uint8Array; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface DepositAmino { - proposal_id: string; - depositor: string; - amount: CoinAmino[]; -} -export interface DepositAminoMsg { - type: "cosmos-sdk/v1/Deposit"; - value: DepositAmino; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface DepositSDKType { - proposal_id: bigint; - depositor: string; - amount: CoinSDKType[]; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface Proposal { - id: bigint; - messages: Any[]; - status: ProposalStatus; - /** - * final_tally_result is the final tally result of the proposal. When - * querying a proposal via gRPC, this field is not populated until the - * proposal's voting period has ended. - */ - finalTallyResult: TallyResult | undefined; - submitTime: Date | undefined; - depositEndTime: Date | undefined; - totalDeposit: Coin[]; - votingStartTime: Date | undefined; - votingEndTime: Date | undefined; - /** metadata is any arbitrary metadata attached to the proposal. */ - metadata: string; -} -export interface ProposalProtoMsg { - typeUrl: "/cosmos.gov.v1.Proposal"; - value: Uint8Array; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface ProposalAmino { - id: string; - messages: AnyAmino[]; - status: ProposalStatus; - /** - * final_tally_result is the final tally result of the proposal. When - * querying a proposal via gRPC, this field is not populated until the - * proposal's voting period has ended. - */ - final_tally_result?: TallyResultAmino | undefined; - submit_time?: Date | undefined; - deposit_end_time?: Date | undefined; - total_deposit: CoinAmino[]; - voting_start_time?: Date | undefined; - voting_end_time?: Date | undefined; - /** metadata is any arbitrary metadata attached to the proposal. */ - metadata: string; -} -export interface ProposalAminoMsg { - type: "cosmos-sdk/v1/Proposal"; - value: ProposalAmino; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface ProposalSDKType { - id: bigint; - messages: AnySDKType[]; - status: ProposalStatus; - final_tally_result: TallyResultSDKType | undefined; - submit_time: Date | undefined; - deposit_end_time: Date | undefined; - total_deposit: CoinSDKType[]; - voting_start_time: Date | undefined; - voting_end_time: Date | undefined; - metadata: string; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResult { - yesCount: string; - abstainCount: string; - noCount: string; - noWithVetoCount: string; -} -export interface TallyResultProtoMsg { - typeUrl: "/cosmos.gov.v1.TallyResult"; - value: Uint8Array; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResultAmino { - yes_count: string; - abstain_count: string; - no_count: string; - no_with_veto_count: string; -} -export interface TallyResultAminoMsg { - type: "cosmos-sdk/v1/TallyResult"; - value: TallyResultAmino; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResultSDKType { - yes_count: string; - abstain_count: string; - no_count: string; - no_with_veto_count: string; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface Vote { - proposalId: bigint; - voter: string; - options: WeightedVoteOption[]; - /** metadata is any arbitrary metadata to attached to the vote. */ - metadata: string; -} -export interface VoteProtoMsg { - typeUrl: "/cosmos.gov.v1.Vote"; - value: Uint8Array; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface VoteAmino { - proposal_id: string; - voter: string; - options: WeightedVoteOptionAmino[]; - /** metadata is any arbitrary metadata to attached to the vote. */ - metadata: string; -} -export interface VoteAminoMsg { - type: "cosmos-sdk/v1/Vote"; - value: VoteAmino; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface VoteSDKType { - proposal_id: bigint; - voter: string; - options: WeightedVoteOptionSDKType[]; - metadata: string; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit: Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod: Duration | undefined; -} -export interface DepositParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.DepositParams"; - value: Uint8Array; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParamsAmino { - /** Minimum deposit for a proposal to enter voting period. */ - min_deposit: CoinAmino[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - max_deposit_period?: DurationAmino | undefined; -} -export interface DepositParamsAminoMsg { - type: "cosmos-sdk/v1/DepositParams"; - value: DepositParamsAmino; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParamsSDKType { - min_deposit: CoinSDKType[]; - max_deposit_period: DurationSDKType | undefined; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParams { - /** Length of the voting period. */ - votingPeriod: Duration | undefined; -} -export interface VotingParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.VotingParams"; - value: Uint8Array; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParamsAmino { - /** Length of the voting period. */ - voting_period?: DurationAmino | undefined; -} -export interface VotingParamsAminoMsg { - type: "cosmos-sdk/v1/VotingParams"; - value: VotingParamsAmino; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParamsSDKType { - voting_period: DurationSDKType | undefined; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: string; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: string; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - vetoThreshold: string; -} -export interface TallyParamsProtoMsg { - typeUrl: "/cosmos.gov.v1.TallyParams"; - value: Uint8Array; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParamsAmino { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: string; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: string; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - veto_threshold: string; -} -export interface TallyParamsAminoMsg { - type: "cosmos-sdk/v1/TallyParams"; - value: TallyParamsAmino; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParamsSDKType { - quorum: string; - threshold: string; - veto_threshold: string; -} -function createBaseWeightedVoteOption(): WeightedVoteOption { - return { - option: 0, - weight: "" - }; -} -export const WeightedVoteOption = { - typeUrl: "/cosmos.gov.v1.WeightedVoteOption", - aminoType: "cosmos-sdk/v1/WeightedVoteOption", - encode(message: WeightedVoteOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.option !== 0) { - writer.uint32(8).int32(message.option); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): WeightedVoteOption { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWeightedVoteOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = (reader.int32() as any); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): WeightedVoteOption { - return { - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - weight: isSet(object.weight) ? String(object.weight) : "" - }; - }, - toJSON(message: WeightedVoteOption): unknown { - const obj: any = {}; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - fromPartial(object: DeepPartial): WeightedVoteOption { - const message = createBaseWeightedVoteOption(); - message.option = object.option ?? 0; - message.weight = object.weight ?? ""; - return message; - }, - fromSDK(object: WeightedVoteOptionSDKType): WeightedVoteOption { - return { - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - weight: object?.weight - }; - }, - toSDK(message: WeightedVoteOption): WeightedVoteOptionSDKType { - const obj: any = {}; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - obj.weight = message.weight; - return obj; - }, - fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption { - return { - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - weight: object.weight - }; - }, - toAmino(message: WeightedVoteOption): WeightedVoteOptionAmino { - const obj: any = {}; - obj.option = message.option; - obj.weight = message.weight; - return obj; - }, - fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption { - return WeightedVoteOption.fromAmino(object.value); - }, - toAminoMsg(message: WeightedVoteOption): WeightedVoteOptionAminoMsg { - return { - type: "cosmos-sdk/v1/WeightedVoteOption", - value: WeightedVoteOption.toAmino(message) - }; - }, - fromProtoMsg(message: WeightedVoteOptionProtoMsg): WeightedVoteOption { - return WeightedVoteOption.decode(message.value); - }, - toProto(message: WeightedVoteOption): Uint8Array { - return WeightedVoteOption.encode(message).finish(); - }, - toProtoMsg(message: WeightedVoteOption): WeightedVoteOptionProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.WeightedVoteOption", - value: WeightedVoteOption.encode(message).finish() - }; - } -}; -function createBaseDeposit(): Deposit { - return { - proposalId: BigInt(0), - depositor: "", - amount: [] - }; -} -export const Deposit = { - typeUrl: "/cosmos.gov.v1.Deposit", - aminoType: "cosmos-sdk/v1/Deposit", - encode(message: Deposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Deposit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeposit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Deposit { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - depositor: isSet(object.depositor) ? String(object.depositor) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Deposit): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Deposit { - const message = createBaseDeposit(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: DepositSDKType): Deposit { - return { - proposalId: object?.proposal_id, - depositor: object?.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Deposit): DepositSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: DepositAmino): Deposit { - return { - proposalId: BigInt(object.proposal_id), - depositor: object.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Deposit): DepositAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: DepositAminoMsg): Deposit { - return Deposit.fromAmino(object.value); - }, - toAminoMsg(message: Deposit): DepositAminoMsg { - return { - type: "cosmos-sdk/v1/Deposit", - value: Deposit.toAmino(message) - }; - }, - fromProtoMsg(message: DepositProtoMsg): Deposit { - return Deposit.decode(message.value); - }, - toProto(message: Deposit): Uint8Array { - return Deposit.encode(message).finish(); - }, - toProtoMsg(message: Deposit): DepositProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.Deposit", - value: Deposit.encode(message).finish() - }; - } -}; -function createBaseProposal(): Proposal { - return { - id: BigInt(0), - messages: [], - status: 0, - finalTallyResult: TallyResult.fromPartial({}), - submitTime: new Date(), - depositEndTime: new Date(), - totalDeposit: [], - votingStartTime: new Date(), - votingEndTime: new Date(), - metadata: "" - }; -} -export const Proposal = { - typeUrl: "/cosmos.gov.v1.Proposal", - aminoType: "cosmos-sdk/v1/Proposal", - encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== BigInt(0)) { - writer.uint32(8).uint64(message.id); - } - for (const v of message.messages) { - Any.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status); - } - if (message.finalTallyResult !== undefined) { - TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim(); - } - if (message.submitTime !== undefined) { - Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim(); - } - if (message.depositEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim(); - } - for (const v of message.totalDeposit) { - Coin.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.votingStartTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim(); - } - if (message.votingEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim(); - } - if (message.metadata !== "") { - writer.uint32(82).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 3: - message.status = (reader.int32() as any); - break; - case 4: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 10: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Proposal { - return { - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0), - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - finalTallyResult: isSet(object.finalTallyResult) ? TallyResult.fromJSON(object.finalTallyResult) : undefined, - submitTime: isSet(object.submitTime) ? new Date(object.submitTime) : undefined, - depositEndTime: isSet(object.depositEndTime) ? new Date(object.depositEndTime) : undefined, - totalDeposit: Array.isArray(object?.totalDeposit) ? object.totalDeposit.map((e: any) => Coin.fromJSON(e)) : [], - votingStartTime: isSet(object.votingStartTime) ? new Date(object.votingStartTime) : undefined, - votingEndTime: isSet(object.votingEndTime) ? new Date(object.votingEndTime) : undefined, - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.messages = []; - } - message.status !== undefined && (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && (obj.finalTallyResult = message.finalTallyResult ? TallyResult.toJSON(message.finalTallyResult) : undefined); - message.submitTime !== undefined && (obj.submitTime = message.submitTime.toISOString()); - message.depositEndTime !== undefined && (obj.depositEndTime = message.depositEndTime.toISOString()); - if (message.totalDeposit) { - obj.totalDeposit = message.totalDeposit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.totalDeposit = []; - } - message.votingStartTime !== undefined && (obj.votingStartTime = message.votingStartTime.toISOString()); - message.votingEndTime !== undefined && (obj.votingEndTime = message.votingEndTime.toISOString()); - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): Proposal { - const message = createBaseProposal(); - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - message.status = object.status ?? 0; - message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined; - message.submitTime = object.submitTime ?? undefined; - message.depositEndTime = object.depositEndTime ?? undefined; - message.totalDeposit = object.totalDeposit?.map(e => Coin.fromPartial(e)) || []; - message.votingStartTime = object.votingStartTime ?? undefined; - message.votingEndTime = object.votingEndTime ?? undefined; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: ProposalSDKType): Proposal { - return { - id: object?.id, - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromSDK(e)) : [], - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - finalTallyResult: object.final_tally_result ? TallyResult.fromSDK(object.final_tally_result) : undefined, - submitTime: object.submit_time ?? undefined, - depositEndTime: object.deposit_end_time ?? undefined, - totalDeposit: Array.isArray(object?.total_deposit) ? object.total_deposit.map((e: any) => Coin.fromSDK(e)) : [], - votingStartTime: object.voting_start_time ?? undefined, - votingEndTime: object.voting_end_time ?? undefined, - metadata: object?.metadata - }; - }, - toSDK(message: Proposal): ProposalSDKType { - const obj: any = {}; - obj.id = message.id; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.messages = []; - } - message.status !== undefined && (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && (obj.final_tally_result = message.finalTallyResult ? TallyResult.toSDK(message.finalTallyResult) : undefined); - message.submitTime !== undefined && (obj.submit_time = message.submitTime ?? undefined); - message.depositEndTime !== undefined && (obj.deposit_end_time = message.depositEndTime ?? undefined); - if (message.totalDeposit) { - obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total_deposit = []; - } - message.votingStartTime !== undefined && (obj.voting_start_time = message.votingStartTime ?? undefined); - message.votingEndTime !== undefined && (obj.voting_end_time = message.votingEndTime ?? undefined); - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: ProposalAmino): Proposal { - return { - id: BigInt(object.id), - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromAmino(e)) : [], - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - finalTallyResult: object?.final_tally_result ? TallyResult.fromAmino(object.final_tally_result) : undefined, - submitTime: object.submit_time, - depositEndTime: object.deposit_end_time, - totalDeposit: Array.isArray(object?.total_deposit) ? object.total_deposit.map((e: any) => Coin.fromAmino(e)) : [], - votingStartTime: object.voting_start_time, - votingEndTime: object.voting_end_time, - metadata: object.metadata - }; - }, - toAmino(message: Proposal): ProposalAmino { - const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.messages = []; - } - obj.status = message.status; - obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : undefined; - obj.submit_time = message.submitTime; - obj.deposit_end_time = message.depositEndTime; - if (message.totalDeposit) { - obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total_deposit = []; - } - obj.voting_start_time = message.votingStartTime; - obj.voting_end_time = message.votingEndTime; - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: ProposalAminoMsg): Proposal { - return Proposal.fromAmino(object.value); - }, - toAminoMsg(message: Proposal): ProposalAminoMsg { - return { - type: "cosmos-sdk/v1/Proposal", - value: Proposal.toAmino(message) - }; - }, - fromProtoMsg(message: ProposalProtoMsg): Proposal { - return Proposal.decode(message.value); - }, - toProto(message: Proposal): Uint8Array { - return Proposal.encode(message).finish(); - }, - toProtoMsg(message: Proposal): ProposalProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.Proposal", - value: Proposal.encode(message).finish() - }; - } -}; -function createBaseTallyResult(): TallyResult { - return { - yesCount: "", - abstainCount: "", - noCount: "", - noWithVetoCount: "" - }; -} -export const TallyResult = { - typeUrl: "/cosmos.gov.v1.TallyResult", - aminoType: "cosmos-sdk/v1/TallyResult", - encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.yesCount !== "") { - writer.uint32(10).string(message.yesCount); - } - if (message.abstainCount !== "") { - writer.uint32(18).string(message.abstainCount); - } - if (message.noCount !== "") { - writer.uint32(26).string(message.noCount); - } - if (message.noWithVetoCount !== "") { - writer.uint32(34).string(message.noWithVetoCount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TallyResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTallyResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yesCount = reader.string(); - break; - case 2: - message.abstainCount = reader.string(); - break; - case 3: - message.noCount = reader.string(); - break; - case 4: - message.noWithVetoCount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TallyResult { - return { - yesCount: isSet(object.yesCount) ? String(object.yesCount) : "", - abstainCount: isSet(object.abstainCount) ? String(object.abstainCount) : "", - noCount: isSet(object.noCount) ? String(object.noCount) : "", - noWithVetoCount: isSet(object.noWithVetoCount) ? String(object.noWithVetoCount) : "" - }; - }, - toJSON(message: TallyResult): unknown { - const obj: any = {}; - message.yesCount !== undefined && (obj.yesCount = message.yesCount); - message.abstainCount !== undefined && (obj.abstainCount = message.abstainCount); - message.noCount !== undefined && (obj.noCount = message.noCount); - message.noWithVetoCount !== undefined && (obj.noWithVetoCount = message.noWithVetoCount); - return obj; - }, - fromPartial(object: DeepPartial): TallyResult { - const message = createBaseTallyResult(); - message.yesCount = object.yesCount ?? ""; - message.abstainCount = object.abstainCount ?? ""; - message.noCount = object.noCount ?? ""; - message.noWithVetoCount = object.noWithVetoCount ?? ""; - return message; - }, - fromSDK(object: TallyResultSDKType): TallyResult { - return { - yesCount: object?.yes_count, - abstainCount: object?.abstain_count, - noCount: object?.no_count, - noWithVetoCount: object?.no_with_veto_count - }; - }, - toSDK(message: TallyResult): TallyResultSDKType { - const obj: any = {}; - obj.yes_count = message.yesCount; - obj.abstain_count = message.abstainCount; - obj.no_count = message.noCount; - obj.no_with_veto_count = message.noWithVetoCount; - return obj; - }, - fromAmino(object: TallyResultAmino): TallyResult { - return { - yesCount: object.yes_count, - abstainCount: object.abstain_count, - noCount: object.no_count, - noWithVetoCount: object.no_with_veto_count - }; - }, - toAmino(message: TallyResult): TallyResultAmino { - const obj: any = {}; - obj.yes_count = message.yesCount; - obj.abstain_count = message.abstainCount; - obj.no_count = message.noCount; - obj.no_with_veto_count = message.noWithVetoCount; - return obj; - }, - fromAminoMsg(object: TallyResultAminoMsg): TallyResult { - return TallyResult.fromAmino(object.value); - }, - toAminoMsg(message: TallyResult): TallyResultAminoMsg { - return { - type: "cosmos-sdk/v1/TallyResult", - value: TallyResult.toAmino(message) - }; - }, - fromProtoMsg(message: TallyResultProtoMsg): TallyResult { - return TallyResult.decode(message.value); - }, - toProto(message: TallyResult): Uint8Array { - return TallyResult.encode(message).finish(); - }, - toProtoMsg(message: TallyResult): TallyResultProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.TallyResult", - value: TallyResult.encode(message).finish() - }; - } -}; -function createBaseVote(): Vote { - return { - proposalId: BigInt(0), - voter: "", - options: [], - metadata: "" - }; -} -export const Vote = { - typeUrl: "/cosmos.gov.v1.Vote", - aminoType: "cosmos-sdk/v1/Vote", - encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - for (const v of message.options) { - WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.metadata !== "") { - writer.uint32(42).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Vote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 4: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - case 5: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Vote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) : [], - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: Vote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toJSON(e) : undefined); - } else { - obj.options = []; - } - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): Vote { - const message = createBaseVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: VoteSDKType): Vote { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromSDK(e)) : [], - metadata: object?.metadata - }; - }, - toSDK(message: Vote): VoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toSDK(e) : undefined); - } else { - obj.options = []; - } - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: VoteAmino): Vote { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromAmino(e)) : [], - metadata: object.metadata - }; - }, - toAmino(message: Vote): VoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); - } else { - obj.options = []; - } - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: VoteAminoMsg): Vote { - return Vote.fromAmino(object.value); - }, - toAminoMsg(message: Vote): VoteAminoMsg { - return { - type: "cosmos-sdk/v1/Vote", - value: Vote.toAmino(message) - }; - }, - fromProtoMsg(message: VoteProtoMsg): Vote { - return Vote.decode(message.value); - }, - toProto(message: Vote): Uint8Array { - return Vote.encode(message).finish(); - }, - toProtoMsg(message: Vote): VoteProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.Vote", - value: Vote.encode(message).finish() - }; - } -}; -function createBaseDepositParams(): DepositParams { - return { - minDeposit: [], - maxDepositPeriod: Duration.fromPartial({}) - }; -} -export const DepositParams = { - typeUrl: "/cosmos.gov.v1.DepositParams", - aminoType: "cosmos-sdk/v1/DepositParams", - encode(message: DepositParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.minDeposit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.maxDepositPeriod !== undefined) { - Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DepositParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDepositParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DepositParams { - return { - minDeposit: Array.isArray(object?.minDeposit) ? object.minDeposit.map((e: any) => Coin.fromJSON(e)) : [], - maxDepositPeriod: isSet(object.maxDepositPeriod) ? Duration.fromJSON(object.maxDepositPeriod) : undefined - }; - }, - toJSON(message: DepositParams): unknown { - const obj: any = {}; - if (message.minDeposit) { - obj.minDeposit = message.minDeposit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.minDeposit = []; - } - message.maxDepositPeriod !== undefined && (obj.maxDepositPeriod = message.maxDepositPeriod ? Duration.toJSON(message.maxDepositPeriod) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DepositParams { - const message = createBaseDepositParams(); - message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || []; - message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined; - return message; - }, - fromSDK(object: DepositParamsSDKType): DepositParams { - return { - minDeposit: Array.isArray(object?.min_deposit) ? object.min_deposit.map((e: any) => Coin.fromSDK(e)) : [], - maxDepositPeriod: object.max_deposit_period ? Duration.fromSDK(object.max_deposit_period) : undefined - }; - }, - toSDK(message: DepositParams): DepositParamsSDKType { - const obj: any = {}; - if (message.minDeposit) { - obj.min_deposit = message.minDeposit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.min_deposit = []; - } - message.maxDepositPeriod !== undefined && (obj.max_deposit_period = message.maxDepositPeriod ? Duration.toSDK(message.maxDepositPeriod) : undefined); - return obj; - }, - fromAmino(object: DepositParamsAmino): DepositParams { - return { - minDeposit: Array.isArray(object?.min_deposit) ? object.min_deposit.map((e: any) => Coin.fromAmino(e)) : [], - maxDepositPeriod: object?.max_deposit_period ? Duration.fromAmino(object.max_deposit_period) : undefined - }; - }, - toAmino(message: DepositParams): DepositParamsAmino { - const obj: any = {}; - if (message.minDeposit) { - obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.min_deposit = []; - } - obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined; - return obj; - }, - fromAminoMsg(object: DepositParamsAminoMsg): DepositParams { - return DepositParams.fromAmino(object.value); - }, - toAminoMsg(message: DepositParams): DepositParamsAminoMsg { - return { - type: "cosmos-sdk/v1/DepositParams", - value: DepositParams.toAmino(message) - }; - }, - fromProtoMsg(message: DepositParamsProtoMsg): DepositParams { - return DepositParams.decode(message.value); - }, - toProto(message: DepositParams): Uint8Array { - return DepositParams.encode(message).finish(); - }, - toProtoMsg(message: DepositParams): DepositParamsProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.DepositParams", - value: DepositParams.encode(message).finish() - }; - } -}; -function createBaseVotingParams(): VotingParams { - return { - votingPeriod: Duration.fromPartial({}) - }; -} -export const VotingParams = { - typeUrl: "/cosmos.gov.v1.VotingParams", - aminoType: "cosmos-sdk/v1/VotingParams", - encode(message: VotingParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.votingPeriod !== undefined) { - Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VotingParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVotingParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): VotingParams { - return { - votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined - }; - }, - toJSON(message: VotingParams): unknown { - const obj: any = {}; - message.votingPeriod !== undefined && (obj.votingPeriod = message.votingPeriod ? Duration.toJSON(message.votingPeriod) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): VotingParams { - const message = createBaseVotingParams(); - message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined; - return message; - }, - fromSDK(object: VotingParamsSDKType): VotingParams { - return { - votingPeriod: object.voting_period ? Duration.fromSDK(object.voting_period) : undefined - }; - }, - toSDK(message: VotingParams): VotingParamsSDKType { - const obj: any = {}; - message.votingPeriod !== undefined && (obj.voting_period = message.votingPeriod ? Duration.toSDK(message.votingPeriod) : undefined); - return obj; - }, - fromAmino(object: VotingParamsAmino): VotingParams { - return { - votingPeriod: object?.voting_period ? Duration.fromAmino(object.voting_period) : undefined - }; - }, - toAmino(message: VotingParams): VotingParamsAmino { - const obj: any = {}; - obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined; - return obj; - }, - fromAminoMsg(object: VotingParamsAminoMsg): VotingParams { - return VotingParams.fromAmino(object.value); - }, - toAminoMsg(message: VotingParams): VotingParamsAminoMsg { - return { - type: "cosmos-sdk/v1/VotingParams", - value: VotingParams.toAmino(message) - }; - }, - fromProtoMsg(message: VotingParamsProtoMsg): VotingParams { - return VotingParams.decode(message.value); - }, - toProto(message: VotingParams): Uint8Array { - return VotingParams.encode(message).finish(); - }, - toProtoMsg(message: VotingParams): VotingParamsProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.VotingParams", - value: VotingParams.encode(message).finish() - }; - } -}; -function createBaseTallyParams(): TallyParams { - return { - quorum: "", - threshold: "", - vetoThreshold: "" - }; -} -export const TallyParams = { - typeUrl: "/cosmos.gov.v1.TallyParams", - aminoType: "cosmos-sdk/v1/TallyParams", - encode(message: TallyParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.quorum !== "") { - writer.uint32(10).string(message.quorum); - } - if (message.threshold !== "") { - writer.uint32(18).string(message.threshold); - } - if (message.vetoThreshold !== "") { - writer.uint32(26).string(message.vetoThreshold); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TallyParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTallyParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.string(); - break; - case 2: - message.threshold = reader.string(); - break; - case 3: - message.vetoThreshold = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TallyParams { - return { - quorum: isSet(object.quorum) ? String(object.quorum) : "", - threshold: isSet(object.threshold) ? String(object.threshold) : "", - vetoThreshold: isSet(object.vetoThreshold) ? String(object.vetoThreshold) : "" - }; - }, - toJSON(message: TallyParams): unknown { - const obj: any = {}; - message.quorum !== undefined && (obj.quorum = message.quorum); - message.threshold !== undefined && (obj.threshold = message.threshold); - message.vetoThreshold !== undefined && (obj.vetoThreshold = message.vetoThreshold); - return obj; - }, - fromPartial(object: DeepPartial): TallyParams { - const message = createBaseTallyParams(); - message.quorum = object.quorum ?? ""; - message.threshold = object.threshold ?? ""; - message.vetoThreshold = object.vetoThreshold ?? ""; - return message; - }, - fromSDK(object: TallyParamsSDKType): TallyParams { - return { - quorum: object?.quorum, - threshold: object?.threshold, - vetoThreshold: object?.veto_threshold - }; - }, - toSDK(message: TallyParams): TallyParamsSDKType { - const obj: any = {}; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; - return obj; - }, - fromAmino(object: TallyParamsAmino): TallyParams { - return { - quorum: object.quorum, - threshold: object.threshold, - vetoThreshold: object.veto_threshold - }; - }, - toAmino(message: TallyParams): TallyParamsAmino { - const obj: any = {}; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; - return obj; - }, - fromAminoMsg(object: TallyParamsAminoMsg): TallyParams { - return TallyParams.fromAmino(object.value); - }, - toAminoMsg(message: TallyParams): TallyParamsAminoMsg { - return { - type: "cosmos-sdk/v1/TallyParams", - value: TallyParams.toAmino(message) - }; - }, - fromProtoMsg(message: TallyParamsProtoMsg): TallyParams { - return TallyParams.decode(message.value); - }, - toProto(message: TallyParams): Uint8Array { - return TallyParams.encode(message).finish(); - }, - toProtoMsg(message: TallyParams): TallyParamsProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.TallyParams", - value: TallyParams.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/query.rpc.Query.ts deleted file mode 100644 index 29bccadb..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/query.rpc.Query.ts +++ /dev/null @@ -1,290 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryProposalRequest, QueryProposalResponse, QueryProposalsRequest, QueryProposalsResponse, QueryVoteRequest, QueryVoteResponse, QueryVotesRequest, QueryVotesResponse, QueryParamsRequest, QueryParamsResponse, QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, QueryDepositsResponse, QueryTallyResultRequest, QueryTallyResultResponse } from "./query"; -/** Query defines the gRPC querier service for gov module */ -export interface Query { - /** Proposal queries proposal details based on ProposalID. */ - proposal(request: QueryProposalRequest): Promise; - /** Proposals queries all proposals based on given status. */ - proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ - vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ - votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ - params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ - deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ - deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ - tallyResult(request: QueryTallyResultRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.proposal = this.proposal.bind(this); - this.proposals = this.proposals.bind(this); - this.vote = this.vote.bind(this); - this.votes = this.votes.bind(this); - this.params = this.params.bind(this); - this.deposit = this.deposit.bind(this); - this.deposits = this.deposits.bind(this); - this.tallyResult = this.tallyResult.bind(this); - } - proposal(request: QueryProposalRequest): Promise { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Proposal", data); - return promise.then(data => QueryProposalResponse.decode(new BinaryReader(data))); - } - proposals(request: QueryProposalsRequest): Promise { - const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Proposals", data); - return promise.then(data => QueryProposalsResponse.decode(new BinaryReader(data))); - } - vote(request: QueryVoteRequest): Promise { - const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Vote", data); - return promise.then(data => QueryVoteResponse.decode(new BinaryReader(data))); - } - votes(request: QueryVotesRequest): Promise { - const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Votes", data); - return promise.then(data => QueryVotesResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - deposit(request: QueryDepositRequest): Promise { - const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Deposit", data); - return promise.then(data => QueryDepositResponse.decode(new BinaryReader(data))); - } - deposits(request: QueryDepositsRequest): Promise { - const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "Deposits", data); - return promise.then(data => QueryDepositsResponse.decode(new BinaryReader(data))); - } - tallyResult(request: QueryTallyResultRequest): Promise { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Query", "TallyResult", data); - return promise.then(data => QueryTallyResultResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - proposal(request: QueryProposalRequest): Promise { - return queryService.proposal(request); - }, - proposals(request: QueryProposalsRequest): Promise { - return queryService.proposals(request); - }, - vote(request: QueryVoteRequest): Promise { - return queryService.vote(request); - }, - votes(request: QueryVotesRequest): Promise { - return queryService.votes(request); - }, - params(request: QueryParamsRequest): Promise { - return queryService.params(request); - }, - deposit(request: QueryDepositRequest): Promise { - return queryService.deposit(request); - }, - deposits(request: QueryDepositsRequest): Promise { - return queryService.deposits(request); - }, - tallyResult(request: QueryTallyResultRequest): Promise { - return queryService.tallyResult(request); - } - }; -}; -export interface UseProposalQuery extends ReactQueryParams { - request: QueryProposalRequest; -} -export interface UseProposalsQuery extends ReactQueryParams { - request: QueryProposalsRequest; -} -export interface UseVoteQuery extends ReactQueryParams { - request: QueryVoteRequest; -} -export interface UseVotesQuery extends ReactQueryParams { - request: QueryVotesRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request: QueryParamsRequest; -} -export interface UseDepositQuery extends ReactQueryParams { - request: QueryDepositRequest; -} -export interface UseDepositsQuery extends ReactQueryParams { - request: QueryDepositsRequest; -} -export interface UseTallyResultQuery extends ReactQueryParams { - request: QueryTallyResultRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useProposal = ({ - request, - options - }: UseProposalQuery) => { - return useQuery(["proposalQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.proposal(request); - }, options); - }; - const useProposals = ({ - request, - options - }: UseProposalsQuery) => { - return useQuery(["proposalsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.proposals(request); - }, options); - }; - const useVote = ({ - request, - options - }: UseVoteQuery) => { - return useQuery(["voteQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.vote(request); - }, options); - }; - const useVotes = ({ - request, - options - }: UseVotesQuery) => { - return useQuery(["votesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.votes(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useDeposit = ({ - request, - options - }: UseDepositQuery) => { - return useQuery(["depositQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.deposit(request); - }, options); - }; - const useDeposits = ({ - request, - options - }: UseDepositsQuery) => { - return useQuery(["depositsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.deposits(request); - }, options); - }; - const useTallyResult = ({ - request, - options - }: UseTallyResultQuery) => { - return useQuery(["tallyResultQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.tallyResult(request); - }, options); - }; - return { - /** Proposal queries proposal details based on ProposalID. */useProposal, - /** Proposals queries all proposals based on given status. */useProposals, - /** Vote queries voted information based on proposalID, voterAddr. */useVote, - /** Votes queries votes of a given proposal. */useVotes, - /** Params queries all parameters of the gov module. */useParams, - /** Deposit queries single deposit information based proposalID, depositAddr. */useDeposit, - /** Deposits queries all deposits of a single proposal. */useDeposits, - /** TallyResult queries the tally of a proposal vote. */useTallyResult - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryProposalStore { - store = new QueryStore(queryService?.proposal); - proposal(request: QueryProposalRequest) { - return this.store.getData(request); - } - } - class QueryProposalsStore { - store = new QueryStore(queryService?.proposals); - proposals(request: QueryProposalsRequest) { - return this.store.getData(request); - } - } - class QueryVoteStore { - store = new QueryStore(queryService?.vote); - vote(request: QueryVoteRequest) { - return this.store.getData(request); - } - } - class QueryVotesStore { - store = new QueryStore(queryService?.votes); - votes(request: QueryVotesRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryDepositStore { - store = new QueryStore(queryService?.deposit); - deposit(request: QueryDepositRequest) { - return this.store.getData(request); - } - } - class QueryDepositsStore { - store = new QueryStore(queryService?.deposits); - deposits(request: QueryDepositsRequest) { - return this.store.getData(request); - } - } - class QueryTallyResultStore { - store = new QueryStore(queryService?.tallyResult); - tallyResult(request: QueryTallyResultRequest) { - return this.store.getData(request); - } - } - return { - /** Proposal queries proposal details based on ProposalID. */QueryProposalStore, - /** Proposals queries all proposals based on given status. */QueryProposalsStore, - /** Vote queries voted information based on proposalID, voterAddr. */QueryVoteStore, - /** Votes queries votes of a given proposal. */QueryVotesStore, - /** Params queries all parameters of the gov module. */QueryParamsStore, - /** Deposit queries single deposit information based proposalID, depositAddr. */QueryDepositStore, - /** Deposits queries all deposits of a single proposal. */QueryDepositsStore, - /** TallyResult queries the tally of a proposal vote. */QueryTallyResultStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/query.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/query.ts deleted file mode 100644 index e5e1226d..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/query.ts +++ /dev/null @@ -1,2037 +0,0 @@ -import { ProposalStatus, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType, Deposit, DepositAmino, DepositSDKType, TallyResult, TallyResultAmino, TallyResultSDKType, proposalStatusFromJSON, proposalStatusToJSON } from "./gov"; -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; -} -export interface QueryProposalRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryProposalRequest"; - value: Uint8Array; -} -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; -} -export interface QueryProposalRequestAminoMsg { - type: "cosmos-sdk/v1/QueryProposalRequest"; - value: QueryProposalRequestAmino; -} -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequestSDKType { - proposal_id: bigint; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponse { - proposal: Proposal | undefined; -} -export interface QueryProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryProposalResponse"; - value: Uint8Array; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponseAmino { - proposal?: ProposalAmino | undefined; -} -export interface QueryProposalResponseAminoMsg { - type: "cosmos-sdk/v1/QueryProposalResponse"; - value: QueryProposalResponseAmino; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponseSDKType { - proposal: ProposalSDKType | undefined; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequest { - /** proposal_status defines the status of the proposals. */ - proposalStatus: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryProposalsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryProposalsRequest"; - value: Uint8Array; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequestAmino { - /** proposal_status defines the status of the proposals. */ - proposal_status: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryProposalsRequestAminoMsg { - type: "cosmos-sdk/v1/QueryProposalsRequest"; - value: QueryProposalsRequestAmino; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequestSDKType { - proposal_status: ProposalStatus; - voter: string; - depositor: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponse { - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryProposalsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryProposalsResponse"; - value: Uint8Array; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponseAmino { - proposals: ProposalAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryProposalsResponseAminoMsg { - type: "cosmos-sdk/v1/QueryProposalsResponse"; - value: QueryProposalsResponseAmino; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponseSDKType { - proposals: ProposalSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** voter defines the oter address for the proposals. */ - voter: string; -} -export interface QueryVoteRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryVoteRequest"; - value: Uint8Array; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** voter defines the oter address for the proposals. */ - voter: string; -} -export interface QueryVoteRequestAminoMsg { - type: "cosmos-sdk/v1/QueryVoteRequest"; - value: QueryVoteRequestAmino; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequestSDKType { - proposal_id: bigint; - voter: string; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponse { - /** vote defined the queried vote. */ - vote: Vote | undefined; -} -export interface QueryVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryVoteResponse"; - value: Uint8Array; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponseAmino { - /** vote defined the queried vote. */ - vote?: VoteAmino | undefined; -} -export interface QueryVoteResponseAminoMsg { - type: "cosmos-sdk/v1/QueryVoteResponse"; - value: QueryVoteResponseAmino; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponseSDKType { - vote: VoteSDKType | undefined; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryVotesRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryVotesRequest"; - value: Uint8Array; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryVotesRequestAminoMsg { - type: "cosmos-sdk/v1/QueryVotesRequest"; - value: QueryVotesRequestAmino; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequestSDKType { - proposal_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponse { - /** votes defined the queried votes. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryVotesResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryVotesResponse"; - value: Uint8Array; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponseAmino { - /** votes defined the queried votes. */ - votes: VoteAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryVotesResponseAminoMsg { - type: "cosmos-sdk/v1/QueryVotesResponse"; - value: QueryVotesResponseAmino; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponseSDKType { - votes: VoteSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - paramsType: string; -} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - params_type: string; -} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/v1/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType { - params_type: string; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams: VotingParams | undefined; - /** deposit_params defines the parameters related to deposit. */ - depositParams: DepositParams | undefined; - /** tally_params defines the parameters related to tally. */ - tallyParams: TallyParams | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** voting_params defines the parameters related to voting. */ - voting_params?: VotingParamsAmino | undefined; - /** deposit_params defines the parameters related to deposit. */ - deposit_params?: DepositParamsAmino | undefined; - /** tally_params defines the parameters related to tally. */ - tally_params?: TallyParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/v1/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - voting_params: VotingParamsSDKType | undefined; - deposit_params: DepositParamsSDKType | undefined; - tally_params: TallyParamsSDKType | undefined; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} -export interface QueryDepositRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryDepositRequest"; - value: Uint8Array; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} -export interface QueryDepositRequestAminoMsg { - type: "cosmos-sdk/v1/QueryDepositRequest"; - value: QueryDepositRequestAmino; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequestSDKType { - proposal_id: bigint; - depositor: string; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit: Deposit | undefined; -} -export interface QueryDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryDepositResponse"; - value: Uint8Array; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponseAmino { - /** deposit defines the requested deposit. */ - deposit?: DepositAmino | undefined; -} -export interface QueryDepositResponseAminoMsg { - type: "cosmos-sdk/v1/QueryDepositResponse"; - value: QueryDepositResponseAmino; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponseSDKType { - deposit: DepositSDKType | undefined; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDepositsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryDepositsRequest"; - value: Uint8Array; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDepositsRequestAminoMsg { - type: "cosmos-sdk/v1/QueryDepositsRequest"; - value: QueryDepositsRequestAmino; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequestSDKType { - proposal_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponse { - deposits: Deposit[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDepositsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryDepositsResponse"; - value: Uint8Array; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponseAmino { - deposits: DepositAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDepositsResponseAminoMsg { - type: "cosmos-sdk/v1/QueryDepositsResponse"; - value: QueryDepositsResponseAmino; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponseSDKType { - deposits: DepositSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; -} -export interface QueryTallyResultRequestProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryTallyResultRequest"; - value: Uint8Array; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; -} -export interface QueryTallyResultRequestAminoMsg { - type: "cosmos-sdk/v1/QueryTallyResultRequest"; - value: QueryTallyResultRequestAmino; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequestSDKType { - proposal_id: bigint; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} -export interface QueryTallyResultResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.QueryTallyResultResponse"; - value: Uint8Array; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponseAmino { - /** tally defines the requested tally. */ - tally?: TallyResultAmino | undefined; -} -export interface QueryTallyResultResponseAminoMsg { - type: "cosmos-sdk/v1/QueryTallyResultResponse"; - value: QueryTallyResultResponseAmino; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponseSDKType { - tally: TallyResultSDKType | undefined; -} -function createBaseQueryProposalRequest(): QueryProposalRequest { - return { - proposalId: BigInt(0) - }; -} -export const QueryProposalRequest = { - typeUrl: "/cosmos.gov.v1.QueryProposalRequest", - aminoType: "cosmos-sdk/v1/QueryProposalRequest", - encode(message: QueryProposalRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryProposalRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalRequest { - const message = createBaseQueryProposalRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryProposalRequestSDKType): QueryProposalRequest { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: QueryProposalRequest): QueryProposalRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: QueryProposalRequestAmino): QueryProposalRequest { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: QueryProposalRequest): QueryProposalRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalRequestAminoMsg): QueryProposalRequest { - return QueryProposalRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalRequest): QueryProposalRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryProposalRequest", - value: QueryProposalRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalRequestProtoMsg): QueryProposalRequest { - return QueryProposalRequest.decode(message.value); - }, - toProto(message: QueryProposalRequest): Uint8Array { - return QueryProposalRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalRequest): QueryProposalRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryProposalRequest", - value: QueryProposalRequest.encode(message).finish() - }; - } -}; -function createBaseQueryProposalResponse(): QueryProposalResponse { - return { - proposal: Proposal.fromPartial({}) - }; -} -export const QueryProposalResponse = { - typeUrl: "/cosmos.gov.v1.QueryProposalResponse", - aminoType: "cosmos-sdk/v1/QueryProposalResponse", - encode(message: QueryProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalResponse { - return { - proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined - }; - }, - toJSON(message: QueryProposalResponse): unknown { - const obj: any = {}; - message.proposal !== undefined && (obj.proposal = message.proposal ? Proposal.toJSON(message.proposal) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalResponse { - const message = createBaseQueryProposalResponse(); - message.proposal = object.proposal !== undefined && object.proposal !== null ? Proposal.fromPartial(object.proposal) : undefined; - return message; - }, - fromSDK(object: QueryProposalResponseSDKType): QueryProposalResponse { - return { - proposal: object.proposal ? Proposal.fromSDK(object.proposal) : undefined - }; - }, - toSDK(message: QueryProposalResponse): QueryProposalResponseSDKType { - const obj: any = {}; - message.proposal !== undefined && (obj.proposal = message.proposal ? Proposal.toSDK(message.proposal) : undefined); - return obj; - }, - fromAmino(object: QueryProposalResponseAmino): QueryProposalResponse { - return { - proposal: object?.proposal ? Proposal.fromAmino(object.proposal) : undefined - }; - }, - toAmino(message: QueryProposalResponse): QueryProposalResponseAmino { - const obj: any = {}; - obj.proposal = message.proposal ? Proposal.toAmino(message.proposal) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalResponseAminoMsg): QueryProposalResponse { - return QueryProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalResponse): QueryProposalResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryProposalResponse", - value: QueryProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalResponseProtoMsg): QueryProposalResponse { - return QueryProposalResponse.decode(message.value); - }, - toProto(message: QueryProposalResponse): Uint8Array { - return QueryProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalResponse): QueryProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryProposalResponse", - value: QueryProposalResponse.encode(message).finish() - }; - } -}; -function createBaseQueryProposalsRequest(): QueryProposalsRequest { - return { - proposalStatus: 0, - voter: "", - depositor: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryProposalsRequest = { - typeUrl: "/cosmos.gov.v1.QueryProposalsRequest", - aminoType: "cosmos-sdk/v1/QueryProposalsRequest", - encode(message: QueryProposalsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalStatus !== 0) { - writer.uint32(8).int32(message.proposalStatus); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.depositor !== "") { - writer.uint32(26).string(message.depositor); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalStatus = (reader.int32() as any); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalsRequest { - return { - proposalStatus: isSet(object.proposalStatus) ? proposalStatusFromJSON(object.proposalStatus) : -1, - voter: isSet(object.voter) ? String(object.voter) : "", - depositor: isSet(object.depositor) ? String(object.depositor) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryProposalsRequest): unknown { - const obj: any = {}; - message.proposalStatus !== undefined && (obj.proposalStatus = proposalStatusToJSON(message.proposalStatus)); - message.voter !== undefined && (obj.voter = message.voter); - message.depositor !== undefined && (obj.depositor = message.depositor); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalsRequest { - const message = createBaseQueryProposalsRequest(); - message.proposalStatus = object.proposalStatus ?? 0; - message.voter = object.voter ?? ""; - message.depositor = object.depositor ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryProposalsRequestSDKType): QueryProposalsRequest { - return { - proposalStatus: isSet(object.proposal_status) ? proposalStatusFromJSON(object.proposal_status) : -1, - voter: object?.voter, - depositor: object?.depositor, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryProposalsRequest): QueryProposalsRequestSDKType { - const obj: any = {}; - message.proposalStatus !== undefined && (obj.proposal_status = proposalStatusToJSON(message.proposalStatus)); - obj.voter = message.voter; - obj.depositor = message.depositor; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryProposalsRequestAmino): QueryProposalsRequest { - return { - proposalStatus: isSet(object.proposal_status) ? proposalStatusFromJSON(object.proposal_status) : -1, - voter: object.voter, - depositor: object.depositor, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryProposalsRequest): QueryProposalsRequestAmino { - const obj: any = {}; - obj.proposal_status = message.proposalStatus; - obj.voter = message.voter; - obj.depositor = message.depositor; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalsRequestAminoMsg): QueryProposalsRequest { - return QueryProposalsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalsRequest): QueryProposalsRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryProposalsRequest", - value: QueryProposalsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalsRequestProtoMsg): QueryProposalsRequest { - return QueryProposalsRequest.decode(message.value); - }, - toProto(message: QueryProposalsRequest): Uint8Array { - return QueryProposalsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalsRequest): QueryProposalsRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryProposalsRequest", - value: QueryProposalsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryProposalsResponse(): QueryProposalsResponse { - return { - proposals: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryProposalsResponse = { - typeUrl: "/cosmos.gov.v1.QueryProposalsResponse", - aminoType: "cosmos-sdk/v1/QueryProposalsResponse", - encode(message: QueryProposalsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalsResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryProposalsResponse): unknown { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toJSON(e) : undefined); - } else { - obj.proposals = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalsResponse { - const message = createBaseQueryProposalsResponse(); - message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryProposalsResponseSDKType): QueryProposalsResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryProposalsResponse): QueryProposalsResponseSDKType { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toSDK(e) : undefined); - } else { - obj.proposals = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryProposalsResponseAmino): QueryProposalsResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryProposalsResponse): QueryProposalsResponseAmino { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined); - } else { - obj.proposals = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalsResponseAminoMsg): QueryProposalsResponse { - return QueryProposalsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalsResponse): QueryProposalsResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryProposalsResponse", - value: QueryProposalsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalsResponseProtoMsg): QueryProposalsResponse { - return QueryProposalsResponse.decode(message.value); - }, - toProto(message: QueryProposalsResponse): Uint8Array { - return QueryProposalsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalsResponse): QueryProposalsResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryProposalsResponse", - value: QueryProposalsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVoteRequest(): QueryVoteRequest { - return { - proposalId: BigInt(0), - voter: "" - }; -} -export const QueryVoteRequest = { - typeUrl: "/cosmos.gov.v1.QueryVoteRequest", - aminoType: "cosmos-sdk/v1/QueryVoteRequest", - encode(message: QueryVoteRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVoteRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "" - }; - }, - toJSON(message: QueryVoteRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - fromPartial(object: DeepPartial): QueryVoteRequest { - const message = createBaseQueryVoteRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - return message; - }, - fromSDK(object: QueryVoteRequestSDKType): QueryVoteRequest { - return { - proposalId: object?.proposal_id, - voter: object?.voter - }; - }, - toSDK(message: QueryVoteRequest): QueryVoteRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - return obj; - }, - fromAmino(object: QueryVoteRequestAmino): QueryVoteRequest { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter - }; - }, - toAmino(message: QueryVoteRequest): QueryVoteRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - return obj; - }, - fromAminoMsg(object: QueryVoteRequestAminoMsg): QueryVoteRequest { - return QueryVoteRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVoteRequest): QueryVoteRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryVoteRequest", - value: QueryVoteRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVoteRequestProtoMsg): QueryVoteRequest { - return QueryVoteRequest.decode(message.value); - }, - toProto(message: QueryVoteRequest): Uint8Array { - return QueryVoteRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVoteRequest): QueryVoteRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryVoteRequest", - value: QueryVoteRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVoteResponse(): QueryVoteResponse { - return { - vote: Vote.fromPartial({}) - }; -} -export const QueryVoteResponse = { - typeUrl: "/cosmos.gov.v1.QueryVoteResponse", - aminoType: "cosmos-sdk/v1/QueryVoteResponse", - encode(message: QueryVoteResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVoteResponse { - return { - vote: isSet(object.vote) ? Vote.fromJSON(object.vote) : undefined - }; - }, - toJSON(message: QueryVoteResponse): unknown { - const obj: any = {}; - message.vote !== undefined && (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVoteResponse { - const message = createBaseQueryVoteResponse(); - message.vote = object.vote !== undefined && object.vote !== null ? Vote.fromPartial(object.vote) : undefined; - return message; - }, - fromSDK(object: QueryVoteResponseSDKType): QueryVoteResponse { - return { - vote: object.vote ? Vote.fromSDK(object.vote) : undefined - }; - }, - toSDK(message: QueryVoteResponse): QueryVoteResponseSDKType { - const obj: any = {}; - message.vote !== undefined && (obj.vote = message.vote ? Vote.toSDK(message.vote) : undefined); - return obj; - }, - fromAmino(object: QueryVoteResponseAmino): QueryVoteResponse { - return { - vote: object?.vote ? Vote.fromAmino(object.vote) : undefined - }; - }, - toAmino(message: QueryVoteResponse): QueryVoteResponseAmino { - const obj: any = {}; - obj.vote = message.vote ? Vote.toAmino(message.vote) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVoteResponseAminoMsg): QueryVoteResponse { - return QueryVoteResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVoteResponse): QueryVoteResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryVoteResponse", - value: QueryVoteResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVoteResponseProtoMsg): QueryVoteResponse { - return QueryVoteResponse.decode(message.value); - }, - toProto(message: QueryVoteResponse): Uint8Array { - return QueryVoteResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVoteResponse): QueryVoteResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryVoteResponse", - value: QueryVoteResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVotesRequest(): QueryVotesRequest { - return { - proposalId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryVotesRequest = { - typeUrl: "/cosmos.gov.v1.QueryVotesRequest", - aminoType: "cosmos-sdk/v1/QueryVotesRequest", - encode(message: QueryVotesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesRequest { - const message = createBaseQueryVotesRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesRequestSDKType): QueryVotesRequest { - return { - proposalId: object?.proposal_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesRequest): QueryVotesRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesRequestAmino): QueryVotesRequest { - return { - proposalId: BigInt(object.proposal_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesRequest): QueryVotesRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesRequestAminoMsg): QueryVotesRequest { - return QueryVotesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesRequest): QueryVotesRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryVotesRequest", - value: QueryVotesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesRequestProtoMsg): QueryVotesRequest { - return QueryVotesRequest.decode(message.value); - }, - toProto(message: QueryVotesRequest): Uint8Array { - return QueryVotesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesRequest): QueryVotesRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryVotesRequest", - value: QueryVotesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVotesResponse(): QueryVotesResponse { - return { - votes: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryVotesResponse = { - typeUrl: "/cosmos.gov.v1.QueryVotesResponse", - aminoType: "cosmos-sdk/v1/QueryVotesResponse", - encode(message: QueryVotesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesResponse): unknown { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesResponse { - const message = createBaseQueryVotesResponse(); - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesResponseSDKType): QueryVotesResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesResponse): QueryVotesResponseSDKType { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesResponseAmino): QueryVotesResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesResponse): QueryVotesResponseAmino { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesResponseAminoMsg): QueryVotesResponse { - return QueryVotesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesResponse): QueryVotesResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryVotesResponse", - value: QueryVotesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesResponseProtoMsg): QueryVotesResponse { - return QueryVotesResponse.decode(message.value); - }, - toProto(message: QueryVotesResponse): Uint8Array { - return QueryVotesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesResponse): QueryVotesResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryVotesResponse", - value: QueryVotesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return { - paramsType: "" - }; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.gov.v1.QueryParamsRequest", - aminoType: "cosmos-sdk/v1/QueryParamsRequest", - encode(message: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.paramsType !== "") { - writer.uint32(10).string(message.paramsType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paramsType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsRequest { - return { - paramsType: isSet(object.paramsType) ? String(object.paramsType) : "" - }; - }, - toJSON(message: QueryParamsRequest): unknown { - const obj: any = {}; - message.paramsType !== undefined && (obj.paramsType = message.paramsType); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - message.paramsType = object.paramsType ?? ""; - return message; - }, - fromSDK(object: QueryParamsRequestSDKType): QueryParamsRequest { - return { - paramsType: object?.params_type - }; - }, - toSDK(message: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - obj.params_type = message.paramsType; - return obj; - }, - fromAmino(object: QueryParamsRequestAmino): QueryParamsRequest { - return { - paramsType: object.params_type - }; - }, - toAmino(message: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - obj.params_type = message.paramsType; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - votingParams: VotingParams.fromPartial({}), - depositParams: DepositParams.fromPartial({}), - tallyParams: TallyParams.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.gov.v1.QueryParamsResponse", - aminoType: "cosmos-sdk/v1/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(10).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(18).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 3: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - votingParams: isSet(object.votingParams) ? VotingParams.fromJSON(object.votingParams) : undefined, - depositParams: isSet(object.depositParams) ? DepositParams.fromJSON(object.depositParams) : undefined, - tallyParams: isSet(object.tallyParams) ? TallyParams.fromJSON(object.tallyParams) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.votingParams !== undefined && (obj.votingParams = message.votingParams ? VotingParams.toJSON(message.votingParams) : undefined); - message.depositParams !== undefined && (obj.depositParams = message.depositParams ? DepositParams.toJSON(message.depositParams) : undefined); - message.tallyParams !== undefined && (obj.tallyParams = message.tallyParams ? TallyParams.toJSON(message.tallyParams) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.votingParams = object.votingParams !== undefined && object.votingParams !== null ? VotingParams.fromPartial(object.votingParams) : undefined; - message.depositParams = object.depositParams !== undefined && object.depositParams !== null ? DepositParams.fromPartial(object.depositParams) : undefined; - message.tallyParams = object.tallyParams !== undefined && object.tallyParams !== null ? TallyParams.fromPartial(object.tallyParams) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - votingParams: object.voting_params ? VotingParams.fromSDK(object.voting_params) : undefined, - depositParams: object.deposit_params ? DepositParams.fromSDK(object.deposit_params) : undefined, - tallyParams: object.tally_params ? TallyParams.fromSDK(object.tally_params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.votingParams !== undefined && (obj.voting_params = message.votingParams ? VotingParams.toSDK(message.votingParams) : undefined); - message.depositParams !== undefined && (obj.deposit_params = message.depositParams ? DepositParams.toSDK(message.depositParams) : undefined); - message.tallyParams !== undefined && (obj.tally_params = message.tallyParams ? TallyParams.toSDK(message.tallyParams) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - votingParams: object?.voting_params ? VotingParams.fromAmino(object.voting_params) : undefined, - depositParams: object?.deposit_params ? DepositParams.fromAmino(object.deposit_params) : undefined, - tallyParams: object?.tally_params ? TallyParams.fromAmino(object.tally_params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams) : undefined; - obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams) : undefined; - obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDepositRequest(): QueryDepositRequest { - return { - proposalId: BigInt(0), - depositor: "" - }; -} -export const QueryDepositRequest = { - typeUrl: "/cosmos.gov.v1.QueryDepositRequest", - aminoType: "cosmos-sdk/v1/QueryDepositRequest", - encode(message: QueryDepositRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - depositor: isSet(object.depositor) ? String(object.depositor) : "" - }; - }, - toJSON(message: QueryDepositRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositRequest { - const message = createBaseQueryDepositRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; - return message; - }, - fromSDK(object: QueryDepositRequestSDKType): QueryDepositRequest { - return { - proposalId: object?.proposal_id, - depositor: object?.depositor - }; - }, - toSDK(message: QueryDepositRequest): QueryDepositRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.depositor = message.depositor; - return obj; - }, - fromAmino(object: QueryDepositRequestAmino): QueryDepositRequest { - return { - proposalId: BigInt(object.proposal_id), - depositor: object.depositor - }; - }, - toAmino(message: QueryDepositRequest): QueryDepositRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; - return obj; - }, - fromAminoMsg(object: QueryDepositRequestAminoMsg): QueryDepositRequest { - return QueryDepositRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositRequest): QueryDepositRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryDepositRequest", - value: QueryDepositRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositRequestProtoMsg): QueryDepositRequest { - return QueryDepositRequest.decode(message.value); - }, - toProto(message: QueryDepositRequest): Uint8Array { - return QueryDepositRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositRequest): QueryDepositRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryDepositRequest", - value: QueryDepositRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDepositResponse(): QueryDepositResponse { - return { - deposit: Deposit.fromPartial({}) - }; -} -export const QueryDepositResponse = { - typeUrl: "/cosmos.gov.v1.QueryDepositResponse", - aminoType: "cosmos-sdk/v1/QueryDepositResponse", - encode(message: QueryDepositResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.deposit !== undefined) { - Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositResponse { - return { - deposit: isSet(object.deposit) ? Deposit.fromJSON(object.deposit) : undefined - }; - }, - toJSON(message: QueryDepositResponse): unknown { - const obj: any = {}; - message.deposit !== undefined && (obj.deposit = message.deposit ? Deposit.toJSON(message.deposit) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositResponse { - const message = createBaseQueryDepositResponse(); - message.deposit = object.deposit !== undefined && object.deposit !== null ? Deposit.fromPartial(object.deposit) : undefined; - return message; - }, - fromSDK(object: QueryDepositResponseSDKType): QueryDepositResponse { - return { - deposit: object.deposit ? Deposit.fromSDK(object.deposit) : undefined - }; - }, - toSDK(message: QueryDepositResponse): QueryDepositResponseSDKType { - const obj: any = {}; - message.deposit !== undefined && (obj.deposit = message.deposit ? Deposit.toSDK(message.deposit) : undefined); - return obj; - }, - fromAmino(object: QueryDepositResponseAmino): QueryDepositResponse { - return { - deposit: object?.deposit ? Deposit.fromAmino(object.deposit) : undefined - }; - }, - toAmino(message: QueryDepositResponse): QueryDepositResponseAmino { - const obj: any = {}; - obj.deposit = message.deposit ? Deposit.toAmino(message.deposit) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDepositResponseAminoMsg): QueryDepositResponse { - return QueryDepositResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositResponse): QueryDepositResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryDepositResponse", - value: QueryDepositResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositResponseProtoMsg): QueryDepositResponse { - return QueryDepositResponse.decode(message.value); - }, - toProto(message: QueryDepositResponse): Uint8Array { - return QueryDepositResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositResponse): QueryDepositResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryDepositResponse", - value: QueryDepositResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDepositsRequest(): QueryDepositsRequest { - return { - proposalId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDepositsRequest = { - typeUrl: "/cosmos.gov.v1.QueryDepositsRequest", - aminoType: "cosmos-sdk/v1/QueryDepositsRequest", - encode(message: QueryDepositsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositsRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDepositsRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositsRequest { - const message = createBaseQueryDepositsRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDepositsRequestSDKType): QueryDepositsRequest { - return { - proposalId: object?.proposal_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDepositsRequest): QueryDepositsRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDepositsRequestAmino): QueryDepositsRequest { - return { - proposalId: BigInt(object.proposal_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDepositsRequest): QueryDepositsRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDepositsRequestAminoMsg): QueryDepositsRequest { - return QueryDepositsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositsRequest): QueryDepositsRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryDepositsRequest", - value: QueryDepositsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositsRequestProtoMsg): QueryDepositsRequest { - return QueryDepositsRequest.decode(message.value); - }, - toProto(message: QueryDepositsRequest): Uint8Array { - return QueryDepositsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositsRequest): QueryDepositsRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryDepositsRequest", - value: QueryDepositsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDepositsResponse(): QueryDepositsResponse { - return { - deposits: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDepositsResponse = { - typeUrl: "/cosmos.gov.v1.QueryDepositsResponse", - aminoType: "cosmos-sdk/v1/QueryDepositsResponse", - encode(message: QueryDepositsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositsResponse { - return { - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDepositsResponse): unknown { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toJSON(e) : undefined); - } else { - obj.deposits = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositsResponse { - const message = createBaseQueryDepositsResponse(); - message.deposits = object.deposits?.map(e => Deposit.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDepositsResponseSDKType): QueryDepositsResponse { - return { - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDepositsResponse): QueryDepositsResponseSDKType { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toSDK(e) : undefined); - } else { - obj.deposits = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDepositsResponseAmino): QueryDepositsResponse { - return { - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDepositsResponse): QueryDepositsResponseAmino { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e) : undefined); - } else { - obj.deposits = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDepositsResponseAminoMsg): QueryDepositsResponse { - return QueryDepositsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositsResponse): QueryDepositsResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryDepositsResponse", - value: QueryDepositsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositsResponseProtoMsg): QueryDepositsResponse { - return QueryDepositsResponse.decode(message.value); - }, - toProto(message: QueryDepositsResponse): Uint8Array { - return QueryDepositsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositsResponse): QueryDepositsResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryDepositsResponse", - value: QueryDepositsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { - return { - proposalId: BigInt(0) - }; -} -export const QueryTallyResultRequest = { - typeUrl: "/cosmos.gov.v1.QueryTallyResultRequest", - aminoType: "cosmos-sdk/v1/QueryTallyResultRequest", - encode(message: QueryTallyResultRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTallyResultRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryTallyResultRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryTallyResultRequest { - const message = createBaseQueryTallyResultRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryTallyResultRequestSDKType): QueryTallyResultRequest { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: QueryTallyResultRequest): QueryTallyResultRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: QueryTallyResultRequestAmino): QueryTallyResultRequest { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: QueryTallyResultRequest): QueryTallyResultRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryTallyResultRequestAminoMsg): QueryTallyResultRequest { - return QueryTallyResultRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestAminoMsg { - return { - type: "cosmos-sdk/v1/QueryTallyResultRequest", - value: QueryTallyResultRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTallyResultRequestProtoMsg): QueryTallyResultRequest { - return QueryTallyResultRequest.decode(message.value); - }, - toProto(message: QueryTallyResultRequest): Uint8Array { - return QueryTallyResultRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryTallyResultRequest", - value: QueryTallyResultRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { - return { - tally: TallyResult.fromPartial({}) - }; -} -export const QueryTallyResultResponse = { - typeUrl: "/cosmos.gov.v1.QueryTallyResultResponse", - aminoType: "cosmos-sdk/v1/QueryTallyResultResponse", - encode(message: QueryTallyResultResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTallyResultResponse { - return { - tally: isSet(object.tally) ? TallyResult.fromJSON(object.tally) : undefined - }; - }, - toJSON(message: QueryTallyResultResponse): unknown { - const obj: any = {}; - message.tally !== undefined && (obj.tally = message.tally ? TallyResult.toJSON(message.tally) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTallyResultResponse { - const message = createBaseQueryTallyResultResponse(); - message.tally = object.tally !== undefined && object.tally !== null ? TallyResult.fromPartial(object.tally) : undefined; - return message; - }, - fromSDK(object: QueryTallyResultResponseSDKType): QueryTallyResultResponse { - return { - tally: object.tally ? TallyResult.fromSDK(object.tally) : undefined - }; - }, - toSDK(message: QueryTallyResultResponse): QueryTallyResultResponseSDKType { - const obj: any = {}; - message.tally !== undefined && (obj.tally = message.tally ? TallyResult.toSDK(message.tally) : undefined); - return obj; - }, - fromAmino(object: QueryTallyResultResponseAmino): QueryTallyResultResponse { - return { - tally: object?.tally ? TallyResult.fromAmino(object.tally) : undefined - }; - }, - toAmino(message: QueryTallyResultResponse): QueryTallyResultResponseAmino { - const obj: any = {}; - obj.tally = message.tally ? TallyResult.toAmino(message.tally) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTallyResultResponseAminoMsg): QueryTallyResultResponse { - return QueryTallyResultResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseAminoMsg { - return { - type: "cosmos-sdk/v1/QueryTallyResultResponse", - value: QueryTallyResultResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTallyResultResponseProtoMsg): QueryTallyResultResponse { - return QueryTallyResultResponse.decode(message.value); - }, - toProto(message: QueryTallyResultResponse): Uint8Array { - return QueryTallyResultResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.QueryTallyResultResponse", - value: QueryTallyResultResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.amino.ts deleted file mode 100644 index 33fcf209..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.amino.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; -export const AminoConverter = { - "/cosmos.gov.v1.MsgSubmitProposal": { - aminoType: "cosmos-sdk/v1/MsgSubmitProposal", - toAmino: MsgSubmitProposal.toAmino, - fromAmino: MsgSubmitProposal.fromAmino - }, - "/cosmos.gov.v1.MsgExecLegacyContent": { - aminoType: "cosmos-sdk/v1/MsgExecLegacyContent", - toAmino: MsgExecLegacyContent.toAmino, - fromAmino: MsgExecLegacyContent.fromAmino - }, - "/cosmos.gov.v1.MsgVote": { - aminoType: "cosmos-sdk/v1/MsgVote", - toAmino: MsgVote.toAmino, - fromAmino: MsgVote.fromAmino - }, - "/cosmos.gov.v1.MsgVoteWeighted": { - aminoType: "cosmos-sdk/v1/MsgVoteWeighted", - toAmino: MsgVoteWeighted.toAmino, - fromAmino: MsgVoteWeighted.fromAmino - }, - "/cosmos.gov.v1.MsgDeposit": { - aminoType: "cosmos-sdk/v1/MsgDeposit", - toAmino: MsgDeposit.toAmino, - fromAmino: MsgDeposit.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.registry.ts deleted file mode 100644 index be88f457..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.registry.ts +++ /dev/null @@ -1,171 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSubmitProposal, MsgExecLegacyContent, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.gov.v1.MsgExecLegacyContent", MsgExecLegacyContent], ["/cosmos.gov.v1.MsgVote", MsgVote], ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted], ["/cosmos.gov.v1.MsgDeposit", MsgDeposit]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - value: MsgSubmitProposal.encode(value).finish() - }; - }, - execLegacyContent(value: MsgExecLegacyContent) { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - value: MsgExecLegacyContent.encode(value).finish() - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1.MsgVote", - value: MsgVote.encode(value).finish() - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - value: MsgVoteWeighted.encode(value).finish() - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - value: MsgDeposit.encode(value).finish() - }; - } - }, - withTypeUrl: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - value - }; - }, - execLegacyContent(value: MsgExecLegacyContent) { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - value - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1.MsgVote", - value - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - value - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - value - }; - } - }, - toJSON: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - value: MsgSubmitProposal.toJSON(value) - }; - }, - execLegacyContent(value: MsgExecLegacyContent) { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - value: MsgExecLegacyContent.toJSON(value) - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1.MsgVote", - value: MsgVote.toJSON(value) - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - value: MsgVoteWeighted.toJSON(value) - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - value: MsgDeposit.toJSON(value) - }; - } - }, - fromJSON: { - submitProposal(value: any) { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - value: MsgSubmitProposal.fromJSON(value) - }; - }, - execLegacyContent(value: any) { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - value: MsgExecLegacyContent.fromJSON(value) - }; - }, - vote(value: any) { - return { - typeUrl: "/cosmos.gov.v1.MsgVote", - value: MsgVote.fromJSON(value) - }; - }, - voteWeighted(value: any) { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - value: MsgVoteWeighted.fromJSON(value) - }; - }, - deposit(value: any) { - return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - value: MsgDeposit.fromJSON(value) - }; - } - }, - fromPartial: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - value: MsgSubmitProposal.fromPartial(value) - }; - }, - execLegacyContent(value: MsgExecLegacyContent) { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - value: MsgExecLegacyContent.fromPartial(value) - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1.MsgVote", - value: MsgVote.fromPartial(value) - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - value: MsgVoteWeighted.fromPartial(value) - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - value: MsgDeposit.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.rpc.msg.ts deleted file mode 100644 index 2a8605ee..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSubmitProposal, MsgSubmitProposalResponse, MsgExecLegacyContent, MsgExecLegacyContentResponse, MsgVote, MsgVoteResponse, MsgVoteWeighted, MsgVoteWeightedResponse, MsgDeposit, MsgDepositResponse } from "./tx"; -/** Msg defines the gov Msg service. */ -export interface Msg { - /** SubmitProposal defines a method to create new proposal given a content. */ - submitProposal(request: MsgSubmitProposal): Promise; - /** - * ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - * to execute a legacy content-based proposal. - */ - execLegacyContent(request: MsgExecLegacyContent): Promise; - /** Vote defines a method to add a vote on a specific proposal. */ - vote(request: MsgVote): Promise; - /** VoteWeighted defines a method to add a weighted vote on a specific proposal. */ - voteWeighted(request: MsgVoteWeighted): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ - deposit(request: MsgDeposit): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.submitProposal = this.submitProposal.bind(this); - this.execLegacyContent = this.execLegacyContent.bind(this); - this.vote = this.vote.bind(this); - this.voteWeighted = this.voteWeighted.bind(this); - this.deposit = this.deposit.bind(this); - } - submitProposal(request: MsgSubmitProposal): Promise { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Msg", "SubmitProposal", data); - return promise.then(data => MsgSubmitProposalResponse.decode(new BinaryReader(data))); - } - execLegacyContent(request: MsgExecLegacyContent): Promise { - const data = MsgExecLegacyContent.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Msg", "ExecLegacyContent", data); - return promise.then(data => MsgExecLegacyContentResponse.decode(new BinaryReader(data))); - } - vote(request: MsgVote): Promise { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Msg", "Vote", data); - return promise.then(data => MsgVoteResponse.decode(new BinaryReader(data))); - } - voteWeighted(request: MsgVoteWeighted): Promise { - const data = MsgVoteWeighted.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Msg", "VoteWeighted", data); - return promise.then(data => MsgVoteWeightedResponse.decode(new BinaryReader(data))); - } - deposit(request: MsgDeposit): Promise { - const data = MsgDeposit.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1.Msg", "Deposit", data); - return promise.then(data => MsgDepositResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.ts deleted file mode 100644 index 2750da65..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1/tx.ts +++ /dev/null @@ -1,1265 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, voteOptionFromJSON, voteOptionToJSON } from "./gov"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposal { - messages: Any[]; - initialDeposit: Coin[]; - proposer: string; - /** metadata is any arbitrary metadata attached to the proposal. */ - metadata: string; -} -export interface MsgSubmitProposalProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal"; - value: Uint8Array; -} -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposalAmino { - messages: AnyAmino[]; - initial_deposit: CoinAmino[]; - proposer: string; - /** metadata is any arbitrary metadata attached to the proposal. */ - metadata: string; -} -export interface MsgSubmitProposalAminoMsg { - type: "cosmos-sdk/v1/MsgSubmitProposal"; - value: MsgSubmitProposalAmino; -} -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposalSDKType { - messages: AnySDKType[]; - initial_deposit: CoinSDKType[]; - proposer: string; - metadata: string; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - proposalId: bigint; -} -export interface MsgSubmitProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse"; - value: Uint8Array; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponseAmino { - proposal_id: string; -} -export interface MsgSubmitProposalResponseAminoMsg { - type: "cosmos-sdk/v1/MsgSubmitProposalResponse"; - value: MsgSubmitProposalResponseAmino; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponseSDKType { - proposal_id: bigint; -} -/** - * MsgExecLegacyContent is used to wrap the legacy content field into a message. - * This ensures backwards compatibility with v1beta1.MsgSubmitProposal. - */ -export interface MsgExecLegacyContent { - /** content is the proposal's content. */ - content: Any | undefined; - /** authority must be the gov module address. */ - authority: string; -} -export interface MsgExecLegacyContentProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent"; - value: Uint8Array; -} -/** - * MsgExecLegacyContent is used to wrap the legacy content field into a message. - * This ensures backwards compatibility with v1beta1.MsgSubmitProposal. - */ -export interface MsgExecLegacyContentAmino { - /** content is the proposal's content. */ - content?: AnyAmino | undefined; - /** authority must be the gov module address. */ - authority: string; -} -export interface MsgExecLegacyContentAminoMsg { - type: "cosmos-sdk/v1/MsgExecLegacyContent"; - value: MsgExecLegacyContentAmino; -} -/** - * MsgExecLegacyContent is used to wrap the legacy content field into a message. - * This ensures backwards compatibility with v1beta1.MsgSubmitProposal. - */ -export interface MsgExecLegacyContentSDKType { - content: AnySDKType | undefined; - authority: string; -} -/** MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. */ -export interface MsgExecLegacyContentResponse {} -export interface MsgExecLegacyContentResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse"; - value: Uint8Array; -} -/** MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. */ -export interface MsgExecLegacyContentResponseAmino {} -export interface MsgExecLegacyContentResponseAminoMsg { - type: "cosmos-sdk/v1/MsgExecLegacyContentResponse"; - value: MsgExecLegacyContentResponseAmino; -} -/** MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. */ -export interface MsgExecLegacyContentResponseSDKType {} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVote { - proposalId: bigint; - voter: string; - option: VoteOption; - metadata: string; -} -export interface MsgVoteProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVote"; - value: Uint8Array; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVoteAmino { - proposal_id: string; - voter: string; - option: VoteOption; - metadata: string; -} -export interface MsgVoteAminoMsg { - type: "cosmos-sdk/v1/MsgVote"; - value: MsgVoteAmino; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVoteSDKType { - proposal_id: bigint; - voter: string; - option: VoteOption; - metadata: string; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse {} -export interface MsgVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVoteResponse"; - value: Uint8Array; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponseAmino {} -export interface MsgVoteResponseAminoMsg { - type: "cosmos-sdk/v1/MsgVoteResponse"; - value: MsgVoteResponseAmino; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponseSDKType {} -/** MsgVoteWeighted defines a message to cast a vote. */ -export interface MsgVoteWeighted { - proposalId: bigint; - voter: string; - options: WeightedVoteOption[]; - metadata: string; -} -export interface MsgVoteWeightedProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted"; - value: Uint8Array; -} -/** MsgVoteWeighted defines a message to cast a vote. */ -export interface MsgVoteWeightedAmino { - proposal_id: string; - voter: string; - options: WeightedVoteOptionAmino[]; - metadata: string; -} -export interface MsgVoteWeightedAminoMsg { - type: "cosmos-sdk/v1/MsgVoteWeighted"; - value: MsgVoteWeightedAmino; -} -/** MsgVoteWeighted defines a message to cast a vote. */ -export interface MsgVoteWeightedSDKType { - proposal_id: bigint; - voter: string; - options: WeightedVoteOptionSDKType[]; - metadata: string; -} -/** MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. */ -export interface MsgVoteWeightedResponse {} -export interface MsgVoteWeightedResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse"; - value: Uint8Array; -} -/** MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. */ -export interface MsgVoteWeightedResponseAmino {} -export interface MsgVoteWeightedResponseAminoMsg { - type: "cosmos-sdk/v1/MsgVoteWeightedResponse"; - value: MsgVoteWeightedResponseAmino; -} -/** MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. */ -export interface MsgVoteWeightedResponseSDKType {} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDeposit { - proposalId: bigint; - depositor: string; - amount: Coin[]; -} -export interface MsgDepositProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgDeposit"; - value: Uint8Array; -} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDepositAmino { - proposal_id: string; - depositor: string; - amount: CoinAmino[]; -} -export interface MsgDepositAminoMsg { - type: "cosmos-sdk/v1/MsgDeposit"; - value: MsgDepositAmino; -} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDepositSDKType { - proposal_id: bigint; - depositor: string; - amount: CoinSDKType[]; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponse {} -export interface MsgDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1.MsgDepositResponse"; - value: Uint8Array; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponseAmino {} -export interface MsgDepositResponseAminoMsg { - type: "cosmos-sdk/v1/MsgDepositResponse"; - value: MsgDepositResponseAmino; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponseSDKType {} -function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { - messages: [], - initialDeposit: [], - proposer: "", - metadata: "" - }; -} -export const MsgSubmitProposal = { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - aminoType: "cosmos-sdk/v1/MsgSubmitProposal", - encode(message: MsgSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.messages) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.initialDeposit) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.proposer !== "") { - writer.uint32(26).string(message.proposer); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - case 4: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitProposal { - return { - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], - initialDeposit: Array.isArray(object?.initialDeposit) ? object.initialDeposit.map((e: any) => Coin.fromJSON(e)) : [], - proposer: isSet(object.proposer) ? String(object.proposer) : "", - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: MsgSubmitProposal): unknown { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.messages = []; - } - if (message.initialDeposit) { - obj.initialDeposit = message.initialDeposit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.initialDeposit = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer); - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitProposal { - const message = createBaseMsgSubmitProposal(); - message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - message.initialDeposit = object.initialDeposit?.map(e => Coin.fromPartial(e)) || []; - message.proposer = object.proposer ?? ""; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: MsgSubmitProposalSDKType): MsgSubmitProposal { - return { - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromSDK(e)) : [], - initialDeposit: Array.isArray(object?.initial_deposit) ? object.initial_deposit.map((e: any) => Coin.fromSDK(e)) : [], - proposer: object?.proposer, - metadata: object?.metadata - }; - }, - toSDK(message: MsgSubmitProposal): MsgSubmitProposalSDKType { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.messages = []; - } - if (message.initialDeposit) { - obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.initial_deposit = []; - } - obj.proposer = message.proposer; - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { - return { - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromAmino(e)) : [], - initialDeposit: Array.isArray(object?.initial_deposit) ? object.initial_deposit.map((e: any) => Coin.fromAmino(e)) : [], - proposer: object.proposer, - metadata: object.metadata - }; - }, - toAmino(message: MsgSubmitProposal): MsgSubmitProposalAmino { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.messages = []; - } - if (message.initialDeposit) { - obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.initial_deposit = []; - } - obj.proposer = message.proposer; - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { - return MsgSubmitProposal.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg { - return { - type: "cosmos-sdk/v1/MsgSubmitProposal", - value: MsgSubmitProposal.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitProposalProtoMsg): MsgSubmitProposal { - return MsgSubmitProposal.decode(message.value); - }, - toProto(message: MsgSubmitProposal): Uint8Array { - return MsgSubmitProposal.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", - value: MsgSubmitProposal.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { - return { - proposalId: BigInt(0) - }; -} -export const MsgSubmitProposalResponse = { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", - aminoType: "cosmos-sdk/v1/MsgSubmitProposalResponse", - encode(message: MsgSubmitProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitProposalResponse { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgSubmitProposalResponse): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitProposalResponse { - const message = createBaseMsgSubmitProposalResponse(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgSubmitProposalResponseSDKType): MsgSubmitProposalResponse { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: MsgSubmitProposalResponseAmino): MsgSubmitProposalResponse { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalResponseAminoMsg): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg { - return { - type: "cosmos-sdk/v1/MsgSubmitProposalResponse", - value: MsgSubmitProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitProposalResponseProtoMsg): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.decode(message.value); - }, - toProto(message: MsgSubmitProposalResponse): Uint8Array { - return MsgSubmitProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgSubmitProposalResponse", - value: MsgSubmitProposalResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExecLegacyContent(): MsgExecLegacyContent { - return { - content: Any.fromPartial({}), - authority: "" - }; -} -export const MsgExecLegacyContent = { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - aminoType: "cosmos-sdk/v1/MsgExecLegacyContent", - encode(message: MsgExecLegacyContent, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(10).fork()).ldelim(); - } - if (message.authority !== "") { - writer.uint32(18).string(message.authority); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecLegacyContent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecLegacyContent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = Any.decode(reader, reader.uint32()); - break; - case 2: - message.authority = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExecLegacyContent { - return { - content: isSet(object.content) ? Any.fromJSON(object.content) : undefined, - authority: isSet(object.authority) ? String(object.authority) : "" - }; - }, - toJSON(message: MsgExecLegacyContent): unknown { - const obj: any = {}; - message.content !== undefined && (obj.content = message.content ? Any.toJSON(message.content) : undefined); - message.authority !== undefined && (obj.authority = message.authority); - return obj; - }, - fromPartial(object: DeepPartial): MsgExecLegacyContent { - const message = createBaseMsgExecLegacyContent(); - message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined; - message.authority = object.authority ?? ""; - return message; - }, - fromSDK(object: MsgExecLegacyContentSDKType): MsgExecLegacyContent { - return { - content: object.content ? Any.fromSDK(object.content) : undefined, - authority: object?.authority - }; - }, - toSDK(message: MsgExecLegacyContent): MsgExecLegacyContentSDKType { - const obj: any = {}; - message.content !== undefined && (obj.content = message.content ? Any.toSDK(message.content) : undefined); - obj.authority = message.authority; - return obj; - }, - fromAmino(object: MsgExecLegacyContentAmino): MsgExecLegacyContent { - return { - content: object?.content ? Any.fromAmino(object.content) : undefined, - authority: object.authority - }; - }, - toAmino(message: MsgExecLegacyContent): MsgExecLegacyContentAmino { - const obj: any = {}; - obj.content = message.content ? Any.toAmino(message.content) : undefined; - obj.authority = message.authority; - return obj; - }, - fromAminoMsg(object: MsgExecLegacyContentAminoMsg): MsgExecLegacyContent { - return MsgExecLegacyContent.fromAmino(object.value); - }, - toAminoMsg(message: MsgExecLegacyContent): MsgExecLegacyContentAminoMsg { - return { - type: "cosmos-sdk/v1/MsgExecLegacyContent", - value: MsgExecLegacyContent.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecLegacyContentProtoMsg): MsgExecLegacyContent { - return MsgExecLegacyContent.decode(message.value); - }, - toProto(message: MsgExecLegacyContent): Uint8Array { - return MsgExecLegacyContent.encode(message).finish(); - }, - toProtoMsg(message: MsgExecLegacyContent): MsgExecLegacyContentProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContent", - value: MsgExecLegacyContent.encode(message).finish() - }; - } -}; -function createBaseMsgExecLegacyContentResponse(): MsgExecLegacyContentResponse { - return {}; -} -export const MsgExecLegacyContentResponse = { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", - aminoType: "cosmos-sdk/v1/MsgExecLegacyContentResponse", - encode(_: MsgExecLegacyContentResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecLegacyContentResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecLegacyContentResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgExecLegacyContentResponse { - return {}; - }, - toJSON(_: MsgExecLegacyContentResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgExecLegacyContentResponse { - const message = createBaseMsgExecLegacyContentResponse(); - return message; - }, - fromSDK(_: MsgExecLegacyContentResponseSDKType): MsgExecLegacyContentResponse { - return {}; - }, - toSDK(_: MsgExecLegacyContentResponse): MsgExecLegacyContentResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgExecLegacyContentResponseAmino): MsgExecLegacyContentResponse { - return {}; - }, - toAmino(_: MsgExecLegacyContentResponse): MsgExecLegacyContentResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgExecLegacyContentResponseAminoMsg): MsgExecLegacyContentResponse { - return MsgExecLegacyContentResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExecLegacyContentResponse): MsgExecLegacyContentResponseAminoMsg { - return { - type: "cosmos-sdk/v1/MsgExecLegacyContentResponse", - value: MsgExecLegacyContentResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecLegacyContentResponseProtoMsg): MsgExecLegacyContentResponse { - return MsgExecLegacyContentResponse.decode(message.value); - }, - toProto(message: MsgExecLegacyContentResponse): Uint8Array { - return MsgExecLegacyContentResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExecLegacyContentResponse): MsgExecLegacyContentResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgExecLegacyContentResponse", - value: MsgExecLegacyContentResponse.encode(message).finish() - }; - } -}; -function createBaseMsgVote(): MsgVote { - return { - proposalId: BigInt(0), - voter: "", - option: 0, - metadata: "" - }; -} -export const MsgVote = { - typeUrl: "/cosmos.gov.v1.MsgVote", - aminoType: "cosmos-sdk/v1/MsgVote", - encode(message: MsgVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgVote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: MsgVote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): MsgVote { - const message = createBaseMsgVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: MsgVoteSDKType): MsgVote { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: object?.metadata - }; - }, - toSDK(message: MsgVote): MsgVoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: MsgVoteAmino): MsgVote { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: object.metadata - }; - }, - toAmino(message: MsgVote): MsgVoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - obj.option = message.option; - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: MsgVoteAminoMsg): MsgVote { - return MsgVote.fromAmino(object.value); - }, - toAminoMsg(message: MsgVote): MsgVoteAminoMsg { - return { - type: "cosmos-sdk/v1/MsgVote", - value: MsgVote.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteProtoMsg): MsgVote { - return MsgVote.decode(message.value); - }, - toProto(message: MsgVote): Uint8Array { - return MsgVote.encode(message).finish(); - }, - toProtoMsg(message: MsgVote): MsgVoteProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgVote", - value: MsgVote.encode(message).finish() - }; - } -}; -function createBaseMsgVoteResponse(): MsgVoteResponse { - return {}; -} -export const MsgVoteResponse = { - typeUrl: "/cosmos.gov.v1.MsgVoteResponse", - aminoType: "cosmos-sdk/v1/MsgVoteResponse", - encode(_: MsgVoteResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgVoteResponse { - return {}; - }, - toJSON(_: MsgVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgVoteResponse { - const message = createBaseMsgVoteResponse(); - return message; - }, - fromSDK(_: MsgVoteResponseSDKType): MsgVoteResponse { - return {}; - }, - toSDK(_: MsgVoteResponse): MsgVoteResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgVoteResponseAmino): MsgVoteResponse { - return {}; - }, - toAmino(_: MsgVoteResponse): MsgVoteResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgVoteResponseAminoMsg): MsgVoteResponse { - return MsgVoteResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg { - return { - type: "cosmos-sdk/v1/MsgVoteResponse", - value: MsgVoteResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteResponseProtoMsg): MsgVoteResponse { - return MsgVoteResponse.decode(message.value); - }, - toProto(message: MsgVoteResponse): Uint8Array { - return MsgVoteResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteResponse", - value: MsgVoteResponse.encode(message).finish() - }; - } -}; -function createBaseMsgVoteWeighted(): MsgVoteWeighted { - return { - proposalId: BigInt(0), - voter: "", - options: [], - metadata: "" - }; -} -export const MsgVoteWeighted = { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - aminoType: "cosmos-sdk/v1/MsgVoteWeighted", - encode(message: MsgVoteWeighted, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - for (const v of message.options) { - WeightedVoteOption.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteWeighted { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteWeighted(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - case 4: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgVoteWeighted { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) : [], - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: MsgVoteWeighted): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toJSON(e) : undefined); - } else { - obj.options = []; - } - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): MsgVoteWeighted { - const message = createBaseMsgVoteWeighted(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: MsgVoteWeightedSDKType): MsgVoteWeighted { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromSDK(e)) : [], - metadata: object?.metadata - }; - }, - toSDK(message: MsgVoteWeighted): MsgVoteWeightedSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toSDK(e) : undefined); - } else { - obj.options = []; - } - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: MsgVoteWeightedAmino): MsgVoteWeighted { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromAmino(e)) : [], - metadata: object.metadata - }; - }, - toAmino(message: MsgVoteWeighted): MsgVoteWeightedAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); - } else { - obj.options = []; - } - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: MsgVoteWeightedAminoMsg): MsgVoteWeighted { - return MsgVoteWeighted.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteWeighted): MsgVoteWeightedAminoMsg { - return { - type: "cosmos-sdk/v1/MsgVoteWeighted", - value: MsgVoteWeighted.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteWeightedProtoMsg): MsgVoteWeighted { - return MsgVoteWeighted.decode(message.value); - }, - toProto(message: MsgVoteWeighted): Uint8Array { - return MsgVoteWeighted.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteWeighted): MsgVoteWeightedProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", - value: MsgVoteWeighted.encode(message).finish() - }; - } -}; -function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { - return {}; -} -export const MsgVoteWeightedResponse = { - typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", - aminoType: "cosmos-sdk/v1/MsgVoteWeightedResponse", - encode(_: MsgVoteWeightedResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteWeightedResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteWeightedResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgVoteWeightedResponse { - return {}; - }, - toJSON(_: MsgVoteWeightedResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgVoteWeightedResponse { - const message = createBaseMsgVoteWeightedResponse(); - return message; - }, - fromSDK(_: MsgVoteWeightedResponseSDKType): MsgVoteWeightedResponse { - return {}; - }, - toSDK(_: MsgVoteWeightedResponse): MsgVoteWeightedResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgVoteWeightedResponseAmino): MsgVoteWeightedResponse { - return {}; - }, - toAmino(_: MsgVoteWeightedResponse): MsgVoteWeightedResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgVoteWeightedResponseAminoMsg): MsgVoteWeightedResponse { - return MsgVoteWeightedResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseAminoMsg { - return { - type: "cosmos-sdk/v1/MsgVoteWeightedResponse", - value: MsgVoteWeightedResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteWeightedResponseProtoMsg): MsgVoteWeightedResponse { - return MsgVoteWeightedResponse.decode(message.value); - }, - toProto(message: MsgVoteWeightedResponse): Uint8Array { - return MsgVoteWeightedResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgVoteWeightedResponse", - value: MsgVoteWeightedResponse.encode(message).finish() - }; - } -}; -function createBaseMsgDeposit(): MsgDeposit { - return { - proposalId: BigInt(0), - depositor: "", - amount: [] - }; -} -export const MsgDeposit = { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - aminoType: "cosmos-sdk/v1/MsgDeposit", - encode(message: MsgDeposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDeposit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDeposit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgDeposit { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - depositor: isSet(object.depositor) ? String(object.depositor) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgDeposit): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgDeposit { - const message = createBaseMsgDeposit(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgDepositSDKType): MsgDeposit { - return { - proposalId: object?.proposal_id, - depositor: object?.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgDeposit): MsgDepositSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: MsgDepositAmino): MsgDeposit { - return { - proposalId: BigInt(object.proposal_id), - depositor: object.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgDeposit): MsgDepositAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: MsgDepositAminoMsg): MsgDeposit { - return MsgDeposit.fromAmino(object.value); - }, - toAminoMsg(message: MsgDeposit): MsgDepositAminoMsg { - return { - type: "cosmos-sdk/v1/MsgDeposit", - value: MsgDeposit.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDepositProtoMsg): MsgDeposit { - return MsgDeposit.decode(message.value); - }, - toProto(message: MsgDeposit): Uint8Array { - return MsgDeposit.encode(message).finish(); - }, - toProtoMsg(message: MsgDeposit): MsgDepositProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgDeposit", - value: MsgDeposit.encode(message).finish() - }; - } -}; -function createBaseMsgDepositResponse(): MsgDepositResponse { - return {}; -} -export const MsgDepositResponse = { - typeUrl: "/cosmos.gov.v1.MsgDepositResponse", - aminoType: "cosmos-sdk/v1/MsgDepositResponse", - encode(_: MsgDepositResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDepositResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDepositResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgDepositResponse { - return {}; - }, - toJSON(_: MsgDepositResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgDepositResponse { - const message = createBaseMsgDepositResponse(); - return message; - }, - fromSDK(_: MsgDepositResponseSDKType): MsgDepositResponse { - return {}; - }, - toSDK(_: MsgDepositResponse): MsgDepositResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgDepositResponseAmino): MsgDepositResponse { - return {}; - }, - toAmino(_: MsgDepositResponse): MsgDepositResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgDepositResponseAminoMsg): MsgDepositResponse { - return MsgDepositResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgDepositResponse): MsgDepositResponseAminoMsg { - return { - type: "cosmos-sdk/v1/MsgDepositResponse", - value: MsgDepositResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDepositResponseProtoMsg): MsgDepositResponse { - return MsgDepositResponse.decode(message.value); - }, - toProto(message: MsgDepositResponse): Uint8Array { - return MsgDepositResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgDepositResponse): MsgDepositResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1.MsgDepositResponse", - value: MsgDepositResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/genesis.ts deleted file mode 100644 index 02db3e54..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/genesis.ts +++ /dev/null @@ -1,263 +0,0 @@ -import { Deposit, DepositAmino, DepositSDKType, Vote, VoteAmino, VoteSDKType, Proposal, ProposalAmino, ProposalSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType } from "./gov"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisState { - /** starting_proposal_id is the ID of the starting proposal. */ - startingProposalId: bigint; - /** deposits defines all the deposits present at genesis. */ - deposits: Deposit[]; - /** votes defines all the votes present at genesis. */ - votes: Vote[]; - /** proposals defines all the proposals present at genesis. */ - proposals: Proposal[]; - /** params defines all the paramaters of related to deposit. */ - depositParams: DepositParams | undefined; - /** params defines all the paramaters of related to voting. */ - votingParams: VotingParams | undefined; - /** params defines all the paramaters of related to tally. */ - tallyParams: TallyParams | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisStateAmino { - /** starting_proposal_id is the ID of the starting proposal. */ - starting_proposal_id: string; - /** deposits defines all the deposits present at genesis. */ - deposits: DepositAmino[]; - /** votes defines all the votes present at genesis. */ - votes: VoteAmino[]; - /** proposals defines all the proposals present at genesis. */ - proposals: ProposalAmino[]; - /** params defines all the paramaters of related to deposit. */ - deposit_params?: DepositParamsAmino | undefined; - /** params defines all the paramaters of related to voting. */ - voting_params?: VotingParamsAmino | undefined; - /** params defines all the paramaters of related to tally. */ - tally_params?: TallyParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the gov module's genesis state. */ -export interface GenesisStateSDKType { - starting_proposal_id: bigint; - deposits: DepositSDKType[]; - votes: VoteSDKType[]; - proposals: ProposalSDKType[]; - deposit_params: DepositParamsSDKType | undefined; - voting_params: VotingParamsSDKType | undefined; - tally_params: TallyParamsSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - startingProposalId: BigInt(0), - deposits: [], - votes: [], - proposals: [], - depositParams: DepositParams.fromPartial({}), - votingParams: VotingParams.fromPartial({}), - tallyParams: TallyParams.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/cosmos.gov.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.startingProposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.startingProposalId); - } - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(42).fork()).ldelim(); - } - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(50).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startingProposalId = reader.uint64(); - break; - case 2: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 3: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 4: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 5: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 6: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 7: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - startingProposalId: isSet(object.startingProposalId) ? BigInt(object.startingProposalId.toString()) : BigInt(0), - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromJSON(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromJSON(e)) : [], - depositParams: isSet(object.depositParams) ? DepositParams.fromJSON(object.depositParams) : undefined, - votingParams: isSet(object.votingParams) ? VotingParams.fromJSON(object.votingParams) : undefined, - tallyParams: isSet(object.tallyParams) ? TallyParams.fromJSON(object.tallyParams) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.startingProposalId !== undefined && (obj.startingProposalId = (message.startingProposalId || BigInt(0)).toString()); - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toJSON(e) : undefined); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toJSON(e) : undefined); - } else { - obj.proposals = []; - } - message.depositParams !== undefined && (obj.depositParams = message.depositParams ? DepositParams.toJSON(message.depositParams) : undefined); - message.votingParams !== undefined && (obj.votingParams = message.votingParams ? VotingParams.toJSON(message.votingParams) : undefined); - message.tallyParams !== undefined && (obj.tallyParams = message.tallyParams ? TallyParams.toJSON(message.tallyParams) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.startingProposalId = object.startingProposalId !== undefined && object.startingProposalId !== null ? BigInt(object.startingProposalId.toString()) : BigInt(0); - message.deposits = object.deposits?.map(e => Deposit.fromPartial(e)) || []; - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || []; - message.depositParams = object.depositParams !== undefined && object.depositParams !== null ? DepositParams.fromPartial(object.depositParams) : undefined; - message.votingParams = object.votingParams !== undefined && object.votingParams !== null ? VotingParams.fromPartial(object.votingParams) : undefined; - message.tallyParams = object.tallyParams !== undefined && object.tallyParams !== null ? TallyParams.fromPartial(object.tallyParams) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - startingProposalId: object?.starting_proposal_id, - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromSDK(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [], - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromSDK(e)) : [], - depositParams: object.deposit_params ? DepositParams.fromSDK(object.deposit_params) : undefined, - votingParams: object.voting_params ? VotingParams.fromSDK(object.voting_params) : undefined, - tallyParams: object.tally_params ? TallyParams.fromSDK(object.tally_params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.starting_proposal_id = message.startingProposalId; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toSDK(e) : undefined); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toSDK(e) : undefined); - } else { - obj.proposals = []; - } - message.depositParams !== undefined && (obj.deposit_params = message.depositParams ? DepositParams.toSDK(message.depositParams) : undefined); - message.votingParams !== undefined && (obj.voting_params = message.votingParams ? VotingParams.toSDK(message.votingParams) : undefined); - message.tallyParams !== undefined && (obj.tally_params = message.tallyParams ? TallyParams.toSDK(message.tallyParams) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - startingProposalId: BigInt(object.starting_proposal_id), - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromAmino(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [], - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromAmino(e)) : [], - depositParams: object?.deposit_params ? DepositParams.fromAmino(object.deposit_params) : undefined, - votingParams: object?.voting_params ? VotingParams.fromAmino(object.voting_params) : undefined, - tallyParams: object?.tally_params ? TallyParams.fromAmino(object.tally_params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.starting_proposal_id = message.startingProposalId ? message.startingProposalId.toString() : undefined; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e) : undefined); - } else { - obj.deposits = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined); - } else { - obj.proposals = []; - } - obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams) : undefined; - obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams) : undefined; - obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/gov.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/gov.ts deleted file mode 100644 index 8756095a..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/gov.ts +++ /dev/null @@ -1,1612 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { Decimal } from "@cosmjs/math"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** VoteOption enumerates the valid vote options for a given governance proposal. */ -export enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VOTE_OPTION_UNSPECIFIED = 0, - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VOTE_OPTION_YES = 1, - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VOTE_OPTION_ABSTAIN = 2, - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VOTE_OPTION_NO = 3, - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VOTE_OPTION_NO_WITH_VETO = 4, - UNRECOGNIZED = -1, -} -export const VoteOptionSDKType = VoteOption; -export const VoteOptionAmino = VoteOption; -export function voteOptionFromJSON(object: any): VoteOption { - switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; - } -} -export function voteOptionToJSON(object: VoteOption): string { - switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ProposalStatus enumerates the valid statuses of a proposal. */ -export enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** - * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. - */ - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - /** - * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. - */ - PROPOSAL_STATUS_VOTING_PERIOD = 2, - /** - * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. - */ - PROPOSAL_STATUS_PASSED = 3, - /** - * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. - */ - PROPOSAL_STATUS_REJECTED = 4, - /** - * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. - */ - PROPOSAL_STATUS_FAILED = 5, - UNRECOGNIZED = -1, -} -export const ProposalStatusSDKType = ProposalStatus; -export const ProposalStatusAmino = ProposalStatus; -export function proposalStatusFromJSON(object: any): ProposalStatus { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD; - case 2: - case "PROPOSAL_STATUS_VOTING_PERIOD": - return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD; - case 3: - case "PROPOSAL_STATUS_PASSED": - return ProposalStatus.PROPOSAL_STATUS_PASSED; - case 4: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 5: - case "PROPOSAL_STATUS_FAILED": - return ProposalStatus.PROPOSAL_STATUS_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} -export function proposalStatusToJSON(object: ProposalStatus): string { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD: - return "PROPOSAL_STATUS_DEPOSIT_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD: - return "PROPOSAL_STATUS_VOTING_PERIOD"; - case ProposalStatus.PROPOSAL_STATUS_PASSED: - return "PROPOSAL_STATUS_PASSED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_FAILED: - return "PROPOSAL_STATUS_FAILED"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * WeightedVoteOption defines a unit of vote for vote split. - * - * Since: cosmos-sdk 0.43 - */ -export interface WeightedVoteOption { - option: VoteOption; - weight: string; -} -export interface WeightedVoteOptionProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption"; - value: Uint8Array; -} -/** - * WeightedVoteOption defines a unit of vote for vote split. - * - * Since: cosmos-sdk 0.43 - */ -export interface WeightedVoteOptionAmino { - option: VoteOption; - weight: string; -} -export interface WeightedVoteOptionAminoMsg { - type: "cosmos-sdk/WeightedVoteOption"; - value: WeightedVoteOptionAmino; -} -/** - * WeightedVoteOption defines a unit of vote for vote split. - * - * Since: cosmos-sdk 0.43 - */ -export interface WeightedVoteOptionSDKType { - option: VoteOption; - weight: string; -} -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposal { - title: string; - description: string; -} -export interface TextProposalProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.TextProposal"; - value: Uint8Array; -} -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposalAmino { - title: string; - description: string; -} -export interface TextProposalAminoMsg { - type: "cosmos-sdk/TextProposal"; - value: TextProposalAmino; -} -/** - * TextProposal defines a standard text proposal whose changes need to be - * manually updated in case of approval. - */ -export interface TextProposalSDKType { - title: string; - description: string; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface Deposit { - proposalId: bigint; - depositor: string; - amount: Coin[]; -} -export interface DepositProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.Deposit"; - value: Uint8Array; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface DepositAmino { - proposal_id: string; - depositor: string; - amount: CoinAmino[]; -} -export interface DepositAminoMsg { - type: "cosmos-sdk/Deposit"; - value: DepositAmino; -} -/** - * Deposit defines an amount deposited by an account address to an active - * proposal. - */ -export interface DepositSDKType { - proposal_id: bigint; - depositor: string; - amount: CoinSDKType[]; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface Proposal { - proposalId: bigint; - content: Any | undefined; - status: ProposalStatus; - /** - * final_tally_result is the final tally result of the proposal. When - * querying a proposal via gRPC, this field is not populated until the - * proposal's voting period has ended. - */ - finalTallyResult: TallyResult | undefined; - submitTime: Date | undefined; - depositEndTime: Date | undefined; - totalDeposit: Coin[]; - votingStartTime: Date | undefined; - votingEndTime: Date | undefined; -} -export interface ProposalProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.Proposal"; - value: Uint8Array; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface ProposalAmino { - proposal_id: string; - content?: AnyAmino | undefined; - status: ProposalStatus; - /** - * final_tally_result is the final tally result of the proposal. When - * querying a proposal via gRPC, this field is not populated until the - * proposal's voting period has ended. - */ - final_tally_result?: TallyResultAmino | undefined; - submit_time?: Date | undefined; - deposit_end_time?: Date | undefined; - total_deposit: CoinAmino[]; - voting_start_time?: Date | undefined; - voting_end_time?: Date | undefined; -} -export interface ProposalAminoMsg { - type: "cosmos-sdk/Proposal"; - value: ProposalAmino; -} -/** Proposal defines the core field members of a governance proposal. */ -export interface ProposalSDKType { - proposal_id: bigint; - content: AnySDKType | undefined; - status: ProposalStatus; - final_tally_result: TallyResultSDKType | undefined; - submit_time: Date | undefined; - deposit_end_time: Date | undefined; - total_deposit: CoinSDKType[]; - voting_start_time: Date | undefined; - voting_end_time: Date | undefined; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResult { - yes: string; - abstain: string; - no: string; - noWithVeto: string; -} -export interface TallyResultProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.TallyResult"; - value: Uint8Array; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResultAmino { - yes: string; - abstain: string; - no: string; - no_with_veto: string; -} -export interface TallyResultAminoMsg { - type: "cosmos-sdk/TallyResult"; - value: TallyResultAmino; -} -/** TallyResult defines a standard tally for a governance proposal. */ -export interface TallyResultSDKType { - yes: string; - abstain: string; - no: string; - no_with_veto: string; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface Vote { - proposalId: bigint; - voter: string; - /** - * Deprecated: Prefer to use `options` instead. This field is set in queries - * if and only if `len(options) == 1` and that option has weight 1. In all - * other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - */ - /** @deprecated */ - option: VoteOption; - /** Since: cosmos-sdk 0.43 */ - options: WeightedVoteOption[]; -} -export interface VoteProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.Vote"; - value: Uint8Array; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface VoteAmino { - proposal_id: string; - voter: string; - /** - * Deprecated: Prefer to use `options` instead. This field is set in queries - * if and only if `len(options) == 1` and that option has weight 1. In all - * other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - */ - /** @deprecated */ - option: VoteOption; - /** Since: cosmos-sdk 0.43 */ - options: WeightedVoteOptionAmino[]; -} -export interface VoteAminoMsg { - type: "cosmos-sdk/Vote"; - value: VoteAmino; -} -/** - * Vote defines a vote on a governance proposal. - * A Vote consists of a proposal ID, the voter, and the vote option. - */ -export interface VoteSDKType { - proposal_id: bigint; - voter: string; - /** @deprecated */ - option: VoteOption; - options: WeightedVoteOptionSDKType[]; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParams { - /** Minimum deposit for a proposal to enter voting period. */ - minDeposit: Coin[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - maxDepositPeriod: Duration | undefined; -} -export interface DepositParamsProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.DepositParams"; - value: Uint8Array; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParamsAmino { - /** Minimum deposit for a proposal to enter voting period. */ - min_deposit: CoinAmino[]; - /** - * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - * months. - */ - max_deposit_period?: DurationAmino | undefined; -} -export interface DepositParamsAminoMsg { - type: "cosmos-sdk/DepositParams"; - value: DepositParamsAmino; -} -/** DepositParams defines the params for deposits on governance proposals. */ -export interface DepositParamsSDKType { - min_deposit: CoinSDKType[]; - max_deposit_period: DurationSDKType | undefined; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParams { - /** Length of the voting period. */ - votingPeriod: Duration | undefined; -} -export interface VotingParamsProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.VotingParams"; - value: Uint8Array; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParamsAmino { - /** Length of the voting period. */ - voting_period?: DurationAmino | undefined; -} -export interface VotingParamsAminoMsg { - type: "cosmos-sdk/VotingParams"; - value: VotingParamsAmino; -} -/** VotingParams defines the params for voting on governance proposals. */ -export interface VotingParamsSDKType { - voting_period: DurationSDKType | undefined; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParams { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: Uint8Array; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: Uint8Array; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - vetoThreshold: Uint8Array; -} -export interface TallyParamsProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.TallyParams"; - value: Uint8Array; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParamsAmino { - /** - * Minimum percentage of total stake needed to vote for a result to be - * considered valid. - */ - quorum: Uint8Array; - /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */ - threshold: Uint8Array; - /** - * Minimum value of Veto votes to Total votes ratio for proposal to be - * vetoed. Default value: 1/3. - */ - veto_threshold: Uint8Array; -} -export interface TallyParamsAminoMsg { - type: "cosmos-sdk/TallyParams"; - value: TallyParamsAmino; -} -/** TallyParams defines the params for tallying votes on governance proposals. */ -export interface TallyParamsSDKType { - quorum: Uint8Array; - threshold: Uint8Array; - veto_threshold: Uint8Array; -} -function createBaseWeightedVoteOption(): WeightedVoteOption { - return { - option: 0, - weight: "" - }; -} -export const WeightedVoteOption = { - typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", - aminoType: "cosmos-sdk/WeightedVoteOption", - encode(message: WeightedVoteOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.option !== 0) { - writer.uint32(8).int32(message.option); - } - if (message.weight !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.weight, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): WeightedVoteOption { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWeightedVoteOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = (reader.int32() as any); - break; - case 2: - message.weight = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): WeightedVoteOption { - return { - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - weight: isSet(object.weight) ? String(object.weight) : "" - }; - }, - toJSON(message: WeightedVoteOption): unknown { - const obj: any = {}; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - fromPartial(object: DeepPartial): WeightedVoteOption { - const message = createBaseWeightedVoteOption(); - message.option = object.option ?? 0; - message.weight = object.weight ?? ""; - return message; - }, - fromSDK(object: WeightedVoteOptionSDKType): WeightedVoteOption { - return { - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - weight: object?.weight - }; - }, - toSDK(message: WeightedVoteOption): WeightedVoteOptionSDKType { - const obj: any = {}; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - obj.weight = message.weight; - return obj; - }, - fromAmino(object: WeightedVoteOptionAmino): WeightedVoteOption { - return { - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - weight: object.weight - }; - }, - toAmino(message: WeightedVoteOption): WeightedVoteOptionAmino { - const obj: any = {}; - obj.option = message.option; - obj.weight = message.weight; - return obj; - }, - fromAminoMsg(object: WeightedVoteOptionAminoMsg): WeightedVoteOption { - return WeightedVoteOption.fromAmino(object.value); - }, - toAminoMsg(message: WeightedVoteOption): WeightedVoteOptionAminoMsg { - return { - type: "cosmos-sdk/WeightedVoteOption", - value: WeightedVoteOption.toAmino(message) - }; - }, - fromProtoMsg(message: WeightedVoteOptionProtoMsg): WeightedVoteOption { - return WeightedVoteOption.decode(message.value); - }, - toProto(message: WeightedVoteOption): Uint8Array { - return WeightedVoteOption.encode(message).finish(); - }, - toProtoMsg(message: WeightedVoteOption): WeightedVoteOptionProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption", - value: WeightedVoteOption.encode(message).finish() - }; - } -}; -function createBaseTextProposal(): TextProposal { - return { - title: "", - description: "" - }; -} -export const TextProposal = { - typeUrl: "/cosmos.gov.v1beta1.TextProposal", - aminoType: "cosmos-sdk/TextProposal", - encode(message: TextProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TextProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTextProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TextProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "" - }; - }, - toJSON(message: TextProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - fromPartial(object: DeepPartial): TextProposal { - const message = createBaseTextProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - return message; - }, - fromSDK(object: TextProposalSDKType): TextProposal { - return { - title: object?.title, - description: object?.description - }; - }, - toSDK(message: TextProposal): TextProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - return obj; - }, - fromAmino(object: TextProposalAmino): TextProposal { - return { - title: object.title, - description: object.description - }; - }, - toAmino(message: TextProposal): TextProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - return obj; - }, - fromAminoMsg(object: TextProposalAminoMsg): TextProposal { - return TextProposal.fromAmino(object.value); - }, - toAminoMsg(message: TextProposal): TextProposalAminoMsg { - return { - type: "cosmos-sdk/TextProposal", - value: TextProposal.toAmino(message) - }; - }, - fromProtoMsg(message: TextProposalProtoMsg): TextProposal { - return TextProposal.decode(message.value); - }, - toProto(message: TextProposal): Uint8Array { - return TextProposal.encode(message).finish(); - }, - toProtoMsg(message: TextProposal): TextProposalProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.TextProposal", - value: TextProposal.encode(message).finish() - }; - } -}; -function createBaseDeposit(): Deposit { - return { - proposalId: BigInt(0), - depositor: "", - amount: [] - }; -} -export const Deposit = { - typeUrl: "/cosmos.gov.v1beta1.Deposit", - aminoType: "cosmos-sdk/Deposit", - encode(message: Deposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Deposit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeposit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Deposit { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - depositor: isSet(object.depositor) ? String(object.depositor) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Deposit): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Deposit { - const message = createBaseDeposit(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: DepositSDKType): Deposit { - return { - proposalId: object?.proposal_id, - depositor: object?.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Deposit): DepositSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: DepositAmino): Deposit { - return { - proposalId: BigInt(object.proposal_id), - depositor: object.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Deposit): DepositAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: DepositAminoMsg): Deposit { - return Deposit.fromAmino(object.value); - }, - toAminoMsg(message: Deposit): DepositAminoMsg { - return { - type: "cosmos-sdk/Deposit", - value: Deposit.toAmino(message) - }; - }, - fromProtoMsg(message: DepositProtoMsg): Deposit { - return Deposit.decode(message.value); - }, - toProto(message: Deposit): Uint8Array { - return Deposit.encode(message).finish(); - }, - toProtoMsg(message: Deposit): DepositProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.Deposit", - value: Deposit.encode(message).finish() - }; - } -}; -function createBaseProposal(): Proposal { - return { - proposalId: BigInt(0), - content: Any.fromPartial({}), - status: 0, - finalTallyResult: TallyResult.fromPartial({}), - submitTime: new Date(), - depositEndTime: new Date(), - totalDeposit: [], - votingStartTime: new Date(), - votingEndTime: new Date() - }; -} -export const Proposal = { - typeUrl: "/cosmos.gov.v1beta1.Proposal", - aminoType: "cosmos-sdk/Proposal", - encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(18).fork()).ldelim(); - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status); - } - if (message.finalTallyResult !== undefined) { - TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim(); - } - if (message.submitTime !== undefined) { - Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim(); - } - if (message.depositEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim(); - } - for (const v of message.totalDeposit) { - Coin.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.votingStartTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim(); - } - if (message.votingEndTime !== undefined) { - Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.content = Any.decode(reader, reader.uint32()); - break; - case 3: - message.status = (reader.int32() as any); - break; - case 4: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.totalDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 8: - message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 9: - message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Proposal { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - content: isSet(object.content) ? Any.fromJSON(object.content) : undefined, - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - finalTallyResult: isSet(object.finalTallyResult) ? TallyResult.fromJSON(object.finalTallyResult) : undefined, - submitTime: isSet(object.submitTime) ? new Date(object.submitTime) : undefined, - depositEndTime: isSet(object.depositEndTime) ? new Date(object.depositEndTime) : undefined, - totalDeposit: Array.isArray(object?.totalDeposit) ? object.totalDeposit.map((e: any) => Coin.fromJSON(e)) : [], - votingStartTime: isSet(object.votingStartTime) ? new Date(object.votingStartTime) : undefined, - votingEndTime: isSet(object.votingEndTime) ? new Date(object.votingEndTime) : undefined - }; - }, - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.content !== undefined && (obj.content = message.content ? Any.toJSON(message.content) : undefined); - message.status !== undefined && (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && (obj.finalTallyResult = message.finalTallyResult ? TallyResult.toJSON(message.finalTallyResult) : undefined); - message.submitTime !== undefined && (obj.submitTime = message.submitTime.toISOString()); - message.depositEndTime !== undefined && (obj.depositEndTime = message.depositEndTime.toISOString()); - if (message.totalDeposit) { - obj.totalDeposit = message.totalDeposit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.totalDeposit = []; - } - message.votingStartTime !== undefined && (obj.votingStartTime = message.votingStartTime.toISOString()); - message.votingEndTime !== undefined && (obj.votingEndTime = message.votingEndTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): Proposal { - const message = createBaseProposal(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined; - message.status = object.status ?? 0; - message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined; - message.submitTime = object.submitTime ?? undefined; - message.depositEndTime = object.depositEndTime ?? undefined; - message.totalDeposit = object.totalDeposit?.map(e => Coin.fromPartial(e)) || []; - message.votingStartTime = object.votingStartTime ?? undefined; - message.votingEndTime = object.votingEndTime ?? undefined; - return message; - }, - fromSDK(object: ProposalSDKType): Proposal { - return { - proposalId: object?.proposal_id, - content: object.content ? Any.fromSDK(object.content) : undefined, - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - finalTallyResult: object.final_tally_result ? TallyResult.fromSDK(object.final_tally_result) : undefined, - submitTime: object.submit_time ?? undefined, - depositEndTime: object.deposit_end_time ?? undefined, - totalDeposit: Array.isArray(object?.total_deposit) ? object.total_deposit.map((e: any) => Coin.fromSDK(e)) : [], - votingStartTime: object.voting_start_time ?? undefined, - votingEndTime: object.voting_end_time ?? undefined - }; - }, - toSDK(message: Proposal): ProposalSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.content !== undefined && (obj.content = message.content ? Any.toSDK(message.content) : undefined); - message.status !== undefined && (obj.status = proposalStatusToJSON(message.status)); - message.finalTallyResult !== undefined && (obj.final_tally_result = message.finalTallyResult ? TallyResult.toSDK(message.finalTallyResult) : undefined); - message.submitTime !== undefined && (obj.submit_time = message.submitTime ?? undefined); - message.depositEndTime !== undefined && (obj.deposit_end_time = message.depositEndTime ?? undefined); - if (message.totalDeposit) { - obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total_deposit = []; - } - message.votingStartTime !== undefined && (obj.voting_start_time = message.votingStartTime ?? undefined); - message.votingEndTime !== undefined && (obj.voting_end_time = message.votingEndTime ?? undefined); - return obj; - }, - fromAmino(object: ProposalAmino): Proposal { - return { - proposalId: BigInt(object.proposal_id), - content: object?.content ? Any.fromAmino(object.content) : undefined, - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - finalTallyResult: object?.final_tally_result ? TallyResult.fromAmino(object.final_tally_result) : undefined, - submitTime: object.submit_time, - depositEndTime: object.deposit_end_time, - totalDeposit: Array.isArray(object?.total_deposit) ? object.total_deposit.map((e: any) => Coin.fromAmino(e)) : [], - votingStartTime: object.voting_start_time, - votingEndTime: object.voting_end_time - }; - }, - toAmino(message: Proposal): ProposalAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.content = message.content ? Any.toAmino(message.content) : undefined; - obj.status = message.status; - obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : undefined; - obj.submit_time = message.submitTime; - obj.deposit_end_time = message.depositEndTime; - if (message.totalDeposit) { - obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total_deposit = []; - } - obj.voting_start_time = message.votingStartTime; - obj.voting_end_time = message.votingEndTime; - return obj; - }, - fromAminoMsg(object: ProposalAminoMsg): Proposal { - return Proposal.fromAmino(object.value); - }, - toAminoMsg(message: Proposal): ProposalAminoMsg { - return { - type: "cosmos-sdk/Proposal", - value: Proposal.toAmino(message) - }; - }, - fromProtoMsg(message: ProposalProtoMsg): Proposal { - return Proposal.decode(message.value); - }, - toProto(message: Proposal): Uint8Array { - return Proposal.encode(message).finish(); - }, - toProtoMsg(message: Proposal): ProposalProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.Proposal", - value: Proposal.encode(message).finish() - }; - } -}; -function createBaseTallyResult(): TallyResult { - return { - yes: "", - abstain: "", - no: "", - noWithVeto: "" - }; -} -export const TallyResult = { - typeUrl: "/cosmos.gov.v1beta1.TallyResult", - aminoType: "cosmos-sdk/TallyResult", - encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.yes !== "") { - writer.uint32(10).string(message.yes); - } - if (message.abstain !== "") { - writer.uint32(18).string(message.abstain); - } - if (message.no !== "") { - writer.uint32(26).string(message.no); - } - if (message.noWithVeto !== "") { - writer.uint32(34).string(message.noWithVeto); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TallyResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTallyResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes = reader.string(); - break; - case 2: - message.abstain = reader.string(); - break; - case 3: - message.no = reader.string(); - break; - case 4: - message.noWithVeto = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TallyResult { - return { - yes: isSet(object.yes) ? String(object.yes) : "", - abstain: isSet(object.abstain) ? String(object.abstain) : "", - no: isSet(object.no) ? String(object.no) : "", - noWithVeto: isSet(object.noWithVeto) ? String(object.noWithVeto) : "" - }; - }, - toJSON(message: TallyResult): unknown { - const obj: any = {}; - message.yes !== undefined && (obj.yes = message.yes); - message.abstain !== undefined && (obj.abstain = message.abstain); - message.no !== undefined && (obj.no = message.no); - message.noWithVeto !== undefined && (obj.noWithVeto = message.noWithVeto); - return obj; - }, - fromPartial(object: DeepPartial): TallyResult { - const message = createBaseTallyResult(); - message.yes = object.yes ?? ""; - message.abstain = object.abstain ?? ""; - message.no = object.no ?? ""; - message.noWithVeto = object.noWithVeto ?? ""; - return message; - }, - fromSDK(object: TallyResultSDKType): TallyResult { - return { - yes: object?.yes, - abstain: object?.abstain, - no: object?.no, - noWithVeto: object?.no_with_veto - }; - }, - toSDK(message: TallyResult): TallyResultSDKType { - const obj: any = {}; - obj.yes = message.yes; - obj.abstain = message.abstain; - obj.no = message.no; - obj.no_with_veto = message.noWithVeto; - return obj; - }, - fromAmino(object: TallyResultAmino): TallyResult { - return { - yes: object.yes, - abstain: object.abstain, - no: object.no, - noWithVeto: object.no_with_veto - }; - }, - toAmino(message: TallyResult): TallyResultAmino { - const obj: any = {}; - obj.yes = message.yes; - obj.abstain = message.abstain; - obj.no = message.no; - obj.no_with_veto = message.noWithVeto; - return obj; - }, - fromAminoMsg(object: TallyResultAminoMsg): TallyResult { - return TallyResult.fromAmino(object.value); - }, - toAminoMsg(message: TallyResult): TallyResultAminoMsg { - return { - type: "cosmos-sdk/TallyResult", - value: TallyResult.toAmino(message) - }; - }, - fromProtoMsg(message: TallyResultProtoMsg): TallyResult { - return TallyResult.decode(message.value); - }, - toProto(message: TallyResult): Uint8Array { - return TallyResult.encode(message).finish(); - }, - toProtoMsg(message: TallyResult): TallyResultProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.TallyResult", - value: TallyResult.encode(message).finish() - }; - } -}; -function createBaseVote(): Vote { - return { - proposalId: BigInt(0), - voter: "", - option: 0, - options: [] - }; -} -export const Vote = { - typeUrl: "/cosmos.gov.v1beta1.Vote", - aminoType: "cosmos-sdk/Vote", - encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - for (const v of message.options) { - WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Vote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Vote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) : [] - }; - }, - toJSON(message: Vote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toJSON(e) : undefined); - } else { - obj.options = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Vote { - const message = createBaseVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: VoteSDKType): Vote { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromSDK(e)) : [] - }; - }, - toSDK(message: Vote): VoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toSDK(e) : undefined); - } else { - obj.options = []; - } - return obj; - }, - fromAmino(object: VoteAmino): Vote { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromAmino(e)) : [] - }; - }, - toAmino(message: Vote): VoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - obj.option = message.option; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); - } else { - obj.options = []; - } - return obj; - }, - fromAminoMsg(object: VoteAminoMsg): Vote { - return Vote.fromAmino(object.value); - }, - toAminoMsg(message: Vote): VoteAminoMsg { - return { - type: "cosmos-sdk/Vote", - value: Vote.toAmino(message) - }; - }, - fromProtoMsg(message: VoteProtoMsg): Vote { - return Vote.decode(message.value); - }, - toProto(message: Vote): Uint8Array { - return Vote.encode(message).finish(); - }, - toProtoMsg(message: Vote): VoteProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.Vote", - value: Vote.encode(message).finish() - }; - } -}; -function createBaseDepositParams(): DepositParams { - return { - minDeposit: [], - maxDepositPeriod: Duration.fromPartial({}) - }; -} -export const DepositParams = { - typeUrl: "/cosmos.gov.v1beta1.DepositParams", - aminoType: "cosmos-sdk/DepositParams", - encode(message: DepositParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.minDeposit) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.maxDepositPeriod !== undefined) { - Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DepositParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDepositParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.maxDepositPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DepositParams { - return { - minDeposit: Array.isArray(object?.minDeposit) ? object.minDeposit.map((e: any) => Coin.fromJSON(e)) : [], - maxDepositPeriod: isSet(object.maxDepositPeriod) ? Duration.fromJSON(object.maxDepositPeriod) : undefined - }; - }, - toJSON(message: DepositParams): unknown { - const obj: any = {}; - if (message.minDeposit) { - obj.minDeposit = message.minDeposit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.minDeposit = []; - } - message.maxDepositPeriod !== undefined && (obj.maxDepositPeriod = message.maxDepositPeriod ? Duration.toJSON(message.maxDepositPeriod) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DepositParams { - const message = createBaseDepositParams(); - message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || []; - message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined; - return message; - }, - fromSDK(object: DepositParamsSDKType): DepositParams { - return { - minDeposit: Array.isArray(object?.min_deposit) ? object.min_deposit.map((e: any) => Coin.fromSDK(e)) : [], - maxDepositPeriod: object.max_deposit_period ? Duration.fromSDK(object.max_deposit_period) : undefined - }; - }, - toSDK(message: DepositParams): DepositParamsSDKType { - const obj: any = {}; - if (message.minDeposit) { - obj.min_deposit = message.minDeposit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.min_deposit = []; - } - message.maxDepositPeriod !== undefined && (obj.max_deposit_period = message.maxDepositPeriod ? Duration.toSDK(message.maxDepositPeriod) : undefined); - return obj; - }, - fromAmino(object: DepositParamsAmino): DepositParams { - return { - minDeposit: Array.isArray(object?.min_deposit) ? object.min_deposit.map((e: any) => Coin.fromAmino(e)) : [], - maxDepositPeriod: object?.max_deposit_period ? Duration.fromAmino(object.max_deposit_period) : undefined - }; - }, - toAmino(message: DepositParams): DepositParamsAmino { - const obj: any = {}; - if (message.minDeposit) { - obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.min_deposit = []; - } - obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined; - return obj; - }, - fromAminoMsg(object: DepositParamsAminoMsg): DepositParams { - return DepositParams.fromAmino(object.value); - }, - toAminoMsg(message: DepositParams): DepositParamsAminoMsg { - return { - type: "cosmos-sdk/DepositParams", - value: DepositParams.toAmino(message) - }; - }, - fromProtoMsg(message: DepositParamsProtoMsg): DepositParams { - return DepositParams.decode(message.value); - }, - toProto(message: DepositParams): Uint8Array { - return DepositParams.encode(message).finish(); - }, - toProtoMsg(message: DepositParams): DepositParamsProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.DepositParams", - value: DepositParams.encode(message).finish() - }; - } -}; -function createBaseVotingParams(): VotingParams { - return { - votingPeriod: Duration.fromPartial({}) - }; -} -export const VotingParams = { - typeUrl: "/cosmos.gov.v1beta1.VotingParams", - aminoType: "cosmos-sdk/VotingParams", - encode(message: VotingParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.votingPeriod !== undefined) { - Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VotingParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVotingParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): VotingParams { - return { - votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined - }; - }, - toJSON(message: VotingParams): unknown { - const obj: any = {}; - message.votingPeriod !== undefined && (obj.votingPeriod = message.votingPeriod ? Duration.toJSON(message.votingPeriod) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): VotingParams { - const message = createBaseVotingParams(); - message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined; - return message; - }, - fromSDK(object: VotingParamsSDKType): VotingParams { - return { - votingPeriod: object.voting_period ? Duration.fromSDK(object.voting_period) : undefined - }; - }, - toSDK(message: VotingParams): VotingParamsSDKType { - const obj: any = {}; - message.votingPeriod !== undefined && (obj.voting_period = message.votingPeriod ? Duration.toSDK(message.votingPeriod) : undefined); - return obj; - }, - fromAmino(object: VotingParamsAmino): VotingParams { - return { - votingPeriod: object?.voting_period ? Duration.fromAmino(object.voting_period) : undefined - }; - }, - toAmino(message: VotingParams): VotingParamsAmino { - const obj: any = {}; - obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined; - return obj; - }, - fromAminoMsg(object: VotingParamsAminoMsg): VotingParams { - return VotingParams.fromAmino(object.value); - }, - toAminoMsg(message: VotingParams): VotingParamsAminoMsg { - return { - type: "cosmos-sdk/VotingParams", - value: VotingParams.toAmino(message) - }; - }, - fromProtoMsg(message: VotingParamsProtoMsg): VotingParams { - return VotingParams.decode(message.value); - }, - toProto(message: VotingParams): Uint8Array { - return VotingParams.encode(message).finish(); - }, - toProtoMsg(message: VotingParams): VotingParamsProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.VotingParams", - value: VotingParams.encode(message).finish() - }; - } -}; -function createBaseTallyParams(): TallyParams { - return { - quorum: new Uint8Array(), - threshold: new Uint8Array(), - vetoThreshold: new Uint8Array() - }; -} -export const TallyParams = { - typeUrl: "/cosmos.gov.v1beta1.TallyParams", - aminoType: "cosmos-sdk/TallyParams", - encode(message: TallyParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.quorum.length !== 0) { - writer.uint32(10).bytes(message.quorum); - } - if (message.threshold.length !== 0) { - writer.uint32(18).bytes(message.threshold); - } - if (message.vetoThreshold.length !== 0) { - writer.uint32(26).bytes(message.vetoThreshold); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TallyParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTallyParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.vetoThreshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TallyParams { - return { - quorum: isSet(object.quorum) ? bytesFromBase64(object.quorum) : new Uint8Array(), - threshold: isSet(object.threshold) ? bytesFromBase64(object.threshold) : new Uint8Array(), - vetoThreshold: isSet(object.vetoThreshold) ? bytesFromBase64(object.vetoThreshold) : new Uint8Array() - }; - }, - toJSON(message: TallyParams): unknown { - const obj: any = {}; - message.quorum !== undefined && (obj.quorum = base64FromBytes(message.quorum !== undefined ? message.quorum : new Uint8Array())); - message.threshold !== undefined && (obj.threshold = base64FromBytes(message.threshold !== undefined ? message.threshold : new Uint8Array())); - message.vetoThreshold !== undefined && (obj.vetoThreshold = base64FromBytes(message.vetoThreshold !== undefined ? message.vetoThreshold : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): TallyParams { - const message = createBaseTallyParams(); - message.quorum = object.quorum ?? new Uint8Array(); - message.threshold = object.threshold ?? new Uint8Array(); - message.vetoThreshold = object.vetoThreshold ?? new Uint8Array(); - return message; - }, - fromSDK(object: TallyParamsSDKType): TallyParams { - return { - quorum: object?.quorum, - threshold: object?.threshold, - vetoThreshold: object?.veto_threshold - }; - }, - toSDK(message: TallyParams): TallyParamsSDKType { - const obj: any = {}; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; - return obj; - }, - fromAmino(object: TallyParamsAmino): TallyParams { - return { - quorum: object.quorum, - threshold: object.threshold, - vetoThreshold: object.veto_threshold - }; - }, - toAmino(message: TallyParams): TallyParamsAmino { - const obj: any = {}; - obj.quorum = message.quorum; - obj.threshold = message.threshold; - obj.veto_threshold = message.vetoThreshold; - return obj; - }, - fromAminoMsg(object: TallyParamsAminoMsg): TallyParams { - return TallyParams.fromAmino(object.value); - }, - toAminoMsg(message: TallyParams): TallyParamsAminoMsg { - return { - type: "cosmos-sdk/TallyParams", - value: TallyParams.toAmino(message) - }; - }, - fromProtoMsg(message: TallyParamsProtoMsg): TallyParams { - return TallyParams.decode(message.value); - }, - toProto(message: TallyParams): Uint8Array { - return TallyParams.encode(message).finish(); - }, - toProtoMsg(message: TallyParams): TallyParamsProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.TallyParams", - value: TallyParams.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 17f6cd32..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,290 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryProposalRequest, QueryProposalResponse, QueryProposalsRequest, QueryProposalsResponse, QueryVoteRequest, QueryVoteResponse, QueryVotesRequest, QueryVotesResponse, QueryParamsRequest, QueryParamsResponse, QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, QueryDepositsResponse, QueryTallyResultRequest, QueryTallyResultResponse } from "./query"; -/** Query defines the gRPC querier service for gov module */ -export interface Query { - /** Proposal queries proposal details based on ProposalID. */ - proposal(request: QueryProposalRequest): Promise; - /** Proposals queries all proposals based on given status. */ - proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ - vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ - votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ - params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ - deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ - deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ - tallyResult(request: QueryTallyResultRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.proposal = this.proposal.bind(this); - this.proposals = this.proposals.bind(this); - this.vote = this.vote.bind(this); - this.votes = this.votes.bind(this); - this.params = this.params.bind(this); - this.deposit = this.deposit.bind(this); - this.deposits = this.deposits.bind(this); - this.tallyResult = this.tallyResult.bind(this); - } - proposal(request: QueryProposalRequest): Promise { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposal", data); - return promise.then(data => QueryProposalResponse.decode(new BinaryReader(data))); - } - proposals(request: QueryProposalsRequest): Promise { - const data = QueryProposalsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposals", data); - return promise.then(data => QueryProposalsResponse.decode(new BinaryReader(data))); - } - vote(request: QueryVoteRequest): Promise { - const data = QueryVoteRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data); - return promise.then(data => QueryVoteResponse.decode(new BinaryReader(data))); - } - votes(request: QueryVotesRequest): Promise { - const data = QueryVotesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data); - return promise.then(data => QueryVotesResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - deposit(request: QueryDepositRequest): Promise { - const data = QueryDepositRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposit", data); - return promise.then(data => QueryDepositResponse.decode(new BinaryReader(data))); - } - deposits(request: QueryDepositsRequest): Promise { - const data = QueryDepositsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposits", data); - return promise.then(data => QueryDepositsResponse.decode(new BinaryReader(data))); - } - tallyResult(request: QueryTallyResultRequest): Promise { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "TallyResult", data); - return promise.then(data => QueryTallyResultResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - proposal(request: QueryProposalRequest): Promise { - return queryService.proposal(request); - }, - proposals(request: QueryProposalsRequest): Promise { - return queryService.proposals(request); - }, - vote(request: QueryVoteRequest): Promise { - return queryService.vote(request); - }, - votes(request: QueryVotesRequest): Promise { - return queryService.votes(request); - }, - params(request: QueryParamsRequest): Promise { - return queryService.params(request); - }, - deposit(request: QueryDepositRequest): Promise { - return queryService.deposit(request); - }, - deposits(request: QueryDepositsRequest): Promise { - return queryService.deposits(request); - }, - tallyResult(request: QueryTallyResultRequest): Promise { - return queryService.tallyResult(request); - } - }; -}; -export interface UseProposalQuery extends ReactQueryParams { - request: QueryProposalRequest; -} -export interface UseProposalsQuery extends ReactQueryParams { - request: QueryProposalsRequest; -} -export interface UseVoteQuery extends ReactQueryParams { - request: QueryVoteRequest; -} -export interface UseVotesQuery extends ReactQueryParams { - request: QueryVotesRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request: QueryParamsRequest; -} -export interface UseDepositQuery extends ReactQueryParams { - request: QueryDepositRequest; -} -export interface UseDepositsQuery extends ReactQueryParams { - request: QueryDepositsRequest; -} -export interface UseTallyResultQuery extends ReactQueryParams { - request: QueryTallyResultRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useProposal = ({ - request, - options - }: UseProposalQuery) => { - return useQuery(["proposalQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.proposal(request); - }, options); - }; - const useProposals = ({ - request, - options - }: UseProposalsQuery) => { - return useQuery(["proposalsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.proposals(request); - }, options); - }; - const useVote = ({ - request, - options - }: UseVoteQuery) => { - return useQuery(["voteQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.vote(request); - }, options); - }; - const useVotes = ({ - request, - options - }: UseVotesQuery) => { - return useQuery(["votesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.votes(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useDeposit = ({ - request, - options - }: UseDepositQuery) => { - return useQuery(["depositQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.deposit(request); - }, options); - }; - const useDeposits = ({ - request, - options - }: UseDepositsQuery) => { - return useQuery(["depositsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.deposits(request); - }, options); - }; - const useTallyResult = ({ - request, - options - }: UseTallyResultQuery) => { - return useQuery(["tallyResultQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.tallyResult(request); - }, options); - }; - return { - /** Proposal queries proposal details based on ProposalID. */useProposal, - /** Proposals queries all proposals based on given status. */useProposals, - /** Vote queries voted information based on proposalID, voterAddr. */useVote, - /** Votes queries votes of a given proposal. */useVotes, - /** Params queries all parameters of the gov module. */useParams, - /** Deposit queries single deposit information based proposalID, depositAddr. */useDeposit, - /** Deposits queries all deposits of a single proposal. */useDeposits, - /** TallyResult queries the tally of a proposal vote. */useTallyResult - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryProposalStore { - store = new QueryStore(queryService?.proposal); - proposal(request: QueryProposalRequest) { - return this.store.getData(request); - } - } - class QueryProposalsStore { - store = new QueryStore(queryService?.proposals); - proposals(request: QueryProposalsRequest) { - return this.store.getData(request); - } - } - class QueryVoteStore { - store = new QueryStore(queryService?.vote); - vote(request: QueryVoteRequest) { - return this.store.getData(request); - } - } - class QueryVotesStore { - store = new QueryStore(queryService?.votes); - votes(request: QueryVotesRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryDepositStore { - store = new QueryStore(queryService?.deposit); - deposit(request: QueryDepositRequest) { - return this.store.getData(request); - } - } - class QueryDepositsStore { - store = new QueryStore(queryService?.deposits); - deposits(request: QueryDepositsRequest) { - return this.store.getData(request); - } - } - class QueryTallyResultStore { - store = new QueryStore(queryService?.tallyResult); - tallyResult(request: QueryTallyResultRequest) { - return this.store.getData(request); - } - } - return { - /** Proposal queries proposal details based on ProposalID. */QueryProposalStore, - /** Proposals queries all proposals based on given status. */QueryProposalsStore, - /** Vote queries voted information based on proposalID, voterAddr. */QueryVoteStore, - /** Votes queries votes of a given proposal. */QueryVotesStore, - /** Params queries all parameters of the gov module. */QueryParamsStore, - /** Deposit queries single deposit information based proposalID, depositAddr. */QueryDepositStore, - /** Deposits queries all deposits of a single proposal. */QueryDepositsStore, - /** TallyResult queries the tally of a proposal vote. */QueryTallyResultStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/query.ts deleted file mode 100644 index f560158e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/query.ts +++ /dev/null @@ -1,2037 +0,0 @@ -import { ProposalStatus, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, VotingParams, VotingParamsAmino, VotingParamsSDKType, DepositParams, DepositParamsAmino, DepositParamsSDKType, TallyParams, TallyParamsAmino, TallyParamsSDKType, Deposit, DepositAmino, DepositSDKType, TallyResult, TallyResultAmino, TallyResultSDKType, proposalStatusFromJSON, proposalStatusToJSON } from "./gov"; -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; -} -export interface QueryProposalRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest"; - value: Uint8Array; -} -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; -} -export interface QueryProposalRequestAminoMsg { - type: "cosmos-sdk/QueryProposalRequest"; - value: QueryProposalRequestAmino; -} -/** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ -export interface QueryProposalRequestSDKType { - proposal_id: bigint; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponse { - proposal: Proposal | undefined; -} -export interface QueryProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse"; - value: Uint8Array; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponseAmino { - proposal?: ProposalAmino | undefined; -} -export interface QueryProposalResponseAminoMsg { - type: "cosmos-sdk/QueryProposalResponse"; - value: QueryProposalResponseAmino; -} -/** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ -export interface QueryProposalResponseSDKType { - proposal: ProposalSDKType | undefined; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequest { - /** proposal_status defines the status of the proposals. */ - proposalStatus: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryProposalsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest"; - value: Uint8Array; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequestAmino { - /** proposal_status defines the status of the proposals. */ - proposal_status: ProposalStatus; - /** voter defines the voter address for the proposals. */ - voter: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryProposalsRequestAminoMsg { - type: "cosmos-sdk/QueryProposalsRequest"; - value: QueryProposalsRequestAmino; -} -/** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ -export interface QueryProposalsRequestSDKType { - proposal_status: ProposalStatus; - voter: string; - depositor: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponse { - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryProposalsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse"; - value: Uint8Array; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponseAmino { - proposals: ProposalAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryProposalsResponseAminoMsg { - type: "cosmos-sdk/QueryProposalsResponse"; - value: QueryProposalsResponseAmino; -} -/** - * QueryProposalsResponse is the response type for the Query/Proposals RPC - * method. - */ -export interface QueryProposalsResponseSDKType { - proposals: ProposalSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** voter defines the oter address for the proposals. */ - voter: string; -} -export interface QueryVoteRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest"; - value: Uint8Array; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** voter defines the oter address for the proposals. */ - voter: string; -} -export interface QueryVoteRequestAminoMsg { - type: "cosmos-sdk/QueryVoteRequest"; - value: QueryVoteRequestAmino; -} -/** QueryVoteRequest is the request type for the Query/Vote RPC method. */ -export interface QueryVoteRequestSDKType { - proposal_id: bigint; - voter: string; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponse { - /** vote defined the queried vote. */ - vote: Vote | undefined; -} -export interface QueryVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse"; - value: Uint8Array; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponseAmino { - /** vote defined the queried vote. */ - vote?: VoteAmino | undefined; -} -export interface QueryVoteResponseAminoMsg { - type: "cosmos-sdk/QueryVoteResponse"; - value: QueryVoteResponseAmino; -} -/** QueryVoteResponse is the response type for the Query/Vote RPC method. */ -export interface QueryVoteResponseSDKType { - vote: VoteSDKType | undefined; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryVotesRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest"; - value: Uint8Array; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryVotesRequestAminoMsg { - type: "cosmos-sdk/QueryVotesRequest"; - value: QueryVotesRequestAmino; -} -/** QueryVotesRequest is the request type for the Query/Votes RPC method. */ -export interface QueryVotesRequestSDKType { - proposal_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponse { - /** votes defined the queried votes. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryVotesResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse"; - value: Uint8Array; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponseAmino { - /** votes defined the queried votes. */ - votes: VoteAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryVotesResponseAminoMsg { - type: "cosmos-sdk/QueryVotesResponse"; - value: QueryVotesResponseAmino; -} -/** QueryVotesResponse is the response type for the Query/Votes RPC method. */ -export interface QueryVotesResponseSDKType { - votes: VoteSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - paramsType: string; -} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino { - /** - * params_type defines which parameters to query for, can be one of "voting", - * "tallying" or "deposit". - */ - params_type: string; -} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType { - params_type: string; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** voting_params defines the parameters related to voting. */ - votingParams: VotingParams | undefined; - /** deposit_params defines the parameters related to deposit. */ - depositParams: DepositParams | undefined; - /** tally_params defines the parameters related to tally. */ - tallyParams: TallyParams | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** voting_params defines the parameters related to voting. */ - voting_params?: VotingParamsAmino | undefined; - /** deposit_params defines the parameters related to deposit. */ - deposit_params?: DepositParamsAmino | undefined; - /** tally_params defines the parameters related to tally. */ - tally_params?: TallyParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - voting_params: VotingParamsSDKType | undefined; - deposit_params: DepositParamsSDKType | undefined; - tally_params: TallyParamsSDKType | undefined; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} -export interface QueryDepositRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest"; - value: Uint8Array; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** depositor defines the deposit addresses from the proposals. */ - depositor: string; -} -export interface QueryDepositRequestAminoMsg { - type: "cosmos-sdk/QueryDepositRequest"; - value: QueryDepositRequestAmino; -} -/** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ -export interface QueryDepositRequestSDKType { - proposal_id: bigint; - depositor: string; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponse { - /** deposit defines the requested deposit. */ - deposit: Deposit | undefined; -} -export interface QueryDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse"; - value: Uint8Array; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponseAmino { - /** deposit defines the requested deposit. */ - deposit?: DepositAmino | undefined; -} -export interface QueryDepositResponseAminoMsg { - type: "cosmos-sdk/QueryDepositResponse"; - value: QueryDepositResponseAmino; -} -/** QueryDepositResponse is the response type for the Query/Deposit RPC method. */ -export interface QueryDepositResponseSDKType { - deposit: DepositSDKType | undefined; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDepositsRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest"; - value: Uint8Array; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDepositsRequestAminoMsg { - type: "cosmos-sdk/QueryDepositsRequest"; - value: QueryDepositsRequestAmino; -} -/** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ -export interface QueryDepositsRequestSDKType { - proposal_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponse { - deposits: Deposit[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDepositsResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse"; - value: Uint8Array; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponseAmino { - deposits: DepositAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDepositsResponseAminoMsg { - type: "cosmos-sdk/QueryDepositsResponse"; - value: QueryDepositsResponseAmino; -} -/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */ -export interface QueryDepositsResponseSDKType { - deposits: DepositSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequest { - /** proposal_id defines the unique id of the proposal. */ - proposalId: bigint; -} -export interface QueryTallyResultRequestProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest"; - value: Uint8Array; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequestAmino { - /** proposal_id defines the unique id of the proposal. */ - proposal_id: string; -} -export interface QueryTallyResultRequestAminoMsg { - type: "cosmos-sdk/QueryTallyResultRequest"; - value: QueryTallyResultRequestAmino; -} -/** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ -export interface QueryTallyResultRequestSDKType { - proposal_id: bigint; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} -export interface QueryTallyResultResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse"; - value: Uint8Array; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponseAmino { - /** tally defines the requested tally. */ - tally?: TallyResultAmino | undefined; -} -export interface QueryTallyResultResponseAminoMsg { - type: "cosmos-sdk/QueryTallyResultResponse"; - value: QueryTallyResultResponseAmino; -} -/** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ -export interface QueryTallyResultResponseSDKType { - tally: TallyResultSDKType | undefined; -} -function createBaseQueryProposalRequest(): QueryProposalRequest { - return { - proposalId: BigInt(0) - }; -} -export const QueryProposalRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", - aminoType: "cosmos-sdk/QueryProposalRequest", - encode(message: QueryProposalRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryProposalRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalRequest { - const message = createBaseQueryProposalRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryProposalRequestSDKType): QueryProposalRequest { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: QueryProposalRequest): QueryProposalRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: QueryProposalRequestAmino): QueryProposalRequest { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: QueryProposalRequest): QueryProposalRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalRequestAminoMsg): QueryProposalRequest { - return QueryProposalRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalRequest): QueryProposalRequestAminoMsg { - return { - type: "cosmos-sdk/QueryProposalRequest", - value: QueryProposalRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalRequestProtoMsg): QueryProposalRequest { - return QueryProposalRequest.decode(message.value); - }, - toProto(message: QueryProposalRequest): Uint8Array { - return QueryProposalRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalRequest): QueryProposalRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalRequest", - value: QueryProposalRequest.encode(message).finish() - }; - } -}; -function createBaseQueryProposalResponse(): QueryProposalResponse { - return { - proposal: Proposal.fromPartial({}) - }; -} -export const QueryProposalResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", - aminoType: "cosmos-sdk/QueryProposalResponse", - encode(message: QueryProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalResponse { - return { - proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined - }; - }, - toJSON(message: QueryProposalResponse): unknown { - const obj: any = {}; - message.proposal !== undefined && (obj.proposal = message.proposal ? Proposal.toJSON(message.proposal) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalResponse { - const message = createBaseQueryProposalResponse(); - message.proposal = object.proposal !== undefined && object.proposal !== null ? Proposal.fromPartial(object.proposal) : undefined; - return message; - }, - fromSDK(object: QueryProposalResponseSDKType): QueryProposalResponse { - return { - proposal: object.proposal ? Proposal.fromSDK(object.proposal) : undefined - }; - }, - toSDK(message: QueryProposalResponse): QueryProposalResponseSDKType { - const obj: any = {}; - message.proposal !== undefined && (obj.proposal = message.proposal ? Proposal.toSDK(message.proposal) : undefined); - return obj; - }, - fromAmino(object: QueryProposalResponseAmino): QueryProposalResponse { - return { - proposal: object?.proposal ? Proposal.fromAmino(object.proposal) : undefined - }; - }, - toAmino(message: QueryProposalResponse): QueryProposalResponseAmino { - const obj: any = {}; - obj.proposal = message.proposal ? Proposal.toAmino(message.proposal) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalResponseAminoMsg): QueryProposalResponse { - return QueryProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalResponse): QueryProposalResponseAminoMsg { - return { - type: "cosmos-sdk/QueryProposalResponse", - value: QueryProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalResponseProtoMsg): QueryProposalResponse { - return QueryProposalResponse.decode(message.value); - }, - toProto(message: QueryProposalResponse): Uint8Array { - return QueryProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalResponse): QueryProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalResponse", - value: QueryProposalResponse.encode(message).finish() - }; - } -}; -function createBaseQueryProposalsRequest(): QueryProposalsRequest { - return { - proposalStatus: 0, - voter: "", - depositor: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryProposalsRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", - aminoType: "cosmos-sdk/QueryProposalsRequest", - encode(message: QueryProposalsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalStatus !== 0) { - writer.uint32(8).int32(message.proposalStatus); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.depositor !== "") { - writer.uint32(26).string(message.depositor); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalStatus = (reader.int32() as any); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.depositor = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalsRequest { - return { - proposalStatus: isSet(object.proposalStatus) ? proposalStatusFromJSON(object.proposalStatus) : -1, - voter: isSet(object.voter) ? String(object.voter) : "", - depositor: isSet(object.depositor) ? String(object.depositor) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryProposalsRequest): unknown { - const obj: any = {}; - message.proposalStatus !== undefined && (obj.proposalStatus = proposalStatusToJSON(message.proposalStatus)); - message.voter !== undefined && (obj.voter = message.voter); - message.depositor !== undefined && (obj.depositor = message.depositor); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalsRequest { - const message = createBaseQueryProposalsRequest(); - message.proposalStatus = object.proposalStatus ?? 0; - message.voter = object.voter ?? ""; - message.depositor = object.depositor ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryProposalsRequestSDKType): QueryProposalsRequest { - return { - proposalStatus: isSet(object.proposal_status) ? proposalStatusFromJSON(object.proposal_status) : -1, - voter: object?.voter, - depositor: object?.depositor, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryProposalsRequest): QueryProposalsRequestSDKType { - const obj: any = {}; - message.proposalStatus !== undefined && (obj.proposal_status = proposalStatusToJSON(message.proposalStatus)); - obj.voter = message.voter; - obj.depositor = message.depositor; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryProposalsRequestAmino): QueryProposalsRequest { - return { - proposalStatus: isSet(object.proposal_status) ? proposalStatusFromJSON(object.proposal_status) : -1, - voter: object.voter, - depositor: object.depositor, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryProposalsRequest): QueryProposalsRequestAmino { - const obj: any = {}; - obj.proposal_status = message.proposalStatus; - obj.voter = message.voter; - obj.depositor = message.depositor; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalsRequestAminoMsg): QueryProposalsRequest { - return QueryProposalsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalsRequest): QueryProposalsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryProposalsRequest", - value: QueryProposalsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalsRequestProtoMsg): QueryProposalsRequest { - return QueryProposalsRequest.decode(message.value); - }, - toProto(message: QueryProposalsRequest): Uint8Array { - return QueryProposalsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalsRequest): QueryProposalsRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsRequest", - value: QueryProposalsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryProposalsResponse(): QueryProposalsResponse { - return { - proposals: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryProposalsResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", - aminoType: "cosmos-sdk/QueryProposalsResponse", - encode(message: QueryProposalsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalsResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryProposalsResponse): unknown { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toJSON(e) : undefined); - } else { - obj.proposals = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalsResponse { - const message = createBaseQueryProposalsResponse(); - message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryProposalsResponseSDKType): QueryProposalsResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryProposalsResponse): QueryProposalsResponseSDKType { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toSDK(e) : undefined); - } else { - obj.proposals = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryProposalsResponseAmino): QueryProposalsResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryProposalsResponse): QueryProposalsResponseAmino { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined); - } else { - obj.proposals = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalsResponseAminoMsg): QueryProposalsResponse { - return QueryProposalsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalsResponse): QueryProposalsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryProposalsResponse", - value: QueryProposalsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalsResponseProtoMsg): QueryProposalsResponse { - return QueryProposalsResponse.decode(message.value); - }, - toProto(message: QueryProposalsResponse): Uint8Array { - return QueryProposalsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalsResponse): QueryProposalsResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryProposalsResponse", - value: QueryProposalsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVoteRequest(): QueryVoteRequest { - return { - proposalId: BigInt(0), - voter: "" - }; -} -export const QueryVoteRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", - aminoType: "cosmos-sdk/QueryVoteRequest", - encode(message: QueryVoteRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVoteRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "" - }; - }, - toJSON(message: QueryVoteRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - fromPartial(object: DeepPartial): QueryVoteRequest { - const message = createBaseQueryVoteRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - return message; - }, - fromSDK(object: QueryVoteRequestSDKType): QueryVoteRequest { - return { - proposalId: object?.proposal_id, - voter: object?.voter - }; - }, - toSDK(message: QueryVoteRequest): QueryVoteRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - return obj; - }, - fromAmino(object: QueryVoteRequestAmino): QueryVoteRequest { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter - }; - }, - toAmino(message: QueryVoteRequest): QueryVoteRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - return obj; - }, - fromAminoMsg(object: QueryVoteRequestAminoMsg): QueryVoteRequest { - return QueryVoteRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVoteRequest): QueryVoteRequestAminoMsg { - return { - type: "cosmos-sdk/QueryVoteRequest", - value: QueryVoteRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVoteRequestProtoMsg): QueryVoteRequest { - return QueryVoteRequest.decode(message.value); - }, - toProto(message: QueryVoteRequest): Uint8Array { - return QueryVoteRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVoteRequest): QueryVoteRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteRequest", - value: QueryVoteRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVoteResponse(): QueryVoteResponse { - return { - vote: Vote.fromPartial({}) - }; -} -export const QueryVoteResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", - aminoType: "cosmos-sdk/QueryVoteResponse", - encode(message: QueryVoteResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVoteResponse { - return { - vote: isSet(object.vote) ? Vote.fromJSON(object.vote) : undefined - }; - }, - toJSON(message: QueryVoteResponse): unknown { - const obj: any = {}; - message.vote !== undefined && (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVoteResponse { - const message = createBaseQueryVoteResponse(); - message.vote = object.vote !== undefined && object.vote !== null ? Vote.fromPartial(object.vote) : undefined; - return message; - }, - fromSDK(object: QueryVoteResponseSDKType): QueryVoteResponse { - return { - vote: object.vote ? Vote.fromSDK(object.vote) : undefined - }; - }, - toSDK(message: QueryVoteResponse): QueryVoteResponseSDKType { - const obj: any = {}; - message.vote !== undefined && (obj.vote = message.vote ? Vote.toSDK(message.vote) : undefined); - return obj; - }, - fromAmino(object: QueryVoteResponseAmino): QueryVoteResponse { - return { - vote: object?.vote ? Vote.fromAmino(object.vote) : undefined - }; - }, - toAmino(message: QueryVoteResponse): QueryVoteResponseAmino { - const obj: any = {}; - obj.vote = message.vote ? Vote.toAmino(message.vote) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVoteResponseAminoMsg): QueryVoteResponse { - return QueryVoteResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVoteResponse): QueryVoteResponseAminoMsg { - return { - type: "cosmos-sdk/QueryVoteResponse", - value: QueryVoteResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVoteResponseProtoMsg): QueryVoteResponse { - return QueryVoteResponse.decode(message.value); - }, - toProto(message: QueryVoteResponse): Uint8Array { - return QueryVoteResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVoteResponse): QueryVoteResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryVoteResponse", - value: QueryVoteResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVotesRequest(): QueryVotesRequest { - return { - proposalId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryVotesRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", - aminoType: "cosmos-sdk/QueryVotesRequest", - encode(message: QueryVotesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesRequest { - const message = createBaseQueryVotesRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesRequestSDKType): QueryVotesRequest { - return { - proposalId: object?.proposal_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesRequest): QueryVotesRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesRequestAmino): QueryVotesRequest { - return { - proposalId: BigInt(object.proposal_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesRequest): QueryVotesRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesRequestAminoMsg): QueryVotesRequest { - return QueryVotesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesRequest): QueryVotesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryVotesRequest", - value: QueryVotesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesRequestProtoMsg): QueryVotesRequest { - return QueryVotesRequest.decode(message.value); - }, - toProto(message: QueryVotesRequest): Uint8Array { - return QueryVotesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesRequest): QueryVotesRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesRequest", - value: QueryVotesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVotesResponse(): QueryVotesResponse { - return { - votes: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryVotesResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", - aminoType: "cosmos-sdk/QueryVotesResponse", - encode(message: QueryVotesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesResponse): unknown { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesResponse { - const message = createBaseQueryVotesResponse(); - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesResponseSDKType): QueryVotesResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesResponse): QueryVotesResponseSDKType { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesResponseAmino): QueryVotesResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesResponse): QueryVotesResponseAmino { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesResponseAminoMsg): QueryVotesResponse { - return QueryVotesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesResponse): QueryVotesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryVotesResponse", - value: QueryVotesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesResponseProtoMsg): QueryVotesResponse { - return QueryVotesResponse.decode(message.value); - }, - toProto(message: QueryVotesResponse): Uint8Array { - return QueryVotesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesResponse): QueryVotesResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryVotesResponse", - value: QueryVotesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return { - paramsType: "" - }; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(message: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.paramsType !== "") { - writer.uint32(10).string(message.paramsType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paramsType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsRequest { - return { - paramsType: isSet(object.paramsType) ? String(object.paramsType) : "" - }; - }, - toJSON(message: QueryParamsRequest): unknown { - const obj: any = {}; - message.paramsType !== undefined && (obj.paramsType = message.paramsType); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - message.paramsType = object.paramsType ?? ""; - return message; - }, - fromSDK(object: QueryParamsRequestSDKType): QueryParamsRequest { - return { - paramsType: object?.params_type - }; - }, - toSDK(message: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - obj.params_type = message.paramsType; - return obj; - }, - fromAmino(object: QueryParamsRequestAmino): QueryParamsRequest { - return { - paramsType: object.params_type - }; - }, - toAmino(message: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - obj.params_type = message.paramsType; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - votingParams: VotingParams.fromPartial({}), - depositParams: DepositParams.fromPartial({}), - tallyParams: TallyParams.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.votingParams !== undefined) { - VotingParams.encode(message.votingParams, writer.uint32(10).fork()).ldelim(); - } - if (message.depositParams !== undefined) { - DepositParams.encode(message.depositParams, writer.uint32(18).fork()).ldelim(); - } - if (message.tallyParams !== undefined) { - TallyParams.encode(message.tallyParams, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingParams = VotingParams.decode(reader, reader.uint32()); - break; - case 2: - message.depositParams = DepositParams.decode(reader, reader.uint32()); - break; - case 3: - message.tallyParams = TallyParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - votingParams: isSet(object.votingParams) ? VotingParams.fromJSON(object.votingParams) : undefined, - depositParams: isSet(object.depositParams) ? DepositParams.fromJSON(object.depositParams) : undefined, - tallyParams: isSet(object.tallyParams) ? TallyParams.fromJSON(object.tallyParams) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.votingParams !== undefined && (obj.votingParams = message.votingParams ? VotingParams.toJSON(message.votingParams) : undefined); - message.depositParams !== undefined && (obj.depositParams = message.depositParams ? DepositParams.toJSON(message.depositParams) : undefined); - message.tallyParams !== undefined && (obj.tallyParams = message.tallyParams ? TallyParams.toJSON(message.tallyParams) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.votingParams = object.votingParams !== undefined && object.votingParams !== null ? VotingParams.fromPartial(object.votingParams) : undefined; - message.depositParams = object.depositParams !== undefined && object.depositParams !== null ? DepositParams.fromPartial(object.depositParams) : undefined; - message.tallyParams = object.tallyParams !== undefined && object.tallyParams !== null ? TallyParams.fromPartial(object.tallyParams) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - votingParams: object.voting_params ? VotingParams.fromSDK(object.voting_params) : undefined, - depositParams: object.deposit_params ? DepositParams.fromSDK(object.deposit_params) : undefined, - tallyParams: object.tally_params ? TallyParams.fromSDK(object.tally_params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.votingParams !== undefined && (obj.voting_params = message.votingParams ? VotingParams.toSDK(message.votingParams) : undefined); - message.depositParams !== undefined && (obj.deposit_params = message.depositParams ? DepositParams.toSDK(message.depositParams) : undefined); - message.tallyParams !== undefined && (obj.tally_params = message.tallyParams ? TallyParams.toSDK(message.tallyParams) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - votingParams: object?.voting_params ? VotingParams.fromAmino(object.voting_params) : undefined, - depositParams: object?.deposit_params ? DepositParams.fromAmino(object.deposit_params) : undefined, - tallyParams: object?.tally_params ? TallyParams.fromAmino(object.tally_params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.voting_params = message.votingParams ? VotingParams.toAmino(message.votingParams) : undefined; - obj.deposit_params = message.depositParams ? DepositParams.toAmino(message.depositParams) : undefined; - obj.tally_params = message.tallyParams ? TallyParams.toAmino(message.tallyParams) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDepositRequest(): QueryDepositRequest { - return { - proposalId: BigInt(0), - depositor: "" - }; -} -export const QueryDepositRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", - aminoType: "cosmos-sdk/QueryDepositRequest", - encode(message: QueryDepositRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - depositor: isSet(object.depositor) ? String(object.depositor) : "" - }; - }, - toJSON(message: QueryDepositRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.depositor !== undefined && (obj.depositor = message.depositor); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositRequest { - const message = createBaseQueryDepositRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; - return message; - }, - fromSDK(object: QueryDepositRequestSDKType): QueryDepositRequest { - return { - proposalId: object?.proposal_id, - depositor: object?.depositor - }; - }, - toSDK(message: QueryDepositRequest): QueryDepositRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.depositor = message.depositor; - return obj; - }, - fromAmino(object: QueryDepositRequestAmino): QueryDepositRequest { - return { - proposalId: BigInt(object.proposal_id), - depositor: object.depositor - }; - }, - toAmino(message: QueryDepositRequest): QueryDepositRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; - return obj; - }, - fromAminoMsg(object: QueryDepositRequestAminoMsg): QueryDepositRequest { - return QueryDepositRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositRequest): QueryDepositRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDepositRequest", - value: QueryDepositRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositRequestProtoMsg): QueryDepositRequest { - return QueryDepositRequest.decode(message.value); - }, - toProto(message: QueryDepositRequest): Uint8Array { - return QueryDepositRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositRequest): QueryDepositRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositRequest", - value: QueryDepositRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDepositResponse(): QueryDepositResponse { - return { - deposit: Deposit.fromPartial({}) - }; -} -export const QueryDepositResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", - aminoType: "cosmos-sdk/QueryDepositResponse", - encode(message: QueryDepositResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.deposit !== undefined) { - Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposit = Deposit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositResponse { - return { - deposit: isSet(object.deposit) ? Deposit.fromJSON(object.deposit) : undefined - }; - }, - toJSON(message: QueryDepositResponse): unknown { - const obj: any = {}; - message.deposit !== undefined && (obj.deposit = message.deposit ? Deposit.toJSON(message.deposit) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositResponse { - const message = createBaseQueryDepositResponse(); - message.deposit = object.deposit !== undefined && object.deposit !== null ? Deposit.fromPartial(object.deposit) : undefined; - return message; - }, - fromSDK(object: QueryDepositResponseSDKType): QueryDepositResponse { - return { - deposit: object.deposit ? Deposit.fromSDK(object.deposit) : undefined - }; - }, - toSDK(message: QueryDepositResponse): QueryDepositResponseSDKType { - const obj: any = {}; - message.deposit !== undefined && (obj.deposit = message.deposit ? Deposit.toSDK(message.deposit) : undefined); - return obj; - }, - fromAmino(object: QueryDepositResponseAmino): QueryDepositResponse { - return { - deposit: object?.deposit ? Deposit.fromAmino(object.deposit) : undefined - }; - }, - toAmino(message: QueryDepositResponse): QueryDepositResponseAmino { - const obj: any = {}; - obj.deposit = message.deposit ? Deposit.toAmino(message.deposit) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDepositResponseAminoMsg): QueryDepositResponse { - return QueryDepositResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositResponse): QueryDepositResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDepositResponse", - value: QueryDepositResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositResponseProtoMsg): QueryDepositResponse { - return QueryDepositResponse.decode(message.value); - }, - toProto(message: QueryDepositResponse): Uint8Array { - return QueryDepositResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositResponse): QueryDepositResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositResponse", - value: QueryDepositResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDepositsRequest(): QueryDepositsRequest { - return { - proposalId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDepositsRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", - aminoType: "cosmos-sdk/QueryDepositsRequest", - encode(message: QueryDepositsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositsRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDepositsRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositsRequest { - const message = createBaseQueryDepositsRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDepositsRequestSDKType): QueryDepositsRequest { - return { - proposalId: object?.proposal_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDepositsRequest): QueryDepositsRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDepositsRequestAmino): QueryDepositsRequest { - return { - proposalId: BigInt(object.proposal_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDepositsRequest): QueryDepositsRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDepositsRequestAminoMsg): QueryDepositsRequest { - return QueryDepositsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositsRequest): QueryDepositsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDepositsRequest", - value: QueryDepositsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositsRequestProtoMsg): QueryDepositsRequest { - return QueryDepositsRequest.decode(message.value); - }, - toProto(message: QueryDepositsRequest): Uint8Array { - return QueryDepositsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositsRequest): QueryDepositsRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsRequest", - value: QueryDepositsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDepositsResponse(): QueryDepositsResponse { - return { - deposits: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDepositsResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", - aminoType: "cosmos-sdk/QueryDepositsResponse", - encode(message: QueryDepositsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.deposits) { - Deposit.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDepositsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDepositsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deposits.push(Deposit.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDepositsResponse { - return { - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDepositsResponse): unknown { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toJSON(e) : undefined); - } else { - obj.deposits = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDepositsResponse { - const message = createBaseQueryDepositsResponse(); - message.deposits = object.deposits?.map(e => Deposit.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDepositsResponseSDKType): QueryDepositsResponse { - return { - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDepositsResponse): QueryDepositsResponseSDKType { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toSDK(e) : undefined); - } else { - obj.deposits = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDepositsResponseAmino): QueryDepositsResponse { - return { - deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDepositsResponse): QueryDepositsResponseAmino { - const obj: any = {}; - if (message.deposits) { - obj.deposits = message.deposits.map(e => e ? Deposit.toAmino(e) : undefined); - } else { - obj.deposits = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDepositsResponseAminoMsg): QueryDepositsResponse { - return QueryDepositsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDepositsResponse): QueryDepositsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDepositsResponse", - value: QueryDepositsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDepositsResponseProtoMsg): QueryDepositsResponse { - return QueryDepositsResponse.decode(message.value); - }, - toProto(message: QueryDepositsResponse): Uint8Array { - return QueryDepositsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDepositsResponse): QueryDepositsResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryDepositsResponse", - value: QueryDepositsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { - return { - proposalId: BigInt(0) - }; -} -export const QueryTallyResultRequest = { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", - aminoType: "cosmos-sdk/QueryTallyResultRequest", - encode(message: QueryTallyResultRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTallyResultRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryTallyResultRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryTallyResultRequest { - const message = createBaseQueryTallyResultRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryTallyResultRequestSDKType): QueryTallyResultRequest { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: QueryTallyResultRequest): QueryTallyResultRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: QueryTallyResultRequestAmino): QueryTallyResultRequest { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: QueryTallyResultRequest): QueryTallyResultRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryTallyResultRequestAminoMsg): QueryTallyResultRequest { - return QueryTallyResultRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestAminoMsg { - return { - type: "cosmos-sdk/QueryTallyResultRequest", - value: QueryTallyResultRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTallyResultRequestProtoMsg): QueryTallyResultRequest { - return QueryTallyResultRequest.decode(message.value); - }, - toProto(message: QueryTallyResultRequest): Uint8Array { - return QueryTallyResultRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultRequest", - value: QueryTallyResultRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { - return { - tally: TallyResult.fromPartial({}) - }; -} -export const QueryTallyResultResponse = { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", - aminoType: "cosmos-sdk/QueryTallyResultResponse", - encode(message: QueryTallyResultResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTallyResultResponse { - return { - tally: isSet(object.tally) ? TallyResult.fromJSON(object.tally) : undefined - }; - }, - toJSON(message: QueryTallyResultResponse): unknown { - const obj: any = {}; - message.tally !== undefined && (obj.tally = message.tally ? TallyResult.toJSON(message.tally) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTallyResultResponse { - const message = createBaseQueryTallyResultResponse(); - message.tally = object.tally !== undefined && object.tally !== null ? TallyResult.fromPartial(object.tally) : undefined; - return message; - }, - fromSDK(object: QueryTallyResultResponseSDKType): QueryTallyResultResponse { - return { - tally: object.tally ? TallyResult.fromSDK(object.tally) : undefined - }; - }, - toSDK(message: QueryTallyResultResponse): QueryTallyResultResponseSDKType { - const obj: any = {}; - message.tally !== undefined && (obj.tally = message.tally ? TallyResult.toSDK(message.tally) : undefined); - return obj; - }, - fromAmino(object: QueryTallyResultResponseAmino): QueryTallyResultResponse { - return { - tally: object?.tally ? TallyResult.fromAmino(object.tally) : undefined - }; - }, - toAmino(message: QueryTallyResultResponse): QueryTallyResultResponseAmino { - const obj: any = {}; - obj.tally = message.tally ? TallyResult.toAmino(message.tally) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTallyResultResponseAminoMsg): QueryTallyResultResponse { - return QueryTallyResultResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseAminoMsg { - return { - type: "cosmos-sdk/QueryTallyResultResponse", - value: QueryTallyResultResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTallyResultResponseProtoMsg): QueryTallyResultResponse { - return QueryTallyResultResponse.decode(message.value); - }, - toProto(message: QueryTallyResultResponse): Uint8Array { - return QueryTallyResultResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.QueryTallyResultResponse", - value: QueryTallyResultResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.amino.ts deleted file mode 100644 index 1d618905..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.amino.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; -export const AminoConverter = { - "/cosmos.gov.v1beta1.MsgSubmitProposal": { - aminoType: "cosmos-sdk/MsgSubmitProposal", - toAmino: MsgSubmitProposal.toAmino, - fromAmino: MsgSubmitProposal.fromAmino - }, - "/cosmos.gov.v1beta1.MsgVote": { - aminoType: "cosmos-sdk/MsgVote", - toAmino: MsgVote.toAmino, - fromAmino: MsgVote.fromAmino - }, - "/cosmos.gov.v1beta1.MsgVoteWeighted": { - aminoType: "cosmos-sdk/MsgVoteWeighted", - toAmino: MsgVoteWeighted.toAmino, - fromAmino: MsgVoteWeighted.fromAmino - }, - "/cosmos.gov.v1beta1.MsgDeposit": { - aminoType: "cosmos-sdk/MsgDeposit", - toAmino: MsgDeposit.toAmino, - fromAmino: MsgDeposit.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.registry.ts deleted file mode 100644 index 6b9b2807..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.registry.ts +++ /dev/null @@ -1,141 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.gov.v1beta1.MsgVote", MsgVote], ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - value: MsgSubmitProposal.encode(value).finish() - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - value: MsgVote.encode(value).finish() - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - value: MsgVoteWeighted.encode(value).finish() - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - value: MsgDeposit.encode(value).finish() - }; - } - }, - withTypeUrl: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - value - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - value - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - value - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - value - }; - } - }, - toJSON: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - value: MsgSubmitProposal.toJSON(value) - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - value: MsgVote.toJSON(value) - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - value: MsgVoteWeighted.toJSON(value) - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - value: MsgDeposit.toJSON(value) - }; - } - }, - fromJSON: { - submitProposal(value: any) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - value: MsgSubmitProposal.fromJSON(value) - }; - }, - vote(value: any) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - value: MsgVote.fromJSON(value) - }; - }, - voteWeighted(value: any) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - value: MsgVoteWeighted.fromJSON(value) - }; - }, - deposit(value: any) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - value: MsgDeposit.fromJSON(value) - }; - } - }, - fromPartial: { - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - value: MsgSubmitProposal.fromPartial(value) - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - value: MsgVote.fromPartial(value) - }; - }, - voteWeighted(value: MsgVoteWeighted) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - value: MsgVoteWeighted.fromPartial(value) - }; - }, - deposit(value: MsgDeposit) { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - value: MsgDeposit.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 92982883..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSubmitProposal, MsgSubmitProposalResponse, MsgVote, MsgVoteResponse, MsgVoteWeighted, MsgVoteWeightedResponse, MsgDeposit, MsgDepositResponse } from "./tx"; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** SubmitProposal defines a method to create new proposal given a content. */ - submitProposal(request: MsgSubmitProposal): Promise; - /** Vote defines a method to add a vote on a specific proposal. */ - vote(request: MsgVote): Promise; - /** - * VoteWeighted defines a method to add a weighted vote on a specific proposal. - * - * Since: cosmos-sdk 0.43 - */ - voteWeighted(request: MsgVoteWeighted): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ - deposit(request: MsgDeposit): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.submitProposal = this.submitProposal.bind(this); - this.vote = this.vote.bind(this); - this.voteWeighted = this.voteWeighted.bind(this); - this.deposit = this.deposit.bind(this); - } - submitProposal(request: MsgSubmitProposal): Promise { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "SubmitProposal", data); - return promise.then(data => MsgSubmitProposalResponse.decode(new BinaryReader(data))); - } - vote(request: MsgVote): Promise { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Vote", data); - return promise.then(data => MsgVoteResponse.decode(new BinaryReader(data))); - } - voteWeighted(request: MsgVoteWeighted): Promise { - const data = MsgVoteWeighted.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "VoteWeighted", data); - return promise.then(data => MsgVoteWeightedResponse.decode(new BinaryReader(data))); - } - deposit(request: MsgDeposit): Promise { - const data = MsgDeposit.encode(request).finish(); - const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "Deposit", data); - return promise.then(data => MsgDepositResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.ts deleted file mode 100644 index 5eb2b014..00000000 --- a/examples/interchainjs/src/codegen/cosmos/gov/v1beta1/tx.ts +++ /dev/null @@ -1,1002 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, WeightedVoteOptionSDKType, voteOptionFromJSON, voteOptionToJSON } from "./gov"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposal { - content: Any | undefined; - initialDeposit: Coin[]; - proposer: string; -} -export interface MsgSubmitProposalProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal"; - value: Uint8Array; -} -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposalAmino { - content?: AnyAmino | undefined; - initial_deposit: CoinAmino[]; - proposer: string; -} -export interface MsgSubmitProposalAminoMsg { - type: "cosmos-sdk/MsgSubmitProposal"; - value: MsgSubmitProposalAmino; -} -/** - * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary - * proposal Content. - */ -export interface MsgSubmitProposalSDKType { - content: AnySDKType | undefined; - initial_deposit: CoinSDKType[]; - proposer: string; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - proposalId: bigint; -} -export interface MsgSubmitProposalResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse"; - value: Uint8Array; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponseAmino { - proposal_id: string; -} -export interface MsgSubmitProposalResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitProposalResponse"; - value: MsgSubmitProposalResponseAmino; -} -/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponseSDKType { - proposal_id: bigint; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVote { - proposalId: bigint; - voter: string; - option: VoteOption; -} -export interface MsgVoteProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVote"; - value: Uint8Array; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVoteAmino { - proposal_id: string; - voter: string; - option: VoteOption; -} -export interface MsgVoteAminoMsg { - type: "cosmos-sdk/MsgVote"; - value: MsgVoteAmino; -} -/** MsgVote defines a message to cast a vote. */ -export interface MsgVoteSDKType { - proposal_id: bigint; - voter: string; - option: VoteOption; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse {} -export interface MsgVoteResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse"; - value: Uint8Array; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponseAmino {} -export interface MsgVoteResponseAminoMsg { - type: "cosmos-sdk/MsgVoteResponse"; - value: MsgVoteResponseAmino; -} -/** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponseSDKType {} -/** - * MsgVoteWeighted defines a message to cast a vote. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeighted { - proposalId: bigint; - voter: string; - options: WeightedVoteOption[]; -} -export interface MsgVoteWeightedProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted"; - value: Uint8Array; -} -/** - * MsgVoteWeighted defines a message to cast a vote. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedAmino { - proposal_id: string; - voter: string; - options: WeightedVoteOptionAmino[]; -} -export interface MsgVoteWeightedAminoMsg { - type: "cosmos-sdk/MsgVoteWeighted"; - value: MsgVoteWeightedAmino; -} -/** - * MsgVoteWeighted defines a message to cast a vote. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedSDKType { - proposal_id: bigint; - voter: string; - options: WeightedVoteOptionSDKType[]; -} -/** - * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedResponse {} -export interface MsgVoteWeightedResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse"; - value: Uint8Array; -} -/** - * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedResponseAmino {} -export interface MsgVoteWeightedResponseAminoMsg { - type: "cosmos-sdk/MsgVoteWeightedResponse"; - value: MsgVoteWeightedResponseAmino; -} -/** - * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - * - * Since: cosmos-sdk 0.43 - */ -export interface MsgVoteWeightedResponseSDKType {} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDeposit { - proposalId: bigint; - depositor: string; - amount: Coin[]; -} -export interface MsgDepositProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit"; - value: Uint8Array; -} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDepositAmino { - proposal_id: string; - depositor: string; - amount: CoinAmino[]; -} -export interface MsgDepositAminoMsg { - type: "cosmos-sdk/MsgDeposit"; - value: MsgDepositAmino; -} -/** MsgDeposit defines a message to submit a deposit to an existing proposal. */ -export interface MsgDepositSDKType { - proposal_id: bigint; - depositor: string; - amount: CoinSDKType[]; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponse {} -export interface MsgDepositResponseProtoMsg { - typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse"; - value: Uint8Array; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponseAmino {} -export interface MsgDepositResponseAminoMsg { - type: "cosmos-sdk/MsgDepositResponse"; - value: MsgDepositResponseAmino; -} -/** MsgDepositResponse defines the Msg/Deposit response type. */ -export interface MsgDepositResponseSDKType {} -function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { - content: Any.fromPartial({}), - initialDeposit: [], - proposer: "" - }; -} -export const MsgSubmitProposal = { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - aminoType: "cosmos-sdk/MsgSubmitProposal", - encode(message: MsgSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.content !== undefined) { - Any.encode(message.content, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.initialDeposit) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.proposer !== "") { - writer.uint32(26).string(message.proposer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = Any.decode(reader, reader.uint32()); - break; - case 2: - message.initialDeposit.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitProposal { - return { - content: isSet(object.content) ? Any.fromJSON(object.content) : undefined, - initialDeposit: Array.isArray(object?.initialDeposit) ? object.initialDeposit.map((e: any) => Coin.fromJSON(e)) : [], - proposer: isSet(object.proposer) ? String(object.proposer) : "" - }; - }, - toJSON(message: MsgSubmitProposal): unknown { - const obj: any = {}; - message.content !== undefined && (obj.content = message.content ? Any.toJSON(message.content) : undefined); - if (message.initialDeposit) { - obj.initialDeposit = message.initialDeposit.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.initialDeposit = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitProposal { - const message = createBaseMsgSubmitProposal(); - message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined; - message.initialDeposit = object.initialDeposit?.map(e => Coin.fromPartial(e)) || []; - message.proposer = object.proposer ?? ""; - return message; - }, - fromSDK(object: MsgSubmitProposalSDKType): MsgSubmitProposal { - return { - content: object.content ? Any.fromSDK(object.content) : undefined, - initialDeposit: Array.isArray(object?.initial_deposit) ? object.initial_deposit.map((e: any) => Coin.fromSDK(e)) : [], - proposer: object?.proposer - }; - }, - toSDK(message: MsgSubmitProposal): MsgSubmitProposalSDKType { - const obj: any = {}; - message.content !== undefined && (obj.content = message.content ? Any.toSDK(message.content) : undefined); - if (message.initialDeposit) { - obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.initial_deposit = []; - } - obj.proposer = message.proposer; - return obj; - }, - fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { - return { - content: object?.content ? Any.fromAmino(object.content) : undefined, - initialDeposit: Array.isArray(object?.initial_deposit) ? object.initial_deposit.map((e: any) => Coin.fromAmino(e)) : [], - proposer: object.proposer - }; - }, - toAmino(message: MsgSubmitProposal): MsgSubmitProposalAmino { - const obj: any = {}; - obj.content = message.content ? Any.toAmino(message.content) : undefined; - if (message.initialDeposit) { - obj.initial_deposit = message.initialDeposit.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.initial_deposit = []; - } - obj.proposer = message.proposer; - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { - return MsgSubmitProposal.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitProposal", - value: MsgSubmitProposal.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitProposalProtoMsg): MsgSubmitProposal { - return MsgSubmitProposal.decode(message.value); - }, - toProto(message: MsgSubmitProposal): Uint8Array { - return MsgSubmitProposal.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", - value: MsgSubmitProposal.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { - return { - proposalId: BigInt(0) - }; -} -export const MsgSubmitProposalResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", - aminoType: "cosmos-sdk/MsgSubmitProposalResponse", - encode(message: MsgSubmitProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitProposalResponse { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgSubmitProposalResponse): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitProposalResponse { - const message = createBaseMsgSubmitProposalResponse(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgSubmitProposalResponseSDKType): MsgSubmitProposalResponse { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: MsgSubmitProposalResponseAmino): MsgSubmitProposalResponse { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalResponseAminoMsg): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitProposalResponse", - value: MsgSubmitProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitProposalResponseProtoMsg): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.decode(message.value); - }, - toProto(message: MsgSubmitProposalResponse): Uint8Array { - return MsgSubmitProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse", - value: MsgSubmitProposalResponse.encode(message).finish() - }; - } -}; -function createBaseMsgVote(): MsgVote { - return { - proposalId: BigInt(0), - voter: "", - option: 0 - }; -} -export const MsgVote = { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - aminoType: "cosmos-sdk/MsgVote", - encode(message: MsgVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgVote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1 - }; - }, - toJSON(message: MsgVote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - fromPartial(object: DeepPartial): MsgVote { - const message = createBaseMsgVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - return message; - }, - fromSDK(object: MsgVoteSDKType): MsgVote { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1 - }; - }, - toSDK(message: MsgVote): MsgVoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - return obj; - }, - fromAmino(object: MsgVoteAmino): MsgVote { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1 - }; - }, - toAmino(message: MsgVote): MsgVoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - obj.option = message.option; - return obj; - }, - fromAminoMsg(object: MsgVoteAminoMsg): MsgVote { - return MsgVote.fromAmino(object.value); - }, - toAminoMsg(message: MsgVote): MsgVoteAminoMsg { - return { - type: "cosmos-sdk/MsgVote", - value: MsgVote.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteProtoMsg): MsgVote { - return MsgVote.decode(message.value); - }, - toProto(message: MsgVote): Uint8Array { - return MsgVote.encode(message).finish(); - }, - toProtoMsg(message: MsgVote): MsgVoteProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVote", - value: MsgVote.encode(message).finish() - }; - } -}; -function createBaseMsgVoteResponse(): MsgVoteResponse { - return {}; -} -export const MsgVoteResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", - aminoType: "cosmos-sdk/MsgVoteResponse", - encode(_: MsgVoteResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgVoteResponse { - return {}; - }, - toJSON(_: MsgVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgVoteResponse { - const message = createBaseMsgVoteResponse(); - return message; - }, - fromSDK(_: MsgVoteResponseSDKType): MsgVoteResponse { - return {}; - }, - toSDK(_: MsgVoteResponse): MsgVoteResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgVoteResponseAmino): MsgVoteResponse { - return {}; - }, - toAmino(_: MsgVoteResponse): MsgVoteResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgVoteResponseAminoMsg): MsgVoteResponse { - return MsgVoteResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg { - return { - type: "cosmos-sdk/MsgVoteResponse", - value: MsgVoteResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteResponseProtoMsg): MsgVoteResponse { - return MsgVoteResponse.decode(message.value); - }, - toProto(message: MsgVoteResponse): Uint8Array { - return MsgVoteResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse", - value: MsgVoteResponse.encode(message).finish() - }; - } -}; -function createBaseMsgVoteWeighted(): MsgVoteWeighted { - return { - proposalId: BigInt(0), - voter: "", - options: [] - }; -} -export const MsgVoteWeighted = { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - aminoType: "cosmos-sdk/MsgVoteWeighted", - encode(message: MsgVoteWeighted, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - for (const v of message.options) { - WeightedVoteOption.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteWeighted { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteWeighted(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgVoteWeighted { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgVoteWeighted): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toJSON(e) : undefined); - } else { - obj.options = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgVoteWeighted { - const message = createBaseMsgVoteWeighted(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgVoteWeightedSDKType): MsgVoteWeighted { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgVoteWeighted): MsgVoteWeightedSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toSDK(e) : undefined); - } else { - obj.options = []; - } - return obj; - }, - fromAmino(object: MsgVoteWeightedAmino): MsgVoteWeighted { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgVoteWeighted): MsgVoteWeightedAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - if (message.options) { - obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined); - } else { - obj.options = []; - } - return obj; - }, - fromAminoMsg(object: MsgVoteWeightedAminoMsg): MsgVoteWeighted { - return MsgVoteWeighted.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteWeighted): MsgVoteWeightedAminoMsg { - return { - type: "cosmos-sdk/MsgVoteWeighted", - value: MsgVoteWeighted.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteWeightedProtoMsg): MsgVoteWeighted { - return MsgVoteWeighted.decode(message.value); - }, - toProto(message: MsgVoteWeighted): Uint8Array { - return MsgVoteWeighted.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteWeighted): MsgVoteWeightedProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", - value: MsgVoteWeighted.encode(message).finish() - }; - } -}; -function createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse { - return {}; -} -export const MsgVoteWeightedResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", - aminoType: "cosmos-sdk/MsgVoteWeightedResponse", - encode(_: MsgVoteWeightedResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteWeightedResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteWeightedResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgVoteWeightedResponse { - return {}; - }, - toJSON(_: MsgVoteWeightedResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgVoteWeightedResponse { - const message = createBaseMsgVoteWeightedResponse(); - return message; - }, - fromSDK(_: MsgVoteWeightedResponseSDKType): MsgVoteWeightedResponse { - return {}; - }, - toSDK(_: MsgVoteWeightedResponse): MsgVoteWeightedResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgVoteWeightedResponseAmino): MsgVoteWeightedResponse { - return {}; - }, - toAmino(_: MsgVoteWeightedResponse): MsgVoteWeightedResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgVoteWeightedResponseAminoMsg): MsgVoteWeightedResponse { - return MsgVoteWeightedResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseAminoMsg { - return { - type: "cosmos-sdk/MsgVoteWeightedResponse", - value: MsgVoteWeightedResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteWeightedResponseProtoMsg): MsgVoteWeightedResponse { - return MsgVoteWeightedResponse.decode(message.value); - }, - toProto(message: MsgVoteWeightedResponse): Uint8Array { - return MsgVoteWeightedResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse", - value: MsgVoteWeightedResponse.encode(message).finish() - }; - } -}; -function createBaseMsgDeposit(): MsgDeposit { - return { - proposalId: BigInt(0), - depositor: "", - amount: [] - }; -} -export const MsgDeposit = { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - aminoType: "cosmos-sdk/MsgDeposit", - encode(message: MsgDeposit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.depositor !== "") { - writer.uint32(18).string(message.depositor); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDeposit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDeposit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgDeposit { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - depositor: isSet(object.depositor) ? String(object.depositor) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgDeposit): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.depositor !== undefined && (obj.depositor = message.depositor); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgDeposit { - const message = createBaseMsgDeposit(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.depositor = object.depositor ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgDepositSDKType): MsgDeposit { - return { - proposalId: object?.proposal_id, - depositor: object?.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgDeposit): MsgDepositSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: MsgDepositAmino): MsgDeposit { - return { - proposalId: BigInt(object.proposal_id), - depositor: object.depositor, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgDeposit): MsgDepositAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.depositor = message.depositor; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: MsgDepositAminoMsg): MsgDeposit { - return MsgDeposit.fromAmino(object.value); - }, - toAminoMsg(message: MsgDeposit): MsgDepositAminoMsg { - return { - type: "cosmos-sdk/MsgDeposit", - value: MsgDeposit.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDepositProtoMsg): MsgDeposit { - return MsgDeposit.decode(message.value); - }, - toProto(message: MsgDeposit): Uint8Array { - return MsgDeposit.encode(message).finish(); - }, - toProtoMsg(message: MsgDeposit): MsgDepositProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", - value: MsgDeposit.encode(message).finish() - }; - } -}; -function createBaseMsgDepositResponse(): MsgDepositResponse { - return {}; -} -export const MsgDepositResponse = { - typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", - aminoType: "cosmos-sdk/MsgDepositResponse", - encode(_: MsgDepositResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDepositResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDepositResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgDepositResponse { - return {}; - }, - toJSON(_: MsgDepositResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgDepositResponse { - const message = createBaseMsgDepositResponse(); - return message; - }, - fromSDK(_: MsgDepositResponseSDKType): MsgDepositResponse { - return {}; - }, - toSDK(_: MsgDepositResponse): MsgDepositResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgDepositResponseAmino): MsgDepositResponse { - return {}; - }, - toAmino(_: MsgDepositResponse): MsgDepositResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgDepositResponseAminoMsg): MsgDepositResponse { - return MsgDepositResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgDepositResponse): MsgDepositResponseAminoMsg { - return { - type: "cosmos-sdk/MsgDepositResponse", - value: MsgDepositResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDepositResponseProtoMsg): MsgDepositResponse { - return MsgDepositResponse.decode(message.value); - }, - toProto(message: MsgDepositResponse): Uint8Array { - return MsgDepositResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgDepositResponse): MsgDepositResponseProtoMsg { - return { - typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse", - value: MsgDepositResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/events.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/events.ts deleted file mode 100644 index 4e1032a4..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/events.ts +++ /dev/null @@ -1,1031 +0,0 @@ -import { ProposalExecutorResult, proposalExecutorResultFromJSON, proposalExecutorResultToJSON } from "./types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** EventCreateGroup is an event emitted when a group is created. */ -export interface EventCreateGroup { - /** group_id is the unique ID of the group. */ - groupId: bigint; -} -export interface EventCreateGroupProtoMsg { - typeUrl: "/cosmos.group.v1.EventCreateGroup"; - value: Uint8Array; -} -/** EventCreateGroup is an event emitted when a group is created. */ -export interface EventCreateGroupAmino { - /** group_id is the unique ID of the group. */ - group_id: string; -} -export interface EventCreateGroupAminoMsg { - type: "cosmos-sdk/EventCreateGroup"; - value: EventCreateGroupAmino; -} -/** EventCreateGroup is an event emitted when a group is created. */ -export interface EventCreateGroupSDKType { - group_id: bigint; -} -/** EventUpdateGroup is an event emitted when a group is updated. */ -export interface EventUpdateGroup { - /** group_id is the unique ID of the group. */ - groupId: bigint; -} -export interface EventUpdateGroupProtoMsg { - typeUrl: "/cosmos.group.v1.EventUpdateGroup"; - value: Uint8Array; -} -/** EventUpdateGroup is an event emitted when a group is updated. */ -export interface EventUpdateGroupAmino { - /** group_id is the unique ID of the group. */ - group_id: string; -} -export interface EventUpdateGroupAminoMsg { - type: "cosmos-sdk/EventUpdateGroup"; - value: EventUpdateGroupAmino; -} -/** EventUpdateGroup is an event emitted when a group is updated. */ -export interface EventUpdateGroupSDKType { - group_id: bigint; -} -/** EventCreateGroupPolicy is an event emitted when a group policy is created. */ -export interface EventCreateGroupPolicy { - /** address is the account address of the group policy. */ - address: string; -} -export interface EventCreateGroupPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.EventCreateGroupPolicy"; - value: Uint8Array; -} -/** EventCreateGroupPolicy is an event emitted when a group policy is created. */ -export interface EventCreateGroupPolicyAmino { - /** address is the account address of the group policy. */ - address: string; -} -export interface EventCreateGroupPolicyAminoMsg { - type: "cosmos-sdk/EventCreateGroupPolicy"; - value: EventCreateGroupPolicyAmino; -} -/** EventCreateGroupPolicy is an event emitted when a group policy is created. */ -export interface EventCreateGroupPolicySDKType { - address: string; -} -/** EventUpdateGroupPolicy is an event emitted when a group policy is updated. */ -export interface EventUpdateGroupPolicy { - /** address is the account address of the group policy. */ - address: string; -} -export interface EventUpdateGroupPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.EventUpdateGroupPolicy"; - value: Uint8Array; -} -/** EventUpdateGroupPolicy is an event emitted when a group policy is updated. */ -export interface EventUpdateGroupPolicyAmino { - /** address is the account address of the group policy. */ - address: string; -} -export interface EventUpdateGroupPolicyAminoMsg { - type: "cosmos-sdk/EventUpdateGroupPolicy"; - value: EventUpdateGroupPolicyAmino; -} -/** EventUpdateGroupPolicy is an event emitted when a group policy is updated. */ -export interface EventUpdateGroupPolicySDKType { - address: string; -} -/** EventSubmitProposal is an event emitted when a proposal is created. */ -export interface EventSubmitProposal { - /** proposal_id is the unique ID of the proposal. */ - proposalId: bigint; -} -export interface EventSubmitProposalProtoMsg { - typeUrl: "/cosmos.group.v1.EventSubmitProposal"; - value: Uint8Array; -} -/** EventSubmitProposal is an event emitted when a proposal is created. */ -export interface EventSubmitProposalAmino { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; -} -export interface EventSubmitProposalAminoMsg { - type: "cosmos-sdk/EventSubmitProposal"; - value: EventSubmitProposalAmino; -} -/** EventSubmitProposal is an event emitted when a proposal is created. */ -export interface EventSubmitProposalSDKType { - proposal_id: bigint; -} -/** EventWithdrawProposal is an event emitted when a proposal is withdrawn. */ -export interface EventWithdrawProposal { - /** proposal_id is the unique ID of the proposal. */ - proposalId: bigint; -} -export interface EventWithdrawProposalProtoMsg { - typeUrl: "/cosmos.group.v1.EventWithdrawProposal"; - value: Uint8Array; -} -/** EventWithdrawProposal is an event emitted when a proposal is withdrawn. */ -export interface EventWithdrawProposalAmino { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; -} -export interface EventWithdrawProposalAminoMsg { - type: "cosmos-sdk/EventWithdrawProposal"; - value: EventWithdrawProposalAmino; -} -/** EventWithdrawProposal is an event emitted when a proposal is withdrawn. */ -export interface EventWithdrawProposalSDKType { - proposal_id: bigint; -} -/** EventVote is an event emitted when a voter votes on a proposal. */ -export interface EventVote { - /** proposal_id is the unique ID of the proposal. */ - proposalId: bigint; -} -export interface EventVoteProtoMsg { - typeUrl: "/cosmos.group.v1.EventVote"; - value: Uint8Array; -} -/** EventVote is an event emitted when a voter votes on a proposal. */ -export interface EventVoteAmino { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; -} -export interface EventVoteAminoMsg { - type: "cosmos-sdk/EventVote"; - value: EventVoteAmino; -} -/** EventVote is an event emitted when a voter votes on a proposal. */ -export interface EventVoteSDKType { - proposal_id: bigint; -} -/** EventExec is an event emitted when a proposal is executed. */ -export interface EventExec { - /** proposal_id is the unique ID of the proposal. */ - proposalId: bigint; - /** result is the proposal execution result. */ - result: ProposalExecutorResult; -} -export interface EventExecProtoMsg { - typeUrl: "/cosmos.group.v1.EventExec"; - value: Uint8Array; -} -/** EventExec is an event emitted when a proposal is executed. */ -export interface EventExecAmino { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; - /** result is the proposal execution result. */ - result: ProposalExecutorResult; -} -export interface EventExecAminoMsg { - type: "cosmos-sdk/EventExec"; - value: EventExecAmino; -} -/** EventExec is an event emitted when a proposal is executed. */ -export interface EventExecSDKType { - proposal_id: bigint; - result: ProposalExecutorResult; -} -/** EventLeaveGroup is an event emitted when group member leaves the group. */ -export interface EventLeaveGroup { - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** address is the account address of the group member. */ - address: string; -} -export interface EventLeaveGroupProtoMsg { - typeUrl: "/cosmos.group.v1.EventLeaveGroup"; - value: Uint8Array; -} -/** EventLeaveGroup is an event emitted when group member leaves the group. */ -export interface EventLeaveGroupAmino { - /** group_id is the unique ID of the group. */ - group_id: string; - /** address is the account address of the group member. */ - address: string; -} -export interface EventLeaveGroupAminoMsg { - type: "cosmos-sdk/EventLeaveGroup"; - value: EventLeaveGroupAmino; -} -/** EventLeaveGroup is an event emitted when group member leaves the group. */ -export interface EventLeaveGroupSDKType { - group_id: bigint; - address: string; -} -function createBaseEventCreateGroup(): EventCreateGroup { - return { - groupId: BigInt(0) - }; -} -export const EventCreateGroup = { - typeUrl: "/cosmos.group.v1.EventCreateGroup", - aminoType: "cosmos-sdk/EventCreateGroup", - encode(message: EventCreateGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventCreateGroup { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventCreateGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventCreateGroup { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0) - }; - }, - toJSON(message: EventCreateGroup): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EventCreateGroup { - const message = createBaseEventCreateGroup(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EventCreateGroupSDKType): EventCreateGroup { - return { - groupId: object?.group_id - }; - }, - toSDK(message: EventCreateGroup): EventCreateGroupSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - return obj; - }, - fromAmino(object: EventCreateGroupAmino): EventCreateGroup { - return { - groupId: BigInt(object.group_id) - }; - }, - toAmino(message: EventCreateGroup): EventCreateGroupAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EventCreateGroupAminoMsg): EventCreateGroup { - return EventCreateGroup.fromAmino(object.value); - }, - toAminoMsg(message: EventCreateGroup): EventCreateGroupAminoMsg { - return { - type: "cosmos-sdk/EventCreateGroup", - value: EventCreateGroup.toAmino(message) - }; - }, - fromProtoMsg(message: EventCreateGroupProtoMsg): EventCreateGroup { - return EventCreateGroup.decode(message.value); - }, - toProto(message: EventCreateGroup): Uint8Array { - return EventCreateGroup.encode(message).finish(); - }, - toProtoMsg(message: EventCreateGroup): EventCreateGroupProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventCreateGroup", - value: EventCreateGroup.encode(message).finish() - }; - } -}; -function createBaseEventUpdateGroup(): EventUpdateGroup { - return { - groupId: BigInt(0) - }; -} -export const EventUpdateGroup = { - typeUrl: "/cosmos.group.v1.EventUpdateGroup", - aminoType: "cosmos-sdk/EventUpdateGroup", - encode(message: EventUpdateGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventUpdateGroup { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventUpdateGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventUpdateGroup { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0) - }; - }, - toJSON(message: EventUpdateGroup): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EventUpdateGroup { - const message = createBaseEventUpdateGroup(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EventUpdateGroupSDKType): EventUpdateGroup { - return { - groupId: object?.group_id - }; - }, - toSDK(message: EventUpdateGroup): EventUpdateGroupSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - return obj; - }, - fromAmino(object: EventUpdateGroupAmino): EventUpdateGroup { - return { - groupId: BigInt(object.group_id) - }; - }, - toAmino(message: EventUpdateGroup): EventUpdateGroupAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EventUpdateGroupAminoMsg): EventUpdateGroup { - return EventUpdateGroup.fromAmino(object.value); - }, - toAminoMsg(message: EventUpdateGroup): EventUpdateGroupAminoMsg { - return { - type: "cosmos-sdk/EventUpdateGroup", - value: EventUpdateGroup.toAmino(message) - }; - }, - fromProtoMsg(message: EventUpdateGroupProtoMsg): EventUpdateGroup { - return EventUpdateGroup.decode(message.value); - }, - toProto(message: EventUpdateGroup): Uint8Array { - return EventUpdateGroup.encode(message).finish(); - }, - toProtoMsg(message: EventUpdateGroup): EventUpdateGroupProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventUpdateGroup", - value: EventUpdateGroup.encode(message).finish() - }; - } -}; -function createBaseEventCreateGroupPolicy(): EventCreateGroupPolicy { - return { - address: "" - }; -} -export const EventCreateGroupPolicy = { - typeUrl: "/cosmos.group.v1.EventCreateGroupPolicy", - aminoType: "cosmos-sdk/EventCreateGroupPolicy", - encode(message: EventCreateGroupPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventCreateGroupPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventCreateGroupPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventCreateGroupPolicy { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: EventCreateGroupPolicy): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): EventCreateGroupPolicy { - const message = createBaseEventCreateGroupPolicy(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: EventCreateGroupPolicySDKType): EventCreateGroupPolicy { - return { - address: object?.address - }; - }, - toSDK(message: EventCreateGroupPolicy): EventCreateGroupPolicySDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: EventCreateGroupPolicyAmino): EventCreateGroupPolicy { - return { - address: object.address - }; - }, - toAmino(message: EventCreateGroupPolicy): EventCreateGroupPolicyAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: EventCreateGroupPolicyAminoMsg): EventCreateGroupPolicy { - return EventCreateGroupPolicy.fromAmino(object.value); - }, - toAminoMsg(message: EventCreateGroupPolicy): EventCreateGroupPolicyAminoMsg { - return { - type: "cosmos-sdk/EventCreateGroupPolicy", - value: EventCreateGroupPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: EventCreateGroupPolicyProtoMsg): EventCreateGroupPolicy { - return EventCreateGroupPolicy.decode(message.value); - }, - toProto(message: EventCreateGroupPolicy): Uint8Array { - return EventCreateGroupPolicy.encode(message).finish(); - }, - toProtoMsg(message: EventCreateGroupPolicy): EventCreateGroupPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventCreateGroupPolicy", - value: EventCreateGroupPolicy.encode(message).finish() - }; - } -}; -function createBaseEventUpdateGroupPolicy(): EventUpdateGroupPolicy { - return { - address: "" - }; -} -export const EventUpdateGroupPolicy = { - typeUrl: "/cosmos.group.v1.EventUpdateGroupPolicy", - aminoType: "cosmos-sdk/EventUpdateGroupPolicy", - encode(message: EventUpdateGroupPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventUpdateGroupPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventUpdateGroupPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventUpdateGroupPolicy { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: EventUpdateGroupPolicy): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): EventUpdateGroupPolicy { - const message = createBaseEventUpdateGroupPolicy(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: EventUpdateGroupPolicySDKType): EventUpdateGroupPolicy { - return { - address: object?.address - }; - }, - toSDK(message: EventUpdateGroupPolicy): EventUpdateGroupPolicySDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: EventUpdateGroupPolicyAmino): EventUpdateGroupPolicy { - return { - address: object.address - }; - }, - toAmino(message: EventUpdateGroupPolicy): EventUpdateGroupPolicyAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: EventUpdateGroupPolicyAminoMsg): EventUpdateGroupPolicy { - return EventUpdateGroupPolicy.fromAmino(object.value); - }, - toAminoMsg(message: EventUpdateGroupPolicy): EventUpdateGroupPolicyAminoMsg { - return { - type: "cosmos-sdk/EventUpdateGroupPolicy", - value: EventUpdateGroupPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: EventUpdateGroupPolicyProtoMsg): EventUpdateGroupPolicy { - return EventUpdateGroupPolicy.decode(message.value); - }, - toProto(message: EventUpdateGroupPolicy): Uint8Array { - return EventUpdateGroupPolicy.encode(message).finish(); - }, - toProtoMsg(message: EventUpdateGroupPolicy): EventUpdateGroupPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventUpdateGroupPolicy", - value: EventUpdateGroupPolicy.encode(message).finish() - }; - } -}; -function createBaseEventSubmitProposal(): EventSubmitProposal { - return { - proposalId: BigInt(0) - }; -} -export const EventSubmitProposal = { - typeUrl: "/cosmos.group.v1.EventSubmitProposal", - aminoType: "cosmos-sdk/EventSubmitProposal", - encode(message: EventSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventSubmitProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventSubmitProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventSubmitProposal { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: EventSubmitProposal): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EventSubmitProposal { - const message = createBaseEventSubmitProposal(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EventSubmitProposalSDKType): EventSubmitProposal { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: EventSubmitProposal): EventSubmitProposalSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: EventSubmitProposalAmino): EventSubmitProposal { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: EventSubmitProposal): EventSubmitProposalAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EventSubmitProposalAminoMsg): EventSubmitProposal { - return EventSubmitProposal.fromAmino(object.value); - }, - toAminoMsg(message: EventSubmitProposal): EventSubmitProposalAminoMsg { - return { - type: "cosmos-sdk/EventSubmitProposal", - value: EventSubmitProposal.toAmino(message) - }; - }, - fromProtoMsg(message: EventSubmitProposalProtoMsg): EventSubmitProposal { - return EventSubmitProposal.decode(message.value); - }, - toProto(message: EventSubmitProposal): Uint8Array { - return EventSubmitProposal.encode(message).finish(); - }, - toProtoMsg(message: EventSubmitProposal): EventSubmitProposalProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventSubmitProposal", - value: EventSubmitProposal.encode(message).finish() - }; - } -}; -function createBaseEventWithdrawProposal(): EventWithdrawProposal { - return { - proposalId: BigInt(0) - }; -} -export const EventWithdrawProposal = { - typeUrl: "/cosmos.group.v1.EventWithdrawProposal", - aminoType: "cosmos-sdk/EventWithdrawProposal", - encode(message: EventWithdrawProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventWithdrawProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventWithdrawProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventWithdrawProposal { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: EventWithdrawProposal): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EventWithdrawProposal { - const message = createBaseEventWithdrawProposal(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EventWithdrawProposalSDKType): EventWithdrawProposal { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: EventWithdrawProposal): EventWithdrawProposalSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: EventWithdrawProposalAmino): EventWithdrawProposal { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: EventWithdrawProposal): EventWithdrawProposalAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EventWithdrawProposalAminoMsg): EventWithdrawProposal { - return EventWithdrawProposal.fromAmino(object.value); - }, - toAminoMsg(message: EventWithdrawProposal): EventWithdrawProposalAminoMsg { - return { - type: "cosmos-sdk/EventWithdrawProposal", - value: EventWithdrawProposal.toAmino(message) - }; - }, - fromProtoMsg(message: EventWithdrawProposalProtoMsg): EventWithdrawProposal { - return EventWithdrawProposal.decode(message.value); - }, - toProto(message: EventWithdrawProposal): Uint8Array { - return EventWithdrawProposal.encode(message).finish(); - }, - toProtoMsg(message: EventWithdrawProposal): EventWithdrawProposalProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventWithdrawProposal", - value: EventWithdrawProposal.encode(message).finish() - }; - } -}; -function createBaseEventVote(): EventVote { - return { - proposalId: BigInt(0) - }; -} -export const EventVote = { - typeUrl: "/cosmos.group.v1.EventVote", - aminoType: "cosmos-sdk/EventVote", - encode(message: EventVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventVote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventVote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: EventVote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EventVote { - const message = createBaseEventVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EventVoteSDKType): EventVote { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: EventVote): EventVoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: EventVoteAmino): EventVote { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: EventVote): EventVoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EventVoteAminoMsg): EventVote { - return EventVote.fromAmino(object.value); - }, - toAminoMsg(message: EventVote): EventVoteAminoMsg { - return { - type: "cosmos-sdk/EventVote", - value: EventVote.toAmino(message) - }; - }, - fromProtoMsg(message: EventVoteProtoMsg): EventVote { - return EventVote.decode(message.value); - }, - toProto(message: EventVote): Uint8Array { - return EventVote.encode(message).finish(); - }, - toProtoMsg(message: EventVote): EventVoteProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventVote", - value: EventVote.encode(message).finish() - }; - } -}; -function createBaseEventExec(): EventExec { - return { - proposalId: BigInt(0), - result: 0 - }; -} -export const EventExec = { - typeUrl: "/cosmos.group.v1.EventExec", - aminoType: "cosmos-sdk/EventExec", - encode(message: EventExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.result !== 0) { - writer.uint32(16).int32(message.result); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventExec { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventExec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventExec { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - result: isSet(object.result) ? proposalExecutorResultFromJSON(object.result) : -1 - }; - }, - toJSON(message: EventExec): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.result !== undefined && (obj.result = proposalExecutorResultToJSON(message.result)); - return obj; - }, - fromPartial(object: DeepPartial): EventExec { - const message = createBaseEventExec(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.result = object.result ?? 0; - return message; - }, - fromSDK(object: EventExecSDKType): EventExec { - return { - proposalId: object?.proposal_id, - result: isSet(object.result) ? proposalExecutorResultFromJSON(object.result) : -1 - }; - }, - toSDK(message: EventExec): EventExecSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.result !== undefined && (obj.result = proposalExecutorResultToJSON(message.result)); - return obj; - }, - fromAmino(object: EventExecAmino): EventExec { - return { - proposalId: BigInt(object.proposal_id), - result: isSet(object.result) ? proposalExecutorResultFromJSON(object.result) : -1 - }; - }, - toAmino(message: EventExec): EventExecAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.result = message.result; - return obj; - }, - fromAminoMsg(object: EventExecAminoMsg): EventExec { - return EventExec.fromAmino(object.value); - }, - toAminoMsg(message: EventExec): EventExecAminoMsg { - return { - type: "cosmos-sdk/EventExec", - value: EventExec.toAmino(message) - }; - }, - fromProtoMsg(message: EventExecProtoMsg): EventExec { - return EventExec.decode(message.value); - }, - toProto(message: EventExec): Uint8Array { - return EventExec.encode(message).finish(); - }, - toProtoMsg(message: EventExec): EventExecProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventExec", - value: EventExec.encode(message).finish() - }; - } -}; -function createBaseEventLeaveGroup(): EventLeaveGroup { - return { - groupId: BigInt(0), - address: "" - }; -} -export const EventLeaveGroup = { - typeUrl: "/cosmos.group.v1.EventLeaveGroup", - aminoType: "cosmos-sdk/EventLeaveGroup", - encode(message: EventLeaveGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventLeaveGroup { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventLeaveGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventLeaveGroup { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: EventLeaveGroup): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): EventLeaveGroup { - const message = createBaseEventLeaveGroup(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: EventLeaveGroupSDKType): EventLeaveGroup { - return { - groupId: object?.group_id, - address: object?.address - }; - }, - toSDK(message: EventLeaveGroup): EventLeaveGroupSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - obj.address = message.address; - return obj; - }, - fromAmino(object: EventLeaveGroupAmino): EventLeaveGroup { - return { - groupId: BigInt(object.group_id), - address: object.address - }; - }, - toAmino(message: EventLeaveGroup): EventLeaveGroupAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: EventLeaveGroupAminoMsg): EventLeaveGroup { - return EventLeaveGroup.fromAmino(object.value); - }, - toAminoMsg(message: EventLeaveGroup): EventLeaveGroupAminoMsg { - return { - type: "cosmos-sdk/EventLeaveGroup", - value: EventLeaveGroup.toAmino(message) - }; - }, - fromProtoMsg(message: EventLeaveGroupProtoMsg): EventLeaveGroup { - return EventLeaveGroup.decode(message.value); - }, - toProto(message: EventLeaveGroup): Uint8Array { - return EventLeaveGroup.encode(message).finish(); - }, - toProtoMsg(message: EventLeaveGroup): EventLeaveGroupProtoMsg { - return { - typeUrl: "/cosmos.group.v1.EventLeaveGroup", - value: EventLeaveGroup.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/genesis.ts deleted file mode 100644 index 61ad77c9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/genesis.ts +++ /dev/null @@ -1,324 +0,0 @@ -import { GroupInfo, GroupInfoAmino, GroupInfoSDKType, GroupMember, GroupMemberAmino, GroupMemberSDKType, GroupPolicyInfo, GroupPolicyInfoAmino, GroupPolicyInfoSDKType, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType } from "./types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the group module's genesis state. */ -export interface GenesisState { - /** - * group_seq is the group table orm.Sequence, - * it is used to get the next group ID. - */ - groupSeq: bigint; - /** groups is the list of groups info. */ - groups: GroupInfo[]; - /** group_members is the list of groups members. */ - groupMembers: GroupMember[]; - /** - * group_policy_seq is the group policy table orm.Sequence, - * it is used to generate the next group policy account address. - */ - groupPolicySeq: bigint; - /** group_policies is the list of group policies info. */ - groupPolicies: GroupPolicyInfo[]; - /** - * proposal_seq is the proposal table orm.Sequence, - * it is used to get the next proposal ID. - */ - proposalSeq: bigint; - /** proposals is the list of proposals. */ - proposals: Proposal[]; - /** votes is the list of votes. */ - votes: Vote[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.group.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the group module's genesis state. */ -export interface GenesisStateAmino { - /** - * group_seq is the group table orm.Sequence, - * it is used to get the next group ID. - */ - group_seq: string; - /** groups is the list of groups info. */ - groups: GroupInfoAmino[]; - /** group_members is the list of groups members. */ - group_members: GroupMemberAmino[]; - /** - * group_policy_seq is the group policy table orm.Sequence, - * it is used to generate the next group policy account address. - */ - group_policy_seq: string; - /** group_policies is the list of group policies info. */ - group_policies: GroupPolicyInfoAmino[]; - /** - * proposal_seq is the proposal table orm.Sequence, - * it is used to get the next proposal ID. - */ - proposal_seq: string; - /** proposals is the list of proposals. */ - proposals: ProposalAmino[]; - /** votes is the list of votes. */ - votes: VoteAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the group module's genesis state. */ -export interface GenesisStateSDKType { - group_seq: bigint; - groups: GroupInfoSDKType[]; - group_members: GroupMemberSDKType[]; - group_policy_seq: bigint; - group_policies: GroupPolicyInfoSDKType[]; - proposal_seq: bigint; - proposals: ProposalSDKType[]; - votes: VoteSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - groupSeq: BigInt(0), - groups: [], - groupMembers: [], - groupPolicySeq: BigInt(0), - groupPolicies: [], - proposalSeq: BigInt(0), - proposals: [], - votes: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.group.v1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupSeq !== BigInt(0)) { - writer.uint32(8).uint64(message.groupSeq); - } - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.groupMembers) { - GroupMember.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.groupPolicySeq !== BigInt(0)) { - writer.uint32(32).uint64(message.groupPolicySeq); - } - for (const v of message.groupPolicies) { - GroupPolicyInfo.encode(v!, writer.uint32(42).fork()).ldelim(); - } - if (message.proposalSeq !== BigInt(0)) { - writer.uint32(48).uint64(message.proposalSeq); - } - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupSeq = reader.uint64(); - break; - case 2: - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - break; - case 3: - message.groupMembers.push(GroupMember.decode(reader, reader.uint32())); - break; - case 4: - message.groupPolicySeq = reader.uint64(); - break; - case 5: - message.groupPolicies.push(GroupPolicyInfo.decode(reader, reader.uint32())); - break; - case 6: - message.proposalSeq = reader.uint64(); - break; - case 7: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 8: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - groupSeq: isSet(object.groupSeq) ? BigInt(object.groupSeq.toString()) : BigInt(0), - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - groupMembers: Array.isArray(object?.groupMembers) ? object.groupMembers.map((e: any) => GroupMember.fromJSON(e)) : [], - groupPolicySeq: isSet(object.groupPolicySeq) ? BigInt(object.groupPolicySeq.toString()) : BigInt(0), - groupPolicies: Array.isArray(object?.groupPolicies) ? object.groupPolicies.map((e: any) => GroupPolicyInfo.fromJSON(e)) : [], - proposalSeq: isSet(object.proposalSeq) ? BigInt(object.proposalSeq.toString()) : BigInt(0), - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromJSON(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.groupSeq !== undefined && (obj.groupSeq = (message.groupSeq || BigInt(0)).toString()); - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toJSON(e) : undefined); - } else { - obj.groups = []; - } - if (message.groupMembers) { - obj.groupMembers = message.groupMembers.map(e => e ? GroupMember.toJSON(e) : undefined); - } else { - obj.groupMembers = []; - } - message.groupPolicySeq !== undefined && (obj.groupPolicySeq = (message.groupPolicySeq || BigInt(0)).toString()); - if (message.groupPolicies) { - obj.groupPolicies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toJSON(e) : undefined); - } else { - obj.groupPolicies = []; - } - message.proposalSeq !== undefined && (obj.proposalSeq = (message.proposalSeq || BigInt(0)).toString()); - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toJSON(e) : undefined); - } else { - obj.proposals = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.groupSeq = object.groupSeq !== undefined && object.groupSeq !== null ? BigInt(object.groupSeq.toString()) : BigInt(0); - message.groups = object.groups?.map(e => GroupInfo.fromPartial(e)) || []; - message.groupMembers = object.groupMembers?.map(e => GroupMember.fromPartial(e)) || []; - message.groupPolicySeq = object.groupPolicySeq !== undefined && object.groupPolicySeq !== null ? BigInt(object.groupPolicySeq.toString()) : BigInt(0); - message.groupPolicies = object.groupPolicies?.map(e => GroupPolicyInfo.fromPartial(e)) || []; - message.proposalSeq = object.proposalSeq !== undefined && object.proposalSeq !== null ? BigInt(object.proposalSeq.toString()) : BigInt(0); - message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || []; - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - groupSeq: object?.group_seq, - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromSDK(e)) : [], - groupMembers: Array.isArray(object?.group_members) ? object.group_members.map((e: any) => GroupMember.fromSDK(e)) : [], - groupPolicySeq: object?.group_policy_seq, - groupPolicies: Array.isArray(object?.group_policies) ? object.group_policies.map((e: any) => GroupPolicyInfo.fromSDK(e)) : [], - proposalSeq: object?.proposal_seq, - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromSDK(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.group_seq = message.groupSeq; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toSDK(e) : undefined); - } else { - obj.groups = []; - } - if (message.groupMembers) { - obj.group_members = message.groupMembers.map(e => e ? GroupMember.toSDK(e) : undefined); - } else { - obj.group_members = []; - } - obj.group_policy_seq = message.groupPolicySeq; - if (message.groupPolicies) { - obj.group_policies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toSDK(e) : undefined); - } else { - obj.group_policies = []; - } - obj.proposal_seq = message.proposalSeq; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toSDK(e) : undefined); - } else { - obj.proposals = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - groupSeq: BigInt(object.group_seq), - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromAmino(e)) : [], - groupMembers: Array.isArray(object?.group_members) ? object.group_members.map((e: any) => GroupMember.fromAmino(e)) : [], - groupPolicySeq: BigInt(object.group_policy_seq), - groupPolicies: Array.isArray(object?.group_policies) ? object.group_policies.map((e: any) => GroupPolicyInfo.fromAmino(e)) : [], - proposalSeq: BigInt(object.proposal_seq), - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromAmino(e)) : [], - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.group_seq = message.groupSeq ? message.groupSeq.toString() : undefined; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toAmino(e) : undefined); - } else { - obj.groups = []; - } - if (message.groupMembers) { - obj.group_members = message.groupMembers.map(e => e ? GroupMember.toAmino(e) : undefined); - } else { - obj.group_members = []; - } - obj.group_policy_seq = message.groupPolicySeq ? message.groupPolicySeq.toString() : undefined; - if (message.groupPolicies) { - obj.group_policies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toAmino(e) : undefined); - } else { - obj.group_policies = []; - } - obj.proposal_seq = message.proposalSeq ? message.proposalSeq.toString() : undefined; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined); - } else { - obj.proposals = []; - } - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.group.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/query.rpc.Query.ts deleted file mode 100644 index c81e656b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/query.rpc.Query.ts +++ /dev/null @@ -1,445 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryGroupInfoRequest, QueryGroupInfoResponse, QueryGroupPolicyInfoRequest, QueryGroupPolicyInfoResponse, QueryGroupMembersRequest, QueryGroupMembersResponse, QueryGroupsByAdminRequest, QueryGroupsByAdminResponse, QueryGroupPoliciesByGroupRequest, QueryGroupPoliciesByGroupResponse, QueryGroupPoliciesByAdminRequest, QueryGroupPoliciesByAdminResponse, QueryProposalRequest, QueryProposalResponse, QueryProposalsByGroupPolicyRequest, QueryProposalsByGroupPolicyResponse, QueryVoteByProposalVoterRequest, QueryVoteByProposalVoterResponse, QueryVotesByProposalRequest, QueryVotesByProposalResponse, QueryVotesByVoterRequest, QueryVotesByVoterResponse, QueryGroupsByMemberRequest, QueryGroupsByMemberResponse, QueryTallyResultRequest, QueryTallyResultResponse } from "./query"; -/** Query is the cosmos.group.v1 Query service. */ -export interface Query { - /** GroupInfo queries group info based on group id. */ - groupInfo(request: QueryGroupInfoRequest): Promise; - /** GroupPolicyInfo queries group policy info based on account address of group policy. */ - groupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise; - /** GroupMembers queries members of a group */ - groupMembers(request: QueryGroupMembersRequest): Promise; - /** GroupsByAdmin queries groups by admin address. */ - groupsByAdmin(request: QueryGroupsByAdminRequest): Promise; - /** GroupPoliciesByGroup queries group policies by group id. */ - groupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise; - /** GroupsByAdmin queries group policies by admin address. */ - groupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise; - /** Proposal queries a proposal based on proposal id. */ - proposal(request: QueryProposalRequest): Promise; - /** ProposalsByGroupPolicy queries proposals based on account address of group policy. */ - proposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise; - /** VoteByProposalVoter queries a vote by proposal id and voter. */ - voteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise; - /** VotesByProposal queries a vote by proposal. */ - votesByProposal(request: QueryVotesByProposalRequest): Promise; - /** VotesByVoter queries a vote by voter. */ - votesByVoter(request: QueryVotesByVoterRequest): Promise; - /** GroupsByMember queries groups by member address. */ - groupsByMember(request: QueryGroupsByMemberRequest): Promise; - /** TallyResult queries the tally of a proposal votes. */ - tallyResult(request: QueryTallyResultRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.groupInfo = this.groupInfo.bind(this); - this.groupPolicyInfo = this.groupPolicyInfo.bind(this); - this.groupMembers = this.groupMembers.bind(this); - this.groupsByAdmin = this.groupsByAdmin.bind(this); - this.groupPoliciesByGroup = this.groupPoliciesByGroup.bind(this); - this.groupPoliciesByAdmin = this.groupPoliciesByAdmin.bind(this); - this.proposal = this.proposal.bind(this); - this.proposalsByGroupPolicy = this.proposalsByGroupPolicy.bind(this); - this.voteByProposalVoter = this.voteByProposalVoter.bind(this); - this.votesByProposal = this.votesByProposal.bind(this); - this.votesByVoter = this.votesByVoter.bind(this); - this.groupsByMember = this.groupsByMember.bind(this); - this.tallyResult = this.tallyResult.bind(this); - } - groupInfo(request: QueryGroupInfoRequest): Promise { - const data = QueryGroupInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupInfo", data); - return promise.then(data => QueryGroupInfoResponse.decode(new BinaryReader(data))); - } - groupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise { - const data = QueryGroupPolicyInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupPolicyInfo", data); - return promise.then(data => QueryGroupPolicyInfoResponse.decode(new BinaryReader(data))); - } - groupMembers(request: QueryGroupMembersRequest): Promise { - const data = QueryGroupMembersRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupMembers", data); - return promise.then(data => QueryGroupMembersResponse.decode(new BinaryReader(data))); - } - groupsByAdmin(request: QueryGroupsByAdminRequest): Promise { - const data = QueryGroupsByAdminRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupsByAdmin", data); - return promise.then(data => QueryGroupsByAdminResponse.decode(new BinaryReader(data))); - } - groupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise { - const data = QueryGroupPoliciesByGroupRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupPoliciesByGroup", data); - return promise.then(data => QueryGroupPoliciesByGroupResponse.decode(new BinaryReader(data))); - } - groupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise { - const data = QueryGroupPoliciesByAdminRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupPoliciesByAdmin", data); - return promise.then(data => QueryGroupPoliciesByAdminResponse.decode(new BinaryReader(data))); - } - proposal(request: QueryProposalRequest): Promise { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "Proposal", data); - return promise.then(data => QueryProposalResponse.decode(new BinaryReader(data))); - } - proposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise { - const data = QueryProposalsByGroupPolicyRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "ProposalsByGroupPolicy", data); - return promise.then(data => QueryProposalsByGroupPolicyResponse.decode(new BinaryReader(data))); - } - voteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise { - const data = QueryVoteByProposalVoterRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "VoteByProposalVoter", data); - return promise.then(data => QueryVoteByProposalVoterResponse.decode(new BinaryReader(data))); - } - votesByProposal(request: QueryVotesByProposalRequest): Promise { - const data = QueryVotesByProposalRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "VotesByProposal", data); - return promise.then(data => QueryVotesByProposalResponse.decode(new BinaryReader(data))); - } - votesByVoter(request: QueryVotesByVoterRequest): Promise { - const data = QueryVotesByVoterRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "VotesByVoter", data); - return promise.then(data => QueryVotesByVoterResponse.decode(new BinaryReader(data))); - } - groupsByMember(request: QueryGroupsByMemberRequest): Promise { - const data = QueryGroupsByMemberRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "GroupsByMember", data); - return promise.then(data => QueryGroupsByMemberResponse.decode(new BinaryReader(data))); - } - tallyResult(request: QueryTallyResultRequest): Promise { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Query", "TallyResult", data); - return promise.then(data => QueryTallyResultResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - groupInfo(request: QueryGroupInfoRequest): Promise { - return queryService.groupInfo(request); - }, - groupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise { - return queryService.groupPolicyInfo(request); - }, - groupMembers(request: QueryGroupMembersRequest): Promise { - return queryService.groupMembers(request); - }, - groupsByAdmin(request: QueryGroupsByAdminRequest): Promise { - return queryService.groupsByAdmin(request); - }, - groupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise { - return queryService.groupPoliciesByGroup(request); - }, - groupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise { - return queryService.groupPoliciesByAdmin(request); - }, - proposal(request: QueryProposalRequest): Promise { - return queryService.proposal(request); - }, - proposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise { - return queryService.proposalsByGroupPolicy(request); - }, - voteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise { - return queryService.voteByProposalVoter(request); - }, - votesByProposal(request: QueryVotesByProposalRequest): Promise { - return queryService.votesByProposal(request); - }, - votesByVoter(request: QueryVotesByVoterRequest): Promise { - return queryService.votesByVoter(request); - }, - groupsByMember(request: QueryGroupsByMemberRequest): Promise { - return queryService.groupsByMember(request); - }, - tallyResult(request: QueryTallyResultRequest): Promise { - return queryService.tallyResult(request); - } - }; -}; -export interface UseGroupInfoQuery extends ReactQueryParams { - request: QueryGroupInfoRequest; -} -export interface UseGroupPolicyInfoQuery extends ReactQueryParams { - request: QueryGroupPolicyInfoRequest; -} -export interface UseGroupMembersQuery extends ReactQueryParams { - request: QueryGroupMembersRequest; -} -export interface UseGroupsByAdminQuery extends ReactQueryParams { - request: QueryGroupsByAdminRequest; -} -export interface UseGroupPoliciesByGroupQuery extends ReactQueryParams { - request: QueryGroupPoliciesByGroupRequest; -} -export interface UseGroupPoliciesByAdminQuery extends ReactQueryParams { - request: QueryGroupPoliciesByAdminRequest; -} -export interface UseProposalQuery extends ReactQueryParams { - request: QueryProposalRequest; -} -export interface UseProposalsByGroupPolicyQuery extends ReactQueryParams { - request: QueryProposalsByGroupPolicyRequest; -} -export interface UseVoteByProposalVoterQuery extends ReactQueryParams { - request: QueryVoteByProposalVoterRequest; -} -export interface UseVotesByProposalQuery extends ReactQueryParams { - request: QueryVotesByProposalRequest; -} -export interface UseVotesByVoterQuery extends ReactQueryParams { - request: QueryVotesByVoterRequest; -} -export interface UseGroupsByMemberQuery extends ReactQueryParams { - request: QueryGroupsByMemberRequest; -} -export interface UseTallyResultQuery extends ReactQueryParams { - request: QueryTallyResultRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useGroupInfo = ({ - request, - options - }: UseGroupInfoQuery) => { - return useQuery(["groupInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupInfo(request); - }, options); - }; - const useGroupPolicyInfo = ({ - request, - options - }: UseGroupPolicyInfoQuery) => { - return useQuery(["groupPolicyInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupPolicyInfo(request); - }, options); - }; - const useGroupMembers = ({ - request, - options - }: UseGroupMembersQuery) => { - return useQuery(["groupMembersQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupMembers(request); - }, options); - }; - const useGroupsByAdmin = ({ - request, - options - }: UseGroupsByAdminQuery) => { - return useQuery(["groupsByAdminQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupsByAdmin(request); - }, options); - }; - const useGroupPoliciesByGroup = ({ - request, - options - }: UseGroupPoliciesByGroupQuery) => { - return useQuery(["groupPoliciesByGroupQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupPoliciesByGroup(request); - }, options); - }; - const useGroupPoliciesByAdmin = ({ - request, - options - }: UseGroupPoliciesByAdminQuery) => { - return useQuery(["groupPoliciesByAdminQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupPoliciesByAdmin(request); - }, options); - }; - const useProposal = ({ - request, - options - }: UseProposalQuery) => { - return useQuery(["proposalQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.proposal(request); - }, options); - }; - const useProposalsByGroupPolicy = ({ - request, - options - }: UseProposalsByGroupPolicyQuery) => { - return useQuery(["proposalsByGroupPolicyQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.proposalsByGroupPolicy(request); - }, options); - }; - const useVoteByProposalVoter = ({ - request, - options - }: UseVoteByProposalVoterQuery) => { - return useQuery(["voteByProposalVoterQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.voteByProposalVoter(request); - }, options); - }; - const useVotesByProposal = ({ - request, - options - }: UseVotesByProposalQuery) => { - return useQuery(["votesByProposalQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.votesByProposal(request); - }, options); - }; - const useVotesByVoter = ({ - request, - options - }: UseVotesByVoterQuery) => { - return useQuery(["votesByVoterQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.votesByVoter(request); - }, options); - }; - const useGroupsByMember = ({ - request, - options - }: UseGroupsByMemberQuery) => { - return useQuery(["groupsByMemberQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.groupsByMember(request); - }, options); - }; - const useTallyResult = ({ - request, - options - }: UseTallyResultQuery) => { - return useQuery(["tallyResultQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.tallyResult(request); - }, options); - }; - return { - /** GroupInfo queries group info based on group id. */useGroupInfo, - /** GroupPolicyInfo queries group policy info based on account address of group policy. */useGroupPolicyInfo, - /** GroupMembers queries members of a group */useGroupMembers, - /** GroupsByAdmin queries groups by admin address. */useGroupsByAdmin, - /** GroupPoliciesByGroup queries group policies by group id. */useGroupPoliciesByGroup, - /** GroupsByAdmin queries group policies by admin address. */useGroupPoliciesByAdmin, - /** Proposal queries a proposal based on proposal id. */useProposal, - /** ProposalsByGroupPolicy queries proposals based on account address of group policy. */useProposalsByGroupPolicy, - /** VoteByProposalVoter queries a vote by proposal id and voter. */useVoteByProposalVoter, - /** VotesByProposal queries a vote by proposal. */useVotesByProposal, - /** VotesByVoter queries a vote by voter. */useVotesByVoter, - /** GroupsByMember queries groups by member address. */useGroupsByMember, - /** TallyResult queries the tally of a proposal votes. */useTallyResult - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryGroupInfoStore { - store = new QueryStore(queryService?.groupInfo); - groupInfo(request: QueryGroupInfoRequest) { - return this.store.getData(request); - } - } - class QueryGroupPolicyInfoStore { - store = new QueryStore(queryService?.groupPolicyInfo); - groupPolicyInfo(request: QueryGroupPolicyInfoRequest) { - return this.store.getData(request); - } - } - class QueryGroupMembersStore { - store = new QueryStore(queryService?.groupMembers); - groupMembers(request: QueryGroupMembersRequest) { - return this.store.getData(request); - } - } - class QueryGroupsByAdminStore { - store = new QueryStore(queryService?.groupsByAdmin); - groupsByAdmin(request: QueryGroupsByAdminRequest) { - return this.store.getData(request); - } - } - class QueryGroupPoliciesByGroupStore { - store = new QueryStore(queryService?.groupPoliciesByGroup); - groupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest) { - return this.store.getData(request); - } - } - class QueryGroupPoliciesByAdminStore { - store = new QueryStore(queryService?.groupPoliciesByAdmin); - groupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest) { - return this.store.getData(request); - } - } - class QueryProposalStore { - store = new QueryStore(queryService?.proposal); - proposal(request: QueryProposalRequest) { - return this.store.getData(request); - } - } - class QueryProposalsByGroupPolicyStore { - store = new QueryStore(queryService?.proposalsByGroupPolicy); - proposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest) { - return this.store.getData(request); - } - } - class QueryVoteByProposalVoterStore { - store = new QueryStore(queryService?.voteByProposalVoter); - voteByProposalVoter(request: QueryVoteByProposalVoterRequest) { - return this.store.getData(request); - } - } - class QueryVotesByProposalStore { - store = new QueryStore(queryService?.votesByProposal); - votesByProposal(request: QueryVotesByProposalRequest) { - return this.store.getData(request); - } - } - class QueryVotesByVoterStore { - store = new QueryStore(queryService?.votesByVoter); - votesByVoter(request: QueryVotesByVoterRequest) { - return this.store.getData(request); - } - } - class QueryGroupsByMemberStore { - store = new QueryStore(queryService?.groupsByMember); - groupsByMember(request: QueryGroupsByMemberRequest) { - return this.store.getData(request); - } - } - class QueryTallyResultStore { - store = new QueryStore(queryService?.tallyResult); - tallyResult(request: QueryTallyResultRequest) { - return this.store.getData(request); - } - } - return { - /** GroupInfo queries group info based on group id. */QueryGroupInfoStore, - /** GroupPolicyInfo queries group policy info based on account address of group policy. */QueryGroupPolicyInfoStore, - /** GroupMembers queries members of a group */QueryGroupMembersStore, - /** GroupsByAdmin queries groups by admin address. */QueryGroupsByAdminStore, - /** GroupPoliciesByGroup queries group policies by group id. */QueryGroupPoliciesByGroupStore, - /** GroupsByAdmin queries group policies by admin address. */QueryGroupPoliciesByAdminStore, - /** Proposal queries a proposal based on proposal id. */QueryProposalStore, - /** ProposalsByGroupPolicy queries proposals based on account address of group policy. */QueryProposalsByGroupPolicyStore, - /** VoteByProposalVoter queries a vote by proposal id and voter. */QueryVoteByProposalVoterStore, - /** VotesByProposal queries a vote by proposal. */QueryVotesByProposalStore, - /** VotesByVoter queries a vote by voter. */QueryVotesByVoterStore, - /** GroupsByMember queries groups by member address. */QueryGroupsByMemberStore, - /** TallyResult queries the tally of a proposal votes. */QueryTallyResultStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/query.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/query.ts deleted file mode 100644 index 405db341..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/query.ts +++ /dev/null @@ -1,3283 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { GroupInfo, GroupInfoAmino, GroupInfoSDKType, GroupPolicyInfo, GroupPolicyInfoAmino, GroupPolicyInfoSDKType, GroupMember, GroupMemberAmino, GroupMemberSDKType, Proposal, ProposalAmino, ProposalSDKType, Vote, VoteAmino, VoteSDKType, TallyResult, TallyResultAmino, TallyResultSDKType } from "./types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryGroupInfoRequest is the Query/GroupInfo request type. */ -export interface QueryGroupInfoRequest { - /** group_id is the unique ID of the group. */ - groupId: bigint; -} -export interface QueryGroupInfoRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupInfoRequest"; - value: Uint8Array; -} -/** QueryGroupInfoRequest is the Query/GroupInfo request type. */ -export interface QueryGroupInfoRequestAmino { - /** group_id is the unique ID of the group. */ - group_id: string; -} -export interface QueryGroupInfoRequestAminoMsg { - type: "cosmos-sdk/QueryGroupInfoRequest"; - value: QueryGroupInfoRequestAmino; -} -/** QueryGroupInfoRequest is the Query/GroupInfo request type. */ -export interface QueryGroupInfoRequestSDKType { - group_id: bigint; -} -/** QueryGroupInfoResponse is the Query/GroupInfo response type. */ -export interface QueryGroupInfoResponse { - /** info is the GroupInfo for the group. */ - info: GroupInfo | undefined; -} -export interface QueryGroupInfoResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupInfoResponse"; - value: Uint8Array; -} -/** QueryGroupInfoResponse is the Query/GroupInfo response type. */ -export interface QueryGroupInfoResponseAmino { - /** info is the GroupInfo for the group. */ - info?: GroupInfoAmino | undefined; -} -export interface QueryGroupInfoResponseAminoMsg { - type: "cosmos-sdk/QueryGroupInfoResponse"; - value: QueryGroupInfoResponseAmino; -} -/** QueryGroupInfoResponse is the Query/GroupInfo response type. */ -export interface QueryGroupInfoResponseSDKType { - info: GroupInfoSDKType | undefined; -} -/** QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. */ -export interface QueryGroupPolicyInfoRequest { - /** address is the account address of the group policy. */ - address: string; -} -export interface QueryGroupPolicyInfoRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupPolicyInfoRequest"; - value: Uint8Array; -} -/** QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. */ -export interface QueryGroupPolicyInfoRequestAmino { - /** address is the account address of the group policy. */ - address: string; -} -export interface QueryGroupPolicyInfoRequestAminoMsg { - type: "cosmos-sdk/QueryGroupPolicyInfoRequest"; - value: QueryGroupPolicyInfoRequestAmino; -} -/** QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. */ -export interface QueryGroupPolicyInfoRequestSDKType { - address: string; -} -/** QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. */ -export interface QueryGroupPolicyInfoResponse { - /** info is the GroupPolicyInfo for the group policy. */ - info: GroupPolicyInfo | undefined; -} -export interface QueryGroupPolicyInfoResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupPolicyInfoResponse"; - value: Uint8Array; -} -/** QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. */ -export interface QueryGroupPolicyInfoResponseAmino { - /** info is the GroupPolicyInfo for the group policy. */ - info?: GroupPolicyInfoAmino | undefined; -} -export interface QueryGroupPolicyInfoResponseAminoMsg { - type: "cosmos-sdk/QueryGroupPolicyInfoResponse"; - value: QueryGroupPolicyInfoResponseAmino; -} -/** QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. */ -export interface QueryGroupPolicyInfoResponseSDKType { - info: GroupPolicyInfoSDKType | undefined; -} -/** QueryGroupMembersRequest is the Query/GroupMembers request type. */ -export interface QueryGroupMembersRequest { - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGroupMembersRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupMembersRequest"; - value: Uint8Array; -} -/** QueryGroupMembersRequest is the Query/GroupMembers request type. */ -export interface QueryGroupMembersRequestAmino { - /** group_id is the unique ID of the group. */ - group_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGroupMembersRequestAminoMsg { - type: "cosmos-sdk/QueryGroupMembersRequest"; - value: QueryGroupMembersRequestAmino; -} -/** QueryGroupMembersRequest is the Query/GroupMembers request type. */ -export interface QueryGroupMembersRequestSDKType { - group_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryGroupMembersResponse is the Query/GroupMembersResponse response type. */ -export interface QueryGroupMembersResponse { - /** members are the members of the group with given group_id. */ - members: GroupMember[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGroupMembersResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupMembersResponse"; - value: Uint8Array; -} -/** QueryGroupMembersResponse is the Query/GroupMembersResponse response type. */ -export interface QueryGroupMembersResponseAmino { - /** members are the members of the group with given group_id. */ - members: GroupMemberAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGroupMembersResponseAminoMsg { - type: "cosmos-sdk/QueryGroupMembersResponse"; - value: QueryGroupMembersResponseAmino; -} -/** QueryGroupMembersResponse is the Query/GroupMembersResponse response type. */ -export interface QueryGroupMembersResponseSDKType { - members: GroupMemberSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. */ -export interface QueryGroupsByAdminRequest { - /** admin is the account address of a group's admin. */ - admin: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGroupsByAdminRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupsByAdminRequest"; - value: Uint8Array; -} -/** QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. */ -export interface QueryGroupsByAdminRequestAmino { - /** admin is the account address of a group's admin. */ - admin: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGroupsByAdminRequestAminoMsg { - type: "cosmos-sdk/QueryGroupsByAdminRequest"; - value: QueryGroupsByAdminRequestAmino; -} -/** QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. */ -export interface QueryGroupsByAdminRequestSDKType { - admin: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. */ -export interface QueryGroupsByAdminResponse { - /** groups are the groups info with the provided admin. */ - groups: GroupInfo[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGroupsByAdminResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupsByAdminResponse"; - value: Uint8Array; -} -/** QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. */ -export interface QueryGroupsByAdminResponseAmino { - /** groups are the groups info with the provided admin. */ - groups: GroupInfoAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGroupsByAdminResponseAminoMsg { - type: "cosmos-sdk/QueryGroupsByAdminResponse"; - value: QueryGroupsByAdminResponseAmino; -} -/** QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. */ -export interface QueryGroupsByAdminResponseSDKType { - groups: GroupInfoSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. */ -export interface QueryGroupPoliciesByGroupRequest { - /** group_id is the unique ID of the group policy's group. */ - groupId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGroupPoliciesByGroupRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByGroupRequest"; - value: Uint8Array; -} -/** QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. */ -export interface QueryGroupPoliciesByGroupRequestAmino { - /** group_id is the unique ID of the group policy's group. */ - group_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGroupPoliciesByGroupRequestAminoMsg { - type: "cosmos-sdk/QueryGroupPoliciesByGroupRequest"; - value: QueryGroupPoliciesByGroupRequestAmino; -} -/** QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. */ -export interface QueryGroupPoliciesByGroupRequestSDKType { - group_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. */ -export interface QueryGroupPoliciesByGroupResponse { - /** group_policies are the group policies info associated with the provided group. */ - groupPolicies: GroupPolicyInfo[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGroupPoliciesByGroupResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByGroupResponse"; - value: Uint8Array; -} -/** QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. */ -export interface QueryGroupPoliciesByGroupResponseAmino { - /** group_policies are the group policies info associated with the provided group. */ - group_policies: GroupPolicyInfoAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGroupPoliciesByGroupResponseAminoMsg { - type: "cosmos-sdk/QueryGroupPoliciesByGroupResponse"; - value: QueryGroupPoliciesByGroupResponseAmino; -} -/** QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. */ -export interface QueryGroupPoliciesByGroupResponseSDKType { - group_policies: GroupPolicyInfoSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. */ -export interface QueryGroupPoliciesByAdminRequest { - /** admin is the admin address of the group policy. */ - admin: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGroupPoliciesByAdminRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByAdminRequest"; - value: Uint8Array; -} -/** QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. */ -export interface QueryGroupPoliciesByAdminRequestAmino { - /** admin is the admin address of the group policy. */ - admin: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGroupPoliciesByAdminRequestAminoMsg { - type: "cosmos-sdk/QueryGroupPoliciesByAdminRequest"; - value: QueryGroupPoliciesByAdminRequestAmino; -} -/** QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. */ -export interface QueryGroupPoliciesByAdminRequestSDKType { - admin: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. */ -export interface QueryGroupPoliciesByAdminResponse { - /** group_policies are the group policies info with provided admin. */ - groupPolicies: GroupPolicyInfo[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGroupPoliciesByAdminResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByAdminResponse"; - value: Uint8Array; -} -/** QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. */ -export interface QueryGroupPoliciesByAdminResponseAmino { - /** group_policies are the group policies info with provided admin. */ - group_policies: GroupPolicyInfoAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGroupPoliciesByAdminResponseAminoMsg { - type: "cosmos-sdk/QueryGroupPoliciesByAdminResponse"; - value: QueryGroupPoliciesByAdminResponseAmino; -} -/** QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. */ -export interface QueryGroupPoliciesByAdminResponseSDKType { - group_policies: GroupPolicyInfoSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryProposalRequest is the Query/Proposal request type. */ -export interface QueryProposalRequest { - /** proposal_id is the unique ID of a proposal. */ - proposalId: bigint; -} -export interface QueryProposalRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryProposalRequest"; - value: Uint8Array; -} -/** QueryProposalRequest is the Query/Proposal request type. */ -export interface QueryProposalRequestAmino { - /** proposal_id is the unique ID of a proposal. */ - proposal_id: string; -} -export interface QueryProposalRequestAminoMsg { - type: "cosmos-sdk/QueryProposalRequest"; - value: QueryProposalRequestAmino; -} -/** QueryProposalRequest is the Query/Proposal request type. */ -export interface QueryProposalRequestSDKType { - proposal_id: bigint; -} -/** QueryProposalResponse is the Query/Proposal response type. */ -export interface QueryProposalResponse { - /** proposal is the proposal info. */ - proposal: Proposal | undefined; -} -export interface QueryProposalResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryProposalResponse"; - value: Uint8Array; -} -/** QueryProposalResponse is the Query/Proposal response type. */ -export interface QueryProposalResponseAmino { - /** proposal is the proposal info. */ - proposal?: ProposalAmino | undefined; -} -export interface QueryProposalResponseAminoMsg { - type: "cosmos-sdk/QueryProposalResponse"; - value: QueryProposalResponseAmino; -} -/** QueryProposalResponse is the Query/Proposal response type. */ -export interface QueryProposalResponseSDKType { - proposal: ProposalSDKType | undefined; -} -/** QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. */ -export interface QueryProposalsByGroupPolicyRequest { - /** address is the account address of the group policy related to proposals. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryProposalsByGroupPolicyRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryProposalsByGroupPolicyRequest"; - value: Uint8Array; -} -/** QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. */ -export interface QueryProposalsByGroupPolicyRequestAmino { - /** address is the account address of the group policy related to proposals. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryProposalsByGroupPolicyRequestAminoMsg { - type: "cosmos-sdk/QueryProposalsByGroupPolicyRequest"; - value: QueryProposalsByGroupPolicyRequestAmino; -} -/** QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. */ -export interface QueryProposalsByGroupPolicyRequestSDKType { - address: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. */ -export interface QueryProposalsByGroupPolicyResponse { - /** proposals are the proposals with given group policy. */ - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryProposalsByGroupPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryProposalsByGroupPolicyResponse"; - value: Uint8Array; -} -/** QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. */ -export interface QueryProposalsByGroupPolicyResponseAmino { - /** proposals are the proposals with given group policy. */ - proposals: ProposalAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryProposalsByGroupPolicyResponseAminoMsg { - type: "cosmos-sdk/QueryProposalsByGroupPolicyResponse"; - value: QueryProposalsByGroupPolicyResponseAmino; -} -/** QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. */ -export interface QueryProposalsByGroupPolicyResponseSDKType { - proposals: ProposalSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. */ -export interface QueryVoteByProposalVoterRequest { - /** proposal_id is the unique ID of a proposal. */ - proposalId: bigint; - /** voter is a proposal voter account address. */ - voter: string; -} -export interface QueryVoteByProposalVoterRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryVoteByProposalVoterRequest"; - value: Uint8Array; -} -/** QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. */ -export interface QueryVoteByProposalVoterRequestAmino { - /** proposal_id is the unique ID of a proposal. */ - proposal_id: string; - /** voter is a proposal voter account address. */ - voter: string; -} -export interface QueryVoteByProposalVoterRequestAminoMsg { - type: "cosmos-sdk/QueryVoteByProposalVoterRequest"; - value: QueryVoteByProposalVoterRequestAmino; -} -/** QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. */ -export interface QueryVoteByProposalVoterRequestSDKType { - proposal_id: bigint; - voter: string; -} -/** QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. */ -export interface QueryVoteByProposalVoterResponse { - /** vote is the vote with given proposal_id and voter. */ - vote: Vote | undefined; -} -export interface QueryVoteByProposalVoterResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryVoteByProposalVoterResponse"; - value: Uint8Array; -} -/** QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. */ -export interface QueryVoteByProposalVoterResponseAmino { - /** vote is the vote with given proposal_id and voter. */ - vote?: VoteAmino | undefined; -} -export interface QueryVoteByProposalVoterResponseAminoMsg { - type: "cosmos-sdk/QueryVoteByProposalVoterResponse"; - value: QueryVoteByProposalVoterResponseAmino; -} -/** QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. */ -export interface QueryVoteByProposalVoterResponseSDKType { - vote: VoteSDKType | undefined; -} -/** QueryVotesByProposalRequest is the Query/VotesByProposal request type. */ -export interface QueryVotesByProposalRequest { - /** proposal_id is the unique ID of a proposal. */ - proposalId: bigint; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryVotesByProposalRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryVotesByProposalRequest"; - value: Uint8Array; -} -/** QueryVotesByProposalRequest is the Query/VotesByProposal request type. */ -export interface QueryVotesByProposalRequestAmino { - /** proposal_id is the unique ID of a proposal. */ - proposal_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryVotesByProposalRequestAminoMsg { - type: "cosmos-sdk/QueryVotesByProposalRequest"; - value: QueryVotesByProposalRequestAmino; -} -/** QueryVotesByProposalRequest is the Query/VotesByProposal request type. */ -export interface QueryVotesByProposalRequestSDKType { - proposal_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** QueryVotesByProposalResponse is the Query/VotesByProposal response type. */ -export interface QueryVotesByProposalResponse { - /** votes are the list of votes for given proposal_id. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryVotesByProposalResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryVotesByProposalResponse"; - value: Uint8Array; -} -/** QueryVotesByProposalResponse is the Query/VotesByProposal response type. */ -export interface QueryVotesByProposalResponseAmino { - /** votes are the list of votes for given proposal_id. */ - votes: VoteAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryVotesByProposalResponseAminoMsg { - type: "cosmos-sdk/QueryVotesByProposalResponse"; - value: QueryVotesByProposalResponseAmino; -} -/** QueryVotesByProposalResponse is the Query/VotesByProposal response type. */ -export interface QueryVotesByProposalResponseSDKType { - votes: VoteSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryVotesByVoterRequest is the Query/VotesByVoter request type. */ -export interface QueryVotesByVoterRequest { - /** voter is a proposal voter account address. */ - voter: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryVotesByVoterRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryVotesByVoterRequest"; - value: Uint8Array; -} -/** QueryVotesByVoterRequest is the Query/VotesByVoter request type. */ -export interface QueryVotesByVoterRequestAmino { - /** voter is a proposal voter account address. */ - voter: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryVotesByVoterRequestAminoMsg { - type: "cosmos-sdk/QueryVotesByVoterRequest"; - value: QueryVotesByVoterRequestAmino; -} -/** QueryVotesByVoterRequest is the Query/VotesByVoter request type. */ -export interface QueryVotesByVoterRequestSDKType { - voter: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryVotesByVoterResponse is the Query/VotesByVoter response type. */ -export interface QueryVotesByVoterResponse { - /** votes are the list of votes by given voter. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryVotesByVoterResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryVotesByVoterResponse"; - value: Uint8Array; -} -/** QueryVotesByVoterResponse is the Query/VotesByVoter response type. */ -export interface QueryVotesByVoterResponseAmino { - /** votes are the list of votes by given voter. */ - votes: VoteAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryVotesByVoterResponseAminoMsg { - type: "cosmos-sdk/QueryVotesByVoterResponse"; - value: QueryVotesByVoterResponseAmino; -} -/** QueryVotesByVoterResponse is the Query/VotesByVoter response type. */ -export interface QueryVotesByVoterResponseSDKType { - votes: VoteSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryGroupsByMemberRequest is the Query/GroupsByMember request type. */ -export interface QueryGroupsByMemberRequest { - /** address is the group member address. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryGroupsByMemberRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupsByMemberRequest"; - value: Uint8Array; -} -/** QueryGroupsByMemberRequest is the Query/GroupsByMember request type. */ -export interface QueryGroupsByMemberRequestAmino { - /** address is the group member address. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryGroupsByMemberRequestAminoMsg { - type: "cosmos-sdk/QueryGroupsByMemberRequest"; - value: QueryGroupsByMemberRequestAmino; -} -/** QueryGroupsByMemberRequest is the Query/GroupsByMember request type. */ -export interface QueryGroupsByMemberRequestSDKType { - address: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryGroupsByMemberResponse is the Query/GroupsByMember response type. */ -export interface QueryGroupsByMemberResponse { - /** groups are the groups info with the provided group member. */ - groups: GroupInfo[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryGroupsByMemberResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryGroupsByMemberResponse"; - value: Uint8Array; -} -/** QueryGroupsByMemberResponse is the Query/GroupsByMember response type. */ -export interface QueryGroupsByMemberResponseAmino { - /** groups are the groups info with the provided group member. */ - groups: GroupInfoAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryGroupsByMemberResponseAminoMsg { - type: "cosmos-sdk/QueryGroupsByMemberResponse"; - value: QueryGroupsByMemberResponseAmino; -} -/** QueryGroupsByMemberResponse is the Query/GroupsByMember response type. */ -export interface QueryGroupsByMemberResponseSDKType { - groups: GroupInfoSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryTallyResultRequest is the Query/TallyResult request type. */ -export interface QueryTallyResultRequest { - /** proposal_id is the unique id of a proposal. */ - proposalId: bigint; -} -export interface QueryTallyResultRequestProtoMsg { - typeUrl: "/cosmos.group.v1.QueryTallyResultRequest"; - value: Uint8Array; -} -/** QueryTallyResultRequest is the Query/TallyResult request type. */ -export interface QueryTallyResultRequestAmino { - /** proposal_id is the unique id of a proposal. */ - proposal_id: string; -} -export interface QueryTallyResultRequestAminoMsg { - type: "cosmos-sdk/QueryTallyResultRequest"; - value: QueryTallyResultRequestAmino; -} -/** QueryTallyResultRequest is the Query/TallyResult request type. */ -export interface QueryTallyResultRequestSDKType { - proposal_id: bigint; -} -/** QueryTallyResultResponse is the Query/TallyResult response type. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally: TallyResult | undefined; -} -export interface QueryTallyResultResponseProtoMsg { - typeUrl: "/cosmos.group.v1.QueryTallyResultResponse"; - value: Uint8Array; -} -/** QueryTallyResultResponse is the Query/TallyResult response type. */ -export interface QueryTallyResultResponseAmino { - /** tally defines the requested tally. */ - tally?: TallyResultAmino | undefined; -} -export interface QueryTallyResultResponseAminoMsg { - type: "cosmos-sdk/QueryTallyResultResponse"; - value: QueryTallyResultResponseAmino; -} -/** QueryTallyResultResponse is the Query/TallyResult response type. */ -export interface QueryTallyResultResponseSDKType { - tally: TallyResultSDKType | undefined; -} -function createBaseQueryGroupInfoRequest(): QueryGroupInfoRequest { - return { - groupId: BigInt(0) - }; -} -export const QueryGroupInfoRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupInfoRequest", - aminoType: "cosmos-sdk/QueryGroupInfoRequest", - encode(message: QueryGroupInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupInfoRequest { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryGroupInfoRequest): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupInfoRequest { - const message = createBaseQueryGroupInfoRequest(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryGroupInfoRequestSDKType): QueryGroupInfoRequest { - return { - groupId: object?.group_id - }; - }, - toSDK(message: QueryGroupInfoRequest): QueryGroupInfoRequestSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - return obj; - }, - fromAmino(object: QueryGroupInfoRequestAmino): QueryGroupInfoRequest { - return { - groupId: BigInt(object.group_id) - }; - }, - toAmino(message: QueryGroupInfoRequest): QueryGroupInfoRequestAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupInfoRequestAminoMsg): QueryGroupInfoRequest { - return QueryGroupInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupInfoRequest): QueryGroupInfoRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupInfoRequest", - value: QueryGroupInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupInfoRequestProtoMsg): QueryGroupInfoRequest { - return QueryGroupInfoRequest.decode(message.value); - }, - toProto(message: QueryGroupInfoRequest): Uint8Array { - return QueryGroupInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupInfoRequest): QueryGroupInfoRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupInfoRequest", - value: QueryGroupInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupInfoResponse(): QueryGroupInfoResponse { - return { - info: GroupInfo.fromPartial({}) - }; -} -export const QueryGroupInfoResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupInfoResponse", - aminoType: "cosmos-sdk/QueryGroupInfoResponse", - encode(message: QueryGroupInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.info !== undefined) { - GroupInfo.encode(message.info, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info = GroupInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupInfoResponse { - return { - info: isSet(object.info) ? GroupInfo.fromJSON(object.info) : undefined - }; - }, - toJSON(message: QueryGroupInfoResponse): unknown { - const obj: any = {}; - message.info !== undefined && (obj.info = message.info ? GroupInfo.toJSON(message.info) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupInfoResponse { - const message = createBaseQueryGroupInfoResponse(); - message.info = object.info !== undefined && object.info !== null ? GroupInfo.fromPartial(object.info) : undefined; - return message; - }, - fromSDK(object: QueryGroupInfoResponseSDKType): QueryGroupInfoResponse { - return { - info: object.info ? GroupInfo.fromSDK(object.info) : undefined - }; - }, - toSDK(message: QueryGroupInfoResponse): QueryGroupInfoResponseSDKType { - const obj: any = {}; - message.info !== undefined && (obj.info = message.info ? GroupInfo.toSDK(message.info) : undefined); - return obj; - }, - fromAmino(object: QueryGroupInfoResponseAmino): QueryGroupInfoResponse { - return { - info: object?.info ? GroupInfo.fromAmino(object.info) : undefined - }; - }, - toAmino(message: QueryGroupInfoResponse): QueryGroupInfoResponseAmino { - const obj: any = {}; - obj.info = message.info ? GroupInfo.toAmino(message.info) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupInfoResponseAminoMsg): QueryGroupInfoResponse { - return QueryGroupInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupInfoResponse): QueryGroupInfoResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupInfoResponse", - value: QueryGroupInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupInfoResponseProtoMsg): QueryGroupInfoResponse { - return QueryGroupInfoResponse.decode(message.value); - }, - toProto(message: QueryGroupInfoResponse): Uint8Array { - return QueryGroupInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupInfoResponse): QueryGroupInfoResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupInfoResponse", - value: QueryGroupInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGroupPolicyInfoRequest(): QueryGroupPolicyInfoRequest { - return { - address: "" - }; -} -export const QueryGroupPolicyInfoRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupPolicyInfoRequest", - aminoType: "cosmos-sdk/QueryGroupPolicyInfoRequest", - encode(message: QueryGroupPolicyInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPolicyInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPolicyInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupPolicyInfoRequest { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: QueryGroupPolicyInfoRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupPolicyInfoRequest { - const message = createBaseQueryGroupPolicyInfoRequest(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: QueryGroupPolicyInfoRequestSDKType): QueryGroupPolicyInfoRequest { - return { - address: object?.address - }; - }, - toSDK(message: QueryGroupPolicyInfoRequest): QueryGroupPolicyInfoRequestSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: QueryGroupPolicyInfoRequestAmino): QueryGroupPolicyInfoRequest { - return { - address: object.address - }; - }, - toAmino(message: QueryGroupPolicyInfoRequest): QueryGroupPolicyInfoRequestAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: QueryGroupPolicyInfoRequestAminoMsg): QueryGroupPolicyInfoRequest { - return QueryGroupPolicyInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupPolicyInfoRequest): QueryGroupPolicyInfoRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupPolicyInfoRequest", - value: QueryGroupPolicyInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupPolicyInfoRequestProtoMsg): QueryGroupPolicyInfoRequest { - return QueryGroupPolicyInfoRequest.decode(message.value); - }, - toProto(message: QueryGroupPolicyInfoRequest): Uint8Array { - return QueryGroupPolicyInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupPolicyInfoRequest): QueryGroupPolicyInfoRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupPolicyInfoRequest", - value: QueryGroupPolicyInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupPolicyInfoResponse(): QueryGroupPolicyInfoResponse { - return { - info: GroupPolicyInfo.fromPartial({}) - }; -} -export const QueryGroupPolicyInfoResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupPolicyInfoResponse", - aminoType: "cosmos-sdk/QueryGroupPolicyInfoResponse", - encode(message: QueryGroupPolicyInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.info !== undefined) { - GroupPolicyInfo.encode(message.info, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPolicyInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPolicyInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info = GroupPolicyInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupPolicyInfoResponse { - return { - info: isSet(object.info) ? GroupPolicyInfo.fromJSON(object.info) : undefined - }; - }, - toJSON(message: QueryGroupPolicyInfoResponse): unknown { - const obj: any = {}; - message.info !== undefined && (obj.info = message.info ? GroupPolicyInfo.toJSON(message.info) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupPolicyInfoResponse { - const message = createBaseQueryGroupPolicyInfoResponse(); - message.info = object.info !== undefined && object.info !== null ? GroupPolicyInfo.fromPartial(object.info) : undefined; - return message; - }, - fromSDK(object: QueryGroupPolicyInfoResponseSDKType): QueryGroupPolicyInfoResponse { - return { - info: object.info ? GroupPolicyInfo.fromSDK(object.info) : undefined - }; - }, - toSDK(message: QueryGroupPolicyInfoResponse): QueryGroupPolicyInfoResponseSDKType { - const obj: any = {}; - message.info !== undefined && (obj.info = message.info ? GroupPolicyInfo.toSDK(message.info) : undefined); - return obj; - }, - fromAmino(object: QueryGroupPolicyInfoResponseAmino): QueryGroupPolicyInfoResponse { - return { - info: object?.info ? GroupPolicyInfo.fromAmino(object.info) : undefined - }; - }, - toAmino(message: QueryGroupPolicyInfoResponse): QueryGroupPolicyInfoResponseAmino { - const obj: any = {}; - obj.info = message.info ? GroupPolicyInfo.toAmino(message.info) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupPolicyInfoResponseAminoMsg): QueryGroupPolicyInfoResponse { - return QueryGroupPolicyInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupPolicyInfoResponse): QueryGroupPolicyInfoResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupPolicyInfoResponse", - value: QueryGroupPolicyInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupPolicyInfoResponseProtoMsg): QueryGroupPolicyInfoResponse { - return QueryGroupPolicyInfoResponse.decode(message.value); - }, - toProto(message: QueryGroupPolicyInfoResponse): Uint8Array { - return QueryGroupPolicyInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupPolicyInfoResponse): QueryGroupPolicyInfoResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupPolicyInfoResponse", - value: QueryGroupPolicyInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGroupMembersRequest(): QueryGroupMembersRequest { - return { - groupId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGroupMembersRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupMembersRequest", - aminoType: "cosmos-sdk/QueryGroupMembersRequest", - encode(message: QueryGroupMembersRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupMembersRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupMembersRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupMembersRequest { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupMembersRequest): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupMembersRequest { - const message = createBaseQueryGroupMembersRequest(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupMembersRequestSDKType): QueryGroupMembersRequest { - return { - groupId: object?.group_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupMembersRequest): QueryGroupMembersRequestSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupMembersRequestAmino): QueryGroupMembersRequest { - return { - groupId: BigInt(object.group_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupMembersRequest): QueryGroupMembersRequestAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupMembersRequestAminoMsg): QueryGroupMembersRequest { - return QueryGroupMembersRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupMembersRequest): QueryGroupMembersRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupMembersRequest", - value: QueryGroupMembersRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupMembersRequestProtoMsg): QueryGroupMembersRequest { - return QueryGroupMembersRequest.decode(message.value); - }, - toProto(message: QueryGroupMembersRequest): Uint8Array { - return QueryGroupMembersRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupMembersRequest): QueryGroupMembersRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupMembersRequest", - value: QueryGroupMembersRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupMembersResponse(): QueryGroupMembersResponse { - return { - members: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGroupMembersResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupMembersResponse", - aminoType: "cosmos-sdk/QueryGroupMembersResponse", - encode(message: QueryGroupMembersResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.members) { - GroupMember.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupMembersResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupMembersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.members.push(GroupMember.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupMembersResponse { - return { - members: Array.isArray(object?.members) ? object.members.map((e: any) => GroupMember.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupMembersResponse): unknown { - const obj: any = {}; - if (message.members) { - obj.members = message.members.map(e => e ? GroupMember.toJSON(e) : undefined); - } else { - obj.members = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupMembersResponse { - const message = createBaseQueryGroupMembersResponse(); - message.members = object.members?.map(e => GroupMember.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupMembersResponseSDKType): QueryGroupMembersResponse { - return { - members: Array.isArray(object?.members) ? object.members.map((e: any) => GroupMember.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupMembersResponse): QueryGroupMembersResponseSDKType { - const obj: any = {}; - if (message.members) { - obj.members = message.members.map(e => e ? GroupMember.toSDK(e) : undefined); - } else { - obj.members = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupMembersResponseAmino): QueryGroupMembersResponse { - return { - members: Array.isArray(object?.members) ? object.members.map((e: any) => GroupMember.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupMembersResponse): QueryGroupMembersResponseAmino { - const obj: any = {}; - if (message.members) { - obj.members = message.members.map(e => e ? GroupMember.toAmino(e) : undefined); - } else { - obj.members = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupMembersResponseAminoMsg): QueryGroupMembersResponse { - return QueryGroupMembersResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupMembersResponse): QueryGroupMembersResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupMembersResponse", - value: QueryGroupMembersResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupMembersResponseProtoMsg): QueryGroupMembersResponse { - return QueryGroupMembersResponse.decode(message.value); - }, - toProto(message: QueryGroupMembersResponse): Uint8Array { - return QueryGroupMembersResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupMembersResponse): QueryGroupMembersResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupMembersResponse", - value: QueryGroupMembersResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGroupsByAdminRequest(): QueryGroupsByAdminRequest { - return { - admin: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGroupsByAdminRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupsByAdminRequest", - aminoType: "cosmos-sdk/QueryGroupsByAdminRequest", - encode(message: QueryGroupsByAdminRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByAdminRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByAdminRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupsByAdminRequest { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupsByAdminRequest): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupsByAdminRequest { - const message = createBaseQueryGroupsByAdminRequest(); - message.admin = object.admin ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupsByAdminRequestSDKType): QueryGroupsByAdminRequest { - return { - admin: object?.admin, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupsByAdminRequest): QueryGroupsByAdminRequestSDKType { - const obj: any = {}; - obj.admin = message.admin; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupsByAdminRequestAmino): QueryGroupsByAdminRequest { - return { - admin: object.admin, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupsByAdminRequest): QueryGroupsByAdminRequestAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupsByAdminRequestAminoMsg): QueryGroupsByAdminRequest { - return QueryGroupsByAdminRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupsByAdminRequest): QueryGroupsByAdminRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupsByAdminRequest", - value: QueryGroupsByAdminRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupsByAdminRequestProtoMsg): QueryGroupsByAdminRequest { - return QueryGroupsByAdminRequest.decode(message.value); - }, - toProto(message: QueryGroupsByAdminRequest): Uint8Array { - return QueryGroupsByAdminRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupsByAdminRequest): QueryGroupsByAdminRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupsByAdminRequest", - value: QueryGroupsByAdminRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupsByAdminResponse(): QueryGroupsByAdminResponse { - return { - groups: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGroupsByAdminResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupsByAdminResponse", - aminoType: "cosmos-sdk/QueryGroupsByAdminResponse", - encode(message: QueryGroupsByAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupsByAdminResponse { - return { - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupsByAdminResponse): unknown { - const obj: any = {}; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toJSON(e) : undefined); - } else { - obj.groups = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupsByAdminResponse { - const message = createBaseQueryGroupsByAdminResponse(); - message.groups = object.groups?.map(e => GroupInfo.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupsByAdminResponseSDKType): QueryGroupsByAdminResponse { - return { - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupsByAdminResponse): QueryGroupsByAdminResponseSDKType { - const obj: any = {}; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toSDK(e) : undefined); - } else { - obj.groups = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupsByAdminResponseAmino): QueryGroupsByAdminResponse { - return { - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupsByAdminResponse): QueryGroupsByAdminResponseAmino { - const obj: any = {}; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toAmino(e) : undefined); - } else { - obj.groups = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupsByAdminResponseAminoMsg): QueryGroupsByAdminResponse { - return QueryGroupsByAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupsByAdminResponse): QueryGroupsByAdminResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupsByAdminResponse", - value: QueryGroupsByAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupsByAdminResponseProtoMsg): QueryGroupsByAdminResponse { - return QueryGroupsByAdminResponse.decode(message.value); - }, - toProto(message: QueryGroupsByAdminResponse): Uint8Array { - return QueryGroupsByAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupsByAdminResponse): QueryGroupsByAdminResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupsByAdminResponse", - value: QueryGroupsByAdminResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGroupPoliciesByGroupRequest(): QueryGroupPoliciesByGroupRequest { - return { - groupId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGroupPoliciesByGroupRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByGroupRequest", - aminoType: "cosmos-sdk/QueryGroupPoliciesByGroupRequest", - encode(message: QueryGroupPoliciesByGroupRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByGroupRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByGroupRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupPoliciesByGroupRequest { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupPoliciesByGroupRequest): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByGroupRequest { - const message = createBaseQueryGroupPoliciesByGroupRequest(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupPoliciesByGroupRequestSDKType): QueryGroupPoliciesByGroupRequest { - return { - groupId: object?.group_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupPoliciesByGroupRequest): QueryGroupPoliciesByGroupRequestSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupPoliciesByGroupRequestAmino): QueryGroupPoliciesByGroupRequest { - return { - groupId: BigInt(object.group_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupPoliciesByGroupRequest): QueryGroupPoliciesByGroupRequestAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupPoliciesByGroupRequestAminoMsg): QueryGroupPoliciesByGroupRequest { - return QueryGroupPoliciesByGroupRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupPoliciesByGroupRequest): QueryGroupPoliciesByGroupRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupPoliciesByGroupRequest", - value: QueryGroupPoliciesByGroupRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupPoliciesByGroupRequestProtoMsg): QueryGroupPoliciesByGroupRequest { - return QueryGroupPoliciesByGroupRequest.decode(message.value); - }, - toProto(message: QueryGroupPoliciesByGroupRequest): Uint8Array { - return QueryGroupPoliciesByGroupRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupPoliciesByGroupRequest): QueryGroupPoliciesByGroupRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByGroupRequest", - value: QueryGroupPoliciesByGroupRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupPoliciesByGroupResponse(): QueryGroupPoliciesByGroupResponse { - return { - groupPolicies: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGroupPoliciesByGroupResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByGroupResponse", - aminoType: "cosmos-sdk/QueryGroupPoliciesByGroupResponse", - encode(message: QueryGroupPoliciesByGroupResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.groupPolicies) { - GroupPolicyInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByGroupResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByGroupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupPolicies.push(GroupPolicyInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupPoliciesByGroupResponse { - return { - groupPolicies: Array.isArray(object?.groupPolicies) ? object.groupPolicies.map((e: any) => GroupPolicyInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupPoliciesByGroupResponse): unknown { - const obj: any = {}; - if (message.groupPolicies) { - obj.groupPolicies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toJSON(e) : undefined); - } else { - obj.groupPolicies = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByGroupResponse { - const message = createBaseQueryGroupPoliciesByGroupResponse(); - message.groupPolicies = object.groupPolicies?.map(e => GroupPolicyInfo.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupPoliciesByGroupResponseSDKType): QueryGroupPoliciesByGroupResponse { - return { - groupPolicies: Array.isArray(object?.group_policies) ? object.group_policies.map((e: any) => GroupPolicyInfo.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupPoliciesByGroupResponse): QueryGroupPoliciesByGroupResponseSDKType { - const obj: any = {}; - if (message.groupPolicies) { - obj.group_policies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toSDK(e) : undefined); - } else { - obj.group_policies = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupPoliciesByGroupResponseAmino): QueryGroupPoliciesByGroupResponse { - return { - groupPolicies: Array.isArray(object?.group_policies) ? object.group_policies.map((e: any) => GroupPolicyInfo.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupPoliciesByGroupResponse): QueryGroupPoliciesByGroupResponseAmino { - const obj: any = {}; - if (message.groupPolicies) { - obj.group_policies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toAmino(e) : undefined); - } else { - obj.group_policies = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupPoliciesByGroupResponseAminoMsg): QueryGroupPoliciesByGroupResponse { - return QueryGroupPoliciesByGroupResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupPoliciesByGroupResponse): QueryGroupPoliciesByGroupResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupPoliciesByGroupResponse", - value: QueryGroupPoliciesByGroupResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupPoliciesByGroupResponseProtoMsg): QueryGroupPoliciesByGroupResponse { - return QueryGroupPoliciesByGroupResponse.decode(message.value); - }, - toProto(message: QueryGroupPoliciesByGroupResponse): Uint8Array { - return QueryGroupPoliciesByGroupResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupPoliciesByGroupResponse): QueryGroupPoliciesByGroupResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByGroupResponse", - value: QueryGroupPoliciesByGroupResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGroupPoliciesByAdminRequest(): QueryGroupPoliciesByAdminRequest { - return { - admin: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGroupPoliciesByAdminRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByAdminRequest", - aminoType: "cosmos-sdk/QueryGroupPoliciesByAdminRequest", - encode(message: QueryGroupPoliciesByAdminRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByAdminRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByAdminRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupPoliciesByAdminRequest { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupPoliciesByAdminRequest): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByAdminRequest { - const message = createBaseQueryGroupPoliciesByAdminRequest(); - message.admin = object.admin ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupPoliciesByAdminRequestSDKType): QueryGroupPoliciesByAdminRequest { - return { - admin: object?.admin, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupPoliciesByAdminRequest): QueryGroupPoliciesByAdminRequestSDKType { - const obj: any = {}; - obj.admin = message.admin; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupPoliciesByAdminRequestAmino): QueryGroupPoliciesByAdminRequest { - return { - admin: object.admin, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupPoliciesByAdminRequest): QueryGroupPoliciesByAdminRequestAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupPoliciesByAdminRequestAminoMsg): QueryGroupPoliciesByAdminRequest { - return QueryGroupPoliciesByAdminRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupPoliciesByAdminRequest): QueryGroupPoliciesByAdminRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupPoliciesByAdminRequest", - value: QueryGroupPoliciesByAdminRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupPoliciesByAdminRequestProtoMsg): QueryGroupPoliciesByAdminRequest { - return QueryGroupPoliciesByAdminRequest.decode(message.value); - }, - toProto(message: QueryGroupPoliciesByAdminRequest): Uint8Array { - return QueryGroupPoliciesByAdminRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupPoliciesByAdminRequest): QueryGroupPoliciesByAdminRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByAdminRequest", - value: QueryGroupPoliciesByAdminRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupPoliciesByAdminResponse(): QueryGroupPoliciesByAdminResponse { - return { - groupPolicies: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGroupPoliciesByAdminResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByAdminResponse", - aminoType: "cosmos-sdk/QueryGroupPoliciesByAdminResponse", - encode(message: QueryGroupPoliciesByAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.groupPolicies) { - GroupPolicyInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupPolicies.push(GroupPolicyInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupPoliciesByAdminResponse { - return { - groupPolicies: Array.isArray(object?.groupPolicies) ? object.groupPolicies.map((e: any) => GroupPolicyInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupPoliciesByAdminResponse): unknown { - const obj: any = {}; - if (message.groupPolicies) { - obj.groupPolicies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toJSON(e) : undefined); - } else { - obj.groupPolicies = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByAdminResponse { - const message = createBaseQueryGroupPoliciesByAdminResponse(); - message.groupPolicies = object.groupPolicies?.map(e => GroupPolicyInfo.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupPoliciesByAdminResponseSDKType): QueryGroupPoliciesByAdminResponse { - return { - groupPolicies: Array.isArray(object?.group_policies) ? object.group_policies.map((e: any) => GroupPolicyInfo.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupPoliciesByAdminResponse): QueryGroupPoliciesByAdminResponseSDKType { - const obj: any = {}; - if (message.groupPolicies) { - obj.group_policies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toSDK(e) : undefined); - } else { - obj.group_policies = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupPoliciesByAdminResponseAmino): QueryGroupPoliciesByAdminResponse { - return { - groupPolicies: Array.isArray(object?.group_policies) ? object.group_policies.map((e: any) => GroupPolicyInfo.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupPoliciesByAdminResponse): QueryGroupPoliciesByAdminResponseAmino { - const obj: any = {}; - if (message.groupPolicies) { - obj.group_policies = message.groupPolicies.map(e => e ? GroupPolicyInfo.toAmino(e) : undefined); - } else { - obj.group_policies = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupPoliciesByAdminResponseAminoMsg): QueryGroupPoliciesByAdminResponse { - return QueryGroupPoliciesByAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupPoliciesByAdminResponse): QueryGroupPoliciesByAdminResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupPoliciesByAdminResponse", - value: QueryGroupPoliciesByAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupPoliciesByAdminResponseProtoMsg): QueryGroupPoliciesByAdminResponse { - return QueryGroupPoliciesByAdminResponse.decode(message.value); - }, - toProto(message: QueryGroupPoliciesByAdminResponse): Uint8Array { - return QueryGroupPoliciesByAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupPoliciesByAdminResponse): QueryGroupPoliciesByAdminResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupPoliciesByAdminResponse", - value: QueryGroupPoliciesByAdminResponse.encode(message).finish() - }; - } -}; -function createBaseQueryProposalRequest(): QueryProposalRequest { - return { - proposalId: BigInt(0) - }; -} -export const QueryProposalRequest = { - typeUrl: "/cosmos.group.v1.QueryProposalRequest", - aminoType: "cosmos-sdk/QueryProposalRequest", - encode(message: QueryProposalRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryProposalRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalRequest { - const message = createBaseQueryProposalRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryProposalRequestSDKType): QueryProposalRequest { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: QueryProposalRequest): QueryProposalRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: QueryProposalRequestAmino): QueryProposalRequest { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: QueryProposalRequest): QueryProposalRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalRequestAminoMsg): QueryProposalRequest { - return QueryProposalRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalRequest): QueryProposalRequestAminoMsg { - return { - type: "cosmos-sdk/QueryProposalRequest", - value: QueryProposalRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalRequestProtoMsg): QueryProposalRequest { - return QueryProposalRequest.decode(message.value); - }, - toProto(message: QueryProposalRequest): Uint8Array { - return QueryProposalRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalRequest): QueryProposalRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryProposalRequest", - value: QueryProposalRequest.encode(message).finish() - }; - } -}; -function createBaseQueryProposalResponse(): QueryProposalResponse { - return { - proposal: Proposal.fromPartial({}) - }; -} -export const QueryProposalResponse = { - typeUrl: "/cosmos.group.v1.QueryProposalResponse", - aminoType: "cosmos-sdk/QueryProposalResponse", - encode(message: QueryProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal = Proposal.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalResponse { - return { - proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined - }; - }, - toJSON(message: QueryProposalResponse): unknown { - const obj: any = {}; - message.proposal !== undefined && (obj.proposal = message.proposal ? Proposal.toJSON(message.proposal) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalResponse { - const message = createBaseQueryProposalResponse(); - message.proposal = object.proposal !== undefined && object.proposal !== null ? Proposal.fromPartial(object.proposal) : undefined; - return message; - }, - fromSDK(object: QueryProposalResponseSDKType): QueryProposalResponse { - return { - proposal: object.proposal ? Proposal.fromSDK(object.proposal) : undefined - }; - }, - toSDK(message: QueryProposalResponse): QueryProposalResponseSDKType { - const obj: any = {}; - message.proposal !== undefined && (obj.proposal = message.proposal ? Proposal.toSDK(message.proposal) : undefined); - return obj; - }, - fromAmino(object: QueryProposalResponseAmino): QueryProposalResponse { - return { - proposal: object?.proposal ? Proposal.fromAmino(object.proposal) : undefined - }; - }, - toAmino(message: QueryProposalResponse): QueryProposalResponseAmino { - const obj: any = {}; - obj.proposal = message.proposal ? Proposal.toAmino(message.proposal) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalResponseAminoMsg): QueryProposalResponse { - return QueryProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalResponse): QueryProposalResponseAminoMsg { - return { - type: "cosmos-sdk/QueryProposalResponse", - value: QueryProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalResponseProtoMsg): QueryProposalResponse { - return QueryProposalResponse.decode(message.value); - }, - toProto(message: QueryProposalResponse): Uint8Array { - return QueryProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalResponse): QueryProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryProposalResponse", - value: QueryProposalResponse.encode(message).finish() - }; - } -}; -function createBaseQueryProposalsByGroupPolicyRequest(): QueryProposalsByGroupPolicyRequest { - return { - address: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryProposalsByGroupPolicyRequest = { - typeUrl: "/cosmos.group.v1.QueryProposalsByGroupPolicyRequest", - aminoType: "cosmos-sdk/QueryProposalsByGroupPolicyRequest", - encode(message: QueryProposalsByGroupPolicyRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsByGroupPolicyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsByGroupPolicyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalsByGroupPolicyRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryProposalsByGroupPolicyRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalsByGroupPolicyRequest { - const message = createBaseQueryProposalsByGroupPolicyRequest(); - message.address = object.address ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryProposalsByGroupPolicyRequestSDKType): QueryProposalsByGroupPolicyRequest { - return { - address: object?.address, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryProposalsByGroupPolicyRequest): QueryProposalsByGroupPolicyRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryProposalsByGroupPolicyRequestAmino): QueryProposalsByGroupPolicyRequest { - return { - address: object.address, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryProposalsByGroupPolicyRequest): QueryProposalsByGroupPolicyRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalsByGroupPolicyRequestAminoMsg): QueryProposalsByGroupPolicyRequest { - return QueryProposalsByGroupPolicyRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalsByGroupPolicyRequest): QueryProposalsByGroupPolicyRequestAminoMsg { - return { - type: "cosmos-sdk/QueryProposalsByGroupPolicyRequest", - value: QueryProposalsByGroupPolicyRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalsByGroupPolicyRequestProtoMsg): QueryProposalsByGroupPolicyRequest { - return QueryProposalsByGroupPolicyRequest.decode(message.value); - }, - toProto(message: QueryProposalsByGroupPolicyRequest): Uint8Array { - return QueryProposalsByGroupPolicyRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalsByGroupPolicyRequest): QueryProposalsByGroupPolicyRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryProposalsByGroupPolicyRequest", - value: QueryProposalsByGroupPolicyRequest.encode(message).finish() - }; - } -}; -function createBaseQueryProposalsByGroupPolicyResponse(): QueryProposalsByGroupPolicyResponse { - return { - proposals: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryProposalsByGroupPolicyResponse = { - typeUrl: "/cosmos.group.v1.QueryProposalsByGroupPolicyResponse", - aminoType: "cosmos-sdk/QueryProposalsByGroupPolicyResponse", - encode(message: QueryProposalsByGroupPolicyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsByGroupPolicyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsByGroupPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposals.push(Proposal.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryProposalsByGroupPolicyResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryProposalsByGroupPolicyResponse): unknown { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toJSON(e) : undefined); - } else { - obj.proposals = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryProposalsByGroupPolicyResponse { - const message = createBaseQueryProposalsByGroupPolicyResponse(); - message.proposals = object.proposals?.map(e => Proposal.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryProposalsByGroupPolicyResponseSDKType): QueryProposalsByGroupPolicyResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryProposalsByGroupPolicyResponse): QueryProposalsByGroupPolicyResponseSDKType { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toSDK(e) : undefined); - } else { - obj.proposals = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryProposalsByGroupPolicyResponseAmino): QueryProposalsByGroupPolicyResponse { - return { - proposals: Array.isArray(object?.proposals) ? object.proposals.map((e: any) => Proposal.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryProposalsByGroupPolicyResponse): QueryProposalsByGroupPolicyResponseAmino { - const obj: any = {}; - if (message.proposals) { - obj.proposals = message.proposals.map(e => e ? Proposal.toAmino(e) : undefined); - } else { - obj.proposals = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryProposalsByGroupPolicyResponseAminoMsg): QueryProposalsByGroupPolicyResponse { - return QueryProposalsByGroupPolicyResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryProposalsByGroupPolicyResponse): QueryProposalsByGroupPolicyResponseAminoMsg { - return { - type: "cosmos-sdk/QueryProposalsByGroupPolicyResponse", - value: QueryProposalsByGroupPolicyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryProposalsByGroupPolicyResponseProtoMsg): QueryProposalsByGroupPolicyResponse { - return QueryProposalsByGroupPolicyResponse.decode(message.value); - }, - toProto(message: QueryProposalsByGroupPolicyResponse): Uint8Array { - return QueryProposalsByGroupPolicyResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryProposalsByGroupPolicyResponse): QueryProposalsByGroupPolicyResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryProposalsByGroupPolicyResponse", - value: QueryProposalsByGroupPolicyResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVoteByProposalVoterRequest(): QueryVoteByProposalVoterRequest { - return { - proposalId: BigInt(0), - voter: "" - }; -} -export const QueryVoteByProposalVoterRequest = { - typeUrl: "/cosmos.group.v1.QueryVoteByProposalVoterRequest", - aminoType: "cosmos-sdk/QueryVoteByProposalVoterRequest", - encode(message: QueryVoteByProposalVoterRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteByProposalVoterRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteByProposalVoterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVoteByProposalVoterRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "" - }; - }, - toJSON(message: QueryVoteByProposalVoterRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - return obj; - }, - fromPartial(object: DeepPartial): QueryVoteByProposalVoterRequest { - const message = createBaseQueryVoteByProposalVoterRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - return message; - }, - fromSDK(object: QueryVoteByProposalVoterRequestSDKType): QueryVoteByProposalVoterRequest { - return { - proposalId: object?.proposal_id, - voter: object?.voter - }; - }, - toSDK(message: QueryVoteByProposalVoterRequest): QueryVoteByProposalVoterRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - return obj; - }, - fromAmino(object: QueryVoteByProposalVoterRequestAmino): QueryVoteByProposalVoterRequest { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter - }; - }, - toAmino(message: QueryVoteByProposalVoterRequest): QueryVoteByProposalVoterRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - return obj; - }, - fromAminoMsg(object: QueryVoteByProposalVoterRequestAminoMsg): QueryVoteByProposalVoterRequest { - return QueryVoteByProposalVoterRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVoteByProposalVoterRequest): QueryVoteByProposalVoterRequestAminoMsg { - return { - type: "cosmos-sdk/QueryVoteByProposalVoterRequest", - value: QueryVoteByProposalVoterRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVoteByProposalVoterRequestProtoMsg): QueryVoteByProposalVoterRequest { - return QueryVoteByProposalVoterRequest.decode(message.value); - }, - toProto(message: QueryVoteByProposalVoterRequest): Uint8Array { - return QueryVoteByProposalVoterRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVoteByProposalVoterRequest): QueryVoteByProposalVoterRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryVoteByProposalVoterRequest", - value: QueryVoteByProposalVoterRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVoteByProposalVoterResponse(): QueryVoteByProposalVoterResponse { - return { - vote: Vote.fromPartial({}) - }; -} -export const QueryVoteByProposalVoterResponse = { - typeUrl: "/cosmos.group.v1.QueryVoteByProposalVoterResponse", - aminoType: "cosmos-sdk/QueryVoteByProposalVoterResponse", - encode(message: QueryVoteByProposalVoterResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteByProposalVoterResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteByProposalVoterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vote = Vote.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVoteByProposalVoterResponse { - return { - vote: isSet(object.vote) ? Vote.fromJSON(object.vote) : undefined - }; - }, - toJSON(message: QueryVoteByProposalVoterResponse): unknown { - const obj: any = {}; - message.vote !== undefined && (obj.vote = message.vote ? Vote.toJSON(message.vote) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVoteByProposalVoterResponse { - const message = createBaseQueryVoteByProposalVoterResponse(); - message.vote = object.vote !== undefined && object.vote !== null ? Vote.fromPartial(object.vote) : undefined; - return message; - }, - fromSDK(object: QueryVoteByProposalVoterResponseSDKType): QueryVoteByProposalVoterResponse { - return { - vote: object.vote ? Vote.fromSDK(object.vote) : undefined - }; - }, - toSDK(message: QueryVoteByProposalVoterResponse): QueryVoteByProposalVoterResponseSDKType { - const obj: any = {}; - message.vote !== undefined && (obj.vote = message.vote ? Vote.toSDK(message.vote) : undefined); - return obj; - }, - fromAmino(object: QueryVoteByProposalVoterResponseAmino): QueryVoteByProposalVoterResponse { - return { - vote: object?.vote ? Vote.fromAmino(object.vote) : undefined - }; - }, - toAmino(message: QueryVoteByProposalVoterResponse): QueryVoteByProposalVoterResponseAmino { - const obj: any = {}; - obj.vote = message.vote ? Vote.toAmino(message.vote) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVoteByProposalVoterResponseAminoMsg): QueryVoteByProposalVoterResponse { - return QueryVoteByProposalVoterResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVoteByProposalVoterResponse): QueryVoteByProposalVoterResponseAminoMsg { - return { - type: "cosmos-sdk/QueryVoteByProposalVoterResponse", - value: QueryVoteByProposalVoterResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVoteByProposalVoterResponseProtoMsg): QueryVoteByProposalVoterResponse { - return QueryVoteByProposalVoterResponse.decode(message.value); - }, - toProto(message: QueryVoteByProposalVoterResponse): Uint8Array { - return QueryVoteByProposalVoterResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVoteByProposalVoterResponse): QueryVoteByProposalVoterResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryVoteByProposalVoterResponse", - value: QueryVoteByProposalVoterResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVotesByProposalRequest(): QueryVotesByProposalRequest { - return { - proposalId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryVotesByProposalRequest = { - typeUrl: "/cosmos.group.v1.QueryVotesByProposalRequest", - aminoType: "cosmos-sdk/QueryVotesByProposalRequest", - encode(message: QueryVotesByProposalRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByProposalRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByProposalRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesByProposalRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesByProposalRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesByProposalRequest { - const message = createBaseQueryVotesByProposalRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesByProposalRequestSDKType): QueryVotesByProposalRequest { - return { - proposalId: object?.proposal_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesByProposalRequest): QueryVotesByProposalRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesByProposalRequestAmino): QueryVotesByProposalRequest { - return { - proposalId: BigInt(object.proposal_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesByProposalRequest): QueryVotesByProposalRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesByProposalRequestAminoMsg): QueryVotesByProposalRequest { - return QueryVotesByProposalRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesByProposalRequest): QueryVotesByProposalRequestAminoMsg { - return { - type: "cosmos-sdk/QueryVotesByProposalRequest", - value: QueryVotesByProposalRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesByProposalRequestProtoMsg): QueryVotesByProposalRequest { - return QueryVotesByProposalRequest.decode(message.value); - }, - toProto(message: QueryVotesByProposalRequest): Uint8Array { - return QueryVotesByProposalRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesByProposalRequest): QueryVotesByProposalRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryVotesByProposalRequest", - value: QueryVotesByProposalRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVotesByProposalResponse(): QueryVotesByProposalResponse { - return { - votes: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryVotesByProposalResponse = { - typeUrl: "/cosmos.group.v1.QueryVotesByProposalResponse", - aminoType: "cosmos-sdk/QueryVotesByProposalResponse", - encode(message: QueryVotesByProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesByProposalResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesByProposalResponse): unknown { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesByProposalResponse { - const message = createBaseQueryVotesByProposalResponse(); - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesByProposalResponseSDKType): QueryVotesByProposalResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesByProposalResponse): QueryVotesByProposalResponseSDKType { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesByProposalResponseAmino): QueryVotesByProposalResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesByProposalResponse): QueryVotesByProposalResponseAmino { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesByProposalResponseAminoMsg): QueryVotesByProposalResponse { - return QueryVotesByProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesByProposalResponse): QueryVotesByProposalResponseAminoMsg { - return { - type: "cosmos-sdk/QueryVotesByProposalResponse", - value: QueryVotesByProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesByProposalResponseProtoMsg): QueryVotesByProposalResponse { - return QueryVotesByProposalResponse.decode(message.value); - }, - toProto(message: QueryVotesByProposalResponse): Uint8Array { - return QueryVotesByProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesByProposalResponse): QueryVotesByProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryVotesByProposalResponse", - value: QueryVotesByProposalResponse.encode(message).finish() - }; - } -}; -function createBaseQueryVotesByVoterRequest(): QueryVotesByVoterRequest { - return { - voter: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryVotesByVoterRequest = { - typeUrl: "/cosmos.group.v1.QueryVotesByVoterRequest", - aminoType: "cosmos-sdk/QueryVotesByVoterRequest", - encode(message: QueryVotesByVoterRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.voter !== "") { - writer.uint32(10).string(message.voter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByVoterRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByVoterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesByVoterRequest { - return { - voter: isSet(object.voter) ? String(object.voter) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesByVoterRequest): unknown { - const obj: any = {}; - message.voter !== undefined && (obj.voter = message.voter); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesByVoterRequest { - const message = createBaseQueryVotesByVoterRequest(); - message.voter = object.voter ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesByVoterRequestSDKType): QueryVotesByVoterRequest { - return { - voter: object?.voter, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesByVoterRequest): QueryVotesByVoterRequestSDKType { - const obj: any = {}; - obj.voter = message.voter; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesByVoterRequestAmino): QueryVotesByVoterRequest { - return { - voter: object.voter, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesByVoterRequest): QueryVotesByVoterRequestAmino { - const obj: any = {}; - obj.voter = message.voter; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesByVoterRequestAminoMsg): QueryVotesByVoterRequest { - return QueryVotesByVoterRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesByVoterRequest): QueryVotesByVoterRequestAminoMsg { - return { - type: "cosmos-sdk/QueryVotesByVoterRequest", - value: QueryVotesByVoterRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesByVoterRequestProtoMsg): QueryVotesByVoterRequest { - return QueryVotesByVoterRequest.decode(message.value); - }, - toProto(message: QueryVotesByVoterRequest): Uint8Array { - return QueryVotesByVoterRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesByVoterRequest): QueryVotesByVoterRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryVotesByVoterRequest", - value: QueryVotesByVoterRequest.encode(message).finish() - }; - } -}; -function createBaseQueryVotesByVoterResponse(): QueryVotesByVoterResponse { - return { - votes: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryVotesByVoterResponse = { - typeUrl: "/cosmos.group.v1.QueryVotesByVoterResponse", - aminoType: "cosmos-sdk/QueryVotesByVoterResponse", - encode(message: QueryVotesByVoterResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByVoterResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByVoterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votes.push(Vote.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryVotesByVoterResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryVotesByVoterResponse): unknown { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toJSON(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryVotesByVoterResponse { - const message = createBaseQueryVotesByVoterResponse(); - message.votes = object.votes?.map(e => Vote.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryVotesByVoterResponseSDKType): QueryVotesByVoterResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryVotesByVoterResponse): QueryVotesByVoterResponseSDKType { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toSDK(e) : undefined); - } else { - obj.votes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryVotesByVoterResponseAmino): QueryVotesByVoterResponse { - return { - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryVotesByVoterResponse): QueryVotesByVoterResponseAmino { - const obj: any = {}; - if (message.votes) { - obj.votes = message.votes.map(e => e ? Vote.toAmino(e) : undefined); - } else { - obj.votes = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryVotesByVoterResponseAminoMsg): QueryVotesByVoterResponse { - return QueryVotesByVoterResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryVotesByVoterResponse): QueryVotesByVoterResponseAminoMsg { - return { - type: "cosmos-sdk/QueryVotesByVoterResponse", - value: QueryVotesByVoterResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryVotesByVoterResponseProtoMsg): QueryVotesByVoterResponse { - return QueryVotesByVoterResponse.decode(message.value); - }, - toProto(message: QueryVotesByVoterResponse): Uint8Array { - return QueryVotesByVoterResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryVotesByVoterResponse): QueryVotesByVoterResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryVotesByVoterResponse", - value: QueryVotesByVoterResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGroupsByMemberRequest(): QueryGroupsByMemberRequest { - return { - address: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryGroupsByMemberRequest = { - typeUrl: "/cosmos.group.v1.QueryGroupsByMemberRequest", - aminoType: "cosmos-sdk/QueryGroupsByMemberRequest", - encode(message: QueryGroupsByMemberRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByMemberRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByMemberRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupsByMemberRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupsByMemberRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupsByMemberRequest { - const message = createBaseQueryGroupsByMemberRequest(); - message.address = object.address ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupsByMemberRequestSDKType): QueryGroupsByMemberRequest { - return { - address: object?.address, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupsByMemberRequest): QueryGroupsByMemberRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupsByMemberRequestAmino): QueryGroupsByMemberRequest { - return { - address: object.address, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupsByMemberRequest): QueryGroupsByMemberRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupsByMemberRequestAminoMsg): QueryGroupsByMemberRequest { - return QueryGroupsByMemberRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupsByMemberRequest): QueryGroupsByMemberRequestAminoMsg { - return { - type: "cosmos-sdk/QueryGroupsByMemberRequest", - value: QueryGroupsByMemberRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupsByMemberRequestProtoMsg): QueryGroupsByMemberRequest { - return QueryGroupsByMemberRequest.decode(message.value); - }, - toProto(message: QueryGroupsByMemberRequest): Uint8Array { - return QueryGroupsByMemberRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupsByMemberRequest): QueryGroupsByMemberRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupsByMemberRequest", - value: QueryGroupsByMemberRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGroupsByMemberResponse(): QueryGroupsByMemberResponse { - return { - groups: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryGroupsByMemberResponse = { - typeUrl: "/cosmos.group.v1.QueryGroupsByMemberResponse", - aminoType: "cosmos-sdk/QueryGroupsByMemberResponse", - encode(message: QueryGroupsByMemberResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByMemberResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByMemberResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGroupsByMemberResponse { - return { - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryGroupsByMemberResponse): unknown { - const obj: any = {}; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toJSON(e) : undefined); - } else { - obj.groups = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryGroupsByMemberResponse { - const message = createBaseQueryGroupsByMemberResponse(); - message.groups = object.groups?.map(e => GroupInfo.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryGroupsByMemberResponseSDKType): QueryGroupsByMemberResponse { - return { - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryGroupsByMemberResponse): QueryGroupsByMemberResponseSDKType { - const obj: any = {}; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toSDK(e) : undefined); - } else { - obj.groups = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryGroupsByMemberResponseAmino): QueryGroupsByMemberResponse { - return { - groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryGroupsByMemberResponse): QueryGroupsByMemberResponseAmino { - const obj: any = {}; - if (message.groups) { - obj.groups = message.groups.map(e => e ? GroupInfo.toAmino(e) : undefined); - } else { - obj.groups = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryGroupsByMemberResponseAminoMsg): QueryGroupsByMemberResponse { - return QueryGroupsByMemberResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGroupsByMemberResponse): QueryGroupsByMemberResponseAminoMsg { - return { - type: "cosmos-sdk/QueryGroupsByMemberResponse", - value: QueryGroupsByMemberResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGroupsByMemberResponseProtoMsg): QueryGroupsByMemberResponse { - return QueryGroupsByMemberResponse.decode(message.value); - }, - toProto(message: QueryGroupsByMemberResponse): Uint8Array { - return QueryGroupsByMemberResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGroupsByMemberResponse): QueryGroupsByMemberResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryGroupsByMemberResponse", - value: QueryGroupsByMemberResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { - return { - proposalId: BigInt(0) - }; -} -export const QueryTallyResultRequest = { - typeUrl: "/cosmos.group.v1.QueryTallyResultRequest", - aminoType: "cosmos-sdk/QueryTallyResultRequest", - encode(message: QueryTallyResultRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTallyResultRequest { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryTallyResultRequest): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryTallyResultRequest { - const message = createBaseQueryTallyResultRequest(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryTallyResultRequestSDKType): QueryTallyResultRequest { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: QueryTallyResultRequest): QueryTallyResultRequestSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: QueryTallyResultRequestAmino): QueryTallyResultRequest { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: QueryTallyResultRequest): QueryTallyResultRequestAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryTallyResultRequestAminoMsg): QueryTallyResultRequest { - return QueryTallyResultRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestAminoMsg { - return { - type: "cosmos-sdk/QueryTallyResultRequest", - value: QueryTallyResultRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTallyResultRequestProtoMsg): QueryTallyResultRequest { - return QueryTallyResultRequest.decode(message.value); - }, - toProto(message: QueryTallyResultRequest): Uint8Array { - return QueryTallyResultRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTallyResultRequest): QueryTallyResultRequestProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryTallyResultRequest", - value: QueryTallyResultRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { - return { - tally: TallyResult.fromPartial({}) - }; -} -export const QueryTallyResultResponse = { - typeUrl: "/cosmos.group.v1.QueryTallyResultResponse", - aminoType: "cosmos-sdk/QueryTallyResultResponse", - encode(message: QueryTallyResultResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tally = TallyResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTallyResultResponse { - return { - tally: isSet(object.tally) ? TallyResult.fromJSON(object.tally) : undefined - }; - }, - toJSON(message: QueryTallyResultResponse): unknown { - const obj: any = {}; - message.tally !== undefined && (obj.tally = message.tally ? TallyResult.toJSON(message.tally) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTallyResultResponse { - const message = createBaseQueryTallyResultResponse(); - message.tally = object.tally !== undefined && object.tally !== null ? TallyResult.fromPartial(object.tally) : undefined; - return message; - }, - fromSDK(object: QueryTallyResultResponseSDKType): QueryTallyResultResponse { - return { - tally: object.tally ? TallyResult.fromSDK(object.tally) : undefined - }; - }, - toSDK(message: QueryTallyResultResponse): QueryTallyResultResponseSDKType { - const obj: any = {}; - message.tally !== undefined && (obj.tally = message.tally ? TallyResult.toSDK(message.tally) : undefined); - return obj; - }, - fromAmino(object: QueryTallyResultResponseAmino): QueryTallyResultResponse { - return { - tally: object?.tally ? TallyResult.fromAmino(object.tally) : undefined - }; - }, - toAmino(message: QueryTallyResultResponse): QueryTallyResultResponseAmino { - const obj: any = {}; - obj.tally = message.tally ? TallyResult.toAmino(message.tally) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTallyResultResponseAminoMsg): QueryTallyResultResponse { - return QueryTallyResultResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseAminoMsg { - return { - type: "cosmos-sdk/QueryTallyResultResponse", - value: QueryTallyResultResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTallyResultResponseProtoMsg): QueryTallyResultResponse { - return QueryTallyResultResponse.decode(message.value); - }, - toProto(message: QueryTallyResultResponse): Uint8Array { - return QueryTallyResultResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTallyResultResponse): QueryTallyResultResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.QueryTallyResultResponse", - value: QueryTallyResultResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/tx.amino.ts deleted file mode 100644 index 25e97c5e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.amino.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; -export const AminoConverter = { - "/cosmos.group.v1.MsgCreateGroup": { - aminoType: "cosmos-sdk/MsgCreateGroup", - toAmino: MsgCreateGroup.toAmino, - fromAmino: MsgCreateGroup.fromAmino - }, - "/cosmos.group.v1.MsgUpdateGroupMembers": { - aminoType: "cosmos-sdk/MsgUpdateGroupMembers", - toAmino: MsgUpdateGroupMembers.toAmino, - fromAmino: MsgUpdateGroupMembers.fromAmino - }, - "/cosmos.group.v1.MsgUpdateGroupAdmin": { - aminoType: "cosmos-sdk/MsgUpdateGroupAdmin", - toAmino: MsgUpdateGroupAdmin.toAmino, - fromAmino: MsgUpdateGroupAdmin.fromAmino - }, - "/cosmos.group.v1.MsgUpdateGroupMetadata": { - aminoType: "cosmos-sdk/MsgUpdateGroupMetadata", - toAmino: MsgUpdateGroupMetadata.toAmino, - fromAmino: MsgUpdateGroupMetadata.fromAmino - }, - "/cosmos.group.v1.MsgCreateGroupPolicy": { - aminoType: "cosmos-sdk/MsgCreateGroupPolicy", - toAmino: MsgCreateGroupPolicy.toAmino, - fromAmino: MsgCreateGroupPolicy.fromAmino - }, - "/cosmos.group.v1.MsgCreateGroupWithPolicy": { - aminoType: "cosmos-sdk/MsgCreateGroupWithPolicy", - toAmino: MsgCreateGroupWithPolicy.toAmino, - fromAmino: MsgCreateGroupWithPolicy.fromAmino - }, - "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin": { - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyAdmin", - toAmino: MsgUpdateGroupPolicyAdmin.toAmino, - fromAmino: MsgUpdateGroupPolicyAdmin.fromAmino - }, - "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy": { - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy", - toAmino: MsgUpdateGroupPolicyDecisionPolicy.toAmino, - fromAmino: MsgUpdateGroupPolicyDecisionPolicy.fromAmino - }, - "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata": { - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyMetadata", - toAmino: MsgUpdateGroupPolicyMetadata.toAmino, - fromAmino: MsgUpdateGroupPolicyMetadata.fromAmino - }, - "/cosmos.group.v1.MsgSubmitProposal": { - aminoType: "cosmos-sdk/group/MsgSubmitProposal", - toAmino: MsgSubmitProposal.toAmino, - fromAmino: MsgSubmitProposal.fromAmino - }, - "/cosmos.group.v1.MsgWithdrawProposal": { - aminoType: "cosmos-sdk/group/MsgWithdrawProposal", - toAmino: MsgWithdrawProposal.toAmino, - fromAmino: MsgWithdrawProposal.fromAmino - }, - "/cosmos.group.v1.MsgVote": { - aminoType: "cosmos-sdk/group/MsgVote", - toAmino: MsgVote.toAmino, - fromAmino: MsgVote.fromAmino - }, - "/cosmos.group.v1.MsgExec": { - aminoType: "cosmos-sdk/group/MsgExec", - toAmino: MsgExec.toAmino, - fromAmino: MsgExec.fromAmino - }, - "/cosmos.group.v1.MsgLeaveGroup": { - aminoType: "cosmos-sdk/group/MsgLeaveGroup", - toAmino: MsgLeaveGroup.toAmino, - fromAmino: MsgLeaveGroup.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/tx.registry.ts deleted file mode 100644 index fab710b0..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.registry.ts +++ /dev/null @@ -1,441 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateGroup, MsgUpdateGroupMembers, MsgUpdateGroupAdmin, MsgUpdateGroupMetadata, MsgCreateGroupPolicy, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgWithdrawProposal, MsgVote, MsgExec, MsgLeaveGroup } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup], ["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], ["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin], ["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata], ["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy], ["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy], ["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin], ["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy], ["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", MsgUpdateGroupPolicyMetadata], ["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal], ["/cosmos.group.v1.MsgVote", MsgVote], ["/cosmos.group.v1.MsgExec", MsgExec], ["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createGroup(value: MsgCreateGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - value: MsgCreateGroup.encode(value).finish() - }; - }, - updateGroupMembers(value: MsgUpdateGroupMembers) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - value: MsgUpdateGroupMembers.encode(value).finish() - }; - }, - updateGroupAdmin(value: MsgUpdateGroupAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - value: MsgUpdateGroupAdmin.encode(value).finish() - }; - }, - updateGroupMetadata(value: MsgUpdateGroupMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - value: MsgUpdateGroupMetadata.encode(value).finish() - }; - }, - createGroupPolicy(value: MsgCreateGroupPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - value: MsgCreateGroupPolicy.encode(value).finish() - }; - }, - createGroupWithPolicy(value: MsgCreateGroupWithPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - value: MsgCreateGroupWithPolicy.encode(value).finish() - }; - }, - updateGroupPolicyAdmin(value: MsgUpdateGroupPolicyAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - value: MsgUpdateGroupPolicyAdmin.encode(value).finish() - }; - }, - updateGroupPolicyDecisionPolicy(value: MsgUpdateGroupPolicyDecisionPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - value: MsgUpdateGroupPolicyDecisionPolicy.encode(value).finish() - }; - }, - updateGroupPolicyMetadata(value: MsgUpdateGroupPolicyMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - value: MsgUpdateGroupPolicyMetadata.encode(value).finish() - }; - }, - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - value: MsgSubmitProposal.encode(value).finish() - }; - }, - withdrawProposal(value: MsgWithdrawProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - value: MsgWithdrawProposal.encode(value).finish() - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.group.v1.MsgVote", - value: MsgVote.encode(value).finish() - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.group.v1.MsgExec", - value: MsgExec.encode(value).finish() - }; - }, - leaveGroup(value: MsgLeaveGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - value: MsgLeaveGroup.encode(value).finish() - }; - } - }, - withTypeUrl: { - createGroup(value: MsgCreateGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - value - }; - }, - updateGroupMembers(value: MsgUpdateGroupMembers) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - value - }; - }, - updateGroupAdmin(value: MsgUpdateGroupAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - value - }; - }, - updateGroupMetadata(value: MsgUpdateGroupMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - value - }; - }, - createGroupPolicy(value: MsgCreateGroupPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - value - }; - }, - createGroupWithPolicy(value: MsgCreateGroupWithPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - value - }; - }, - updateGroupPolicyAdmin(value: MsgUpdateGroupPolicyAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - value - }; - }, - updateGroupPolicyDecisionPolicy(value: MsgUpdateGroupPolicyDecisionPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - value - }; - }, - updateGroupPolicyMetadata(value: MsgUpdateGroupPolicyMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - value - }; - }, - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - value - }; - }, - withdrawProposal(value: MsgWithdrawProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - value - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.group.v1.MsgVote", - value - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.group.v1.MsgExec", - value - }; - }, - leaveGroup(value: MsgLeaveGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - value - }; - } - }, - toJSON: { - createGroup(value: MsgCreateGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - value: MsgCreateGroup.toJSON(value) - }; - }, - updateGroupMembers(value: MsgUpdateGroupMembers) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - value: MsgUpdateGroupMembers.toJSON(value) - }; - }, - updateGroupAdmin(value: MsgUpdateGroupAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - value: MsgUpdateGroupAdmin.toJSON(value) - }; - }, - updateGroupMetadata(value: MsgUpdateGroupMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - value: MsgUpdateGroupMetadata.toJSON(value) - }; - }, - createGroupPolicy(value: MsgCreateGroupPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - value: MsgCreateGroupPolicy.toJSON(value) - }; - }, - createGroupWithPolicy(value: MsgCreateGroupWithPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - value: MsgCreateGroupWithPolicy.toJSON(value) - }; - }, - updateGroupPolicyAdmin(value: MsgUpdateGroupPolicyAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - value: MsgUpdateGroupPolicyAdmin.toJSON(value) - }; - }, - updateGroupPolicyDecisionPolicy(value: MsgUpdateGroupPolicyDecisionPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - value: MsgUpdateGroupPolicyDecisionPolicy.toJSON(value) - }; - }, - updateGroupPolicyMetadata(value: MsgUpdateGroupPolicyMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - value: MsgUpdateGroupPolicyMetadata.toJSON(value) - }; - }, - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - value: MsgSubmitProposal.toJSON(value) - }; - }, - withdrawProposal(value: MsgWithdrawProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - value: MsgWithdrawProposal.toJSON(value) - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.group.v1.MsgVote", - value: MsgVote.toJSON(value) - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.group.v1.MsgExec", - value: MsgExec.toJSON(value) - }; - }, - leaveGroup(value: MsgLeaveGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - value: MsgLeaveGroup.toJSON(value) - }; - } - }, - fromJSON: { - createGroup(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - value: MsgCreateGroup.fromJSON(value) - }; - }, - updateGroupMembers(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - value: MsgUpdateGroupMembers.fromJSON(value) - }; - }, - updateGroupAdmin(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - value: MsgUpdateGroupAdmin.fromJSON(value) - }; - }, - updateGroupMetadata(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - value: MsgUpdateGroupMetadata.fromJSON(value) - }; - }, - createGroupPolicy(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - value: MsgCreateGroupPolicy.fromJSON(value) - }; - }, - createGroupWithPolicy(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - value: MsgCreateGroupWithPolicy.fromJSON(value) - }; - }, - updateGroupPolicyAdmin(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - value: MsgUpdateGroupPolicyAdmin.fromJSON(value) - }; - }, - updateGroupPolicyDecisionPolicy(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - value: MsgUpdateGroupPolicyDecisionPolicy.fromJSON(value) - }; - }, - updateGroupPolicyMetadata(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - value: MsgUpdateGroupPolicyMetadata.fromJSON(value) - }; - }, - submitProposal(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - value: MsgSubmitProposal.fromJSON(value) - }; - }, - withdrawProposal(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - value: MsgWithdrawProposal.fromJSON(value) - }; - }, - vote(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgVote", - value: MsgVote.fromJSON(value) - }; - }, - exec(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgExec", - value: MsgExec.fromJSON(value) - }; - }, - leaveGroup(value: any) { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - value: MsgLeaveGroup.fromJSON(value) - }; - } - }, - fromPartial: { - createGroup(value: MsgCreateGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - value: MsgCreateGroup.fromPartial(value) - }; - }, - updateGroupMembers(value: MsgUpdateGroupMembers) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - value: MsgUpdateGroupMembers.fromPartial(value) - }; - }, - updateGroupAdmin(value: MsgUpdateGroupAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - value: MsgUpdateGroupAdmin.fromPartial(value) - }; - }, - updateGroupMetadata(value: MsgUpdateGroupMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - value: MsgUpdateGroupMetadata.fromPartial(value) - }; - }, - createGroupPolicy(value: MsgCreateGroupPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - value: MsgCreateGroupPolicy.fromPartial(value) - }; - }, - createGroupWithPolicy(value: MsgCreateGroupWithPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - value: MsgCreateGroupWithPolicy.fromPartial(value) - }; - }, - updateGroupPolicyAdmin(value: MsgUpdateGroupPolicyAdmin) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - value: MsgUpdateGroupPolicyAdmin.fromPartial(value) - }; - }, - updateGroupPolicyDecisionPolicy(value: MsgUpdateGroupPolicyDecisionPolicy) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) - }; - }, - updateGroupPolicyMetadata(value: MsgUpdateGroupPolicyMetadata) { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - value: MsgUpdateGroupPolicyMetadata.fromPartial(value) - }; - }, - submitProposal(value: MsgSubmitProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - value: MsgSubmitProposal.fromPartial(value) - }; - }, - withdrawProposal(value: MsgWithdrawProposal) { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - value: MsgWithdrawProposal.fromPartial(value) - }; - }, - vote(value: MsgVote) { - return { - typeUrl: "/cosmos.group.v1.MsgVote", - value: MsgVote.fromPartial(value) - }; - }, - exec(value: MsgExec) { - return { - typeUrl: "/cosmos.group.v1.MsgExec", - value: MsgExec.fromPartial(value) - }; - }, - leaveGroup(value: MsgLeaveGroup) { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - value: MsgLeaveGroup.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/tx.rpc.msg.ts deleted file mode 100644 index e6c8ed8c..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgCreateGroup, MsgCreateGroupResponse, MsgUpdateGroupMembers, MsgUpdateGroupMembersResponse, MsgUpdateGroupAdmin, MsgUpdateGroupAdminResponse, MsgUpdateGroupMetadata, MsgUpdateGroupMetadataResponse, MsgCreateGroupPolicy, MsgCreateGroupPolicyResponse, MsgCreateGroupWithPolicy, MsgCreateGroupWithPolicyResponse, MsgUpdateGroupPolicyAdmin, MsgUpdateGroupPolicyAdminResponse, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupPolicyDecisionPolicyResponse, MsgUpdateGroupPolicyMetadata, MsgUpdateGroupPolicyMetadataResponse, MsgSubmitProposal, MsgSubmitProposalResponse, MsgWithdrawProposal, MsgWithdrawProposalResponse, MsgVote, MsgVoteResponse, MsgExec, MsgExecResponse, MsgLeaveGroup, MsgLeaveGroupResponse } from "./tx"; -/** Msg is the cosmos.group.v1 Msg service. */ -export interface Msg { - /** CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. */ - createGroup(request: MsgCreateGroup): Promise; - /** UpdateGroupMembers updates the group members with given group id and admin address. */ - updateGroupMembers(request: MsgUpdateGroupMembers): Promise; - /** UpdateGroupAdmin updates the group admin with given group id and previous admin address. */ - updateGroupAdmin(request: MsgUpdateGroupAdmin): Promise; - /** UpdateGroupMetadata updates the group metadata with given group id and admin address. */ - updateGroupMetadata(request: MsgUpdateGroupMetadata): Promise; - /** CreateGroupPolicy creates a new group policy using given DecisionPolicy. */ - createGroupPolicy(request: MsgCreateGroupPolicy): Promise; - /** CreateGroupWithPolicy creates a new group with policy. */ - createGroupWithPolicy(request: MsgCreateGroupWithPolicy): Promise; - /** UpdateGroupPolicyAdmin updates a group policy admin. */ - updateGroupPolicyAdmin(request: MsgUpdateGroupPolicyAdmin): Promise; - /** UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. */ - updateGroupPolicyDecisionPolicy(request: MsgUpdateGroupPolicyDecisionPolicy): Promise; - /** UpdateGroupPolicyMetadata updates a group policy metadata. */ - updateGroupPolicyMetadata(request: MsgUpdateGroupPolicyMetadata): Promise; - /** SubmitProposal submits a new proposal. */ - submitProposal(request: MsgSubmitProposal): Promise; - /** WithdrawProposal aborts a proposal. */ - withdrawProposal(request: MsgWithdrawProposal): Promise; - /** Vote allows a voter to vote on a proposal. */ - vote(request: MsgVote): Promise; - /** Exec executes a proposal. */ - exec(request: MsgExec): Promise; - /** LeaveGroup allows a group member to leave the group. */ - leaveGroup(request: MsgLeaveGroup): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createGroup = this.createGroup.bind(this); - this.updateGroupMembers = this.updateGroupMembers.bind(this); - this.updateGroupAdmin = this.updateGroupAdmin.bind(this); - this.updateGroupMetadata = this.updateGroupMetadata.bind(this); - this.createGroupPolicy = this.createGroupPolicy.bind(this); - this.createGroupWithPolicy = this.createGroupWithPolicy.bind(this); - this.updateGroupPolicyAdmin = this.updateGroupPolicyAdmin.bind(this); - this.updateGroupPolicyDecisionPolicy = this.updateGroupPolicyDecisionPolicy.bind(this); - this.updateGroupPolicyMetadata = this.updateGroupPolicyMetadata.bind(this); - this.submitProposal = this.submitProposal.bind(this); - this.withdrawProposal = this.withdrawProposal.bind(this); - this.vote = this.vote.bind(this); - this.exec = this.exec.bind(this); - this.leaveGroup = this.leaveGroup.bind(this); - } - createGroup(request: MsgCreateGroup): Promise { - const data = MsgCreateGroup.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "CreateGroup", data); - return promise.then(data => MsgCreateGroupResponse.decode(new BinaryReader(data))); - } - updateGroupMembers(request: MsgUpdateGroupMembers): Promise { - const data = MsgUpdateGroupMembers.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "UpdateGroupMembers", data); - return promise.then(data => MsgUpdateGroupMembersResponse.decode(new BinaryReader(data))); - } - updateGroupAdmin(request: MsgUpdateGroupAdmin): Promise { - const data = MsgUpdateGroupAdmin.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "UpdateGroupAdmin", data); - return promise.then(data => MsgUpdateGroupAdminResponse.decode(new BinaryReader(data))); - } - updateGroupMetadata(request: MsgUpdateGroupMetadata): Promise { - const data = MsgUpdateGroupMetadata.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "UpdateGroupMetadata", data); - return promise.then(data => MsgUpdateGroupMetadataResponse.decode(new BinaryReader(data))); - } - createGroupPolicy(request: MsgCreateGroupPolicy): Promise { - const data = MsgCreateGroupPolicy.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "CreateGroupPolicy", data); - return promise.then(data => MsgCreateGroupPolicyResponse.decode(new BinaryReader(data))); - } - createGroupWithPolicy(request: MsgCreateGroupWithPolicy): Promise { - const data = MsgCreateGroupWithPolicy.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "CreateGroupWithPolicy", data); - return promise.then(data => MsgCreateGroupWithPolicyResponse.decode(new BinaryReader(data))); - } - updateGroupPolicyAdmin(request: MsgUpdateGroupPolicyAdmin): Promise { - const data = MsgUpdateGroupPolicyAdmin.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "UpdateGroupPolicyAdmin", data); - return promise.then(data => MsgUpdateGroupPolicyAdminResponse.decode(new BinaryReader(data))); - } - updateGroupPolicyDecisionPolicy(request: MsgUpdateGroupPolicyDecisionPolicy): Promise { - const data = MsgUpdateGroupPolicyDecisionPolicy.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "UpdateGroupPolicyDecisionPolicy", data); - return promise.then(data => MsgUpdateGroupPolicyDecisionPolicyResponse.decode(new BinaryReader(data))); - } - updateGroupPolicyMetadata(request: MsgUpdateGroupPolicyMetadata): Promise { - const data = MsgUpdateGroupPolicyMetadata.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "UpdateGroupPolicyMetadata", data); - return promise.then(data => MsgUpdateGroupPolicyMetadataResponse.decode(new BinaryReader(data))); - } - submitProposal(request: MsgSubmitProposal): Promise { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "SubmitProposal", data); - return promise.then(data => MsgSubmitProposalResponse.decode(new BinaryReader(data))); - } - withdrawProposal(request: MsgWithdrawProposal): Promise { - const data = MsgWithdrawProposal.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "WithdrawProposal", data); - return promise.then(data => MsgWithdrawProposalResponse.decode(new BinaryReader(data))); - } - vote(request: MsgVote): Promise { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "Vote", data); - return promise.then(data => MsgVoteResponse.decode(new BinaryReader(data))); - } - exec(request: MsgExec): Promise { - const data = MsgExec.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "Exec", data); - return promise.then(data => MsgExecResponse.decode(new BinaryReader(data))); - } - leaveGroup(request: MsgLeaveGroup): Promise { - const data = MsgLeaveGroup.encode(request).finish(); - const promise = this.rpc.request("cosmos.group.v1.Msg", "LeaveGroup", data); - return promise.then(data => MsgLeaveGroupResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/tx.ts deleted file mode 100644 index 78b2a6c9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/tx.ts +++ /dev/null @@ -1,3599 +0,0 @@ -import { Member, MemberAmino, MemberSDKType, VoteOption, voteOptionFromJSON, voteOptionToJSON } from "./types"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Exec defines modes of execution of a proposal on creation or on new vote. */ -export enum Exec { - /** - * EXEC_UNSPECIFIED - An empty value means that there should be a separate - * MsgExec request for the proposal to execute. - */ - EXEC_UNSPECIFIED = 0, - /** - * EXEC_TRY - Try to execute the proposal immediately. - * If the proposal is not allowed per the DecisionPolicy, - * the proposal will still be open and could - * be executed at a later point. - */ - EXEC_TRY = 1, - UNRECOGNIZED = -1, -} -export const ExecSDKType = Exec; -export const ExecAmino = Exec; -export function execFromJSON(object: any): Exec { - switch (object) { - case 0: - case "EXEC_UNSPECIFIED": - return Exec.EXEC_UNSPECIFIED; - case 1: - case "EXEC_TRY": - return Exec.EXEC_TRY; - case -1: - case "UNRECOGNIZED": - default: - return Exec.UNRECOGNIZED; - } -} -export function execToJSON(object: Exec): string { - switch (object) { - case Exec.EXEC_UNSPECIFIED: - return "EXEC_UNSPECIFIED"; - case Exec.EXEC_TRY: - return "EXEC_TRY"; - case Exec.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** MsgCreateGroup is the Msg/CreateGroup request type. */ -export interface MsgCreateGroup { - /** admin is the account address of the group admin. */ - admin: string; - /** members defines the group members. */ - members: Member[]; - /** metadata is any arbitrary metadata to attached to the group. */ - metadata: string; -} -export interface MsgCreateGroupProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroup"; - value: Uint8Array; -} -/** MsgCreateGroup is the Msg/CreateGroup request type. */ -export interface MsgCreateGroupAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** members defines the group members. */ - members: MemberAmino[]; - /** metadata is any arbitrary metadata to attached to the group. */ - metadata: string; -} -export interface MsgCreateGroupAminoMsg { - type: "cosmos-sdk/MsgCreateGroup"; - value: MsgCreateGroupAmino; -} -/** MsgCreateGroup is the Msg/CreateGroup request type. */ -export interface MsgCreateGroupSDKType { - admin: string; - members: MemberSDKType[]; - metadata: string; -} -/** MsgCreateGroupResponse is the Msg/CreateGroup response type. */ -export interface MsgCreateGroupResponse { - /** group_id is the unique ID of the newly created group. */ - groupId: bigint; -} -export interface MsgCreateGroupResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse"; - value: Uint8Array; -} -/** MsgCreateGroupResponse is the Msg/CreateGroup response type. */ -export interface MsgCreateGroupResponseAmino { - /** group_id is the unique ID of the newly created group. */ - group_id: string; -} -export interface MsgCreateGroupResponseAminoMsg { - type: "cosmos-sdk/MsgCreateGroupResponse"; - value: MsgCreateGroupResponseAmino; -} -/** MsgCreateGroupResponse is the Msg/CreateGroup response type. */ -export interface MsgCreateGroupResponseSDKType { - group_id: bigint; -} -/** MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. */ -export interface MsgUpdateGroupMembers { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** - * member_updates is the list of members to update, - * set weight to 0 to remove a member. - */ - memberUpdates: Member[]; -} -export interface MsgUpdateGroupMembersProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers"; - value: Uint8Array; -} -/** MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. */ -export interface MsgUpdateGroupMembersAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** - * member_updates is the list of members to update, - * set weight to 0 to remove a member. - */ - member_updates: MemberAmino[]; -} -export interface MsgUpdateGroupMembersAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMembers"; - value: MsgUpdateGroupMembersAmino; -} -/** MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. */ -export interface MsgUpdateGroupMembersSDKType { - admin: string; - group_id: bigint; - member_updates: MemberSDKType[]; -} -/** MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. */ -export interface MsgUpdateGroupMembersResponse {} -export interface MsgUpdateGroupMembersResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse"; - value: Uint8Array; -} -/** MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. */ -export interface MsgUpdateGroupMembersResponseAmino {} -export interface MsgUpdateGroupMembersResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMembersResponse"; - value: MsgUpdateGroupMembersResponseAmino; -} -/** MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. */ -export interface MsgUpdateGroupMembersResponseSDKType {} -/** MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. */ -export interface MsgUpdateGroupAdmin { - /** admin is the current account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** new_admin is the group new admin account address. */ - newAdmin: string; -} -export interface MsgUpdateGroupAdminProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin"; - value: Uint8Array; -} -/** MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. */ -export interface MsgUpdateGroupAdminAmino { - /** admin is the current account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** new_admin is the group new admin account address. */ - new_admin: string; -} -export interface MsgUpdateGroupAdminAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupAdmin"; - value: MsgUpdateGroupAdminAmino; -} -/** MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. */ -export interface MsgUpdateGroupAdminSDKType { - admin: string; - group_id: bigint; - new_admin: string; -} -/** MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. */ -export interface MsgUpdateGroupAdminResponse {} -export interface MsgUpdateGroupAdminResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse"; - value: Uint8Array; -} -/** MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. */ -export interface MsgUpdateGroupAdminResponseAmino {} -export interface MsgUpdateGroupAdminResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupAdminResponse"; - value: MsgUpdateGroupAdminResponseAmino; -} -/** MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. */ -export interface MsgUpdateGroupAdminResponseSDKType {} -/** MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. */ -export interface MsgUpdateGroupMetadata { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** metadata is the updated group's metadata. */ - metadata: string; -} -export interface MsgUpdateGroupMetadataProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata"; - value: Uint8Array; -} -/** MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. */ -export interface MsgUpdateGroupMetadataAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** metadata is the updated group's metadata. */ - metadata: string; -} -export interface MsgUpdateGroupMetadataAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMetadata"; - value: MsgUpdateGroupMetadataAmino; -} -/** MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. */ -export interface MsgUpdateGroupMetadataSDKType { - admin: string; - group_id: bigint; - metadata: string; -} -/** MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. */ -export interface MsgUpdateGroupMetadataResponse {} -export interface MsgUpdateGroupMetadataResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse"; - value: Uint8Array; -} -/** MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. */ -export interface MsgUpdateGroupMetadataResponseAmino {} -export interface MsgUpdateGroupMetadataResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupMetadataResponse"; - value: MsgUpdateGroupMetadataResponseAmino; -} -/** MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. */ -export interface MsgUpdateGroupMetadataResponseSDKType {} -/** MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. */ -export interface MsgCreateGroupPolicy { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** metadata is any arbitrary metadata attached to the group policy. */ - metadata: string; - /** decision_policy specifies the group policy's decision policy. */ - decisionPolicy: Any | undefined; -} -export interface MsgCreateGroupPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy"; - value: Uint8Array; -} -/** MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. */ -export interface MsgCreateGroupPolicyAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** metadata is any arbitrary metadata attached to the group policy. */ - metadata: string; - /** decision_policy specifies the group policy's decision policy. */ - decision_policy?: AnyAmino | undefined; -} -export interface MsgCreateGroupPolicyAminoMsg { - type: "cosmos-sdk/MsgCreateGroupPolicy"; - value: MsgCreateGroupPolicyAmino; -} -/** MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. */ -export interface MsgCreateGroupPolicySDKType { - admin: string; - group_id: bigint; - metadata: string; - decision_policy: AnySDKType | undefined; -} -/** MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. */ -export interface MsgCreateGroupPolicyResponse { - /** address is the account address of the newly created group policy. */ - address: string; -} -export interface MsgCreateGroupPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse"; - value: Uint8Array; -} -/** MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. */ -export interface MsgCreateGroupPolicyResponseAmino { - /** address is the account address of the newly created group policy. */ - address: string; -} -export interface MsgCreateGroupPolicyResponseAminoMsg { - type: "cosmos-sdk/MsgCreateGroupPolicyResponse"; - value: MsgCreateGroupPolicyResponseAmino; -} -/** MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. */ -export interface MsgCreateGroupPolicyResponseSDKType { - address: string; -} -/** MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. */ -export interface MsgUpdateGroupPolicyAdmin { - /** admin is the account address of the group admin. */ - admin: string; - /** address is the account address of the group policy. */ - address: string; - /** new_admin is the new group policy admin. */ - newAdmin: string; -} -export interface MsgUpdateGroupPolicyAdminProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin"; - value: Uint8Array; -} -/** MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. */ -export interface MsgUpdateGroupPolicyAdminAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** address is the account address of the group policy. */ - address: string; - /** new_admin is the new group policy admin. */ - new_admin: string; -} -export interface MsgUpdateGroupPolicyAdminAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdmin"; - value: MsgUpdateGroupPolicyAdminAmino; -} -/** MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. */ -export interface MsgUpdateGroupPolicyAdminSDKType { - admin: string; - address: string; - new_admin: string; -} -/** MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. */ -export interface MsgCreateGroupWithPolicy { - /** admin is the account address of the group and group policy admin. */ - admin: string; - /** members defines the group members. */ - members: Member[]; - /** group_metadata is any arbitrary metadata attached to the group. */ - groupMetadata: string; - /** group_policy_metadata is any arbitrary metadata attached to the group policy. */ - groupPolicyMetadata: string; - /** group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. */ - groupPolicyAsAdmin: boolean; - /** decision_policy specifies the group policy's decision policy. */ - decisionPolicy: Any | undefined; -} -export interface MsgCreateGroupWithPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy"; - value: Uint8Array; -} -/** MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. */ -export interface MsgCreateGroupWithPolicyAmino { - /** admin is the account address of the group and group policy admin. */ - admin: string; - /** members defines the group members. */ - members: MemberAmino[]; - /** group_metadata is any arbitrary metadata attached to the group. */ - group_metadata: string; - /** group_policy_metadata is any arbitrary metadata attached to the group policy. */ - group_policy_metadata: string; - /** group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. */ - group_policy_as_admin: boolean; - /** decision_policy specifies the group policy's decision policy. */ - decision_policy?: AnyAmino | undefined; -} -export interface MsgCreateGroupWithPolicyAminoMsg { - type: "cosmos-sdk/MsgCreateGroupWithPolicy"; - value: MsgCreateGroupWithPolicyAmino; -} -/** MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. */ -export interface MsgCreateGroupWithPolicySDKType { - admin: string; - members: MemberSDKType[]; - group_metadata: string; - group_policy_metadata: string; - group_policy_as_admin: boolean; - decision_policy: AnySDKType | undefined; -} -/** MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. */ -export interface MsgCreateGroupWithPolicyResponse { - /** group_id is the unique ID of the newly created group with policy. */ - groupId: bigint; - /** group_policy_address is the account address of the newly created group policy. */ - groupPolicyAddress: string; -} -export interface MsgCreateGroupWithPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse"; - value: Uint8Array; -} -/** MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. */ -export interface MsgCreateGroupWithPolicyResponseAmino { - /** group_id is the unique ID of the newly created group with policy. */ - group_id: string; - /** group_policy_address is the account address of the newly created group policy. */ - group_policy_address: string; -} -export interface MsgCreateGroupWithPolicyResponseAminoMsg { - type: "cosmos-sdk/MsgCreateGroupWithPolicyResponse"; - value: MsgCreateGroupWithPolicyResponseAmino; -} -/** MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. */ -export interface MsgCreateGroupWithPolicyResponseSDKType { - group_id: bigint; - group_policy_address: string; -} -/** MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. */ -export interface MsgUpdateGroupPolicyAdminResponse {} -export interface MsgUpdateGroupPolicyAdminResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse"; - value: Uint8Array; -} -/** MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. */ -export interface MsgUpdateGroupPolicyAdminResponseAmino {} -export interface MsgUpdateGroupPolicyAdminResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdminResponse"; - value: MsgUpdateGroupPolicyAdminResponseAmino; -} -/** MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. */ -export interface MsgUpdateGroupPolicyAdminResponseSDKType {} -/** MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. */ -export interface MsgUpdateGroupPolicyDecisionPolicy { - /** admin is the account address of the group admin. */ - admin: string; - /** address is the account address of group policy. */ - address: string; - /** decision_policy is the updated group policy's decision policy. */ - decisionPolicy: Any | undefined; -} -export interface MsgUpdateGroupPolicyDecisionPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy"; - value: Uint8Array; -} -/** MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. */ -export interface MsgUpdateGroupPolicyDecisionPolicyAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** address is the account address of group policy. */ - address: string; - /** decision_policy is the updated group policy's decision policy. */ - decision_policy?: AnyAmino | undefined; -} -export interface MsgUpdateGroupPolicyDecisionPolicyAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy"; - value: MsgUpdateGroupPolicyDecisionPolicyAmino; -} -/** MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. */ -export interface MsgUpdateGroupPolicyDecisionPolicySDKType { - admin: string; - address: string; - decision_policy: AnySDKType | undefined; -} -/** MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. */ -export interface MsgUpdateGroupPolicyDecisionPolicyResponse {} -export interface MsgUpdateGroupPolicyDecisionPolicyResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse"; - value: Uint8Array; -} -/** MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. */ -export interface MsgUpdateGroupPolicyDecisionPolicyResponseAmino {} -export interface MsgUpdateGroupPolicyDecisionPolicyResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse"; - value: MsgUpdateGroupPolicyDecisionPolicyResponseAmino; -} -/** MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. */ -export interface MsgUpdateGroupPolicyDecisionPolicyResponseSDKType {} -/** MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. */ -export interface MsgUpdateGroupPolicyMetadata { - /** admin is the account address of the group admin. */ - admin: string; - /** address is the account address of group policy. */ - address: string; - /** metadata is the updated group policy metadata. */ - metadata: string; -} -export interface MsgUpdateGroupPolicyMetadataProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata"; - value: Uint8Array; -} -/** MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. */ -export interface MsgUpdateGroupPolicyMetadataAmino { - /** admin is the account address of the group admin. */ - admin: string; - /** address is the account address of group policy. */ - address: string; - /** metadata is the updated group policy metadata. */ - metadata: string; -} -export interface MsgUpdateGroupPolicyMetadataAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadata"; - value: MsgUpdateGroupPolicyMetadataAmino; -} -/** MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. */ -export interface MsgUpdateGroupPolicyMetadataSDKType { - admin: string; - address: string; - metadata: string; -} -/** MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. */ -export interface MsgUpdateGroupPolicyMetadataResponse {} -export interface MsgUpdateGroupPolicyMetadataResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse"; - value: Uint8Array; -} -/** MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. */ -export interface MsgUpdateGroupPolicyMetadataResponseAmino {} -export interface MsgUpdateGroupPolicyMetadataResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse"; - value: MsgUpdateGroupPolicyMetadataResponseAmino; -} -/** MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. */ -export interface MsgUpdateGroupPolicyMetadataResponseSDKType {} -/** MsgSubmitProposal is the Msg/SubmitProposal request type. */ -export interface MsgSubmitProposal { - /** address is the account address of group policy. */ - address: string; - /** - * proposers are the account addresses of the proposers. - * Proposers signatures will be counted as yes votes. - */ - proposers: string[]; - /** metadata is any arbitrary metadata to attached to the proposal. */ - metadata: string; - /** messages is a list of `sdk.Msg`s that will be executed if the proposal passes. */ - messages: Any[]; - /** - * exec defines the mode of execution of the proposal, - * whether it should be executed immediately on creation or not. - * If so, proposers signatures are considered as Yes votes. - */ - exec: Exec; -} -export interface MsgSubmitProposalProtoMsg { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal"; - value: Uint8Array; -} -/** MsgSubmitProposal is the Msg/SubmitProposal request type. */ -export interface MsgSubmitProposalAmino { - /** address is the account address of group policy. */ - address: string; - /** - * proposers are the account addresses of the proposers. - * Proposers signatures will be counted as yes votes. - */ - proposers: string[]; - /** metadata is any arbitrary metadata to attached to the proposal. */ - metadata: string; - /** messages is a list of `sdk.Msg`s that will be executed if the proposal passes. */ - messages: AnyAmino[]; - /** - * exec defines the mode of execution of the proposal, - * whether it should be executed immediately on creation or not. - * If so, proposers signatures are considered as Yes votes. - */ - exec: Exec; -} -export interface MsgSubmitProposalAminoMsg { - type: "cosmos-sdk/group/MsgSubmitProposal"; - value: MsgSubmitProposalAmino; -} -/** MsgSubmitProposal is the Msg/SubmitProposal request type. */ -export interface MsgSubmitProposalSDKType { - address: string; - proposers: string[]; - metadata: string; - messages: AnySDKType[]; - exec: Exec; -} -/** MsgSubmitProposalResponse is the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - /** proposal is the unique ID of the proposal. */ - proposalId: bigint; -} -export interface MsgSubmitProposalResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse"; - value: Uint8Array; -} -/** MsgSubmitProposalResponse is the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponseAmino { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; -} -export interface MsgSubmitProposalResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitProposalResponse"; - value: MsgSubmitProposalResponseAmino; -} -/** MsgSubmitProposalResponse is the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponseSDKType { - proposal_id: bigint; -} -/** MsgWithdrawProposal is the Msg/WithdrawProposal request type. */ -export interface MsgWithdrawProposal { - /** proposal is the unique ID of the proposal. */ - proposalId: bigint; - /** address is the admin of the group policy or one of the proposer of the proposal. */ - address: string; -} -export interface MsgWithdrawProposalProtoMsg { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal"; - value: Uint8Array; -} -/** MsgWithdrawProposal is the Msg/WithdrawProposal request type. */ -export interface MsgWithdrawProposalAmino { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** address is the admin of the group policy or one of the proposer of the proposal. */ - address: string; -} -export interface MsgWithdrawProposalAminoMsg { - type: "cosmos-sdk/group/MsgWithdrawProposal"; - value: MsgWithdrawProposalAmino; -} -/** MsgWithdrawProposal is the Msg/WithdrawProposal request type. */ -export interface MsgWithdrawProposalSDKType { - proposal_id: bigint; - address: string; -} -/** MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. */ -export interface MsgWithdrawProposalResponse {} -export interface MsgWithdrawProposalResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse"; - value: Uint8Array; -} -/** MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. */ -export interface MsgWithdrawProposalResponseAmino {} -export interface MsgWithdrawProposalResponseAminoMsg { - type: "cosmos-sdk/MsgWithdrawProposalResponse"; - value: MsgWithdrawProposalResponseAmino; -} -/** MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. */ -export interface MsgWithdrawProposalResponseSDKType {} -/** MsgVote is the Msg/Vote request type. */ -export interface MsgVote { - /** proposal is the unique ID of the proposal. */ - proposalId: bigint; - /** voter is the voter account address. */ - voter: string; - /** option is the voter's choice on the proposal. */ - option: VoteOption; - /** metadata is any arbitrary metadata to attached to the vote. */ - metadata: string; - /** - * exec defines whether the proposal should be executed - * immediately after voting or not. - */ - exec: Exec; -} -export interface MsgVoteProtoMsg { - typeUrl: "/cosmos.group.v1.MsgVote"; - value: Uint8Array; -} -/** MsgVote is the Msg/Vote request type. */ -export interface MsgVoteAmino { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** voter is the voter account address. */ - voter: string; - /** option is the voter's choice on the proposal. */ - option: VoteOption; - /** metadata is any arbitrary metadata to attached to the vote. */ - metadata: string; - /** - * exec defines whether the proposal should be executed - * immediately after voting or not. - */ - exec: Exec; -} -export interface MsgVoteAminoMsg { - type: "cosmos-sdk/group/MsgVote"; - value: MsgVoteAmino; -} -/** MsgVote is the Msg/Vote request type. */ -export interface MsgVoteSDKType { - proposal_id: bigint; - voter: string; - option: VoteOption; - metadata: string; - exec: Exec; -} -/** MsgVoteResponse is the Msg/Vote response type. */ -export interface MsgVoteResponse {} -export interface MsgVoteResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgVoteResponse"; - value: Uint8Array; -} -/** MsgVoteResponse is the Msg/Vote response type. */ -export interface MsgVoteResponseAmino {} -export interface MsgVoteResponseAminoMsg { - type: "cosmos-sdk/MsgVoteResponse"; - value: MsgVoteResponseAmino; -} -/** MsgVoteResponse is the Msg/Vote response type. */ -export interface MsgVoteResponseSDKType {} -/** MsgExec is the Msg/Exec request type. */ -export interface MsgExec { - /** proposal is the unique ID of the proposal. */ - proposalId: bigint; - /** signer is the account address used to execute the proposal. */ - signer: string; -} -export interface MsgExecProtoMsg { - typeUrl: "/cosmos.group.v1.MsgExec"; - value: Uint8Array; -} -/** MsgExec is the Msg/Exec request type. */ -export interface MsgExecAmino { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** signer is the account address used to execute the proposal. */ - signer: string; -} -export interface MsgExecAminoMsg { - type: "cosmos-sdk/group/MsgExec"; - value: MsgExecAmino; -} -/** MsgExec is the Msg/Exec request type. */ -export interface MsgExecSDKType { - proposal_id: bigint; - signer: string; -} -/** MsgExecResponse is the Msg/Exec request type. */ -export interface MsgExecResponse {} -export interface MsgExecResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgExecResponse"; - value: Uint8Array; -} -/** MsgExecResponse is the Msg/Exec request type. */ -export interface MsgExecResponseAmino {} -export interface MsgExecResponseAminoMsg { - type: "cosmos-sdk/MsgExecResponse"; - value: MsgExecResponseAmino; -} -/** MsgExecResponse is the Msg/Exec request type. */ -export interface MsgExecResponseSDKType {} -/** MsgLeaveGroup is the Msg/LeaveGroup request type. */ -export interface MsgLeaveGroup { - /** address is the account address of the group member. */ - address: string; - /** group_id is the unique ID of the group. */ - groupId: bigint; -} -export interface MsgLeaveGroupProtoMsg { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup"; - value: Uint8Array; -} -/** MsgLeaveGroup is the Msg/LeaveGroup request type. */ -export interface MsgLeaveGroupAmino { - /** address is the account address of the group member. */ - address: string; - /** group_id is the unique ID of the group. */ - group_id: string; -} -export interface MsgLeaveGroupAminoMsg { - type: "cosmos-sdk/group/MsgLeaveGroup"; - value: MsgLeaveGroupAmino; -} -/** MsgLeaveGroup is the Msg/LeaveGroup request type. */ -export interface MsgLeaveGroupSDKType { - address: string; - group_id: bigint; -} -/** MsgLeaveGroupResponse is the Msg/LeaveGroup response type. */ -export interface MsgLeaveGroupResponse {} -export interface MsgLeaveGroupResponseProtoMsg { - typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse"; - value: Uint8Array; -} -/** MsgLeaveGroupResponse is the Msg/LeaveGroup response type. */ -export interface MsgLeaveGroupResponseAmino {} -export interface MsgLeaveGroupResponseAminoMsg { - type: "cosmos-sdk/MsgLeaveGroupResponse"; - value: MsgLeaveGroupResponseAmino; -} -/** MsgLeaveGroupResponse is the Msg/LeaveGroup response type. */ -export interface MsgLeaveGroupResponseSDKType {} -function createBaseMsgCreateGroup(): MsgCreateGroup { - return { - admin: "", - members: [], - metadata: "" - }; -} -export const MsgCreateGroup = { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - aminoType: "cosmos-sdk/MsgCreateGroup", - encode(message: MsgCreateGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - for (const v of message.members) { - Member.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGroup { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.members.push(Member.decode(reader, reader.uint32())); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGroup { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromJSON(e)) : [], - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: MsgCreateGroup): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - if (message.members) { - obj.members = message.members.map(e => e ? Member.toJSON(e) : undefined); - } else { - obj.members = []; - } - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGroup { - const message = createBaseMsgCreateGroup(); - message.admin = object.admin ?? ""; - message.members = object.members?.map(e => Member.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: MsgCreateGroupSDKType): MsgCreateGroup { - return { - admin: object?.admin, - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromSDK(e)) : [], - metadata: object?.metadata - }; - }, - toSDK(message: MsgCreateGroup): MsgCreateGroupSDKType { - const obj: any = {}; - obj.admin = message.admin; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toSDK(e) : undefined); - } else { - obj.members = []; - } - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: MsgCreateGroupAmino): MsgCreateGroup { - return { - admin: object.admin, - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromAmino(e)) : [], - metadata: object.metadata - }; - }, - toAmino(message: MsgCreateGroup): MsgCreateGroupAmino { - const obj: any = {}; - obj.admin = message.admin; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toAmino(e) : undefined); - } else { - obj.members = []; - } - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: MsgCreateGroupAminoMsg): MsgCreateGroup { - return MsgCreateGroup.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGroup): MsgCreateGroupAminoMsg { - return { - type: "cosmos-sdk/MsgCreateGroup", - value: MsgCreateGroup.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGroupProtoMsg): MsgCreateGroup { - return MsgCreateGroup.decode(message.value); - }, - toProto(message: MsgCreateGroup): Uint8Array { - return MsgCreateGroup.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGroup): MsgCreateGroupProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroup", - value: MsgCreateGroup.encode(message).finish() - }; - } -}; -function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { - return { - groupId: BigInt(0) - }; -} -export const MsgCreateGroupResponse = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", - aminoType: "cosmos-sdk/MsgCreateGroupResponse", - encode(message: MsgCreateGroupResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGroupResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGroupResponse { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgCreateGroupResponse): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGroupResponse { - const message = createBaseMsgCreateGroupResponse(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgCreateGroupResponseSDKType): MsgCreateGroupResponse { - return { - groupId: object?.group_id - }; - }, - toSDK(message: MsgCreateGroupResponse): MsgCreateGroupResponseSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - return obj; - }, - fromAmino(object: MsgCreateGroupResponseAmino): MsgCreateGroupResponse { - return { - groupId: BigInt(object.group_id) - }; - }, - toAmino(message: MsgCreateGroupResponse): MsgCreateGroupResponseAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateGroupResponseAminoMsg): MsgCreateGroupResponse { - return MsgCreateGroupResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGroupResponse): MsgCreateGroupResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreateGroupResponse", - value: MsgCreateGroupResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGroupResponseProtoMsg): MsgCreateGroupResponse { - return MsgCreateGroupResponse.decode(message.value); - }, - toProto(message: MsgCreateGroupResponse): Uint8Array { - return MsgCreateGroupResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGroupResponse): MsgCreateGroupResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupResponse", - value: MsgCreateGroupResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { - return { - admin: "", - groupId: BigInt(0), - memberUpdates: [] - }; -} -export const MsgUpdateGroupMembers = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - aminoType: "cosmos-sdk/MsgUpdateGroupMembers", - encode(message: MsgUpdateGroupMembers, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.groupId !== BigInt(0)) { - writer.uint32(16).uint64(message.groupId); - } - for (const v of message.memberUpdates) { - Member.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupMembers { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMembers(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.memberUpdates.push(Member.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateGroupMembers { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - memberUpdates: Array.isArray(object?.memberUpdates) ? object.memberUpdates.map((e: any) => Member.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgUpdateGroupMembers): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - if (message.memberUpdates) { - obj.memberUpdates = message.memberUpdates.map(e => e ? Member.toJSON(e) : undefined); - } else { - obj.memberUpdates = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateGroupMembers { - const message = createBaseMsgUpdateGroupMembers(); - message.admin = object.admin ?? ""; - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.memberUpdates = object.memberUpdates?.map(e => Member.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgUpdateGroupMembersSDKType): MsgUpdateGroupMembers { - return { - admin: object?.admin, - groupId: object?.group_id, - memberUpdates: Array.isArray(object?.member_updates) ? object.member_updates.map((e: any) => Member.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersSDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId; - if (message.memberUpdates) { - obj.member_updates = message.memberUpdates.map(e => e ? Member.toSDK(e) : undefined); - } else { - obj.member_updates = []; - } - return obj; - }, - fromAmino(object: MsgUpdateGroupMembersAmino): MsgUpdateGroupMembers { - return { - admin: object.admin, - groupId: BigInt(object.group_id), - memberUpdates: Array.isArray(object?.member_updates) ? object.member_updates.map((e: any) => Member.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - if (message.memberUpdates) { - obj.member_updates = message.memberUpdates.map(e => e ? Member.toAmino(e) : undefined); - } else { - obj.member_updates = []; - } - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupMembersAminoMsg): MsgUpdateGroupMembers { - return MsgUpdateGroupMembers.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupMembers", - value: MsgUpdateGroupMembers.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupMembersProtoMsg): MsgUpdateGroupMembers { - return MsgUpdateGroupMembers.decode(message.value); - }, - toProto(message: MsgUpdateGroupMembers): Uint8Array { - return MsgUpdateGroupMembers.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupMembers): MsgUpdateGroupMembersProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", - value: MsgUpdateGroupMembers.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersResponse { - return {}; -} -export const MsgUpdateGroupMembersResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupMembersResponse", - encode(_: MsgUpdateGroupMembersResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupMembersResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMembersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateGroupMembersResponse { - return {}; - }, - toJSON(_: MsgUpdateGroupMembersResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateGroupMembersResponse { - const message = createBaseMsgUpdateGroupMembersResponse(); - return message; - }, - fromSDK(_: MsgUpdateGroupMembersResponseSDKType): MsgUpdateGroupMembersResponse { - return {}; - }, - toSDK(_: MsgUpdateGroupMembersResponse): MsgUpdateGroupMembersResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateGroupMembersResponseAmino): MsgUpdateGroupMembersResponse { - return {}; - }, - toAmino(_: MsgUpdateGroupMembersResponse): MsgUpdateGroupMembersResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupMembersResponseAminoMsg): MsgUpdateGroupMembersResponse { - return MsgUpdateGroupMembersResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupMembersResponse): MsgUpdateGroupMembersResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupMembersResponse", - value: MsgUpdateGroupMembersResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupMembersResponseProtoMsg): MsgUpdateGroupMembersResponse { - return MsgUpdateGroupMembersResponse.decode(message.value); - }, - toProto(message: MsgUpdateGroupMembersResponse): Uint8Array { - return MsgUpdateGroupMembersResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupMembersResponse): MsgUpdateGroupMembersResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembersResponse", - value: MsgUpdateGroupMembersResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { - return { - admin: "", - groupId: BigInt(0), - newAdmin: "" - }; -} -export const MsgUpdateGroupAdmin = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - aminoType: "cosmos-sdk/MsgUpdateGroupAdmin", - encode(message: MsgUpdateGroupAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.groupId !== BigInt(0)) { - writer.uint32(16).uint64(message.groupId); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupAdmin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.newAdmin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateGroupAdmin { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - newAdmin: isSet(object.newAdmin) ? String(object.newAdmin) : "" - }; - }, - toJSON(message: MsgUpdateGroupAdmin): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateGroupAdmin { - const message = createBaseMsgUpdateGroupAdmin(); - message.admin = object.admin ?? ""; - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.newAdmin = object.newAdmin ?? ""; - return message; - }, - fromSDK(object: MsgUpdateGroupAdminSDKType): MsgUpdateGroupAdmin { - return { - admin: object?.admin, - groupId: object?.group_id, - newAdmin: object?.new_admin - }; - }, - toSDK(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminSDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId; - obj.new_admin = message.newAdmin; - return obj; - }, - fromAmino(object: MsgUpdateGroupAdminAmino): MsgUpdateGroupAdmin { - return { - admin: object.admin, - groupId: BigInt(object.group_id), - newAdmin: object.new_admin - }; - }, - toAmino(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.new_admin = message.newAdmin; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupAdminAminoMsg): MsgUpdateGroupAdmin { - return MsgUpdateGroupAdmin.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupAdmin", - value: MsgUpdateGroupAdmin.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupAdminProtoMsg): MsgUpdateGroupAdmin { - return MsgUpdateGroupAdmin.decode(message.value); - }, - toProto(message: MsgUpdateGroupAdmin): Uint8Array { - return MsgUpdateGroupAdmin.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupAdmin): MsgUpdateGroupAdminProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", - value: MsgUpdateGroupAdmin.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { - return {}; -} -export const MsgUpdateGroupAdminResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupAdminResponse", - encode(_: MsgUpdateGroupAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateGroupAdminResponse { - return {}; - }, - toJSON(_: MsgUpdateGroupAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateGroupAdminResponse { - const message = createBaseMsgUpdateGroupAdminResponse(); - return message; - }, - fromSDK(_: MsgUpdateGroupAdminResponseSDKType): MsgUpdateGroupAdminResponse { - return {}; - }, - toSDK(_: MsgUpdateGroupAdminResponse): MsgUpdateGroupAdminResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateGroupAdminResponseAmino): MsgUpdateGroupAdminResponse { - return {}; - }, - toAmino(_: MsgUpdateGroupAdminResponse): MsgUpdateGroupAdminResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupAdminResponseAminoMsg): MsgUpdateGroupAdminResponse { - return MsgUpdateGroupAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupAdminResponse): MsgUpdateGroupAdminResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupAdminResponse", - value: MsgUpdateGroupAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupAdminResponseProtoMsg): MsgUpdateGroupAdminResponse { - return MsgUpdateGroupAdminResponse.decode(message.value); - }, - toProto(message: MsgUpdateGroupAdminResponse): Uint8Array { - return MsgUpdateGroupAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupAdminResponse): MsgUpdateGroupAdminResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdminResponse", - value: MsgUpdateGroupAdminResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { - return { - admin: "", - groupId: BigInt(0), - metadata: "" - }; -} -export const MsgUpdateGroupMetadata = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - aminoType: "cosmos-sdk/MsgUpdateGroupMetadata", - encode(message: MsgUpdateGroupMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.groupId !== BigInt(0)) { - writer.uint32(16).uint64(message.groupId); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupMetadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateGroupMetadata { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: MsgUpdateGroupMetadata): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateGroupMetadata { - const message = createBaseMsgUpdateGroupMetadata(); - message.admin = object.admin ?? ""; - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: MsgUpdateGroupMetadataSDKType): MsgUpdateGroupMetadata { - return { - admin: object?.admin, - groupId: object?.group_id, - metadata: object?.metadata - }; - }, - toSDK(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataSDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId; - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: MsgUpdateGroupMetadataAmino): MsgUpdateGroupMetadata { - return { - admin: object.admin, - groupId: BigInt(object.group_id), - metadata: object.metadata - }; - }, - toAmino(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupMetadataAminoMsg): MsgUpdateGroupMetadata { - return MsgUpdateGroupMetadata.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupMetadata", - value: MsgUpdateGroupMetadata.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupMetadataProtoMsg): MsgUpdateGroupMetadata { - return MsgUpdateGroupMetadata.decode(message.value); - }, - toProto(message: MsgUpdateGroupMetadata): Uint8Array { - return MsgUpdateGroupMetadata.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupMetadata): MsgUpdateGroupMetadataProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", - value: MsgUpdateGroupMetadata.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataResponse { - return {}; -} -export const MsgUpdateGroupMetadataResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupMetadataResponse", - encode(_: MsgUpdateGroupMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupMetadataResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateGroupMetadataResponse { - return {}; - }, - toJSON(_: MsgUpdateGroupMetadataResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateGroupMetadataResponse { - const message = createBaseMsgUpdateGroupMetadataResponse(); - return message; - }, - fromSDK(_: MsgUpdateGroupMetadataResponseSDKType): MsgUpdateGroupMetadataResponse { - return {}; - }, - toSDK(_: MsgUpdateGroupMetadataResponse): MsgUpdateGroupMetadataResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateGroupMetadataResponseAmino): MsgUpdateGroupMetadataResponse { - return {}; - }, - toAmino(_: MsgUpdateGroupMetadataResponse): MsgUpdateGroupMetadataResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupMetadataResponseAminoMsg): MsgUpdateGroupMetadataResponse { - return MsgUpdateGroupMetadataResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupMetadataResponse): MsgUpdateGroupMetadataResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupMetadataResponse", - value: MsgUpdateGroupMetadataResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupMetadataResponseProtoMsg): MsgUpdateGroupMetadataResponse { - return MsgUpdateGroupMetadataResponse.decode(message.value); - }, - toProto(message: MsgUpdateGroupMetadataResponse): Uint8Array { - return MsgUpdateGroupMetadataResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupMetadataResponse): MsgUpdateGroupMetadataResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadataResponse", - value: MsgUpdateGroupMetadataResponse.encode(message).finish() - }; - } -}; -function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { - return { - admin: "", - groupId: BigInt(0), - metadata: "", - decisionPolicy: Any.fromPartial({}) - }; -} -export const MsgCreateGroupPolicy = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - aminoType: "cosmos-sdk/MsgCreateGroupPolicy", - encode(message: MsgCreateGroupPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.groupId !== BigInt(0)) { - writer.uint32(16).uint64(message.groupId); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - if (message.decisionPolicy !== undefined) { - Any.encode(message.decisionPolicy, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGroupPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.decisionPolicy = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGroupPolicy { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - metadata: isSet(object.metadata) ? String(object.metadata) : "", - decisionPolicy: isSet(object.decisionPolicy) ? Any.fromJSON(object.decisionPolicy) : undefined - }; - }, - toJSON(message: MsgCreateGroupPolicy): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.metadata !== undefined && (obj.metadata = message.metadata); - message.decisionPolicy !== undefined && (obj.decisionPolicy = message.decisionPolicy ? Any.toJSON(message.decisionPolicy) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGroupPolicy { - const message = createBaseMsgCreateGroupPolicy(); - message.admin = object.admin ?? ""; - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.metadata = object.metadata ?? ""; - message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? Any.fromPartial(object.decisionPolicy) : undefined; - return message; - }, - fromSDK(object: MsgCreateGroupPolicySDKType): MsgCreateGroupPolicy { - return { - admin: object?.admin, - groupId: object?.group_id, - metadata: object?.metadata, - decisionPolicy: object.decision_policy ? Any.fromSDK(object.decision_policy) : undefined - }; - }, - toSDK(message: MsgCreateGroupPolicy): MsgCreateGroupPolicySDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId; - obj.metadata = message.metadata; - message.decisionPolicy !== undefined && (obj.decision_policy = message.decisionPolicy ? Any.toSDK(message.decisionPolicy) : undefined); - return obj; - }, - fromAmino(object: MsgCreateGroupPolicyAmino): MsgCreateGroupPolicy { - return { - admin: object.admin, - groupId: BigInt(object.group_id), - metadata: object.metadata, - decisionPolicy: object?.decision_policy ? Any.fromAmino(object.decision_policy) : undefined - }; - }, - toAmino(message: MsgCreateGroupPolicy): MsgCreateGroupPolicyAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.metadata = message.metadata; - obj.decision_policy = message.decisionPolicy ? Any.toAmino(message.decisionPolicy) : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateGroupPolicyAminoMsg): MsgCreateGroupPolicy { - return MsgCreateGroupPolicy.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGroupPolicy): MsgCreateGroupPolicyAminoMsg { - return { - type: "cosmos-sdk/MsgCreateGroupPolicy", - value: MsgCreateGroupPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGroupPolicyProtoMsg): MsgCreateGroupPolicy { - return MsgCreateGroupPolicy.decode(message.value); - }, - toProto(message: MsgCreateGroupPolicy): Uint8Array { - return MsgCreateGroupPolicy.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGroupPolicy): MsgCreateGroupPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", - value: MsgCreateGroupPolicy.encode(message).finish() - }; - } -}; -function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { - return { - address: "" - }; -} -export const MsgCreateGroupPolicyResponse = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", - aminoType: "cosmos-sdk/MsgCreateGroupPolicyResponse", - encode(message: MsgCreateGroupPolicyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGroupPolicyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGroupPolicyResponse { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: MsgCreateGroupPolicyResponse): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGroupPolicyResponse { - const message = createBaseMsgCreateGroupPolicyResponse(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: MsgCreateGroupPolicyResponseSDKType): MsgCreateGroupPolicyResponse { - return { - address: object?.address - }; - }, - toSDK(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: MsgCreateGroupPolicyResponseAmino): MsgCreateGroupPolicyResponse { - return { - address: object.address - }; - }, - toAmino(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: MsgCreateGroupPolicyResponseAminoMsg): MsgCreateGroupPolicyResponse { - return MsgCreateGroupPolicyResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreateGroupPolicyResponse", - value: MsgCreateGroupPolicyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGroupPolicyResponseProtoMsg): MsgCreateGroupPolicyResponse { - return MsgCreateGroupPolicyResponse.decode(message.value); - }, - toProto(message: MsgCreateGroupPolicyResponse): Uint8Array { - return MsgCreateGroupPolicyResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGroupPolicyResponse): MsgCreateGroupPolicyResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicyResponse", - value: MsgCreateGroupPolicyResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { - return { - admin: "", - address: "", - newAdmin: "" - }; -} -export const MsgUpdateGroupPolicyAdmin = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyAdmin", - encode(message: MsgUpdateGroupPolicyAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupPolicyAdmin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateGroupPolicyAdmin { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - address: isSet(object.address) ? String(object.address) : "", - newAdmin: isSet(object.newAdmin) ? String(object.newAdmin) : "" - }; - }, - toJSON(message: MsgUpdateGroupPolicyAdmin): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.address !== undefined && (obj.address = message.address); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateGroupPolicyAdmin { - const message = createBaseMsgUpdateGroupPolicyAdmin(); - message.admin = object.admin ?? ""; - message.address = object.address ?? ""; - message.newAdmin = object.newAdmin ?? ""; - return message; - }, - fromSDK(object: MsgUpdateGroupPolicyAdminSDKType): MsgUpdateGroupPolicyAdmin { - return { - admin: object?.admin, - address: object?.address, - newAdmin: object?.new_admin - }; - }, - toSDK(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminSDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.address = message.address; - obj.new_admin = message.newAdmin; - return obj; - }, - fromAmino(object: MsgUpdateGroupPolicyAdminAmino): MsgUpdateGroupPolicyAdmin { - return { - admin: object.admin, - address: object.address, - newAdmin: object.new_admin - }; - }, - toAmino(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.address = message.address; - obj.new_admin = message.newAdmin; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupPolicyAdminAminoMsg): MsgUpdateGroupPolicyAdmin { - return MsgUpdateGroupPolicyAdmin.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdmin", - value: MsgUpdateGroupPolicyAdmin.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupPolicyAdminProtoMsg): MsgUpdateGroupPolicyAdmin { - return MsgUpdateGroupPolicyAdmin.decode(message.value); - }, - toProto(message: MsgUpdateGroupPolicyAdmin): Uint8Array { - return MsgUpdateGroupPolicyAdmin.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupPolicyAdmin): MsgUpdateGroupPolicyAdminProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", - value: MsgUpdateGroupPolicyAdmin.encode(message).finish() - }; - } -}; -function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { - return { - admin: "", - members: [], - groupMetadata: "", - groupPolicyMetadata: "", - groupPolicyAsAdmin: false, - decisionPolicy: Any.fromPartial({}) - }; -} -export const MsgCreateGroupWithPolicy = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - aminoType: "cosmos-sdk/MsgCreateGroupWithPolicy", - encode(message: MsgCreateGroupWithPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - for (const v of message.members) { - Member.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.groupMetadata !== "") { - writer.uint32(26).string(message.groupMetadata); - } - if (message.groupPolicyMetadata !== "") { - writer.uint32(34).string(message.groupPolicyMetadata); - } - if (message.groupPolicyAsAdmin === true) { - writer.uint32(40).bool(message.groupPolicyAsAdmin); - } - if (message.decisionPolicy !== undefined) { - Any.encode(message.decisionPolicy, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGroupWithPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupWithPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.members.push(Member.decode(reader, reader.uint32())); - break; - case 3: - message.groupMetadata = reader.string(); - break; - case 4: - message.groupPolicyMetadata = reader.string(); - break; - case 5: - message.groupPolicyAsAdmin = reader.bool(); - break; - case 6: - message.decisionPolicy = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGroupWithPolicy { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromJSON(e)) : [], - groupMetadata: isSet(object.groupMetadata) ? String(object.groupMetadata) : "", - groupPolicyMetadata: isSet(object.groupPolicyMetadata) ? String(object.groupPolicyMetadata) : "", - groupPolicyAsAdmin: isSet(object.groupPolicyAsAdmin) ? Boolean(object.groupPolicyAsAdmin) : false, - decisionPolicy: isSet(object.decisionPolicy) ? Any.fromJSON(object.decisionPolicy) : undefined - }; - }, - toJSON(message: MsgCreateGroupWithPolicy): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - if (message.members) { - obj.members = message.members.map(e => e ? Member.toJSON(e) : undefined); - } else { - obj.members = []; - } - message.groupMetadata !== undefined && (obj.groupMetadata = message.groupMetadata); - message.groupPolicyMetadata !== undefined && (obj.groupPolicyMetadata = message.groupPolicyMetadata); - message.groupPolicyAsAdmin !== undefined && (obj.groupPolicyAsAdmin = message.groupPolicyAsAdmin); - message.decisionPolicy !== undefined && (obj.decisionPolicy = message.decisionPolicy ? Any.toJSON(message.decisionPolicy) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGroupWithPolicy { - const message = createBaseMsgCreateGroupWithPolicy(); - message.admin = object.admin ?? ""; - message.members = object.members?.map(e => Member.fromPartial(e)) || []; - message.groupMetadata = object.groupMetadata ?? ""; - message.groupPolicyMetadata = object.groupPolicyMetadata ?? ""; - message.groupPolicyAsAdmin = object.groupPolicyAsAdmin ?? false; - message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? Any.fromPartial(object.decisionPolicy) : undefined; - return message; - }, - fromSDK(object: MsgCreateGroupWithPolicySDKType): MsgCreateGroupWithPolicy { - return { - admin: object?.admin, - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromSDK(e)) : [], - groupMetadata: object?.group_metadata, - groupPolicyMetadata: object?.group_policy_metadata, - groupPolicyAsAdmin: object?.group_policy_as_admin, - decisionPolicy: object.decision_policy ? Any.fromSDK(object.decision_policy) : undefined - }; - }, - toSDK(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicySDKType { - const obj: any = {}; - obj.admin = message.admin; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toSDK(e) : undefined); - } else { - obj.members = []; - } - obj.group_metadata = message.groupMetadata; - obj.group_policy_metadata = message.groupPolicyMetadata; - obj.group_policy_as_admin = message.groupPolicyAsAdmin; - message.decisionPolicy !== undefined && (obj.decision_policy = message.decisionPolicy ? Any.toSDK(message.decisionPolicy) : undefined); - return obj; - }, - fromAmino(object: MsgCreateGroupWithPolicyAmino): MsgCreateGroupWithPolicy { - return { - admin: object.admin, - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromAmino(e)) : [], - groupMetadata: object.group_metadata, - groupPolicyMetadata: object.group_policy_metadata, - groupPolicyAsAdmin: object.group_policy_as_admin, - decisionPolicy: object?.decision_policy ? Any.fromAmino(object.decision_policy) : undefined - }; - }, - toAmino(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicyAmino { - const obj: any = {}; - obj.admin = message.admin; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toAmino(e) : undefined); - } else { - obj.members = []; - } - obj.group_metadata = message.groupMetadata; - obj.group_policy_metadata = message.groupPolicyMetadata; - obj.group_policy_as_admin = message.groupPolicyAsAdmin; - obj.decision_policy = message.decisionPolicy ? Any.toAmino(message.decisionPolicy) : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateGroupWithPolicyAminoMsg): MsgCreateGroupWithPolicy { - return MsgCreateGroupWithPolicy.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicyAminoMsg { - return { - type: "cosmos-sdk/MsgCreateGroupWithPolicy", - value: MsgCreateGroupWithPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGroupWithPolicyProtoMsg): MsgCreateGroupWithPolicy { - return MsgCreateGroupWithPolicy.decode(message.value); - }, - toProto(message: MsgCreateGroupWithPolicy): Uint8Array { - return MsgCreateGroupWithPolicy.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGroupWithPolicy): MsgCreateGroupWithPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", - value: MsgCreateGroupWithPolicy.encode(message).finish() - }; - } -}; -function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { - return { - groupId: BigInt(0), - groupPolicyAddress: "" - }; -} -export const MsgCreateGroupWithPolicyResponse = { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", - aminoType: "cosmos-sdk/MsgCreateGroupWithPolicyResponse", - encode(message: MsgCreateGroupWithPolicyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - if (message.groupPolicyAddress !== "") { - writer.uint32(18).string(message.groupPolicyAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGroupWithPolicyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupWithPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.groupPolicyAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGroupWithPolicyResponse { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - groupPolicyAddress: isSet(object.groupPolicyAddress) ? String(object.groupPolicyAddress) : "" - }; - }, - toJSON(message: MsgCreateGroupWithPolicyResponse): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.groupPolicyAddress !== undefined && (obj.groupPolicyAddress = message.groupPolicyAddress); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGroupWithPolicyResponse { - const message = createBaseMsgCreateGroupWithPolicyResponse(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.groupPolicyAddress = object.groupPolicyAddress ?? ""; - return message; - }, - fromSDK(object: MsgCreateGroupWithPolicyResponseSDKType): MsgCreateGroupWithPolicyResponse { - return { - groupId: object?.group_id, - groupPolicyAddress: object?.group_policy_address - }; - }, - toSDK(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - obj.group_policy_address = message.groupPolicyAddress; - return obj; - }, - fromAmino(object: MsgCreateGroupWithPolicyResponseAmino): MsgCreateGroupWithPolicyResponse { - return { - groupId: BigInt(object.group_id), - groupPolicyAddress: object.group_policy_address - }; - }, - toAmino(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.group_policy_address = message.groupPolicyAddress; - return obj; - }, - fromAminoMsg(object: MsgCreateGroupWithPolicyResponseAminoMsg): MsgCreateGroupWithPolicyResponse { - return MsgCreateGroupWithPolicyResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreateGroupWithPolicyResponse", - value: MsgCreateGroupWithPolicyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGroupWithPolicyResponseProtoMsg): MsgCreateGroupWithPolicyResponse { - return MsgCreateGroupWithPolicyResponse.decode(message.value); - }, - toProto(message: MsgCreateGroupWithPolicyResponse): Uint8Array { - return MsgCreateGroupWithPolicyResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGroupWithPolicyResponse): MsgCreateGroupWithPolicyResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse", - value: MsgCreateGroupWithPolicyResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdminResponse { - return {}; -} -export const MsgUpdateGroupPolicyAdminResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyAdminResponse", - encode(_: MsgUpdateGroupPolicyAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupPolicyAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateGroupPolicyAdminResponse { - return {}; - }, - toJSON(_: MsgUpdateGroupPolicyAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateGroupPolicyAdminResponse { - const message = createBaseMsgUpdateGroupPolicyAdminResponse(); - return message; - }, - fromSDK(_: MsgUpdateGroupPolicyAdminResponseSDKType): MsgUpdateGroupPolicyAdminResponse { - return {}; - }, - toSDK(_: MsgUpdateGroupPolicyAdminResponse): MsgUpdateGroupPolicyAdminResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateGroupPolicyAdminResponseAmino): MsgUpdateGroupPolicyAdminResponse { - return {}; - }, - toAmino(_: MsgUpdateGroupPolicyAdminResponse): MsgUpdateGroupPolicyAdminResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupPolicyAdminResponseAminoMsg): MsgUpdateGroupPolicyAdminResponse { - return MsgUpdateGroupPolicyAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupPolicyAdminResponse): MsgUpdateGroupPolicyAdminResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupPolicyAdminResponse", - value: MsgUpdateGroupPolicyAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupPolicyAdminResponseProtoMsg): MsgUpdateGroupPolicyAdminResponse { - return MsgUpdateGroupPolicyAdminResponse.decode(message.value); - }, - toProto(message: MsgUpdateGroupPolicyAdminResponse): Uint8Array { - return MsgUpdateGroupPolicyAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupPolicyAdminResponse): MsgUpdateGroupPolicyAdminResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", - value: MsgUpdateGroupPolicyAdminResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { - return { - admin: "", - address: "", - decisionPolicy: Any.fromPartial({}) - }; -} -export const MsgUpdateGroupPolicyDecisionPolicy = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy", - encode(message: MsgUpdateGroupPolicyDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.decisionPolicy !== undefined) { - Any.encode(message.decisionPolicy, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupPolicyDecisionPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyDecisionPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.decisionPolicy = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateGroupPolicyDecisionPolicy { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - address: isSet(object.address) ? String(object.address) : "", - decisionPolicy: isSet(object.decisionPolicy) ? Any.fromJSON(object.decisionPolicy) : undefined - }; - }, - toJSON(message: MsgUpdateGroupPolicyDecisionPolicy): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.address !== undefined && (obj.address = message.address); - message.decisionPolicy !== undefined && (obj.decisionPolicy = message.decisionPolicy ? Any.toJSON(message.decisionPolicy) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateGroupPolicyDecisionPolicy { - const message = createBaseMsgUpdateGroupPolicyDecisionPolicy(); - message.admin = object.admin ?? ""; - message.address = object.address ?? ""; - message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? Any.fromPartial(object.decisionPolicy) : undefined; - return message; - }, - fromSDK(object: MsgUpdateGroupPolicyDecisionPolicySDKType): MsgUpdateGroupPolicyDecisionPolicy { - return { - admin: object?.admin, - address: object?.address, - decisionPolicy: object.decision_policy ? Any.fromSDK(object.decision_policy) : undefined - }; - }, - toSDK(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicySDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.address = message.address; - message.decisionPolicy !== undefined && (obj.decision_policy = message.decisionPolicy ? Any.toSDK(message.decisionPolicy) : undefined); - return obj; - }, - fromAmino(object: MsgUpdateGroupPolicyDecisionPolicyAmino): MsgUpdateGroupPolicyDecisionPolicy { - return { - admin: object.admin, - address: object.address, - decisionPolicy: object?.decision_policy ? Any.fromAmino(object.decision_policy) : undefined - }; - }, - toAmino(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicyAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.address = message.address; - obj.decision_policy = message.decisionPolicy ? Any.toAmino(message.decisionPolicy) : undefined; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupPolicyDecisionPolicyAminoMsg): MsgUpdateGroupPolicyDecisionPolicy { - return MsgUpdateGroupPolicyDecisionPolicy.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicyAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy", - value: MsgUpdateGroupPolicyDecisionPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupPolicyDecisionPolicyProtoMsg): MsgUpdateGroupPolicyDecisionPolicy { - return MsgUpdateGroupPolicyDecisionPolicy.decode(message.value); - }, - toProto(message: MsgUpdateGroupPolicyDecisionPolicy): Uint8Array { - return MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupPolicyDecisionPolicy): MsgUpdateGroupPolicyDecisionPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", - value: MsgUpdateGroupPolicyDecisionPolicy.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupPolicyDecisionPolicyResponse { - return {}; -} -export const MsgUpdateGroupPolicyDecisionPolicyResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse", - encode(_: MsgUpdateGroupPolicyDecisionPolicyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupPolicyDecisionPolicyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateGroupPolicyDecisionPolicyResponse { - return {}; - }, - toJSON(_: MsgUpdateGroupPolicyDecisionPolicyResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateGroupPolicyDecisionPolicyResponse { - const message = createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(); - return message; - }, - fromSDK(_: MsgUpdateGroupPolicyDecisionPolicyResponseSDKType): MsgUpdateGroupPolicyDecisionPolicyResponse { - return {}; - }, - toSDK(_: MsgUpdateGroupPolicyDecisionPolicyResponse): MsgUpdateGroupPolicyDecisionPolicyResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateGroupPolicyDecisionPolicyResponseAmino): MsgUpdateGroupPolicyDecisionPolicyResponse { - return {}; - }, - toAmino(_: MsgUpdateGroupPolicyDecisionPolicyResponse): MsgUpdateGroupPolicyDecisionPolicyResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupPolicyDecisionPolicyResponseAminoMsg): MsgUpdateGroupPolicyDecisionPolicyResponse { - return MsgUpdateGroupPolicyDecisionPolicyResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupPolicyDecisionPolicyResponse): MsgUpdateGroupPolicyDecisionPolicyResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicyResponse", - value: MsgUpdateGroupPolicyDecisionPolicyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupPolicyDecisionPolicyResponseProtoMsg): MsgUpdateGroupPolicyDecisionPolicyResponse { - return MsgUpdateGroupPolicyDecisionPolicyResponse.decode(message.value); - }, - toProto(message: MsgUpdateGroupPolicyDecisionPolicyResponse): Uint8Array { - return MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupPolicyDecisionPolicyResponse): MsgUpdateGroupPolicyDecisionPolicyResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", - value: MsgUpdateGroupPolicyDecisionPolicyResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { - return { - admin: "", - address: "", - metadata: "" - }; -} -export const MsgUpdateGroupPolicyMetadata = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyMetadata", - encode(message: MsgUpdateGroupPolicyMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupPolicyMetadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateGroupPolicyMetadata { - return { - admin: isSet(object.admin) ? String(object.admin) : "", - address: isSet(object.address) ? String(object.address) : "", - metadata: isSet(object.metadata) ? String(object.metadata) : "" - }; - }, - toJSON(message: MsgUpdateGroupPolicyMetadata): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - message.address !== undefined && (obj.address = message.address); - message.metadata !== undefined && (obj.metadata = message.metadata); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateGroupPolicyMetadata { - const message = createBaseMsgUpdateGroupPolicyMetadata(); - message.admin = object.admin ?? ""; - message.address = object.address ?? ""; - message.metadata = object.metadata ?? ""; - return message; - }, - fromSDK(object: MsgUpdateGroupPolicyMetadataSDKType): MsgUpdateGroupPolicyMetadata { - return { - admin: object?.admin, - address: object?.address, - metadata: object?.metadata - }; - }, - toSDK(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataSDKType { - const obj: any = {}; - obj.admin = message.admin; - obj.address = message.address; - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: MsgUpdateGroupPolicyMetadataAmino): MsgUpdateGroupPolicyMetadata { - return { - admin: object.admin, - address: object.address, - metadata: object.metadata - }; - }, - toAmino(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataAmino { - const obj: any = {}; - obj.admin = message.admin; - obj.address = message.address; - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupPolicyMetadataAminoMsg): MsgUpdateGroupPolicyMetadata { - return MsgUpdateGroupPolicyMetadata.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadata", - value: MsgUpdateGroupPolicyMetadata.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupPolicyMetadataProtoMsg): MsgUpdateGroupPolicyMetadata { - return MsgUpdateGroupPolicyMetadata.decode(message.value); - }, - toProto(message: MsgUpdateGroupPolicyMetadata): Uint8Array { - return MsgUpdateGroupPolicyMetadata.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupPolicyMetadata): MsgUpdateGroupPolicyMetadataProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", - value: MsgUpdateGroupPolicyMetadata.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyMetadataResponse { - return {}; -} -export const MsgUpdateGroupPolicyMetadataResponse = { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", - aminoType: "cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse", - encode(_: MsgUpdateGroupPolicyMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateGroupPolicyMetadataResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateGroupPolicyMetadataResponse { - return {}; - }, - toJSON(_: MsgUpdateGroupPolicyMetadataResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateGroupPolicyMetadataResponse { - const message = createBaseMsgUpdateGroupPolicyMetadataResponse(); - return message; - }, - fromSDK(_: MsgUpdateGroupPolicyMetadataResponseSDKType): MsgUpdateGroupPolicyMetadataResponse { - return {}; - }, - toSDK(_: MsgUpdateGroupPolicyMetadataResponse): MsgUpdateGroupPolicyMetadataResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateGroupPolicyMetadataResponseAmino): MsgUpdateGroupPolicyMetadataResponse { - return {}; - }, - toAmino(_: MsgUpdateGroupPolicyMetadataResponse): MsgUpdateGroupPolicyMetadataResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateGroupPolicyMetadataResponseAminoMsg): MsgUpdateGroupPolicyMetadataResponse { - return MsgUpdateGroupPolicyMetadataResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateGroupPolicyMetadataResponse): MsgUpdateGroupPolicyMetadataResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateGroupPolicyMetadataResponse", - value: MsgUpdateGroupPolicyMetadataResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateGroupPolicyMetadataResponseProtoMsg): MsgUpdateGroupPolicyMetadataResponse { - return MsgUpdateGroupPolicyMetadataResponse.decode(message.value); - }, - toProto(message: MsgUpdateGroupPolicyMetadataResponse): Uint8Array { - return MsgUpdateGroupPolicyMetadataResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateGroupPolicyMetadataResponse): MsgUpdateGroupPolicyMetadataResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", - value: MsgUpdateGroupPolicyMetadataResponse.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { - address: "", - proposers: [], - metadata: "", - messages: [], - exec: 0 - }; -} -export const MsgSubmitProposal = { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - aminoType: "cosmos-sdk/group/MsgSubmitProposal", - encode(message: MsgSubmitProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.proposers) { - writer.uint32(18).string(v!); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - for (const v of message.messages) { - Any.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.exec !== 0) { - writer.uint32(40).int32(message.exec); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.proposers.push(reader.string()); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 5: - message.exec = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitProposal { - return { - address: isSet(object.address) ? String(object.address) : "", - proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => String(e)) : [], - metadata: isSet(object.metadata) ? String(object.metadata) : "", - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], - exec: isSet(object.exec) ? execFromJSON(object.exec) : -1 - }; - }, - toJSON(message: MsgSubmitProposal): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.proposers) { - obj.proposers = message.proposers.map(e => e); - } else { - obj.proposers = []; - } - message.metadata !== undefined && (obj.metadata = message.metadata); - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.messages = []; - } - message.exec !== undefined && (obj.exec = execToJSON(message.exec)); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitProposal { - const message = createBaseMsgSubmitProposal(); - message.address = object.address ?? ""; - message.proposers = object.proposers?.map(e => e) || []; - message.metadata = object.metadata ?? ""; - message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - message.exec = object.exec ?? 0; - return message; - }, - fromSDK(object: MsgSubmitProposalSDKType): MsgSubmitProposal { - return { - address: object?.address, - proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => e) : [], - metadata: object?.metadata, - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromSDK(e)) : [], - exec: isSet(object.exec) ? execFromJSON(object.exec) : -1 - }; - }, - toSDK(message: MsgSubmitProposal): MsgSubmitProposalSDKType { - const obj: any = {}; - obj.address = message.address; - if (message.proposers) { - obj.proposers = message.proposers.map(e => e); - } else { - obj.proposers = []; - } - obj.metadata = message.metadata; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.messages = []; - } - message.exec !== undefined && (obj.exec = execToJSON(message.exec)); - return obj; - }, - fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal { - return { - address: object.address, - proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => e) : [], - metadata: object.metadata, - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromAmino(e)) : [], - exec: isSet(object.exec) ? execFromJSON(object.exec) : -1 - }; - }, - toAmino(message: MsgSubmitProposal): MsgSubmitProposalAmino { - const obj: any = {}; - obj.address = message.address; - if (message.proposers) { - obj.proposers = message.proposers.map(e => e); - } else { - obj.proposers = []; - } - obj.metadata = message.metadata; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.messages = []; - } - obj.exec = message.exec; - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal { - return MsgSubmitProposal.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg { - return { - type: "cosmos-sdk/group/MsgSubmitProposal", - value: MsgSubmitProposal.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitProposalProtoMsg): MsgSubmitProposal { - return MsgSubmitProposal.decode(message.value); - }, - toProto(message: MsgSubmitProposal): Uint8Array { - return MsgSubmitProposal.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposal", - value: MsgSubmitProposal.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { - return { - proposalId: BigInt(0) - }; -} -export const MsgSubmitProposalResponse = { - typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", - aminoType: "cosmos-sdk/MsgSubmitProposalResponse", - encode(message: MsgSubmitProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitProposalResponse { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgSubmitProposalResponse): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitProposalResponse { - const message = createBaseMsgSubmitProposalResponse(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgSubmitProposalResponseSDKType): MsgSubmitProposalResponse { - return { - proposalId: object?.proposal_id - }; - }, - toSDK(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - return obj; - }, - fromAmino(object: MsgSubmitProposalResponseAmino): MsgSubmitProposalResponse { - return { - proposalId: BigInt(object.proposal_id) - }; - }, - toAmino(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgSubmitProposalResponseAminoMsg): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitProposalResponse", - value: MsgSubmitProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitProposalResponseProtoMsg): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.decode(message.value); - }, - toProto(message: MsgSubmitProposalResponse): Uint8Array { - return MsgSubmitProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgSubmitProposalResponse", - value: MsgSubmitProposalResponse.encode(message).finish() - }; - } -}; -function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { - return { - proposalId: BigInt(0), - address: "" - }; -} -export const MsgWithdrawProposal = { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - aminoType: "cosmos-sdk/group/MsgWithdrawProposal", - encode(message: MsgWithdrawProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgWithdrawProposal { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: MsgWithdrawProposal): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): MsgWithdrawProposal { - const message = createBaseMsgWithdrawProposal(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: MsgWithdrawProposalSDKType): MsgWithdrawProposal { - return { - proposalId: object?.proposal_id, - address: object?.address - }; - }, - toSDK(message: MsgWithdrawProposal): MsgWithdrawProposalSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.address = message.address; - return obj; - }, - fromAmino(object: MsgWithdrawProposalAmino): MsgWithdrawProposal { - return { - proposalId: BigInt(object.proposal_id), - address: object.address - }; - }, - toAmino(message: MsgWithdrawProposal): MsgWithdrawProposalAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: MsgWithdrawProposalAminoMsg): MsgWithdrawProposal { - return MsgWithdrawProposal.fromAmino(object.value); - }, - toAminoMsg(message: MsgWithdrawProposal): MsgWithdrawProposalAminoMsg { - return { - type: "cosmos-sdk/group/MsgWithdrawProposal", - value: MsgWithdrawProposal.toAmino(message) - }; - }, - fromProtoMsg(message: MsgWithdrawProposalProtoMsg): MsgWithdrawProposal { - return MsgWithdrawProposal.decode(message.value); - }, - toProto(message: MsgWithdrawProposal): Uint8Array { - return MsgWithdrawProposal.encode(message).finish(); - }, - toProtoMsg(message: MsgWithdrawProposal): MsgWithdrawProposalProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", - value: MsgWithdrawProposal.encode(message).finish() - }; - } -}; -function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { - return {}; -} -export const MsgWithdrawProposalResponse = { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", - aminoType: "cosmos-sdk/MsgWithdrawProposalResponse", - encode(_: MsgWithdrawProposalResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawProposalResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgWithdrawProposalResponse { - return {}; - }, - toJSON(_: MsgWithdrawProposalResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgWithdrawProposalResponse { - const message = createBaseMsgWithdrawProposalResponse(); - return message; - }, - fromSDK(_: MsgWithdrawProposalResponseSDKType): MsgWithdrawProposalResponse { - return {}; - }, - toSDK(_: MsgWithdrawProposalResponse): MsgWithdrawProposalResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgWithdrawProposalResponseAmino): MsgWithdrawProposalResponse { - return {}; - }, - toAmino(_: MsgWithdrawProposalResponse): MsgWithdrawProposalResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgWithdrawProposalResponseAminoMsg): MsgWithdrawProposalResponse { - return MsgWithdrawProposalResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgWithdrawProposalResponse): MsgWithdrawProposalResponseAminoMsg { - return { - type: "cosmos-sdk/MsgWithdrawProposalResponse", - value: MsgWithdrawProposalResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgWithdrawProposalResponseProtoMsg): MsgWithdrawProposalResponse { - return MsgWithdrawProposalResponse.decode(message.value); - }, - toProto(message: MsgWithdrawProposalResponse): Uint8Array { - return MsgWithdrawProposalResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgWithdrawProposalResponse): MsgWithdrawProposalResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgWithdrawProposalResponse", - value: MsgWithdrawProposalResponse.encode(message).finish() - }; - } -}; -function createBaseMsgVote(): MsgVote { - return { - proposalId: BigInt(0), - voter: "", - option: 0, - metadata: "", - exec: 0 - }; -} -export const MsgVote = { - typeUrl: "/cosmos.group.v1.MsgVote", - aminoType: "cosmos-sdk/group/MsgVote", - encode(message: MsgVote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - if (message.exec !== 0) { - writer.uint32(40).int32(message.exec); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.exec = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgVote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: isSet(object.metadata) ? String(object.metadata) : "", - exec: isSet(object.exec) ? execFromJSON(object.exec) : -1 - }; - }, - toJSON(message: MsgVote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - message.metadata !== undefined && (obj.metadata = message.metadata); - message.exec !== undefined && (obj.exec = execToJSON(message.exec)); - return obj; - }, - fromPartial(object: DeepPartial): MsgVote { - const message = createBaseMsgVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; - message.exec = object.exec ?? 0; - return message; - }, - fromSDK(object: MsgVoteSDKType): MsgVote { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: object?.metadata, - exec: isSet(object.exec) ? execFromJSON(object.exec) : -1 - }; - }, - toSDK(message: MsgVote): MsgVoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - obj.metadata = message.metadata; - message.exec !== undefined && (obj.exec = execToJSON(message.exec)); - return obj; - }, - fromAmino(object: MsgVoteAmino): MsgVote { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: object.metadata, - exec: isSet(object.exec) ? execFromJSON(object.exec) : -1 - }; - }, - toAmino(message: MsgVote): MsgVoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - obj.option = message.option; - obj.metadata = message.metadata; - obj.exec = message.exec; - return obj; - }, - fromAminoMsg(object: MsgVoteAminoMsg): MsgVote { - return MsgVote.fromAmino(object.value); - }, - toAminoMsg(message: MsgVote): MsgVoteAminoMsg { - return { - type: "cosmos-sdk/group/MsgVote", - value: MsgVote.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteProtoMsg): MsgVote { - return MsgVote.decode(message.value); - }, - toProto(message: MsgVote): Uint8Array { - return MsgVote.encode(message).finish(); - }, - toProtoMsg(message: MsgVote): MsgVoteProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgVote", - value: MsgVote.encode(message).finish() - }; - } -}; -function createBaseMsgVoteResponse(): MsgVoteResponse { - return {}; -} -export const MsgVoteResponse = { - typeUrl: "/cosmos.group.v1.MsgVoteResponse", - aminoType: "cosmos-sdk/MsgVoteResponse", - encode(_: MsgVoteResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgVoteResponse { - return {}; - }, - toJSON(_: MsgVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgVoteResponse { - const message = createBaseMsgVoteResponse(); - return message; - }, - fromSDK(_: MsgVoteResponseSDKType): MsgVoteResponse { - return {}; - }, - toSDK(_: MsgVoteResponse): MsgVoteResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgVoteResponseAmino): MsgVoteResponse { - return {}; - }, - toAmino(_: MsgVoteResponse): MsgVoteResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgVoteResponseAminoMsg): MsgVoteResponse { - return MsgVoteResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg { - return { - type: "cosmos-sdk/MsgVoteResponse", - value: MsgVoteResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgVoteResponseProtoMsg): MsgVoteResponse { - return MsgVoteResponse.decode(message.value); - }, - toProto(message: MsgVoteResponse): Uint8Array { - return MsgVoteResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgVoteResponse", - value: MsgVoteResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExec(): MsgExec { - return { - proposalId: BigInt(0), - signer: "" - }; -} -export const MsgExec = { - typeUrl: "/cosmos.group.v1.MsgExec", - aminoType: "cosmos-sdk/group/MsgExec", - encode(message: MsgExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.signer !== "") { - writer.uint32(18).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExec { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExec { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgExec): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgExec { - const message = createBaseMsgExec(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgExecSDKType): MsgExec { - return { - proposalId: object?.proposal_id, - signer: object?.signer - }; - }, - toSDK(message: MsgExec): MsgExecSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgExecAmino): MsgExec { - return { - proposalId: BigInt(object.proposal_id), - signer: object.signer - }; - }, - toAmino(message: MsgExec): MsgExecAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgExecAminoMsg): MsgExec { - return MsgExec.fromAmino(object.value); - }, - toAminoMsg(message: MsgExec): MsgExecAminoMsg { - return { - type: "cosmos-sdk/group/MsgExec", - value: MsgExec.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecProtoMsg): MsgExec { - return MsgExec.decode(message.value); - }, - toProto(message: MsgExec): Uint8Array { - return MsgExec.encode(message).finish(); - }, - toProtoMsg(message: MsgExec): MsgExecProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgExec", - value: MsgExec.encode(message).finish() - }; - } -}; -function createBaseMsgExecResponse(): MsgExecResponse { - return {}; -} -export const MsgExecResponse = { - typeUrl: "/cosmos.group.v1.MsgExecResponse", - aminoType: "cosmos-sdk/MsgExecResponse", - encode(_: MsgExecResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgExecResponse { - return {}; - }, - toJSON(_: MsgExecResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgExecResponse { - const message = createBaseMsgExecResponse(); - return message; - }, - fromSDK(_: MsgExecResponseSDKType): MsgExecResponse { - return {}; - }, - toSDK(_: MsgExecResponse): MsgExecResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgExecResponseAmino): MsgExecResponse { - return {}; - }, - toAmino(_: MsgExecResponse): MsgExecResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgExecResponseAminoMsg): MsgExecResponse { - return MsgExecResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExecResponse): MsgExecResponseAminoMsg { - return { - type: "cosmos-sdk/MsgExecResponse", - value: MsgExecResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecResponseProtoMsg): MsgExecResponse { - return MsgExecResponse.decode(message.value); - }, - toProto(message: MsgExecResponse): Uint8Array { - return MsgExecResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExecResponse): MsgExecResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgExecResponse", - value: MsgExecResponse.encode(message).finish() - }; - } -}; -function createBaseMsgLeaveGroup(): MsgLeaveGroup { - return { - address: "", - groupId: BigInt(0) - }; -} -export const MsgLeaveGroup = { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - aminoType: "cosmos-sdk/group/MsgLeaveGroup", - encode(message: MsgLeaveGroup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.groupId !== BigInt(0)) { - writer.uint32(16).uint64(message.groupId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgLeaveGroup { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLeaveGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgLeaveGroup { - return { - address: isSet(object.address) ? String(object.address) : "", - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgLeaveGroup): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgLeaveGroup { - const message = createBaseMsgLeaveGroup(); - message.address = object.address ?? ""; - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgLeaveGroupSDKType): MsgLeaveGroup { - return { - address: object?.address, - groupId: object?.group_id - }; - }, - toSDK(message: MsgLeaveGroup): MsgLeaveGroupSDKType { - const obj: any = {}; - obj.address = message.address; - obj.group_id = message.groupId; - return obj; - }, - fromAmino(object: MsgLeaveGroupAmino): MsgLeaveGroup { - return { - address: object.address, - groupId: BigInt(object.group_id) - }; - }, - toAmino(message: MsgLeaveGroup): MsgLeaveGroupAmino { - const obj: any = {}; - obj.address = message.address; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgLeaveGroupAminoMsg): MsgLeaveGroup { - return MsgLeaveGroup.fromAmino(object.value); - }, - toAminoMsg(message: MsgLeaveGroup): MsgLeaveGroupAminoMsg { - return { - type: "cosmos-sdk/group/MsgLeaveGroup", - value: MsgLeaveGroup.toAmino(message) - }; - }, - fromProtoMsg(message: MsgLeaveGroupProtoMsg): MsgLeaveGroup { - return MsgLeaveGroup.decode(message.value); - }, - toProto(message: MsgLeaveGroup): Uint8Array { - return MsgLeaveGroup.encode(message).finish(); - }, - toProtoMsg(message: MsgLeaveGroup): MsgLeaveGroupProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroup", - value: MsgLeaveGroup.encode(message).finish() - }; - } -}; -function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { - return {}; -} -export const MsgLeaveGroupResponse = { - typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", - aminoType: "cosmos-sdk/MsgLeaveGroupResponse", - encode(_: MsgLeaveGroupResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgLeaveGroupResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLeaveGroupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgLeaveGroupResponse { - return {}; - }, - toJSON(_: MsgLeaveGroupResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgLeaveGroupResponse { - const message = createBaseMsgLeaveGroupResponse(); - return message; - }, - fromSDK(_: MsgLeaveGroupResponseSDKType): MsgLeaveGroupResponse { - return {}; - }, - toSDK(_: MsgLeaveGroupResponse): MsgLeaveGroupResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgLeaveGroupResponseAmino): MsgLeaveGroupResponse { - return {}; - }, - toAmino(_: MsgLeaveGroupResponse): MsgLeaveGroupResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgLeaveGroupResponseAminoMsg): MsgLeaveGroupResponse { - return MsgLeaveGroupResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgLeaveGroupResponse): MsgLeaveGroupResponseAminoMsg { - return { - type: "cosmos-sdk/MsgLeaveGroupResponse", - value: MsgLeaveGroupResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgLeaveGroupResponseProtoMsg): MsgLeaveGroupResponse { - return MsgLeaveGroupResponse.decode(message.value); - }, - toProto(message: MsgLeaveGroupResponse): Uint8Array { - return MsgLeaveGroupResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgLeaveGroupResponse): MsgLeaveGroupResponseProtoMsg { - return { - typeUrl: "/cosmos.group.v1.MsgLeaveGroupResponse", - value: MsgLeaveGroupResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/group/v1/types.ts b/examples/interchainjs/src/codegen/cosmos/group/v1/types.ts deleted file mode 100644 index d7a72a8b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/group/v1/types.ts +++ /dev/null @@ -1,2277 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -/** VoteOption enumerates the valid vote options for a given proposal. */ -export enum VoteOption { - /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */ - VOTE_OPTION_UNSPECIFIED = 0, - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VOTE_OPTION_YES = 1, - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VOTE_OPTION_ABSTAIN = 2, - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VOTE_OPTION_NO = 3, - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VOTE_OPTION_NO_WITH_VETO = 4, - UNRECOGNIZED = -1, -} -export const VoteOptionSDKType = VoteOption; -export const VoteOptionAmino = VoteOption; -export function voteOptionFromJSON(object: any): VoteOption { - switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; - } -} -export function voteOptionToJSON(object: VoteOption): string { - switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ProposalStatus defines proposal statuses. */ -export enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - An empty value is invalid and not allowed. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** PROPOSAL_STATUS_SUBMITTED - Initial status of a proposal when persisted. */ - PROPOSAL_STATUS_SUBMITTED = 1, - /** PROPOSAL_STATUS_CLOSED - Final status of a proposal when the final tally was executed. */ - PROPOSAL_STATUS_CLOSED = 2, - /** PROPOSAL_STATUS_ABORTED - Final status of a proposal when the group was modified before the final tally. */ - PROPOSAL_STATUS_ABORTED = 3, - /** - * PROPOSAL_STATUS_WITHDRAWN - A proposal can be deleted before the voting start time by the owner. When this happens the final status - * is Withdrawn. - */ - PROPOSAL_STATUS_WITHDRAWN = 4, - UNRECOGNIZED = -1, -} -export const ProposalStatusSDKType = ProposalStatus; -export const ProposalStatusAmino = ProposalStatus; -export function proposalStatusFromJSON(object: any): ProposalStatus { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_SUBMITTED": - return ProposalStatus.PROPOSAL_STATUS_SUBMITTED; - case 2: - case "PROPOSAL_STATUS_CLOSED": - return ProposalStatus.PROPOSAL_STATUS_CLOSED; - case 3: - case "PROPOSAL_STATUS_ABORTED": - return ProposalStatus.PROPOSAL_STATUS_ABORTED; - case 4: - case "PROPOSAL_STATUS_WITHDRAWN": - return ProposalStatus.PROPOSAL_STATUS_WITHDRAWN; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} -export function proposalStatusToJSON(object: ProposalStatus): string { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_SUBMITTED: - return "PROPOSAL_STATUS_SUBMITTED"; - case ProposalStatus.PROPOSAL_STATUS_CLOSED: - return "PROPOSAL_STATUS_CLOSED"; - case ProposalStatus.PROPOSAL_STATUS_ABORTED: - return "PROPOSAL_STATUS_ABORTED"; - case ProposalStatus.PROPOSAL_STATUS_WITHDRAWN: - return "PROPOSAL_STATUS_WITHDRAWN"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ProposalResult defines types of proposal results. */ -export enum ProposalResult { - /** PROPOSAL_RESULT_UNSPECIFIED - An empty value is invalid and not allowed */ - PROPOSAL_RESULT_UNSPECIFIED = 0, - /** PROPOSAL_RESULT_UNFINALIZED - Until a final tally has happened the status is unfinalized */ - PROPOSAL_RESULT_UNFINALIZED = 1, - /** PROPOSAL_RESULT_ACCEPTED - Final result of the tally */ - PROPOSAL_RESULT_ACCEPTED = 2, - /** PROPOSAL_RESULT_REJECTED - Final result of the tally */ - PROPOSAL_RESULT_REJECTED = 3, - UNRECOGNIZED = -1, -} -export const ProposalResultSDKType = ProposalResult; -export const ProposalResultAmino = ProposalResult; -export function proposalResultFromJSON(object: any): ProposalResult { - switch (object) { - case 0: - case "PROPOSAL_RESULT_UNSPECIFIED": - return ProposalResult.PROPOSAL_RESULT_UNSPECIFIED; - case 1: - case "PROPOSAL_RESULT_UNFINALIZED": - return ProposalResult.PROPOSAL_RESULT_UNFINALIZED; - case 2: - case "PROPOSAL_RESULT_ACCEPTED": - return ProposalResult.PROPOSAL_RESULT_ACCEPTED; - case 3: - case "PROPOSAL_RESULT_REJECTED": - return ProposalResult.PROPOSAL_RESULT_REJECTED; - case -1: - case "UNRECOGNIZED": - default: - return ProposalResult.UNRECOGNIZED; - } -} -export function proposalResultToJSON(object: ProposalResult): string { - switch (object) { - case ProposalResult.PROPOSAL_RESULT_UNSPECIFIED: - return "PROPOSAL_RESULT_UNSPECIFIED"; - case ProposalResult.PROPOSAL_RESULT_UNFINALIZED: - return "PROPOSAL_RESULT_UNFINALIZED"; - case ProposalResult.PROPOSAL_RESULT_ACCEPTED: - return "PROPOSAL_RESULT_ACCEPTED"; - case ProposalResult.PROPOSAL_RESULT_REJECTED: - return "PROPOSAL_RESULT_REJECTED"; - case ProposalResult.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ProposalExecutorResult defines types of proposal executor results. */ -export enum ProposalExecutorResult { - /** PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - An empty value is not allowed. */ - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0, - /** PROPOSAL_EXECUTOR_RESULT_NOT_RUN - We have not yet run the executor. */ - PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1, - /** PROPOSAL_EXECUTOR_RESULT_SUCCESS - The executor was successful and proposed action updated state. */ - PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2, - /** PROPOSAL_EXECUTOR_RESULT_FAILURE - The executor returned an error and proposed action didn't update state. */ - PROPOSAL_EXECUTOR_RESULT_FAILURE = 3, - UNRECOGNIZED = -1, -} -export const ProposalExecutorResultSDKType = ProposalExecutorResult; -export const ProposalExecutorResultAmino = ProposalExecutorResult; -export function proposalExecutorResultFromJSON(object: any): ProposalExecutorResult { - switch (object) { - case 0: - case "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED; - case 1: - case "PROPOSAL_EXECUTOR_RESULT_NOT_RUN": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN; - case 2: - case "PROPOSAL_EXECUTOR_RESULT_SUCCESS": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS; - case 3: - case "PROPOSAL_EXECUTOR_RESULT_FAILURE": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE; - case -1: - case "UNRECOGNIZED": - default: - return ProposalExecutorResult.UNRECOGNIZED; - } -} -export function proposalExecutorResultToJSON(object: ProposalExecutorResult): string { - switch (object) { - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: - return "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN: - return "PROPOSAL_EXECUTOR_RESULT_NOT_RUN"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS: - return "PROPOSAL_EXECUTOR_RESULT_SUCCESS"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE: - return "PROPOSAL_EXECUTOR_RESULT_FAILURE"; - case ProposalExecutorResult.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * Member represents a group member with an account address, - * non-zero weight and metadata. - */ -export interface Member { - /** address is the member's account address. */ - address: string; - /** weight is the member's voting weight that should be greater than 0. */ - weight: string; - /** metadata is any arbitrary metadata to attached to the member. */ - metadata: string; - /** added_at is a timestamp specifying when a member was added. */ - addedAt: Date | undefined; -} -export interface MemberProtoMsg { - typeUrl: "/cosmos.group.v1.Member"; - value: Uint8Array; -} -/** - * Member represents a group member with an account address, - * non-zero weight and metadata. - */ -export interface MemberAmino { - /** address is the member's account address. */ - address: string; - /** weight is the member's voting weight that should be greater than 0. */ - weight: string; - /** metadata is any arbitrary metadata to attached to the member. */ - metadata: string; - /** added_at is a timestamp specifying when a member was added. */ - added_at?: Date | undefined; -} -export interface MemberAminoMsg { - type: "cosmos-sdk/Member"; - value: MemberAmino; -} -/** - * Member represents a group member with an account address, - * non-zero weight and metadata. - */ -export interface MemberSDKType { - address: string; - weight: string; - metadata: string; - added_at: Date | undefined; -} -/** Members defines a repeated slice of Member objects. */ -export interface Members { - /** members is the list of members. */ - members: Member[]; -} -export interface MembersProtoMsg { - typeUrl: "/cosmos.group.v1.Members"; - value: Uint8Array; -} -/** Members defines a repeated slice of Member objects. */ -export interface MembersAmino { - /** members is the list of members. */ - members: MemberAmino[]; -} -export interface MembersAminoMsg { - type: "cosmos-sdk/Members"; - value: MembersAmino; -} -/** Members defines a repeated slice of Member objects. */ -export interface MembersSDKType { - members: MemberSDKType[]; -} -/** ThresholdDecisionPolicy implements the DecisionPolicy interface */ -export interface ThresholdDecisionPolicy { - /** threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. */ - threshold: string; - /** windows defines the different windows for voting and execution. */ - windows: DecisionPolicyWindows | undefined; -} -export interface ThresholdDecisionPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy"; - value: Uint8Array; -} -/** ThresholdDecisionPolicy implements the DecisionPolicy interface */ -export interface ThresholdDecisionPolicyAmino { - /** threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. */ - threshold: string; - /** windows defines the different windows for voting and execution. */ - windows?: DecisionPolicyWindowsAmino | undefined; -} -export interface ThresholdDecisionPolicyAminoMsg { - type: "cosmos-sdk/ThresholdDecisionPolicy"; - value: ThresholdDecisionPolicyAmino; -} -/** ThresholdDecisionPolicy implements the DecisionPolicy interface */ -export interface ThresholdDecisionPolicySDKType { - threshold: string; - windows: DecisionPolicyWindowsSDKType | undefined; -} -/** PercentageDecisionPolicy implements the DecisionPolicy interface */ -export interface PercentageDecisionPolicy { - /** percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. */ - percentage: string; - /** windows defines the different windows for voting and execution. */ - windows: DecisionPolicyWindows | undefined; -} -export interface PercentageDecisionPolicyProtoMsg { - typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy"; - value: Uint8Array; -} -/** PercentageDecisionPolicy implements the DecisionPolicy interface */ -export interface PercentageDecisionPolicyAmino { - /** percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. */ - percentage: string; - /** windows defines the different windows for voting and execution. */ - windows?: DecisionPolicyWindowsAmino | undefined; -} -export interface PercentageDecisionPolicyAminoMsg { - type: "cosmos-sdk/PercentageDecisionPolicy"; - value: PercentageDecisionPolicyAmino; -} -/** PercentageDecisionPolicy implements the DecisionPolicy interface */ -export interface PercentageDecisionPolicySDKType { - percentage: string; - windows: DecisionPolicyWindowsSDKType | undefined; -} -/** DecisionPolicyWindows defines the different windows for voting and execution. */ -export interface DecisionPolicyWindows { - /** - * voting_period is the duration from submission of a proposal to the end of voting period - * Within this times votes can be submitted with MsgVote. - */ - votingPeriod: Duration | undefined; - /** - * min_execution_period is the minimum duration after the proposal submission - * where members can start sending MsgExec. This means that the window for - * sending a MsgExec transaction is: - * `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - * where max_execution_period is a app-specific config, defined in the keeper. - * If not set, min_execution_period will default to 0. - * - * Please make sure to set a `min_execution_period` that is smaller than - * `voting_period + max_execution_period`, or else the above execution window - * is empty, meaning that all proposals created with this decision policy - * won't be able to be executed. - */ - minExecutionPeriod: Duration | undefined; -} -export interface DecisionPolicyWindowsProtoMsg { - typeUrl: "/cosmos.group.v1.DecisionPolicyWindows"; - value: Uint8Array; -} -/** DecisionPolicyWindows defines the different windows for voting and execution. */ -export interface DecisionPolicyWindowsAmino { - /** - * voting_period is the duration from submission of a proposal to the end of voting period - * Within this times votes can be submitted with MsgVote. - */ - voting_period?: DurationAmino | undefined; - /** - * min_execution_period is the minimum duration after the proposal submission - * where members can start sending MsgExec. This means that the window for - * sending a MsgExec transaction is: - * `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - * where max_execution_period is a app-specific config, defined in the keeper. - * If not set, min_execution_period will default to 0. - * - * Please make sure to set a `min_execution_period` that is smaller than - * `voting_period + max_execution_period`, or else the above execution window - * is empty, meaning that all proposals created with this decision policy - * won't be able to be executed. - */ - min_execution_period?: DurationAmino | undefined; -} -export interface DecisionPolicyWindowsAminoMsg { - type: "cosmos-sdk/DecisionPolicyWindows"; - value: DecisionPolicyWindowsAmino; -} -/** DecisionPolicyWindows defines the different windows for voting and execution. */ -export interface DecisionPolicyWindowsSDKType { - voting_period: DurationSDKType | undefined; - min_execution_period: DurationSDKType | undefined; -} -/** GroupInfo represents the high-level on-chain information for a group. */ -export interface GroupInfo { - /** id is the unique ID of the group. */ - id: bigint; - /** admin is the account address of the group's admin. */ - admin: string; - /** metadata is any arbitrary metadata to attached to the group. */ - metadata: string; - /** - * version is used to track changes to a group's membership structure that - * would break existing proposals. Whenever any members weight is changed, - * or any member is added or removed this version is incremented and will - * cause proposals based on older versions of this group to fail - */ - version: bigint; - /** total_weight is the sum of the group members' weights. */ - totalWeight: string; - /** created_at is a timestamp specifying when a group was created. */ - createdAt: Date | undefined; -} -export interface GroupInfoProtoMsg { - typeUrl: "/cosmos.group.v1.GroupInfo"; - value: Uint8Array; -} -/** GroupInfo represents the high-level on-chain information for a group. */ -export interface GroupInfoAmino { - /** id is the unique ID of the group. */ - id: string; - /** admin is the account address of the group's admin. */ - admin: string; - /** metadata is any arbitrary metadata to attached to the group. */ - metadata: string; - /** - * version is used to track changes to a group's membership structure that - * would break existing proposals. Whenever any members weight is changed, - * or any member is added or removed this version is incremented and will - * cause proposals based on older versions of this group to fail - */ - version: string; - /** total_weight is the sum of the group members' weights. */ - total_weight: string; - /** created_at is a timestamp specifying when a group was created. */ - created_at?: Date | undefined; -} -export interface GroupInfoAminoMsg { - type: "cosmos-sdk/GroupInfo"; - value: GroupInfoAmino; -} -/** GroupInfo represents the high-level on-chain information for a group. */ -export interface GroupInfoSDKType { - id: bigint; - admin: string; - metadata: string; - version: bigint; - total_weight: string; - created_at: Date | undefined; -} -/** GroupMember represents the relationship between a group and a member. */ -export interface GroupMember { - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** member is the member data. */ - member: Member | undefined; -} -export interface GroupMemberProtoMsg { - typeUrl: "/cosmos.group.v1.GroupMember"; - value: Uint8Array; -} -/** GroupMember represents the relationship between a group and a member. */ -export interface GroupMemberAmino { - /** group_id is the unique ID of the group. */ - group_id: string; - /** member is the member data. */ - member?: MemberAmino | undefined; -} -export interface GroupMemberAminoMsg { - type: "cosmos-sdk/GroupMember"; - value: GroupMemberAmino; -} -/** GroupMember represents the relationship between a group and a member. */ -export interface GroupMemberSDKType { - group_id: bigint; - member: MemberSDKType | undefined; -} -/** GroupPolicyInfo represents the high-level on-chain information for a group policy. */ -export interface GroupPolicyInfo { - /** address is the account address of group policy. */ - address: string; - /** group_id is the unique ID of the group. */ - groupId: bigint; - /** admin is the account address of the group admin. */ - admin: string; - /** metadata is any arbitrary metadata to attached to the group policy. */ - metadata: string; - /** - * version is used to track changes to a group's GroupPolicyInfo structure that - * would create a different result on a running proposal. - */ - version: bigint; - /** decision_policy specifies the group policy's decision policy. */ - decisionPolicy: Any | undefined; - /** created_at is a timestamp specifying when a group policy was created. */ - createdAt: Date | undefined; -} -export interface GroupPolicyInfoProtoMsg { - typeUrl: "/cosmos.group.v1.GroupPolicyInfo"; - value: Uint8Array; -} -/** GroupPolicyInfo represents the high-level on-chain information for a group policy. */ -export interface GroupPolicyInfoAmino { - /** address is the account address of group policy. */ - address: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** admin is the account address of the group admin. */ - admin: string; - /** metadata is any arbitrary metadata to attached to the group policy. */ - metadata: string; - /** - * version is used to track changes to a group's GroupPolicyInfo structure that - * would create a different result on a running proposal. - */ - version: string; - /** decision_policy specifies the group policy's decision policy. */ - decision_policy?: AnyAmino | undefined; - /** created_at is a timestamp specifying when a group policy was created. */ - created_at?: Date | undefined; -} -export interface GroupPolicyInfoAminoMsg { - type: "cosmos-sdk/GroupPolicyInfo"; - value: GroupPolicyInfoAmino; -} -/** GroupPolicyInfo represents the high-level on-chain information for a group policy. */ -export interface GroupPolicyInfoSDKType { - address: string; - group_id: bigint; - admin: string; - metadata: string; - version: bigint; - decision_policy: AnySDKType | undefined; - created_at: Date | undefined; -} -/** - * Proposal defines a group proposal. Any member of a group can submit a proposal - * for a group policy to decide upon. - * A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal - * passes as well as some optional metadata associated with the proposal. - */ -export interface Proposal { - /** id is the unique id of the proposal. */ - id: bigint; - /** address is the account address of group policy. */ - address: string; - /** metadata is any arbitrary metadata to attached to the proposal. */ - metadata: string; - /** proposers are the account addresses of the proposers. */ - proposers: string[]; - /** submit_time is a timestamp specifying when a proposal was submitted. */ - submitTime: Date | undefined; - /** - * group_version tracks the version of the group that this proposal corresponds to. - * When group membership is changed, existing proposals from previous group versions will become invalid. - */ - groupVersion: bigint; - /** - * group_policy_version tracks the version of the group policy that this proposal corresponds to. - * When a decision policy is changed, existing proposals from previous policy versions will become invalid. - */ - groupPolicyVersion: bigint; - /** status represents the high level position in the life cycle of the proposal. Initial value is Submitted. */ - status: ProposalStatus; - /** - * result is the final result based on the votes and election rule. Initial value is unfinalized. - * The result is persisted so that clients can always rely on this state and not have to replicate the logic. - */ - result: ProposalResult; - /** - * final_tally_result contains the sums of all weighted votes for this - * proposal for each vote option, after tallying. When querying a proposal - * via gRPC, this field is not populated until the proposal's voting period - * has ended. - */ - finalTallyResult: TallyResult | undefined; - /** - * voting_period_end is the timestamp before which voting must be done. - * Unless a successfull MsgExec is called before (to execute a proposal whose - * tally is successful before the voting period ends), tallying will be done - * at this point, and the `final_tally_result`, as well - * as `status` and `result` fields will be accordingly updated. - */ - votingPeriodEnd: Date | undefined; - /** executor_result is the final result based on the votes and election rule. Initial value is NotRun. */ - executorResult: ProposalExecutorResult; - /** messages is a list of Msgs that will be executed if the proposal passes. */ - messages: Any[]; -} -export interface ProposalProtoMsg { - typeUrl: "/cosmos.group.v1.Proposal"; - value: Uint8Array; -} -/** - * Proposal defines a group proposal. Any member of a group can submit a proposal - * for a group policy to decide upon. - * A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal - * passes as well as some optional metadata associated with the proposal. - */ -export interface ProposalAmino { - /** id is the unique id of the proposal. */ - id: string; - /** address is the account address of group policy. */ - address: string; - /** metadata is any arbitrary metadata to attached to the proposal. */ - metadata: string; - /** proposers are the account addresses of the proposers. */ - proposers: string[]; - /** submit_time is a timestamp specifying when a proposal was submitted. */ - submit_time?: Date | undefined; - /** - * group_version tracks the version of the group that this proposal corresponds to. - * When group membership is changed, existing proposals from previous group versions will become invalid. - */ - group_version: string; - /** - * group_policy_version tracks the version of the group policy that this proposal corresponds to. - * When a decision policy is changed, existing proposals from previous policy versions will become invalid. - */ - group_policy_version: string; - /** status represents the high level position in the life cycle of the proposal. Initial value is Submitted. */ - status: ProposalStatus; - /** - * result is the final result based on the votes and election rule. Initial value is unfinalized. - * The result is persisted so that clients can always rely on this state and not have to replicate the logic. - */ - result: ProposalResult; - /** - * final_tally_result contains the sums of all weighted votes for this - * proposal for each vote option, after tallying. When querying a proposal - * via gRPC, this field is not populated until the proposal's voting period - * has ended. - */ - final_tally_result?: TallyResultAmino | undefined; - /** - * voting_period_end is the timestamp before which voting must be done. - * Unless a successfull MsgExec is called before (to execute a proposal whose - * tally is successful before the voting period ends), tallying will be done - * at this point, and the `final_tally_result`, as well - * as `status` and `result` fields will be accordingly updated. - */ - voting_period_end?: Date | undefined; - /** executor_result is the final result based on the votes and election rule. Initial value is NotRun. */ - executor_result: ProposalExecutorResult; - /** messages is a list of Msgs that will be executed if the proposal passes. */ - messages: AnyAmino[]; -} -export interface ProposalAminoMsg { - type: "cosmos-sdk/Proposal"; - value: ProposalAmino; -} -/** - * Proposal defines a group proposal. Any member of a group can submit a proposal - * for a group policy to decide upon. - * A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal - * passes as well as some optional metadata associated with the proposal. - */ -export interface ProposalSDKType { - id: bigint; - address: string; - metadata: string; - proposers: string[]; - submit_time: Date | undefined; - group_version: bigint; - group_policy_version: bigint; - status: ProposalStatus; - result: ProposalResult; - final_tally_result: TallyResultSDKType | undefined; - voting_period_end: Date | undefined; - executor_result: ProposalExecutorResult; - messages: AnySDKType[]; -} -/** TallyResult represents the sum of weighted votes for each vote option. */ -export interface TallyResult { - /** yes_count is the weighted sum of yes votes. */ - yesCount: string; - /** abstain_count is the weighted sum of abstainers. */ - abstainCount: string; - /** no is the weighted sum of no votes. */ - noCount: string; - /** no_with_veto_count is the weighted sum of veto. */ - noWithVetoCount: string; -} -export interface TallyResultProtoMsg { - typeUrl: "/cosmos.group.v1.TallyResult"; - value: Uint8Array; -} -/** TallyResult represents the sum of weighted votes for each vote option. */ -export interface TallyResultAmino { - /** yes_count is the weighted sum of yes votes. */ - yes_count: string; - /** abstain_count is the weighted sum of abstainers. */ - abstain_count: string; - /** no is the weighted sum of no votes. */ - no_count: string; - /** no_with_veto_count is the weighted sum of veto. */ - no_with_veto_count: string; -} -export interface TallyResultAminoMsg { - type: "cosmos-sdk/TallyResult"; - value: TallyResultAmino; -} -/** TallyResult represents the sum of weighted votes for each vote option. */ -export interface TallyResultSDKType { - yes_count: string; - abstain_count: string; - no_count: string; - no_with_veto_count: string; -} -/** Vote represents a vote for a proposal. */ -export interface Vote { - /** proposal is the unique ID of the proposal. */ - proposalId: bigint; - /** voter is the account address of the voter. */ - voter: string; - /** option is the voter's choice on the proposal. */ - option: VoteOption; - /** metadata is any arbitrary metadata to attached to the vote. */ - metadata: string; - /** submit_time is the timestamp when the vote was submitted. */ - submitTime: Date | undefined; -} -export interface VoteProtoMsg { - typeUrl: "/cosmos.group.v1.Vote"; - value: Uint8Array; -} -/** Vote represents a vote for a proposal. */ -export interface VoteAmino { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** voter is the account address of the voter. */ - voter: string; - /** option is the voter's choice on the proposal. */ - option: VoteOption; - /** metadata is any arbitrary metadata to attached to the vote. */ - metadata: string; - /** submit_time is the timestamp when the vote was submitted. */ - submit_time?: Date | undefined; -} -export interface VoteAminoMsg { - type: "cosmos-sdk/Vote"; - value: VoteAmino; -} -/** Vote represents a vote for a proposal. */ -export interface VoteSDKType { - proposal_id: bigint; - voter: string; - option: VoteOption; - metadata: string; - submit_time: Date | undefined; -} -function createBaseMember(): Member { - return { - address: "", - weight: "", - metadata: "", - addedAt: new Date() - }; -} -export const Member = { - typeUrl: "/cosmos.group.v1.Member", - aminoType: "cosmos-sdk/Member", - encode(message: Member, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - if (message.addedAt !== undefined) { - Timestamp.encode(toTimestamp(message.addedAt), writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Member { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMember(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.weight = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.addedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Member { - return { - address: isSet(object.address) ? String(object.address) : "", - weight: isSet(object.weight) ? String(object.weight) : "", - metadata: isSet(object.metadata) ? String(object.metadata) : "", - addedAt: isSet(object.addedAt) ? new Date(object.addedAt) : undefined - }; - }, - toJSON(message: Member): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.weight !== undefined && (obj.weight = message.weight); - message.metadata !== undefined && (obj.metadata = message.metadata); - message.addedAt !== undefined && (obj.addedAt = message.addedAt.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): Member { - const message = createBaseMember(); - message.address = object.address ?? ""; - message.weight = object.weight ?? ""; - message.metadata = object.metadata ?? ""; - message.addedAt = object.addedAt ?? undefined; - return message; - }, - fromSDK(object: MemberSDKType): Member { - return { - address: object?.address, - weight: object?.weight, - metadata: object?.metadata, - addedAt: object.added_at ?? undefined - }; - }, - toSDK(message: Member): MemberSDKType { - const obj: any = {}; - obj.address = message.address; - obj.weight = message.weight; - obj.metadata = message.metadata; - message.addedAt !== undefined && (obj.added_at = message.addedAt ?? undefined); - return obj; - }, - fromAmino(object: MemberAmino): Member { - return { - address: object.address, - weight: object.weight, - metadata: object.metadata, - addedAt: object.added_at - }; - }, - toAmino(message: Member): MemberAmino { - const obj: any = {}; - obj.address = message.address; - obj.weight = message.weight; - obj.metadata = message.metadata; - obj.added_at = message.addedAt; - return obj; - }, - fromAminoMsg(object: MemberAminoMsg): Member { - return Member.fromAmino(object.value); - }, - toAminoMsg(message: Member): MemberAminoMsg { - return { - type: "cosmos-sdk/Member", - value: Member.toAmino(message) - }; - }, - fromProtoMsg(message: MemberProtoMsg): Member { - return Member.decode(message.value); - }, - toProto(message: Member): Uint8Array { - return Member.encode(message).finish(); - }, - toProtoMsg(message: Member): MemberProtoMsg { - return { - typeUrl: "/cosmos.group.v1.Member", - value: Member.encode(message).finish() - }; - } -}; -function createBaseMembers(): Members { - return { - members: [] - }; -} -export const Members = { - typeUrl: "/cosmos.group.v1.Members", - aminoType: "cosmos-sdk/Members", - encode(message: Members, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.members) { - Member.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Members { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMembers(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.members.push(Member.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Members { - return { - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromJSON(e)) : [] - }; - }, - toJSON(message: Members): unknown { - const obj: any = {}; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toJSON(e) : undefined); - } else { - obj.members = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Members { - const message = createBaseMembers(); - message.members = object.members?.map(e => Member.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MembersSDKType): Members { - return { - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromSDK(e)) : [] - }; - }, - toSDK(message: Members): MembersSDKType { - const obj: any = {}; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toSDK(e) : undefined); - } else { - obj.members = []; - } - return obj; - }, - fromAmino(object: MembersAmino): Members { - return { - members: Array.isArray(object?.members) ? object.members.map((e: any) => Member.fromAmino(e)) : [] - }; - }, - toAmino(message: Members): MembersAmino { - const obj: any = {}; - if (message.members) { - obj.members = message.members.map(e => e ? Member.toAmino(e) : undefined); - } else { - obj.members = []; - } - return obj; - }, - fromAminoMsg(object: MembersAminoMsg): Members { - return Members.fromAmino(object.value); - }, - toAminoMsg(message: Members): MembersAminoMsg { - return { - type: "cosmos-sdk/Members", - value: Members.toAmino(message) - }; - }, - fromProtoMsg(message: MembersProtoMsg): Members { - return Members.decode(message.value); - }, - toProto(message: Members): Uint8Array { - return Members.encode(message).finish(); - }, - toProtoMsg(message: Members): MembersProtoMsg { - return { - typeUrl: "/cosmos.group.v1.Members", - value: Members.encode(message).finish() - }; - } -}; -function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { - return { - threshold: "", - windows: DecisionPolicyWindows.fromPartial({}) - }; -} -export const ThresholdDecisionPolicy = { - typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", - aminoType: "cosmos-sdk/ThresholdDecisionPolicy", - encode(message: ThresholdDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.threshold !== "") { - writer.uint32(10).string(message.threshold); - } - if (message.windows !== undefined) { - DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ThresholdDecisionPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseThresholdDecisionPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threshold = reader.string(); - break; - case 2: - message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ThresholdDecisionPolicy { - return { - threshold: isSet(object.threshold) ? String(object.threshold) : "", - windows: isSet(object.windows) ? DecisionPolicyWindows.fromJSON(object.windows) : undefined - }; - }, - toJSON(message: ThresholdDecisionPolicy): unknown { - const obj: any = {}; - message.threshold !== undefined && (obj.threshold = message.threshold); - message.windows !== undefined && (obj.windows = message.windows ? DecisionPolicyWindows.toJSON(message.windows) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ThresholdDecisionPolicy { - const message = createBaseThresholdDecisionPolicy(); - message.threshold = object.threshold ?? ""; - message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined; - return message; - }, - fromSDK(object: ThresholdDecisionPolicySDKType): ThresholdDecisionPolicy { - return { - threshold: object?.threshold, - windows: object.windows ? DecisionPolicyWindows.fromSDK(object.windows) : undefined - }; - }, - toSDK(message: ThresholdDecisionPolicy): ThresholdDecisionPolicySDKType { - const obj: any = {}; - obj.threshold = message.threshold; - message.windows !== undefined && (obj.windows = message.windows ? DecisionPolicyWindows.toSDK(message.windows) : undefined); - return obj; - }, - fromAmino(object: ThresholdDecisionPolicyAmino): ThresholdDecisionPolicy { - return { - threshold: object.threshold, - windows: object?.windows ? DecisionPolicyWindows.fromAmino(object.windows) : undefined - }; - }, - toAmino(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAmino { - const obj: any = {}; - obj.threshold = message.threshold; - obj.windows = message.windows ? DecisionPolicyWindows.toAmino(message.windows) : undefined; - return obj; - }, - fromAminoMsg(object: ThresholdDecisionPolicyAminoMsg): ThresholdDecisionPolicy { - return ThresholdDecisionPolicy.fromAmino(object.value); - }, - toAminoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAminoMsg { - return { - type: "cosmos-sdk/ThresholdDecisionPolicy", - value: ThresholdDecisionPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: ThresholdDecisionPolicyProtoMsg): ThresholdDecisionPolicy { - return ThresholdDecisionPolicy.decode(message.value); - }, - toProto(message: ThresholdDecisionPolicy): Uint8Array { - return ThresholdDecisionPolicy.encode(message).finish(); - }, - toProtoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy", - value: ThresholdDecisionPolicy.encode(message).finish() - }; - } -}; -function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { - return { - percentage: "", - windows: DecisionPolicyWindows.fromPartial({}) - }; -} -export const PercentageDecisionPolicy = { - typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", - aminoType: "cosmos-sdk/PercentageDecisionPolicy", - encode(message: PercentageDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.percentage !== "") { - writer.uint32(10).string(message.percentage); - } - if (message.windows !== undefined) { - DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PercentageDecisionPolicy { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePercentageDecisionPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.percentage = reader.string(); - break; - case 2: - message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PercentageDecisionPolicy { - return { - percentage: isSet(object.percentage) ? String(object.percentage) : "", - windows: isSet(object.windows) ? DecisionPolicyWindows.fromJSON(object.windows) : undefined - }; - }, - toJSON(message: PercentageDecisionPolicy): unknown { - const obj: any = {}; - message.percentage !== undefined && (obj.percentage = message.percentage); - message.windows !== undefined && (obj.windows = message.windows ? DecisionPolicyWindows.toJSON(message.windows) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): PercentageDecisionPolicy { - const message = createBasePercentageDecisionPolicy(); - message.percentage = object.percentage ?? ""; - message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined; - return message; - }, - fromSDK(object: PercentageDecisionPolicySDKType): PercentageDecisionPolicy { - return { - percentage: object?.percentage, - windows: object.windows ? DecisionPolicyWindows.fromSDK(object.windows) : undefined - }; - }, - toSDK(message: PercentageDecisionPolicy): PercentageDecisionPolicySDKType { - const obj: any = {}; - obj.percentage = message.percentage; - message.windows !== undefined && (obj.windows = message.windows ? DecisionPolicyWindows.toSDK(message.windows) : undefined); - return obj; - }, - fromAmino(object: PercentageDecisionPolicyAmino): PercentageDecisionPolicy { - return { - percentage: object.percentage, - windows: object?.windows ? DecisionPolicyWindows.fromAmino(object.windows) : undefined - }; - }, - toAmino(message: PercentageDecisionPolicy): PercentageDecisionPolicyAmino { - const obj: any = {}; - obj.percentage = message.percentage; - obj.windows = message.windows ? DecisionPolicyWindows.toAmino(message.windows) : undefined; - return obj; - }, - fromAminoMsg(object: PercentageDecisionPolicyAminoMsg): PercentageDecisionPolicy { - return PercentageDecisionPolicy.fromAmino(object.value); - }, - toAminoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyAminoMsg { - return { - type: "cosmos-sdk/PercentageDecisionPolicy", - value: PercentageDecisionPolicy.toAmino(message) - }; - }, - fromProtoMsg(message: PercentageDecisionPolicyProtoMsg): PercentageDecisionPolicy { - return PercentageDecisionPolicy.decode(message.value); - }, - toProto(message: PercentageDecisionPolicy): Uint8Array { - return PercentageDecisionPolicy.encode(message).finish(); - }, - toProtoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyProtoMsg { - return { - typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy", - value: PercentageDecisionPolicy.encode(message).finish() - }; - } -}; -function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { - return { - votingPeriod: Duration.fromPartial({}), - minExecutionPeriod: Duration.fromPartial({}) - }; -} -export const DecisionPolicyWindows = { - typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", - aminoType: "cosmos-sdk/DecisionPolicyWindows", - encode(message: DecisionPolicyWindows, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.votingPeriod !== undefined) { - Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); - } - if (message.minExecutionPeriod !== undefined) { - Duration.encode(message.minExecutionPeriod, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DecisionPolicyWindows { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecisionPolicyWindows(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.votingPeriod = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.minExecutionPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DecisionPolicyWindows { - return { - votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined, - minExecutionPeriod: isSet(object.minExecutionPeriod) ? Duration.fromJSON(object.minExecutionPeriod) : undefined - }; - }, - toJSON(message: DecisionPolicyWindows): unknown { - const obj: any = {}; - message.votingPeriod !== undefined && (obj.votingPeriod = message.votingPeriod ? Duration.toJSON(message.votingPeriod) : undefined); - message.minExecutionPeriod !== undefined && (obj.minExecutionPeriod = message.minExecutionPeriod ? Duration.toJSON(message.minExecutionPeriod) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DecisionPolicyWindows { - const message = createBaseDecisionPolicyWindows(); - message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined; - message.minExecutionPeriod = object.minExecutionPeriod !== undefined && object.minExecutionPeriod !== null ? Duration.fromPartial(object.minExecutionPeriod) : undefined; - return message; - }, - fromSDK(object: DecisionPolicyWindowsSDKType): DecisionPolicyWindows { - return { - votingPeriod: object.voting_period ? Duration.fromSDK(object.voting_period) : undefined, - minExecutionPeriod: object.min_execution_period ? Duration.fromSDK(object.min_execution_period) : undefined - }; - }, - toSDK(message: DecisionPolicyWindows): DecisionPolicyWindowsSDKType { - const obj: any = {}; - message.votingPeriod !== undefined && (obj.voting_period = message.votingPeriod ? Duration.toSDK(message.votingPeriod) : undefined); - message.minExecutionPeriod !== undefined && (obj.min_execution_period = message.minExecutionPeriod ? Duration.toSDK(message.minExecutionPeriod) : undefined); - return obj; - }, - fromAmino(object: DecisionPolicyWindowsAmino): DecisionPolicyWindows { - return { - votingPeriod: object?.voting_period ? Duration.fromAmino(object.voting_period) : undefined, - minExecutionPeriod: object?.min_execution_period ? Duration.fromAmino(object.min_execution_period) : undefined - }; - }, - toAmino(message: DecisionPolicyWindows): DecisionPolicyWindowsAmino { - const obj: any = {}; - obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined; - obj.min_execution_period = message.minExecutionPeriod ? Duration.toAmino(message.minExecutionPeriod) : undefined; - return obj; - }, - fromAminoMsg(object: DecisionPolicyWindowsAminoMsg): DecisionPolicyWindows { - return DecisionPolicyWindows.fromAmino(object.value); - }, - toAminoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsAminoMsg { - return { - type: "cosmos-sdk/DecisionPolicyWindows", - value: DecisionPolicyWindows.toAmino(message) - }; - }, - fromProtoMsg(message: DecisionPolicyWindowsProtoMsg): DecisionPolicyWindows { - return DecisionPolicyWindows.decode(message.value); - }, - toProto(message: DecisionPolicyWindows): Uint8Array { - return DecisionPolicyWindows.encode(message).finish(); - }, - toProtoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsProtoMsg { - return { - typeUrl: "/cosmos.group.v1.DecisionPolicyWindows", - value: DecisionPolicyWindows.encode(message).finish() - }; - } -}; -function createBaseGroupInfo(): GroupInfo { - return { - id: BigInt(0), - admin: "", - metadata: "", - version: BigInt(0), - totalWeight: "", - createdAt: new Date() - }; -} -export const GroupInfo = { - typeUrl: "/cosmos.group.v1.GroupInfo", - aminoType: "cosmos-sdk/GroupInfo", - encode(message: GroupInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== BigInt(0)) { - writer.uint32(8).uint64(message.id); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - if (message.version !== BigInt(0)) { - writer.uint32(32).uint64(message.version); - } - if (message.totalWeight !== "") { - writer.uint32(42).string(message.totalWeight); - } - if (message.createdAt !== undefined) { - Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GroupInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGroupInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.version = reader.uint64(); - break; - case 5: - message.totalWeight = reader.string(); - break; - case 6: - message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GroupInfo { - return { - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0), - admin: isSet(object.admin) ? String(object.admin) : "", - metadata: isSet(object.metadata) ? String(object.metadata) : "", - version: isSet(object.version) ? BigInt(object.version.toString()) : BigInt(0), - totalWeight: isSet(object.totalWeight) ? String(object.totalWeight) : "", - createdAt: isSet(object.createdAt) ? new Date(object.createdAt) : undefined - }; - }, - toJSON(message: GroupInfo): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - message.admin !== undefined && (obj.admin = message.admin); - message.metadata !== undefined && (obj.metadata = message.metadata); - message.version !== undefined && (obj.version = (message.version || BigInt(0)).toString()); - message.totalWeight !== undefined && (obj.totalWeight = message.totalWeight); - message.createdAt !== undefined && (obj.createdAt = message.createdAt.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): GroupInfo { - const message = createBaseGroupInfo(); - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.admin = object.admin ?? ""; - message.metadata = object.metadata ?? ""; - message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - message.totalWeight = object.totalWeight ?? ""; - message.createdAt = object.createdAt ?? undefined; - return message; - }, - fromSDK(object: GroupInfoSDKType): GroupInfo { - return { - id: object?.id, - admin: object?.admin, - metadata: object?.metadata, - version: object?.version, - totalWeight: object?.total_weight, - createdAt: object.created_at ?? undefined - }; - }, - toSDK(message: GroupInfo): GroupInfoSDKType { - const obj: any = {}; - obj.id = message.id; - obj.admin = message.admin; - obj.metadata = message.metadata; - obj.version = message.version; - obj.total_weight = message.totalWeight; - message.createdAt !== undefined && (obj.created_at = message.createdAt ?? undefined); - return obj; - }, - fromAmino(object: GroupInfoAmino): GroupInfo { - return { - id: BigInt(object.id), - admin: object.admin, - metadata: object.metadata, - version: BigInt(object.version), - totalWeight: object.total_weight, - createdAt: object.created_at - }; - }, - toAmino(message: GroupInfo): GroupInfoAmino { - const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.admin = message.admin; - obj.metadata = message.metadata; - obj.version = message.version ? message.version.toString() : undefined; - obj.total_weight = message.totalWeight; - obj.created_at = message.createdAt; - return obj; - }, - fromAminoMsg(object: GroupInfoAminoMsg): GroupInfo { - return GroupInfo.fromAmino(object.value); - }, - toAminoMsg(message: GroupInfo): GroupInfoAminoMsg { - return { - type: "cosmos-sdk/GroupInfo", - value: GroupInfo.toAmino(message) - }; - }, - fromProtoMsg(message: GroupInfoProtoMsg): GroupInfo { - return GroupInfo.decode(message.value); - }, - toProto(message: GroupInfo): Uint8Array { - return GroupInfo.encode(message).finish(); - }, - toProtoMsg(message: GroupInfo): GroupInfoProtoMsg { - return { - typeUrl: "/cosmos.group.v1.GroupInfo", - value: GroupInfo.encode(message).finish() - }; - } -}; -function createBaseGroupMember(): GroupMember { - return { - groupId: BigInt(0), - member: Member.fromPartial({}) - }; -} -export const GroupMember = { - typeUrl: "/cosmos.group.v1.GroupMember", - aminoType: "cosmos-sdk/GroupMember", - encode(message: GroupMember, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.groupId !== BigInt(0)) { - writer.uint32(8).uint64(message.groupId); - } - if (message.member !== undefined) { - Member.encode(message.member, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GroupMember { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGroupMember(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupId = reader.uint64(); - break; - case 2: - message.member = Member.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GroupMember { - return { - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - member: isSet(object.member) ? Member.fromJSON(object.member) : undefined - }; - }, - toJSON(message: GroupMember): unknown { - const obj: any = {}; - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.member !== undefined && (obj.member = message.member ? Member.toJSON(message.member) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GroupMember { - const message = createBaseGroupMember(); - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.member = object.member !== undefined && object.member !== null ? Member.fromPartial(object.member) : undefined; - return message; - }, - fromSDK(object: GroupMemberSDKType): GroupMember { - return { - groupId: object?.group_id, - member: object.member ? Member.fromSDK(object.member) : undefined - }; - }, - toSDK(message: GroupMember): GroupMemberSDKType { - const obj: any = {}; - obj.group_id = message.groupId; - message.member !== undefined && (obj.member = message.member ? Member.toSDK(message.member) : undefined); - return obj; - }, - fromAmino(object: GroupMemberAmino): GroupMember { - return { - groupId: BigInt(object.group_id), - member: object?.member ? Member.fromAmino(object.member) : undefined - }; - }, - toAmino(message: GroupMember): GroupMemberAmino { - const obj: any = {}; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.member = message.member ? Member.toAmino(message.member) : undefined; - return obj; - }, - fromAminoMsg(object: GroupMemberAminoMsg): GroupMember { - return GroupMember.fromAmino(object.value); - }, - toAminoMsg(message: GroupMember): GroupMemberAminoMsg { - return { - type: "cosmos-sdk/GroupMember", - value: GroupMember.toAmino(message) - }; - }, - fromProtoMsg(message: GroupMemberProtoMsg): GroupMember { - return GroupMember.decode(message.value); - }, - toProto(message: GroupMember): Uint8Array { - return GroupMember.encode(message).finish(); - }, - toProtoMsg(message: GroupMember): GroupMemberProtoMsg { - return { - typeUrl: "/cosmos.group.v1.GroupMember", - value: GroupMember.encode(message).finish() - }; - } -}; -function createBaseGroupPolicyInfo(): GroupPolicyInfo { - return { - address: "", - groupId: BigInt(0), - admin: "", - metadata: "", - version: BigInt(0), - decisionPolicy: Any.fromPartial({}), - createdAt: new Date() - }; -} -export const GroupPolicyInfo = { - typeUrl: "/cosmos.group.v1.GroupPolicyInfo", - aminoType: "cosmos-sdk/GroupPolicyInfo", - encode(message: GroupPolicyInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.groupId !== BigInt(0)) { - writer.uint32(16).uint64(message.groupId); - } - if (message.admin !== "") { - writer.uint32(26).string(message.admin); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - if (message.version !== BigInt(0)) { - writer.uint32(40).uint64(message.version); - } - if (message.decisionPolicy !== undefined) { - Any.encode(message.decisionPolicy, writer.uint32(50).fork()).ldelim(); - } - if (message.createdAt !== undefined) { - Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GroupPolicyInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGroupPolicyInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.groupId = reader.uint64(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.version = reader.uint64(); - break; - case 6: - message.decisionPolicy = Any.decode(reader, reader.uint32()); - break; - case 7: - message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GroupPolicyInfo { - return { - address: isSet(object.address) ? String(object.address) : "", - groupId: isSet(object.groupId) ? BigInt(object.groupId.toString()) : BigInt(0), - admin: isSet(object.admin) ? String(object.admin) : "", - metadata: isSet(object.metadata) ? String(object.metadata) : "", - version: isSet(object.version) ? BigInt(object.version.toString()) : BigInt(0), - decisionPolicy: isSet(object.decisionPolicy) ? Any.fromJSON(object.decisionPolicy) : undefined, - createdAt: isSet(object.createdAt) ? new Date(object.createdAt) : undefined - }; - }, - toJSON(message: GroupPolicyInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.groupId !== undefined && (obj.groupId = (message.groupId || BigInt(0)).toString()); - message.admin !== undefined && (obj.admin = message.admin); - message.metadata !== undefined && (obj.metadata = message.metadata); - message.version !== undefined && (obj.version = (message.version || BigInt(0)).toString()); - message.decisionPolicy !== undefined && (obj.decisionPolicy = message.decisionPolicy ? Any.toJSON(message.decisionPolicy) : undefined); - message.createdAt !== undefined && (obj.createdAt = message.createdAt.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): GroupPolicyInfo { - const message = createBaseGroupPolicyInfo(); - message.address = object.address ?? ""; - message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0); - message.admin = object.admin ?? ""; - message.metadata = object.metadata ?? ""; - message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? Any.fromPartial(object.decisionPolicy) : undefined; - message.createdAt = object.createdAt ?? undefined; - return message; - }, - fromSDK(object: GroupPolicyInfoSDKType): GroupPolicyInfo { - return { - address: object?.address, - groupId: object?.group_id, - admin: object?.admin, - metadata: object?.metadata, - version: object?.version, - decisionPolicy: object.decision_policy ? Any.fromSDK(object.decision_policy) : undefined, - createdAt: object.created_at ?? undefined - }; - }, - toSDK(message: GroupPolicyInfo): GroupPolicyInfoSDKType { - const obj: any = {}; - obj.address = message.address; - obj.group_id = message.groupId; - obj.admin = message.admin; - obj.metadata = message.metadata; - obj.version = message.version; - message.decisionPolicy !== undefined && (obj.decision_policy = message.decisionPolicy ? Any.toSDK(message.decisionPolicy) : undefined); - message.createdAt !== undefined && (obj.created_at = message.createdAt ?? undefined); - return obj; - }, - fromAmino(object: GroupPolicyInfoAmino): GroupPolicyInfo { - return { - address: object.address, - groupId: BigInt(object.group_id), - admin: object.admin, - metadata: object.metadata, - version: BigInt(object.version), - decisionPolicy: object?.decision_policy ? Any.fromAmino(object.decision_policy) : undefined, - createdAt: object.created_at - }; - }, - toAmino(message: GroupPolicyInfo): GroupPolicyInfoAmino { - const obj: any = {}; - obj.address = message.address; - obj.group_id = message.groupId ? message.groupId.toString() : undefined; - obj.admin = message.admin; - obj.metadata = message.metadata; - obj.version = message.version ? message.version.toString() : undefined; - obj.decision_policy = message.decisionPolicy ? Any.toAmino(message.decisionPolicy) : undefined; - obj.created_at = message.createdAt; - return obj; - }, - fromAminoMsg(object: GroupPolicyInfoAminoMsg): GroupPolicyInfo { - return GroupPolicyInfo.fromAmino(object.value); - }, - toAminoMsg(message: GroupPolicyInfo): GroupPolicyInfoAminoMsg { - return { - type: "cosmos-sdk/GroupPolicyInfo", - value: GroupPolicyInfo.toAmino(message) - }; - }, - fromProtoMsg(message: GroupPolicyInfoProtoMsg): GroupPolicyInfo { - return GroupPolicyInfo.decode(message.value); - }, - toProto(message: GroupPolicyInfo): Uint8Array { - return GroupPolicyInfo.encode(message).finish(); - }, - toProtoMsg(message: GroupPolicyInfo): GroupPolicyInfoProtoMsg { - return { - typeUrl: "/cosmos.group.v1.GroupPolicyInfo", - value: GroupPolicyInfo.encode(message).finish() - }; - } -}; -function createBaseProposal(): Proposal { - return { - id: BigInt(0), - address: "", - metadata: "", - proposers: [], - submitTime: new Date(), - groupVersion: BigInt(0), - groupPolicyVersion: BigInt(0), - status: 0, - result: 0, - finalTallyResult: TallyResult.fromPartial({}), - votingPeriodEnd: new Date(), - executorResult: 0, - messages: [] - }; -} -export const Proposal = { - typeUrl: "/cosmos.group.v1.Proposal", - aminoType: "cosmos-sdk/Proposal", - encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== BigInt(0)) { - writer.uint32(8).uint64(message.id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - for (const v of message.proposers) { - writer.uint32(34).string(v!); - } - if (message.submitTime !== undefined) { - Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim(); - } - if (message.groupVersion !== BigInt(0)) { - writer.uint32(48).uint64(message.groupVersion); - } - if (message.groupPolicyVersion !== BigInt(0)) { - writer.uint32(56).uint64(message.groupPolicyVersion); - } - if (message.status !== 0) { - writer.uint32(64).int32(message.status); - } - if (message.result !== 0) { - writer.uint32(72).int32(message.result); - } - if (message.finalTallyResult !== undefined) { - TallyResult.encode(message.finalTallyResult, writer.uint32(82).fork()).ldelim(); - } - if (message.votingPeriodEnd !== undefined) { - Timestamp.encode(toTimestamp(message.votingPeriodEnd), writer.uint32(90).fork()).ldelim(); - } - if (message.executorResult !== 0) { - writer.uint32(96).int32(message.executorResult); - } - for (const v of message.messages) { - Any.encode(v!, writer.uint32(106).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.metadata = reader.string(); - break; - case 4: - message.proposers.push(reader.string()); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.groupVersion = reader.uint64(); - break; - case 7: - message.groupPolicyVersion = reader.uint64(); - break; - case 8: - message.status = (reader.int32() as any); - break; - case 9: - message.result = (reader.int32() as any); - break; - case 10: - message.finalTallyResult = TallyResult.decode(reader, reader.uint32()); - break; - case 11: - message.votingPeriodEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 12: - message.executorResult = (reader.int32() as any); - break; - case 13: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Proposal { - return { - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0), - address: isSet(object.address) ? String(object.address) : "", - metadata: isSet(object.metadata) ? String(object.metadata) : "", - proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => String(e)) : [], - submitTime: isSet(object.submitTime) ? new Date(object.submitTime) : undefined, - groupVersion: isSet(object.groupVersion) ? BigInt(object.groupVersion.toString()) : BigInt(0), - groupPolicyVersion: isSet(object.groupPolicyVersion) ? BigInt(object.groupPolicyVersion.toString()) : BigInt(0), - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - result: isSet(object.result) ? proposalResultFromJSON(object.result) : -1, - finalTallyResult: isSet(object.finalTallyResult) ? TallyResult.fromJSON(object.finalTallyResult) : undefined, - votingPeriodEnd: isSet(object.votingPeriodEnd) ? new Date(object.votingPeriodEnd) : undefined, - executorResult: isSet(object.executorResult) ? proposalExecutorResultFromJSON(object.executorResult) : -1, - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - message.address !== undefined && (obj.address = message.address); - message.metadata !== undefined && (obj.metadata = message.metadata); - if (message.proposers) { - obj.proposers = message.proposers.map(e => e); - } else { - obj.proposers = []; - } - message.submitTime !== undefined && (obj.submitTime = message.submitTime.toISOString()); - message.groupVersion !== undefined && (obj.groupVersion = (message.groupVersion || BigInt(0)).toString()); - message.groupPolicyVersion !== undefined && (obj.groupPolicyVersion = (message.groupPolicyVersion || BigInt(0)).toString()); - message.status !== undefined && (obj.status = proposalStatusToJSON(message.status)); - message.result !== undefined && (obj.result = proposalResultToJSON(message.result)); - message.finalTallyResult !== undefined && (obj.finalTallyResult = message.finalTallyResult ? TallyResult.toJSON(message.finalTallyResult) : undefined); - message.votingPeriodEnd !== undefined && (obj.votingPeriodEnd = message.votingPeriodEnd.toISOString()); - message.executorResult !== undefined && (obj.executorResult = proposalExecutorResultToJSON(message.executorResult)); - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.messages = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Proposal { - const message = createBaseProposal(); - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.address = object.address ?? ""; - message.metadata = object.metadata ?? ""; - message.proposers = object.proposers?.map(e => e) || []; - message.submitTime = object.submitTime ?? undefined; - message.groupVersion = object.groupVersion !== undefined && object.groupVersion !== null ? BigInt(object.groupVersion.toString()) : BigInt(0); - message.groupPolicyVersion = object.groupPolicyVersion !== undefined && object.groupPolicyVersion !== null ? BigInt(object.groupPolicyVersion.toString()) : BigInt(0); - message.status = object.status ?? 0; - message.result = object.result ?? 0; - message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined; - message.votingPeriodEnd = object.votingPeriodEnd ?? undefined; - message.executorResult = object.executorResult ?? 0; - message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ProposalSDKType): Proposal { - return { - id: object?.id, - address: object?.address, - metadata: object?.metadata, - proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => e) : [], - submitTime: object.submit_time ?? undefined, - groupVersion: object?.group_version, - groupPolicyVersion: object?.group_policy_version, - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - result: isSet(object.result) ? proposalResultFromJSON(object.result) : -1, - finalTallyResult: object.final_tally_result ? TallyResult.fromSDK(object.final_tally_result) : undefined, - votingPeriodEnd: object.voting_period_end ?? undefined, - executorResult: isSet(object.executor_result) ? proposalExecutorResultFromJSON(object.executor_result) : -1, - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: Proposal): ProposalSDKType { - const obj: any = {}; - obj.id = message.id; - obj.address = message.address; - obj.metadata = message.metadata; - if (message.proposers) { - obj.proposers = message.proposers.map(e => e); - } else { - obj.proposers = []; - } - message.submitTime !== undefined && (obj.submit_time = message.submitTime ?? undefined); - obj.group_version = message.groupVersion; - obj.group_policy_version = message.groupPolicyVersion; - message.status !== undefined && (obj.status = proposalStatusToJSON(message.status)); - message.result !== undefined && (obj.result = proposalResultToJSON(message.result)); - message.finalTallyResult !== undefined && (obj.final_tally_result = message.finalTallyResult ? TallyResult.toSDK(message.finalTallyResult) : undefined); - message.votingPeriodEnd !== undefined && (obj.voting_period_end = message.votingPeriodEnd ?? undefined); - message.executorResult !== undefined && (obj.executor_result = proposalExecutorResultToJSON(message.executorResult)); - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.messages = []; - } - return obj; - }, - fromAmino(object: ProposalAmino): Proposal { - return { - id: BigInt(object.id), - address: object.address, - metadata: object.metadata, - proposers: Array.isArray(object?.proposers) ? object.proposers.map((e: any) => e) : [], - submitTime: object.submit_time, - groupVersion: BigInt(object.group_version), - groupPolicyVersion: BigInt(object.group_policy_version), - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : -1, - result: isSet(object.result) ? proposalResultFromJSON(object.result) : -1, - finalTallyResult: object?.final_tally_result ? TallyResult.fromAmino(object.final_tally_result) : undefined, - votingPeriodEnd: object.voting_period_end, - executorResult: isSet(object.executor_result) ? proposalExecutorResultFromJSON(object.executor_result) : -1, - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: Proposal): ProposalAmino { - const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.address = message.address; - obj.metadata = message.metadata; - if (message.proposers) { - obj.proposers = message.proposers.map(e => e); - } else { - obj.proposers = []; - } - obj.submit_time = message.submitTime; - obj.group_version = message.groupVersion ? message.groupVersion.toString() : undefined; - obj.group_policy_version = message.groupPolicyVersion ? message.groupPolicyVersion.toString() : undefined; - obj.status = message.status; - obj.result = message.result; - obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : undefined; - obj.voting_period_end = message.votingPeriodEnd; - obj.executor_result = message.executorResult; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.messages = []; - } - return obj; - }, - fromAminoMsg(object: ProposalAminoMsg): Proposal { - return Proposal.fromAmino(object.value); - }, - toAminoMsg(message: Proposal): ProposalAminoMsg { - return { - type: "cosmos-sdk/Proposal", - value: Proposal.toAmino(message) - }; - }, - fromProtoMsg(message: ProposalProtoMsg): Proposal { - return Proposal.decode(message.value); - }, - toProto(message: Proposal): Uint8Array { - return Proposal.encode(message).finish(); - }, - toProtoMsg(message: Proposal): ProposalProtoMsg { - return { - typeUrl: "/cosmos.group.v1.Proposal", - value: Proposal.encode(message).finish() - }; - } -}; -function createBaseTallyResult(): TallyResult { - return { - yesCount: "", - abstainCount: "", - noCount: "", - noWithVetoCount: "" - }; -} -export const TallyResult = { - typeUrl: "/cosmos.group.v1.TallyResult", - aminoType: "cosmos-sdk/TallyResult", - encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.yesCount !== "") { - writer.uint32(10).string(message.yesCount); - } - if (message.abstainCount !== "") { - writer.uint32(18).string(message.abstainCount); - } - if (message.noCount !== "") { - writer.uint32(26).string(message.noCount); - } - if (message.noWithVetoCount !== "") { - writer.uint32(34).string(message.noWithVetoCount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TallyResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTallyResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yesCount = reader.string(); - break; - case 2: - message.abstainCount = reader.string(); - break; - case 3: - message.noCount = reader.string(); - break; - case 4: - message.noWithVetoCount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TallyResult { - return { - yesCount: isSet(object.yesCount) ? String(object.yesCount) : "", - abstainCount: isSet(object.abstainCount) ? String(object.abstainCount) : "", - noCount: isSet(object.noCount) ? String(object.noCount) : "", - noWithVetoCount: isSet(object.noWithVetoCount) ? String(object.noWithVetoCount) : "" - }; - }, - toJSON(message: TallyResult): unknown { - const obj: any = {}; - message.yesCount !== undefined && (obj.yesCount = message.yesCount); - message.abstainCount !== undefined && (obj.abstainCount = message.abstainCount); - message.noCount !== undefined && (obj.noCount = message.noCount); - message.noWithVetoCount !== undefined && (obj.noWithVetoCount = message.noWithVetoCount); - return obj; - }, - fromPartial(object: DeepPartial): TallyResult { - const message = createBaseTallyResult(); - message.yesCount = object.yesCount ?? ""; - message.abstainCount = object.abstainCount ?? ""; - message.noCount = object.noCount ?? ""; - message.noWithVetoCount = object.noWithVetoCount ?? ""; - return message; - }, - fromSDK(object: TallyResultSDKType): TallyResult { - return { - yesCount: object?.yes_count, - abstainCount: object?.abstain_count, - noCount: object?.no_count, - noWithVetoCount: object?.no_with_veto_count - }; - }, - toSDK(message: TallyResult): TallyResultSDKType { - const obj: any = {}; - obj.yes_count = message.yesCount; - obj.abstain_count = message.abstainCount; - obj.no_count = message.noCount; - obj.no_with_veto_count = message.noWithVetoCount; - return obj; - }, - fromAmino(object: TallyResultAmino): TallyResult { - return { - yesCount: object.yes_count, - abstainCount: object.abstain_count, - noCount: object.no_count, - noWithVetoCount: object.no_with_veto_count - }; - }, - toAmino(message: TallyResult): TallyResultAmino { - const obj: any = {}; - obj.yes_count = message.yesCount; - obj.abstain_count = message.abstainCount; - obj.no_count = message.noCount; - obj.no_with_veto_count = message.noWithVetoCount; - return obj; - }, - fromAminoMsg(object: TallyResultAminoMsg): TallyResult { - return TallyResult.fromAmino(object.value); - }, - toAminoMsg(message: TallyResult): TallyResultAminoMsg { - return { - type: "cosmos-sdk/TallyResult", - value: TallyResult.toAmino(message) - }; - }, - fromProtoMsg(message: TallyResultProtoMsg): TallyResult { - return TallyResult.decode(message.value); - }, - toProto(message: TallyResult): Uint8Array { - return TallyResult.encode(message).finish(); - }, - toProtoMsg(message: TallyResult): TallyResultProtoMsg { - return { - typeUrl: "/cosmos.group.v1.TallyResult", - value: TallyResult.encode(message).finish() - }; - } -}; -function createBaseVote(): Vote { - return { - proposalId: BigInt(0), - voter: "", - option: 0, - metadata: "", - submitTime: new Date() - }; -} -export const Vote = { - typeUrl: "/cosmos.group.v1.Vote", - aminoType: "cosmos-sdk/Vote", - encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.proposalId !== BigInt(0)) { - writer.uint32(8).uint64(message.proposalId); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - if (message.submitTime !== undefined) { - Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Vote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposalId = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = (reader.int32() as any); - break; - case 4: - message.metadata = reader.string(); - break; - case 5: - message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Vote { - return { - proposalId: isSet(object.proposalId) ? BigInt(object.proposalId.toString()) : BigInt(0), - voter: isSet(object.voter) ? String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: isSet(object.metadata) ? String(object.metadata) : "", - submitTime: isSet(object.submitTime) ? new Date(object.submitTime) : undefined - }; - }, - toJSON(message: Vote): unknown { - const obj: any = {}; - message.proposalId !== undefined && (obj.proposalId = (message.proposalId || BigInt(0)).toString()); - message.voter !== undefined && (obj.voter = message.voter); - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - message.metadata !== undefined && (obj.metadata = message.metadata); - message.submitTime !== undefined && (obj.submitTime = message.submitTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): Vote { - const message = createBaseVote(); - message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0); - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; - message.submitTime = object.submitTime ?? undefined; - return message; - }, - fromSDK(object: VoteSDKType): Vote { - return { - proposalId: object?.proposal_id, - voter: object?.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: object?.metadata, - submitTime: object.submit_time ?? undefined - }; - }, - toSDK(message: Vote): VoteSDKType { - const obj: any = {}; - obj.proposal_id = message.proposalId; - obj.voter = message.voter; - message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); - obj.metadata = message.metadata; - message.submitTime !== undefined && (obj.submit_time = message.submitTime ?? undefined); - return obj; - }, - fromAmino(object: VoteAmino): Vote { - return { - proposalId: BigInt(object.proposal_id), - voter: object.voter, - option: isSet(object.option) ? voteOptionFromJSON(object.option) : -1, - metadata: object.metadata, - submitTime: object.submit_time - }; - }, - toAmino(message: Vote): VoteAmino { - const obj: any = {}; - obj.proposal_id = message.proposalId ? message.proposalId.toString() : undefined; - obj.voter = message.voter; - obj.option = message.option; - obj.metadata = message.metadata; - obj.submit_time = message.submitTime; - return obj; - }, - fromAminoMsg(object: VoteAminoMsg): Vote { - return Vote.fromAmino(object.value); - }, - toAminoMsg(message: Vote): VoteAminoMsg { - return { - type: "cosmos-sdk/Vote", - value: Vote.toAmino(message) - }; - }, - fromProtoMsg(message: VoteProtoMsg): Vote { - return Vote.decode(message.value); - }, - toProto(message: Vote): Uint8Array { - return Vote.encode(message).finish(); - }, - toProtoMsg(message: Vote): VoteProtoMsg { - return { - typeUrl: "/cosmos.group.v1.Vote", - value: Vote.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/genesis.ts deleted file mode 100644 index cccdbbab..00000000 --- a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/genesis.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Minter, MinterAmino, MinterSDKType, Params, ParamsAmino, ParamsSDKType } from "./mint"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisState { - /** minter is a space for holding current inflation information. */ - minter: Minter | undefined; - /** params defines all the paramaters of the module. */ - params: Params | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisStateAmino { - /** minter is a space for holding current inflation information. */ - minter?: MinterAmino | undefined; - /** params defines all the paramaters of the module. */ - params?: ParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisStateSDKType { - minter: MinterSDKType | undefined; - params: ParamsSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - minter: Minter.fromPartial({}), - params: Params.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/cosmos.mint.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.minter !== undefined) { - Minter.encode(message.minter, writer.uint32(10).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minter = Minter.decode(reader, reader.uint32()); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - minter: isSet(object.minter) ? Minter.fromJSON(object.minter) : undefined, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.minter !== undefined && (obj.minter = message.minter ? Minter.toJSON(message.minter) : undefined); - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.minter = object.minter !== undefined && object.minter !== null ? Minter.fromPartial(object.minter) : undefined; - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - minter: object.minter ? Minter.fromSDK(object.minter) : undefined, - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.minter !== undefined && (obj.minter = message.minter ? Minter.toSDK(message.minter) : undefined); - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - minter: object?.minter ? Minter.fromAmino(object.minter) : undefined, - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.minter = message.minter ? Minter.toAmino(message.minter) : undefined; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/mint.ts b/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/mint.ts deleted file mode 100644 index 5dca9391..00000000 --- a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/mint.ts +++ /dev/null @@ -1,337 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { Decimal } from "@cosmjs/math"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Minter represents the minting state. */ -export interface Minter { - /** current annual inflation rate */ - inflation: string; - /** current annual expected provisions */ - annualProvisions: string; -} -export interface MinterProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.Minter"; - value: Uint8Array; -} -/** Minter represents the minting state. */ -export interface MinterAmino { - /** current annual inflation rate */ - inflation: string; - /** current annual expected provisions */ - annual_provisions: string; -} -export interface MinterAminoMsg { - type: "cosmos-sdk/Minter"; - value: MinterAmino; -} -/** Minter represents the minting state. */ -export interface MinterSDKType { - inflation: string; - annual_provisions: string; -} -/** Params holds parameters for the mint module. */ -export interface Params { - /** type of coin to mint */ - mintDenom: string; - /** maximum annual change in inflation rate */ - inflationRateChange: string; - /** maximum inflation rate */ - inflationMax: string; - /** minimum inflation rate */ - inflationMin: string; - /** goal of percent bonded atoms */ - goalBonded: string; - /** expected blocks per year */ - blocksPerYear: bigint; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.Params"; - value: Uint8Array; -} -/** Params holds parameters for the mint module. */ -export interface ParamsAmino { - /** type of coin to mint */ - mint_denom: string; - /** maximum annual change in inflation rate */ - inflation_rate_change: string; - /** maximum inflation rate */ - inflation_max: string; - /** minimum inflation rate */ - inflation_min: string; - /** goal of percent bonded atoms */ - goal_bonded: string; - /** expected blocks per year */ - blocks_per_year: string; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params holds parameters for the mint module. */ -export interface ParamsSDKType { - mint_denom: string; - inflation_rate_change: string; - inflation_max: string; - inflation_min: string; - goal_bonded: string; - blocks_per_year: bigint; -} -function createBaseMinter(): Minter { - return { - inflation: "", - annualProvisions: "" - }; -} -export const Minter = { - typeUrl: "/cosmos.mint.v1beta1.Minter", - aminoType: "cosmos-sdk/Minter", - encode(message: Minter, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.inflation !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.inflation, 18).atomics); - } - if (message.annualProvisions !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.annualProvisions, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Minter { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMinter(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inflation = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 2: - message.annualProvisions = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Minter { - return { - inflation: isSet(object.inflation) ? String(object.inflation) : "", - annualProvisions: isSet(object.annualProvisions) ? String(object.annualProvisions) : "" - }; - }, - toJSON(message: Minter): unknown { - const obj: any = {}; - message.inflation !== undefined && (obj.inflation = message.inflation); - message.annualProvisions !== undefined && (obj.annualProvisions = message.annualProvisions); - return obj; - }, - fromPartial(object: DeepPartial): Minter { - const message = createBaseMinter(); - message.inflation = object.inflation ?? ""; - message.annualProvisions = object.annualProvisions ?? ""; - return message; - }, - fromSDK(object: MinterSDKType): Minter { - return { - inflation: object?.inflation, - annualProvisions: object?.annual_provisions - }; - }, - toSDK(message: Minter): MinterSDKType { - const obj: any = {}; - obj.inflation = message.inflation; - obj.annual_provisions = message.annualProvisions; - return obj; - }, - fromAmino(object: MinterAmino): Minter { - return { - inflation: object.inflation, - annualProvisions: object.annual_provisions - }; - }, - toAmino(message: Minter): MinterAmino { - const obj: any = {}; - obj.inflation = message.inflation; - obj.annual_provisions = message.annualProvisions; - return obj; - }, - fromAminoMsg(object: MinterAminoMsg): Minter { - return Minter.fromAmino(object.value); - }, - toAminoMsg(message: Minter): MinterAminoMsg { - return { - type: "cosmos-sdk/Minter", - value: Minter.toAmino(message) - }; - }, - fromProtoMsg(message: MinterProtoMsg): Minter { - return Minter.decode(message.value); - }, - toProto(message: Minter): Uint8Array { - return Minter.encode(message).finish(); - }, - toProtoMsg(message: Minter): MinterProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.Minter", - value: Minter.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - mintDenom: "", - inflationRateChange: "", - inflationMax: "", - inflationMin: "", - goalBonded: "", - blocksPerYear: BigInt(0) - }; -} -export const Params = { - typeUrl: "/cosmos.mint.v1beta1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.mintDenom !== "") { - writer.uint32(10).string(message.mintDenom); - } - if (message.inflationRateChange !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.inflationRateChange, 18).atomics); - } - if (message.inflationMax !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.inflationMax, 18).atomics); - } - if (message.inflationMin !== "") { - writer.uint32(34).string(Decimal.fromUserInput(message.inflationMin, 18).atomics); - } - if (message.goalBonded !== "") { - writer.uint32(42).string(Decimal.fromUserInput(message.goalBonded, 18).atomics); - } - if (message.blocksPerYear !== BigInt(0)) { - writer.uint32(48).uint64(message.blocksPerYear); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mintDenom = reader.string(); - break; - case 2: - message.inflationRateChange = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.inflationMax = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 4: - message.inflationMin = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 5: - message.goalBonded = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 6: - message.blocksPerYear = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - mintDenom: isSet(object.mintDenom) ? String(object.mintDenom) : "", - inflationRateChange: isSet(object.inflationRateChange) ? String(object.inflationRateChange) : "", - inflationMax: isSet(object.inflationMax) ? String(object.inflationMax) : "", - inflationMin: isSet(object.inflationMin) ? String(object.inflationMin) : "", - goalBonded: isSet(object.goalBonded) ? String(object.goalBonded) : "", - blocksPerYear: isSet(object.blocksPerYear) ? BigInt(object.blocksPerYear.toString()) : BigInt(0) - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.mintDenom !== undefined && (obj.mintDenom = message.mintDenom); - message.inflationRateChange !== undefined && (obj.inflationRateChange = message.inflationRateChange); - message.inflationMax !== undefined && (obj.inflationMax = message.inflationMax); - message.inflationMin !== undefined && (obj.inflationMin = message.inflationMin); - message.goalBonded !== undefined && (obj.goalBonded = message.goalBonded); - message.blocksPerYear !== undefined && (obj.blocksPerYear = (message.blocksPerYear || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.mintDenom = object.mintDenom ?? ""; - message.inflationRateChange = object.inflationRateChange ?? ""; - message.inflationMax = object.inflationMax ?? ""; - message.inflationMin = object.inflationMin ?? ""; - message.goalBonded = object.goalBonded ?? ""; - message.blocksPerYear = object.blocksPerYear !== undefined && object.blocksPerYear !== null ? BigInt(object.blocksPerYear.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - mintDenom: object?.mint_denom, - inflationRateChange: object?.inflation_rate_change, - inflationMax: object?.inflation_max, - inflationMin: object?.inflation_min, - goalBonded: object?.goal_bonded, - blocksPerYear: object?.blocks_per_year - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.mint_denom = message.mintDenom; - obj.inflation_rate_change = message.inflationRateChange; - obj.inflation_max = message.inflationMax; - obj.inflation_min = message.inflationMin; - obj.goal_bonded = message.goalBonded; - obj.blocks_per_year = message.blocksPerYear; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - mintDenom: object.mint_denom, - inflationRateChange: object.inflation_rate_change, - inflationMax: object.inflation_max, - inflationMin: object.inflation_min, - goalBonded: object.goal_bonded, - blocksPerYear: BigInt(object.blocks_per_year) - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.mint_denom = message.mintDenom; - obj.inflation_rate_change = message.inflationRateChange; - obj.inflation_max = message.inflationMax; - obj.inflation_min = message.inflationMin; - obj.goal_bonded = message.goalBonded; - obj.blocks_per_year = message.blocksPerYear ? message.blocksPerYear.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 54f8e781..00000000 --- a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, QueryInflationRequest, QueryInflationResponse, QueryAnnualProvisionsRequest, QueryAnnualProvisionsResponse } from "./query"; -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** Params returns the total set of minting parameters. */ - params(request?: QueryParamsRequest): Promise; - /** Inflation returns the current minting inflation value. */ - inflation(request?: QueryInflationRequest): Promise; - /** AnnualProvisions current minting annual provisions value. */ - annualProvisions(request?: QueryAnnualProvisionsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.inflation = this.inflation.bind(this); - this.annualProvisions = this.annualProvisions.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.mint.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - inflation(request: QueryInflationRequest = {}): Promise { - const data = QueryInflationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.mint.v1beta1.Query", "Inflation", data); - return promise.then(data => QueryInflationResponse.decode(new BinaryReader(data))); - } - annualProvisions(request: QueryAnnualProvisionsRequest = {}): Promise { - const data = QueryAnnualProvisionsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.mint.v1beta1.Query", "AnnualProvisions", data); - return promise.then(data => QueryAnnualProvisionsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - inflation(request?: QueryInflationRequest): Promise { - return queryService.inflation(request); - }, - annualProvisions(request?: QueryAnnualProvisionsRequest): Promise { - return queryService.annualProvisions(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseInflationQuery extends ReactQueryParams { - request?: QueryInflationRequest; -} -export interface UseAnnualProvisionsQuery extends ReactQueryParams { - request?: QueryAnnualProvisionsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useInflation = ({ - request, - options - }: UseInflationQuery) => { - return useQuery(["inflationQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.inflation(request); - }, options); - }; - const useAnnualProvisions = ({ - request, - options - }: UseAnnualProvisionsQuery) => { - return useQuery(["annualProvisionsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.annualProvisions(request); - }, options); - }; - return { - /** Params returns the total set of minting parameters. */useParams, - /** Inflation returns the current minting inflation value. */useInflation, - /** AnnualProvisions current minting annual provisions value. */useAnnualProvisions - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryInflationStore { - store = new QueryStore(queryService?.inflation); - inflation(request: QueryInflationRequest) { - return this.store.getData(request); - } - } - class QueryAnnualProvisionsStore { - store = new QueryStore(queryService?.annualProvisions); - annualProvisions(request: QueryAnnualProvisionsRequest) { - return this.store.getData(request); - } - } - return { - /** Params returns the total set of minting parameters. */QueryParamsStore, - /** Inflation returns the current minting inflation value. */QueryInflationStore, - /** AnnualProvisions current minting annual provisions value. */QueryAnnualProvisionsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/query.ts deleted file mode 100644 index 26b3bc21..00000000 --- a/examples/interchainjs/src/codegen/cosmos/mint/v1beta1/query.ts +++ /dev/null @@ -1,612 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./mint"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** QueryInflationRequest is the request type for the Query/Inflation RPC method. */ -export interface QueryInflationRequest {} -export interface QueryInflationRequestProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.QueryInflationRequest"; - value: Uint8Array; -} -/** QueryInflationRequest is the request type for the Query/Inflation RPC method. */ -export interface QueryInflationRequestAmino {} -export interface QueryInflationRequestAminoMsg { - type: "cosmos-sdk/QueryInflationRequest"; - value: QueryInflationRequestAmino; -} -/** QueryInflationRequest is the request type for the Query/Inflation RPC method. */ -export interface QueryInflationRequestSDKType {} -/** - * QueryInflationResponse is the response type for the Query/Inflation RPC - * method. - */ -export interface QueryInflationResponse { - /** inflation is the current minting inflation value. */ - inflation: Uint8Array; -} -export interface QueryInflationResponseProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.QueryInflationResponse"; - value: Uint8Array; -} -/** - * QueryInflationResponse is the response type for the Query/Inflation RPC - * method. - */ -export interface QueryInflationResponseAmino { - /** inflation is the current minting inflation value. */ - inflation: Uint8Array; -} -export interface QueryInflationResponseAminoMsg { - type: "cosmos-sdk/QueryInflationResponse"; - value: QueryInflationResponseAmino; -} -/** - * QueryInflationResponse is the response type for the Query/Inflation RPC - * method. - */ -export interface QueryInflationResponseSDKType { - inflation: Uint8Array; -} -/** - * QueryAnnualProvisionsRequest is the request type for the - * Query/AnnualProvisions RPC method. - */ -export interface QueryAnnualProvisionsRequest {} -export interface QueryAnnualProvisionsRequestProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest"; - value: Uint8Array; -} -/** - * QueryAnnualProvisionsRequest is the request type for the - * Query/AnnualProvisions RPC method. - */ -export interface QueryAnnualProvisionsRequestAmino {} -export interface QueryAnnualProvisionsRequestAminoMsg { - type: "cosmos-sdk/QueryAnnualProvisionsRequest"; - value: QueryAnnualProvisionsRequestAmino; -} -/** - * QueryAnnualProvisionsRequest is the request type for the - * Query/AnnualProvisions RPC method. - */ -export interface QueryAnnualProvisionsRequestSDKType {} -/** - * QueryAnnualProvisionsResponse is the response type for the - * Query/AnnualProvisions RPC method. - */ -export interface QueryAnnualProvisionsResponse { - /** annual_provisions is the current minting annual provisions value. */ - annualProvisions: Uint8Array; -} -export interface QueryAnnualProvisionsResponseProtoMsg { - typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse"; - value: Uint8Array; -} -/** - * QueryAnnualProvisionsResponse is the response type for the - * Query/AnnualProvisions RPC method. - */ -export interface QueryAnnualProvisionsResponseAmino { - /** annual_provisions is the current minting annual provisions value. */ - annual_provisions: Uint8Array; -} -export interface QueryAnnualProvisionsResponseAminoMsg { - type: "cosmos-sdk/QueryAnnualProvisionsResponse"; - value: QueryAnnualProvisionsResponseAmino; -} -/** - * QueryAnnualProvisionsResponse is the response type for the - * Query/AnnualProvisions RPC method. - */ -export interface QueryAnnualProvisionsResponseSDKType { - annual_provisions: Uint8Array; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.mint.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.mint.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryInflationRequest(): QueryInflationRequest { - return {}; -} -export const QueryInflationRequest = { - typeUrl: "/cosmos.mint.v1beta1.QueryInflationRequest", - aminoType: "cosmos-sdk/QueryInflationRequest", - encode(_: QueryInflationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryInflationRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryInflationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryInflationRequest { - return {}; - }, - toJSON(_: QueryInflationRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryInflationRequest { - const message = createBaseQueryInflationRequest(); - return message; - }, - fromSDK(_: QueryInflationRequestSDKType): QueryInflationRequest { - return {}; - }, - toSDK(_: QueryInflationRequest): QueryInflationRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryInflationRequestAmino): QueryInflationRequest { - return {}; - }, - toAmino(_: QueryInflationRequest): QueryInflationRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryInflationRequestAminoMsg): QueryInflationRequest { - return QueryInflationRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryInflationRequest): QueryInflationRequestAminoMsg { - return { - type: "cosmos-sdk/QueryInflationRequest", - value: QueryInflationRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryInflationRequestProtoMsg): QueryInflationRequest { - return QueryInflationRequest.decode(message.value); - }, - toProto(message: QueryInflationRequest): Uint8Array { - return QueryInflationRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryInflationRequest): QueryInflationRequestProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.QueryInflationRequest", - value: QueryInflationRequest.encode(message).finish() - }; - } -}; -function createBaseQueryInflationResponse(): QueryInflationResponse { - return { - inflation: new Uint8Array() - }; -} -export const QueryInflationResponse = { - typeUrl: "/cosmos.mint.v1beta1.QueryInflationResponse", - aminoType: "cosmos-sdk/QueryInflationResponse", - encode(message: QueryInflationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.inflation.length !== 0) { - writer.uint32(10).bytes(message.inflation); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryInflationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryInflationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.inflation = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryInflationResponse { - return { - inflation: isSet(object.inflation) ? bytesFromBase64(object.inflation) : new Uint8Array() - }; - }, - toJSON(message: QueryInflationResponse): unknown { - const obj: any = {}; - message.inflation !== undefined && (obj.inflation = base64FromBytes(message.inflation !== undefined ? message.inflation : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryInflationResponse { - const message = createBaseQueryInflationResponse(); - message.inflation = object.inflation ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryInflationResponseSDKType): QueryInflationResponse { - return { - inflation: object?.inflation - }; - }, - toSDK(message: QueryInflationResponse): QueryInflationResponseSDKType { - const obj: any = {}; - obj.inflation = message.inflation; - return obj; - }, - fromAmino(object: QueryInflationResponseAmino): QueryInflationResponse { - return { - inflation: object.inflation - }; - }, - toAmino(message: QueryInflationResponse): QueryInflationResponseAmino { - const obj: any = {}; - obj.inflation = message.inflation; - return obj; - }, - fromAminoMsg(object: QueryInflationResponseAminoMsg): QueryInflationResponse { - return QueryInflationResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryInflationResponse): QueryInflationResponseAminoMsg { - return { - type: "cosmos-sdk/QueryInflationResponse", - value: QueryInflationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryInflationResponseProtoMsg): QueryInflationResponse { - return QueryInflationResponse.decode(message.value); - }, - toProto(message: QueryInflationResponse): Uint8Array { - return QueryInflationResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryInflationResponse): QueryInflationResponseProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.QueryInflationResponse", - value: QueryInflationResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAnnualProvisionsRequest(): QueryAnnualProvisionsRequest { - return {}; -} -export const QueryAnnualProvisionsRequest = { - typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", - aminoType: "cosmos-sdk/QueryAnnualProvisionsRequest", - encode(_: QueryAnnualProvisionsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAnnualProvisionsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAnnualProvisionsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryAnnualProvisionsRequest { - return {}; - }, - toJSON(_: QueryAnnualProvisionsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryAnnualProvisionsRequest { - const message = createBaseQueryAnnualProvisionsRequest(); - return message; - }, - fromSDK(_: QueryAnnualProvisionsRequestSDKType): QueryAnnualProvisionsRequest { - return {}; - }, - toSDK(_: QueryAnnualProvisionsRequest): QueryAnnualProvisionsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryAnnualProvisionsRequestAmino): QueryAnnualProvisionsRequest { - return {}; - }, - toAmino(_: QueryAnnualProvisionsRequest): QueryAnnualProvisionsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryAnnualProvisionsRequestAminoMsg): QueryAnnualProvisionsRequest { - return QueryAnnualProvisionsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAnnualProvisionsRequest): QueryAnnualProvisionsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAnnualProvisionsRequest", - value: QueryAnnualProvisionsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAnnualProvisionsRequestProtoMsg): QueryAnnualProvisionsRequest { - return QueryAnnualProvisionsRequest.decode(message.value); - }, - toProto(message: QueryAnnualProvisionsRequest): Uint8Array { - return QueryAnnualProvisionsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAnnualProvisionsRequest): QueryAnnualProvisionsRequestProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", - value: QueryAnnualProvisionsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAnnualProvisionsResponse(): QueryAnnualProvisionsResponse { - return { - annualProvisions: new Uint8Array() - }; -} -export const QueryAnnualProvisionsResponse = { - typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", - aminoType: "cosmos-sdk/QueryAnnualProvisionsResponse", - encode(message: QueryAnnualProvisionsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.annualProvisions.length !== 0) { - writer.uint32(10).bytes(message.annualProvisions); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAnnualProvisionsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAnnualProvisionsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annualProvisions = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAnnualProvisionsResponse { - return { - annualProvisions: isSet(object.annualProvisions) ? bytesFromBase64(object.annualProvisions) : new Uint8Array() - }; - }, - toJSON(message: QueryAnnualProvisionsResponse): unknown { - const obj: any = {}; - message.annualProvisions !== undefined && (obj.annualProvisions = base64FromBytes(message.annualProvisions !== undefined ? message.annualProvisions : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryAnnualProvisionsResponse { - const message = createBaseQueryAnnualProvisionsResponse(); - message.annualProvisions = object.annualProvisions ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryAnnualProvisionsResponseSDKType): QueryAnnualProvisionsResponse { - return { - annualProvisions: object?.annual_provisions - }; - }, - toSDK(message: QueryAnnualProvisionsResponse): QueryAnnualProvisionsResponseSDKType { - const obj: any = {}; - obj.annual_provisions = message.annualProvisions; - return obj; - }, - fromAmino(object: QueryAnnualProvisionsResponseAmino): QueryAnnualProvisionsResponse { - return { - annualProvisions: object.annual_provisions - }; - }, - toAmino(message: QueryAnnualProvisionsResponse): QueryAnnualProvisionsResponseAmino { - const obj: any = {}; - obj.annual_provisions = message.annualProvisions; - return obj; - }, - fromAminoMsg(object: QueryAnnualProvisionsResponseAminoMsg): QueryAnnualProvisionsResponse { - return QueryAnnualProvisionsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAnnualProvisionsResponse): QueryAnnualProvisionsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAnnualProvisionsResponse", - value: QueryAnnualProvisionsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAnnualProvisionsResponseProtoMsg): QueryAnnualProvisionsResponse { - return QueryAnnualProvisionsResponse.decode(message.value); - }, - toProto(message: QueryAnnualProvisionsResponse): Uint8Array { - return QueryAnnualProvisionsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAnnualProvisionsResponse): QueryAnnualProvisionsResponseProtoMsg { - return { - typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", - value: QueryAnnualProvisionsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/msg/v1/msg.ts b/examples/interchainjs/src/codegen/cosmos/msg/v1/msg.ts deleted file mode 100644 index 693da49f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/msg/v1/msg.ts +++ /dev/null @@ -1 +0,0 @@ -export {} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/event.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/event.ts deleted file mode 100644 index 7f5d5010..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/event.ts +++ /dev/null @@ -1,445 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** EventSend is emitted on Msg/Send */ -export interface EventSend { - classId: string; - id: string; - sender: string; - receiver: string; -} -export interface EventSendProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.EventSend"; - value: Uint8Array; -} -/** EventSend is emitted on Msg/Send */ -export interface EventSendAmino { - class_id: string; - id: string; - sender: string; - receiver: string; -} -export interface EventSendAminoMsg { - type: "cosmos-sdk/EventSend"; - value: EventSendAmino; -} -/** EventSend is emitted on Msg/Send */ -export interface EventSendSDKType { - class_id: string; - id: string; - sender: string; - receiver: string; -} -/** EventMint is emitted on Mint */ -export interface EventMint { - classId: string; - id: string; - owner: string; -} -export interface EventMintProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.EventMint"; - value: Uint8Array; -} -/** EventMint is emitted on Mint */ -export interface EventMintAmino { - class_id: string; - id: string; - owner: string; -} -export interface EventMintAminoMsg { - type: "cosmos-sdk/EventMint"; - value: EventMintAmino; -} -/** EventMint is emitted on Mint */ -export interface EventMintSDKType { - class_id: string; - id: string; - owner: string; -} -/** EventBurn is emitted on Burn */ -export interface EventBurn { - classId: string; - id: string; - owner: string; -} -export interface EventBurnProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.EventBurn"; - value: Uint8Array; -} -/** EventBurn is emitted on Burn */ -export interface EventBurnAmino { - class_id: string; - id: string; - owner: string; -} -export interface EventBurnAminoMsg { - type: "cosmos-sdk/EventBurn"; - value: EventBurnAmino; -} -/** EventBurn is emitted on Burn */ -export interface EventBurnSDKType { - class_id: string; - id: string; - owner: string; -} -function createBaseEventSend(): EventSend { - return { - classId: "", - id: "", - sender: "", - receiver: "" - }; -} -export const EventSend = { - typeUrl: "/cosmos.nft.v1beta1.EventSend", - aminoType: "cosmos-sdk/EventSend", - encode(message: EventSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventSend { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventSend { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "", - sender: isSet(object.sender) ? String(object.sender) : "", - receiver: isSet(object.receiver) ? String(object.receiver) : "" - }; - }, - toJSON(message: EventSend): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - fromPartial(object: DeepPartial): EventSend { - const message = createBaseEventSend(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; - return message; - }, - fromSDK(object: EventSendSDKType): EventSend { - return { - classId: object?.class_id, - id: object?.id, - sender: object?.sender, - receiver: object?.receiver - }; - }, - toSDK(message: EventSend): EventSendSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.sender = message.sender; - obj.receiver = message.receiver; - return obj; - }, - fromAmino(object: EventSendAmino): EventSend { - return { - classId: object.class_id, - id: object.id, - sender: object.sender, - receiver: object.receiver - }; - }, - toAmino(message: EventSend): EventSendAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.sender = message.sender; - obj.receiver = message.receiver; - return obj; - }, - fromAminoMsg(object: EventSendAminoMsg): EventSend { - return EventSend.fromAmino(object.value); - }, - toAminoMsg(message: EventSend): EventSendAminoMsg { - return { - type: "cosmos-sdk/EventSend", - value: EventSend.toAmino(message) - }; - }, - fromProtoMsg(message: EventSendProtoMsg): EventSend { - return EventSend.decode(message.value); - }, - toProto(message: EventSend): Uint8Array { - return EventSend.encode(message).finish(); - }, - toProtoMsg(message: EventSend): EventSendProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.EventSend", - value: EventSend.encode(message).finish() - }; - } -}; -function createBaseEventMint(): EventMint { - return { - classId: "", - id: "", - owner: "" - }; -} -export const EventMint = { - typeUrl: "/cosmos.nft.v1beta1.EventMint", - aminoType: "cosmos-sdk/EventMint", - encode(message: EventMint, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.owner !== "") { - writer.uint32(26).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventMint { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventMint(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventMint { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "", - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: EventMint): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): EventMint { - const message = createBaseEventMint(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: EventMintSDKType): EventMint { - return { - classId: object?.class_id, - id: object?.id, - owner: object?.owner - }; - }, - toSDK(message: EventMint): EventMintSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: EventMintAmino): EventMint { - return { - classId: object.class_id, - id: object.id, - owner: object.owner - }; - }, - toAmino(message: EventMint): EventMintAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: EventMintAminoMsg): EventMint { - return EventMint.fromAmino(object.value); - }, - toAminoMsg(message: EventMint): EventMintAminoMsg { - return { - type: "cosmos-sdk/EventMint", - value: EventMint.toAmino(message) - }; - }, - fromProtoMsg(message: EventMintProtoMsg): EventMint { - return EventMint.decode(message.value); - }, - toProto(message: EventMint): Uint8Array { - return EventMint.encode(message).finish(); - }, - toProtoMsg(message: EventMint): EventMintProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.EventMint", - value: EventMint.encode(message).finish() - }; - } -}; -function createBaseEventBurn(): EventBurn { - return { - classId: "", - id: "", - owner: "" - }; -} -export const EventBurn = { - typeUrl: "/cosmos.nft.v1beta1.EventBurn", - aminoType: "cosmos-sdk/EventBurn", - encode(message: EventBurn, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.owner !== "") { - writer.uint32(26).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventBurn { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventBurn(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventBurn { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "", - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: EventBurn): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): EventBurn { - const message = createBaseEventBurn(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: EventBurnSDKType): EventBurn { - return { - classId: object?.class_id, - id: object?.id, - owner: object?.owner - }; - }, - toSDK(message: EventBurn): EventBurnSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: EventBurnAmino): EventBurn { - return { - classId: object.class_id, - id: object.id, - owner: object.owner - }; - }, - toAmino(message: EventBurn): EventBurnAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: EventBurnAminoMsg): EventBurn { - return EventBurn.fromAmino(object.value); - }, - toAminoMsg(message: EventBurn): EventBurnAminoMsg { - return { - type: "cosmos-sdk/EventBurn", - value: EventBurn.toAmino(message) - }; - }, - fromProtoMsg(message: EventBurnProtoMsg): EventBurn { - return EventBurn.decode(message.value); - }, - toProto(message: EventBurn): Uint8Array { - return EventBurn.encode(message).finish(); - }, - toProtoMsg(message: EventBurn): EventBurnProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.EventBurn", - value: EventBurn.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/genesis.ts deleted file mode 100644 index 2d55b20f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/genesis.ts +++ /dev/null @@ -1,295 +0,0 @@ -import { Class, ClassAmino, ClassSDKType, NFT, NFTAmino, NFTSDKType } from "./nft"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** GenesisState defines the nft module's genesis state. */ -export interface GenesisState { - /** class defines the class of the nft type. */ - classes: Class[]; - entries: Entry[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the nft module's genesis state. */ -export interface GenesisStateAmino { - /** class defines the class of the nft type. */ - classes: ClassAmino[]; - entries: EntryAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the nft module's genesis state. */ -export interface GenesisStateSDKType { - classes: ClassSDKType[]; - entries: EntrySDKType[]; -} -/** Entry Defines all nft owned by a person */ -export interface Entry { - /** owner is the owner address of the following nft */ - owner: string; - /** nfts is a group of nfts of the same owner */ - nfts: NFT[]; -} -export interface EntryProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.Entry"; - value: Uint8Array; -} -/** Entry Defines all nft owned by a person */ -export interface EntryAmino { - /** owner is the owner address of the following nft */ - owner: string; - /** nfts is a group of nfts of the same owner */ - nfts: NFTAmino[]; -} -export interface EntryAminoMsg { - type: "cosmos-sdk/Entry"; - value: EntryAmino; -} -/** Entry Defines all nft owned by a person */ -export interface EntrySDKType { - owner: string; - nfts: NFTSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - classes: [], - entries: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.nft.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.classes) { - Class.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.entries) { - Entry.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classes.push(Class.decode(reader, reader.uint32())); - break; - case 2: - message.entries.push(Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - classes: Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromJSON(e)) : [], - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => Entry.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.classes) { - obj.classes = message.classes.map(e => e ? Class.toJSON(e) : undefined); - } else { - obj.classes = []; - } - if (message.entries) { - obj.entries = message.entries.map(e => e ? Entry.toJSON(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.classes = object.classes?.map(e => Class.fromPartial(e)) || []; - message.entries = object.entries?.map(e => Entry.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - classes: Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromSDK(e)) : [], - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => Entry.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.classes) { - obj.classes = message.classes.map(e => e ? Class.toSDK(e) : undefined); - } else { - obj.classes = []; - } - if (message.entries) { - obj.entries = message.entries.map(e => e ? Entry.toSDK(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - classes: Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromAmino(e)) : [], - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => Entry.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.classes) { - obj.classes = message.classes.map(e => e ? Class.toAmino(e) : undefined); - } else { - obj.classes = []; - } - if (message.entries) { - obj.entries = message.entries.map(e => e ? Entry.toAmino(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseEntry(): Entry { - return { - owner: "", - nfts: [] - }; -} -export const Entry = { - typeUrl: "/cosmos.nft.v1beta1.Entry", - aminoType: "cosmos-sdk/Entry", - encode(message: Entry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - for (const v of message.nfts) { - NFT.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Entry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.nfts.push(NFT.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Entry { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - nfts: Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromJSON(e)) : [] - }; - }, - toJSON(message: Entry): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - if (message.nfts) { - obj.nfts = message.nfts.map(e => e ? NFT.toJSON(e) : undefined); - } else { - obj.nfts = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Entry { - const message = createBaseEntry(); - message.owner = object.owner ?? ""; - message.nfts = object.nfts?.map(e => NFT.fromPartial(e)) || []; - return message; - }, - fromSDK(object: EntrySDKType): Entry { - return { - owner: object?.owner, - nfts: Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromSDK(e)) : [] - }; - }, - toSDK(message: Entry): EntrySDKType { - const obj: any = {}; - obj.owner = message.owner; - if (message.nfts) { - obj.nfts = message.nfts.map(e => e ? NFT.toSDK(e) : undefined); - } else { - obj.nfts = []; - } - return obj; - }, - fromAmino(object: EntryAmino): Entry { - return { - owner: object.owner, - nfts: Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromAmino(e)) : [] - }; - }, - toAmino(message: Entry): EntryAmino { - const obj: any = {}; - obj.owner = message.owner; - if (message.nfts) { - obj.nfts = message.nfts.map(e => e ? NFT.toAmino(e) : undefined); - } else { - obj.nfts = []; - } - return obj; - }, - fromAminoMsg(object: EntryAminoMsg): Entry { - return Entry.fromAmino(object.value); - }, - toAminoMsg(message: Entry): EntryAminoMsg { - return { - type: "cosmos-sdk/Entry", - value: Entry.toAmino(message) - }; - }, - fromProtoMsg(message: EntryProtoMsg): Entry { - return Entry.decode(message.value); - }, - toProto(message: Entry): Uint8Array { - return Entry.encode(message).finish(); - }, - toProtoMsg(message: Entry): EntryProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.Entry", - value: Entry.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/nft.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/nft.ts deleted file mode 100644 index e81710b2..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/nft.ts +++ /dev/null @@ -1,413 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Class defines the class of the nft type. */ -export interface Class { - /** id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 */ - id: string; - /** name defines the human-readable name of the NFT classification. Optional */ - name: string; - /** symbol is an abbreviated name for nft classification. Optional */ - symbol: string; - /** description is a brief description of nft classification. Optional */ - description: string; - /** uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional */ - uri: string; - /** uri_hash is a hash of the document pointed by uri. Optional */ - uriHash: string; - /** data is the app specific metadata of the NFT class. Optional */ - data: Any | undefined; -} -export interface ClassProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.Class"; - value: Uint8Array; -} -/** Class defines the class of the nft type. */ -export interface ClassAmino { - /** id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 */ - id: string; - /** name defines the human-readable name of the NFT classification. Optional */ - name: string; - /** symbol is an abbreviated name for nft classification. Optional */ - symbol: string; - /** description is a brief description of nft classification. Optional */ - description: string; - /** uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional */ - uri: string; - /** uri_hash is a hash of the document pointed by uri. Optional */ - uri_hash: string; - /** data is the app specific metadata of the NFT class. Optional */ - data?: AnyAmino | undefined; -} -export interface ClassAminoMsg { - type: "cosmos-sdk/Class"; - value: ClassAmino; -} -/** Class defines the class of the nft type. */ -export interface ClassSDKType { - id: string; - name: string; - symbol: string; - description: string; - uri: string; - uri_hash: string; - data: AnySDKType | undefined; -} -/** NFT defines the NFT. */ -export interface NFT { - /** class_id associated with the NFT, similar to the contract address of ERC721 */ - classId: string; - /** id is a unique identifier of the NFT */ - id: string; - /** uri for the NFT metadata stored off chain */ - uri: string; - /** uri_hash is a hash of the document pointed by uri */ - uriHash: string; - /** data is an app specific data of the NFT. Optional */ - data: Any | undefined; -} -export interface NFTProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.NFT"; - value: Uint8Array; -} -/** NFT defines the NFT. */ -export interface NFTAmino { - /** class_id associated with the NFT, similar to the contract address of ERC721 */ - class_id: string; - /** id is a unique identifier of the NFT */ - id: string; - /** uri for the NFT metadata stored off chain */ - uri: string; - /** uri_hash is a hash of the document pointed by uri */ - uri_hash: string; - /** data is an app specific data of the NFT. Optional */ - data?: AnyAmino | undefined; -} -export interface NFTAminoMsg { - type: "cosmos-sdk/NFT"; - value: NFTAmino; -} -/** NFT defines the NFT. */ -export interface NFTSDKType { - class_id: string; - id: string; - uri: string; - uri_hash: string; - data: AnySDKType | undefined; -} -function createBaseClass(): Class { - return { - id: "", - name: "", - symbol: "", - description: "", - uri: "", - uriHash: "", - data: Any.fromPartial({}) - }; -} -export const Class = { - typeUrl: "/cosmos.nft.v1beta1.Class", - aminoType: "cosmos-sdk/Class", - encode(message: Class, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(26).string(message.symbol); - } - if (message.description !== "") { - writer.uint32(34).string(message.description); - } - if (message.uri !== "") { - writer.uint32(42).string(message.uri); - } - if (message.uriHash !== "") { - writer.uint32(50).string(message.uriHash); - } - if (message.data !== undefined) { - Any.encode(message.data, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Class { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClass(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.symbol = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - message.uri = reader.string(); - break; - case 6: - message.uriHash = reader.string(); - break; - case 7: - message.data = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Class { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - symbol: isSet(object.symbol) ? String(object.symbol) : "", - description: isSet(object.description) ? String(object.description) : "", - uri: isSet(object.uri) ? String(object.uri) : "", - uriHash: isSet(object.uriHash) ? String(object.uriHash) : "", - data: isSet(object.data) ? Any.fromJSON(object.data) : undefined - }; - }, - toJSON(message: Class): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.name !== undefined && (obj.name = message.name); - message.symbol !== undefined && (obj.symbol = message.symbol); - message.description !== undefined && (obj.description = message.description); - message.uri !== undefined && (obj.uri = message.uri); - message.uriHash !== undefined && (obj.uriHash = message.uriHash); - message.data !== undefined && (obj.data = message.data ? Any.toJSON(message.data) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Class { - const message = createBaseClass(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.symbol = object.symbol ?? ""; - message.description = object.description ?? ""; - message.uri = object.uri ?? ""; - message.uriHash = object.uriHash ?? ""; - message.data = object.data !== undefined && object.data !== null ? Any.fromPartial(object.data) : undefined; - return message; - }, - fromSDK(object: ClassSDKType): Class { - return { - id: object?.id, - name: object?.name, - symbol: object?.symbol, - description: object?.description, - uri: object?.uri, - uriHash: object?.uri_hash, - data: object.data ? Any.fromSDK(object.data) : undefined - }; - }, - toSDK(message: Class): ClassSDKType { - const obj: any = {}; - obj.id = message.id; - obj.name = message.name; - obj.symbol = message.symbol; - obj.description = message.description; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - message.data !== undefined && (obj.data = message.data ? Any.toSDK(message.data) : undefined); - return obj; - }, - fromAmino(object: ClassAmino): Class { - return { - id: object.id, - name: object.name, - symbol: object.symbol, - description: object.description, - uri: object.uri, - uriHash: object.uri_hash, - data: object?.data ? Any.fromAmino(object.data) : undefined - }; - }, - toAmino(message: Class): ClassAmino { - const obj: any = {}; - obj.id = message.id; - obj.name = message.name; - obj.symbol = message.symbol; - obj.description = message.description; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - obj.data = message.data ? Any.toAmino(message.data) : undefined; - return obj; - }, - fromAminoMsg(object: ClassAminoMsg): Class { - return Class.fromAmino(object.value); - }, - toAminoMsg(message: Class): ClassAminoMsg { - return { - type: "cosmos-sdk/Class", - value: Class.toAmino(message) - }; - }, - fromProtoMsg(message: ClassProtoMsg): Class { - return Class.decode(message.value); - }, - toProto(message: Class): Uint8Array { - return Class.encode(message).finish(); - }, - toProtoMsg(message: Class): ClassProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.Class", - value: Class.encode(message).finish() - }; - } -}; -function createBaseNFT(): NFT { - return { - classId: "", - id: "", - uri: "", - uriHash: "", - data: Any.fromPartial({}) - }; -} -export const NFT = { - typeUrl: "/cosmos.nft.v1beta1.NFT", - aminoType: "cosmos-sdk/NFT", - encode(message: NFT, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.uri !== "") { - writer.uint32(26).string(message.uri); - } - if (message.uriHash !== "") { - writer.uint32(34).string(message.uriHash); - } - if (message.data !== undefined) { - Any.encode(message.data, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): NFT { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNFT(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.uri = reader.string(); - break; - case 4: - message.uriHash = reader.string(); - break; - case 10: - message.data = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): NFT { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "", - uri: isSet(object.uri) ? String(object.uri) : "", - uriHash: isSet(object.uriHash) ? String(object.uriHash) : "", - data: isSet(object.data) ? Any.fromJSON(object.data) : undefined - }; - }, - toJSON(message: NFT): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - message.uri !== undefined && (obj.uri = message.uri); - message.uriHash !== undefined && (obj.uriHash = message.uriHash); - message.data !== undefined && (obj.data = message.data ? Any.toJSON(message.data) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): NFT { - const message = createBaseNFT(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - message.uri = object.uri ?? ""; - message.uriHash = object.uriHash ?? ""; - message.data = object.data !== undefined && object.data !== null ? Any.fromPartial(object.data) : undefined; - return message; - }, - fromSDK(object: NFTSDKType): NFT { - return { - classId: object?.class_id, - id: object?.id, - uri: object?.uri, - uriHash: object?.uri_hash, - data: object.data ? Any.fromSDK(object.data) : undefined - }; - }, - toSDK(message: NFT): NFTSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - message.data !== undefined && (obj.data = message.data ? Any.toSDK(message.data) : undefined); - return obj; - }, - fromAmino(object: NFTAmino): NFT { - return { - classId: object.class_id, - id: object.id, - uri: object.uri, - uriHash: object.uri_hash, - data: object?.data ? Any.fromAmino(object.data) : undefined - }; - }, - toAmino(message: NFT): NFTAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.uri = message.uri; - obj.uri_hash = message.uriHash; - obj.data = message.data ? Any.toAmino(message.data) : undefined; - return obj; - }, - fromAminoMsg(object: NFTAminoMsg): NFT { - return NFT.fromAmino(object.value); - }, - toAminoMsg(message: NFT): NFTAminoMsg { - return { - type: "cosmos-sdk/NFT", - value: NFT.toAmino(message) - }; - }, - fromProtoMsg(message: NFTProtoMsg): NFT { - return NFT.decode(message.value); - }, - toProto(message: NFT): Uint8Array { - return NFT.encode(message).finish(); - }, - toProtoMsg(message: NFT): NFTProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.NFT", - value: NFT.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 7107b6fa..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryBalanceRequest, QueryBalanceResponse, QueryOwnerRequest, QueryOwnerResponse, QuerySupplyRequest, QuerySupplyResponse, QueryNFTsRequest, QueryNFTsResponse, QueryNFTRequest, QueryNFTResponse, QueryClassRequest, QueryClassResponse, QueryClassesRequest, QueryClassesResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 */ - balance(request: QueryBalanceRequest): Promise; - /** Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 */ - owner(request: QueryOwnerRequest): Promise; - /** Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. */ - supply(request: QuerySupplyRequest): Promise; - /** - * NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - * ERC721Enumerable - */ - nFTs(request: QueryNFTsRequest): Promise; - /** NFT queries an NFT based on its class and id. */ - nFT(request: QueryNFTRequest): Promise; - /** Class queries an NFT class based on its id */ - class(request: QueryClassRequest): Promise; - /** Classes queries all NFT classes */ - classes(request?: QueryClassesRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.balance = this.balance.bind(this); - this.owner = this.owner.bind(this); - this.supply = this.supply.bind(this); - this.nFTs = this.nFTs.bind(this); - this.nFT = this.nFT.bind(this); - this.class = this.class.bind(this); - this.classes = this.classes.bind(this); - } - balance(request: QueryBalanceRequest): Promise { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "Balance", data); - return promise.then(data => QueryBalanceResponse.decode(new BinaryReader(data))); - } - owner(request: QueryOwnerRequest): Promise { - const data = QueryOwnerRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "Owner", data); - return promise.then(data => QueryOwnerResponse.decode(new BinaryReader(data))); - } - supply(request: QuerySupplyRequest): Promise { - const data = QuerySupplyRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "Supply", data); - return promise.then(data => QuerySupplyResponse.decode(new BinaryReader(data))); - } - nFTs(request: QueryNFTsRequest): Promise { - const data = QueryNFTsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "NFTs", data); - return promise.then(data => QueryNFTsResponse.decode(new BinaryReader(data))); - } - nFT(request: QueryNFTRequest): Promise { - const data = QueryNFTRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "NFT", data); - return promise.then(data => QueryNFTResponse.decode(new BinaryReader(data))); - } - class(request: QueryClassRequest): Promise { - const data = QueryClassRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "Class", data); - return promise.then(data => QueryClassResponse.decode(new BinaryReader(data))); - } - classes(request: QueryClassesRequest = { - pagination: undefined - }): Promise { - const data = QueryClassesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Query", "Classes", data); - return promise.then(data => QueryClassesResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - balance(request: QueryBalanceRequest): Promise { - return queryService.balance(request); - }, - owner(request: QueryOwnerRequest): Promise { - return queryService.owner(request); - }, - supply(request: QuerySupplyRequest): Promise { - return queryService.supply(request); - }, - nFTs(request: QueryNFTsRequest): Promise { - return queryService.nFTs(request); - }, - nFT(request: QueryNFTRequest): Promise { - return queryService.nFT(request); - }, - class(request: QueryClassRequest): Promise { - return queryService.class(request); - }, - classes(request?: QueryClassesRequest): Promise { - return queryService.classes(request); - } - }; -}; -export interface UseBalanceQuery extends ReactQueryParams { - request: QueryBalanceRequest; -} -export interface UseOwnerQuery extends ReactQueryParams { - request: QueryOwnerRequest; -} -export interface UseSupplyQuery extends ReactQueryParams { - request: QuerySupplyRequest; -} -export interface UseNFTsQuery extends ReactQueryParams { - request: QueryNFTsRequest; -} -export interface UseNFTQuery extends ReactQueryParams { - request: QueryNFTRequest; -} -export interface UseClassQuery extends ReactQueryParams { - request: QueryClassRequest; -} -export interface UseClassesQuery extends ReactQueryParams { - request?: QueryClassesRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useBalance = ({ - request, - options - }: UseBalanceQuery) => { - return useQuery(["balanceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.balance(request); - }, options); - }; - const useOwner = ({ - request, - options - }: UseOwnerQuery) => { - return useQuery(["ownerQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.owner(request); - }, options); - }; - const useSupply = ({ - request, - options - }: UseSupplyQuery) => { - return useQuery(["supplyQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.supply(request); - }, options); - }; - const useNFTs = ({ - request, - options - }: UseNFTsQuery) => { - return useQuery(["nFTsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.nFTs(request); - }, options); - }; - const useNFT = ({ - request, - options - }: UseNFTQuery) => { - return useQuery(["nFTQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.nFT(request); - }, options); - }; - const useClass = ({ - request, - options - }: UseClassQuery) => { - return useQuery(["classQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.class(request); - }, options); - }; - const useClasses = ({ - request, - options - }: UseClassesQuery) => { - return useQuery(["classesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.classes(request); - }, options); - }; - return { - /** Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 */useBalance, - /** Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 */useOwner, - /** Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. */useSupply, - /** - * NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - * ERC721Enumerable - */ - useNFTs, - /** NFT queries an NFT based on its class and id. */useNFT, - /** Class queries an NFT class based on its id */useClass, - /** Classes queries all NFT classes */useClasses - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryBalanceStore { - store = new QueryStore(queryService?.balance); - balance(request: QueryBalanceRequest) { - return this.store.getData(request); - } - } - class QueryOwnerStore { - store = new QueryStore(queryService?.owner); - owner(request: QueryOwnerRequest) { - return this.store.getData(request); - } - } - class QuerySupplyStore { - store = new QueryStore(queryService?.supply); - supply(request: QuerySupplyRequest) { - return this.store.getData(request); - } - } - class QueryNFTsStore { - store = new QueryStore(queryService?.nFTs); - nFTs(request: QueryNFTsRequest) { - return this.store.getData(request); - } - } - class QueryNFTStore { - store = new QueryStore(queryService?.nFT); - nFT(request: QueryNFTRequest) { - return this.store.getData(request); - } - } - class QueryClassStore { - store = new QueryStore(queryService?.class); - class(request: QueryClassRequest) { - return this.store.getData(request); - } - } - class QueryClassesStore { - store = new QueryStore(queryService?.classes); - classes(request: QueryClassesRequest) { - return this.store.getData(request); - } - } - return { - /** Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 */QueryBalanceStore, - /** Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 */QueryOwnerStore, - /** Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. */QuerySupplyStore, - /** - * NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - * ERC721Enumerable - */ - QueryNFTsStore, - /** NFT queries an NFT based on its class and id. */QueryNFTStore, - /** Class queries an NFT class based on its id */QueryClassStore, - /** Classes queries all NFT classes */QueryClassesStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/query.ts deleted file mode 100644 index 0f402e90..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/query.ts +++ /dev/null @@ -1,1661 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { NFT, NFTAmino, NFTSDKType, Class, ClassAmino, ClassSDKType } from "./nft"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryBalanceRequest is the request type for the Query/Balance RPC method */ -export interface QueryBalanceRequest { - classId: string; - owner: string; -} -export interface QueryBalanceRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryBalanceRequest"; - value: Uint8Array; -} -/** QueryBalanceRequest is the request type for the Query/Balance RPC method */ -export interface QueryBalanceRequestAmino { - class_id: string; - owner: string; -} -export interface QueryBalanceRequestAminoMsg { - type: "cosmos-sdk/QueryBalanceRequest"; - value: QueryBalanceRequestAmino; -} -/** QueryBalanceRequest is the request type for the Query/Balance RPC method */ -export interface QueryBalanceRequestSDKType { - class_id: string; - owner: string; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method */ -export interface QueryBalanceResponse { - amount: bigint; -} -export interface QueryBalanceResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryBalanceResponse"; - value: Uint8Array; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method */ -export interface QueryBalanceResponseAmino { - amount: string; -} -export interface QueryBalanceResponseAminoMsg { - type: "cosmos-sdk/QueryBalanceResponse"; - value: QueryBalanceResponseAmino; -} -/** QueryBalanceResponse is the response type for the Query/Balance RPC method */ -export interface QueryBalanceResponseSDKType { - amount: bigint; -} -/** QueryOwnerRequest is the request type for the Query/Owner RPC method */ -export interface QueryOwnerRequest { - classId: string; - id: string; -} -export interface QueryOwnerRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryOwnerRequest"; - value: Uint8Array; -} -/** QueryOwnerRequest is the request type for the Query/Owner RPC method */ -export interface QueryOwnerRequestAmino { - class_id: string; - id: string; -} -export interface QueryOwnerRequestAminoMsg { - type: "cosmos-sdk/QueryOwnerRequest"; - value: QueryOwnerRequestAmino; -} -/** QueryOwnerRequest is the request type for the Query/Owner RPC method */ -export interface QueryOwnerRequestSDKType { - class_id: string; - id: string; -} -/** QueryOwnerResponse is the response type for the Query/Owner RPC method */ -export interface QueryOwnerResponse { - owner: string; -} -export interface QueryOwnerResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryOwnerResponse"; - value: Uint8Array; -} -/** QueryOwnerResponse is the response type for the Query/Owner RPC method */ -export interface QueryOwnerResponseAmino { - owner: string; -} -export interface QueryOwnerResponseAminoMsg { - type: "cosmos-sdk/QueryOwnerResponse"; - value: QueryOwnerResponseAmino; -} -/** QueryOwnerResponse is the response type for the Query/Owner RPC method */ -export interface QueryOwnerResponseSDKType { - owner: string; -} -/** QuerySupplyRequest is the request type for the Query/Supply RPC method */ -export interface QuerySupplyRequest { - classId: string; -} -export interface QuerySupplyRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QuerySupplyRequest"; - value: Uint8Array; -} -/** QuerySupplyRequest is the request type for the Query/Supply RPC method */ -export interface QuerySupplyRequestAmino { - class_id: string; -} -export interface QuerySupplyRequestAminoMsg { - type: "cosmos-sdk/QuerySupplyRequest"; - value: QuerySupplyRequestAmino; -} -/** QuerySupplyRequest is the request type for the Query/Supply RPC method */ -export interface QuerySupplyRequestSDKType { - class_id: string; -} -/** QuerySupplyResponse is the response type for the Query/Supply RPC method */ -export interface QuerySupplyResponse { - amount: bigint; -} -export interface QuerySupplyResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QuerySupplyResponse"; - value: Uint8Array; -} -/** QuerySupplyResponse is the response type for the Query/Supply RPC method */ -export interface QuerySupplyResponseAmino { - amount: string; -} -export interface QuerySupplyResponseAminoMsg { - type: "cosmos-sdk/QuerySupplyResponse"; - value: QuerySupplyResponseAmino; -} -/** QuerySupplyResponse is the response type for the Query/Supply RPC method */ -export interface QuerySupplyResponseSDKType { - amount: bigint; -} -/** QueryNFTstRequest is the request type for the Query/NFTs RPC method */ -export interface QueryNFTsRequest { - classId: string; - owner: string; - pagination: PageRequest | undefined; -} -export interface QueryNFTsRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTsRequest"; - value: Uint8Array; -} -/** QueryNFTstRequest is the request type for the Query/NFTs RPC method */ -export interface QueryNFTsRequestAmino { - class_id: string; - owner: string; - pagination?: PageRequestAmino | undefined; -} -export interface QueryNFTsRequestAminoMsg { - type: "cosmos-sdk/QueryNFTsRequest"; - value: QueryNFTsRequestAmino; -} -/** QueryNFTstRequest is the request type for the Query/NFTs RPC method */ -export interface QueryNFTsRequestSDKType { - class_id: string; - owner: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryNFTsResponse is the response type for the Query/NFTs RPC methods */ -export interface QueryNFTsResponse { - nfts: NFT[]; - pagination: PageResponse | undefined; -} -export interface QueryNFTsResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTsResponse"; - value: Uint8Array; -} -/** QueryNFTsResponse is the response type for the Query/NFTs RPC methods */ -export interface QueryNFTsResponseAmino { - nfts: NFTAmino[]; - pagination?: PageResponseAmino | undefined; -} -export interface QueryNFTsResponseAminoMsg { - type: "cosmos-sdk/QueryNFTsResponse"; - value: QueryNFTsResponseAmino; -} -/** QueryNFTsResponse is the response type for the Query/NFTs RPC methods */ -export interface QueryNFTsResponseSDKType { - nfts: NFTSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryNFTRequest is the request type for the Query/NFT RPC method */ -export interface QueryNFTRequest { - classId: string; - id: string; -} -export interface QueryNFTRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTRequest"; - value: Uint8Array; -} -/** QueryNFTRequest is the request type for the Query/NFT RPC method */ -export interface QueryNFTRequestAmino { - class_id: string; - id: string; -} -export interface QueryNFTRequestAminoMsg { - type: "cosmos-sdk/QueryNFTRequest"; - value: QueryNFTRequestAmino; -} -/** QueryNFTRequest is the request type for the Query/NFT RPC method */ -export interface QueryNFTRequestSDKType { - class_id: string; - id: string; -} -/** QueryNFTResponse is the response type for the Query/NFT RPC method */ -export interface QueryNFTResponse { - nft: NFT | undefined; -} -export interface QueryNFTResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTResponse"; - value: Uint8Array; -} -/** QueryNFTResponse is the response type for the Query/NFT RPC method */ -export interface QueryNFTResponseAmino { - nft?: NFTAmino | undefined; -} -export interface QueryNFTResponseAminoMsg { - type: "cosmos-sdk/QueryNFTResponse"; - value: QueryNFTResponseAmino; -} -/** QueryNFTResponse is the response type for the Query/NFT RPC method */ -export interface QueryNFTResponseSDKType { - nft: NFTSDKType | undefined; -} -/** QueryClassRequest is the request type for the Query/Class RPC method */ -export interface QueryClassRequest { - classId: string; -} -export interface QueryClassRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryClassRequest"; - value: Uint8Array; -} -/** QueryClassRequest is the request type for the Query/Class RPC method */ -export interface QueryClassRequestAmino { - class_id: string; -} -export interface QueryClassRequestAminoMsg { - type: "cosmos-sdk/QueryClassRequest"; - value: QueryClassRequestAmino; -} -/** QueryClassRequest is the request type for the Query/Class RPC method */ -export interface QueryClassRequestSDKType { - class_id: string; -} -/** QueryClassResponse is the response type for the Query/Class RPC method */ -export interface QueryClassResponse { - class: Class | undefined; -} -export interface QueryClassResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryClassResponse"; - value: Uint8Array; -} -/** QueryClassResponse is the response type for the Query/Class RPC method */ -export interface QueryClassResponseAmino { - class?: ClassAmino | undefined; -} -export interface QueryClassResponseAminoMsg { - type: "cosmos-sdk/QueryClassResponse"; - value: QueryClassResponseAmino; -} -/** QueryClassResponse is the response type for the Query/Class RPC method */ -export interface QueryClassResponseSDKType { - class: ClassSDKType | undefined; -} -/** QueryClassesRequest is the request type for the Query/Classes RPC method */ -export interface QueryClassesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryClassesRequestProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryClassesRequest"; - value: Uint8Array; -} -/** QueryClassesRequest is the request type for the Query/Classes RPC method */ -export interface QueryClassesRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryClassesRequestAminoMsg { - type: "cosmos-sdk/QueryClassesRequest"; - value: QueryClassesRequestAmino; -} -/** QueryClassesRequest is the request type for the Query/Classes RPC method */ -export interface QueryClassesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** QueryClassesResponse is the response type for the Query/Classes RPC method */ -export interface QueryClassesResponse { - classes: Class[]; - pagination: PageResponse | undefined; -} -export interface QueryClassesResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.QueryClassesResponse"; - value: Uint8Array; -} -/** QueryClassesResponse is the response type for the Query/Classes RPC method */ -export interface QueryClassesResponseAmino { - classes: ClassAmino[]; - pagination?: PageResponseAmino | undefined; -} -export interface QueryClassesResponseAminoMsg { - type: "cosmos-sdk/QueryClassesResponse"; - value: QueryClassesResponseAmino; -} -/** QueryClassesResponse is the response type for the Query/Classes RPC method */ -export interface QueryClassesResponseSDKType { - classes: ClassSDKType[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryBalanceRequest(): QueryBalanceRequest { - return { - classId: "", - owner: "" - }; -} -export const QueryBalanceRequest = { - typeUrl: "/cosmos.nft.v1beta1.QueryBalanceRequest", - aminoType: "cosmos-sdk/QueryBalanceRequest", - encode(message: QueryBalanceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryBalanceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBalanceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryBalanceRequest { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: QueryBalanceRequest): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): QueryBalanceRequest { - const message = createBaseQueryBalanceRequest(); - message.classId = object.classId ?? ""; - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: QueryBalanceRequestSDKType): QueryBalanceRequest { - return { - classId: object?.class_id, - owner: object?.owner - }; - }, - toSDK(message: QueryBalanceRequest): QueryBalanceRequestSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: QueryBalanceRequestAmino): QueryBalanceRequest { - return { - classId: object.class_id, - owner: object.owner - }; - }, - toAmino(message: QueryBalanceRequest): QueryBalanceRequestAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: QueryBalanceRequestAminoMsg): QueryBalanceRequest { - return QueryBalanceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryBalanceRequest): QueryBalanceRequestAminoMsg { - return { - type: "cosmos-sdk/QueryBalanceRequest", - value: QueryBalanceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryBalanceRequestProtoMsg): QueryBalanceRequest { - return QueryBalanceRequest.decode(message.value); - }, - toProto(message: QueryBalanceRequest): Uint8Array { - return QueryBalanceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryBalanceRequest): QueryBalanceRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryBalanceRequest", - value: QueryBalanceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryBalanceResponse(): QueryBalanceResponse { - return { - amount: BigInt(0) - }; -} -export const QueryBalanceResponse = { - typeUrl: "/cosmos.nft.v1beta1.QueryBalanceResponse", - aminoType: "cosmos-sdk/QueryBalanceResponse", - encode(message: QueryBalanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.amount !== BigInt(0)) { - writer.uint32(8).uint64(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryBalanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBalanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryBalanceResponse { - return { - amount: isSet(object.amount) ? BigInt(object.amount.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryBalanceResponse): unknown { - const obj: any = {}; - message.amount !== undefined && (obj.amount = (message.amount || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryBalanceResponse { - const message = createBaseQueryBalanceResponse(); - message.amount = object.amount !== undefined && object.amount !== null ? BigInt(object.amount.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryBalanceResponseSDKType): QueryBalanceResponse { - return { - amount: object?.amount - }; - }, - toSDK(message: QueryBalanceResponse): QueryBalanceResponseSDKType { - const obj: any = {}; - obj.amount = message.amount; - return obj; - }, - fromAmino(object: QueryBalanceResponseAmino): QueryBalanceResponse { - return { - amount: BigInt(object.amount) - }; - }, - toAmino(message: QueryBalanceResponse): QueryBalanceResponseAmino { - const obj: any = {}; - obj.amount = message.amount ? message.amount.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryBalanceResponseAminoMsg): QueryBalanceResponse { - return QueryBalanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryBalanceResponse): QueryBalanceResponseAminoMsg { - return { - type: "cosmos-sdk/QueryBalanceResponse", - value: QueryBalanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryBalanceResponseProtoMsg): QueryBalanceResponse { - return QueryBalanceResponse.decode(message.value); - }, - toProto(message: QueryBalanceResponse): Uint8Array { - return QueryBalanceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryBalanceResponse): QueryBalanceResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryBalanceResponse", - value: QueryBalanceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryOwnerRequest(): QueryOwnerRequest { - return { - classId: "", - id: "" - }; -} -export const QueryOwnerRequest = { - typeUrl: "/cosmos.nft.v1beta1.QueryOwnerRequest", - aminoType: "cosmos-sdk/QueryOwnerRequest", - encode(message: QueryOwnerRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryOwnerRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryOwnerRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryOwnerRequest { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "" - }; - }, - toJSON(message: QueryOwnerRequest): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - return obj; - }, - fromPartial(object: DeepPartial): QueryOwnerRequest { - const message = createBaseQueryOwnerRequest(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - return message; - }, - fromSDK(object: QueryOwnerRequestSDKType): QueryOwnerRequest { - return { - classId: object?.class_id, - id: object?.id - }; - }, - toSDK(message: QueryOwnerRequest): QueryOwnerRequestSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - return obj; - }, - fromAmino(object: QueryOwnerRequestAmino): QueryOwnerRequest { - return { - classId: object.class_id, - id: object.id - }; - }, - toAmino(message: QueryOwnerRequest): QueryOwnerRequestAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - return obj; - }, - fromAminoMsg(object: QueryOwnerRequestAminoMsg): QueryOwnerRequest { - return QueryOwnerRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryOwnerRequest): QueryOwnerRequestAminoMsg { - return { - type: "cosmos-sdk/QueryOwnerRequest", - value: QueryOwnerRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryOwnerRequestProtoMsg): QueryOwnerRequest { - return QueryOwnerRequest.decode(message.value); - }, - toProto(message: QueryOwnerRequest): Uint8Array { - return QueryOwnerRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryOwnerRequest): QueryOwnerRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryOwnerRequest", - value: QueryOwnerRequest.encode(message).finish() - }; - } -}; -function createBaseQueryOwnerResponse(): QueryOwnerResponse { - return { - owner: "" - }; -} -export const QueryOwnerResponse = { - typeUrl: "/cosmos.nft.v1beta1.QueryOwnerResponse", - aminoType: "cosmos-sdk/QueryOwnerResponse", - encode(message: QueryOwnerResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryOwnerResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryOwnerResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryOwnerResponse { - return { - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: QueryOwnerResponse): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): QueryOwnerResponse { - const message = createBaseQueryOwnerResponse(); - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: QueryOwnerResponseSDKType): QueryOwnerResponse { - return { - owner: object?.owner - }; - }, - toSDK(message: QueryOwnerResponse): QueryOwnerResponseSDKType { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: QueryOwnerResponseAmino): QueryOwnerResponse { - return { - owner: object.owner - }; - }, - toAmino(message: QueryOwnerResponse): QueryOwnerResponseAmino { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: QueryOwnerResponseAminoMsg): QueryOwnerResponse { - return QueryOwnerResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryOwnerResponse): QueryOwnerResponseAminoMsg { - return { - type: "cosmos-sdk/QueryOwnerResponse", - value: QueryOwnerResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryOwnerResponseProtoMsg): QueryOwnerResponse { - return QueryOwnerResponse.decode(message.value); - }, - toProto(message: QueryOwnerResponse): Uint8Array { - return QueryOwnerResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryOwnerResponse): QueryOwnerResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryOwnerResponse", - value: QueryOwnerResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySupplyRequest(): QuerySupplyRequest { - return { - classId: "" - }; -} -export const QuerySupplyRequest = { - typeUrl: "/cosmos.nft.v1beta1.QuerySupplyRequest", - aminoType: "cosmos-sdk/QuerySupplyRequest", - encode(message: QuerySupplyRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySupplyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySupplyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySupplyRequest { - return { - classId: isSet(object.classId) ? String(object.classId) : "" - }; - }, - toJSON(message: QuerySupplyRequest): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - return obj; - }, - fromPartial(object: DeepPartial): QuerySupplyRequest { - const message = createBaseQuerySupplyRequest(); - message.classId = object.classId ?? ""; - return message; - }, - fromSDK(object: QuerySupplyRequestSDKType): QuerySupplyRequest { - return { - classId: object?.class_id - }; - }, - toSDK(message: QuerySupplyRequest): QuerySupplyRequestSDKType { - const obj: any = {}; - obj.class_id = message.classId; - return obj; - }, - fromAmino(object: QuerySupplyRequestAmino): QuerySupplyRequest { - return { - classId: object.class_id - }; - }, - toAmino(message: QuerySupplyRequest): QuerySupplyRequestAmino { - const obj: any = {}; - obj.class_id = message.classId; - return obj; - }, - fromAminoMsg(object: QuerySupplyRequestAminoMsg): QuerySupplyRequest { - return QuerySupplyRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySupplyRequest): QuerySupplyRequestAminoMsg { - return { - type: "cosmos-sdk/QuerySupplyRequest", - value: QuerySupplyRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySupplyRequestProtoMsg): QuerySupplyRequest { - return QuerySupplyRequest.decode(message.value); - }, - toProto(message: QuerySupplyRequest): Uint8Array { - return QuerySupplyRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySupplyRequest): QuerySupplyRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QuerySupplyRequest", - value: QuerySupplyRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySupplyResponse(): QuerySupplyResponse { - return { - amount: BigInt(0) - }; -} -export const QuerySupplyResponse = { - typeUrl: "/cosmos.nft.v1beta1.QuerySupplyResponse", - aminoType: "cosmos-sdk/QuerySupplyResponse", - encode(message: QuerySupplyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.amount !== BigInt(0)) { - writer.uint32(8).uint64(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySupplyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySupplyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySupplyResponse { - return { - amount: isSet(object.amount) ? BigInt(object.amount.toString()) : BigInt(0) - }; - }, - toJSON(message: QuerySupplyResponse): unknown { - const obj: any = {}; - message.amount !== undefined && (obj.amount = (message.amount || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QuerySupplyResponse { - const message = createBaseQuerySupplyResponse(); - message.amount = object.amount !== undefined && object.amount !== null ? BigInt(object.amount.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QuerySupplyResponseSDKType): QuerySupplyResponse { - return { - amount: object?.amount - }; - }, - toSDK(message: QuerySupplyResponse): QuerySupplyResponseSDKType { - const obj: any = {}; - obj.amount = message.amount; - return obj; - }, - fromAmino(object: QuerySupplyResponseAmino): QuerySupplyResponse { - return { - amount: BigInt(object.amount) - }; - }, - toAmino(message: QuerySupplyResponse): QuerySupplyResponseAmino { - const obj: any = {}; - obj.amount = message.amount ? message.amount.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QuerySupplyResponseAminoMsg): QuerySupplyResponse { - return QuerySupplyResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySupplyResponse): QuerySupplyResponseAminoMsg { - return { - type: "cosmos-sdk/QuerySupplyResponse", - value: QuerySupplyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySupplyResponseProtoMsg): QuerySupplyResponse { - return QuerySupplyResponse.decode(message.value); - }, - toProto(message: QuerySupplyResponse): Uint8Array { - return QuerySupplyResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySupplyResponse): QuerySupplyResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QuerySupplyResponse", - value: QuerySupplyResponse.encode(message).finish() - }; - } -}; -function createBaseQueryNFTsRequest(): QueryNFTsRequest { - return { - classId: "", - owner: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryNFTsRequest = { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTsRequest", - aminoType: "cosmos-sdk/QueryNFTsRequest", - encode(message: QueryNFTsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNFTsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.owner = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNFTsRequest { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - owner: isSet(object.owner) ? String(object.owner) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryNFTsRequest): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.owner !== undefined && (obj.owner = message.owner); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryNFTsRequest { - const message = createBaseQueryNFTsRequest(); - message.classId = object.classId ?? ""; - message.owner = object.owner ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryNFTsRequestSDKType): QueryNFTsRequest { - return { - classId: object?.class_id, - owner: object?.owner, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryNFTsRequest): QueryNFTsRequestSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.owner = message.owner; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryNFTsRequestAmino): QueryNFTsRequest { - return { - classId: object.class_id, - owner: object.owner, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryNFTsRequest): QueryNFTsRequestAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.owner = message.owner; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryNFTsRequestAminoMsg): QueryNFTsRequest { - return QueryNFTsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryNFTsRequest): QueryNFTsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryNFTsRequest", - value: QueryNFTsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNFTsRequestProtoMsg): QueryNFTsRequest { - return QueryNFTsRequest.decode(message.value); - }, - toProto(message: QueryNFTsRequest): Uint8Array { - return QueryNFTsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryNFTsRequest): QueryNFTsRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTsRequest", - value: QueryNFTsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryNFTsResponse(): QueryNFTsResponse { - return { - nfts: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryNFTsResponse = { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTsResponse", - aminoType: "cosmos-sdk/QueryNFTsResponse", - encode(message: QueryNFTsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.nfts) { - NFT.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNFTsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nfts.push(NFT.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNFTsResponse { - return { - nfts: Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryNFTsResponse): unknown { - const obj: any = {}; - if (message.nfts) { - obj.nfts = message.nfts.map(e => e ? NFT.toJSON(e) : undefined); - } else { - obj.nfts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryNFTsResponse { - const message = createBaseQueryNFTsResponse(); - message.nfts = object.nfts?.map(e => NFT.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryNFTsResponseSDKType): QueryNFTsResponse { - return { - nfts: Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryNFTsResponse): QueryNFTsResponseSDKType { - const obj: any = {}; - if (message.nfts) { - obj.nfts = message.nfts.map(e => e ? NFT.toSDK(e) : undefined); - } else { - obj.nfts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryNFTsResponseAmino): QueryNFTsResponse { - return { - nfts: Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryNFTsResponse): QueryNFTsResponseAmino { - const obj: any = {}; - if (message.nfts) { - obj.nfts = message.nfts.map(e => e ? NFT.toAmino(e) : undefined); - } else { - obj.nfts = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryNFTsResponseAminoMsg): QueryNFTsResponse { - return QueryNFTsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryNFTsResponse): QueryNFTsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryNFTsResponse", - value: QueryNFTsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNFTsResponseProtoMsg): QueryNFTsResponse { - return QueryNFTsResponse.decode(message.value); - }, - toProto(message: QueryNFTsResponse): Uint8Array { - return QueryNFTsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryNFTsResponse): QueryNFTsResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTsResponse", - value: QueryNFTsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryNFTRequest(): QueryNFTRequest { - return { - classId: "", - id: "" - }; -} -export const QueryNFTRequest = { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTRequest", - aminoType: "cosmos-sdk/QueryNFTRequest", - encode(message: QueryNFTRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNFTRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNFTRequest { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "" - }; - }, - toJSON(message: QueryNFTRequest): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - return obj; - }, - fromPartial(object: DeepPartial): QueryNFTRequest { - const message = createBaseQueryNFTRequest(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - return message; - }, - fromSDK(object: QueryNFTRequestSDKType): QueryNFTRequest { - return { - classId: object?.class_id, - id: object?.id - }; - }, - toSDK(message: QueryNFTRequest): QueryNFTRequestSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - return obj; - }, - fromAmino(object: QueryNFTRequestAmino): QueryNFTRequest { - return { - classId: object.class_id, - id: object.id - }; - }, - toAmino(message: QueryNFTRequest): QueryNFTRequestAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - return obj; - }, - fromAminoMsg(object: QueryNFTRequestAminoMsg): QueryNFTRequest { - return QueryNFTRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryNFTRequest): QueryNFTRequestAminoMsg { - return { - type: "cosmos-sdk/QueryNFTRequest", - value: QueryNFTRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNFTRequestProtoMsg): QueryNFTRequest { - return QueryNFTRequest.decode(message.value); - }, - toProto(message: QueryNFTRequest): Uint8Array { - return QueryNFTRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryNFTRequest): QueryNFTRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTRequest", - value: QueryNFTRequest.encode(message).finish() - }; - } -}; -function createBaseQueryNFTResponse(): QueryNFTResponse { - return { - nft: NFT.fromPartial({}) - }; -} -export const QueryNFTResponse = { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTResponse", - aminoType: "cosmos-sdk/QueryNFTResponse", - encode(message: QueryNFTResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.nft !== undefined) { - NFT.encode(message.nft, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNFTResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nft = NFT.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNFTResponse { - return { - nft: isSet(object.nft) ? NFT.fromJSON(object.nft) : undefined - }; - }, - toJSON(message: QueryNFTResponse): unknown { - const obj: any = {}; - message.nft !== undefined && (obj.nft = message.nft ? NFT.toJSON(message.nft) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryNFTResponse { - const message = createBaseQueryNFTResponse(); - message.nft = object.nft !== undefined && object.nft !== null ? NFT.fromPartial(object.nft) : undefined; - return message; - }, - fromSDK(object: QueryNFTResponseSDKType): QueryNFTResponse { - return { - nft: object.nft ? NFT.fromSDK(object.nft) : undefined - }; - }, - toSDK(message: QueryNFTResponse): QueryNFTResponseSDKType { - const obj: any = {}; - message.nft !== undefined && (obj.nft = message.nft ? NFT.toSDK(message.nft) : undefined); - return obj; - }, - fromAmino(object: QueryNFTResponseAmino): QueryNFTResponse { - return { - nft: object?.nft ? NFT.fromAmino(object.nft) : undefined - }; - }, - toAmino(message: QueryNFTResponse): QueryNFTResponseAmino { - const obj: any = {}; - obj.nft = message.nft ? NFT.toAmino(message.nft) : undefined; - return obj; - }, - fromAminoMsg(object: QueryNFTResponseAminoMsg): QueryNFTResponse { - return QueryNFTResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryNFTResponse): QueryNFTResponseAminoMsg { - return { - type: "cosmos-sdk/QueryNFTResponse", - value: QueryNFTResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNFTResponseProtoMsg): QueryNFTResponse { - return QueryNFTResponse.decode(message.value); - }, - toProto(message: QueryNFTResponse): Uint8Array { - return QueryNFTResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryNFTResponse): QueryNFTResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryNFTResponse", - value: QueryNFTResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClassRequest(): QueryClassRequest { - return { - classId: "" - }; -} -export const QueryClassRequest = { - typeUrl: "/cosmos.nft.v1beta1.QueryClassRequest", - aminoType: "cosmos-sdk/QueryClassRequest", - encode(message: QueryClassRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClassRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClassRequest { - return { - classId: isSet(object.classId) ? String(object.classId) : "" - }; - }, - toJSON(message: QueryClassRequest): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - return obj; - }, - fromPartial(object: DeepPartial): QueryClassRequest { - const message = createBaseQueryClassRequest(); - message.classId = object.classId ?? ""; - return message; - }, - fromSDK(object: QueryClassRequestSDKType): QueryClassRequest { - return { - classId: object?.class_id - }; - }, - toSDK(message: QueryClassRequest): QueryClassRequestSDKType { - const obj: any = {}; - obj.class_id = message.classId; - return obj; - }, - fromAmino(object: QueryClassRequestAmino): QueryClassRequest { - return { - classId: object.class_id - }; - }, - toAmino(message: QueryClassRequest): QueryClassRequestAmino { - const obj: any = {}; - obj.class_id = message.classId; - return obj; - }, - fromAminoMsg(object: QueryClassRequestAminoMsg): QueryClassRequest { - return QueryClassRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClassRequest): QueryClassRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClassRequest", - value: QueryClassRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClassRequestProtoMsg): QueryClassRequest { - return QueryClassRequest.decode(message.value); - }, - toProto(message: QueryClassRequest): Uint8Array { - return QueryClassRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClassRequest): QueryClassRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryClassRequest", - value: QueryClassRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClassResponse(): QueryClassResponse { - return { - class: Class.fromPartial({}) - }; -} -export const QueryClassResponse = { - typeUrl: "/cosmos.nft.v1beta1.QueryClassResponse", - aminoType: "cosmos-sdk/QueryClassResponse", - encode(message: QueryClassResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.class !== undefined) { - Class.encode(message.class, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClassResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.class = Class.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClassResponse { - return { - class: isSet(object.class) ? Class.fromJSON(object.class) : undefined - }; - }, - toJSON(message: QueryClassResponse): unknown { - const obj: any = {}; - message.class !== undefined && (obj.class = message.class ? Class.toJSON(message.class) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClassResponse { - const message = createBaseQueryClassResponse(); - message.class = object.class !== undefined && object.class !== null ? Class.fromPartial(object.class) : undefined; - return message; - }, - fromSDK(object: QueryClassResponseSDKType): QueryClassResponse { - return { - class: object.class ? Class.fromSDK(object.class) : undefined - }; - }, - toSDK(message: QueryClassResponse): QueryClassResponseSDKType { - const obj: any = {}; - message.class !== undefined && (obj.class = message.class ? Class.toSDK(message.class) : undefined); - return obj; - }, - fromAmino(object: QueryClassResponseAmino): QueryClassResponse { - return { - class: object?.class ? Class.fromAmino(object.class) : undefined - }; - }, - toAmino(message: QueryClassResponse): QueryClassResponseAmino { - const obj: any = {}; - obj.class = message.class ? Class.toAmino(message.class) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClassResponseAminoMsg): QueryClassResponse { - return QueryClassResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClassResponse): QueryClassResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClassResponse", - value: QueryClassResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClassResponseProtoMsg): QueryClassResponse { - return QueryClassResponse.decode(message.value); - }, - toProto(message: QueryClassResponse): Uint8Array { - return QueryClassResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClassResponse): QueryClassResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryClassResponse", - value: QueryClassResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClassesRequest(): QueryClassesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryClassesRequest = { - typeUrl: "/cosmos.nft.v1beta1.QueryClassesRequest", - aminoType: "cosmos-sdk/QueryClassesRequest", - encode(message: QueryClassesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClassesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClassesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryClassesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClassesRequest { - const message = createBaseQueryClassesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryClassesRequestSDKType): QueryClassesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryClassesRequest): QueryClassesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryClassesRequestAmino): QueryClassesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryClassesRequest): QueryClassesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClassesRequestAminoMsg): QueryClassesRequest { - return QueryClassesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClassesRequest): QueryClassesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClassesRequest", - value: QueryClassesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClassesRequestProtoMsg): QueryClassesRequest { - return QueryClassesRequest.decode(message.value); - }, - toProto(message: QueryClassesRequest): Uint8Array { - return QueryClassesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClassesRequest): QueryClassesRequestProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryClassesRequest", - value: QueryClassesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClassesResponse(): QueryClassesResponse { - return { - classes: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryClassesResponse = { - typeUrl: "/cosmos.nft.v1beta1.QueryClassesResponse", - aminoType: "cosmos-sdk/QueryClassesResponse", - encode(message: QueryClassesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.classes) { - Class.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClassesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classes.push(Class.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClassesResponse { - return { - classes: Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryClassesResponse): unknown { - const obj: any = {}; - if (message.classes) { - obj.classes = message.classes.map(e => e ? Class.toJSON(e) : undefined); - } else { - obj.classes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClassesResponse { - const message = createBaseQueryClassesResponse(); - message.classes = object.classes?.map(e => Class.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryClassesResponseSDKType): QueryClassesResponse { - return { - classes: Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryClassesResponse): QueryClassesResponseSDKType { - const obj: any = {}; - if (message.classes) { - obj.classes = message.classes.map(e => e ? Class.toSDK(e) : undefined); - } else { - obj.classes = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryClassesResponseAmino): QueryClassesResponse { - return { - classes: Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryClassesResponse): QueryClassesResponseAmino { - const obj: any = {}; - if (message.classes) { - obj.classes = message.classes.map(e => e ? Class.toAmino(e) : undefined); - } else { - obj.classes = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClassesResponseAminoMsg): QueryClassesResponse { - return QueryClassesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClassesResponse): QueryClassesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClassesResponse", - value: QueryClassesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClassesResponseProtoMsg): QueryClassesResponse { - return QueryClassesResponse.decode(message.value); - }, - toProto(message: QueryClassesResponse): Uint8Array { - return QueryClassesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClassesResponse): QueryClassesResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.QueryClassesResponse", - value: QueryClassesResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.amino.ts deleted file mode 100644 index a10e415f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.amino.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MsgSend } from "./tx"; -export const AminoConverter = { - "/cosmos.nft.v1beta1.MsgSend": { - aminoType: "cosmos-sdk/MsgNFTSend", - toAmino: MsgSend.toAmino, - fromAmino: MsgSend.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.registry.ts deleted file mode 100644 index 3dd6b8ea..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.registry.ts +++ /dev/null @@ -1,51 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSend } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.nft.v1beta1.MsgSend", MsgSend]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - value: MsgSend.encode(value).finish() - }; - } - }, - withTypeUrl: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - value - }; - } - }, - toJSON: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - value: MsgSend.toJSON(value) - }; - } - }, - fromJSON: { - send(value: any) { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - value: MsgSend.fromJSON(value) - }; - } - }, - fromPartial: { - send(value: MsgSend) { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - value: MsgSend.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 54618192..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSend, MsgSendResponse } from "./tx"; -/** Msg defines the nft Msg service. */ -export interface Msg { - /** Send defines a method to send a nft from one account to another account. */ - send(request: MsgSend): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.send = this.send.bind(this); - } - send(request: MsgSend): Promise { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request("cosmos.nft.v1beta1.Msg", "Send", data); - return promise.then(data => MsgSendResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.ts deleted file mode 100644 index 1a8606d5..00000000 --- a/examples/interchainjs/src/codegen/cosmos/nft/v1beta1/tx.ts +++ /dev/null @@ -1,253 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** MsgSend represents a message to send a nft from one account to another account. */ -export interface MsgSend { - /** class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 */ - classId: string; - /** id defines the unique identification of nft */ - id: string; - /** sender is the address of the owner of nft */ - sender: string; - /** receiver is the receiver address of nft */ - receiver: string; -} -export interface MsgSendProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.MsgSend"; - value: Uint8Array; -} -/** MsgSend represents a message to send a nft from one account to another account. */ -export interface MsgSendAmino { - /** class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 */ - class_id: string; - /** id defines the unique identification of nft */ - id: string; - /** sender is the address of the owner of nft */ - sender: string; - /** receiver is the receiver address of nft */ - receiver: string; -} -export interface MsgSendAminoMsg { - type: "cosmos-sdk/MsgNFTSend"; - value: MsgSendAmino; -} -/** MsgSend represents a message to send a nft from one account to another account. */ -export interface MsgSendSDKType { - class_id: string; - id: string; - sender: string; - receiver: string; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse {} -export interface MsgSendResponseProtoMsg { - typeUrl: "/cosmos.nft.v1beta1.MsgSendResponse"; - value: Uint8Array; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponseAmino {} -export interface MsgSendResponseAminoMsg { - type: "cosmos-sdk/MsgSendResponse"; - value: MsgSendResponseAmino; -} -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponseSDKType {} -function createBaseMsgSend(): MsgSend { - return { - classId: "", - id: "", - sender: "", - receiver: "" - }; -} -export const MsgSend = { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - aminoType: "cosmos-sdk/MsgNFTSend", - encode(message: MsgSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.classId !== "") { - writer.uint32(10).string(message.classId); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSend { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.classId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSend { - return { - classId: isSet(object.classId) ? String(object.classId) : "", - id: isSet(object.id) ? String(object.id) : "", - sender: isSet(object.sender) ? String(object.sender) : "", - receiver: isSet(object.receiver) ? String(object.receiver) : "" - }; - }, - toJSON(message: MsgSend): unknown { - const obj: any = {}; - message.classId !== undefined && (obj.classId = message.classId); - message.id !== undefined && (obj.id = message.id); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - fromPartial(object: DeepPartial): MsgSend { - const message = createBaseMsgSend(); - message.classId = object.classId ?? ""; - message.id = object.id ?? ""; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; - return message; - }, - fromSDK(object: MsgSendSDKType): MsgSend { - return { - classId: object?.class_id, - id: object?.id, - sender: object?.sender, - receiver: object?.receiver - }; - }, - toSDK(message: MsgSend): MsgSendSDKType { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.sender = message.sender; - obj.receiver = message.receiver; - return obj; - }, - fromAmino(object: MsgSendAmino): MsgSend { - return { - classId: object.class_id, - id: object.id, - sender: object.sender, - receiver: object.receiver - }; - }, - toAmino(message: MsgSend): MsgSendAmino { - const obj: any = {}; - obj.class_id = message.classId; - obj.id = message.id; - obj.sender = message.sender; - obj.receiver = message.receiver; - return obj; - }, - fromAminoMsg(object: MsgSendAminoMsg): MsgSend { - return MsgSend.fromAmino(object.value); - }, - toAminoMsg(message: MsgSend): MsgSendAminoMsg { - return { - type: "cosmos-sdk/MsgNFTSend", - value: MsgSend.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSendProtoMsg): MsgSend { - return MsgSend.decode(message.value); - }, - toProto(message: MsgSend): Uint8Array { - return MsgSend.encode(message).finish(); - }, - toProtoMsg(message: MsgSend): MsgSendProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSend", - value: MsgSend.encode(message).finish() - }; - } -}; -function createBaseMsgSendResponse(): MsgSendResponse { - return {}; -} -export const MsgSendResponse = { - typeUrl: "/cosmos.nft.v1beta1.MsgSendResponse", - aminoType: "cosmos-sdk/MsgSendResponse", - encode(_: MsgSendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSendResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSendResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSendResponse { - return {}; - }, - toJSON(_: MsgSendResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSendResponse { - const message = createBaseMsgSendResponse(); - return message; - }, - fromSDK(_: MsgSendResponseSDKType): MsgSendResponse { - return {}; - }, - toSDK(_: MsgSendResponse): MsgSendResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSendResponseAmino): MsgSendResponse { - return {}; - }, - toAmino(_: MsgSendResponse): MsgSendResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSendResponseAminoMsg): MsgSendResponse { - return MsgSendResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSendResponse): MsgSendResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSendResponse", - value: MsgSendResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSendResponseProtoMsg): MsgSendResponse { - return MsgSendResponse.decode(message.value); - }, - toProto(message: MsgSendResponse): Uint8Array { - return MsgSendResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSendResponse): MsgSendResponseProtoMsg { - return { - typeUrl: "/cosmos.nft.v1beta1.MsgSendResponse", - value: MsgSendResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/orm/v1/orm.ts b/examples/interchainjs/src/codegen/cosmos/orm/v1/orm.ts deleted file mode 100644 index 46bd477b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/orm/v1/orm.ts +++ /dev/null @@ -1,663 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** TableDescriptor describes an ORM table. */ -export interface TableDescriptor { - /** primary_key defines the primary key for the table. */ - primaryKey: PrimaryKeyDescriptor | undefined; - /** index defines one or more secondary indexes. */ - index: SecondaryIndexDescriptor[]; - /** - * id is a non-zero integer ID that must be unique within the - * tables and singletons in this file. It may be deprecated in the future when this - * can be auto-generated. - */ - id: number; -} -export interface TableDescriptorProtoMsg { - typeUrl: "/cosmos.orm.v1.TableDescriptor"; - value: Uint8Array; -} -/** TableDescriptor describes an ORM table. */ -export interface TableDescriptorAmino { - /** primary_key defines the primary key for the table. */ - primary_key?: PrimaryKeyDescriptorAmino | undefined; - /** index defines one or more secondary indexes. */ - index: SecondaryIndexDescriptorAmino[]; - /** - * id is a non-zero integer ID that must be unique within the - * tables and singletons in this file. It may be deprecated in the future when this - * can be auto-generated. - */ - id: number; -} -export interface TableDescriptorAminoMsg { - type: "cosmos-sdk/TableDescriptor"; - value: TableDescriptorAmino; -} -/** TableDescriptor describes an ORM table. */ -export interface TableDescriptorSDKType { - primary_key: PrimaryKeyDescriptorSDKType | undefined; - index: SecondaryIndexDescriptorSDKType[]; - id: number; -} -/** PrimaryKeyDescriptor describes a table primary key. */ -export interface PrimaryKeyDescriptor { - /** - * fields is a comma-separated list of fields in the primary key. Spaces are - * not allowed. Supported field types, their encodings, and any applicable constraints - * are described below. - * - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that - * is suitable for sorted iteration (not varint encoding). This type is - * well-suited for small integers. - * - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that - * is suitable for sorted iteration (not varint encoding). This type is - * well-suited for small integers such as auto-incrementing sequences. - * - fixed32, fixed64 are encoded as big-endian fixed width bytes and support - * sorted iteration. These types are well-suited for encoding fixed with - * decimals as integers. - * - string's are encoded as raw bytes in terminal key segments and null-terminated - * in non-terminal segments. Null characters are thus forbidden in strings. - * string fields support sorted iteration. - * - bytes are encoded as raw bytes in terminal segments and length-prefixed - * with a 32-bit unsigned varint in non-terminal segments. - * - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with - * an encoding that enables sorted iteration. - * - google.protobuf.Timestamp and google.protobuf.Duration are encoded - * as 12 bytes using an encoding that enables sorted iteration. - * - enum fields are encoded using varint encoding and do not support sorted - * iteration. - * - bool fields are encoded as a single byte 0 or 1. - * - * All other fields types are unsupported in keys including repeated and - * oneof fields. - * - * Primary keys are prefixed by the varint encoded table id and the byte 0x0 - * plus any additional prefix specified by the schema. - */ - fields: string; - /** - * auto_increment specifies that the primary key is generated by an - * auto-incrementing integer. If this is set to true fields must only - * contain one field of that is of type uint64. - */ - autoIncrement: boolean; -} -export interface PrimaryKeyDescriptorProtoMsg { - typeUrl: "/cosmos.orm.v1.PrimaryKeyDescriptor"; - value: Uint8Array; -} -/** PrimaryKeyDescriptor describes a table primary key. */ -export interface PrimaryKeyDescriptorAmino { - /** - * fields is a comma-separated list of fields in the primary key. Spaces are - * not allowed. Supported field types, their encodings, and any applicable constraints - * are described below. - * - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that - * is suitable for sorted iteration (not varint encoding). This type is - * well-suited for small integers. - * - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that - * is suitable for sorted iteration (not varint encoding). This type is - * well-suited for small integers such as auto-incrementing sequences. - * - fixed32, fixed64 are encoded as big-endian fixed width bytes and support - * sorted iteration. These types are well-suited for encoding fixed with - * decimals as integers. - * - string's are encoded as raw bytes in terminal key segments and null-terminated - * in non-terminal segments. Null characters are thus forbidden in strings. - * string fields support sorted iteration. - * - bytes are encoded as raw bytes in terminal segments and length-prefixed - * with a 32-bit unsigned varint in non-terminal segments. - * - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with - * an encoding that enables sorted iteration. - * - google.protobuf.Timestamp and google.protobuf.Duration are encoded - * as 12 bytes using an encoding that enables sorted iteration. - * - enum fields are encoded using varint encoding and do not support sorted - * iteration. - * - bool fields are encoded as a single byte 0 or 1. - * - * All other fields types are unsupported in keys including repeated and - * oneof fields. - * - * Primary keys are prefixed by the varint encoded table id and the byte 0x0 - * plus any additional prefix specified by the schema. - */ - fields: string; - /** - * auto_increment specifies that the primary key is generated by an - * auto-incrementing integer. If this is set to true fields must only - * contain one field of that is of type uint64. - */ - auto_increment: boolean; -} -export interface PrimaryKeyDescriptorAminoMsg { - type: "cosmos-sdk/PrimaryKeyDescriptor"; - value: PrimaryKeyDescriptorAmino; -} -/** PrimaryKeyDescriptor describes a table primary key. */ -export interface PrimaryKeyDescriptorSDKType { - fields: string; - auto_increment: boolean; -} -/** PrimaryKeyDescriptor describes a table secondary index. */ -export interface SecondaryIndexDescriptor { - /** - * fields is a comma-separated list of fields in the index. The supported - * field types are the same as those for PrimaryKeyDescriptor.fields. - * Index keys are prefixed by the varint encoded table id and the varint - * encoded index id plus any additional prefix specified by the schema. - * - * In addition the the field segments, non-unique index keys are suffixed with - * any additional primary key fields not present in the index fields so that the - * primary key can be reconstructed. Unique indexes instead of being suffixed - * store the remaining primary key fields in the value.. - */ - fields: string; - /** - * id is a non-zero integer ID that must be unique within the indexes for this - * table and less than 32768. It may be deprecated in the future when this can - * be auto-generated. - */ - id: number; - /** unique specifies that this an unique index. */ - unique: boolean; -} -export interface SecondaryIndexDescriptorProtoMsg { - typeUrl: "/cosmos.orm.v1.SecondaryIndexDescriptor"; - value: Uint8Array; -} -/** PrimaryKeyDescriptor describes a table secondary index. */ -export interface SecondaryIndexDescriptorAmino { - /** - * fields is a comma-separated list of fields in the index. The supported - * field types are the same as those for PrimaryKeyDescriptor.fields. - * Index keys are prefixed by the varint encoded table id and the varint - * encoded index id plus any additional prefix specified by the schema. - * - * In addition the the field segments, non-unique index keys are suffixed with - * any additional primary key fields not present in the index fields so that the - * primary key can be reconstructed. Unique indexes instead of being suffixed - * store the remaining primary key fields in the value.. - */ - fields: string; - /** - * id is a non-zero integer ID that must be unique within the indexes for this - * table and less than 32768. It may be deprecated in the future when this can - * be auto-generated. - */ - id: number; - /** unique specifies that this an unique index. */ - unique: boolean; -} -export interface SecondaryIndexDescriptorAminoMsg { - type: "cosmos-sdk/SecondaryIndexDescriptor"; - value: SecondaryIndexDescriptorAmino; -} -/** PrimaryKeyDescriptor describes a table secondary index. */ -export interface SecondaryIndexDescriptorSDKType { - fields: string; - id: number; - unique: boolean; -} -/** TableDescriptor describes an ORM singleton table which has at most one instance. */ -export interface SingletonDescriptor { - /** - * id is a non-zero integer ID that must be unique within the - * tables and singletons in this file. It may be deprecated in the future when this - * can be auto-generated. - */ - id: number; -} -export interface SingletonDescriptorProtoMsg { - typeUrl: "/cosmos.orm.v1.SingletonDescriptor"; - value: Uint8Array; -} -/** TableDescriptor describes an ORM singleton table which has at most one instance. */ -export interface SingletonDescriptorAmino { - /** - * id is a non-zero integer ID that must be unique within the - * tables and singletons in this file. It may be deprecated in the future when this - * can be auto-generated. - */ - id: number; -} -export interface SingletonDescriptorAminoMsg { - type: "cosmos-sdk/SingletonDescriptor"; - value: SingletonDescriptorAmino; -} -/** TableDescriptor describes an ORM singleton table which has at most one instance. */ -export interface SingletonDescriptorSDKType { - id: number; -} -function createBaseTableDescriptor(): TableDescriptor { - return { - primaryKey: PrimaryKeyDescriptor.fromPartial({}), - index: [], - id: 0 - }; -} -export const TableDescriptor = { - typeUrl: "/cosmos.orm.v1.TableDescriptor", - aminoType: "cosmos-sdk/TableDescriptor", - encode(message: TableDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.primaryKey !== undefined) { - PrimaryKeyDescriptor.encode(message.primaryKey, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.index) { - SecondaryIndexDescriptor.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.id !== 0) { - writer.uint32(24).uint32(message.id); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TableDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTableDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.primaryKey = PrimaryKeyDescriptor.decode(reader, reader.uint32()); - break; - case 2: - message.index.push(SecondaryIndexDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TableDescriptor { - return { - primaryKey: isSet(object.primaryKey) ? PrimaryKeyDescriptor.fromJSON(object.primaryKey) : undefined, - index: Array.isArray(object?.index) ? object.index.map((e: any) => SecondaryIndexDescriptor.fromJSON(e)) : [], - id: isSet(object.id) ? Number(object.id) : 0 - }; - }, - toJSON(message: TableDescriptor): unknown { - const obj: any = {}; - message.primaryKey !== undefined && (obj.primaryKey = message.primaryKey ? PrimaryKeyDescriptor.toJSON(message.primaryKey) : undefined); - if (message.index) { - obj.index = message.index.map(e => e ? SecondaryIndexDescriptor.toJSON(e) : undefined); - } else { - obj.index = []; - } - message.id !== undefined && (obj.id = Math.round(message.id)); - return obj; - }, - fromPartial(object: DeepPartial): TableDescriptor { - const message = createBaseTableDescriptor(); - message.primaryKey = object.primaryKey !== undefined && object.primaryKey !== null ? PrimaryKeyDescriptor.fromPartial(object.primaryKey) : undefined; - message.index = object.index?.map(e => SecondaryIndexDescriptor.fromPartial(e)) || []; - message.id = object.id ?? 0; - return message; - }, - fromSDK(object: TableDescriptorSDKType): TableDescriptor { - return { - primaryKey: object.primary_key ? PrimaryKeyDescriptor.fromSDK(object.primary_key) : undefined, - index: Array.isArray(object?.index) ? object.index.map((e: any) => SecondaryIndexDescriptor.fromSDK(e)) : [], - id: object?.id - }; - }, - toSDK(message: TableDescriptor): TableDescriptorSDKType { - const obj: any = {}; - message.primaryKey !== undefined && (obj.primary_key = message.primaryKey ? PrimaryKeyDescriptor.toSDK(message.primaryKey) : undefined); - if (message.index) { - obj.index = message.index.map(e => e ? SecondaryIndexDescriptor.toSDK(e) : undefined); - } else { - obj.index = []; - } - obj.id = message.id; - return obj; - }, - fromAmino(object: TableDescriptorAmino): TableDescriptor { - return { - primaryKey: object?.primary_key ? PrimaryKeyDescriptor.fromAmino(object.primary_key) : undefined, - index: Array.isArray(object?.index) ? object.index.map((e: any) => SecondaryIndexDescriptor.fromAmino(e)) : [], - id: object.id - }; - }, - toAmino(message: TableDescriptor): TableDescriptorAmino { - const obj: any = {}; - obj.primary_key = message.primaryKey ? PrimaryKeyDescriptor.toAmino(message.primaryKey) : undefined; - if (message.index) { - obj.index = message.index.map(e => e ? SecondaryIndexDescriptor.toAmino(e) : undefined); - } else { - obj.index = []; - } - obj.id = message.id; - return obj; - }, - fromAminoMsg(object: TableDescriptorAminoMsg): TableDescriptor { - return TableDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: TableDescriptor): TableDescriptorAminoMsg { - return { - type: "cosmos-sdk/TableDescriptor", - value: TableDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: TableDescriptorProtoMsg): TableDescriptor { - return TableDescriptor.decode(message.value); - }, - toProto(message: TableDescriptor): Uint8Array { - return TableDescriptor.encode(message).finish(); - }, - toProtoMsg(message: TableDescriptor): TableDescriptorProtoMsg { - return { - typeUrl: "/cosmos.orm.v1.TableDescriptor", - value: TableDescriptor.encode(message).finish() - }; - } -}; -function createBasePrimaryKeyDescriptor(): PrimaryKeyDescriptor { - return { - fields: "", - autoIncrement: false - }; -} -export const PrimaryKeyDescriptor = { - typeUrl: "/cosmos.orm.v1.PrimaryKeyDescriptor", - aminoType: "cosmos-sdk/PrimaryKeyDescriptor", - encode(message: PrimaryKeyDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fields !== "") { - writer.uint32(10).string(message.fields); - } - if (message.autoIncrement === true) { - writer.uint32(16).bool(message.autoIncrement); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PrimaryKeyDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePrimaryKeyDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fields = reader.string(); - break; - case 2: - message.autoIncrement = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PrimaryKeyDescriptor { - return { - fields: isSet(object.fields) ? String(object.fields) : "", - autoIncrement: isSet(object.autoIncrement) ? Boolean(object.autoIncrement) : false - }; - }, - toJSON(message: PrimaryKeyDescriptor): unknown { - const obj: any = {}; - message.fields !== undefined && (obj.fields = message.fields); - message.autoIncrement !== undefined && (obj.autoIncrement = message.autoIncrement); - return obj; - }, - fromPartial(object: DeepPartial): PrimaryKeyDescriptor { - const message = createBasePrimaryKeyDescriptor(); - message.fields = object.fields ?? ""; - message.autoIncrement = object.autoIncrement ?? false; - return message; - }, - fromSDK(object: PrimaryKeyDescriptorSDKType): PrimaryKeyDescriptor { - return { - fields: object?.fields, - autoIncrement: object?.auto_increment - }; - }, - toSDK(message: PrimaryKeyDescriptor): PrimaryKeyDescriptorSDKType { - const obj: any = {}; - obj.fields = message.fields; - obj.auto_increment = message.autoIncrement; - return obj; - }, - fromAmino(object: PrimaryKeyDescriptorAmino): PrimaryKeyDescriptor { - return { - fields: object.fields, - autoIncrement: object.auto_increment - }; - }, - toAmino(message: PrimaryKeyDescriptor): PrimaryKeyDescriptorAmino { - const obj: any = {}; - obj.fields = message.fields; - obj.auto_increment = message.autoIncrement; - return obj; - }, - fromAminoMsg(object: PrimaryKeyDescriptorAminoMsg): PrimaryKeyDescriptor { - return PrimaryKeyDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: PrimaryKeyDescriptor): PrimaryKeyDescriptorAminoMsg { - return { - type: "cosmos-sdk/PrimaryKeyDescriptor", - value: PrimaryKeyDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: PrimaryKeyDescriptorProtoMsg): PrimaryKeyDescriptor { - return PrimaryKeyDescriptor.decode(message.value); - }, - toProto(message: PrimaryKeyDescriptor): Uint8Array { - return PrimaryKeyDescriptor.encode(message).finish(); - }, - toProtoMsg(message: PrimaryKeyDescriptor): PrimaryKeyDescriptorProtoMsg { - return { - typeUrl: "/cosmos.orm.v1.PrimaryKeyDescriptor", - value: PrimaryKeyDescriptor.encode(message).finish() - }; - } -}; -function createBaseSecondaryIndexDescriptor(): SecondaryIndexDescriptor { - return { - fields: "", - id: 0, - unique: false - }; -} -export const SecondaryIndexDescriptor = { - typeUrl: "/cosmos.orm.v1.SecondaryIndexDescriptor", - aminoType: "cosmos-sdk/SecondaryIndexDescriptor", - encode(message: SecondaryIndexDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fields !== "") { - writer.uint32(10).string(message.fields); - } - if (message.id !== 0) { - writer.uint32(16).uint32(message.id); - } - if (message.unique === true) { - writer.uint32(24).bool(message.unique); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SecondaryIndexDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecondaryIndexDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fields = reader.string(); - break; - case 2: - message.id = reader.uint32(); - break; - case 3: - message.unique = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SecondaryIndexDescriptor { - return { - fields: isSet(object.fields) ? String(object.fields) : "", - id: isSet(object.id) ? Number(object.id) : 0, - unique: isSet(object.unique) ? Boolean(object.unique) : false - }; - }, - toJSON(message: SecondaryIndexDescriptor): unknown { - const obj: any = {}; - message.fields !== undefined && (obj.fields = message.fields); - message.id !== undefined && (obj.id = Math.round(message.id)); - message.unique !== undefined && (obj.unique = message.unique); - return obj; - }, - fromPartial(object: DeepPartial): SecondaryIndexDescriptor { - const message = createBaseSecondaryIndexDescriptor(); - message.fields = object.fields ?? ""; - message.id = object.id ?? 0; - message.unique = object.unique ?? false; - return message; - }, - fromSDK(object: SecondaryIndexDescriptorSDKType): SecondaryIndexDescriptor { - return { - fields: object?.fields, - id: object?.id, - unique: object?.unique - }; - }, - toSDK(message: SecondaryIndexDescriptor): SecondaryIndexDescriptorSDKType { - const obj: any = {}; - obj.fields = message.fields; - obj.id = message.id; - obj.unique = message.unique; - return obj; - }, - fromAmino(object: SecondaryIndexDescriptorAmino): SecondaryIndexDescriptor { - return { - fields: object.fields, - id: object.id, - unique: object.unique - }; - }, - toAmino(message: SecondaryIndexDescriptor): SecondaryIndexDescriptorAmino { - const obj: any = {}; - obj.fields = message.fields; - obj.id = message.id; - obj.unique = message.unique; - return obj; - }, - fromAminoMsg(object: SecondaryIndexDescriptorAminoMsg): SecondaryIndexDescriptor { - return SecondaryIndexDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: SecondaryIndexDescriptor): SecondaryIndexDescriptorAminoMsg { - return { - type: "cosmos-sdk/SecondaryIndexDescriptor", - value: SecondaryIndexDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: SecondaryIndexDescriptorProtoMsg): SecondaryIndexDescriptor { - return SecondaryIndexDescriptor.decode(message.value); - }, - toProto(message: SecondaryIndexDescriptor): Uint8Array { - return SecondaryIndexDescriptor.encode(message).finish(); - }, - toProtoMsg(message: SecondaryIndexDescriptor): SecondaryIndexDescriptorProtoMsg { - return { - typeUrl: "/cosmos.orm.v1.SecondaryIndexDescriptor", - value: SecondaryIndexDescriptor.encode(message).finish() - }; - } -}; -function createBaseSingletonDescriptor(): SingletonDescriptor { - return { - id: 0 - }; -} -export const SingletonDescriptor = { - typeUrl: "/cosmos.orm.v1.SingletonDescriptor", - aminoType: "cosmos-sdk/SingletonDescriptor", - encode(message: SingletonDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== 0) { - writer.uint32(8).uint32(message.id); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SingletonDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSingletonDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SingletonDescriptor { - return { - id: isSet(object.id) ? Number(object.id) : 0 - }; - }, - toJSON(message: SingletonDescriptor): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = Math.round(message.id)); - return obj; - }, - fromPartial(object: DeepPartial): SingletonDescriptor { - const message = createBaseSingletonDescriptor(); - message.id = object.id ?? 0; - return message; - }, - fromSDK(object: SingletonDescriptorSDKType): SingletonDescriptor { - return { - id: object?.id - }; - }, - toSDK(message: SingletonDescriptor): SingletonDescriptorSDKType { - const obj: any = {}; - obj.id = message.id; - return obj; - }, - fromAmino(object: SingletonDescriptorAmino): SingletonDescriptor { - return { - id: object.id - }; - }, - toAmino(message: SingletonDescriptor): SingletonDescriptorAmino { - const obj: any = {}; - obj.id = message.id; - return obj; - }, - fromAminoMsg(object: SingletonDescriptorAminoMsg): SingletonDescriptor { - return SingletonDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: SingletonDescriptor): SingletonDescriptorAminoMsg { - return { - type: "cosmos-sdk/SingletonDescriptor", - value: SingletonDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: SingletonDescriptorProtoMsg): SingletonDescriptor { - return SingletonDescriptor.decode(message.value); - }, - toProto(message: SingletonDescriptor): Uint8Array { - return SingletonDescriptor.encode(message).finish(); - }, - toProtoMsg(message: SingletonDescriptor): SingletonDescriptorProtoMsg { - return { - typeUrl: "/cosmos.orm.v1.SingletonDescriptor", - value: SingletonDescriptor.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/orm/v1alpha1/schema.ts b/examples/interchainjs/src/codegen/cosmos/orm/v1alpha1/schema.ts deleted file mode 100644 index b235854b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/orm/v1alpha1/schema.ts +++ /dev/null @@ -1,402 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** StorageType */ -export enum StorageType { - /** - * STORAGE_TYPE_DEFAULT_UNSPECIFIED - STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent - * KV-storage where primary key entries are stored in merkle-tree - * backed commitment storage and indexes and seqs are stored in - * fast index storage. Note that the Cosmos SDK before store/v2alpha1 - * does not support this. - */ - STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0, - /** - * STORAGE_TYPE_MEMORY - STORAGE_TYPE_MEMORY indicates in-memory storage that will be - * reloaded every time an app restarts. Tables with this type of storage - * will by default be ignored when importing and exporting a module's - * state from JSON. - */ - STORAGE_TYPE_MEMORY = 1, - /** - * STORAGE_TYPE_TRANSIENT - STORAGE_TYPE_TRANSIENT indicates transient storage that is reset - * at the end of every block. Tables with this type of storage - * will by default be ignored when importing and exporting a module's - * state from JSON. - */ - STORAGE_TYPE_TRANSIENT = 2, - /** - * STORAGE_TYPE_INDEX - STORAGE_TYPE_INDEX indicates persistent storage which is not backed - * by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK - * before store/v2alpha1 does not support this. - */ - STORAGE_TYPE_INDEX = 3, - /** - * STORAGE_TYPE_COMMITMENT - STORAGE_TYPE_INDEX indicates persistent storage which is backed by - * a merkle-tree. With this type of storage, both primary and index keys - * will affect the app hash and this is generally less efficient - * than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index - * keys into index storage. Note that modules built with the - * Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT - * instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX - * because this is the only type of persistent storage available. - */ - STORAGE_TYPE_COMMITMENT = 4, - UNRECOGNIZED = -1, -} -export const StorageTypeSDKType = StorageType; -export const StorageTypeAmino = StorageType; -export function storageTypeFromJSON(object: any): StorageType { - switch (object) { - case 0: - case "STORAGE_TYPE_DEFAULT_UNSPECIFIED": - return StorageType.STORAGE_TYPE_DEFAULT_UNSPECIFIED; - case 1: - case "STORAGE_TYPE_MEMORY": - return StorageType.STORAGE_TYPE_MEMORY; - case 2: - case "STORAGE_TYPE_TRANSIENT": - return StorageType.STORAGE_TYPE_TRANSIENT; - case 3: - case "STORAGE_TYPE_INDEX": - return StorageType.STORAGE_TYPE_INDEX; - case 4: - case "STORAGE_TYPE_COMMITMENT": - return StorageType.STORAGE_TYPE_COMMITMENT; - case -1: - case "UNRECOGNIZED": - default: - return StorageType.UNRECOGNIZED; - } -} -export function storageTypeToJSON(object: StorageType): string { - switch (object) { - case StorageType.STORAGE_TYPE_DEFAULT_UNSPECIFIED: - return "STORAGE_TYPE_DEFAULT_UNSPECIFIED"; - case StorageType.STORAGE_TYPE_MEMORY: - return "STORAGE_TYPE_MEMORY"; - case StorageType.STORAGE_TYPE_TRANSIENT: - return "STORAGE_TYPE_TRANSIENT"; - case StorageType.STORAGE_TYPE_INDEX: - return "STORAGE_TYPE_INDEX"; - case StorageType.STORAGE_TYPE_COMMITMENT: - return "STORAGE_TYPE_COMMITMENT"; - case StorageType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ModuleSchemaDescriptor describe's a module's ORM schema. */ -export interface ModuleSchemaDescriptor { - schemaFile: ModuleSchemaDescriptor_FileEntry[]; - /** - * prefix is an optional prefix that precedes all keys in this module's - * store. - */ - prefix: Uint8Array; -} -export interface ModuleSchemaDescriptorProtoMsg { - typeUrl: "/cosmos.orm.v1alpha1.ModuleSchemaDescriptor"; - value: Uint8Array; -} -/** ModuleSchemaDescriptor describe's a module's ORM schema. */ -export interface ModuleSchemaDescriptorAmino { - schema_file: ModuleSchemaDescriptor_FileEntryAmino[]; - /** - * prefix is an optional prefix that precedes all keys in this module's - * store. - */ - prefix: Uint8Array; -} -export interface ModuleSchemaDescriptorAminoMsg { - type: "cosmos-sdk/ModuleSchemaDescriptor"; - value: ModuleSchemaDescriptorAmino; -} -/** ModuleSchemaDescriptor describe's a module's ORM schema. */ -export interface ModuleSchemaDescriptorSDKType { - schema_file: ModuleSchemaDescriptor_FileEntrySDKType[]; - prefix: Uint8Array; -} -/** FileEntry describes an ORM file used in a module. */ -export interface ModuleSchemaDescriptor_FileEntry { - /** - * id is a prefix that will be varint encoded and prepended to all the - * table keys specified in the file's tables. - */ - id: number; - /** - * proto_file_name is the name of a file .proto in that contains - * table definitions. The .proto file must be in a package that the - * module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. - */ - protoFileName: string; - /** - * storage_type optionally indicates the type of storage this file's - * tables should used. If it is left unspecified, the default KV-storage - * of the app will be used. - */ - storageType: StorageType; -} -export interface ModuleSchemaDescriptor_FileEntryProtoMsg { - typeUrl: "/cosmos.orm.v1alpha1.FileEntry"; - value: Uint8Array; -} -/** FileEntry describes an ORM file used in a module. */ -export interface ModuleSchemaDescriptor_FileEntryAmino { - /** - * id is a prefix that will be varint encoded and prepended to all the - * table keys specified in the file's tables. - */ - id: number; - /** - * proto_file_name is the name of a file .proto in that contains - * table definitions. The .proto file must be in a package that the - * module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. - */ - proto_file_name: string; - /** - * storage_type optionally indicates the type of storage this file's - * tables should used. If it is left unspecified, the default KV-storage - * of the app will be used. - */ - storage_type: StorageType; -} -export interface ModuleSchemaDescriptor_FileEntryAminoMsg { - type: "cosmos-sdk/FileEntry"; - value: ModuleSchemaDescriptor_FileEntryAmino; -} -/** FileEntry describes an ORM file used in a module. */ -export interface ModuleSchemaDescriptor_FileEntrySDKType { - id: number; - proto_file_name: string; - storage_type: StorageType; -} -function createBaseModuleSchemaDescriptor(): ModuleSchemaDescriptor { - return { - schemaFile: [], - prefix: new Uint8Array() - }; -} -export const ModuleSchemaDescriptor = { - typeUrl: "/cosmos.orm.v1alpha1.ModuleSchemaDescriptor", - aminoType: "cosmos-sdk/ModuleSchemaDescriptor", - encode(message: ModuleSchemaDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.schemaFile) { - ModuleSchemaDescriptor_FileEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.prefix.length !== 0) { - writer.uint32(18).bytes(message.prefix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleSchemaDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleSchemaDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schemaFile.push(ModuleSchemaDescriptor_FileEntry.decode(reader, reader.uint32())); - break; - case 2: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleSchemaDescriptor { - return { - schemaFile: Array.isArray(object?.schemaFile) ? object.schemaFile.map((e: any) => ModuleSchemaDescriptor_FileEntry.fromJSON(e)) : [], - prefix: isSet(object.prefix) ? bytesFromBase64(object.prefix) : new Uint8Array() - }; - }, - toJSON(message: ModuleSchemaDescriptor): unknown { - const obj: any = {}; - if (message.schemaFile) { - obj.schemaFile = message.schemaFile.map(e => e ? ModuleSchemaDescriptor_FileEntry.toJSON(e) : undefined); - } else { - obj.schemaFile = []; - } - message.prefix !== undefined && (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ModuleSchemaDescriptor { - const message = createBaseModuleSchemaDescriptor(); - message.schemaFile = object.schemaFile?.map(e => ModuleSchemaDescriptor_FileEntry.fromPartial(e)) || []; - message.prefix = object.prefix ?? new Uint8Array(); - return message; - }, - fromSDK(object: ModuleSchemaDescriptorSDKType): ModuleSchemaDescriptor { - return { - schemaFile: Array.isArray(object?.schema_file) ? object.schema_file.map((e: any) => ModuleSchemaDescriptor_FileEntry.fromSDK(e)) : [], - prefix: object?.prefix - }; - }, - toSDK(message: ModuleSchemaDescriptor): ModuleSchemaDescriptorSDKType { - const obj: any = {}; - if (message.schemaFile) { - obj.schema_file = message.schemaFile.map(e => e ? ModuleSchemaDescriptor_FileEntry.toSDK(e) : undefined); - } else { - obj.schema_file = []; - } - obj.prefix = message.prefix; - return obj; - }, - fromAmino(object: ModuleSchemaDescriptorAmino): ModuleSchemaDescriptor { - return { - schemaFile: Array.isArray(object?.schema_file) ? object.schema_file.map((e: any) => ModuleSchemaDescriptor_FileEntry.fromAmino(e)) : [], - prefix: object.prefix - }; - }, - toAmino(message: ModuleSchemaDescriptor): ModuleSchemaDescriptorAmino { - const obj: any = {}; - if (message.schemaFile) { - obj.schema_file = message.schemaFile.map(e => e ? ModuleSchemaDescriptor_FileEntry.toAmino(e) : undefined); - } else { - obj.schema_file = []; - } - obj.prefix = message.prefix; - return obj; - }, - fromAminoMsg(object: ModuleSchemaDescriptorAminoMsg): ModuleSchemaDescriptor { - return ModuleSchemaDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: ModuleSchemaDescriptor): ModuleSchemaDescriptorAminoMsg { - return { - type: "cosmos-sdk/ModuleSchemaDescriptor", - value: ModuleSchemaDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleSchemaDescriptorProtoMsg): ModuleSchemaDescriptor { - return ModuleSchemaDescriptor.decode(message.value); - }, - toProto(message: ModuleSchemaDescriptor): Uint8Array { - return ModuleSchemaDescriptor.encode(message).finish(); - }, - toProtoMsg(message: ModuleSchemaDescriptor): ModuleSchemaDescriptorProtoMsg { - return { - typeUrl: "/cosmos.orm.v1alpha1.ModuleSchemaDescriptor", - value: ModuleSchemaDescriptor.encode(message).finish() - }; - } -}; -function createBaseModuleSchemaDescriptor_FileEntry(): ModuleSchemaDescriptor_FileEntry { - return { - id: 0, - protoFileName: "", - storageType: 0 - }; -} -export const ModuleSchemaDescriptor_FileEntry = { - typeUrl: "/cosmos.orm.v1alpha1.FileEntry", - aminoType: "cosmos-sdk/FileEntry", - encode(message: ModuleSchemaDescriptor_FileEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== 0) { - writer.uint32(8).uint32(message.id); - } - if (message.protoFileName !== "") { - writer.uint32(18).string(message.protoFileName); - } - if (message.storageType !== 0) { - writer.uint32(24).int32(message.storageType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleSchemaDescriptor_FileEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleSchemaDescriptor_FileEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - case 2: - message.protoFileName = reader.string(); - break; - case 3: - message.storageType = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleSchemaDescriptor_FileEntry { - return { - id: isSet(object.id) ? Number(object.id) : 0, - protoFileName: isSet(object.protoFileName) ? String(object.protoFileName) : "", - storageType: isSet(object.storageType) ? storageTypeFromJSON(object.storageType) : -1 - }; - }, - toJSON(message: ModuleSchemaDescriptor_FileEntry): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = Math.round(message.id)); - message.protoFileName !== undefined && (obj.protoFileName = message.protoFileName); - message.storageType !== undefined && (obj.storageType = storageTypeToJSON(message.storageType)); - return obj; - }, - fromPartial(object: DeepPartial): ModuleSchemaDescriptor_FileEntry { - const message = createBaseModuleSchemaDescriptor_FileEntry(); - message.id = object.id ?? 0; - message.protoFileName = object.protoFileName ?? ""; - message.storageType = object.storageType ?? 0; - return message; - }, - fromSDK(object: ModuleSchemaDescriptor_FileEntrySDKType): ModuleSchemaDescriptor_FileEntry { - return { - id: object?.id, - protoFileName: object?.proto_file_name, - storageType: isSet(object.storage_type) ? storageTypeFromJSON(object.storage_type) : -1 - }; - }, - toSDK(message: ModuleSchemaDescriptor_FileEntry): ModuleSchemaDescriptor_FileEntrySDKType { - const obj: any = {}; - obj.id = message.id; - obj.proto_file_name = message.protoFileName; - message.storageType !== undefined && (obj.storage_type = storageTypeToJSON(message.storageType)); - return obj; - }, - fromAmino(object: ModuleSchemaDescriptor_FileEntryAmino): ModuleSchemaDescriptor_FileEntry { - return { - id: object.id, - protoFileName: object.proto_file_name, - storageType: isSet(object.storage_type) ? storageTypeFromJSON(object.storage_type) : -1 - }; - }, - toAmino(message: ModuleSchemaDescriptor_FileEntry): ModuleSchemaDescriptor_FileEntryAmino { - const obj: any = {}; - obj.id = message.id; - obj.proto_file_name = message.protoFileName; - obj.storage_type = message.storageType; - return obj; - }, - fromAminoMsg(object: ModuleSchemaDescriptor_FileEntryAminoMsg): ModuleSchemaDescriptor_FileEntry { - return ModuleSchemaDescriptor_FileEntry.fromAmino(object.value); - }, - toAminoMsg(message: ModuleSchemaDescriptor_FileEntry): ModuleSchemaDescriptor_FileEntryAminoMsg { - return { - type: "cosmos-sdk/FileEntry", - value: ModuleSchemaDescriptor_FileEntry.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleSchemaDescriptor_FileEntryProtoMsg): ModuleSchemaDescriptor_FileEntry { - return ModuleSchemaDescriptor_FileEntry.decode(message.value); - }, - toProto(message: ModuleSchemaDescriptor_FileEntry): Uint8Array { - return ModuleSchemaDescriptor_FileEntry.encode(message).finish(); - }, - toProtoMsg(message: ModuleSchemaDescriptor_FileEntry): ModuleSchemaDescriptor_FileEntryProtoMsg { - return { - typeUrl: "/cosmos.orm.v1alpha1.FileEntry", - value: ModuleSchemaDescriptor_FileEntry.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/params/v1beta1/params.ts b/examples/interchainjs/src/codegen/cosmos/params/v1beta1/params.ts deleted file mode 100644 index fb616d95..00000000 --- a/examples/interchainjs/src/codegen/cosmos/params/v1beta1/params.ts +++ /dev/null @@ -1,307 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** ParameterChangeProposal defines a proposal to change one or more parameters. */ -export interface ParameterChangeProposal { - title: string; - description: string; - changes: ParamChange[]; -} -export interface ParameterChangeProposalProtoMsg { - typeUrl: "/cosmos.params.v1beta1.ParameterChangeProposal"; - value: Uint8Array; -} -/** ParameterChangeProposal defines a proposal to change one or more parameters. */ -export interface ParameterChangeProposalAmino { - title: string; - description: string; - changes: ParamChangeAmino[]; -} -export interface ParameterChangeProposalAminoMsg { - type: "cosmos-sdk/ParameterChangeProposal"; - value: ParameterChangeProposalAmino; -} -/** ParameterChangeProposal defines a proposal to change one or more parameters. */ -export interface ParameterChangeProposalSDKType { - title: string; - description: string; - changes: ParamChangeSDKType[]; -} -/** - * ParamChange defines an individual parameter change, for use in - * ParameterChangeProposal. - */ -export interface ParamChange { - subspace: string; - key: string; - value: string; -} -export interface ParamChangeProtoMsg { - typeUrl: "/cosmos.params.v1beta1.ParamChange"; - value: Uint8Array; -} -/** - * ParamChange defines an individual parameter change, for use in - * ParameterChangeProposal. - */ -export interface ParamChangeAmino { - subspace: string; - key: string; - value: string; -} -export interface ParamChangeAminoMsg { - type: "cosmos-sdk/ParamChange"; - value: ParamChangeAmino; -} -/** - * ParamChange defines an individual parameter change, for use in - * ParameterChangeProposal. - */ -export interface ParamChangeSDKType { - subspace: string; - key: string; - value: string; -} -function createBaseParameterChangeProposal(): ParameterChangeProposal { - return { - title: "", - description: "", - changes: [] - }; -} -export const ParameterChangeProposal = { - typeUrl: "/cosmos.params.v1beta1.ParameterChangeProposal", - aminoType: "cosmos-sdk/ParameterChangeProposal", - encode(message: ParameterChangeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.changes) { - ParamChange.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ParameterChangeProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParameterChangeProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.changes.push(ParamChange.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ParameterChangeProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - changes: Array.isArray(object?.changes) ? object.changes.map((e: any) => ParamChange.fromJSON(e)) : [] - }; - }, - toJSON(message: ParameterChangeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.changes) { - obj.changes = message.changes.map(e => e ? ParamChange.toJSON(e) : undefined); - } else { - obj.changes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ParameterChangeProposal { - const message = createBaseParameterChangeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.changes = object.changes?.map(e => ParamChange.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ParameterChangeProposalSDKType): ParameterChangeProposal { - return { - title: object?.title, - description: object?.description, - changes: Array.isArray(object?.changes) ? object.changes.map((e: any) => ParamChange.fromSDK(e)) : [] - }; - }, - toSDK(message: ParameterChangeProposal): ParameterChangeProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.changes) { - obj.changes = message.changes.map(e => e ? ParamChange.toSDK(e) : undefined); - } else { - obj.changes = []; - } - return obj; - }, - fromAmino(object: ParameterChangeProposalAmino): ParameterChangeProposal { - return { - title: object.title, - description: object.description, - changes: Array.isArray(object?.changes) ? object.changes.map((e: any) => ParamChange.fromAmino(e)) : [] - }; - }, - toAmino(message: ParameterChangeProposal): ParameterChangeProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.changes) { - obj.changes = message.changes.map(e => e ? ParamChange.toAmino(e) : undefined); - } else { - obj.changes = []; - } - return obj; - }, - fromAminoMsg(object: ParameterChangeProposalAminoMsg): ParameterChangeProposal { - return ParameterChangeProposal.fromAmino(object.value); - }, - toAminoMsg(message: ParameterChangeProposal): ParameterChangeProposalAminoMsg { - return { - type: "cosmos-sdk/ParameterChangeProposal", - value: ParameterChangeProposal.toAmino(message) - }; - }, - fromProtoMsg(message: ParameterChangeProposalProtoMsg): ParameterChangeProposal { - return ParameterChangeProposal.decode(message.value); - }, - toProto(message: ParameterChangeProposal): Uint8Array { - return ParameterChangeProposal.encode(message).finish(); - }, - toProtoMsg(message: ParameterChangeProposal): ParameterChangeProposalProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.ParameterChangeProposal", - value: ParameterChangeProposal.encode(message).finish() - }; - } -}; -function createBaseParamChange(): ParamChange { - return { - subspace: "", - key: "", - value: "" - }; -} -export const ParamChange = { - typeUrl: "/cosmos.params.v1beta1.ParamChange", - aminoType: "cosmos-sdk/ParamChange", - encode(message: ParamChange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.subspace !== "") { - writer.uint32(10).string(message.subspace); - } - if (message.key !== "") { - writer.uint32(18).string(message.key); - } - if (message.value !== "") { - writer.uint32(26).string(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ParamChange { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParamChange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subspace = reader.string(); - break; - case 2: - message.key = reader.string(); - break; - case 3: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ParamChange { - return { - subspace: isSet(object.subspace) ? String(object.subspace) : "", - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "" - }; - }, - toJSON(message: ParamChange): unknown { - const obj: any = {}; - message.subspace !== undefined && (obj.subspace = message.subspace); - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object: DeepPartial): ParamChange { - const message = createBaseParamChange(); - message.subspace = object.subspace ?? ""; - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, - fromSDK(object: ParamChangeSDKType): ParamChange { - return { - subspace: object?.subspace, - key: object?.key, - value: object?.value - }; - }, - toSDK(message: ParamChange): ParamChangeSDKType { - const obj: any = {}; - obj.subspace = message.subspace; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: ParamChangeAmino): ParamChange { - return { - subspace: object.subspace, - key: object.key, - value: object.value - }; - }, - toAmino(message: ParamChange): ParamChangeAmino { - const obj: any = {}; - obj.subspace = message.subspace; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: ParamChangeAminoMsg): ParamChange { - return ParamChange.fromAmino(object.value); - }, - toAminoMsg(message: ParamChange): ParamChangeAminoMsg { - return { - type: "cosmos-sdk/ParamChange", - value: ParamChange.toAmino(message) - }; - }, - fromProtoMsg(message: ParamChangeProtoMsg): ParamChange { - return ParamChange.decode(message.value); - }, - toProto(message: ParamChange): Uint8Array { - return ParamChange.encode(message).finish(); - }, - toProtoMsg(message: ParamChange): ParamChangeProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.ParamChange", - value: ParamChange.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/params/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/params/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 46cf0207..00000000 --- a/examples/interchainjs/src/codegen/cosmos/params/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, QuerySubspacesRequest, QuerySubspacesResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Params queries a specific parameter of a module, given its subspace and - * key. - */ - params(request: QueryParamsRequest): Promise; - /** Subspaces queries for all registered subspaces and all keys for a subspace. */ - subspaces(request?: QuerySubspacesRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.subspaces = this.subspaces.bind(this); - } - params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.params.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - subspaces(request: QuerySubspacesRequest = {}): Promise { - const data = QuerySubspacesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.params.v1beta1.Query", "Subspaces", data); - return promise.then(data => QuerySubspacesResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request: QueryParamsRequest): Promise { - return queryService.params(request); - }, - subspaces(request?: QuerySubspacesRequest): Promise { - return queryService.subspaces(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request: QueryParamsRequest; -} -export interface UseSubspacesQuery extends ReactQueryParams { - request?: QuerySubspacesRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useSubspaces = ({ - request, - options - }: UseSubspacesQuery) => { - return useQuery(["subspacesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.subspaces(request); - }, options); - }; - return { - /** - * Params queries a specific parameter of a module, given its subspace and - * key. - */ - useParams, - /** Subspaces queries for all registered subspaces and all keys for a subspace. */useSubspaces - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QuerySubspacesStore { - store = new QueryStore(queryService?.subspaces); - subspaces(request: QuerySubspacesRequest) { - return this.store.getData(request); - } - } - return { - /** - * Params queries a specific parameter of a module, given its subspace and - * key. - */ - QueryParamsStore, - /** Subspaces queries for all registered subspaces and all keys for a subspace. */QuerySubspacesStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/params/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/params/v1beta1/query.ts deleted file mode 100644 index 52d27d46..00000000 --- a/examples/interchainjs/src/codegen/cosmos/params/v1beta1/query.ts +++ /dev/null @@ -1,610 +0,0 @@ -import { ParamChange, ParamChangeAmino, ParamChangeSDKType } from "./params"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest { - /** subspace defines the module to query the parameter for. */ - subspace: string; - /** key defines the key of the parameter in the subspace. */ - key: string; -} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.params.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino { - /** subspace defines the module to query the parameter for. */ - subspace: string; - /** key defines the key of the parameter in the subspace. */ - key: string; -} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType { - subspace: string; - key: string; -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** param defines the queried parameter. */ - param: ParamChange | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.params.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** param defines the queried parameter. */ - param?: ParamChangeAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - param: ParamChangeSDKType | undefined; -} -/** - * QuerySubspacesRequest defines a request type for querying for all registered - * subspaces and all keys for a subspace. - */ -export interface QuerySubspacesRequest {} -export interface QuerySubspacesRequestProtoMsg { - typeUrl: "/cosmos.params.v1beta1.QuerySubspacesRequest"; - value: Uint8Array; -} -/** - * QuerySubspacesRequest defines a request type for querying for all registered - * subspaces and all keys for a subspace. - */ -export interface QuerySubspacesRequestAmino {} -export interface QuerySubspacesRequestAminoMsg { - type: "cosmos-sdk/QuerySubspacesRequest"; - value: QuerySubspacesRequestAmino; -} -/** - * QuerySubspacesRequest defines a request type for querying for all registered - * subspaces and all keys for a subspace. - */ -export interface QuerySubspacesRequestSDKType {} -/** - * QuerySubspacesResponse defines the response types for querying for all - * registered subspaces and all keys for a subspace. - */ -export interface QuerySubspacesResponse { - subspaces: Subspace[]; -} -export interface QuerySubspacesResponseProtoMsg { - typeUrl: "/cosmos.params.v1beta1.QuerySubspacesResponse"; - value: Uint8Array; -} -/** - * QuerySubspacesResponse defines the response types for querying for all - * registered subspaces and all keys for a subspace. - */ -export interface QuerySubspacesResponseAmino { - subspaces: SubspaceAmino[]; -} -export interface QuerySubspacesResponseAminoMsg { - type: "cosmos-sdk/QuerySubspacesResponse"; - value: QuerySubspacesResponseAmino; -} -/** - * QuerySubspacesResponse defines the response types for querying for all - * registered subspaces and all keys for a subspace. - */ -export interface QuerySubspacesResponseSDKType { - subspaces: SubspaceSDKType[]; -} -/** - * Subspace defines a parameter subspace name and all the keys that exist for - * the subspace. - */ -export interface Subspace { - subspace: string; - keys: string[]; -} -export interface SubspaceProtoMsg { - typeUrl: "/cosmos.params.v1beta1.Subspace"; - value: Uint8Array; -} -/** - * Subspace defines a parameter subspace name and all the keys that exist for - * the subspace. - */ -export interface SubspaceAmino { - subspace: string; - keys: string[]; -} -export interface SubspaceAminoMsg { - type: "cosmos-sdk/Subspace"; - value: SubspaceAmino; -} -/** - * Subspace defines a parameter subspace name and all the keys that exist for - * the subspace. - */ -export interface SubspaceSDKType { - subspace: string; - keys: string[]; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return { - subspace: "", - key: "" - }; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.params.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(message: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.subspace !== "") { - writer.uint32(10).string(message.subspace); - } - if (message.key !== "") { - writer.uint32(18).string(message.key); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subspace = reader.string(); - break; - case 2: - message.key = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsRequest { - return { - subspace: isSet(object.subspace) ? String(object.subspace) : "", - key: isSet(object.key) ? String(object.key) : "" - }; - }, - toJSON(message: QueryParamsRequest): unknown { - const obj: any = {}; - message.subspace !== undefined && (obj.subspace = message.subspace); - message.key !== undefined && (obj.key = message.key); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - message.subspace = object.subspace ?? ""; - message.key = object.key ?? ""; - return message; - }, - fromSDK(object: QueryParamsRequestSDKType): QueryParamsRequest { - return { - subspace: object?.subspace, - key: object?.key - }; - }, - toSDK(message: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - obj.subspace = message.subspace; - obj.key = message.key; - return obj; - }, - fromAmino(object: QueryParamsRequestAmino): QueryParamsRequest { - return { - subspace: object.subspace, - key: object.key - }; - }, - toAmino(message: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - obj.subspace = message.subspace; - obj.key = message.key; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - param: ParamChange.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.params.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.param !== undefined) { - ParamChange.encode(message.param, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.param = ParamChange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - param: isSet(object.param) ? ParamChange.fromJSON(object.param) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.param !== undefined && (obj.param = message.param ? ParamChange.toJSON(message.param) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.param = object.param !== undefined && object.param !== null ? ParamChange.fromPartial(object.param) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - param: object.param ? ParamChange.fromSDK(object.param) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.param !== undefined && (obj.param = message.param ? ParamChange.toSDK(message.param) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - param: object?.param ? ParamChange.fromAmino(object.param) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.param = message.param ? ParamChange.toAmino(message.param) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySubspacesRequest(): QuerySubspacesRequest { - return {}; -} -export const QuerySubspacesRequest = { - typeUrl: "/cosmos.params.v1beta1.QuerySubspacesRequest", - aminoType: "cosmos-sdk/QuerySubspacesRequest", - encode(_: QuerySubspacesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySubspacesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySubspacesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QuerySubspacesRequest { - return {}; - }, - toJSON(_: QuerySubspacesRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QuerySubspacesRequest { - const message = createBaseQuerySubspacesRequest(); - return message; - }, - fromSDK(_: QuerySubspacesRequestSDKType): QuerySubspacesRequest { - return {}; - }, - toSDK(_: QuerySubspacesRequest): QuerySubspacesRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QuerySubspacesRequestAmino): QuerySubspacesRequest { - return {}; - }, - toAmino(_: QuerySubspacesRequest): QuerySubspacesRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QuerySubspacesRequestAminoMsg): QuerySubspacesRequest { - return QuerySubspacesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySubspacesRequest): QuerySubspacesRequestAminoMsg { - return { - type: "cosmos-sdk/QuerySubspacesRequest", - value: QuerySubspacesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySubspacesRequestProtoMsg): QuerySubspacesRequest { - return QuerySubspacesRequest.decode(message.value); - }, - toProto(message: QuerySubspacesRequest): Uint8Array { - return QuerySubspacesRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySubspacesRequest): QuerySubspacesRequestProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.QuerySubspacesRequest", - value: QuerySubspacesRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySubspacesResponse(): QuerySubspacesResponse { - return { - subspaces: [] - }; -} -export const QuerySubspacesResponse = { - typeUrl: "/cosmos.params.v1beta1.QuerySubspacesResponse", - aminoType: "cosmos-sdk/QuerySubspacesResponse", - encode(message: QuerySubspacesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.subspaces) { - Subspace.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySubspacesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySubspacesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subspaces.push(Subspace.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySubspacesResponse { - return { - subspaces: Array.isArray(object?.subspaces) ? object.subspaces.map((e: any) => Subspace.fromJSON(e)) : [] - }; - }, - toJSON(message: QuerySubspacesResponse): unknown { - const obj: any = {}; - if (message.subspaces) { - obj.subspaces = message.subspaces.map(e => e ? Subspace.toJSON(e) : undefined); - } else { - obj.subspaces = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QuerySubspacesResponse { - const message = createBaseQuerySubspacesResponse(); - message.subspaces = object.subspaces?.map(e => Subspace.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QuerySubspacesResponseSDKType): QuerySubspacesResponse { - return { - subspaces: Array.isArray(object?.subspaces) ? object.subspaces.map((e: any) => Subspace.fromSDK(e)) : [] - }; - }, - toSDK(message: QuerySubspacesResponse): QuerySubspacesResponseSDKType { - const obj: any = {}; - if (message.subspaces) { - obj.subspaces = message.subspaces.map(e => e ? Subspace.toSDK(e) : undefined); - } else { - obj.subspaces = []; - } - return obj; - }, - fromAmino(object: QuerySubspacesResponseAmino): QuerySubspacesResponse { - return { - subspaces: Array.isArray(object?.subspaces) ? object.subspaces.map((e: any) => Subspace.fromAmino(e)) : [] - }; - }, - toAmino(message: QuerySubspacesResponse): QuerySubspacesResponseAmino { - const obj: any = {}; - if (message.subspaces) { - obj.subspaces = message.subspaces.map(e => e ? Subspace.toAmino(e) : undefined); - } else { - obj.subspaces = []; - } - return obj; - }, - fromAminoMsg(object: QuerySubspacesResponseAminoMsg): QuerySubspacesResponse { - return QuerySubspacesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySubspacesResponse): QuerySubspacesResponseAminoMsg { - return { - type: "cosmos-sdk/QuerySubspacesResponse", - value: QuerySubspacesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySubspacesResponseProtoMsg): QuerySubspacesResponse { - return QuerySubspacesResponse.decode(message.value); - }, - toProto(message: QuerySubspacesResponse): Uint8Array { - return QuerySubspacesResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySubspacesResponse): QuerySubspacesResponseProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.QuerySubspacesResponse", - value: QuerySubspacesResponse.encode(message).finish() - }; - } -}; -function createBaseSubspace(): Subspace { - return { - subspace: "", - keys: [] - }; -} -export const Subspace = { - typeUrl: "/cosmos.params.v1beta1.Subspace", - aminoType: "cosmos-sdk/Subspace", - encode(message: Subspace, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.subspace !== "") { - writer.uint32(10).string(message.subspace); - } - for (const v of message.keys) { - writer.uint32(18).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Subspace { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSubspace(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subspace = reader.string(); - break; - case 2: - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Subspace { - return { - subspace: isSet(object.subspace) ? String(object.subspace) : "", - keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: Subspace): unknown { - const obj: any = {}; - message.subspace !== undefined && (obj.subspace = message.subspace); - if (message.keys) { - obj.keys = message.keys.map(e => e); - } else { - obj.keys = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Subspace { - const message = createBaseSubspace(); - message.subspace = object.subspace ?? ""; - message.keys = object.keys?.map(e => e) || []; - return message; - }, - fromSDK(object: SubspaceSDKType): Subspace { - return { - subspace: object?.subspace, - keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => e) : [] - }; - }, - toSDK(message: Subspace): SubspaceSDKType { - const obj: any = {}; - obj.subspace = message.subspace; - if (message.keys) { - obj.keys = message.keys.map(e => e); - } else { - obj.keys = []; - } - return obj; - }, - fromAmino(object: SubspaceAmino): Subspace { - return { - subspace: object.subspace, - keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => e) : [] - }; - }, - toAmino(message: Subspace): SubspaceAmino { - const obj: any = {}; - obj.subspace = message.subspace; - if (message.keys) { - obj.keys = message.keys.map(e => e); - } else { - obj.keys = []; - } - return obj; - }, - fromAminoMsg(object: SubspaceAminoMsg): Subspace { - return Subspace.fromAmino(object.value); - }, - toAminoMsg(message: Subspace): SubspaceAminoMsg { - return { - type: "cosmos-sdk/Subspace", - value: Subspace.toAmino(message) - }; - }, - fromProtoMsg(message: SubspaceProtoMsg): Subspace { - return Subspace.decode(message.value); - }, - toProto(message: Subspace): Uint8Array { - return Subspace.encode(message).finish(); - }, - toProtoMsg(message: Subspace): SubspaceProtoMsg { - return { - typeUrl: "/cosmos.params.v1beta1.Subspace", - value: Subspace.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/rpc.query.ts b/examples/interchainjs/src/codegen/cosmos/rpc.query.ts deleted file mode 100644 index ac1a16a8..00000000 --- a/examples/interchainjs/src/codegen/cosmos/rpc.query.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import { QueryClient } from "@cosmjs/stargate"; -export const createRPCQueryClient = async ({ - rpcEndpoint -}: { - rpcEndpoint: string | HttpEndpoint; -}) => { - const tmClient = await Tendermint34Client.connect(rpcEndpoint); - const client = new QueryClient(tmClient); - return { - cosmos: { - app: { - v1alpha1: (await import("./app/v1alpha1/query.rpc.Query")).createRpcQueryExtension(client) - }, - auth: { - v1beta1: (await import("./auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - authz: { - v1beta1: (await import("./authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - bank: { - v1beta1: (await import("./bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - base: { - tendermint: { - v1beta1: (await import("./base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) - } - }, - distribution: { - v1beta1: (await import("./distribution/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - evidence: { - v1beta1: (await import("./evidence/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - feegrant: { - v1beta1: (await import("./feegrant/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - gov: { - v1: (await import("./gov/v1/query.rpc.Query")).createRpcQueryExtension(client), - v1beta1: (await import("./gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - group: { - v1: (await import("./group/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - mint: { - v1beta1: (await import("./mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - nft: { - v1beta1: (await import("./nft/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - params: { - v1beta1: (await import("./params/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - slashing: { - v1beta1: (await import("./slashing/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - staking: { - v1beta1: (await import("./staking/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - tx: { - v1beta1: (await import("./tx/v1beta1/service.rpc.Service")).createRpcQueryExtension(client) - }, - upgrade: { - v1beta1: (await import("./upgrade/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - } - } - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/rpc.tx.ts b/examples/interchainjs/src/codegen/cosmos/rpc.tx.ts deleted file mode 100644 index 3a4dbf9b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/rpc.tx.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Rpc } from "../helpers"; -export const createRPCMsgClient = async ({ - rpc -}: { - rpc: Rpc; -}) => ({ - cosmos: { - authz: { - v1beta1: new (await import("./authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - bank: { - v1beta1: new (await import("./bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - crisis: { - v1beta1: new (await import("./crisis/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - distribution: { - v1beta1: new (await import("./distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - evidence: { - v1beta1: new (await import("./evidence/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - feegrant: { - v1beta1: new (await import("./feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - gov: { - v1: new (await import("./gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("./gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - group: { - v1: new (await import("./group/v1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - nft: { - v1beta1: new (await import("./nft/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - slashing: { - v1beta1: new (await import("./slashing/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - staking: { - v1beta1: new (await import("./staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - upgrade: { - v1beta1: new (await import("./upgrade/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - vesting: { - v1beta1: new (await import("./vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - } - } -}); \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/genesis.ts deleted file mode 100644 index ff777338..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/genesis.ts +++ /dev/null @@ -1,595 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType, ValidatorSigningInfo, ValidatorSigningInfoAmino, ValidatorSigningInfoSDKType } from "./slashing"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * signing_infos represents a map between validator addresses and their - * signing infos. - */ - signingInfos: SigningInfo[]; - /** - * missed_blocks represents a map between validator addresses and their - * missed blocks. - */ - missedBlocks: ValidatorMissedBlocks[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisStateAmino { - /** params defines all the paramaters of related to deposit. */ - params?: ParamsAmino | undefined; - /** - * signing_infos represents a map between validator addresses and their - * signing infos. - */ - signing_infos: SigningInfoAmino[]; - /** - * missed_blocks represents a map between validator addresses and their - * missed blocks. - */ - missed_blocks: ValidatorMissedBlocksAmino[]; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the slashing module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - signing_infos: SigningInfoSDKType[]; - missed_blocks: ValidatorMissedBlocksSDKType[]; -} -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfo { - /** address is the validator address. */ - address: string; - /** validator_signing_info represents the signing info of this validator. */ - validatorSigningInfo: ValidatorSigningInfo | undefined; -} -export interface SigningInfoProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.SigningInfo"; - value: Uint8Array; -} -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfoAmino { - /** address is the validator address. */ - address: string; - /** validator_signing_info represents the signing info of this validator. */ - validator_signing_info?: ValidatorSigningInfoAmino | undefined; -} -export interface SigningInfoAminoMsg { - type: "cosmos-sdk/SigningInfo"; - value: SigningInfoAmino; -} -/** SigningInfo stores validator signing info of corresponding address. */ -export interface SigningInfoSDKType { - address: string; - validator_signing_info: ValidatorSigningInfoSDKType | undefined; -} -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocks { - /** address is the validator address. */ - address: string; - /** missed_blocks is an array of missed blocks by the validator. */ - missedBlocks: MissedBlock[]; -} -export interface ValidatorMissedBlocksProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.ValidatorMissedBlocks"; - value: Uint8Array; -} -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocksAmino { - /** address is the validator address. */ - address: string; - /** missed_blocks is an array of missed blocks by the validator. */ - missed_blocks: MissedBlockAmino[]; -} -export interface ValidatorMissedBlocksAminoMsg { - type: "cosmos-sdk/ValidatorMissedBlocks"; - value: ValidatorMissedBlocksAmino; -} -/** - * ValidatorMissedBlocks contains array of missed blocks of corresponding - * address. - */ -export interface ValidatorMissedBlocksSDKType { - address: string; - missed_blocks: MissedBlockSDKType[]; -} -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlock { - /** index is the height at which the block was missed. */ - index: bigint; - /** missed is the missed status. */ - missed: boolean; -} -export interface MissedBlockProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.MissedBlock"; - value: Uint8Array; -} -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlockAmino { - /** index is the height at which the block was missed. */ - index: string; - /** missed is the missed status. */ - missed: boolean; -} -export interface MissedBlockAminoMsg { - type: "cosmos-sdk/MissedBlock"; - value: MissedBlockAmino; -} -/** MissedBlock contains height and missed status as boolean. */ -export interface MissedBlockSDKType { - index: bigint; - missed: boolean; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - signingInfos: [], - missedBlocks: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmos.slashing.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.signingInfos) { - SigningInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.missedBlocks) { - ValidatorMissedBlocks.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.signingInfos.push(SigningInfo.decode(reader, reader.uint32())); - break; - case 3: - message.missedBlocks.push(ValidatorMissedBlocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - signingInfos: Array.isArray(object?.signingInfos) ? object.signingInfos.map((e: any) => SigningInfo.fromJSON(e)) : [], - missedBlocks: Array.isArray(object?.missedBlocks) ? object.missedBlocks.map((e: any) => ValidatorMissedBlocks.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.signingInfos) { - obj.signingInfos = message.signingInfos.map(e => e ? SigningInfo.toJSON(e) : undefined); - } else { - obj.signingInfos = []; - } - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map(e => e ? ValidatorMissedBlocks.toJSON(e) : undefined); - } else { - obj.missedBlocks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.signingInfos = object.signingInfos?.map(e => SigningInfo.fromPartial(e)) || []; - message.missedBlocks = object.missedBlocks?.map(e => ValidatorMissedBlocks.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - signingInfos: Array.isArray(object?.signing_infos) ? object.signing_infos.map((e: any) => SigningInfo.fromSDK(e)) : [], - missedBlocks: Array.isArray(object?.missed_blocks) ? object.missed_blocks.map((e: any) => ValidatorMissedBlocks.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.signingInfos) { - obj.signing_infos = message.signingInfos.map(e => e ? SigningInfo.toSDK(e) : undefined); - } else { - obj.signing_infos = []; - } - if (message.missedBlocks) { - obj.missed_blocks = message.missedBlocks.map(e => e ? ValidatorMissedBlocks.toSDK(e) : undefined); - } else { - obj.missed_blocks = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - signingInfos: Array.isArray(object?.signing_infos) ? object.signing_infos.map((e: any) => SigningInfo.fromAmino(e)) : [], - missedBlocks: Array.isArray(object?.missed_blocks) ? object.missed_blocks.map((e: any) => ValidatorMissedBlocks.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.signingInfos) { - obj.signing_infos = message.signingInfos.map(e => e ? SigningInfo.toAmino(e) : undefined); - } else { - obj.signing_infos = []; - } - if (message.missedBlocks) { - obj.missed_blocks = message.missedBlocks.map(e => e ? ValidatorMissedBlocks.toAmino(e) : undefined); - } else { - obj.missed_blocks = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseSigningInfo(): SigningInfo { - return { - address: "", - validatorSigningInfo: ValidatorSigningInfo.fromPartial({}) - }; -} -export const SigningInfo = { - typeUrl: "/cosmos.slashing.v1beta1.SigningInfo", - aminoType: "cosmos-sdk/SigningInfo", - encode(message: SigningInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.validatorSigningInfo !== undefined) { - ValidatorSigningInfo.encode(message.validatorSigningInfo, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SigningInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSigningInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.validatorSigningInfo = ValidatorSigningInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SigningInfo { - return { - address: isSet(object.address) ? String(object.address) : "", - validatorSigningInfo: isSet(object.validatorSigningInfo) ? ValidatorSigningInfo.fromJSON(object.validatorSigningInfo) : undefined - }; - }, - toJSON(message: SigningInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.validatorSigningInfo !== undefined && (obj.validatorSigningInfo = message.validatorSigningInfo ? ValidatorSigningInfo.toJSON(message.validatorSigningInfo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SigningInfo { - const message = createBaseSigningInfo(); - message.address = object.address ?? ""; - message.validatorSigningInfo = object.validatorSigningInfo !== undefined && object.validatorSigningInfo !== null ? ValidatorSigningInfo.fromPartial(object.validatorSigningInfo) : undefined; - return message; - }, - fromSDK(object: SigningInfoSDKType): SigningInfo { - return { - address: object?.address, - validatorSigningInfo: object.validator_signing_info ? ValidatorSigningInfo.fromSDK(object.validator_signing_info) : undefined - }; - }, - toSDK(message: SigningInfo): SigningInfoSDKType { - const obj: any = {}; - obj.address = message.address; - message.validatorSigningInfo !== undefined && (obj.validator_signing_info = message.validatorSigningInfo ? ValidatorSigningInfo.toSDK(message.validatorSigningInfo) : undefined); - return obj; - }, - fromAmino(object: SigningInfoAmino): SigningInfo { - return { - address: object.address, - validatorSigningInfo: object?.validator_signing_info ? ValidatorSigningInfo.fromAmino(object.validator_signing_info) : undefined - }; - }, - toAmino(message: SigningInfo): SigningInfoAmino { - const obj: any = {}; - obj.address = message.address; - obj.validator_signing_info = message.validatorSigningInfo ? ValidatorSigningInfo.toAmino(message.validatorSigningInfo) : undefined; - return obj; - }, - fromAminoMsg(object: SigningInfoAminoMsg): SigningInfo { - return SigningInfo.fromAmino(object.value); - }, - toAminoMsg(message: SigningInfo): SigningInfoAminoMsg { - return { - type: "cosmos-sdk/SigningInfo", - value: SigningInfo.toAmino(message) - }; - }, - fromProtoMsg(message: SigningInfoProtoMsg): SigningInfo { - return SigningInfo.decode(message.value); - }, - toProto(message: SigningInfo): Uint8Array { - return SigningInfo.encode(message).finish(); - }, - toProtoMsg(message: SigningInfo): SigningInfoProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.SigningInfo", - value: SigningInfo.encode(message).finish() - }; - } -}; -function createBaseValidatorMissedBlocks(): ValidatorMissedBlocks { - return { - address: "", - missedBlocks: [] - }; -} -export const ValidatorMissedBlocks = { - typeUrl: "/cosmos.slashing.v1beta1.ValidatorMissedBlocks", - aminoType: "cosmos-sdk/ValidatorMissedBlocks", - encode(message: ValidatorMissedBlocks, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.missedBlocks) { - MissedBlock.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorMissedBlocks { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorMissedBlocks(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.missedBlocks.push(MissedBlock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorMissedBlocks { - return { - address: isSet(object.address) ? String(object.address) : "", - missedBlocks: Array.isArray(object?.missedBlocks) ? object.missedBlocks.map((e: any) => MissedBlock.fromJSON(e)) : [] - }; - }, - toJSON(message: ValidatorMissedBlocks): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.missedBlocks) { - obj.missedBlocks = message.missedBlocks.map(e => e ? MissedBlock.toJSON(e) : undefined); - } else { - obj.missedBlocks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValidatorMissedBlocks { - const message = createBaseValidatorMissedBlocks(); - message.address = object.address ?? ""; - message.missedBlocks = object.missedBlocks?.map(e => MissedBlock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ValidatorMissedBlocksSDKType): ValidatorMissedBlocks { - return { - address: object?.address, - missedBlocks: Array.isArray(object?.missed_blocks) ? object.missed_blocks.map((e: any) => MissedBlock.fromSDK(e)) : [] - }; - }, - toSDK(message: ValidatorMissedBlocks): ValidatorMissedBlocksSDKType { - const obj: any = {}; - obj.address = message.address; - if (message.missedBlocks) { - obj.missed_blocks = message.missedBlocks.map(e => e ? MissedBlock.toSDK(e) : undefined); - } else { - obj.missed_blocks = []; - } - return obj; - }, - fromAmino(object: ValidatorMissedBlocksAmino): ValidatorMissedBlocks { - return { - address: object.address, - missedBlocks: Array.isArray(object?.missed_blocks) ? object.missed_blocks.map((e: any) => MissedBlock.fromAmino(e)) : [] - }; - }, - toAmino(message: ValidatorMissedBlocks): ValidatorMissedBlocksAmino { - const obj: any = {}; - obj.address = message.address; - if (message.missedBlocks) { - obj.missed_blocks = message.missedBlocks.map(e => e ? MissedBlock.toAmino(e) : undefined); - } else { - obj.missed_blocks = []; - } - return obj; - }, - fromAminoMsg(object: ValidatorMissedBlocksAminoMsg): ValidatorMissedBlocks { - return ValidatorMissedBlocks.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorMissedBlocks): ValidatorMissedBlocksAminoMsg { - return { - type: "cosmos-sdk/ValidatorMissedBlocks", - value: ValidatorMissedBlocks.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorMissedBlocksProtoMsg): ValidatorMissedBlocks { - return ValidatorMissedBlocks.decode(message.value); - }, - toProto(message: ValidatorMissedBlocks): Uint8Array { - return ValidatorMissedBlocks.encode(message).finish(); - }, - toProtoMsg(message: ValidatorMissedBlocks): ValidatorMissedBlocksProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.ValidatorMissedBlocks", - value: ValidatorMissedBlocks.encode(message).finish() - }; - } -}; -function createBaseMissedBlock(): MissedBlock { - return { - index: BigInt(0), - missed: false - }; -} -export const MissedBlock = { - typeUrl: "/cosmos.slashing.v1beta1.MissedBlock", - aminoType: "cosmos-sdk/MissedBlock", - encode(message: MissedBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== BigInt(0)) { - writer.uint32(8).int64(message.index); - } - if (message.missed === true) { - writer.uint32(16).bool(message.missed); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MissedBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMissedBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.int64(); - break; - case 2: - message.missed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MissedBlock { - return { - index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0), - missed: isSet(object.missed) ? Boolean(object.missed) : false - }; - }, - toJSON(message: MissedBlock): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = (message.index || BigInt(0)).toString()); - message.missed !== undefined && (obj.missed = message.missed); - return obj; - }, - fromPartial(object: DeepPartial): MissedBlock { - const message = createBaseMissedBlock(); - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.missed = object.missed ?? false; - return message; - }, - fromSDK(object: MissedBlockSDKType): MissedBlock { - return { - index: object?.index, - missed: object?.missed - }; - }, - toSDK(message: MissedBlock): MissedBlockSDKType { - const obj: any = {}; - obj.index = message.index; - obj.missed = message.missed; - return obj; - }, - fromAmino(object: MissedBlockAmino): MissedBlock { - return { - index: BigInt(object.index), - missed: object.missed - }; - }, - toAmino(message: MissedBlock): MissedBlockAmino { - const obj: any = {}; - obj.index = message.index ? message.index.toString() : undefined; - obj.missed = message.missed; - return obj; - }, - fromAminoMsg(object: MissedBlockAminoMsg): MissedBlock { - return MissedBlock.fromAmino(object.value); - }, - toAminoMsg(message: MissedBlock): MissedBlockAminoMsg { - return { - type: "cosmos-sdk/MissedBlock", - value: MissedBlock.toAmino(message) - }; - }, - fromProtoMsg(message: MissedBlockProtoMsg): MissedBlock { - return MissedBlock.decode(message.value); - }, - toProto(message: MissedBlock): Uint8Array { - return MissedBlock.encode(message).finish(); - }, - toProtoMsg(message: MissedBlock): MissedBlockProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.MissedBlock", - value: MissedBlock.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 896e6775..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, QuerySigningInfoRequest, QuerySigningInfoResponse, QuerySigningInfosRequest, QuerySigningInfosResponse } from "./query"; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Params queries the parameters of slashing module */ - params(request?: QueryParamsRequest): Promise; - /** SigningInfo queries the signing info of given cons address */ - signingInfo(request: QuerySigningInfoRequest): Promise; - /** SigningInfos queries signing info of all validators */ - signingInfos(request?: QuerySigningInfosRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.signingInfo = this.signingInfo.bind(this); - this.signingInfos = this.signingInfos.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - signingInfo(request: QuerySigningInfoRequest): Promise { - const data = QuerySigningInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "SigningInfo", data); - return promise.then(data => QuerySigningInfoResponse.decode(new BinaryReader(data))); - } - signingInfos(request: QuerySigningInfosRequest = { - pagination: undefined - }): Promise { - const data = QuerySigningInfosRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Query", "SigningInfos", data); - return promise.then(data => QuerySigningInfosResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - signingInfo(request: QuerySigningInfoRequest): Promise { - return queryService.signingInfo(request); - }, - signingInfos(request?: QuerySigningInfosRequest): Promise { - return queryService.signingInfos(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseSigningInfoQuery extends ReactQueryParams { - request: QuerySigningInfoRequest; -} -export interface UseSigningInfosQuery extends ReactQueryParams { - request?: QuerySigningInfosRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useSigningInfo = ({ - request, - options - }: UseSigningInfoQuery) => { - return useQuery(["signingInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.signingInfo(request); - }, options); - }; - const useSigningInfos = ({ - request, - options - }: UseSigningInfosQuery) => { - return useQuery(["signingInfosQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.signingInfos(request); - }, options); - }; - return { - /** Params queries the parameters of slashing module */useParams, - /** SigningInfo queries the signing info of given cons address */useSigningInfo, - /** SigningInfos queries signing info of all validators */useSigningInfos - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QuerySigningInfoStore { - store = new QueryStore(queryService?.signingInfo); - signingInfo(request: QuerySigningInfoRequest) { - return this.store.getData(request); - } - } - class QuerySigningInfosStore { - store = new QueryStore(queryService?.signingInfos); - signingInfos(request: QuerySigningInfosRequest) { - return this.store.getData(request); - } - } - return { - /** Params queries the parameters of slashing module */QueryParamsStore, - /** SigningInfo queries the signing info of given cons address */QuerySigningInfoStore, - /** SigningInfos queries signing info of all validators */QuerySigningInfosStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/query.ts deleted file mode 100644 index c715bdc5..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/query.ts +++ /dev/null @@ -1,699 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Params, ParamsAmino, ParamsSDKType, ValidatorSigningInfo, ValidatorSigningInfoAmino, ValidatorSigningInfoSDKType } from "./slashing"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponse { - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponseAmino { - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequest { - /** cons_address is the address to query signing info of */ - consAddress: string; -} -export interface QuerySigningInfoRequestProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoRequest"; - value: Uint8Array; -} -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequestAmino { - /** cons_address is the address to query signing info of */ - cons_address: string; -} -export interface QuerySigningInfoRequestAminoMsg { - type: "cosmos-sdk/QuerySigningInfoRequest"; - value: QuerySigningInfoRequestAmino; -} -/** - * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoRequestSDKType { - cons_address: string; -} -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponse { - /** val_signing_info is the signing info of requested val cons address */ - valSigningInfo: ValidatorSigningInfo | undefined; -} -export interface QuerySigningInfoResponseProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoResponse"; - value: Uint8Array; -} -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponseAmino { - /** val_signing_info is the signing info of requested val cons address */ - val_signing_info?: ValidatorSigningInfoAmino | undefined; -} -export interface QuerySigningInfoResponseAminoMsg { - type: "cosmos-sdk/QuerySigningInfoResponse"; - value: QuerySigningInfoResponseAmino; -} -/** - * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC - * method - */ -export interface QuerySigningInfoResponseSDKType { - val_signing_info: ValidatorSigningInfoSDKType | undefined; -} -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequest { - pagination: PageRequest | undefined; -} -export interface QuerySigningInfosRequestProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosRequest"; - value: Uint8Array; -} -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequestAmino { - pagination?: PageRequestAmino | undefined; -} -export interface QuerySigningInfosRequestAminoMsg { - type: "cosmos-sdk/QuerySigningInfosRequest"; - value: QuerySigningInfosRequestAmino; -} -/** - * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponse { - /** info is the signing info of all validators */ - info: ValidatorSigningInfo[]; - pagination: PageResponse | undefined; -} -export interface QuerySigningInfosResponseProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosResponse"; - value: Uint8Array; -} -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponseAmino { - /** info is the signing info of all validators */ - info: ValidatorSigningInfoAmino[]; - pagination?: PageResponseAmino | undefined; -} -export interface QuerySigningInfosResponseAminoMsg { - type: "cosmos-sdk/QuerySigningInfosResponse"; - value: QuerySigningInfosResponseAmino; -} -/** - * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC - * method - */ -export interface QuerySigningInfosResponseSDKType { - info: ValidatorSigningInfoSDKType[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.slashing.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.slashing.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySigningInfoRequest(): QuerySigningInfoRequest { - return { - consAddress: "" - }; -} -export const QuerySigningInfoRequest = { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoRequest", - aminoType: "cosmos-sdk/QuerySigningInfoRequest", - encode(message: QuerySigningInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.consAddress !== "") { - writer.uint32(10).string(message.consAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySigningInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySigningInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySigningInfoRequest { - return { - consAddress: isSet(object.consAddress) ? String(object.consAddress) : "" - }; - }, - toJSON(message: QuerySigningInfoRequest): unknown { - const obj: any = {}; - message.consAddress !== undefined && (obj.consAddress = message.consAddress); - return obj; - }, - fromPartial(object: DeepPartial): QuerySigningInfoRequest { - const message = createBaseQuerySigningInfoRequest(); - message.consAddress = object.consAddress ?? ""; - return message; - }, - fromSDK(object: QuerySigningInfoRequestSDKType): QuerySigningInfoRequest { - return { - consAddress: object?.cons_address - }; - }, - toSDK(message: QuerySigningInfoRequest): QuerySigningInfoRequestSDKType { - const obj: any = {}; - obj.cons_address = message.consAddress; - return obj; - }, - fromAmino(object: QuerySigningInfoRequestAmino): QuerySigningInfoRequest { - return { - consAddress: object.cons_address - }; - }, - toAmino(message: QuerySigningInfoRequest): QuerySigningInfoRequestAmino { - const obj: any = {}; - obj.cons_address = message.consAddress; - return obj; - }, - fromAminoMsg(object: QuerySigningInfoRequestAminoMsg): QuerySigningInfoRequest { - return QuerySigningInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySigningInfoRequest): QuerySigningInfoRequestAminoMsg { - return { - type: "cosmos-sdk/QuerySigningInfoRequest", - value: QuerySigningInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySigningInfoRequestProtoMsg): QuerySigningInfoRequest { - return QuerySigningInfoRequest.decode(message.value); - }, - toProto(message: QuerySigningInfoRequest): Uint8Array { - return QuerySigningInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySigningInfoRequest): QuerySigningInfoRequestProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoRequest", - value: QuerySigningInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySigningInfoResponse(): QuerySigningInfoResponse { - return { - valSigningInfo: ValidatorSigningInfo.fromPartial({}) - }; -} -export const QuerySigningInfoResponse = { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoResponse", - aminoType: "cosmos-sdk/QuerySigningInfoResponse", - encode(message: QuerySigningInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.valSigningInfo !== undefined) { - ValidatorSigningInfo.encode(message.valSigningInfo, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySigningInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySigningInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.valSigningInfo = ValidatorSigningInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySigningInfoResponse { - return { - valSigningInfo: isSet(object.valSigningInfo) ? ValidatorSigningInfo.fromJSON(object.valSigningInfo) : undefined - }; - }, - toJSON(message: QuerySigningInfoResponse): unknown { - const obj: any = {}; - message.valSigningInfo !== undefined && (obj.valSigningInfo = message.valSigningInfo ? ValidatorSigningInfo.toJSON(message.valSigningInfo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QuerySigningInfoResponse { - const message = createBaseQuerySigningInfoResponse(); - message.valSigningInfo = object.valSigningInfo !== undefined && object.valSigningInfo !== null ? ValidatorSigningInfo.fromPartial(object.valSigningInfo) : undefined; - return message; - }, - fromSDK(object: QuerySigningInfoResponseSDKType): QuerySigningInfoResponse { - return { - valSigningInfo: object.val_signing_info ? ValidatorSigningInfo.fromSDK(object.val_signing_info) : undefined - }; - }, - toSDK(message: QuerySigningInfoResponse): QuerySigningInfoResponseSDKType { - const obj: any = {}; - message.valSigningInfo !== undefined && (obj.val_signing_info = message.valSigningInfo ? ValidatorSigningInfo.toSDK(message.valSigningInfo) : undefined); - return obj; - }, - fromAmino(object: QuerySigningInfoResponseAmino): QuerySigningInfoResponse { - return { - valSigningInfo: object?.val_signing_info ? ValidatorSigningInfo.fromAmino(object.val_signing_info) : undefined - }; - }, - toAmino(message: QuerySigningInfoResponse): QuerySigningInfoResponseAmino { - const obj: any = {}; - obj.val_signing_info = message.valSigningInfo ? ValidatorSigningInfo.toAmino(message.valSigningInfo) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySigningInfoResponseAminoMsg): QuerySigningInfoResponse { - return QuerySigningInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySigningInfoResponse): QuerySigningInfoResponseAminoMsg { - return { - type: "cosmos-sdk/QuerySigningInfoResponse", - value: QuerySigningInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySigningInfoResponseProtoMsg): QuerySigningInfoResponse { - return QuerySigningInfoResponse.decode(message.value); - }, - toProto(message: QuerySigningInfoResponse): Uint8Array { - return QuerySigningInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySigningInfoResponse): QuerySigningInfoResponseProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoResponse", - value: QuerySigningInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySigningInfosRequest(): QuerySigningInfosRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QuerySigningInfosRequest = { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosRequest", - aminoType: "cosmos-sdk/QuerySigningInfosRequest", - encode(message: QuerySigningInfosRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySigningInfosRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySigningInfosRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySigningInfosRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QuerySigningInfosRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QuerySigningInfosRequest { - const message = createBaseQuerySigningInfosRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QuerySigningInfosRequestSDKType): QuerySigningInfosRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QuerySigningInfosRequest): QuerySigningInfosRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QuerySigningInfosRequestAmino): QuerySigningInfosRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QuerySigningInfosRequest): QuerySigningInfosRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySigningInfosRequestAminoMsg): QuerySigningInfosRequest { - return QuerySigningInfosRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySigningInfosRequest): QuerySigningInfosRequestAminoMsg { - return { - type: "cosmos-sdk/QuerySigningInfosRequest", - value: QuerySigningInfosRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySigningInfosRequestProtoMsg): QuerySigningInfosRequest { - return QuerySigningInfosRequest.decode(message.value); - }, - toProto(message: QuerySigningInfosRequest): Uint8Array { - return QuerySigningInfosRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySigningInfosRequest): QuerySigningInfosRequestProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosRequest", - value: QuerySigningInfosRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySigningInfosResponse(): QuerySigningInfosResponse { - return { - info: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QuerySigningInfosResponse = { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosResponse", - aminoType: "cosmos-sdk/QuerySigningInfosResponse", - encode(message: QuerySigningInfosResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.info) { - ValidatorSigningInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySigningInfosResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySigningInfosResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info.push(ValidatorSigningInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySigningInfosResponse { - return { - info: Array.isArray(object?.info) ? object.info.map((e: any) => ValidatorSigningInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QuerySigningInfosResponse): unknown { - const obj: any = {}; - if (message.info) { - obj.info = message.info.map(e => e ? ValidatorSigningInfo.toJSON(e) : undefined); - } else { - obj.info = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QuerySigningInfosResponse { - const message = createBaseQuerySigningInfosResponse(); - message.info = object.info?.map(e => ValidatorSigningInfo.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QuerySigningInfosResponseSDKType): QuerySigningInfosResponse { - return { - info: Array.isArray(object?.info) ? object.info.map((e: any) => ValidatorSigningInfo.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QuerySigningInfosResponse): QuerySigningInfosResponseSDKType { - const obj: any = {}; - if (message.info) { - obj.info = message.info.map(e => e ? ValidatorSigningInfo.toSDK(e) : undefined); - } else { - obj.info = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QuerySigningInfosResponseAmino): QuerySigningInfosResponse { - return { - info: Array.isArray(object?.info) ? object.info.map((e: any) => ValidatorSigningInfo.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QuerySigningInfosResponse): QuerySigningInfosResponseAmino { - const obj: any = {}; - if (message.info) { - obj.info = message.info.map(e => e ? ValidatorSigningInfo.toAmino(e) : undefined); - } else { - obj.info = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySigningInfosResponseAminoMsg): QuerySigningInfosResponse { - return QuerySigningInfosResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySigningInfosResponse): QuerySigningInfosResponseAminoMsg { - return { - type: "cosmos-sdk/QuerySigningInfosResponse", - value: QuerySigningInfosResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySigningInfosResponseProtoMsg): QuerySigningInfosResponse { - return QuerySigningInfosResponse.decode(message.value); - }, - toProto(message: QuerySigningInfosResponse): Uint8Array { - return QuerySigningInfosResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySigningInfosResponse): QuerySigningInfosResponseProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosResponse", - value: QuerySigningInfosResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/slashing.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/slashing.ts deleted file mode 100644 index e92bc5e2..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/slashing.ts +++ /dev/null @@ -1,412 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfo { - address: string; - /** Height at which validator was first a candidate OR was unjailed */ - startHeight: bigint; - /** - * Index which is incremented each time the validator was a bonded - * in a block and may have signed a precommit or not. This in conjunction with the - * `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - */ - indexOffset: bigint; - /** Timestamp until which the validator is jailed due to liveness downtime. */ - jailedUntil: Date | undefined; - /** - * Whether or not a validator has been tombstoned (killed out of validator set). It is set - * once the validator commits an equivocation or for any other configured misbehiavor. - */ - tombstoned: boolean; - /** - * A counter kept to avoid unnecessary array reads. - * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - */ - missedBlocksCounter: bigint; -} -export interface ValidatorSigningInfoProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.ValidatorSigningInfo"; - value: Uint8Array; -} -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfoAmino { - address: string; - /** Height at which validator was first a candidate OR was unjailed */ - start_height: string; - /** - * Index which is incremented each time the validator was a bonded - * in a block and may have signed a precommit or not. This in conjunction with the - * `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - */ - index_offset: string; - /** Timestamp until which the validator is jailed due to liveness downtime. */ - jailed_until?: Date | undefined; - /** - * Whether or not a validator has been tombstoned (killed out of validator set). It is set - * once the validator commits an equivocation or for any other configured misbehiavor. - */ - tombstoned: boolean; - /** - * A counter kept to avoid unnecessary array reads. - * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - */ - missed_blocks_counter: string; -} -export interface ValidatorSigningInfoAminoMsg { - type: "cosmos-sdk/ValidatorSigningInfo"; - value: ValidatorSigningInfoAmino; -} -/** - * ValidatorSigningInfo defines a validator's signing info for monitoring their - * liveness activity. - */ -export interface ValidatorSigningInfoSDKType { - address: string; - start_height: bigint; - index_offset: bigint; - jailed_until: Date | undefined; - tombstoned: boolean; - missed_blocks_counter: bigint; -} -/** Params represents the parameters used for by the slashing module. */ -export interface Params { - signedBlocksWindow: bigint; - minSignedPerWindow: Uint8Array; - downtimeJailDuration: Duration | undefined; - slashFractionDoubleSign: Uint8Array; - slashFractionDowntime: Uint8Array; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.Params"; - value: Uint8Array; -} -/** Params represents the parameters used for by the slashing module. */ -export interface ParamsAmino { - signed_blocks_window: string; - min_signed_per_window: Uint8Array; - downtime_jail_duration?: DurationAmino | undefined; - slash_fraction_double_sign: Uint8Array; - slash_fraction_downtime: Uint8Array; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params represents the parameters used for by the slashing module. */ -export interface ParamsSDKType { - signed_blocks_window: bigint; - min_signed_per_window: Uint8Array; - downtime_jail_duration: DurationSDKType | undefined; - slash_fraction_double_sign: Uint8Array; - slash_fraction_downtime: Uint8Array; -} -function createBaseValidatorSigningInfo(): ValidatorSigningInfo { - return { - address: "", - startHeight: BigInt(0), - indexOffset: BigInt(0), - jailedUntil: new Date(), - tombstoned: false, - missedBlocksCounter: BigInt(0) - }; -} -export const ValidatorSigningInfo = { - typeUrl: "/cosmos.slashing.v1beta1.ValidatorSigningInfo", - aminoType: "cosmos-sdk/ValidatorSigningInfo", - encode(message: ValidatorSigningInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.startHeight !== BigInt(0)) { - writer.uint32(16).int64(message.startHeight); - } - if (message.indexOffset !== BigInt(0)) { - writer.uint32(24).int64(message.indexOffset); - } - if (message.jailedUntil !== undefined) { - Timestamp.encode(toTimestamp(message.jailedUntil), writer.uint32(34).fork()).ldelim(); - } - if (message.tombstoned === true) { - writer.uint32(40).bool(message.tombstoned); - } - if (message.missedBlocksCounter !== BigInt(0)) { - writer.uint32(48).int64(message.missedBlocksCounter); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorSigningInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorSigningInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.startHeight = reader.int64(); - break; - case 3: - message.indexOffset = reader.int64(); - break; - case 4: - message.jailedUntil = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.tombstoned = reader.bool(); - break; - case 6: - message.missedBlocksCounter = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorSigningInfo { - return { - address: isSet(object.address) ? String(object.address) : "", - startHeight: isSet(object.startHeight) ? BigInt(object.startHeight.toString()) : BigInt(0), - indexOffset: isSet(object.indexOffset) ? BigInt(object.indexOffset.toString()) : BigInt(0), - jailedUntil: isSet(object.jailedUntil) ? new Date(object.jailedUntil) : undefined, - tombstoned: isSet(object.tombstoned) ? Boolean(object.tombstoned) : false, - missedBlocksCounter: isSet(object.missedBlocksCounter) ? BigInt(object.missedBlocksCounter.toString()) : BigInt(0) - }; - }, - toJSON(message: ValidatorSigningInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.startHeight !== undefined && (obj.startHeight = (message.startHeight || BigInt(0)).toString()); - message.indexOffset !== undefined && (obj.indexOffset = (message.indexOffset || BigInt(0)).toString()); - message.jailedUntil !== undefined && (obj.jailedUntil = message.jailedUntil.toISOString()); - message.tombstoned !== undefined && (obj.tombstoned = message.tombstoned); - message.missedBlocksCounter !== undefined && (obj.missedBlocksCounter = (message.missedBlocksCounter || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorSigningInfo { - const message = createBaseValidatorSigningInfo(); - message.address = object.address ?? ""; - message.startHeight = object.startHeight !== undefined && object.startHeight !== null ? BigInt(object.startHeight.toString()) : BigInt(0); - message.indexOffset = object.indexOffset !== undefined && object.indexOffset !== null ? BigInt(object.indexOffset.toString()) : BigInt(0); - message.jailedUntil = object.jailedUntil ?? undefined; - message.tombstoned = object.tombstoned ?? false; - message.missedBlocksCounter = object.missedBlocksCounter !== undefined && object.missedBlocksCounter !== null ? BigInt(object.missedBlocksCounter.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorSigningInfoSDKType): ValidatorSigningInfo { - return { - address: object?.address, - startHeight: object?.start_height, - indexOffset: object?.index_offset, - jailedUntil: object.jailed_until ?? undefined, - tombstoned: object?.tombstoned, - missedBlocksCounter: object?.missed_blocks_counter - }; - }, - toSDK(message: ValidatorSigningInfo): ValidatorSigningInfoSDKType { - const obj: any = {}; - obj.address = message.address; - obj.start_height = message.startHeight; - obj.index_offset = message.indexOffset; - message.jailedUntil !== undefined && (obj.jailed_until = message.jailedUntil ?? undefined); - obj.tombstoned = message.tombstoned; - obj.missed_blocks_counter = message.missedBlocksCounter; - return obj; - }, - fromAmino(object: ValidatorSigningInfoAmino): ValidatorSigningInfo { - return { - address: object.address, - startHeight: BigInt(object.start_height), - indexOffset: BigInt(object.index_offset), - jailedUntil: object.jailed_until, - tombstoned: object.tombstoned, - missedBlocksCounter: BigInt(object.missed_blocks_counter) - }; - }, - toAmino(message: ValidatorSigningInfo): ValidatorSigningInfoAmino { - const obj: any = {}; - obj.address = message.address; - obj.start_height = message.startHeight ? message.startHeight.toString() : undefined; - obj.index_offset = message.indexOffset ? message.indexOffset.toString() : undefined; - obj.jailed_until = message.jailedUntil; - obj.tombstoned = message.tombstoned; - obj.missed_blocks_counter = message.missedBlocksCounter ? message.missedBlocksCounter.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorSigningInfoAminoMsg): ValidatorSigningInfo { - return ValidatorSigningInfo.fromAmino(object.value); - }, - toAminoMsg(message: ValidatorSigningInfo): ValidatorSigningInfoAminoMsg { - return { - type: "cosmos-sdk/ValidatorSigningInfo", - value: ValidatorSigningInfo.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorSigningInfoProtoMsg): ValidatorSigningInfo { - return ValidatorSigningInfo.decode(message.value); - }, - toProto(message: ValidatorSigningInfo): Uint8Array { - return ValidatorSigningInfo.encode(message).finish(); - }, - toProtoMsg(message: ValidatorSigningInfo): ValidatorSigningInfoProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.ValidatorSigningInfo", - value: ValidatorSigningInfo.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - signedBlocksWindow: BigInt(0), - minSignedPerWindow: new Uint8Array(), - downtimeJailDuration: Duration.fromPartial({}), - slashFractionDoubleSign: new Uint8Array(), - slashFractionDowntime: new Uint8Array() - }; -} -export const Params = { - typeUrl: "/cosmos.slashing.v1beta1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signedBlocksWindow !== BigInt(0)) { - writer.uint32(8).int64(message.signedBlocksWindow); - } - if (message.minSignedPerWindow.length !== 0) { - writer.uint32(18).bytes(message.minSignedPerWindow); - } - if (message.downtimeJailDuration !== undefined) { - Duration.encode(message.downtimeJailDuration, writer.uint32(26).fork()).ldelim(); - } - if (message.slashFractionDoubleSign.length !== 0) { - writer.uint32(34).bytes(message.slashFractionDoubleSign); - } - if (message.slashFractionDowntime.length !== 0) { - writer.uint32(42).bytes(message.slashFractionDowntime); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedBlocksWindow = reader.int64(); - break; - case 2: - message.minSignedPerWindow = reader.bytes(); - break; - case 3: - message.downtimeJailDuration = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.slashFractionDoubleSign = reader.bytes(); - break; - case 5: - message.slashFractionDowntime = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - signedBlocksWindow: isSet(object.signedBlocksWindow) ? BigInt(object.signedBlocksWindow.toString()) : BigInt(0), - minSignedPerWindow: isSet(object.minSignedPerWindow) ? bytesFromBase64(object.minSignedPerWindow) : new Uint8Array(), - downtimeJailDuration: isSet(object.downtimeJailDuration) ? Duration.fromJSON(object.downtimeJailDuration) : undefined, - slashFractionDoubleSign: isSet(object.slashFractionDoubleSign) ? bytesFromBase64(object.slashFractionDoubleSign) : new Uint8Array(), - slashFractionDowntime: isSet(object.slashFractionDowntime) ? bytesFromBase64(object.slashFractionDowntime) : new Uint8Array() - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.signedBlocksWindow !== undefined && (obj.signedBlocksWindow = (message.signedBlocksWindow || BigInt(0)).toString()); - message.minSignedPerWindow !== undefined && (obj.minSignedPerWindow = base64FromBytes(message.minSignedPerWindow !== undefined ? message.minSignedPerWindow : new Uint8Array())); - message.downtimeJailDuration !== undefined && (obj.downtimeJailDuration = message.downtimeJailDuration ? Duration.toJSON(message.downtimeJailDuration) : undefined); - message.slashFractionDoubleSign !== undefined && (obj.slashFractionDoubleSign = base64FromBytes(message.slashFractionDoubleSign !== undefined ? message.slashFractionDoubleSign : new Uint8Array())); - message.slashFractionDowntime !== undefined && (obj.slashFractionDowntime = base64FromBytes(message.slashFractionDowntime !== undefined ? message.slashFractionDowntime : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.signedBlocksWindow = object.signedBlocksWindow !== undefined && object.signedBlocksWindow !== null ? BigInt(object.signedBlocksWindow.toString()) : BigInt(0); - message.minSignedPerWindow = object.minSignedPerWindow ?? new Uint8Array(); - message.downtimeJailDuration = object.downtimeJailDuration !== undefined && object.downtimeJailDuration !== null ? Duration.fromPartial(object.downtimeJailDuration) : undefined; - message.slashFractionDoubleSign = object.slashFractionDoubleSign ?? new Uint8Array(); - message.slashFractionDowntime = object.slashFractionDowntime ?? new Uint8Array(); - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - signedBlocksWindow: object?.signed_blocks_window, - minSignedPerWindow: object?.min_signed_per_window, - downtimeJailDuration: object.downtime_jail_duration ? Duration.fromSDK(object.downtime_jail_duration) : undefined, - slashFractionDoubleSign: object?.slash_fraction_double_sign, - slashFractionDowntime: object?.slash_fraction_downtime - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.signed_blocks_window = message.signedBlocksWindow; - obj.min_signed_per_window = message.minSignedPerWindow; - message.downtimeJailDuration !== undefined && (obj.downtime_jail_duration = message.downtimeJailDuration ? Duration.toSDK(message.downtimeJailDuration) : undefined); - obj.slash_fraction_double_sign = message.slashFractionDoubleSign; - obj.slash_fraction_downtime = message.slashFractionDowntime; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - signedBlocksWindow: BigInt(object.signed_blocks_window), - minSignedPerWindow: object.min_signed_per_window, - downtimeJailDuration: object?.downtime_jail_duration ? Duration.fromAmino(object.downtime_jail_duration) : undefined, - slashFractionDoubleSign: object.slash_fraction_double_sign, - slashFractionDowntime: object.slash_fraction_downtime - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.signed_blocks_window = message.signedBlocksWindow ? message.signedBlocksWindow.toString() : undefined; - obj.min_signed_per_window = message.minSignedPerWindow; - obj.downtime_jail_duration = message.downtimeJailDuration ? Duration.toAmino(message.downtimeJailDuration) : undefined; - obj.slash_fraction_double_sign = message.slashFractionDoubleSign; - obj.slash_fraction_downtime = message.slashFractionDowntime; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.amino.ts deleted file mode 100644 index 9f638256..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.amino.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MsgUnjail } from "./tx"; -export const AminoConverter = { - "/cosmos.slashing.v1beta1.MsgUnjail": { - aminoType: "cosmos-sdk/MsgUnjail", - toAmino: MsgUnjail.toAmino, - fromAmino: MsgUnjail.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.registry.ts deleted file mode 100644 index 5e3aabe2..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.registry.ts +++ /dev/null @@ -1,51 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgUnjail } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - unjail(value: MsgUnjail) { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - value: MsgUnjail.encode(value).finish() - }; - } - }, - withTypeUrl: { - unjail(value: MsgUnjail) { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - value - }; - } - }, - toJSON: { - unjail(value: MsgUnjail) { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - value: MsgUnjail.toJSON(value) - }; - } - }, - fromJSON: { - unjail(value: any) { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - value: MsgUnjail.fromJSON(value) - }; - } - }, - fromPartial: { - unjail(value: MsgUnjail) { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - value: MsgUnjail.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index 5a4b327d..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgUnjail, MsgUnjailResponse } from "./tx"; -/** Msg defines the slashing Msg service. */ -export interface Msg { - /** - * Unjail defines a method for unjailing a jailed validator, thus returning - * them into the bonded validator set, so they can begin receiving provisions - * and rewards again. - */ - unjail(request: MsgUnjail): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.unjail = this.unjail.bind(this); - } - unjail(request: MsgUnjail): Promise { - const data = MsgUnjail.encode(request).finish(); - const promise = this.rpc.request("cosmos.slashing.v1beta1.Msg", "Unjail", data); - return promise.then(data => MsgUnjailResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.ts deleted file mode 100644 index 88ede265..00000000 --- a/examples/interchainjs/src/codegen/cosmos/slashing/v1beta1/tx.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjail { - validatorAddr: string; -} -export interface MsgUnjailProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail"; - value: Uint8Array; -} -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjailAmino { - validator_addr: string; -} -export interface MsgUnjailAminoMsg { - type: "cosmos-sdk/MsgUnjail"; - value: MsgUnjailAmino; -} -/** MsgUnjail defines the Msg/Unjail request type */ -export interface MsgUnjailSDKType { - validator_addr: string; -} -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponse {} -export interface MsgUnjailResponseProtoMsg { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjailResponse"; - value: Uint8Array; -} -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponseAmino {} -export interface MsgUnjailResponseAminoMsg { - type: "cosmos-sdk/MsgUnjailResponse"; - value: MsgUnjailResponseAmino; -} -/** MsgUnjailResponse defines the Msg/Unjail response type */ -export interface MsgUnjailResponseSDKType {} -function createBaseMsgUnjail(): MsgUnjail { - return { - validatorAddr: "" - }; -} -export const MsgUnjail = { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - aminoType: "cosmos-sdk/MsgUnjail", - encode(message: MsgUnjail, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUnjail { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUnjail(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUnjail { - return { - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" - }; - }, - toJSON(message: MsgUnjail): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object: DeepPartial): MsgUnjail { - const message = createBaseMsgUnjail(); - message.validatorAddr = object.validatorAddr ?? ""; - return message; - }, - fromSDK(object: MsgUnjailSDKType): MsgUnjail { - return { - validatorAddr: object?.validator_addr - }; - }, - toSDK(message: MsgUnjail): MsgUnjailSDKType { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAmino(object: MsgUnjailAmino): MsgUnjail { - return { - validatorAddr: object.validator_addr - }; - }, - toAmino(message: MsgUnjail): MsgUnjailAmino { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAminoMsg(object: MsgUnjailAminoMsg): MsgUnjail { - return MsgUnjail.fromAmino(object.value); - }, - toAminoMsg(message: MsgUnjail): MsgUnjailAminoMsg { - return { - type: "cosmos-sdk/MsgUnjail", - value: MsgUnjail.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUnjailProtoMsg): MsgUnjail { - return MsgUnjail.decode(message.value); - }, - toProto(message: MsgUnjail): Uint8Array { - return MsgUnjail.encode(message).finish(); - }, - toProtoMsg(message: MsgUnjail): MsgUnjailProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", - value: MsgUnjail.encode(message).finish() - }; - } -}; -function createBaseMsgUnjailResponse(): MsgUnjailResponse { - return {}; -} -export const MsgUnjailResponse = { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjailResponse", - aminoType: "cosmos-sdk/MsgUnjailResponse", - encode(_: MsgUnjailResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUnjailResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUnjailResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUnjailResponse { - return {}; - }, - toJSON(_: MsgUnjailResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUnjailResponse { - const message = createBaseMsgUnjailResponse(); - return message; - }, - fromSDK(_: MsgUnjailResponseSDKType): MsgUnjailResponse { - return {}; - }, - toSDK(_: MsgUnjailResponse): MsgUnjailResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUnjailResponseAmino): MsgUnjailResponse { - return {}; - }, - toAmino(_: MsgUnjailResponse): MsgUnjailResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUnjailResponseAminoMsg): MsgUnjailResponse { - return MsgUnjailResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUnjailResponse): MsgUnjailResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUnjailResponse", - value: MsgUnjailResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUnjailResponseProtoMsg): MsgUnjailResponse { - return MsgUnjailResponse.decode(message.value); - }, - toProto(message: MsgUnjailResponse): Uint8Array { - return MsgUnjailResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUnjailResponse): MsgUnjailResponseProtoMsg { - return { - typeUrl: "/cosmos.slashing.v1beta1.MsgUnjailResponse", - value: MsgUnjailResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/authz.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/authz.ts deleted file mode 100644 index 50b25315..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/authz.ts +++ /dev/null @@ -1,367 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * AuthorizationType defines the type of staking module authorization type - * - * Since: cosmos-sdk 0.43 - */ -export enum AuthorizationType { - /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ - AUTHORIZATION_TYPE_UNSPECIFIED = 0, - /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ - AUTHORIZATION_TYPE_DELEGATE = 1, - /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ - AUTHORIZATION_TYPE_UNDELEGATE = 2, - /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ - AUTHORIZATION_TYPE_REDELEGATE = 3, - UNRECOGNIZED = -1, -} -export const AuthorizationTypeSDKType = AuthorizationType; -export const AuthorizationTypeAmino = AuthorizationType; -export function authorizationTypeFromJSON(object: any): AuthorizationType { - switch (object) { - case 0: - case "AUTHORIZATION_TYPE_UNSPECIFIED": - return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; - case 1: - case "AUTHORIZATION_TYPE_DELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; - case 2: - case "AUTHORIZATION_TYPE_UNDELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; - case 3: - case "AUTHORIZATION_TYPE_REDELEGATE": - return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; - case -1: - case "UNRECOGNIZED": - default: - return AuthorizationType.UNRECOGNIZED; - } -} -export function authorizationTypeToJSON(object: AuthorizationType): string { - switch (object) { - case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: - return "AUTHORIZATION_TYPE_UNSPECIFIED"; - case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: - return "AUTHORIZATION_TYPE_DELEGATE"; - case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: - return "AUTHORIZATION_TYPE_UNDELEGATE"; - case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: - return "AUTHORIZATION_TYPE_REDELEGATE"; - case AuthorizationType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * StakeAuthorization defines authorization for delegate/undelegate/redelegate. - * - * Since: cosmos-sdk 0.43 - */ -export interface StakeAuthorization { - /** - * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - * empty, there is no spend limit and any amount of coins can be delegated. - */ - maxTokens: Coin | undefined; - /** - * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - * account. - */ - allowList?: StakeAuthorization_Validators | undefined; - /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ - denyList?: StakeAuthorization_Validators | undefined; - /** authorization_type defines one of AuthorizationType. */ - authorizationType: AuthorizationType; -} -export interface StakeAuthorizationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization"; - value: Uint8Array; -} -/** - * StakeAuthorization defines authorization for delegate/undelegate/redelegate. - * - * Since: cosmos-sdk 0.43 - */ -export interface StakeAuthorizationAmino { - /** - * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - * empty, there is no spend limit and any amount of coins can be delegated. - */ - max_tokens?: CoinAmino | undefined; - /** - * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - * account. - */ - allow_list?: StakeAuthorization_ValidatorsAmino | undefined; - /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ - deny_list?: StakeAuthorization_ValidatorsAmino | undefined; - /** authorization_type defines one of AuthorizationType. */ - authorization_type: AuthorizationType; -} -export interface StakeAuthorizationAminoMsg { - type: "cosmos-sdk/StakeAuthorization"; - value: StakeAuthorizationAmino; -} -/** - * StakeAuthorization defines authorization for delegate/undelegate/redelegate. - * - * Since: cosmos-sdk 0.43 - */ -export interface StakeAuthorizationSDKType { - max_tokens: CoinSDKType | undefined; - allow_list?: StakeAuthorization_ValidatorsSDKType | undefined; - deny_list?: StakeAuthorization_ValidatorsSDKType | undefined; - authorization_type: AuthorizationType; -} -/** Validators defines list of validator addresses. */ -export interface StakeAuthorization_Validators { - address: string[]; -} -export interface StakeAuthorization_ValidatorsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Validators"; - value: Uint8Array; -} -/** Validators defines list of validator addresses. */ -export interface StakeAuthorization_ValidatorsAmino { - address: string[]; -} -export interface StakeAuthorization_ValidatorsAminoMsg { - type: "cosmos-sdk/Validators"; - value: StakeAuthorization_ValidatorsAmino; -} -/** Validators defines list of validator addresses. */ -export interface StakeAuthorization_ValidatorsSDKType { - address: string[]; -} -function createBaseStakeAuthorization(): StakeAuthorization { - return { - maxTokens: Coin.fromPartial({}), - allowList: undefined, - denyList: undefined, - authorizationType: 0 - }; -} -export const StakeAuthorization = { - typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", - aminoType: "cosmos-sdk/StakeAuthorization", - encode(message: StakeAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxTokens !== undefined) { - Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim(); - } - if (message.allowList !== undefined) { - StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim(); - } - if (message.denyList !== undefined) { - StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim(); - } - if (message.authorizationType !== 0) { - writer.uint32(32).int32(message.authorizationType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStakeAuthorization(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxTokens = Coin.decode(reader, reader.uint32()); - break; - case 2: - message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32()); - break; - case 3: - message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32()); - break; - case 4: - message.authorizationType = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): StakeAuthorization { - return { - maxTokens: isSet(object.maxTokens) ? Coin.fromJSON(object.maxTokens) : undefined, - allowList: isSet(object.allowList) ? StakeAuthorization_Validators.fromJSON(object.allowList) : undefined, - denyList: isSet(object.denyList) ? StakeAuthorization_Validators.fromJSON(object.denyList) : undefined, - authorizationType: isSet(object.authorizationType) ? authorizationTypeFromJSON(object.authorizationType) : -1 - }; - }, - toJSON(message: StakeAuthorization): unknown { - const obj: any = {}; - message.maxTokens !== undefined && (obj.maxTokens = message.maxTokens ? Coin.toJSON(message.maxTokens) : undefined); - message.allowList !== undefined && (obj.allowList = message.allowList ? StakeAuthorization_Validators.toJSON(message.allowList) : undefined); - message.denyList !== undefined && (obj.denyList = message.denyList ? StakeAuthorization_Validators.toJSON(message.denyList) : undefined); - message.authorizationType !== undefined && (obj.authorizationType = authorizationTypeToJSON(message.authorizationType)); - return obj; - }, - fromPartial(object: DeepPartial): StakeAuthorization { - const message = createBaseStakeAuthorization(); - message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null ? Coin.fromPartial(object.maxTokens) : undefined; - message.allowList = object.allowList !== undefined && object.allowList !== null ? StakeAuthorization_Validators.fromPartial(object.allowList) : undefined; - message.denyList = object.denyList !== undefined && object.denyList !== null ? StakeAuthorization_Validators.fromPartial(object.denyList) : undefined; - message.authorizationType = object.authorizationType ?? 0; - return message; - }, - fromSDK(object: StakeAuthorizationSDKType): StakeAuthorization { - return { - maxTokens: object.max_tokens ? Coin.fromSDK(object.max_tokens) : undefined, - allowList: object.allow_list ? StakeAuthorization_Validators.fromSDK(object.allow_list) : undefined, - denyList: object.deny_list ? StakeAuthorization_Validators.fromSDK(object.deny_list) : undefined, - authorizationType: isSet(object.authorization_type) ? authorizationTypeFromJSON(object.authorization_type) : -1 - }; - }, - toSDK(message: StakeAuthorization): StakeAuthorizationSDKType { - const obj: any = {}; - message.maxTokens !== undefined && (obj.max_tokens = message.maxTokens ? Coin.toSDK(message.maxTokens) : undefined); - message.allowList !== undefined && (obj.allow_list = message.allowList ? StakeAuthorization_Validators.toSDK(message.allowList) : undefined); - message.denyList !== undefined && (obj.deny_list = message.denyList ? StakeAuthorization_Validators.toSDK(message.denyList) : undefined); - message.authorizationType !== undefined && (obj.authorization_type = authorizationTypeToJSON(message.authorizationType)); - return obj; - }, - fromAmino(object: StakeAuthorizationAmino): StakeAuthorization { - return { - maxTokens: object?.max_tokens ? Coin.fromAmino(object.max_tokens) : undefined, - allowList: object?.allow_list ? StakeAuthorization_Validators.fromAmino(object.allow_list) : undefined, - denyList: object?.deny_list ? StakeAuthorization_Validators.fromAmino(object.deny_list) : undefined, - authorizationType: isSet(object.authorization_type) ? authorizationTypeFromJSON(object.authorization_type) : -1 - }; - }, - toAmino(message: StakeAuthorization): StakeAuthorizationAmino { - const obj: any = {}; - obj.max_tokens = message.maxTokens ? Coin.toAmino(message.maxTokens) : undefined; - obj.allow_list = message.allowList ? StakeAuthorization_Validators.toAmino(message.allowList) : undefined; - obj.deny_list = message.denyList ? StakeAuthorization_Validators.toAmino(message.denyList) : undefined; - obj.authorization_type = message.authorizationType; - return obj; - }, - fromAminoMsg(object: StakeAuthorizationAminoMsg): StakeAuthorization { - return StakeAuthorization.fromAmino(object.value); - }, - toAminoMsg(message: StakeAuthorization): StakeAuthorizationAminoMsg { - return { - type: "cosmos-sdk/StakeAuthorization", - value: StakeAuthorization.toAmino(message) - }; - }, - fromProtoMsg(message: StakeAuthorizationProtoMsg): StakeAuthorization { - return StakeAuthorization.decode(message.value); - }, - toProto(message: StakeAuthorization): Uint8Array { - return StakeAuthorization.encode(message).finish(); - }, - toProtoMsg(message: StakeAuthorization): StakeAuthorizationProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.StakeAuthorization", - value: StakeAuthorization.encode(message).finish() - }; - } -}; -function createBaseStakeAuthorization_Validators(): StakeAuthorization_Validators { - return { - address: [] - }; -} -export const StakeAuthorization_Validators = { - typeUrl: "/cosmos.staking.v1beta1.Validators", - aminoType: "cosmos-sdk/Validators", - encode(message: StakeAuthorization_Validators, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.address) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StakeAuthorization_Validators { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStakeAuthorization_Validators(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): StakeAuthorization_Validators { - return { - address: Array.isArray(object?.address) ? object.address.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: StakeAuthorization_Validators): unknown { - const obj: any = {}; - if (message.address) { - obj.address = message.address.map(e => e); - } else { - obj.address = []; - } - return obj; - }, - fromPartial(object: DeepPartial): StakeAuthorization_Validators { - const message = createBaseStakeAuthorization_Validators(); - message.address = object.address?.map(e => e) || []; - return message; - }, - fromSDK(object: StakeAuthorization_ValidatorsSDKType): StakeAuthorization_Validators { - return { - address: Array.isArray(object?.address) ? object.address.map((e: any) => e) : [] - }; - }, - toSDK(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsSDKType { - const obj: any = {}; - if (message.address) { - obj.address = message.address.map(e => e); - } else { - obj.address = []; - } - return obj; - }, - fromAmino(object: StakeAuthorization_ValidatorsAmino): StakeAuthorization_Validators { - return { - address: Array.isArray(object?.address) ? object.address.map((e: any) => e) : [] - }; - }, - toAmino(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAmino { - const obj: any = {}; - if (message.address) { - obj.address = message.address.map(e => e); - } else { - obj.address = []; - } - return obj; - }, - fromAminoMsg(object: StakeAuthorization_ValidatorsAminoMsg): StakeAuthorization_Validators { - return StakeAuthorization_Validators.fromAmino(object.value); - }, - toAminoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsAminoMsg { - return { - type: "cosmos-sdk/Validators", - value: StakeAuthorization_Validators.toAmino(message) - }; - }, - fromProtoMsg(message: StakeAuthorization_ValidatorsProtoMsg): StakeAuthorization_Validators { - return StakeAuthorization_Validators.decode(message.value); - }, - toProto(message: StakeAuthorization_Validators): Uint8Array { - return StakeAuthorization_Validators.encode(message).finish(); - }, - toProtoMsg(message: StakeAuthorization_Validators): StakeAuthorization_ValidatorsProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Validators", - value: StakeAuthorization_Validators.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/genesis.ts deleted file mode 100644 index f375f530..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/genesis.ts +++ /dev/null @@ -1,445 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType, Validator, ValidatorAmino, ValidatorSDKType, Delegation, DelegationAmino, DelegationSDKType, UnbondingDelegation, UnbondingDelegationAmino, UnbondingDelegationSDKType, Redelegation, RedelegationAmino, RedelegationSDKType } from "./staking"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of related to deposit. */ - params: Params | undefined; - /** - * last_total_power tracks the total amounts of bonded tokens recorded during - * the previous end block. - */ - lastTotalPower: Uint8Array; - /** - * last_validator_powers is a special index that provides a historical list - * of the last-block's bonded validators. - */ - lastValidatorPowers: LastValidatorPower[]; - /** delegations defines the validator set at genesis. */ - validators: Validator[]; - /** delegations defines the delegations active at genesis. */ - delegations: Delegation[]; - /** unbonding_delegations defines the unbonding delegations active at genesis. */ - unbondingDelegations: UnbondingDelegation[]; - /** redelegations defines the redelegations active at genesis. */ - redelegations: Redelegation[]; - exported: boolean; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisStateAmino { - /** params defines all the paramaters of related to deposit. */ - params?: ParamsAmino | undefined; - /** - * last_total_power tracks the total amounts of bonded tokens recorded during - * the previous end block. - */ - last_total_power: Uint8Array; - /** - * last_validator_powers is a special index that provides a historical list - * of the last-block's bonded validators. - */ - last_validator_powers: LastValidatorPowerAmino[]; - /** delegations defines the validator set at genesis. */ - validators: ValidatorAmino[]; - /** delegations defines the delegations active at genesis. */ - delegations: DelegationAmino[]; - /** unbonding_delegations defines the unbonding delegations active at genesis. */ - unbonding_delegations: UnbondingDelegationAmino[]; - /** redelegations defines the redelegations active at genesis. */ - redelegations: RedelegationAmino[]; - exported: boolean; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the staking module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - last_total_power: Uint8Array; - last_validator_powers: LastValidatorPowerSDKType[]; - validators: ValidatorSDKType[]; - delegations: DelegationSDKType[]; - unbonding_delegations: UnbondingDelegationSDKType[]; - redelegations: RedelegationSDKType[]; - exported: boolean; -} -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPower { - /** address is the address of the validator. */ - address: string; - /** power defines the power of the validator. */ - power: bigint; -} -export interface LastValidatorPowerProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.LastValidatorPower"; - value: Uint8Array; -} -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPowerAmino { - /** address is the address of the validator. */ - address: string; - /** power defines the power of the validator. */ - power: string; -} -export interface LastValidatorPowerAminoMsg { - type: "cosmos-sdk/LastValidatorPower"; - value: LastValidatorPowerAmino; -} -/** LastValidatorPower required for validator set update logic. */ -export interface LastValidatorPowerSDKType { - address: string; - power: bigint; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - lastTotalPower: new Uint8Array(), - lastValidatorPowers: [], - validators: [], - delegations: [], - unbondingDelegations: [], - redelegations: [], - exported: false - }; -} -export const GenesisState = { - typeUrl: "/cosmos.staking.v1beta1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - if (message.lastTotalPower.length !== 0) { - writer.uint32(18).bytes(message.lastTotalPower); - } - for (const v of message.lastValidatorPowers) { - LastValidatorPower.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.delegations) { - Delegation.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.unbondingDelegations) { - UnbondingDelegation.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.redelegations) { - Redelegation.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.exported === true) { - writer.uint32(64).bool(message.exported); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.lastTotalPower = reader.bytes(); - break; - case 3: - message.lastValidatorPowers.push(LastValidatorPower.decode(reader, reader.uint32())); - break; - case 4: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 5: - message.delegations.push(Delegation.decode(reader, reader.uint32())); - break; - case 6: - message.unbondingDelegations.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 7: - message.redelegations.push(Redelegation.decode(reader, reader.uint32())); - break; - case 8: - message.exported = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - lastTotalPower: isSet(object.lastTotalPower) ? bytesFromBase64(object.lastTotalPower) : new Uint8Array(), - lastValidatorPowers: Array.isArray(object?.lastValidatorPowers) ? object.lastValidatorPowers.map((e: any) => LastValidatorPower.fromJSON(e)) : [], - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], - delegations: Array.isArray(object?.delegations) ? object.delegations.map((e: any) => Delegation.fromJSON(e)) : [], - unbondingDelegations: Array.isArray(object?.unbondingDelegations) ? object.unbondingDelegations.map((e: any) => UnbondingDelegation.fromJSON(e)) : [], - redelegations: Array.isArray(object?.redelegations) ? object.redelegations.map((e: any) => Redelegation.fromJSON(e)) : [], - exported: isSet(object.exported) ? Boolean(object.exported) : false - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.lastTotalPower !== undefined && (obj.lastTotalPower = base64FromBytes(message.lastTotalPower !== undefined ? message.lastTotalPower : new Uint8Array())); - if (message.lastValidatorPowers) { - obj.lastValidatorPowers = message.lastValidatorPowers.map(e => e ? LastValidatorPower.toJSON(e) : undefined); - } else { - obj.lastValidatorPowers = []; - } - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map(e => e ? Delegation.toJSON(e) : undefined); - } else { - obj.delegations = []; - } - if (message.unbondingDelegations) { - obj.unbondingDelegations = message.unbondingDelegations.map(e => e ? UnbondingDelegation.toJSON(e) : undefined); - } else { - obj.unbondingDelegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map(e => e ? Redelegation.toJSON(e) : undefined); - } else { - obj.redelegations = []; - } - message.exported !== undefined && (obj.exported = message.exported); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.lastTotalPower = object.lastTotalPower ?? new Uint8Array(); - message.lastValidatorPowers = object.lastValidatorPowers?.map(e => LastValidatorPower.fromPartial(e)) || []; - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.delegations = object.delegations?.map(e => Delegation.fromPartial(e)) || []; - message.unbondingDelegations = object.unbondingDelegations?.map(e => UnbondingDelegation.fromPartial(e)) || []; - message.redelegations = object.redelegations?.map(e => Redelegation.fromPartial(e)) || []; - message.exported = object.exported ?? false; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - lastTotalPower: object?.last_total_power, - lastValidatorPowers: Array.isArray(object?.last_validator_powers) ? object.last_validator_powers.map((e: any) => LastValidatorPower.fromSDK(e)) : [], - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromSDK(e)) : [], - delegations: Array.isArray(object?.delegations) ? object.delegations.map((e: any) => Delegation.fromSDK(e)) : [], - unbondingDelegations: Array.isArray(object?.unbonding_delegations) ? object.unbonding_delegations.map((e: any) => UnbondingDelegation.fromSDK(e)) : [], - redelegations: Array.isArray(object?.redelegations) ? object.redelegations.map((e: any) => Redelegation.fromSDK(e)) : [], - exported: object?.exported - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - obj.last_total_power = message.lastTotalPower; - if (message.lastValidatorPowers) { - obj.last_validator_powers = message.lastValidatorPowers.map(e => e ? LastValidatorPower.toSDK(e) : undefined); - } else { - obj.last_validator_powers = []; - } - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map(e => e ? Delegation.toSDK(e) : undefined); - } else { - obj.delegations = []; - } - if (message.unbondingDelegations) { - obj.unbonding_delegations = message.unbondingDelegations.map(e => e ? UnbondingDelegation.toSDK(e) : undefined); - } else { - obj.unbonding_delegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map(e => e ? Redelegation.toSDK(e) : undefined); - } else { - obj.redelegations = []; - } - obj.exported = message.exported; - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - lastTotalPower: object.last_total_power, - lastValidatorPowers: Array.isArray(object?.last_validator_powers) ? object.last_validator_powers.map((e: any) => LastValidatorPower.fromAmino(e)) : [], - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromAmino(e)) : [], - delegations: Array.isArray(object?.delegations) ? object.delegations.map((e: any) => Delegation.fromAmino(e)) : [], - unbondingDelegations: Array.isArray(object?.unbonding_delegations) ? object.unbonding_delegations.map((e: any) => UnbondingDelegation.fromAmino(e)) : [], - redelegations: Array.isArray(object?.redelegations) ? object.redelegations.map((e: any) => Redelegation.fromAmino(e)) : [], - exported: object.exported - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - obj.last_total_power = message.lastTotalPower; - if (message.lastValidatorPowers) { - obj.last_validator_powers = message.lastValidatorPowers.map(e => e ? LastValidatorPower.toAmino(e) : undefined); - } else { - obj.last_validator_powers = []; - } - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.validators = []; - } - if (message.delegations) { - obj.delegations = message.delegations.map(e => e ? Delegation.toAmino(e) : undefined); - } else { - obj.delegations = []; - } - if (message.unbondingDelegations) { - obj.unbonding_delegations = message.unbondingDelegations.map(e => e ? UnbondingDelegation.toAmino(e) : undefined); - } else { - obj.unbonding_delegations = []; - } - if (message.redelegations) { - obj.redelegations = message.redelegations.map(e => e ? Redelegation.toAmino(e) : undefined); - } else { - obj.redelegations = []; - } - obj.exported = message.exported; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseLastValidatorPower(): LastValidatorPower { - return { - address: "", - power: BigInt(0) - }; -} -export const LastValidatorPower = { - typeUrl: "/cosmos.staking.v1beta1.LastValidatorPower", - aminoType: "cosmos-sdk/LastValidatorPower", - encode(message: LastValidatorPower, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.power !== BigInt(0)) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LastValidatorPower { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLastValidatorPower(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LastValidatorPower { - return { - address: isSet(object.address) ? String(object.address) : "", - power: isSet(object.power) ? BigInt(object.power.toString()) : BigInt(0) - }; - }, - toJSON(message: LastValidatorPower): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.power !== undefined && (obj.power = (message.power || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): LastValidatorPower { - const message = createBaseLastValidatorPower(); - message.address = object.address ?? ""; - message.power = object.power !== undefined && object.power !== null ? BigInt(object.power.toString()) : BigInt(0); - return message; - }, - fromSDK(object: LastValidatorPowerSDKType): LastValidatorPower { - return { - address: object?.address, - power: object?.power - }; - }, - toSDK(message: LastValidatorPower): LastValidatorPowerSDKType { - const obj: any = {}; - obj.address = message.address; - obj.power = message.power; - return obj; - }, - fromAmino(object: LastValidatorPowerAmino): LastValidatorPower { - return { - address: object.address, - power: BigInt(object.power) - }; - }, - toAmino(message: LastValidatorPower): LastValidatorPowerAmino { - const obj: any = {}; - obj.address = message.address; - obj.power = message.power ? message.power.toString() : undefined; - return obj; - }, - fromAminoMsg(object: LastValidatorPowerAminoMsg): LastValidatorPower { - return LastValidatorPower.fromAmino(object.value); - }, - toAminoMsg(message: LastValidatorPower): LastValidatorPowerAminoMsg { - return { - type: "cosmos-sdk/LastValidatorPower", - value: LastValidatorPower.toAmino(message) - }; - }, - fromProtoMsg(message: LastValidatorPowerProtoMsg): LastValidatorPower { - return LastValidatorPower.decode(message.value); - }, - toProto(message: LastValidatorPower): Uint8Array { - return LastValidatorPower.encode(message).finish(); - }, - toProtoMsg(message: LastValidatorPower): LastValidatorPowerProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.LastValidatorPower", - value: LastValidatorPower.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 4d49b579..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,520 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryValidatorsRequest, QueryValidatorsResponse, QueryValidatorRequest, QueryValidatorResponse, QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse, QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse, QueryDelegationRequest, QueryDelegationResponse, QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse, QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse, QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse, QueryRedelegationsRequest, QueryRedelegationsResponse, QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse, QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse, QueryHistoricalInfoRequest, QueryHistoricalInfoResponse, QueryPoolRequest, QueryPoolResponse, QueryParamsRequest, QueryParamsResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Validators queries all validators that match the given status. */ - validators(request: QueryValidatorsRequest): Promise; - /** Validator queries validator info for given validator address. */ - validator(request: QueryValidatorRequest): Promise; - /** ValidatorDelegations queries delegate info for given validator. */ - validatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ - validatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise; - /** Delegation queries delegate info for given validator delegator pair. */ - delegation(request: QueryDelegationRequest): Promise; - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - unbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - /** DelegatorDelegations queries all delegations of a given delegator address. */ - delegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - delegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise; - /** Redelegations queries redelegations of given address. */ - redelegations(request: QueryRedelegationsRequest): Promise; - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - delegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - delegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - /** HistoricalInfo queries the historical info for given height. */ - historicalInfo(request: QueryHistoricalInfoRequest): Promise; - /** Pool queries the pool info. */ - pool(request?: QueryPoolRequest): Promise; - /** Parameters queries the staking parameters. */ - params(request?: QueryParamsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.validators = this.validators.bind(this); - this.validator = this.validator.bind(this); - this.validatorDelegations = this.validatorDelegations.bind(this); - this.validatorUnbondingDelegations = this.validatorUnbondingDelegations.bind(this); - this.delegation = this.delegation.bind(this); - this.unbondingDelegation = this.unbondingDelegation.bind(this); - this.delegatorDelegations = this.delegatorDelegations.bind(this); - this.delegatorUnbondingDelegations = this.delegatorUnbondingDelegations.bind(this); - this.redelegations = this.redelegations.bind(this); - this.delegatorValidators = this.delegatorValidators.bind(this); - this.delegatorValidator = this.delegatorValidator.bind(this); - this.historicalInfo = this.historicalInfo.bind(this); - this.pool = this.pool.bind(this); - this.params = this.params.bind(this); - } - validators(request: QueryValidatorsRequest): Promise { - const data = QueryValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validators", data); - return promise.then(data => QueryValidatorsResponse.decode(new BinaryReader(data))); - } - validator(request: QueryValidatorRequest): Promise { - const data = QueryValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validator", data); - return promise.then(data => QueryValidatorResponse.decode(new BinaryReader(data))); - } - validatorDelegations(request: QueryValidatorDelegationsRequest): Promise { - const data = QueryValidatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorDelegations", data); - return promise.then(data => QueryValidatorDelegationsResponse.decode(new BinaryReader(data))); - } - validatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise { - const data = QueryValidatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "ValidatorUnbondingDelegations", data); - return promise.then(data => QueryValidatorUnbondingDelegationsResponse.decode(new BinaryReader(data))); - } - delegation(request: QueryDelegationRequest): Promise { - const data = QueryDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Delegation", data); - return promise.then(data => QueryDelegationResponse.decode(new BinaryReader(data))); - } - unbondingDelegation(request: QueryUnbondingDelegationRequest): Promise { - const data = QueryUnbondingDelegationRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "UnbondingDelegation", data); - return promise.then(data => QueryUnbondingDelegationResponse.decode(new BinaryReader(data))); - } - delegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise { - const data = QueryDelegatorDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorDelegations", data); - return promise.then(data => QueryDelegatorDelegationsResponse.decode(new BinaryReader(data))); - } - delegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise { - const data = QueryDelegatorUnbondingDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorUnbondingDelegations", data); - return promise.then(data => QueryDelegatorUnbondingDelegationsResponse.decode(new BinaryReader(data))); - } - redelegations(request: QueryRedelegationsRequest): Promise { - const data = QueryRedelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Redelegations", data); - return promise.then(data => QueryRedelegationsResponse.decode(new BinaryReader(data))); - } - delegatorValidators(request: QueryDelegatorValidatorsRequest): Promise { - const data = QueryDelegatorValidatorsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidators", data); - return promise.then(data => QueryDelegatorValidatorsResponse.decode(new BinaryReader(data))); - } - delegatorValidator(request: QueryDelegatorValidatorRequest): Promise { - const data = QueryDelegatorValidatorRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "DelegatorValidator", data); - return promise.then(data => QueryDelegatorValidatorResponse.decode(new BinaryReader(data))); - } - historicalInfo(request: QueryHistoricalInfoRequest): Promise { - const data = QueryHistoricalInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "HistoricalInfo", data); - return promise.then(data => QueryHistoricalInfoResponse.decode(new BinaryReader(data))); - } - pool(request: QueryPoolRequest = {}): Promise { - const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Pool", data); - return promise.then(data => QueryPoolResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - validators(request: QueryValidatorsRequest): Promise { - return queryService.validators(request); - }, - validator(request: QueryValidatorRequest): Promise { - return queryService.validator(request); - }, - validatorDelegations(request: QueryValidatorDelegationsRequest): Promise { - return queryService.validatorDelegations(request); - }, - validatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest): Promise { - return queryService.validatorUnbondingDelegations(request); - }, - delegation(request: QueryDelegationRequest): Promise { - return queryService.delegation(request); - }, - unbondingDelegation(request: QueryUnbondingDelegationRequest): Promise { - return queryService.unbondingDelegation(request); - }, - delegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise { - return queryService.delegatorDelegations(request); - }, - delegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest): Promise { - return queryService.delegatorUnbondingDelegations(request); - }, - redelegations(request: QueryRedelegationsRequest): Promise { - return queryService.redelegations(request); - }, - delegatorValidators(request: QueryDelegatorValidatorsRequest): Promise { - return queryService.delegatorValidators(request); - }, - delegatorValidator(request: QueryDelegatorValidatorRequest): Promise { - return queryService.delegatorValidator(request); - }, - historicalInfo(request: QueryHistoricalInfoRequest): Promise { - return queryService.historicalInfo(request); - }, - pool(request?: QueryPoolRequest): Promise { - return queryService.pool(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - } - }; -}; -export interface UseValidatorsQuery extends ReactQueryParams { - request: QueryValidatorsRequest; -} -export interface UseValidatorQuery extends ReactQueryParams { - request: QueryValidatorRequest; -} -export interface UseValidatorDelegationsQuery extends ReactQueryParams { - request: QueryValidatorDelegationsRequest; -} -export interface UseValidatorUnbondingDelegationsQuery extends ReactQueryParams { - request: QueryValidatorUnbondingDelegationsRequest; -} -export interface UseDelegationQuery extends ReactQueryParams { - request: QueryDelegationRequest; -} -export interface UseUnbondingDelegationQuery extends ReactQueryParams { - request: QueryUnbondingDelegationRequest; -} -export interface UseDelegatorDelegationsQuery extends ReactQueryParams { - request: QueryDelegatorDelegationsRequest; -} -export interface UseDelegatorUnbondingDelegationsQuery extends ReactQueryParams { - request: QueryDelegatorUnbondingDelegationsRequest; -} -export interface UseRedelegationsQuery extends ReactQueryParams { - request: QueryRedelegationsRequest; -} -export interface UseDelegatorValidatorsQuery extends ReactQueryParams { - request: QueryDelegatorValidatorsRequest; -} -export interface UseDelegatorValidatorQuery extends ReactQueryParams { - request: QueryDelegatorValidatorRequest; -} -export interface UseHistoricalInfoQuery extends ReactQueryParams { - request: QueryHistoricalInfoRequest; -} -export interface UsePoolQuery extends ReactQueryParams { - request?: QueryPoolRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useValidators = ({ - request, - options - }: UseValidatorsQuery) => { - return useQuery(["validatorsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validators(request); - }, options); - }; - const useValidator = ({ - request, - options - }: UseValidatorQuery) => { - return useQuery(["validatorQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validator(request); - }, options); - }; - const useValidatorDelegations = ({ - request, - options - }: UseValidatorDelegationsQuery) => { - return useQuery(["validatorDelegationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validatorDelegations(request); - }, options); - }; - const useValidatorUnbondingDelegations = ({ - request, - options - }: UseValidatorUnbondingDelegationsQuery) => { - return useQuery(["validatorUnbondingDelegationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.validatorUnbondingDelegations(request); - }, options); - }; - const useDelegation = ({ - request, - options - }: UseDelegationQuery) => { - return useQuery(["delegationQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegation(request); - }, options); - }; - const useUnbondingDelegation = ({ - request, - options - }: UseUnbondingDelegationQuery) => { - return useQuery(["unbondingDelegationQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.unbondingDelegation(request); - }, options); - }; - const useDelegatorDelegations = ({ - request, - options - }: UseDelegatorDelegationsQuery) => { - return useQuery(["delegatorDelegationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegatorDelegations(request); - }, options); - }; - const useDelegatorUnbondingDelegations = ({ - request, - options - }: UseDelegatorUnbondingDelegationsQuery) => { - return useQuery(["delegatorUnbondingDelegationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegatorUnbondingDelegations(request); - }, options); - }; - const useRedelegations = ({ - request, - options - }: UseRedelegationsQuery) => { - return useQuery(["redelegationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.redelegations(request); - }, options); - }; - const useDelegatorValidators = ({ - request, - options - }: UseDelegatorValidatorsQuery) => { - return useQuery(["delegatorValidatorsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegatorValidators(request); - }, options); - }; - const useDelegatorValidator = ({ - request, - options - }: UseDelegatorValidatorQuery) => { - return useQuery(["delegatorValidatorQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.delegatorValidator(request); - }, options); - }; - const useHistoricalInfo = ({ - request, - options - }: UseHistoricalInfoQuery) => { - return useQuery(["historicalInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.historicalInfo(request); - }, options); - }; - const usePool = ({ - request, - options - }: UsePoolQuery) => { - return useQuery(["poolQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.pool(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - return { - /** Validators queries all validators that match the given status. */useValidators, - /** Validator queries validator info for given validator address. */useValidator, - /** ValidatorDelegations queries delegate info for given validator. */useValidatorDelegations, - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */useValidatorUnbondingDelegations, - /** Delegation queries delegate info for given validator delegator pair. */useDelegation, - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - useUnbondingDelegation, - /** DelegatorDelegations queries all delegations of a given delegator address. */useDelegatorDelegations, - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - useDelegatorUnbondingDelegations, - /** Redelegations queries redelegations of given address. */useRedelegations, - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - useDelegatorValidators, - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - useDelegatorValidator, - /** HistoricalInfo queries the historical info for given height. */useHistoricalInfo, - /** Pool queries the pool info. */usePool, - /** Parameters queries the staking parameters. */useParams - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryValidatorsStore { - store = new QueryStore(queryService?.validators); - validators(request: QueryValidatorsRequest) { - return this.store.getData(request); - } - } - class QueryValidatorStore { - store = new QueryStore(queryService?.validator); - validator(request: QueryValidatorRequest) { - return this.store.getData(request); - } - } - class QueryValidatorDelegationsStore { - store = new QueryStore(queryService?.validatorDelegations); - validatorDelegations(request: QueryValidatorDelegationsRequest) { - return this.store.getData(request); - } - } - class QueryValidatorUnbondingDelegationsStore { - store = new QueryStore(queryService?.validatorUnbondingDelegations); - validatorUnbondingDelegations(request: QueryValidatorUnbondingDelegationsRequest) { - return this.store.getData(request); - } - } - class QueryDelegationStore { - store = new QueryStore(queryService?.delegation); - delegation(request: QueryDelegationRequest) { - return this.store.getData(request); - } - } - class QueryUnbondingDelegationStore { - store = new QueryStore(queryService?.unbondingDelegation); - unbondingDelegation(request: QueryUnbondingDelegationRequest) { - return this.store.getData(request); - } - } - class QueryDelegatorDelegationsStore { - store = new QueryStore(queryService?.delegatorDelegations); - delegatorDelegations(request: QueryDelegatorDelegationsRequest) { - return this.store.getData(request); - } - } - class QueryDelegatorUnbondingDelegationsStore { - store = new QueryStore(queryService?.delegatorUnbondingDelegations); - delegatorUnbondingDelegations(request: QueryDelegatorUnbondingDelegationsRequest) { - return this.store.getData(request); - } - } - class QueryRedelegationsStore { - store = new QueryStore(queryService?.redelegations); - redelegations(request: QueryRedelegationsRequest) { - return this.store.getData(request); - } - } - class QueryDelegatorValidatorsStore { - store = new QueryStore(queryService?.delegatorValidators); - delegatorValidators(request: QueryDelegatorValidatorsRequest) { - return this.store.getData(request); - } - } - class QueryDelegatorValidatorStore { - store = new QueryStore(queryService?.delegatorValidator); - delegatorValidator(request: QueryDelegatorValidatorRequest) { - return this.store.getData(request); - } - } - class QueryHistoricalInfoStore { - store = new QueryStore(queryService?.historicalInfo); - historicalInfo(request: QueryHistoricalInfoRequest) { - return this.store.getData(request); - } - } - class QueryPoolStore { - store = new QueryStore(queryService?.pool); - pool(request: QueryPoolRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - return { - /** Validators queries all validators that match the given status. */QueryValidatorsStore, - /** Validator queries validator info for given validator address. */QueryValidatorStore, - /** ValidatorDelegations queries delegate info for given validator. */QueryValidatorDelegationsStore, - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */QueryValidatorUnbondingDelegationsStore, - /** Delegation queries delegate info for given validator delegator pair. */QueryDelegationStore, - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - QueryUnbondingDelegationStore, - /** DelegatorDelegations queries all delegations of a given delegator address. */QueryDelegatorDelegationsStore, - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - QueryDelegatorUnbondingDelegationsStore, - /** Redelegations queries redelegations of given address. */QueryRedelegationsStore, - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ - QueryDelegatorValidatorsStore, - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - QueryDelegatorValidatorStore, - /** HistoricalInfo queries the historical info for given height. */QueryHistoricalInfoStore, - /** Pool queries the pool info. */QueryPoolStore, - /** Parameters queries the staking parameters. */QueryParamsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/query.ts deleted file mode 100644 index 8e81a8d2..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/query.ts +++ /dev/null @@ -1,3631 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { Validator, ValidatorAmino, ValidatorSDKType, DelegationResponse, DelegationResponseAmino, DelegationResponseSDKType, UnbondingDelegation, UnbondingDelegationAmino, UnbondingDelegationSDKType, RedelegationResponse, RedelegationResponseAmino, RedelegationResponseSDKType, HistoricalInfo, HistoricalInfoAmino, HistoricalInfoSDKType, Pool, PoolAmino, PoolSDKType, Params, ParamsAmino, ParamsSDKType } from "./staking"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequest { - /** status enables to query for validators matching a given status. */ - status: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryValidatorsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest"; - value: Uint8Array; -} -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequestAmino { - /** status enables to query for validators matching a given status. */ - status: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryValidatorsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorsRequest"; - value: QueryValidatorsRequestAmino; -} -/** QueryValidatorsRequest is request type for Query/Validators RPC method. */ -export interface QueryValidatorsRequestSDKType { - status: string; - pagination: PageRequestSDKType | undefined; -} -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponse { - /** validators contains all the queried validators. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryValidatorsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse"; - value: Uint8Array; -} -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponseAmino { - /** validators contains all the queried validators. */ - validators: ValidatorAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryValidatorsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorsResponse"; - value: QueryValidatorsResponseAmino; -} -/** QueryValidatorsResponse is response type for the Query/Validators RPC method */ -export interface QueryValidatorsResponseSDKType { - validators: ValidatorSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -export interface QueryValidatorRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest"; - value: Uint8Array; -} -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequestAmino { - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} -export interface QueryValidatorRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorRequest"; - value: QueryValidatorRequestAmino; -} -/** QueryValidatorRequest is response type for the Query/Validator RPC method */ -export interface QueryValidatorRequestSDKType { - validator_addr: string; -} -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} -export interface QueryValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse"; - value: Uint8Array; -} -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponseAmino { - /** validator defines the the validator info. */ - validator?: ValidatorAmino | undefined; -} -export interface QueryValidatorResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorResponse"; - value: QueryValidatorResponseAmino; -} -/** QueryValidatorResponse is response type for the Query/Validator RPC method */ -export interface QueryValidatorResponseSDKType { - validator: ValidatorSDKType | undefined; -} -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryValidatorDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest"; - value: Uint8Array; -} -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequestAmino { - /** validator_addr defines the validator address to query for. */ - validator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryValidatorDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorDelegationsRequest"; - value: QueryValidatorDelegationsRequestAmino; -} -/** - * QueryValidatorDelegationsRequest is request type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsRequestSDKType { - validator_addr: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponse { - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryValidatorDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse"; - value: Uint8Array; -} -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponseAmino { - delegation_responses: DelegationResponseAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryValidatorDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorDelegationsResponse"; - value: QueryValidatorDelegationsResponseAmino; -} -/** - * QueryValidatorDelegationsResponse is response type for the - * Query/ValidatorDelegations RPC method - */ -export interface QueryValidatorDelegationsResponseSDKType { - delegation_responses: DelegationResponseSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequest { - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryValidatorUnbondingDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest"; - value: Uint8Array; -} -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequestAmino { - /** validator_addr defines the validator address to query for. */ - validator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryValidatorUnbondingDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest"; - value: QueryValidatorUnbondingDelegationsRequestAmino; -} -/** - * QueryValidatorUnbondingDelegationsRequest is required type for the - * Query/ValidatorUnbondingDelegations RPC method - */ -export interface QueryValidatorUnbondingDelegationsRequestSDKType { - validator_addr: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryValidatorUnbondingDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse"; - value: Uint8Array; -} -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponseAmino { - unbonding_responses: UnbondingDelegationAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryValidatorUnbondingDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse"; - value: QueryValidatorUnbondingDelegationsResponseAmino; -} -/** - * QueryValidatorUnbondingDelegationsResponse is response type for the - * Query/ValidatorUnbondingDelegations RPC method. - */ -export interface QueryValidatorUnbondingDelegationsResponseSDKType { - unbonding_responses: UnbondingDelegationSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -export interface QueryDelegationRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest"; - value: Uint8Array; -} -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} -export interface QueryDelegationRequestAminoMsg { - type: "cosmos-sdk/QueryDelegationRequest"; - value: QueryDelegationRequestAmino; -} -/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */ -export interface QueryDelegationRequestSDKType { - delegator_addr: string; - validator_addr: string; -} -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponse { - /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse: DelegationResponse | undefined; -} -export interface QueryDelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse"; - value: Uint8Array; -} -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponseAmino { - /** delegation_responses defines the delegation info of a delegation. */ - delegation_response?: DelegationResponseAmino | undefined; -} -export interface QueryDelegationResponseAminoMsg { - type: "cosmos-sdk/QueryDelegationResponse"; - value: QueryDelegationResponseAmino; -} -/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */ -export interface QueryDelegationResponseSDKType { - delegation_response: DelegationResponseSDKType | undefined; -} -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -export interface QueryUnbondingDelegationRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest"; - value: Uint8Array; -} -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} -export interface QueryUnbondingDelegationRequestAminoMsg { - type: "cosmos-sdk/QueryUnbondingDelegationRequest"; - value: QueryUnbondingDelegationRequestAmino; -} -/** - * QueryUnbondingDelegationRequest is request type for the - * Query/UnbondingDelegation RPC method. - */ -export interface QueryUnbondingDelegationRequestSDKType { - delegator_addr: string; - validator_addr: string; -} -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponse { - /** unbond defines the unbonding information of a delegation. */ - unbond: UnbondingDelegation | undefined; -} -export interface QueryUnbondingDelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse"; - value: Uint8Array; -} -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponseAmino { - /** unbond defines the unbonding information of a delegation. */ - unbond?: UnbondingDelegationAmino | undefined; -} -export interface QueryUnbondingDelegationResponseAminoMsg { - type: "cosmos-sdk/QueryUnbondingDelegationResponse"; - value: QueryUnbondingDelegationResponseAmino; -} -/** - * QueryDelegationResponse is response type for the Query/UnbondingDelegation - * RPC method. - */ -export interface QueryUnbondingDelegationResponseSDKType { - unbond: UnbondingDelegationSDKType | undefined; -} -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDelegatorDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest"; - value: Uint8Array; -} -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDelegatorDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorDelegationsRequest"; - value: QueryDelegatorDelegationsRequestAmino; -} -/** - * QueryDelegatorDelegationsRequest is request type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsRequestSDKType { - delegator_addr: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponse { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegationResponses: DelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDelegatorDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse"; - value: Uint8Array; -} -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponseAmino { - /** delegation_responses defines all the delegations' info of a delegator. */ - delegation_responses: DelegationResponseAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDelegatorDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorDelegationsResponse"; - value: QueryDelegatorDelegationsResponseAmino; -} -/** - * QueryDelegatorDelegationsResponse is response type for the - * Query/DelegatorDelegations RPC method. - */ -export interface QueryDelegatorDelegationsResponseSDKType { - delegation_responses: DelegationResponseSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDelegatorUnbondingDelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest"; - value: Uint8Array; -} -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDelegatorUnbondingDelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest"; - value: QueryDelegatorUnbondingDelegationsRequestAmino; -} -/** - * QueryDelegatorUnbondingDelegationsRequest is request type for the - * Query/DelegatorUnbondingDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsRequestSDKType { - delegator_addr: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponse { - unbondingResponses: UnbondingDelegation[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDelegatorUnbondingDelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse"; - value: Uint8Array; -} -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponseAmino { - unbonding_responses: UnbondingDelegationAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDelegatorUnbondingDelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse"; - value: QueryDelegatorUnbondingDelegationsResponseAmino; -} -/** - * QueryUnbondingDelegatorDelegationsResponse is response type for the - * Query/UnbondingDelegatorDelegations RPC method. - */ -export interface QueryDelegatorUnbondingDelegationsResponseSDKType { - unbonding_responses: UnbondingDelegationSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** src_validator_addr defines the validator address to redelegate from. */ - srcValidatorAddr: string; - /** dst_validator_addr defines the validator address to redelegate to. */ - dstValidatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryRedelegationsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest"; - value: Uint8Array; -} -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** src_validator_addr defines the validator address to redelegate from. */ - src_validator_addr: string; - /** dst_validator_addr defines the validator address to redelegate to. */ - dst_validator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryRedelegationsRequestAminoMsg { - type: "cosmos-sdk/QueryRedelegationsRequest"; - value: QueryRedelegationsRequestAmino; -} -/** - * QueryRedelegationsRequest is request type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsRequestSDKType { - delegator_addr: string; - src_validator_addr: string; - dst_validator_addr: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponse { - redelegationResponses: RedelegationResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryRedelegationsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse"; - value: Uint8Array; -} -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponseAmino { - redelegation_responses: RedelegationResponseAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryRedelegationsResponseAminoMsg { - type: "cosmos-sdk/QueryRedelegationsResponse"; - value: QueryRedelegationsResponseAmino; -} -/** - * QueryRedelegationsResponse is response type for the Query/Redelegations RPC - * method. - */ -export interface QueryRedelegationsResponseSDKType { - redelegation_responses: RedelegationResponseSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDelegatorValidatorsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest"; - value: Uint8Array; -} -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDelegatorValidatorsRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorsRequest"; - value: QueryDelegatorValidatorsRequestAmino; -} -/** - * QueryDelegatorValidatorsRequest is request type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsRequestSDKType { - delegator_addr: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponse { - /** validators defines the the validators' info of a delegator. */ - validators: Validator[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDelegatorValidatorsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse"; - value: Uint8Array; -} -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponseAmino { - /** validators defines the the validators' info of a delegator. */ - validators: ValidatorAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDelegatorValidatorsResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorsResponse"; - value: QueryDelegatorValidatorsResponseAmino; -} -/** - * QueryDelegatorValidatorsResponse is response type for the - * Query/DelegatorValidators RPC method. - */ -export interface QueryDelegatorValidatorsResponseSDKType { - validators: ValidatorSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequest { - /** delegator_addr defines the delegator address to query for. */ - delegatorAddr: string; - /** validator_addr defines the validator address to query for. */ - validatorAddr: string; -} -export interface QueryDelegatorValidatorRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest"; - value: Uint8Array; -} -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequestAmino { - /** delegator_addr defines the delegator address to query for. */ - delegator_addr: string; - /** validator_addr defines the validator address to query for. */ - validator_addr: string; -} -export interface QueryDelegatorValidatorRequestAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorRequest"; - value: QueryDelegatorValidatorRequestAmino; -} -/** - * QueryDelegatorValidatorRequest is request type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorRequestSDKType { - delegator_addr: string; - validator_addr: string; -} -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponse { - /** validator defines the the validator info. */ - validator: Validator | undefined; -} -export interface QueryDelegatorValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse"; - value: Uint8Array; -} -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponseAmino { - /** validator defines the the validator info. */ - validator?: ValidatorAmino | undefined; -} -export interface QueryDelegatorValidatorResponseAminoMsg { - type: "cosmos-sdk/QueryDelegatorValidatorResponse"; - value: QueryDelegatorValidatorResponseAmino; -} -/** - * QueryDelegatorValidatorResponse response type for the - * Query/DelegatorValidator RPC method. - */ -export interface QueryDelegatorValidatorResponseSDKType { - validator: ValidatorSDKType | undefined; -} -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequest { - /** height defines at which height to query the historical info. */ - height: bigint; -} -export interface QueryHistoricalInfoRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest"; - value: Uint8Array; -} -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequestAmino { - /** height defines at which height to query the historical info. */ - height: string; -} -export interface QueryHistoricalInfoRequestAminoMsg { - type: "cosmos-sdk/QueryHistoricalInfoRequest"; - value: QueryHistoricalInfoRequestAmino; -} -/** - * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoRequestSDKType { - height: bigint; -} -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponse { - /** hist defines the historical info at the given height. */ - hist: HistoricalInfo | undefined; -} -export interface QueryHistoricalInfoResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse"; - value: Uint8Array; -} -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponseAmino { - /** hist defines the historical info at the given height. */ - hist?: HistoricalInfoAmino | undefined; -} -export interface QueryHistoricalInfoResponseAminoMsg { - type: "cosmos-sdk/QueryHistoricalInfoResponse"; - value: QueryHistoricalInfoResponseAmino; -} -/** - * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC - * method. - */ -export interface QueryHistoricalInfoResponseSDKType { - hist: HistoricalInfoSDKType | undefined; -} -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequest {} -export interface QueryPoolRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest"; - value: Uint8Array; -} -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequestAmino {} -export interface QueryPoolRequestAminoMsg { - type: "cosmos-sdk/QueryPoolRequest"; - value: QueryPoolRequestAmino; -} -/** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequestSDKType {} -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponse { - /** pool defines the pool info. */ - pool: Pool | undefined; -} -export interface QueryPoolResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse"; - value: Uint8Array; -} -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponseAmino { - /** pool defines the pool info. */ - pool?: PoolAmino | undefined; -} -export interface QueryPoolResponseAminoMsg { - type: "cosmos-sdk/QueryPoolResponse"; - value: QueryPoolResponseAmino; -} -/** QueryPoolResponse is response type for the Query/Pool RPC method. */ -export interface QueryPoolResponseSDKType { - pool: PoolSDKType | undefined; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params holds all the parameters of this module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params holds all the parameters of this module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -function createBaseQueryValidatorsRequest(): QueryValidatorsRequest { - return { - status: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryValidatorsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", - aminoType: "cosmos-sdk/QueryValidatorsRequest", - encode(message: QueryValidatorsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorsRequest { - return { - status: isSet(object.status) ? String(object.status) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorsRequest): unknown { - const obj: any = {}; - message.status !== undefined && (obj.status = message.status); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorsRequest { - const message = createBaseQueryValidatorsRequest(); - message.status = object.status ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorsRequestSDKType): QueryValidatorsRequest { - return { - status: object?.status, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorsRequest): QueryValidatorsRequestSDKType { - const obj: any = {}; - obj.status = message.status; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorsRequestAmino): QueryValidatorsRequest { - return { - status: object.status, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorsRequest): QueryValidatorsRequestAmino { - const obj: any = {}; - obj.status = message.status; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorsRequestAminoMsg): QueryValidatorsRequest { - return QueryValidatorsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorsRequest): QueryValidatorsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorsRequest", - value: QueryValidatorsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorsRequestProtoMsg): QueryValidatorsRequest { - return QueryValidatorsRequest.decode(message.value); - }, - toProto(message: QueryValidatorsRequest): Uint8Array { - return QueryValidatorsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorsRequest): QueryValidatorsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest", - value: QueryValidatorsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { - return { - validators: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryValidatorsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", - aminoType: "cosmos-sdk/QueryValidatorsResponse", - encode(message: QueryValidatorsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorsResponse { - const message = createBaseQueryValidatorsResponse(); - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorsResponseSDKType): QueryValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorsResponse): QueryValidatorsResponseSDKType { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorsResponseAmino): QueryValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorsResponse): QueryValidatorsResponseAmino { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorsResponseAminoMsg): QueryValidatorsResponse { - return QueryValidatorsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorsResponse): QueryValidatorsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorsResponse", - value: QueryValidatorsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorsResponseProtoMsg): QueryValidatorsResponse { - return QueryValidatorsResponse.decode(message.value); - }, - toProto(message: QueryValidatorsResponse): Uint8Array { - return QueryValidatorsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorsResponse): QueryValidatorsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse", - value: QueryValidatorsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorRequest(): QueryValidatorRequest { - return { - validatorAddr: "" - }; -} -export const QueryValidatorRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", - aminoType: "cosmos-sdk/QueryValidatorRequest", - encode(message: QueryValidatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorRequest { - return { - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" - }; - }, - toJSON(message: QueryValidatorRequest): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorRequest { - const message = createBaseQueryValidatorRequest(); - message.validatorAddr = object.validatorAddr ?? ""; - return message; - }, - fromSDK(object: QueryValidatorRequestSDKType): QueryValidatorRequest { - return { - validatorAddr: object?.validator_addr - }; - }, - toSDK(message: QueryValidatorRequest): QueryValidatorRequestSDKType { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAmino(object: QueryValidatorRequestAmino): QueryValidatorRequest { - return { - validatorAddr: object.validator_addr - }; - }, - toAmino(message: QueryValidatorRequest): QueryValidatorRequestAmino { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAminoMsg(object: QueryValidatorRequestAminoMsg): QueryValidatorRequest { - return QueryValidatorRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorRequest): QueryValidatorRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorRequest", - value: QueryValidatorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorRequestProtoMsg): QueryValidatorRequest { - return QueryValidatorRequest.decode(message.value); - }, - toProto(message: QueryValidatorRequest): Uint8Array { - return QueryValidatorRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorRequest): QueryValidatorRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest", - value: QueryValidatorRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorResponse(): QueryValidatorResponse { - return { - validator: Validator.fromPartial({}) - }; -} -export const QueryValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", - aminoType: "cosmos-sdk/QueryValidatorResponse", - encode(message: QueryValidatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorResponse { - return { - validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined - }; - }, - toJSON(message: QueryValidatorResponse): unknown { - const obj: any = {}; - message.validator !== undefined && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorResponse { - const message = createBaseQueryValidatorResponse(); - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - return message; - }, - fromSDK(object: QueryValidatorResponseSDKType): QueryValidatorResponse { - return { - validator: object.validator ? Validator.fromSDK(object.validator) : undefined - }; - }, - toSDK(message: QueryValidatorResponse): QueryValidatorResponseSDKType { - const obj: any = {}; - message.validator !== undefined && (obj.validator = message.validator ? Validator.toSDK(message.validator) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorResponseAmino): QueryValidatorResponse { - return { - validator: object?.validator ? Validator.fromAmino(object.validator) : undefined - }; - }, - toAmino(message: QueryValidatorResponse): QueryValidatorResponseAmino { - const obj: any = {}; - obj.validator = message.validator ? Validator.toAmino(message.validator) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorResponseAminoMsg): QueryValidatorResponse { - return QueryValidatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorResponse): QueryValidatorResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorResponse", - value: QueryValidatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorResponseProtoMsg): QueryValidatorResponse { - return QueryValidatorResponse.decode(message.value); - }, - toProto(message: QueryValidatorResponse): Uint8Array { - return QueryValidatorResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorResponse): QueryValidatorResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse", - value: QueryValidatorResponse.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { - return { - validatorAddr: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryValidatorDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", - aminoType: "cosmos-sdk/QueryValidatorDelegationsRequest", - encode(message: QueryValidatorDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorDelegationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorDelegationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorDelegationsRequest { - return { - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorDelegationsRequest): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorDelegationsRequest { - const message = createBaseQueryValidatorDelegationsRequest(); - message.validatorAddr = object.validatorAddr ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorDelegationsRequestSDKType): QueryValidatorDelegationsRequest { - return { - validatorAddr: object?.validator_addr, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestSDKType { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorDelegationsRequestAmino): QueryValidatorDelegationsRequest { - return { - validatorAddr: object.validator_addr, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestAmino { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorDelegationsRequestAminoMsg): QueryValidatorDelegationsRequest { - return QueryValidatorDelegationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorDelegationsRequest", - value: QueryValidatorDelegationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorDelegationsRequestProtoMsg): QueryValidatorDelegationsRequest { - return QueryValidatorDelegationsRequest.decode(message.value); - }, - toProto(message: QueryValidatorDelegationsRequest): Uint8Array { - return QueryValidatorDelegationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorDelegationsRequest): QueryValidatorDelegationsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", - value: QueryValidatorDelegationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegationsResponse { - return { - delegationResponses: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryValidatorDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", - aminoType: "cosmos-sdk/QueryValidatorDelegationsResponse", - encode(message: QueryValidatorDelegationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorDelegationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorDelegationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorDelegationsResponse { - return { - delegationResponses: Array.isArray(object?.delegationResponses) ? object.delegationResponses.map((e: any) => DelegationResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorDelegationsResponse): unknown { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map(e => e ? DelegationResponse.toJSON(e) : undefined); - } else { - obj.delegationResponses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorDelegationsResponse { - const message = createBaseQueryValidatorDelegationsResponse(); - message.delegationResponses = object.delegationResponses?.map(e => DelegationResponse.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorDelegationsResponseSDKType): QueryValidatorDelegationsResponse { - return { - delegationResponses: Array.isArray(object?.delegation_responses) ? object.delegation_responses.map((e: any) => DelegationResponse.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorDelegationsResponse): QueryValidatorDelegationsResponseSDKType { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegation_responses = message.delegationResponses.map(e => e ? DelegationResponse.toSDK(e) : undefined); - } else { - obj.delegation_responses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorDelegationsResponseAmino): QueryValidatorDelegationsResponse { - return { - delegationResponses: Array.isArray(object?.delegation_responses) ? object.delegation_responses.map((e: any) => DelegationResponse.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorDelegationsResponse): QueryValidatorDelegationsResponseAmino { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegation_responses = message.delegationResponses.map(e => e ? DelegationResponse.toAmino(e) : undefined); - } else { - obj.delegation_responses = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorDelegationsResponseAminoMsg): QueryValidatorDelegationsResponse { - return QueryValidatorDelegationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorDelegationsResponse): QueryValidatorDelegationsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorDelegationsResponse", - value: QueryValidatorDelegationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorDelegationsResponseProtoMsg): QueryValidatorDelegationsResponse { - return QueryValidatorDelegationsResponse.decode(message.value); - }, - toProto(message: QueryValidatorDelegationsResponse): Uint8Array { - return QueryValidatorDelegationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorDelegationsResponse): QueryValidatorDelegationsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", - value: QueryValidatorDelegationsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { - return { - validatorAddr: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryValidatorUnbondingDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", - aminoType: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest", - encode(message: QueryValidatorUnbondingDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddr !== "") { - writer.uint32(10).string(message.validatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorUnbondingDelegationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorUnbondingDelegationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorUnbondingDelegationsRequest { - return { - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorUnbondingDelegationsRequest): unknown { - const obj: any = {}; - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsRequest { - const message = createBaseQueryValidatorUnbondingDelegationsRequest(); - message.validatorAddr = object.validatorAddr ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorUnbondingDelegationsRequestSDKType): QueryValidatorUnbondingDelegationsRequest { - return { - validatorAddr: object?.validator_addr, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestSDKType { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorUnbondingDelegationsRequestAmino): QueryValidatorUnbondingDelegationsRequest { - return { - validatorAddr: object.validator_addr, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestAmino { - const obj: any = {}; - obj.validator_addr = message.validatorAddr; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorUnbondingDelegationsRequestAminoMsg): QueryValidatorUnbondingDelegationsRequest { - return QueryValidatorUnbondingDelegationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest", - value: QueryValidatorUnbondingDelegationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorUnbondingDelegationsRequestProtoMsg): QueryValidatorUnbondingDelegationsRequest { - return QueryValidatorUnbondingDelegationsRequest.decode(message.value); - }, - toProto(message: QueryValidatorUnbondingDelegationsRequest): Uint8Array { - return QueryValidatorUnbondingDelegationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorUnbondingDelegationsRequest): QueryValidatorUnbondingDelegationsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", - value: QueryValidatorUnbondingDelegationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorUnbondingDelegationsResponse { - return { - unbondingResponses: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryValidatorUnbondingDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", - aminoType: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse", - encode(message: QueryValidatorUnbondingDelegationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorUnbondingDelegationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryValidatorUnbondingDelegationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryValidatorUnbondingDelegationsResponse { - return { - unbondingResponses: Array.isArray(object?.unbondingResponses) ? object.unbondingResponses.map((e: any) => UnbondingDelegation.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryValidatorUnbondingDelegationsResponse): unknown { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toJSON(e) : undefined); - } else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryValidatorUnbondingDelegationsResponse { - const message = createBaseQueryValidatorUnbondingDelegationsResponse(); - message.unbondingResponses = object.unbondingResponses?.map(e => UnbondingDelegation.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryValidatorUnbondingDelegationsResponseSDKType): QueryValidatorUnbondingDelegationsResponse { - return { - unbondingResponses: Array.isArray(object?.unbonding_responses) ? object.unbonding_responses.map((e: any) => UnbondingDelegation.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryValidatorUnbondingDelegationsResponse): QueryValidatorUnbondingDelegationsResponseSDKType { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbonding_responses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toSDK(e) : undefined); - } else { - obj.unbonding_responses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryValidatorUnbondingDelegationsResponseAmino): QueryValidatorUnbondingDelegationsResponse { - return { - unbondingResponses: Array.isArray(object?.unbonding_responses) ? object.unbonding_responses.map((e: any) => UnbondingDelegation.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryValidatorUnbondingDelegationsResponse): QueryValidatorUnbondingDelegationsResponseAmino { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbonding_responses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toAmino(e) : undefined); - } else { - obj.unbonding_responses = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryValidatorUnbondingDelegationsResponseAminoMsg): QueryValidatorUnbondingDelegationsResponse { - return QueryValidatorUnbondingDelegationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryValidatorUnbondingDelegationsResponse): QueryValidatorUnbondingDelegationsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse", - value: QueryValidatorUnbondingDelegationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryValidatorUnbondingDelegationsResponseProtoMsg): QueryValidatorUnbondingDelegationsResponse { - return QueryValidatorUnbondingDelegationsResponse.decode(message.value); - }, - toProto(message: QueryValidatorUnbondingDelegationsResponse): Uint8Array { - return QueryValidatorUnbondingDelegationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryValidatorUnbondingDelegationsResponse): QueryValidatorUnbondingDelegationsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", - value: QueryValidatorUnbondingDelegationsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegationRequest(): QueryDelegationRequest { - return { - delegatorAddr: "", - validatorAddr: "" - }; -} -export const QueryDelegationRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", - aminoType: "cosmos-sdk/QueryDelegationRequest", - encode(message: QueryDelegationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegationRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegationRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" - }; - }, - toJSON(message: QueryDelegationRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegationRequest { - const message = createBaseQueryDelegationRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.validatorAddr = object.validatorAddr ?? ""; - return message; - }, - fromSDK(object: QueryDelegationRequestSDKType): QueryDelegationRequest { - return { - delegatorAddr: object?.delegator_addr, - validatorAddr: object?.validator_addr - }; - }, - toSDK(message: QueryDelegationRequest): QueryDelegationRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAmino(object: QueryDelegationRequestAmino): QueryDelegationRequest { - return { - delegatorAddr: object.delegator_addr, - validatorAddr: object.validator_addr - }; - }, - toAmino(message: QueryDelegationRequest): QueryDelegationRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAminoMsg(object: QueryDelegationRequestAminoMsg): QueryDelegationRequest { - return QueryDelegationRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegationRequest): QueryDelegationRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegationRequest", - value: QueryDelegationRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegationRequestProtoMsg): QueryDelegationRequest { - return QueryDelegationRequest.decode(message.value); - }, - toProto(message: QueryDelegationRequest): Uint8Array { - return QueryDelegationRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegationRequest): QueryDelegationRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest", - value: QueryDelegationRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegationResponse(): QueryDelegationResponse { - return { - delegationResponse: DelegationResponse.fromPartial({}) - }; -} -export const QueryDelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", - aminoType: "cosmos-sdk/QueryDelegationResponse", - encode(message: QueryDelegationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegationResponse !== undefined) { - DelegationResponse.encode(message.delegationResponse, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponse = DelegationResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegationResponse { - return { - delegationResponse: isSet(object.delegationResponse) ? DelegationResponse.fromJSON(object.delegationResponse) : undefined - }; - }, - toJSON(message: QueryDelegationResponse): unknown { - const obj: any = {}; - message.delegationResponse !== undefined && (obj.delegationResponse = message.delegationResponse ? DelegationResponse.toJSON(message.delegationResponse) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegationResponse { - const message = createBaseQueryDelegationResponse(); - message.delegationResponse = object.delegationResponse !== undefined && object.delegationResponse !== null ? DelegationResponse.fromPartial(object.delegationResponse) : undefined; - return message; - }, - fromSDK(object: QueryDelegationResponseSDKType): QueryDelegationResponse { - return { - delegationResponse: object.delegation_response ? DelegationResponse.fromSDK(object.delegation_response) : undefined - }; - }, - toSDK(message: QueryDelegationResponse): QueryDelegationResponseSDKType { - const obj: any = {}; - message.delegationResponse !== undefined && (obj.delegation_response = message.delegationResponse ? DelegationResponse.toSDK(message.delegationResponse) : undefined); - return obj; - }, - fromAmino(object: QueryDelegationResponseAmino): QueryDelegationResponse { - return { - delegationResponse: object?.delegation_response ? DelegationResponse.fromAmino(object.delegation_response) : undefined - }; - }, - toAmino(message: QueryDelegationResponse): QueryDelegationResponseAmino { - const obj: any = {}; - obj.delegation_response = message.delegationResponse ? DelegationResponse.toAmino(message.delegationResponse) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegationResponseAminoMsg): QueryDelegationResponse { - return QueryDelegationResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegationResponse): QueryDelegationResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegationResponse", - value: QueryDelegationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegationResponseProtoMsg): QueryDelegationResponse { - return QueryDelegationResponse.decode(message.value); - }, - toProto(message: QueryDelegationResponse): Uint8Array { - return QueryDelegationResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegationResponse): QueryDelegationResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse", - value: QueryDelegationResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { - return { - delegatorAddr: "", - validatorAddr: "" - }; -} -export const QueryUnbondingDelegationRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", - aminoType: "cosmos-sdk/QueryUnbondingDelegationRequest", - encode(message: QueryUnbondingDelegationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnbondingDelegationRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnbondingDelegationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnbondingDelegationRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" - }; - }, - toJSON(message: QueryUnbondingDelegationRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object: DeepPartial): QueryUnbondingDelegationRequest { - const message = createBaseQueryUnbondingDelegationRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.validatorAddr = object.validatorAddr ?? ""; - return message; - }, - fromSDK(object: QueryUnbondingDelegationRequestSDKType): QueryUnbondingDelegationRequest { - return { - delegatorAddr: object?.delegator_addr, - validatorAddr: object?.validator_addr - }; - }, - toSDK(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAmino(object: QueryUnbondingDelegationRequestAmino): QueryUnbondingDelegationRequest { - return { - delegatorAddr: object.delegator_addr, - validatorAddr: object.validator_addr - }; - }, - toAmino(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAminoMsg(object: QueryUnbondingDelegationRequestAminoMsg): QueryUnbondingDelegationRequest { - return QueryUnbondingDelegationRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestAminoMsg { - return { - type: "cosmos-sdk/QueryUnbondingDelegationRequest", - value: QueryUnbondingDelegationRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnbondingDelegationRequestProtoMsg): QueryUnbondingDelegationRequest { - return QueryUnbondingDelegationRequest.decode(message.value); - }, - toProto(message: QueryUnbondingDelegationRequest): Uint8Array { - return QueryUnbondingDelegationRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUnbondingDelegationRequest): QueryUnbondingDelegationRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", - value: QueryUnbondingDelegationRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationResponse { - return { - unbond: UnbondingDelegation.fromPartial({}) - }; -} -export const QueryUnbondingDelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", - aminoType: "cosmos-sdk/QueryUnbondingDelegationResponse", - encode(message: QueryUnbondingDelegationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.unbond !== undefined) { - UnbondingDelegation.encode(message.unbond, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnbondingDelegationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnbondingDelegationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbond = UnbondingDelegation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnbondingDelegationResponse { - return { - unbond: isSet(object.unbond) ? UnbondingDelegation.fromJSON(object.unbond) : undefined - }; - }, - toJSON(message: QueryUnbondingDelegationResponse): unknown { - const obj: any = {}; - message.unbond !== undefined && (obj.unbond = message.unbond ? UnbondingDelegation.toJSON(message.unbond) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryUnbondingDelegationResponse { - const message = createBaseQueryUnbondingDelegationResponse(); - message.unbond = object.unbond !== undefined && object.unbond !== null ? UnbondingDelegation.fromPartial(object.unbond) : undefined; - return message; - }, - fromSDK(object: QueryUnbondingDelegationResponseSDKType): QueryUnbondingDelegationResponse { - return { - unbond: object.unbond ? UnbondingDelegation.fromSDK(object.unbond) : undefined - }; - }, - toSDK(message: QueryUnbondingDelegationResponse): QueryUnbondingDelegationResponseSDKType { - const obj: any = {}; - message.unbond !== undefined && (obj.unbond = message.unbond ? UnbondingDelegation.toSDK(message.unbond) : undefined); - return obj; - }, - fromAmino(object: QueryUnbondingDelegationResponseAmino): QueryUnbondingDelegationResponse { - return { - unbond: object?.unbond ? UnbondingDelegation.fromAmino(object.unbond) : undefined - }; - }, - toAmino(message: QueryUnbondingDelegationResponse): QueryUnbondingDelegationResponseAmino { - const obj: any = {}; - obj.unbond = message.unbond ? UnbondingDelegation.toAmino(message.unbond) : undefined; - return obj; - }, - fromAminoMsg(object: QueryUnbondingDelegationResponseAminoMsg): QueryUnbondingDelegationResponse { - return QueryUnbondingDelegationResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnbondingDelegationResponse): QueryUnbondingDelegationResponseAminoMsg { - return { - type: "cosmos-sdk/QueryUnbondingDelegationResponse", - value: QueryUnbondingDelegationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnbondingDelegationResponseProtoMsg): QueryUnbondingDelegationResponse { - return QueryUnbondingDelegationResponse.decode(message.value); - }, - toProto(message: QueryUnbondingDelegationResponse): Uint8Array { - return QueryUnbondingDelegationResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUnbondingDelegationResponse): QueryUnbondingDelegationResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", - value: QueryUnbondingDelegationResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { - return { - delegatorAddr: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDelegatorDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", - aminoType: "cosmos-sdk/QueryDelegatorDelegationsRequest", - encode(message: QueryDelegatorDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorDelegationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorDelegationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorDelegationsRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDelegatorDelegationsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorDelegationsRequest { - const message = createBaseQueryDelegatorDelegationsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorDelegationsRequestSDKType): QueryDelegatorDelegationsRequest { - return { - delegatorAddr: object?.delegator_addr, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorDelegationsRequestAmino): QueryDelegatorDelegationsRequest { - return { - delegatorAddr: object.delegator_addr, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorDelegationsRequestAminoMsg): QueryDelegatorDelegationsRequest { - return QueryDelegatorDelegationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorDelegationsRequest", - value: QueryDelegatorDelegationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorDelegationsRequestProtoMsg): QueryDelegatorDelegationsRequest { - return QueryDelegatorDelegationsRequest.decode(message.value); - }, - toProto(message: QueryDelegatorDelegationsRequest): Uint8Array { - return QueryDelegatorDelegationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorDelegationsRequest): QueryDelegatorDelegationsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", - value: QueryDelegatorDelegationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegationsResponse { - return { - delegationResponses: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDelegatorDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", - aminoType: "cosmos-sdk/QueryDelegatorDelegationsResponse", - encode(message: QueryDelegatorDelegationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.delegationResponses) { - DelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorDelegationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorDelegationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegationResponses.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorDelegationsResponse { - return { - delegationResponses: Array.isArray(object?.delegationResponses) ? object.delegationResponses.map((e: any) => DelegationResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDelegatorDelegationsResponse): unknown { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegationResponses = message.delegationResponses.map(e => e ? DelegationResponse.toJSON(e) : undefined); - } else { - obj.delegationResponses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorDelegationsResponse { - const message = createBaseQueryDelegatorDelegationsResponse(); - message.delegationResponses = object.delegationResponses?.map(e => DelegationResponse.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorDelegationsResponseSDKType): QueryDelegatorDelegationsResponse { - return { - delegationResponses: Array.isArray(object?.delegation_responses) ? object.delegation_responses.map((e: any) => DelegationResponse.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDelegatorDelegationsResponse): QueryDelegatorDelegationsResponseSDKType { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegation_responses = message.delegationResponses.map(e => e ? DelegationResponse.toSDK(e) : undefined); - } else { - obj.delegation_responses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorDelegationsResponseAmino): QueryDelegatorDelegationsResponse { - return { - delegationResponses: Array.isArray(object?.delegation_responses) ? object.delegation_responses.map((e: any) => DelegationResponse.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDelegatorDelegationsResponse): QueryDelegatorDelegationsResponseAmino { - const obj: any = {}; - if (message.delegationResponses) { - obj.delegation_responses = message.delegationResponses.map(e => e ? DelegationResponse.toAmino(e) : undefined); - } else { - obj.delegation_responses = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorDelegationsResponseAminoMsg): QueryDelegatorDelegationsResponse { - return QueryDelegatorDelegationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorDelegationsResponse): QueryDelegatorDelegationsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorDelegationsResponse", - value: QueryDelegatorDelegationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorDelegationsResponseProtoMsg): QueryDelegatorDelegationsResponse { - return QueryDelegatorDelegationsResponse.decode(message.value); - }, - toProto(message: QueryDelegatorDelegationsResponse): Uint8Array { - return QueryDelegatorDelegationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorDelegationsResponse): QueryDelegatorDelegationsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", - value: QueryDelegatorDelegationsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { - return { - delegatorAddr: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDelegatorUnbondingDelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", - aminoType: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest", - encode(message: QueryDelegatorUnbondingDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorUnbondingDelegationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorUnbondingDelegationsRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDelegatorUnbondingDelegationsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsRequest { - const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorUnbondingDelegationsRequestSDKType): QueryDelegatorUnbondingDelegationsRequest { - return { - delegatorAddr: object?.delegator_addr, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorUnbondingDelegationsRequestAmino): QueryDelegatorUnbondingDelegationsRequest { - return { - delegatorAddr: object.delegator_addr, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorUnbondingDelegationsRequestAminoMsg): QueryDelegatorUnbondingDelegationsRequest { - return QueryDelegatorUnbondingDelegationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest", - value: QueryDelegatorUnbondingDelegationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorUnbondingDelegationsRequestProtoMsg): QueryDelegatorUnbondingDelegationsRequest { - return QueryDelegatorUnbondingDelegationsRequest.decode(message.value); - }, - toProto(message: QueryDelegatorUnbondingDelegationsRequest): Uint8Array { - return QueryDelegatorUnbondingDelegationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorUnbondingDelegationsRequest): QueryDelegatorUnbondingDelegationsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", - value: QueryDelegatorUnbondingDelegationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorUnbondingDelegationsResponse { - return { - unbondingResponses: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDelegatorUnbondingDelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", - aminoType: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse", - encode(message: QueryDelegatorUnbondingDelegationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.unbondingResponses) { - UnbondingDelegation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorUnbondingDelegationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorUnbondingDelegationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingResponses.push(UnbondingDelegation.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorUnbondingDelegationsResponse { - return { - unbondingResponses: Array.isArray(object?.unbondingResponses) ? object.unbondingResponses.map((e: any) => UnbondingDelegation.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDelegatorUnbondingDelegationsResponse): unknown { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbondingResponses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toJSON(e) : undefined); - } else { - obj.unbondingResponses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorUnbondingDelegationsResponse { - const message = createBaseQueryDelegatorUnbondingDelegationsResponse(); - message.unbondingResponses = object.unbondingResponses?.map(e => UnbondingDelegation.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorUnbondingDelegationsResponseSDKType): QueryDelegatorUnbondingDelegationsResponse { - return { - unbondingResponses: Array.isArray(object?.unbonding_responses) ? object.unbonding_responses.map((e: any) => UnbondingDelegation.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDelegatorUnbondingDelegationsResponse): QueryDelegatorUnbondingDelegationsResponseSDKType { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbonding_responses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toSDK(e) : undefined); - } else { - obj.unbonding_responses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorUnbondingDelegationsResponseAmino): QueryDelegatorUnbondingDelegationsResponse { - return { - unbondingResponses: Array.isArray(object?.unbonding_responses) ? object.unbonding_responses.map((e: any) => UnbondingDelegation.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDelegatorUnbondingDelegationsResponse): QueryDelegatorUnbondingDelegationsResponseAmino { - const obj: any = {}; - if (message.unbondingResponses) { - obj.unbonding_responses = message.unbondingResponses.map(e => e ? UnbondingDelegation.toAmino(e) : undefined); - } else { - obj.unbonding_responses = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorUnbondingDelegationsResponseAminoMsg): QueryDelegatorUnbondingDelegationsResponse { - return QueryDelegatorUnbondingDelegationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorUnbondingDelegationsResponse): QueryDelegatorUnbondingDelegationsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse", - value: QueryDelegatorUnbondingDelegationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorUnbondingDelegationsResponseProtoMsg): QueryDelegatorUnbondingDelegationsResponse { - return QueryDelegatorUnbondingDelegationsResponse.decode(message.value); - }, - toProto(message: QueryDelegatorUnbondingDelegationsResponse): Uint8Array { - return QueryDelegatorUnbondingDelegationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorUnbondingDelegationsResponse): QueryDelegatorUnbondingDelegationsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", - value: QueryDelegatorUnbondingDelegationsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { - return { - delegatorAddr: "", - srcValidatorAddr: "", - dstValidatorAddr: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryRedelegationsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", - aminoType: "cosmos-sdk/QueryRedelegationsRequest", - encode(message: QueryRedelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.srcValidatorAddr !== "") { - writer.uint32(18).string(message.srcValidatorAddr); - } - if (message.dstValidatorAddr !== "") { - writer.uint32(26).string(message.dstValidatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryRedelegationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryRedelegationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.srcValidatorAddr = reader.string(); - break; - case 3: - message.dstValidatorAddr = reader.string(); - break; - case 4: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryRedelegationsRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - srcValidatorAddr: isSet(object.srcValidatorAddr) ? String(object.srcValidatorAddr) : "", - dstValidatorAddr: isSet(object.dstValidatorAddr) ? String(object.dstValidatorAddr) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryRedelegationsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.srcValidatorAddr !== undefined && (obj.srcValidatorAddr = message.srcValidatorAddr); - message.dstValidatorAddr !== undefined && (obj.dstValidatorAddr = message.dstValidatorAddr); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryRedelegationsRequest { - const message = createBaseQueryRedelegationsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.srcValidatorAddr = object.srcValidatorAddr ?? ""; - message.dstValidatorAddr = object.dstValidatorAddr ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryRedelegationsRequestSDKType): QueryRedelegationsRequest { - return { - delegatorAddr: object?.delegator_addr, - srcValidatorAddr: object?.src_validator_addr, - dstValidatorAddr: object?.dst_validator_addr, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryRedelegationsRequest): QueryRedelegationsRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.src_validator_addr = message.srcValidatorAddr; - obj.dst_validator_addr = message.dstValidatorAddr; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryRedelegationsRequestAmino): QueryRedelegationsRequest { - return { - delegatorAddr: object.delegator_addr, - srcValidatorAddr: object.src_validator_addr, - dstValidatorAddr: object.dst_validator_addr, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryRedelegationsRequest): QueryRedelegationsRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.src_validator_addr = message.srcValidatorAddr; - obj.dst_validator_addr = message.dstValidatorAddr; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryRedelegationsRequestAminoMsg): QueryRedelegationsRequest { - return QueryRedelegationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryRedelegationsRequest): QueryRedelegationsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryRedelegationsRequest", - value: QueryRedelegationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryRedelegationsRequestProtoMsg): QueryRedelegationsRequest { - return QueryRedelegationsRequest.decode(message.value); - }, - toProto(message: QueryRedelegationsRequest): Uint8Array { - return QueryRedelegationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryRedelegationsRequest): QueryRedelegationsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest", - value: QueryRedelegationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { - return { - redelegationResponses: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryRedelegationsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", - aminoType: "cosmos-sdk/QueryRedelegationsResponse", - encode(message: QueryRedelegationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.redelegationResponses) { - RedelegationResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryRedelegationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryRedelegationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationResponses.push(RedelegationResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryRedelegationsResponse { - return { - redelegationResponses: Array.isArray(object?.redelegationResponses) ? object.redelegationResponses.map((e: any) => RedelegationResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryRedelegationsResponse): unknown { - const obj: any = {}; - if (message.redelegationResponses) { - obj.redelegationResponses = message.redelegationResponses.map(e => e ? RedelegationResponse.toJSON(e) : undefined); - } else { - obj.redelegationResponses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryRedelegationsResponse { - const message = createBaseQueryRedelegationsResponse(); - message.redelegationResponses = object.redelegationResponses?.map(e => RedelegationResponse.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryRedelegationsResponseSDKType): QueryRedelegationsResponse { - return { - redelegationResponses: Array.isArray(object?.redelegation_responses) ? object.redelegation_responses.map((e: any) => RedelegationResponse.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryRedelegationsResponse): QueryRedelegationsResponseSDKType { - const obj: any = {}; - if (message.redelegationResponses) { - obj.redelegation_responses = message.redelegationResponses.map(e => e ? RedelegationResponse.toSDK(e) : undefined); - } else { - obj.redelegation_responses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryRedelegationsResponseAmino): QueryRedelegationsResponse { - return { - redelegationResponses: Array.isArray(object?.redelegation_responses) ? object.redelegation_responses.map((e: any) => RedelegationResponse.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryRedelegationsResponse): QueryRedelegationsResponseAmino { - const obj: any = {}; - if (message.redelegationResponses) { - obj.redelegation_responses = message.redelegationResponses.map(e => e ? RedelegationResponse.toAmino(e) : undefined); - } else { - obj.redelegation_responses = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryRedelegationsResponseAminoMsg): QueryRedelegationsResponse { - return QueryRedelegationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryRedelegationsResponse): QueryRedelegationsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryRedelegationsResponse", - value: QueryRedelegationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryRedelegationsResponseProtoMsg): QueryRedelegationsResponse { - return QueryRedelegationsResponse.decode(message.value); - }, - toProto(message: QueryRedelegationsResponse): Uint8Array { - return QueryRedelegationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryRedelegationsResponse): QueryRedelegationsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse", - value: QueryRedelegationsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { - return { - delegatorAddr: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDelegatorValidatorsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", - aminoType: "cosmos-sdk/QueryDelegatorValidatorsRequest", - encode(message: QueryDelegatorValidatorsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorValidatorsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorValidatorsRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDelegatorValidatorsRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { - const message = createBaseQueryDelegatorValidatorsRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorValidatorsRequestSDKType): QueryDelegatorValidatorsRequest { - return { - delegatorAddr: object?.delegator_addr, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorValidatorsRequestAmino): QueryDelegatorValidatorsRequest { - return { - delegatorAddr: object.delegator_addr, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorValidatorsRequestAminoMsg): QueryDelegatorValidatorsRequest { - return QueryDelegatorValidatorsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorValidatorsRequest", - value: QueryDelegatorValidatorsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorValidatorsRequestProtoMsg): QueryDelegatorValidatorsRequest { - return QueryDelegatorValidatorsRequest.decode(message.value); - }, - toProto(message: QueryDelegatorValidatorsRequest): Uint8Array { - return QueryDelegatorValidatorsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorValidatorsRequest): QueryDelegatorValidatorsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", - value: QueryDelegatorValidatorsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { - return { - validators: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDelegatorValidatorsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", - aminoType: "cosmos-sdk/QueryDelegatorValidatorsResponse", - encode(message: QueryDelegatorValidatorsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorValidatorsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDelegatorValidatorsResponse): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse { - const message = createBaseQueryDelegatorValidatorsResponse(); - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorValidatorsResponseSDKType): QueryDelegatorValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseSDKType { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.validators = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorValidatorsResponseAmino): QueryDelegatorValidatorsResponse { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseAmino { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorValidatorsResponseAminoMsg): QueryDelegatorValidatorsResponse { - return QueryDelegatorValidatorsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorValidatorsResponse", - value: QueryDelegatorValidatorsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorValidatorsResponseProtoMsg): QueryDelegatorValidatorsResponse { - return QueryDelegatorValidatorsResponse.decode(message.value); - }, - toProto(message: QueryDelegatorValidatorsResponse): Uint8Array { - return QueryDelegatorValidatorsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorValidatorsResponse): QueryDelegatorValidatorsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", - value: QueryDelegatorValidatorsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { - return { - delegatorAddr: "", - validatorAddr: "" - }; -} -export const QueryDelegatorValidatorRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", - aminoType: "cosmos-sdk/QueryDelegatorValidatorRequest", - encode(message: QueryDelegatorValidatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddr !== "") { - writer.uint32(10).string(message.delegatorAddr); - } - if (message.validatorAddr !== "") { - writer.uint32(18).string(message.validatorAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorValidatorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorValidatorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddr = reader.string(); - break; - case 2: - message.validatorAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorValidatorRequest { - return { - delegatorAddr: isSet(object.delegatorAddr) ? String(object.delegatorAddr) : "", - validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" - }; - }, - toJSON(message: QueryDelegatorValidatorRequest): unknown { - const obj: any = {}; - message.delegatorAddr !== undefined && (obj.delegatorAddr = message.delegatorAddr); - message.validatorAddr !== undefined && (obj.validatorAddr = message.validatorAddr); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorRequest { - const message = createBaseQueryDelegatorValidatorRequest(); - message.delegatorAddr = object.delegatorAddr ?? ""; - message.validatorAddr = object.validatorAddr ?? ""; - return message; - }, - fromSDK(object: QueryDelegatorValidatorRequestSDKType): QueryDelegatorValidatorRequest { - return { - delegatorAddr: object?.delegator_addr, - validatorAddr: object?.validator_addr - }; - }, - toSDK(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestSDKType { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAmino(object: QueryDelegatorValidatorRequestAmino): QueryDelegatorValidatorRequest { - return { - delegatorAddr: object.delegator_addr, - validatorAddr: object.validator_addr - }; - }, - toAmino(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestAmino { - const obj: any = {}; - obj.delegator_addr = message.delegatorAddr; - obj.validator_addr = message.validatorAddr; - return obj; - }, - fromAminoMsg(object: QueryDelegatorValidatorRequestAminoMsg): QueryDelegatorValidatorRequest { - return QueryDelegatorValidatorRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorValidatorRequest", - value: QueryDelegatorValidatorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorValidatorRequestProtoMsg): QueryDelegatorValidatorRequest { - return QueryDelegatorValidatorRequest.decode(message.value); - }, - toProto(message: QueryDelegatorValidatorRequest): Uint8Array { - return QueryDelegatorValidatorRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorValidatorRequest): QueryDelegatorValidatorRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", - value: QueryDelegatorValidatorRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorResponse { - return { - validator: Validator.fromPartial({}) - }; -} -export const QueryDelegatorValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", - aminoType: "cosmos-sdk/QueryDelegatorValidatorResponse", - encode(message: QueryDelegatorValidatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDelegatorValidatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDelegatorValidatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDelegatorValidatorResponse { - return { - validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined - }; - }, - toJSON(message: QueryDelegatorValidatorResponse): unknown { - const obj: any = {}; - message.validator !== undefined && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorResponse { - const message = createBaseQueryDelegatorValidatorResponse(); - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - return message; - }, - fromSDK(object: QueryDelegatorValidatorResponseSDKType): QueryDelegatorValidatorResponse { - return { - validator: object.validator ? Validator.fromSDK(object.validator) : undefined - }; - }, - toSDK(message: QueryDelegatorValidatorResponse): QueryDelegatorValidatorResponseSDKType { - const obj: any = {}; - message.validator !== undefined && (obj.validator = message.validator ? Validator.toSDK(message.validator) : undefined); - return obj; - }, - fromAmino(object: QueryDelegatorValidatorResponseAmino): QueryDelegatorValidatorResponse { - return { - validator: object?.validator ? Validator.fromAmino(object.validator) : undefined - }; - }, - toAmino(message: QueryDelegatorValidatorResponse): QueryDelegatorValidatorResponseAmino { - const obj: any = {}; - obj.validator = message.validator ? Validator.toAmino(message.validator) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDelegatorValidatorResponseAminoMsg): QueryDelegatorValidatorResponse { - return QueryDelegatorValidatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDelegatorValidatorResponse): QueryDelegatorValidatorResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDelegatorValidatorResponse", - value: QueryDelegatorValidatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDelegatorValidatorResponseProtoMsg): QueryDelegatorValidatorResponse { - return QueryDelegatorValidatorResponse.decode(message.value); - }, - toProto(message: QueryDelegatorValidatorResponse): Uint8Array { - return QueryDelegatorValidatorResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDelegatorValidatorResponse): QueryDelegatorValidatorResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", - value: QueryDelegatorValidatorResponse.encode(message).finish() - }; - } -}; -function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { - return { - height: BigInt(0) - }; -} -export const QueryHistoricalInfoRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", - aminoType: "cosmos-sdk/QueryHistoricalInfoRequest", - encode(message: QueryHistoricalInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryHistoricalInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryHistoricalInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryHistoricalInfoRequest { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryHistoricalInfoRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryHistoricalInfoRequest { - const message = createBaseQueryHistoricalInfoRequest(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryHistoricalInfoRequestSDKType): QueryHistoricalInfoRequest { - return { - height: object?.height - }; - }, - toSDK(message: QueryHistoricalInfoRequest): QueryHistoricalInfoRequestSDKType { - const obj: any = {}; - obj.height = message.height; - return obj; - }, - fromAmino(object: QueryHistoricalInfoRequestAmino): QueryHistoricalInfoRequest { - return { - height: BigInt(object.height) - }; - }, - toAmino(message: QueryHistoricalInfoRequest): QueryHistoricalInfoRequestAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryHistoricalInfoRequestAminoMsg): QueryHistoricalInfoRequest { - return QueryHistoricalInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryHistoricalInfoRequest): QueryHistoricalInfoRequestAminoMsg { - return { - type: "cosmos-sdk/QueryHistoricalInfoRequest", - value: QueryHistoricalInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryHistoricalInfoRequestProtoMsg): QueryHistoricalInfoRequest { - return QueryHistoricalInfoRequest.decode(message.value); - }, - toProto(message: QueryHistoricalInfoRequest): Uint8Array { - return QueryHistoricalInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryHistoricalInfoRequest): QueryHistoricalInfoRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest", - value: QueryHistoricalInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { - return { - hist: HistoricalInfo.fromPartial({}) - }; -} -export const QueryHistoricalInfoResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", - aminoType: "cosmos-sdk/QueryHistoricalInfoResponse", - encode(message: QueryHistoricalInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hist !== undefined) { - HistoricalInfo.encode(message.hist, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryHistoricalInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryHistoricalInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hist = HistoricalInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryHistoricalInfoResponse { - return { - hist: isSet(object.hist) ? HistoricalInfo.fromJSON(object.hist) : undefined - }; - }, - toJSON(message: QueryHistoricalInfoResponse): unknown { - const obj: any = {}; - message.hist !== undefined && (obj.hist = message.hist ? HistoricalInfo.toJSON(message.hist) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryHistoricalInfoResponse { - const message = createBaseQueryHistoricalInfoResponse(); - message.hist = object.hist !== undefined && object.hist !== null ? HistoricalInfo.fromPartial(object.hist) : undefined; - return message; - }, - fromSDK(object: QueryHistoricalInfoResponseSDKType): QueryHistoricalInfoResponse { - return { - hist: object.hist ? HistoricalInfo.fromSDK(object.hist) : undefined - }; - }, - toSDK(message: QueryHistoricalInfoResponse): QueryHistoricalInfoResponseSDKType { - const obj: any = {}; - message.hist !== undefined && (obj.hist = message.hist ? HistoricalInfo.toSDK(message.hist) : undefined); - return obj; - }, - fromAmino(object: QueryHistoricalInfoResponseAmino): QueryHistoricalInfoResponse { - return { - hist: object?.hist ? HistoricalInfo.fromAmino(object.hist) : undefined - }; - }, - toAmino(message: QueryHistoricalInfoResponse): QueryHistoricalInfoResponseAmino { - const obj: any = {}; - obj.hist = message.hist ? HistoricalInfo.toAmino(message.hist) : undefined; - return obj; - }, - fromAminoMsg(object: QueryHistoricalInfoResponseAminoMsg): QueryHistoricalInfoResponse { - return QueryHistoricalInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryHistoricalInfoResponse): QueryHistoricalInfoResponseAminoMsg { - return { - type: "cosmos-sdk/QueryHistoricalInfoResponse", - value: QueryHistoricalInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryHistoricalInfoResponseProtoMsg): QueryHistoricalInfoResponse { - return QueryHistoricalInfoResponse.decode(message.value); - }, - toProto(message: QueryHistoricalInfoResponse): Uint8Array { - return QueryHistoricalInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryHistoricalInfoResponse): QueryHistoricalInfoResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse", - value: QueryHistoricalInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPoolRequest(): QueryPoolRequest { - return {}; -} -export const QueryPoolRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", - aminoType: "cosmos-sdk/QueryPoolRequest", - encode(_: QueryPoolRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryPoolRequest { - return {}; - }, - toJSON(_: QueryPoolRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryPoolRequest { - const message = createBaseQueryPoolRequest(); - return message; - }, - fromSDK(_: QueryPoolRequestSDKType): QueryPoolRequest { - return {}; - }, - toSDK(_: QueryPoolRequest): QueryPoolRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryPoolRequestAmino): QueryPoolRequest { - return {}; - }, - toAmino(_: QueryPoolRequest): QueryPoolRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryPoolRequestAminoMsg): QueryPoolRequest { - return QueryPoolRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolRequest): QueryPoolRequestAminoMsg { - return { - type: "cosmos-sdk/QueryPoolRequest", - value: QueryPoolRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolRequestProtoMsg): QueryPoolRequest { - return QueryPoolRequest.decode(message.value); - }, - toProto(message: QueryPoolRequest): Uint8Array { - return QueryPoolRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolRequest): QueryPoolRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest", - value: QueryPoolRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolResponse(): QueryPoolResponse { - return { - pool: Pool.fromPartial({}) - }; -} -export const QueryPoolResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", - aminoType: "cosmos-sdk/QueryPoolResponse", - encode(message: QueryPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pool !== undefined) { - Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool = Pool.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolResponse { - return { - pool: isSet(object.pool) ? Pool.fromJSON(object.pool) : undefined - }; - }, - toJSON(message: QueryPoolResponse): unknown { - const obj: any = {}; - message.pool !== undefined && (obj.pool = message.pool ? Pool.toJSON(message.pool) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolResponse { - const message = createBaseQueryPoolResponse(); - message.pool = object.pool !== undefined && object.pool !== null ? Pool.fromPartial(object.pool) : undefined; - return message; - }, - fromSDK(object: QueryPoolResponseSDKType): QueryPoolResponse { - return { - pool: object.pool ? Pool.fromSDK(object.pool) : undefined - }; - }, - toSDK(message: QueryPoolResponse): QueryPoolResponseSDKType { - const obj: any = {}; - message.pool !== undefined && (obj.pool = message.pool ? Pool.toSDK(message.pool) : undefined); - return obj; - }, - fromAmino(object: QueryPoolResponseAmino): QueryPoolResponse { - return { - pool: object?.pool ? Pool.fromAmino(object.pool) : undefined - }; - }, - toAmino(message: QueryPoolResponse): QueryPoolResponseAmino { - const obj: any = {}; - obj.pool = message.pool ? Pool.toAmino(message.pool) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolResponseAminoMsg): QueryPoolResponse { - return QueryPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolResponse): QueryPoolResponseAminoMsg { - return { - type: "cosmos-sdk/QueryPoolResponse", - value: QueryPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolResponseProtoMsg): QueryPoolResponse { - return QueryPoolResponse.decode(message.value); - }, - toProto(message: QueryPoolResponse): Uint8Array { - return QueryPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolResponse): QueryPoolResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse", - value: QueryPoolResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/staking.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/staking.ts deleted file mode 100644 index fe0f8e89..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/staking.ts +++ /dev/null @@ -1,3274 +0,0 @@ -//@ts-nocheck -import { Header, HeaderAmino, HeaderSDKType } from "../../../tendermint/types/types"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -import { Decimal } from "@cosmjs/math"; -import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -/** BondStatus is the status of a validator. */ -export enum BondStatus { - /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */ - BOND_STATUS_UNSPECIFIED = 0, - /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */ - BOND_STATUS_UNBONDED = 1, - /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */ - BOND_STATUS_UNBONDING = 2, - /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */ - BOND_STATUS_BONDED = 3, - UNRECOGNIZED = -1, -} -export const BondStatusSDKType = BondStatus; -export const BondStatusAmino = BondStatus; -export function bondStatusFromJSON(object: any): BondStatus { - switch (object) { - case 0: - case "BOND_STATUS_UNSPECIFIED": - return BondStatus.BOND_STATUS_UNSPECIFIED; - case 1: - case "BOND_STATUS_UNBONDED": - return BondStatus.BOND_STATUS_UNBONDED; - case 2: - case "BOND_STATUS_UNBONDING": - return BondStatus.BOND_STATUS_UNBONDING; - case 3: - case "BOND_STATUS_BONDED": - return BondStatus.BOND_STATUS_BONDED; - case -1: - case "UNRECOGNIZED": - default: - return BondStatus.UNRECOGNIZED; - } -} -export function bondStatusToJSON(object: BondStatus): string { - switch (object) { - case BondStatus.BOND_STATUS_UNSPECIFIED: - return "BOND_STATUS_UNSPECIFIED"; - case BondStatus.BOND_STATUS_UNBONDED: - return "BOND_STATUS_UNBONDED"; - case BondStatus.BOND_STATUS_UNBONDING: - return "BOND_STATUS_UNBONDING"; - case BondStatus.BOND_STATUS_BONDED: - return "BOND_STATUS_BONDED"; - case BondStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * HistoricalInfo contains header and validator information for a given block. - * It is stored as part of staking module's state, which persists the `n` most - * recent HistoricalInfo - * (`n` is set by the staking module's `historical_entries` parameter). - */ -export interface HistoricalInfo { - header: Header | undefined; - valset: Validator[]; -} -export interface HistoricalInfoProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo"; - value: Uint8Array; -} -/** - * HistoricalInfo contains header and validator information for a given block. - * It is stored as part of staking module's state, which persists the `n` most - * recent HistoricalInfo - * (`n` is set by the staking module's `historical_entries` parameter). - */ -export interface HistoricalInfoAmino { - header?: HeaderAmino | undefined; - valset: ValidatorAmino[]; -} -export interface HistoricalInfoAminoMsg { - type: "cosmos-sdk/HistoricalInfo"; - value: HistoricalInfoAmino; -} -/** - * HistoricalInfo contains header and validator information for a given block. - * It is stored as part of staking module's state, which persists the `n` most - * recent HistoricalInfo - * (`n` is set by the staking module's `historical_entries` parameter). - */ -export interface HistoricalInfoSDKType { - header: HeaderSDKType | undefined; - valset: ValidatorSDKType[]; -} -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRates { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - maxRate: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - maxChangeRate: string; -} -export interface CommissionRatesProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.CommissionRates"; - value: Uint8Array; -} -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRatesAmino { - /** rate is the commission rate charged to delegators, as a fraction. */ - rate: string; - /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */ - max_rate: string; - /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ - max_change_rate: string; -} -export interface CommissionRatesAminoMsg { - type: "cosmos-sdk/CommissionRates"; - value: CommissionRatesAmino; -} -/** - * CommissionRates defines the initial commission rates to be used for creating - * a validator. - */ -export interface CommissionRatesSDKType { - rate: string; - max_rate: string; - max_change_rate: string; -} -/** Commission defines commission parameters for a given validator. */ -export interface Commission { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates: CommissionRates | undefined; - /** update_time is the last time the commission rate was changed. */ - updateTime: Date | undefined; -} -export interface CommissionProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Commission"; - value: Uint8Array; -} -/** Commission defines commission parameters for a given validator. */ -export interface CommissionAmino { - /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commission_rates?: CommissionRatesAmino | undefined; - /** update_time is the last time the commission rate was changed. */ - update_time?: Date | undefined; -} -export interface CommissionAminoMsg { - type: "cosmos-sdk/Commission"; - value: CommissionAmino; -} -/** Commission defines commission parameters for a given validator. */ -export interface CommissionSDKType { - commission_rates: CommissionRatesSDKType | undefined; - update_time: Date | undefined; -} -/** Description defines a validator description. */ -export interface Description { - /** moniker defines a human-readable name for the validator. */ - moniker: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity: string; - /** website defines an optional website link. */ - website: string; - /** security_contact defines an optional email for security contact. */ - securityContact: string; - /** details define other optional details. */ - details: string; -} -export interface DescriptionProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Description"; - value: Uint8Array; -} -/** Description defines a validator description. */ -export interface DescriptionAmino { - /** moniker defines a human-readable name for the validator. */ - moniker: string; - /** identity defines an optional identity signature (ex. UPort or Keybase). */ - identity: string; - /** website defines an optional website link. */ - website: string; - /** security_contact defines an optional email for security contact. */ - security_contact: string; - /** details define other optional details. */ - details: string; -} -export interface DescriptionAminoMsg { - type: "cosmos-sdk/Description"; - value: DescriptionAmino; -} -/** Description defines a validator description. */ -export interface DescriptionSDKType { - moniker: string; - identity: string; - website: string; - security_contact: string; - details: string; -} -/** - * Validator defines a validator, together with the total amount of the - * Validator's bond shares and their exchange rate to coins. Slashing results in - * a decrease in the exchange rate, allowing correct calculation of future - * undelegations without iterating over delegators. When coins are delegated to - * this validator, the validator is credited with a delegation whose number of - * bond shares is based on the amount of coins delegated divided by the current - * exchange rate. Voting power can be calculated as total bonded shares - * multiplied by exchange rate. - */ -export interface Validator { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operatorAddress: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey: Any | undefined; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status: BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegatorShares: string; - /** description defines the description terms for the validator. */ - description: Description | undefined; - /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ - unbondingHeight: bigint; - /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbondingTime: Date | undefined; - /** commission defines the commission parameters. */ - commission: Commission | undefined; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - minSelfDelegation: string; -} -export interface ValidatorProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Validator"; - value: Uint8Array; -} -/** - * Validator defines a validator, together with the total amount of the - * Validator's bond shares and their exchange rate to coins. Slashing results in - * a decrease in the exchange rate, allowing correct calculation of future - * undelegations without iterating over delegators. When coins are delegated to - * this validator, the validator is credited with a delegation whose number of - * bond shares is based on the amount of coins delegated divided by the current - * exchange rate. Voting power can be calculated as total bonded shares - * multiplied by exchange rate. - */ -export interface ValidatorAmino { - /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ - operator_address: string; - /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensus_pubkey?: AnyAmino | undefined; - /** jailed defined whether the validator has been jailed from bonded status or not. */ - jailed: boolean; - /** status is the validator status (bonded/unbonding/unbonded). */ - status: BondStatus; - /** tokens define the delegated tokens (incl. self-delegation). */ - tokens: string; - /** delegator_shares defines total shares issued to a validator's delegators. */ - delegator_shares: string; - /** description defines the description terms for the validator. */ - description?: DescriptionAmino | undefined; - /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ - unbonding_height: string; - /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbonding_time?: Date | undefined; - /** commission defines the commission parameters. */ - commission?: CommissionAmino | undefined; - /** min_self_delegation is the validator's self declared minimum self delegation. */ - min_self_delegation: string; -} -export interface ValidatorAminoMsg { - type: "cosmos-sdk/Validator"; - value: ValidatorAmino; -} -/** - * Validator defines a validator, together with the total amount of the - * Validator's bond shares and their exchange rate to coins. Slashing results in - * a decrease in the exchange rate, allowing correct calculation of future - * undelegations without iterating over delegators. When coins are delegated to - * this validator, the validator is credited with a delegation whose number of - * bond shares is based on the amount of coins delegated divided by the current - * exchange rate. Voting power can be calculated as total bonded shares - * multiplied by exchange rate. - */ -export interface ValidatorSDKType { - operator_address: string; - consensus_pubkey: AnySDKType | undefined; - jailed: boolean; - status: BondStatus; - tokens: string; - delegator_shares: string; - description: DescriptionSDKType | undefined; - unbonding_height: bigint; - unbonding_time: Date | undefined; - commission: CommissionSDKType | undefined; - min_self_delegation: string; -} -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddresses { - addresses: string[]; -} -export interface ValAddressesProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.ValAddresses"; - value: Uint8Array; -} -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddressesAmino { - addresses: string[]; -} -export interface ValAddressesAminoMsg { - type: "cosmos-sdk/ValAddresses"; - value: ValAddressesAmino; -} -/** ValAddresses defines a repeated set of validator addresses. */ -export interface ValAddressesSDKType { - addresses: string[]; -} -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPair { - delegatorAddress: string; - validatorAddress: string; -} -export interface DVPairProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVPair"; - value: Uint8Array; -} -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPairAmino { - delegator_address: string; - validator_address: string; -} -export interface DVPairAminoMsg { - type: "cosmos-sdk/DVPair"; - value: DVPairAmino; -} -/** - * DVPair is struct that just has a delegator-validator pair with no other data. - * It is intended to be used as a marshalable pointer. For example, a DVPair can - * be used to construct the key to getting an UnbondingDelegation from state. - */ -export interface DVPairSDKType { - delegator_address: string; - validator_address: string; -} -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairs { - pairs: DVPair[]; -} -export interface DVPairsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVPairs"; - value: Uint8Array; -} -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairsAmino { - pairs: DVPairAmino[]; -} -export interface DVPairsAminoMsg { - type: "cosmos-sdk/DVPairs"; - value: DVPairsAmino; -} -/** DVPairs defines an array of DVPair objects. */ -export interface DVPairsSDKType { - pairs: DVPairSDKType[]; -} -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTriplet { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; -} -export interface DVVTripletProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplet"; - value: Uint8Array; -} -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTripletAmino { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; -} -export interface DVVTripletAminoMsg { - type: "cosmos-sdk/DVVTriplet"; - value: DVVTripletAmino; -} -/** - * DVVTriplet is struct that just has a delegator-validator-validator triplet - * with no other data. It is intended to be used as a marshalable pointer. For - * example, a DVVTriplet can be used to construct the key to getting a - * Redelegation from state. - */ -export interface DVVTripletSDKType { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; -} -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTriplets { - triplets: DVVTriplet[]; -} -export interface DVVTripletsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplets"; - value: Uint8Array; -} -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTripletsAmino { - triplets: DVVTripletAmino[]; -} -export interface DVVTripletsAminoMsg { - type: "cosmos-sdk/DVVTriplets"; - value: DVVTripletsAmino; -} -/** DVVTriplets defines an array of DVVTriplet objects. */ -export interface DVVTripletsSDKType { - triplets: DVVTripletSDKType[]; -} -/** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ -export interface Delegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** shares define the delegation shares received. */ - shares: string; -} -export interface DelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Delegation"; - value: Uint8Array; -} -/** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ -export interface DelegationAmino { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address: string; - /** validator_address is the bech32-encoded address of the validator. */ - validator_address: string; - /** shares define the delegation shares received. */ - shares: string; -} -export interface DelegationAminoMsg { - type: "cosmos-sdk/Delegation"; - value: DelegationAmino; -} -/** - * Delegation represents the bond with tokens held by an account. It is - * owned by one delegator, and is associated with the voting power of one - * validator. - */ -export interface DelegationSDKType { - delegator_address: string; - validator_address: string; - shares: string; -} -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_address is the bech32-encoded address of the validator. */ - validatorAddress: string; - /** entries are the unbonding delegation entries. */ - entries: UnbondingDelegationEntry[]; -} -export interface UnbondingDelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation"; - value: Uint8Array; -} -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegationAmino { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address: string; - /** validator_address is the bech32-encoded address of the validator. */ - validator_address: string; - /** entries are the unbonding delegation entries. */ - entries: UnbondingDelegationEntryAmino[]; -} -export interface UnbondingDelegationAminoMsg { - type: "cosmos-sdk/UnbondingDelegation"; - value: UnbondingDelegationAmino; -} -/** - * UnbondingDelegation stores all of a single delegator's unbonding bonds - * for a single validator in an time-ordered list. - */ -export interface UnbondingDelegationSDKType { - delegator_address: string; - validator_address: string; - entries: UnbondingDelegationEntrySDKType[]; -} -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntry { - /** creation_height is the height which the unbonding took place. */ - creationHeight: bigint; - /** completion_time is the unix time for unbonding completion. */ - completionTime: Date | undefined; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initialBalance: string; - /** balance defines the tokens to receive at completion. */ - balance: string; -} -export interface UnbondingDelegationEntryProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry"; - value: Uint8Array; -} -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntryAmino { - /** creation_height is the height which the unbonding took place. */ - creation_height: string; - /** completion_time is the unix time for unbonding completion. */ - completion_time?: Date | undefined; - /** initial_balance defines the tokens initially scheduled to receive at completion. */ - initial_balance: string; - /** balance defines the tokens to receive at completion. */ - balance: string; -} -export interface UnbondingDelegationEntryAminoMsg { - type: "cosmos-sdk/UnbondingDelegationEntry"; - value: UnbondingDelegationEntryAmino; -} -/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */ -export interface UnbondingDelegationEntrySDKType { - creation_height: bigint; - completion_time: Date | undefined; - initial_balance: string; - balance: string; -} -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntry { - /** creation_height defines the height which the redelegation took place. */ - creationHeight: bigint; - /** completion_time defines the unix time for redelegation completion. */ - completionTime: Date | undefined; - /** initial_balance defines the initial balance when redelegation started. */ - initialBalance: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - sharesDst: string; -} -export interface RedelegationEntryProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry"; - value: Uint8Array; -} -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntryAmino { - /** creation_height defines the height which the redelegation took place. */ - creation_height: string; - /** completion_time defines the unix time for redelegation completion. */ - completion_time?: Date | undefined; - /** initial_balance defines the initial balance when redelegation started. */ - initial_balance: string; - /** shares_dst is the amount of destination-validator shares created by redelegation. */ - shares_dst: string; -} -export interface RedelegationEntryAminoMsg { - type: "cosmos-sdk/RedelegationEntry"; - value: RedelegationEntryAmino; -} -/** RedelegationEntry defines a redelegation object with relevant metadata. */ -export interface RedelegationEntrySDKType { - creation_height: bigint; - completion_time: Date | undefined; - initial_balance: string; - shares_dst: string; -} -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface Redelegation { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegatorAddress: string; - /** validator_src_address is the validator redelegation source operator address. */ - validatorSrcAddress: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validatorDstAddress: string; - /** entries are the redelegation entries. */ - entries: RedelegationEntry[]; -} -export interface RedelegationProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Redelegation"; - value: Uint8Array; -} -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface RedelegationAmino { - /** delegator_address is the bech32-encoded address of the delegator. */ - delegator_address: string; - /** validator_src_address is the validator redelegation source operator address. */ - validator_src_address: string; - /** validator_dst_address is the validator redelegation destination operator address. */ - validator_dst_address: string; - /** entries are the redelegation entries. */ - entries: RedelegationEntryAmino[]; -} -export interface RedelegationAminoMsg { - type: "cosmos-sdk/Redelegation"; - value: RedelegationAmino; -} -/** - * Redelegation contains the list of a particular delegator's redelegating bonds - * from a particular source validator to a particular destination validator. - */ -export interface RedelegationSDKType { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; - entries: RedelegationEntrySDKType[]; -} -/** Params defines the parameters for the staking module. */ -export interface Params { - /** unbonding_time is the time duration of unbonding. */ - unbondingTime: Duration | undefined; - /** max_validators is the maximum number of validators. */ - maxValidators: number; - /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */ - maxEntries: number; - /** historical_entries is the number of historical entries to persist. */ - historicalEntries: number; - /** bond_denom defines the bondable coin denomination. */ - bondDenom: string; - /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */ - minCommissionRate: string; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the parameters for the staking module. */ -export interface ParamsAmino { - /** unbonding_time is the time duration of unbonding. */ - unbonding_time?: DurationAmino | undefined; - /** max_validators is the maximum number of validators. */ - max_validators: number; - /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */ - max_entries: number; - /** historical_entries is the number of historical entries to persist. */ - historical_entries: number; - /** bond_denom defines the bondable coin denomination. */ - bond_denom: string; - /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */ - min_commission_rate: string; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params defines the parameters for the staking module. */ -export interface ParamsSDKType { - unbonding_time: DurationSDKType | undefined; - max_validators: number; - max_entries: number; - historical_entries: number; - bond_denom: string; - min_commission_rate: string; -} -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponse { - delegation: Delegation | undefined; - balance: Coin | undefined; -} -export interface DelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.DelegationResponse"; - value: Uint8Array; -} -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponseAmino { - delegation?: DelegationAmino | undefined; - balance?: CoinAmino | undefined; -} -export interface DelegationResponseAminoMsg { - type: "cosmos-sdk/DelegationResponse"; - value: DelegationResponseAmino; -} -/** - * DelegationResponse is equivalent to Delegation except that it contains a - * balance in addition to shares which is more suitable for client responses. - */ -export interface DelegationResponseSDKType { - delegation: DelegationSDKType | undefined; - balance: CoinSDKType | undefined; -} -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponse { - redelegationEntry: RedelegationEntry | undefined; - balance: string; -} -export interface RedelegationEntryResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse"; - value: Uint8Array; -} -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponseAmino { - redelegation_entry?: RedelegationEntryAmino | undefined; - balance: string; -} -export interface RedelegationEntryResponseAminoMsg { - type: "cosmos-sdk/RedelegationEntryResponse"; - value: RedelegationEntryResponseAmino; -} -/** - * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it - * contains a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationEntryResponseSDKType { - redelegation_entry: RedelegationEntrySDKType | undefined; - balance: string; -} -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponse { - redelegation: Redelegation | undefined; - entries: RedelegationEntryResponse[]; -} -export interface RedelegationResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse"; - value: Uint8Array; -} -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponseAmino { - redelegation?: RedelegationAmino | undefined; - entries: RedelegationEntryResponseAmino[]; -} -export interface RedelegationResponseAminoMsg { - type: "cosmos-sdk/RedelegationResponse"; - value: RedelegationResponseAmino; -} -/** - * RedelegationResponse is equivalent to a Redelegation except that its entries - * contain a balance in addition to shares which is more suitable for client - * responses. - */ -export interface RedelegationResponseSDKType { - redelegation: RedelegationSDKType | undefined; - entries: RedelegationEntryResponseSDKType[]; -} -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface Pool { - notBondedTokens: string; - bondedTokens: string; -} -export interface PoolProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.Pool"; - value: Uint8Array; -} -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface PoolAmino { - not_bonded_tokens: string; - bonded_tokens: string; -} -export interface PoolAminoMsg { - type: "cosmos-sdk/Pool"; - value: PoolAmino; -} -/** - * Pool is used for tracking bonded and not-bonded token supply of the bond - * denomination. - */ -export interface PoolSDKType { - not_bonded_tokens: string; - bonded_tokens: string; -} -function createBaseHistoricalInfo(): HistoricalInfo { - return { - header: Header.fromPartial({}), - valset: [] - }; -} -export const HistoricalInfo = { - typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", - aminoType: "cosmos-sdk/HistoricalInfo", - encode(message: HistoricalInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.valset) { - Validator.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HistoricalInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHistoricalInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.valset.push(Validator.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): HistoricalInfo { - return { - header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - valset: Array.isArray(object?.valset) ? object.valset.map((e: any) => Validator.fromJSON(e)) : [] - }; - }, - toJSON(message: HistoricalInfo): unknown { - const obj: any = {}; - message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined); - if (message.valset) { - obj.valset = message.valset.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.valset = []; - } - return obj; - }, - fromPartial(object: DeepPartial): HistoricalInfo { - const message = createBaseHistoricalInfo(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.valset = object.valset?.map(e => Validator.fromPartial(e)) || []; - return message; - }, - fromSDK(object: HistoricalInfoSDKType): HistoricalInfo { - return { - header: object.header ? Header.fromSDK(object.header) : undefined, - valset: Array.isArray(object?.valset) ? object.valset.map((e: any) => Validator.fromSDK(e)) : [] - }; - }, - toSDK(message: HistoricalInfo): HistoricalInfoSDKType { - const obj: any = {}; - message.header !== undefined && (obj.header = message.header ? Header.toSDK(message.header) : undefined); - if (message.valset) { - obj.valset = message.valset.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.valset = []; - } - return obj; - }, - fromAmino(object: HistoricalInfoAmino): HistoricalInfo { - return { - header: object?.header ? Header.fromAmino(object.header) : undefined, - valset: Array.isArray(object?.valset) ? object.valset.map((e: any) => Validator.fromAmino(e)) : [] - }; - }, - toAmino(message: HistoricalInfo): HistoricalInfoAmino { - const obj: any = {}; - obj.header = message.header ? Header.toAmino(message.header) : undefined; - if (message.valset) { - obj.valset = message.valset.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.valset = []; - } - return obj; - }, - fromAminoMsg(object: HistoricalInfoAminoMsg): HistoricalInfo { - return HistoricalInfo.fromAmino(object.value); - }, - toAminoMsg(message: HistoricalInfo): HistoricalInfoAminoMsg { - return { - type: "cosmos-sdk/HistoricalInfo", - value: HistoricalInfo.toAmino(message) - }; - }, - fromProtoMsg(message: HistoricalInfoProtoMsg): HistoricalInfo { - return HistoricalInfo.decode(message.value); - }, - toProto(message: HistoricalInfo): Uint8Array { - return HistoricalInfo.encode(message).finish(); - }, - toProtoMsg(message: HistoricalInfo): HistoricalInfoProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo", - value: HistoricalInfo.encode(message).finish() - }; - } -}; -function createBaseCommissionRates(): CommissionRates { - return { - rate: "", - maxRate: "", - maxChangeRate: "" - }; -} -export const CommissionRates = { - typeUrl: "/cosmos.staking.v1beta1.CommissionRates", - aminoType: "cosmos-sdk/CommissionRates", - encode(message: CommissionRates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.rate !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.rate, 18).atomics); - } - if (message.maxRate !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.maxRate, 18).atomics); - } - if (message.maxChangeRate !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.maxChangeRate, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommissionRates { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommissionRates(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rate = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 2: - message.maxRate = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.maxChangeRate = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommissionRates { - return { - rate: isSet(object.rate) ? String(object.rate) : "", - maxRate: isSet(object.maxRate) ? String(object.maxRate) : "", - maxChangeRate: isSet(object.maxChangeRate) ? String(object.maxChangeRate) : "" - }; - }, - toJSON(message: CommissionRates): unknown { - const obj: any = {}; - message.rate !== undefined && (obj.rate = message.rate); - message.maxRate !== undefined && (obj.maxRate = message.maxRate); - message.maxChangeRate !== undefined && (obj.maxChangeRate = message.maxChangeRate); - return obj; - }, - fromPartial(object: DeepPartial): CommissionRates { - const message = createBaseCommissionRates(); - message.rate = object.rate ?? ""; - message.maxRate = object.maxRate ?? ""; - message.maxChangeRate = object.maxChangeRate ?? ""; - return message; - }, - fromSDK(object: CommissionRatesSDKType): CommissionRates { - return { - rate: object?.rate, - maxRate: object?.max_rate, - maxChangeRate: object?.max_change_rate - }; - }, - toSDK(message: CommissionRates): CommissionRatesSDKType { - const obj: any = {}; - obj.rate = message.rate; - obj.max_rate = message.maxRate; - obj.max_change_rate = message.maxChangeRate; - return obj; - }, - fromAmino(object: CommissionRatesAmino): CommissionRates { - return { - rate: object.rate, - maxRate: object.max_rate, - maxChangeRate: object.max_change_rate - }; - }, - toAmino(message: CommissionRates): CommissionRatesAmino { - const obj: any = {}; - obj.rate = message.rate; - obj.max_rate = message.maxRate; - obj.max_change_rate = message.maxChangeRate; - return obj; - }, - fromAminoMsg(object: CommissionRatesAminoMsg): CommissionRates { - return CommissionRates.fromAmino(object.value); - }, - toAminoMsg(message: CommissionRates): CommissionRatesAminoMsg { - return { - type: "cosmos-sdk/CommissionRates", - value: CommissionRates.toAmino(message) - }; - }, - fromProtoMsg(message: CommissionRatesProtoMsg): CommissionRates { - return CommissionRates.decode(message.value); - }, - toProto(message: CommissionRates): Uint8Array { - return CommissionRates.encode(message).finish(); - }, - toProtoMsg(message: CommissionRates): CommissionRatesProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.CommissionRates", - value: CommissionRates.encode(message).finish() - }; - } -}; -function createBaseCommission(): Commission { - return { - commissionRates: CommissionRates.fromPartial({}), - updateTime: new Date() - }; -} -export const Commission = { - typeUrl: "/cosmos.staking.v1beta1.Commission", - aminoType: "cosmos-sdk/Commission", - encode(message: Commission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.commissionRates !== undefined) { - CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim(); - } - if (message.updateTime !== undefined) { - Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Commission { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommission(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commissionRates = CommissionRates.decode(reader, reader.uint32()); - break; - case 2: - message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Commission { - return { - commissionRates: isSet(object.commissionRates) ? CommissionRates.fromJSON(object.commissionRates) : undefined, - updateTime: isSet(object.updateTime) ? new Date(object.updateTime) : undefined - }; - }, - toJSON(message: Commission): unknown { - const obj: any = {}; - message.commissionRates !== undefined && (obj.commissionRates = message.commissionRates ? CommissionRates.toJSON(message.commissionRates) : undefined); - message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): Commission { - const message = createBaseCommission(); - message.commissionRates = object.commissionRates !== undefined && object.commissionRates !== null ? CommissionRates.fromPartial(object.commissionRates) : undefined; - message.updateTime = object.updateTime ?? undefined; - return message; - }, - fromSDK(object: CommissionSDKType): Commission { - return { - commissionRates: object.commission_rates ? CommissionRates.fromSDK(object.commission_rates) : undefined, - updateTime: object.update_time ?? undefined - }; - }, - toSDK(message: Commission): CommissionSDKType { - const obj: any = {}; - message.commissionRates !== undefined && (obj.commission_rates = message.commissionRates ? CommissionRates.toSDK(message.commissionRates) : undefined); - message.updateTime !== undefined && (obj.update_time = message.updateTime ?? undefined); - return obj; - }, - fromAmino(object: CommissionAmino): Commission { - return { - commissionRates: object?.commission_rates ? CommissionRates.fromAmino(object.commission_rates) : undefined, - updateTime: object.update_time - }; - }, - toAmino(message: Commission): CommissionAmino { - const obj: any = {}; - obj.commission_rates = message.commissionRates ? CommissionRates.toAmino(message.commissionRates) : undefined; - obj.update_time = message.updateTime; - return obj; - }, - fromAminoMsg(object: CommissionAminoMsg): Commission { - return Commission.fromAmino(object.value); - }, - toAminoMsg(message: Commission): CommissionAminoMsg { - return { - type: "cosmos-sdk/Commission", - value: Commission.toAmino(message) - }; - }, - fromProtoMsg(message: CommissionProtoMsg): Commission { - return Commission.decode(message.value); - }, - toProto(message: Commission): Uint8Array { - return Commission.encode(message).finish(); - }, - toProtoMsg(message: Commission): CommissionProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Commission", - value: Commission.encode(message).finish() - }; - } -}; -function createBaseDescription(): Description { - return { - moniker: "", - identity: "", - website: "", - securityContact: "", - details: "" - }; -} -export const Description = { - typeUrl: "/cosmos.staking.v1beta1.Description", - aminoType: "cosmos-sdk/Description", - encode(message: Description, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.moniker !== "") { - writer.uint32(10).string(message.moniker); - } - if (message.identity !== "") { - writer.uint32(18).string(message.identity); - } - if (message.website !== "") { - writer.uint32(26).string(message.website); - } - if (message.securityContact !== "") { - writer.uint32(34).string(message.securityContact); - } - if (message.details !== "") { - writer.uint32(42).string(message.details); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Description { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescription(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moniker = reader.string(); - break; - case 2: - message.identity = reader.string(); - break; - case 3: - message.website = reader.string(); - break; - case 4: - message.securityContact = reader.string(); - break; - case 5: - message.details = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Description { - return { - moniker: isSet(object.moniker) ? String(object.moniker) : "", - identity: isSet(object.identity) ? String(object.identity) : "", - website: isSet(object.website) ? String(object.website) : "", - securityContact: isSet(object.securityContact) ? String(object.securityContact) : "", - details: isSet(object.details) ? String(object.details) : "" - }; - }, - toJSON(message: Description): unknown { - const obj: any = {}; - message.moniker !== undefined && (obj.moniker = message.moniker); - message.identity !== undefined && (obj.identity = message.identity); - message.website !== undefined && (obj.website = message.website); - message.securityContact !== undefined && (obj.securityContact = message.securityContact); - message.details !== undefined && (obj.details = message.details); - return obj; - }, - fromPartial(object: DeepPartial): Description { - const message = createBaseDescription(); - message.moniker = object.moniker ?? ""; - message.identity = object.identity ?? ""; - message.website = object.website ?? ""; - message.securityContact = object.securityContact ?? ""; - message.details = object.details ?? ""; - return message; - }, - fromSDK(object: DescriptionSDKType): Description { - return { - moniker: object?.moniker, - identity: object?.identity, - website: object?.website, - securityContact: object?.security_contact, - details: object?.details - }; - }, - toSDK(message: Description): DescriptionSDKType { - const obj: any = {}; - obj.moniker = message.moniker; - obj.identity = message.identity; - obj.website = message.website; - obj.security_contact = message.securityContact; - obj.details = message.details; - return obj; - }, - fromAmino(object: DescriptionAmino): Description { - return { - moniker: object.moniker, - identity: object.identity, - website: object.website, - securityContact: object.security_contact, - details: object.details - }; - }, - toAmino(message: Description): DescriptionAmino { - const obj: any = {}; - obj.moniker = message.moniker; - obj.identity = message.identity; - obj.website = message.website; - obj.security_contact = message.securityContact; - obj.details = message.details; - return obj; - }, - fromAminoMsg(object: DescriptionAminoMsg): Description { - return Description.fromAmino(object.value); - }, - toAminoMsg(message: Description): DescriptionAminoMsg { - return { - type: "cosmos-sdk/Description", - value: Description.toAmino(message) - }; - }, - fromProtoMsg(message: DescriptionProtoMsg): Description { - return Description.decode(message.value); - }, - toProto(message: Description): Uint8Array { - return Description.encode(message).finish(); - }, - toProtoMsg(message: Description): DescriptionProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Description", - value: Description.encode(message).finish() - }; - } -}; -function createBaseValidator(): Validator { - return { - operatorAddress: "", - consensusPubkey: Any.fromPartial({}), - jailed: false, - status: 0, - tokens: "", - delegatorShares: "", - description: Description.fromPartial({}), - unbondingHeight: BigInt(0), - unbondingTime: new Date(), - commission: Commission.fromPartial({}), - minSelfDelegation: "" - }; -} -export const Validator = { - typeUrl: "/cosmos.staking.v1beta1.Validator", - aminoType: "cosmos-sdk/Validator", - encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.operatorAddress !== "") { - writer.uint32(10).string(message.operatorAddress); - } - if (message.consensusPubkey !== undefined) { - Any.encode(message.consensusPubkey, writer.uint32(18).fork()).ldelim(); - } - if (message.jailed === true) { - writer.uint32(24).bool(message.jailed); - } - if (message.status !== 0) { - writer.uint32(32).int32(message.status); - } - if (message.tokens !== "") { - writer.uint32(42).string(message.tokens); - } - if (message.delegatorShares !== "") { - writer.uint32(50).string(Decimal.fromUserInput(message.delegatorShares, 18).atomics); - } - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(58).fork()).ldelim(); - } - if (message.unbondingHeight !== BigInt(0)) { - writer.uint32(64).int64(message.unbondingHeight); - } - if (message.unbondingTime !== undefined) { - Timestamp.encode(toTimestamp(message.unbondingTime), writer.uint32(74).fork()).ldelim(); - } - if (message.commission !== undefined) { - Commission.encode(message.commission, writer.uint32(82).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(90).string(message.minSelfDelegation); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Validator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operatorAddress = reader.string(); - break; - case 2: - message.consensusPubkey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.jailed = reader.bool(); - break; - case 4: - message.status = (reader.int32() as any); - break; - case 5: - message.tokens = reader.string(); - break; - case 6: - message.delegatorShares = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 7: - message.description = Description.decode(reader, reader.uint32()); - break; - case 8: - message.unbondingHeight = reader.int64(); - break; - case 9: - message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 10: - message.commission = Commission.decode(reader, reader.uint32()); - break; - case 11: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Validator { - return { - operatorAddress: isSet(object.operatorAddress) ? String(object.operatorAddress) : "", - consensusPubkey: isSet(object.consensusPubkey) ? Any.fromJSON(object.consensusPubkey) : undefined, - jailed: isSet(object.jailed) ? Boolean(object.jailed) : false, - status: isSet(object.status) ? bondStatusFromJSON(object.status) : -1, - tokens: isSet(object.tokens) ? String(object.tokens) : "", - delegatorShares: isSet(object.delegatorShares) ? String(object.delegatorShares) : "", - description: isSet(object.description) ? Description.fromJSON(object.description) : undefined, - unbondingHeight: isSet(object.unbondingHeight) ? BigInt(object.unbondingHeight.toString()) : BigInt(0), - unbondingTime: isSet(object.unbondingTime) ? new Date(object.unbondingTime) : undefined, - commission: isSet(object.commission) ? Commission.fromJSON(object.commission) : undefined, - minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "" - }; - }, - toJSON(message: Validator): unknown { - const obj: any = {}; - message.operatorAddress !== undefined && (obj.operatorAddress = message.operatorAddress); - message.consensusPubkey !== undefined && (obj.consensusPubkey = message.consensusPubkey ? Any.toJSON(message.consensusPubkey) : undefined); - message.jailed !== undefined && (obj.jailed = message.jailed); - message.status !== undefined && (obj.status = bondStatusToJSON(message.status)); - message.tokens !== undefined && (obj.tokens = message.tokens); - message.delegatorShares !== undefined && (obj.delegatorShares = message.delegatorShares); - message.description !== undefined && (obj.description = message.description ? Description.toJSON(message.description) : undefined); - message.unbondingHeight !== undefined && (obj.unbondingHeight = (message.unbondingHeight || BigInt(0)).toString()); - message.unbondingTime !== undefined && (obj.unbondingTime = message.unbondingTime.toISOString()); - message.commission !== undefined && (obj.commission = message.commission ? Commission.toJSON(message.commission) : undefined); - message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - fromPartial(object: DeepPartial): Validator { - const message = createBaseValidator(); - message.operatorAddress = object.operatorAddress ?? ""; - message.consensusPubkey = object.consensusPubkey !== undefined && object.consensusPubkey !== null ? Any.fromPartial(object.consensusPubkey) : undefined; - message.jailed = object.jailed ?? false; - message.status = object.status ?? 0; - message.tokens = object.tokens ?? ""; - message.delegatorShares = object.delegatorShares ?? ""; - message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined; - message.unbondingHeight = object.unbondingHeight !== undefined && object.unbondingHeight !== null ? BigInt(object.unbondingHeight.toString()) : BigInt(0); - message.unbondingTime = object.unbondingTime ?? undefined; - message.commission = object.commission !== undefined && object.commission !== null ? Commission.fromPartial(object.commission) : undefined; - message.minSelfDelegation = object.minSelfDelegation ?? ""; - return message; - }, - fromSDK(object: ValidatorSDKType): Validator { - return { - operatorAddress: object?.operator_address, - consensusPubkey: object.consensus_pubkey ? Any.fromSDK(object.consensus_pubkey) : undefined, - jailed: object?.jailed, - status: isSet(object.status) ? bondStatusFromJSON(object.status) : -1, - tokens: object?.tokens, - delegatorShares: object?.delegator_shares, - description: object.description ? Description.fromSDK(object.description) : undefined, - unbondingHeight: object?.unbonding_height, - unbondingTime: object.unbonding_time ?? undefined, - commission: object.commission ? Commission.fromSDK(object.commission) : undefined, - minSelfDelegation: object?.min_self_delegation - }; - }, - toSDK(message: Validator): ValidatorSDKType { - const obj: any = {}; - obj.operator_address = message.operatorAddress; - message.consensusPubkey !== undefined && (obj.consensus_pubkey = message.consensusPubkey ? Any.toSDK(message.consensusPubkey) : undefined); - obj.jailed = message.jailed; - message.status !== undefined && (obj.status = bondStatusToJSON(message.status)); - obj.tokens = message.tokens; - obj.delegator_shares = message.delegatorShares; - message.description !== undefined && (obj.description = message.description ? Description.toSDK(message.description) : undefined); - obj.unbonding_height = message.unbondingHeight; - message.unbondingTime !== undefined && (obj.unbonding_time = message.unbondingTime ?? undefined); - message.commission !== undefined && (obj.commission = message.commission ? Commission.toSDK(message.commission) : undefined); - obj.min_self_delegation = message.minSelfDelegation; - return obj; - }, - fromAmino(object: ValidatorAmino): Validator { - return { - operatorAddress: object.operator_address, - consensusPubkey: object?.consensus_pubkey ? encodePubkey(object.consensus_pubkey) : undefined, - jailed: object.jailed, - status: isSet(object.status) ? bondStatusFromJSON(object.status) : -1, - tokens: object.tokens, - delegatorShares: object.delegator_shares, - description: object?.description ? Description.fromAmino(object.description) : undefined, - unbondingHeight: isSet(object.unbonding_height) ? BigInt(object.unbonding_height) : 0n, - unbondingTime: object.unbonding_time, - commission: object?.commission ? Commission.fromAmino(object.commission) : undefined, - minSelfDelegation: object.min_self_delegation - }; - }, - toAmino(message: Validator): ValidatorAmino { - const obj: any = {}; - obj.operator_address = message.operatorAddress; - obj.consensus_pubkey = message.consensusPubkey ? decodePubkey(message.consensusPubkey) : undefined; - obj.jailed = message.jailed; - obj.status = message.status; - obj.tokens = message.tokens; - obj.delegator_shares = message.delegatorShares; - obj.description = message.description ? Description.toAmino(message.description) : undefined; - obj.unbonding_height = message.unbondingHeight ? message.unbondingHeight.toString() : undefined; - obj.unbonding_time = message.unbondingTime; - obj.commission = message.commission ? Commission.toAmino(message.commission) : undefined; - obj.min_self_delegation = message.minSelfDelegation; - return obj; - }, - fromAminoMsg(object: ValidatorAminoMsg): Validator { - return Validator.fromAmino(object.value); - }, - toAminoMsg(message: Validator): ValidatorAminoMsg { - return { - type: "cosmos-sdk/Validator", - value: Validator.toAmino(message) - }; - }, - fromProtoMsg(message: ValidatorProtoMsg): Validator { - return Validator.decode(message.value); - }, - toProto(message: Validator): Uint8Array { - return Validator.encode(message).finish(); - }, - toProtoMsg(message: Validator): ValidatorProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Validator", - value: Validator.encode(message).finish() - }; - } -}; -function createBaseValAddresses(): ValAddresses { - return { - addresses: [] - }; -} -export const ValAddresses = { - typeUrl: "/cosmos.staking.v1beta1.ValAddresses", - aminoType: "cosmos-sdk/ValAddresses", - encode(message: ValAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.addresses) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValAddresses { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValAddresses(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.addresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValAddresses { - return { - addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ValAddresses): unknown { - const obj: any = {}; - if (message.addresses) { - obj.addresses = message.addresses.map(e => e); - } else { - obj.addresses = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValAddresses { - const message = createBaseValAddresses(); - message.addresses = object.addresses?.map(e => e) || []; - return message; - }, - fromSDK(object: ValAddressesSDKType): ValAddresses { - return { - addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => e) : [] - }; - }, - toSDK(message: ValAddresses): ValAddressesSDKType { - const obj: any = {}; - if (message.addresses) { - obj.addresses = message.addresses.map(e => e); - } else { - obj.addresses = []; - } - return obj; - }, - fromAmino(object: ValAddressesAmino): ValAddresses { - return { - addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => e) : [] - }; - }, - toAmino(message: ValAddresses): ValAddressesAmino { - const obj: any = {}; - if (message.addresses) { - obj.addresses = message.addresses.map(e => e); - } else { - obj.addresses = []; - } - return obj; - }, - fromAminoMsg(object: ValAddressesAminoMsg): ValAddresses { - return ValAddresses.fromAmino(object.value); - }, - toAminoMsg(message: ValAddresses): ValAddressesAminoMsg { - return { - type: "cosmos-sdk/ValAddresses", - value: ValAddresses.toAmino(message) - }; - }, - fromProtoMsg(message: ValAddressesProtoMsg): ValAddresses { - return ValAddresses.decode(message.value); - }, - toProto(message: ValAddresses): Uint8Array { - return ValAddresses.encode(message).finish(); - }, - toProtoMsg(message: ValAddresses): ValAddressesProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.ValAddresses", - value: ValAddresses.encode(message).finish() - }; - } -}; -function createBaseDVPair(): DVPair { - return { - delegatorAddress: "", - validatorAddress: "" - }; -} -export const DVPair = { - typeUrl: "/cosmos.staking.v1beta1.DVPair", - aminoType: "cosmos-sdk/DVPair", - encode(message: DVPair, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DVPair { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDVPair(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DVPair { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" - }; - }, - toJSON(message: DVPair): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): DVPair { - const message = createBaseDVPair(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - return message; - }, - fromSDK(object: DVPairSDKType): DVPair { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address - }; - }, - toSDK(message: DVPair): DVPairSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAmino(object: DVPairAmino): DVPair { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address - }; - }, - toAmino(message: DVPair): DVPairAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - return obj; - }, - fromAminoMsg(object: DVPairAminoMsg): DVPair { - return DVPair.fromAmino(object.value); - }, - toAminoMsg(message: DVPair): DVPairAminoMsg { - return { - type: "cosmos-sdk/DVPair", - value: DVPair.toAmino(message) - }; - }, - fromProtoMsg(message: DVPairProtoMsg): DVPair { - return DVPair.decode(message.value); - }, - toProto(message: DVPair): Uint8Array { - return DVPair.encode(message).finish(); - }, - toProtoMsg(message: DVPair): DVPairProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.DVPair", - value: DVPair.encode(message).finish() - }; - } -}; -function createBaseDVPairs(): DVPairs { - return { - pairs: [] - }; -} -export const DVPairs = { - typeUrl: "/cosmos.staking.v1beta1.DVPairs", - aminoType: "cosmos-sdk/DVPairs", - encode(message: DVPairs, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pairs) { - DVPair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DVPairs { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDVPairs(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pairs.push(DVPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DVPairs { - return { - pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => DVPair.fromJSON(e)) : [] - }; - }, - toJSON(message: DVPairs): unknown { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map(e => e ? DVPair.toJSON(e) : undefined); - } else { - obj.pairs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): DVPairs { - const message = createBaseDVPairs(); - message.pairs = object.pairs?.map(e => DVPair.fromPartial(e)) || []; - return message; - }, - fromSDK(object: DVPairsSDKType): DVPairs { - return { - pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => DVPair.fromSDK(e)) : [] - }; - }, - toSDK(message: DVPairs): DVPairsSDKType { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map(e => e ? DVPair.toSDK(e) : undefined); - } else { - obj.pairs = []; - } - return obj; - }, - fromAmino(object: DVPairsAmino): DVPairs { - return { - pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => DVPair.fromAmino(e)) : [] - }; - }, - toAmino(message: DVPairs): DVPairsAmino { - const obj: any = {}; - if (message.pairs) { - obj.pairs = message.pairs.map(e => e ? DVPair.toAmino(e) : undefined); - } else { - obj.pairs = []; - } - return obj; - }, - fromAminoMsg(object: DVPairsAminoMsg): DVPairs { - return DVPairs.fromAmino(object.value); - }, - toAminoMsg(message: DVPairs): DVPairsAminoMsg { - return { - type: "cosmos-sdk/DVPairs", - value: DVPairs.toAmino(message) - }; - }, - fromProtoMsg(message: DVPairsProtoMsg): DVPairs { - return DVPairs.decode(message.value); - }, - toProto(message: DVPairs): Uint8Array { - return DVPairs.encode(message).finish(); - }, - toProtoMsg(message: DVPairs): DVPairsProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.DVPairs", - value: DVPairs.encode(message).finish() - }; - } -}; -function createBaseDVVTriplet(): DVVTriplet { - return { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "" - }; -} -export const DVVTriplet = { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", - aminoType: "cosmos-sdk/DVVTriplet", - encode(message: DVVTriplet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplet { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDVVTriplet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DVVTriplet { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorSrcAddress: isSet(object.validatorSrcAddress) ? String(object.validatorSrcAddress) : "", - validatorDstAddress: isSet(object.validatorDstAddress) ? String(object.validatorDstAddress) : "" - }; - }, - toJSON(message: DVVTriplet): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress); - return obj; - }, - fromPartial(object: DeepPartial): DVVTriplet { - const message = createBaseDVVTriplet(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorSrcAddress = object.validatorSrcAddress ?? ""; - message.validatorDstAddress = object.validatorDstAddress ?? ""; - return message; - }, - fromSDK(object: DVVTripletSDKType): DVVTriplet { - return { - delegatorAddress: object?.delegator_address, - validatorSrcAddress: object?.validator_src_address, - validatorDstAddress: object?.validator_dst_address - }; - }, - toSDK(message: DVVTriplet): DVVTripletSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - return obj; - }, - fromAmino(object: DVVTripletAmino): DVVTriplet { - return { - delegatorAddress: object.delegator_address, - validatorSrcAddress: object.validator_src_address, - validatorDstAddress: object.validator_dst_address - }; - }, - toAmino(message: DVVTriplet): DVVTripletAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - return obj; - }, - fromAminoMsg(object: DVVTripletAminoMsg): DVVTriplet { - return DVVTriplet.fromAmino(object.value); - }, - toAminoMsg(message: DVVTriplet): DVVTripletAminoMsg { - return { - type: "cosmos-sdk/DVVTriplet", - value: DVVTriplet.toAmino(message) - }; - }, - fromProtoMsg(message: DVVTripletProtoMsg): DVVTriplet { - return DVVTriplet.decode(message.value); - }, - toProto(message: DVVTriplet): Uint8Array { - return DVVTriplet.encode(message).finish(); - }, - toProtoMsg(message: DVVTriplet): DVVTripletProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplet", - value: DVVTriplet.encode(message).finish() - }; - } -}; -function createBaseDVVTriplets(): DVVTriplets { - return { - triplets: [] - }; -} -export const DVVTriplets = { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", - aminoType: "cosmos-sdk/DVVTriplets", - encode(message: DVVTriplets, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.triplets) { - DVVTriplet.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplets { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDVVTriplets(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.triplets.push(DVVTriplet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DVVTriplets { - return { - triplets: Array.isArray(object?.triplets) ? object.triplets.map((e: any) => DVVTriplet.fromJSON(e)) : [] - }; - }, - toJSON(message: DVVTriplets): unknown { - const obj: any = {}; - if (message.triplets) { - obj.triplets = message.triplets.map(e => e ? DVVTriplet.toJSON(e) : undefined); - } else { - obj.triplets = []; - } - return obj; - }, - fromPartial(object: DeepPartial): DVVTriplets { - const message = createBaseDVVTriplets(); - message.triplets = object.triplets?.map(e => DVVTriplet.fromPartial(e)) || []; - return message; - }, - fromSDK(object: DVVTripletsSDKType): DVVTriplets { - return { - triplets: Array.isArray(object?.triplets) ? object.triplets.map((e: any) => DVVTriplet.fromSDK(e)) : [] - }; - }, - toSDK(message: DVVTriplets): DVVTripletsSDKType { - const obj: any = {}; - if (message.triplets) { - obj.triplets = message.triplets.map(e => e ? DVVTriplet.toSDK(e) : undefined); - } else { - obj.triplets = []; - } - return obj; - }, - fromAmino(object: DVVTripletsAmino): DVVTriplets { - return { - triplets: Array.isArray(object?.triplets) ? object.triplets.map((e: any) => DVVTriplet.fromAmino(e)) : [] - }; - }, - toAmino(message: DVVTriplets): DVVTripletsAmino { - const obj: any = {}; - if (message.triplets) { - obj.triplets = message.triplets.map(e => e ? DVVTriplet.toAmino(e) : undefined); - } else { - obj.triplets = []; - } - return obj; - }, - fromAminoMsg(object: DVVTripletsAminoMsg): DVVTriplets { - return DVVTriplets.fromAmino(object.value); - }, - toAminoMsg(message: DVVTriplets): DVVTripletsAminoMsg { - return { - type: "cosmos-sdk/DVVTriplets", - value: DVVTriplets.toAmino(message) - }; - }, - fromProtoMsg(message: DVVTripletsProtoMsg): DVVTriplets { - return DVVTriplets.decode(message.value); - }, - toProto(message: DVVTriplets): Uint8Array { - return DVVTriplets.encode(message).finish(); - }, - toProtoMsg(message: DVVTriplets): DVVTripletsProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.DVVTriplets", - value: DVVTriplets.encode(message).finish() - }; - } -}; -function createBaseDelegation(): Delegation { - return { - delegatorAddress: "", - validatorAddress: "", - shares: "" - }; -} -export const Delegation = { - typeUrl: "/cosmos.staking.v1beta1.Delegation", - aminoType: "cosmos-sdk/Delegation", - encode(message: Delegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.shares !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.shares, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Delegation { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.shares = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Delegation { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - shares: isSet(object.shares) ? String(object.shares) : "" - }; - }, - toJSON(message: Delegation): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.shares !== undefined && (obj.shares = message.shares); - return obj; - }, - fromPartial(object: DeepPartial): Delegation { - const message = createBaseDelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.shares = object.shares ?? ""; - return message; - }, - fromSDK(object: DelegationSDKType): Delegation { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - shares: object?.shares - }; - }, - toSDK(message: Delegation): DelegationSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.shares = message.shares; - return obj; - }, - fromAmino(object: DelegationAmino): Delegation { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - shares: object.shares - }; - }, - toAmino(message: Delegation): DelegationAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.shares = message.shares; - return obj; - }, - fromAminoMsg(object: DelegationAminoMsg): Delegation { - return Delegation.fromAmino(object.value); - }, - toAminoMsg(message: Delegation): DelegationAminoMsg { - return { - type: "cosmos-sdk/Delegation", - value: Delegation.toAmino(message) - }; - }, - fromProtoMsg(message: DelegationProtoMsg): Delegation { - return Delegation.decode(message.value); - }, - toProto(message: Delegation): Uint8Array { - return Delegation.encode(message).finish(); - }, - toProtoMsg(message: Delegation): DelegationProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Delegation", - value: Delegation.encode(message).finish() - }; - } -}; -function createBaseUnbondingDelegation(): UnbondingDelegation { - return { - delegatorAddress: "", - validatorAddress: "", - entries: [] - }; -} -export const UnbondingDelegation = { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", - aminoType: "cosmos-sdk/UnbondingDelegation", - encode(message: UnbondingDelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - for (const v of message.entries) { - UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegation { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUnbondingDelegation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UnbondingDelegation { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => UnbondingDelegationEntry.fromJSON(e)) : [] - }; - }, - toJSON(message: UnbondingDelegation): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - if (message.entries) { - obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toJSON(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromPartial(object: DeepPartial): UnbondingDelegation { - const message = createBaseUnbondingDelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.entries = object.entries?.map(e => UnbondingDelegationEntry.fromPartial(e)) || []; - return message; - }, - fromSDK(object: UnbondingDelegationSDKType): UnbondingDelegation { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => UnbondingDelegationEntry.fromSDK(e)) : [] - }; - }, - toSDK(message: UnbondingDelegation): UnbondingDelegationSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - if (message.entries) { - obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toSDK(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAmino(object: UnbondingDelegationAmino): UnbondingDelegation { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => UnbondingDelegationEntry.fromAmino(e)) : [] - }; - }, - toAmino(message: UnbondingDelegation): UnbondingDelegationAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - if (message.entries) { - obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toAmino(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAminoMsg(object: UnbondingDelegationAminoMsg): UnbondingDelegation { - return UnbondingDelegation.fromAmino(object.value); - }, - toAminoMsg(message: UnbondingDelegation): UnbondingDelegationAminoMsg { - return { - type: "cosmos-sdk/UnbondingDelegation", - value: UnbondingDelegation.toAmino(message) - }; - }, - fromProtoMsg(message: UnbondingDelegationProtoMsg): UnbondingDelegation { - return UnbondingDelegation.decode(message.value); - }, - toProto(message: UnbondingDelegation): Uint8Array { - return UnbondingDelegation.encode(message).finish(); - }, - toProtoMsg(message: UnbondingDelegation): UnbondingDelegationProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation", - value: UnbondingDelegation.encode(message).finish() - }; - } -}; -function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { - return { - creationHeight: BigInt(0), - completionTime: new Date(), - initialBalance: "", - balance: "" - }; -} -export const UnbondingDelegationEntry = { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", - aminoType: "cosmos-sdk/UnbondingDelegationEntry", - encode(message: UnbondingDelegationEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.creationHeight !== BigInt(0)) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegationEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUnbondingDelegationEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = reader.int64(); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UnbondingDelegationEntry { - return { - creationHeight: isSet(object.creationHeight) ? BigInt(object.creationHeight.toString()) : BigInt(0), - completionTime: isSet(object.completionTime) ? new Date(object.completionTime) : undefined, - initialBalance: isSet(object.initialBalance) ? String(object.initialBalance) : "", - balance: isSet(object.balance) ? String(object.balance) : "" - }; - }, - toJSON(message: UnbondingDelegationEntry): unknown { - const obj: any = {}; - message.creationHeight !== undefined && (obj.creationHeight = (message.creationHeight || BigInt(0)).toString()); - message.completionTime !== undefined && (obj.completionTime = message.completionTime.toISOString()); - message.initialBalance !== undefined && (obj.initialBalance = message.initialBalance); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - fromPartial(object: DeepPartial): UnbondingDelegationEntry { - const message = createBaseUnbondingDelegationEntry(); - message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0); - message.completionTime = object.completionTime ?? undefined; - message.initialBalance = object.initialBalance ?? ""; - message.balance = object.balance ?? ""; - return message; - }, - fromSDK(object: UnbondingDelegationEntrySDKType): UnbondingDelegationEntry { - return { - creationHeight: object?.creation_height, - completionTime: object.completion_time ?? undefined, - initialBalance: object?.initial_balance, - balance: object?.balance - }; - }, - toSDK(message: UnbondingDelegationEntry): UnbondingDelegationEntrySDKType { - const obj: any = {}; - obj.creation_height = message.creationHeight; - message.completionTime !== undefined && (obj.completion_time = message.completionTime ?? undefined); - obj.initial_balance = message.initialBalance; - obj.balance = message.balance; - return obj; - }, - fromAmino(object: UnbondingDelegationEntryAmino): UnbondingDelegationEntry { - return { - creationHeight: BigInt(object.creation_height), - completionTime: object.completion_time, - initialBalance: object.initial_balance, - balance: object.balance - }; - }, - toAmino(message: UnbondingDelegationEntry): UnbondingDelegationEntryAmino { - const obj: any = {}; - obj.creation_height = message.creationHeight ? message.creationHeight.toString() : undefined; - obj.completion_time = message.completionTime; - obj.initial_balance = message.initialBalance; - obj.balance = message.balance; - return obj; - }, - fromAminoMsg(object: UnbondingDelegationEntryAminoMsg): UnbondingDelegationEntry { - return UnbondingDelegationEntry.fromAmino(object.value); - }, - toAminoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryAminoMsg { - return { - type: "cosmos-sdk/UnbondingDelegationEntry", - value: UnbondingDelegationEntry.toAmino(message) - }; - }, - fromProtoMsg(message: UnbondingDelegationEntryProtoMsg): UnbondingDelegationEntry { - return UnbondingDelegationEntry.decode(message.value); - }, - toProto(message: UnbondingDelegationEntry): Uint8Array { - return UnbondingDelegationEntry.encode(message).finish(); - }, - toProtoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry", - value: UnbondingDelegationEntry.encode(message).finish() - }; - } -}; -function createBaseRedelegationEntry(): RedelegationEntry { - return { - creationHeight: BigInt(0), - completionTime: new Date(), - initialBalance: "", - sharesDst: "" - }; -} -export const RedelegationEntry = { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", - aminoType: "cosmos-sdk/RedelegationEntry", - encode(message: RedelegationEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.creationHeight !== BigInt(0)) { - writer.uint32(8).int64(message.creationHeight); - } - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim(); - } - if (message.initialBalance !== "") { - writer.uint32(26).string(message.initialBalance); - } - if (message.sharesDst !== "") { - writer.uint32(34).string(Decimal.fromUserInput(message.sharesDst, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRedelegationEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creationHeight = reader.int64(); - break; - case 2: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.initialBalance = reader.string(); - break; - case 4: - message.sharesDst = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RedelegationEntry { - return { - creationHeight: isSet(object.creationHeight) ? BigInt(object.creationHeight.toString()) : BigInt(0), - completionTime: isSet(object.completionTime) ? new Date(object.completionTime) : undefined, - initialBalance: isSet(object.initialBalance) ? String(object.initialBalance) : "", - sharesDst: isSet(object.sharesDst) ? String(object.sharesDst) : "" - }; - }, - toJSON(message: RedelegationEntry): unknown { - const obj: any = {}; - message.creationHeight !== undefined && (obj.creationHeight = (message.creationHeight || BigInt(0)).toString()); - message.completionTime !== undefined && (obj.completionTime = message.completionTime.toISOString()); - message.initialBalance !== undefined && (obj.initialBalance = message.initialBalance); - message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst); - return obj; - }, - fromPartial(object: DeepPartial): RedelegationEntry { - const message = createBaseRedelegationEntry(); - message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0); - message.completionTime = object.completionTime ?? undefined; - message.initialBalance = object.initialBalance ?? ""; - message.sharesDst = object.sharesDst ?? ""; - return message; - }, - fromSDK(object: RedelegationEntrySDKType): RedelegationEntry { - return { - creationHeight: object?.creation_height, - completionTime: object.completion_time ?? undefined, - initialBalance: object?.initial_balance, - sharesDst: object?.shares_dst - }; - }, - toSDK(message: RedelegationEntry): RedelegationEntrySDKType { - const obj: any = {}; - obj.creation_height = message.creationHeight; - message.completionTime !== undefined && (obj.completion_time = message.completionTime ?? undefined); - obj.initial_balance = message.initialBalance; - obj.shares_dst = message.sharesDst; - return obj; - }, - fromAmino(object: RedelegationEntryAmino): RedelegationEntry { - return { - creationHeight: BigInt(object.creation_height), - completionTime: object.completion_time, - initialBalance: object.initial_balance, - sharesDst: object.shares_dst - }; - }, - toAmino(message: RedelegationEntry): RedelegationEntryAmino { - const obj: any = {}; - obj.creation_height = message.creationHeight ? message.creationHeight.toString() : undefined; - obj.completion_time = message.completionTime; - obj.initial_balance = message.initialBalance; - obj.shares_dst = message.sharesDst; - return obj; - }, - fromAminoMsg(object: RedelegationEntryAminoMsg): RedelegationEntry { - return RedelegationEntry.fromAmino(object.value); - }, - toAminoMsg(message: RedelegationEntry): RedelegationEntryAminoMsg { - return { - type: "cosmos-sdk/RedelegationEntry", - value: RedelegationEntry.toAmino(message) - }; - }, - fromProtoMsg(message: RedelegationEntryProtoMsg): RedelegationEntry { - return RedelegationEntry.decode(message.value); - }, - toProto(message: RedelegationEntry): Uint8Array { - return RedelegationEntry.encode(message).finish(); - }, - toProtoMsg(message: RedelegationEntry): RedelegationEntryProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry", - value: RedelegationEntry.encode(message).finish() - }; - } -}; -function createBaseRedelegation(): Redelegation { - return { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", - entries: [] - }; -} -export const Redelegation = { - typeUrl: "/cosmos.staking.v1beta1.Redelegation", - aminoType: "cosmos-sdk/Redelegation", - encode(message: Redelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - for (const v of message.entries) { - RedelegationEntry.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Redelegation { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRedelegation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.entries.push(RedelegationEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Redelegation { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorSrcAddress: isSet(object.validatorSrcAddress) ? String(object.validatorSrcAddress) : "", - validatorDstAddress: isSet(object.validatorDstAddress) ? String(object.validatorDstAddress) : "", - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => RedelegationEntry.fromJSON(e)) : [] - }; - }, - toJSON(message: Redelegation): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress); - if (message.entries) { - obj.entries = message.entries.map(e => e ? RedelegationEntry.toJSON(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Redelegation { - const message = createBaseRedelegation(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorSrcAddress = object.validatorSrcAddress ?? ""; - message.validatorDstAddress = object.validatorDstAddress ?? ""; - message.entries = object.entries?.map(e => RedelegationEntry.fromPartial(e)) || []; - return message; - }, - fromSDK(object: RedelegationSDKType): Redelegation { - return { - delegatorAddress: object?.delegator_address, - validatorSrcAddress: object?.validator_src_address, - validatorDstAddress: object?.validator_dst_address, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => RedelegationEntry.fromSDK(e)) : [] - }; - }, - toSDK(message: Redelegation): RedelegationSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - if (message.entries) { - obj.entries = message.entries.map(e => e ? RedelegationEntry.toSDK(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAmino(object: RedelegationAmino): Redelegation { - return { - delegatorAddress: object.delegator_address, - validatorSrcAddress: object.validator_src_address, - validatorDstAddress: object.validator_dst_address, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => RedelegationEntry.fromAmino(e)) : [] - }; - }, - toAmino(message: Redelegation): RedelegationAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - if (message.entries) { - obj.entries = message.entries.map(e => e ? RedelegationEntry.toAmino(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAminoMsg(object: RedelegationAminoMsg): Redelegation { - return Redelegation.fromAmino(object.value); - }, - toAminoMsg(message: Redelegation): RedelegationAminoMsg { - return { - type: "cosmos-sdk/Redelegation", - value: Redelegation.toAmino(message) - }; - }, - fromProtoMsg(message: RedelegationProtoMsg): Redelegation { - return Redelegation.decode(message.value); - }, - toProto(message: Redelegation): Uint8Array { - return Redelegation.encode(message).finish(); - }, - toProtoMsg(message: Redelegation): RedelegationProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Redelegation", - value: Redelegation.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - unbondingTime: Duration.fromPartial({}), - maxValidators: 0, - maxEntries: 0, - historicalEntries: 0, - bondDenom: "", - minCommissionRate: "" - }; -} -export const Params = { - typeUrl: "/cosmos.staking.v1beta1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.unbondingTime !== undefined) { - Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim(); - } - if (message.maxValidators !== 0) { - writer.uint32(16).uint32(message.maxValidators); - } - if (message.maxEntries !== 0) { - writer.uint32(24).uint32(message.maxEntries); - } - if (message.historicalEntries !== 0) { - writer.uint32(32).uint32(message.historicalEntries); - } - if (message.bondDenom !== "") { - writer.uint32(42).string(message.bondDenom); - } - if (message.minCommissionRate !== "") { - writer.uint32(50).string(Decimal.fromUserInput(message.minCommissionRate, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unbondingTime = Duration.decode(reader, reader.uint32()); - break; - case 2: - message.maxValidators = reader.uint32(); - break; - case 3: - message.maxEntries = reader.uint32(); - break; - case 4: - message.historicalEntries = reader.uint32(); - break; - case 5: - message.bondDenom = reader.string(); - break; - case 6: - message.minCommissionRate = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - unbondingTime: isSet(object.unbondingTime) ? Duration.fromJSON(object.unbondingTime) : undefined, - maxValidators: isSet(object.maxValidators) ? Number(object.maxValidators) : 0, - maxEntries: isSet(object.maxEntries) ? Number(object.maxEntries) : 0, - historicalEntries: isSet(object.historicalEntries) ? Number(object.historicalEntries) : 0, - bondDenom: isSet(object.bondDenom) ? String(object.bondDenom) : "", - minCommissionRate: isSet(object.minCommissionRate) ? String(object.minCommissionRate) : "" - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.unbondingTime !== undefined && (obj.unbondingTime = message.unbondingTime ? Duration.toJSON(message.unbondingTime) : undefined); - message.maxValidators !== undefined && (obj.maxValidators = Math.round(message.maxValidators)); - message.maxEntries !== undefined && (obj.maxEntries = Math.round(message.maxEntries)); - message.historicalEntries !== undefined && (obj.historicalEntries = Math.round(message.historicalEntries)); - message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom); - message.minCommissionRate !== undefined && (obj.minCommissionRate = message.minCommissionRate); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.unbondingTime = object.unbondingTime !== undefined && object.unbondingTime !== null ? Duration.fromPartial(object.unbondingTime) : undefined; - message.maxValidators = object.maxValidators ?? 0; - message.maxEntries = object.maxEntries ?? 0; - message.historicalEntries = object.historicalEntries ?? 0; - message.bondDenom = object.bondDenom ?? ""; - message.minCommissionRate = object.minCommissionRate ?? ""; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - unbondingTime: object.unbonding_time ? Duration.fromSDK(object.unbonding_time) : undefined, - maxValidators: object?.max_validators, - maxEntries: object?.max_entries, - historicalEntries: object?.historical_entries, - bondDenom: object?.bond_denom, - minCommissionRate: object?.min_commission_rate - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - message.unbondingTime !== undefined && (obj.unbonding_time = message.unbondingTime ? Duration.toSDK(message.unbondingTime) : undefined); - obj.max_validators = message.maxValidators; - obj.max_entries = message.maxEntries; - obj.historical_entries = message.historicalEntries; - obj.bond_denom = message.bondDenom; - obj.min_commission_rate = message.minCommissionRate; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - unbondingTime: object?.unbonding_time ? Duration.fromAmino(object.unbonding_time) : undefined, - maxValidators: object.max_validators, - maxEntries: object.max_entries, - historicalEntries: object.historical_entries, - bondDenom: object.bond_denom, - minCommissionRate: object.min_commission_rate - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.unbonding_time = message.unbondingTime ? Duration.toAmino(message.unbondingTime) : undefined; - obj.max_validators = message.maxValidators; - obj.max_entries = message.maxEntries; - obj.historical_entries = message.historicalEntries; - obj.bond_denom = message.bondDenom; - obj.min_commission_rate = message.minCommissionRate; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseDelegationResponse(): DelegationResponse { - return { - delegation: Delegation.fromPartial({}), - balance: Coin.fromPartial({}) - }; -} -export const DelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", - aminoType: "cosmos-sdk/DelegationResponse", - encode(message: DelegationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegation !== undefined) { - Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== undefined) { - Coin.encode(message.balance, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelegationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegation = Delegation.decode(reader, reader.uint32()); - break; - case 2: - message.balance = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DelegationResponse { - return { - delegation: isSet(object.delegation) ? Delegation.fromJSON(object.delegation) : undefined, - balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined - }; - }, - toJSON(message: DelegationResponse): unknown { - const obj: any = {}; - message.delegation !== undefined && (obj.delegation = message.delegation ? Delegation.toJSON(message.delegation) : undefined); - message.balance !== undefined && (obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DelegationResponse { - const message = createBaseDelegationResponse(); - message.delegation = object.delegation !== undefined && object.delegation !== null ? Delegation.fromPartial(object.delegation) : undefined; - message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; - return message; - }, - fromSDK(object: DelegationResponseSDKType): DelegationResponse { - return { - delegation: object.delegation ? Delegation.fromSDK(object.delegation) : undefined, - balance: object.balance ? Coin.fromSDK(object.balance) : undefined - }; - }, - toSDK(message: DelegationResponse): DelegationResponseSDKType { - const obj: any = {}; - message.delegation !== undefined && (obj.delegation = message.delegation ? Delegation.toSDK(message.delegation) : undefined); - message.balance !== undefined && (obj.balance = message.balance ? Coin.toSDK(message.balance) : undefined); - return obj; - }, - fromAmino(object: DelegationResponseAmino): DelegationResponse { - return { - delegation: object?.delegation ? Delegation.fromAmino(object.delegation) : undefined, - balance: object?.balance ? Coin.fromAmino(object.balance) : undefined - }; - }, - toAmino(message: DelegationResponse): DelegationResponseAmino { - const obj: any = {}; - obj.delegation = message.delegation ? Delegation.toAmino(message.delegation) : undefined; - obj.balance = message.balance ? Coin.toAmino(message.balance) : undefined; - return obj; - }, - fromAminoMsg(object: DelegationResponseAminoMsg): DelegationResponse { - return DelegationResponse.fromAmino(object.value); - }, - toAminoMsg(message: DelegationResponse): DelegationResponseAminoMsg { - return { - type: "cosmos-sdk/DelegationResponse", - value: DelegationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: DelegationResponseProtoMsg): DelegationResponse { - return DelegationResponse.decode(message.value); - }, - toProto(message: DelegationResponse): Uint8Array { - return DelegationResponse.encode(message).finish(); - }, - toProtoMsg(message: DelegationResponse): DelegationResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.DelegationResponse", - value: DelegationResponse.encode(message).finish() - }; - } -}; -function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { - return { - redelegationEntry: RedelegationEntry.fromPartial({}), - balance: "" - }; -} -export const RedelegationEntryResponse = { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", - aminoType: "cosmos-sdk/RedelegationEntryResponse", - encode(message: RedelegationEntryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.redelegationEntry !== undefined) { - RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim(); - } - if (message.balance !== "") { - writer.uint32(34).string(message.balance); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntryResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRedelegationEntryResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32()); - break; - case 4: - message.balance = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RedelegationEntryResponse { - return { - redelegationEntry: isSet(object.redelegationEntry) ? RedelegationEntry.fromJSON(object.redelegationEntry) : undefined, - balance: isSet(object.balance) ? String(object.balance) : "" - }; - }, - toJSON(message: RedelegationEntryResponse): unknown { - const obj: any = {}; - message.redelegationEntry !== undefined && (obj.redelegationEntry = message.redelegationEntry ? RedelegationEntry.toJSON(message.redelegationEntry) : undefined); - message.balance !== undefined && (obj.balance = message.balance); - return obj; - }, - fromPartial(object: DeepPartial): RedelegationEntryResponse { - const message = createBaseRedelegationEntryResponse(); - message.redelegationEntry = object.redelegationEntry !== undefined && object.redelegationEntry !== null ? RedelegationEntry.fromPartial(object.redelegationEntry) : undefined; - message.balance = object.balance ?? ""; - return message; - }, - fromSDK(object: RedelegationEntryResponseSDKType): RedelegationEntryResponse { - return { - redelegationEntry: object.redelegation_entry ? RedelegationEntry.fromSDK(object.redelegation_entry) : undefined, - balance: object?.balance - }; - }, - toSDK(message: RedelegationEntryResponse): RedelegationEntryResponseSDKType { - const obj: any = {}; - message.redelegationEntry !== undefined && (obj.redelegation_entry = message.redelegationEntry ? RedelegationEntry.toSDK(message.redelegationEntry) : undefined); - obj.balance = message.balance; - return obj; - }, - fromAmino(object: RedelegationEntryResponseAmino): RedelegationEntryResponse { - return { - redelegationEntry: object?.redelegation_entry ? RedelegationEntry.fromAmino(object.redelegation_entry) : undefined, - balance: object.balance - }; - }, - toAmino(message: RedelegationEntryResponse): RedelegationEntryResponseAmino { - const obj: any = {}; - obj.redelegation_entry = message.redelegationEntry ? RedelegationEntry.toAmino(message.redelegationEntry) : undefined; - obj.balance = message.balance; - return obj; - }, - fromAminoMsg(object: RedelegationEntryResponseAminoMsg): RedelegationEntryResponse { - return RedelegationEntryResponse.fromAmino(object.value); - }, - toAminoMsg(message: RedelegationEntryResponse): RedelegationEntryResponseAminoMsg { - return { - type: "cosmos-sdk/RedelegationEntryResponse", - value: RedelegationEntryResponse.toAmino(message) - }; - }, - fromProtoMsg(message: RedelegationEntryResponseProtoMsg): RedelegationEntryResponse { - return RedelegationEntryResponse.decode(message.value); - }, - toProto(message: RedelegationEntryResponse): Uint8Array { - return RedelegationEntryResponse.encode(message).finish(); - }, - toProtoMsg(message: RedelegationEntryResponse): RedelegationEntryResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse", - value: RedelegationEntryResponse.encode(message).finish() - }; - } -}; -function createBaseRedelegationResponse(): RedelegationResponse { - return { - redelegation: Redelegation.fromPartial({}), - entries: [] - }; -} -export const RedelegationResponse = { - typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", - aminoType: "cosmos-sdk/RedelegationResponse", - encode(message: RedelegationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.redelegation !== undefined) { - Redelegation.encode(message.redelegation, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.entries) { - RedelegationEntryResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RedelegationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRedelegationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.redelegation = Redelegation.decode(reader, reader.uint32()); - break; - case 2: - message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RedelegationResponse { - return { - redelegation: isSet(object.redelegation) ? Redelegation.fromJSON(object.redelegation) : undefined, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => RedelegationEntryResponse.fromJSON(e)) : [] - }; - }, - toJSON(message: RedelegationResponse): unknown { - const obj: any = {}; - message.redelegation !== undefined && (obj.redelegation = message.redelegation ? Redelegation.toJSON(message.redelegation) : undefined); - if (message.entries) { - obj.entries = message.entries.map(e => e ? RedelegationEntryResponse.toJSON(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromPartial(object: DeepPartial): RedelegationResponse { - const message = createBaseRedelegationResponse(); - message.redelegation = object.redelegation !== undefined && object.redelegation !== null ? Redelegation.fromPartial(object.redelegation) : undefined; - message.entries = object.entries?.map(e => RedelegationEntryResponse.fromPartial(e)) || []; - return message; - }, - fromSDK(object: RedelegationResponseSDKType): RedelegationResponse { - return { - redelegation: object.redelegation ? Redelegation.fromSDK(object.redelegation) : undefined, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => RedelegationEntryResponse.fromSDK(e)) : [] - }; - }, - toSDK(message: RedelegationResponse): RedelegationResponseSDKType { - const obj: any = {}; - message.redelegation !== undefined && (obj.redelegation = message.redelegation ? Redelegation.toSDK(message.redelegation) : undefined); - if (message.entries) { - obj.entries = message.entries.map(e => e ? RedelegationEntryResponse.toSDK(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAmino(object: RedelegationResponseAmino): RedelegationResponse { - return { - redelegation: object?.redelegation ? Redelegation.fromAmino(object.redelegation) : undefined, - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => RedelegationEntryResponse.fromAmino(e)) : [] - }; - }, - toAmino(message: RedelegationResponse): RedelegationResponseAmino { - const obj: any = {}; - obj.redelegation = message.redelegation ? Redelegation.toAmino(message.redelegation) : undefined; - if (message.entries) { - obj.entries = message.entries.map(e => e ? RedelegationEntryResponse.toAmino(e) : undefined); - } else { - obj.entries = []; - } - return obj; - }, - fromAminoMsg(object: RedelegationResponseAminoMsg): RedelegationResponse { - return RedelegationResponse.fromAmino(object.value); - }, - toAminoMsg(message: RedelegationResponse): RedelegationResponseAminoMsg { - return { - type: "cosmos-sdk/RedelegationResponse", - value: RedelegationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: RedelegationResponseProtoMsg): RedelegationResponse { - return RedelegationResponse.decode(message.value); - }, - toProto(message: RedelegationResponse): Uint8Array { - return RedelegationResponse.encode(message).finish(); - }, - toProtoMsg(message: RedelegationResponse): RedelegationResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse", - value: RedelegationResponse.encode(message).finish() - }; - } -}; -function createBasePool(): Pool { - return { - notBondedTokens: "", - bondedTokens: "" - }; -} -export const Pool = { - typeUrl: "/cosmos.staking.v1beta1.Pool", - aminoType: "cosmos-sdk/Pool", - encode(message: Pool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.notBondedTokens !== "") { - writer.uint32(10).string(message.notBondedTokens); - } - if (message.bondedTokens !== "") { - writer.uint32(18).string(message.bondedTokens); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Pool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notBondedTokens = reader.string(); - break; - case 2: - message.bondedTokens = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Pool { - return { - notBondedTokens: isSet(object.notBondedTokens) ? String(object.notBondedTokens) : "", - bondedTokens: isSet(object.bondedTokens) ? String(object.bondedTokens) : "" - }; - }, - toJSON(message: Pool): unknown { - const obj: any = {}; - message.notBondedTokens !== undefined && (obj.notBondedTokens = message.notBondedTokens); - message.bondedTokens !== undefined && (obj.bondedTokens = message.bondedTokens); - return obj; - }, - fromPartial(object: DeepPartial): Pool { - const message = createBasePool(); - message.notBondedTokens = object.notBondedTokens ?? ""; - message.bondedTokens = object.bondedTokens ?? ""; - return message; - }, - fromSDK(object: PoolSDKType): Pool { - return { - notBondedTokens: object?.not_bonded_tokens, - bondedTokens: object?.bonded_tokens - }; - }, - toSDK(message: Pool): PoolSDKType { - const obj: any = {}; - obj.not_bonded_tokens = message.notBondedTokens; - obj.bonded_tokens = message.bondedTokens; - return obj; - }, - fromAmino(object: PoolAmino): Pool { - return { - notBondedTokens: object.not_bonded_tokens, - bondedTokens: object.bonded_tokens - }; - }, - toAmino(message: Pool): PoolAmino { - const obj: any = {}; - obj.not_bonded_tokens = message.notBondedTokens; - obj.bonded_tokens = message.bondedTokens; - return obj; - }, - fromAminoMsg(object: PoolAminoMsg): Pool { - return Pool.fromAmino(object.value); - }, - toAminoMsg(message: Pool): PoolAminoMsg { - return { - type: "cosmos-sdk/Pool", - value: Pool.toAmino(message) - }; - }, - fromProtoMsg(message: PoolProtoMsg): Pool { - return Pool.decode(message.value); - }, - toProto(message: Pool): Uint8Array { - return Pool.encode(message).finish(); - }, - toProtoMsg(message: Pool): PoolProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.Pool", - value: Pool.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.amino.ts deleted file mode 100644 index 15942672..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.amino.ts +++ /dev/null @@ -1,29 +0,0 @@ -//@ts-nocheck -import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate } from "./tx"; -export const AminoConverter = { - "/cosmos.staking.v1beta1.MsgCreateValidator": { - aminoType: "cosmos-sdk/MsgCreateValidator", - toAmino: MsgCreateValidator.toAmino, - fromAmino: MsgCreateValidator.fromAmino - }, - "/cosmos.staking.v1beta1.MsgEditValidator": { - aminoType: "cosmos-sdk/MsgEditValidator", - toAmino: MsgEditValidator.toAmino, - fromAmino: MsgEditValidator.fromAmino - }, - "/cosmos.staking.v1beta1.MsgDelegate": { - aminoType: "cosmos-sdk/MsgDelegate", - toAmino: MsgDelegate.toAmino, - fromAmino: MsgDelegate.fromAmino - }, - "/cosmos.staking.v1beta1.MsgBeginRedelegate": { - aminoType: "cosmos-sdk/MsgBeginRedelegate", - toAmino: MsgBeginRedelegate.toAmino, - fromAmino: MsgBeginRedelegate.fromAmino - }, - "/cosmos.staking.v1beta1.MsgUndelegate": { - aminoType: "cosmos-sdk/MsgUndelegate", - toAmino: MsgUndelegate.toAmino, - fromAmino: MsgUndelegate.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.registry.ts deleted file mode 100644 index 63f7a905..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.registry.ts +++ /dev/null @@ -1,171 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createValidator(value: MsgCreateValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - value: MsgCreateValidator.encode(value).finish() - }; - }, - editValidator(value: MsgEditValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - value: MsgEditValidator.encode(value).finish() - }; - }, - delegate(value: MsgDelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - value: MsgDelegate.encode(value).finish() - }; - }, - beginRedelegate(value: MsgBeginRedelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - value: MsgBeginRedelegate.encode(value).finish() - }; - }, - undelegate(value: MsgUndelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - value: MsgUndelegate.encode(value).finish() - }; - } - }, - withTypeUrl: { - createValidator(value: MsgCreateValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - value - }; - }, - editValidator(value: MsgEditValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - value - }; - }, - delegate(value: MsgDelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - value - }; - }, - beginRedelegate(value: MsgBeginRedelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - value - }; - }, - undelegate(value: MsgUndelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - value - }; - } - }, - toJSON: { - createValidator(value: MsgCreateValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - value: MsgCreateValidator.toJSON(value) - }; - }, - editValidator(value: MsgEditValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - value: MsgEditValidator.toJSON(value) - }; - }, - delegate(value: MsgDelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - value: MsgDelegate.toJSON(value) - }; - }, - beginRedelegate(value: MsgBeginRedelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - value: MsgBeginRedelegate.toJSON(value) - }; - }, - undelegate(value: MsgUndelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - value: MsgUndelegate.toJSON(value) - }; - } - }, - fromJSON: { - createValidator(value: any) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - value: MsgCreateValidator.fromJSON(value) - }; - }, - editValidator(value: any) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - value: MsgEditValidator.fromJSON(value) - }; - }, - delegate(value: any) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - value: MsgDelegate.fromJSON(value) - }; - }, - beginRedelegate(value: any) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - value: MsgBeginRedelegate.fromJSON(value) - }; - }, - undelegate(value: any) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - value: MsgUndelegate.fromJSON(value) - }; - } - }, - fromPartial: { - createValidator(value: MsgCreateValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - value: MsgCreateValidator.fromPartial(value) - }; - }, - editValidator(value: MsgEditValidator) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - value: MsgEditValidator.fromPartial(value) - }; - }, - delegate(value: MsgDelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - value: MsgDelegate.fromPartial(value) - }; - }, - beginRedelegate(value: MsgBeginRedelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - value: MsgBeginRedelegate.fromPartial(value) - }; - }, - undelegate(value: MsgUndelegate) { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - value: MsgUndelegate.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index bc68ae5b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgCreateValidator, MsgCreateValidatorResponse, MsgEditValidator, MsgEditValidatorResponse, MsgDelegate, MsgDelegateResponse, MsgBeginRedelegate, MsgBeginRedelegateResponse, MsgUndelegate, MsgUndelegateResponse } from "./tx"; -/** Msg defines the staking Msg service. */ -export interface Msg { - /** CreateValidator defines a method for creating a new validator. */ - createValidator(request: MsgCreateValidator): Promise; - /** EditValidator defines a method for editing an existing validator. */ - editValidator(request: MsgEditValidator): Promise; - /** - * Delegate defines a method for performing a delegation of coins - * from a delegator to a validator. - */ - delegate(request: MsgDelegate): Promise; - /** - * BeginRedelegate defines a method for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ - beginRedelegate(request: MsgBeginRedelegate): Promise; - /** - * Undelegate defines a method for performing an undelegation from a - * delegate and a validator. - */ - undelegate(request: MsgUndelegate): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createValidator = this.createValidator.bind(this); - this.editValidator = this.editValidator.bind(this); - this.delegate = this.delegate.bind(this); - this.beginRedelegate = this.beginRedelegate.bind(this); - this.undelegate = this.undelegate.bind(this); - } - createValidator(request: MsgCreateValidator): Promise { - const data = MsgCreateValidator.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "CreateValidator", data); - return promise.then(data => MsgCreateValidatorResponse.decode(new BinaryReader(data))); - } - editValidator(request: MsgEditValidator): Promise { - const data = MsgEditValidator.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "EditValidator", data); - return promise.then(data => MsgEditValidatorResponse.decode(new BinaryReader(data))); - } - delegate(request: MsgDelegate): Promise { - const data = MsgDelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "Delegate", data); - return promise.then(data => MsgDelegateResponse.decode(new BinaryReader(data))); - } - beginRedelegate(request: MsgBeginRedelegate): Promise { - const data = MsgBeginRedelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "BeginRedelegate", data); - return promise.then(data => MsgBeginRedelegateResponse.decode(new BinaryReader(data))); - } - undelegate(request: MsgUndelegate): Promise { - const data = MsgUndelegate.encode(request).finish(); - const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "Undelegate", data); - return promise.then(data => MsgUndelegateResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.ts deleted file mode 100644 index a15526ec..00000000 --- a/examples/interchainjs/src/codegen/cosmos/staking/v1beta1/tx.ts +++ /dev/null @@ -1,1328 +0,0 @@ -//@ts-nocheck -import { Description, DescriptionAmino, DescriptionSDKType, CommissionRates, CommissionRatesAmino, CommissionRatesSDKType } from "./staking"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers"; -import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing"; -import { Decimal } from "@cosmjs/math"; -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidator { - description: Description | undefined; - commission: CommissionRates | undefined; - minSelfDelegation: string; - delegatorAddress: string; - validatorAddress: string; - pubkey: Any | undefined; - value: Coin | undefined; -} -export interface MsgCreateValidatorProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator"; - value: Uint8Array; -} -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidatorAmino { - description?: DescriptionAmino | undefined; - commission?: CommissionRatesAmino | undefined; - min_self_delegation: string; - delegator_address: string; - validator_address: string; - pubkey?: AnyAmino | undefined; - value?: CoinAmino | undefined; -} -export interface MsgCreateValidatorAminoMsg { - type: "cosmos-sdk/MsgCreateValidator"; - value: MsgCreateValidatorAmino; -} -/** MsgCreateValidator defines a SDK message for creating a new validator. */ -export interface MsgCreateValidatorSDKType { - description: DescriptionSDKType | undefined; - commission: CommissionRatesSDKType | undefined; - min_self_delegation: string; - delegator_address: string; - validator_address: string; - pubkey: AnySDKType | undefined; - value: CoinSDKType | undefined; -} -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponse {} -export interface MsgCreateValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse"; - value: Uint8Array; -} -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponseAmino {} -export interface MsgCreateValidatorResponseAminoMsg { - type: "cosmos-sdk/MsgCreateValidatorResponse"; - value: MsgCreateValidatorResponseAmino; -} -/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponseSDKType {} -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidator { - description: Description | undefined; - validatorAddress: string; - /** - * We pass a reference to the new commission rate and min self delegation as - * it's not mandatory to update. If not updated, the deserialized rate will be - * zero with no way to distinguish if an update was intended. - * REF: #2373 - */ - commissionRate: string; - minSelfDelegation: string; -} -export interface MsgEditValidatorProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator"; - value: Uint8Array; -} -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidatorAmino { - description?: DescriptionAmino | undefined; - validator_address: string; - /** - * We pass a reference to the new commission rate and min self delegation as - * it's not mandatory to update. If not updated, the deserialized rate will be - * zero with no way to distinguish if an update was intended. - * REF: #2373 - */ - commission_rate: string; - min_self_delegation: string; -} -export interface MsgEditValidatorAminoMsg { - type: "cosmos-sdk/MsgEditValidator"; - value: MsgEditValidatorAmino; -} -/** MsgEditValidator defines a SDK message for editing an existing validator. */ -export interface MsgEditValidatorSDKType { - description: DescriptionSDKType | undefined; - validator_address: string; - commission_rate: string; - min_self_delegation: string; -} -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponse {} -export interface MsgEditValidatorResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse"; - value: Uint8Array; -} -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponseAmino {} -export interface MsgEditValidatorResponseAminoMsg { - type: "cosmos-sdk/MsgEditValidatorResponse"; - value: MsgEditValidatorResponseAmino; -} -/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */ -export interface MsgEditValidatorResponseSDKType {} -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} -export interface MsgDelegateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate"; - value: Uint8Array; -} -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegateAmino { - delegator_address: string; - validator_address: string; - amount?: CoinAmino | undefined; -} -export interface MsgDelegateAminoMsg { - type: "cosmos-sdk/MsgDelegate"; - value: MsgDelegateAmino; -} -/** - * MsgDelegate defines a SDK message for performing a delegation of coins - * from a delegator to a validator. - */ -export interface MsgDelegateSDKType { - delegator_address: string; - validator_address: string; - amount: CoinSDKType | undefined; -} -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponse {} -export interface MsgDelegateResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse"; - value: Uint8Array; -} -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponseAmino {} -export interface MsgDelegateResponseAminoMsg { - type: "cosmos-sdk/MsgDelegateResponse"; - value: MsgDelegateResponseAmino; -} -/** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponseSDKType {} -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegate { - delegatorAddress: string; - validatorSrcAddress: string; - validatorDstAddress: string; - amount: Coin | undefined; -} -export interface MsgBeginRedelegateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate"; - value: Uint8Array; -} -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegateAmino { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; - amount?: CoinAmino | undefined; -} -export interface MsgBeginRedelegateAminoMsg { - type: "cosmos-sdk/MsgBeginRedelegate"; - value: MsgBeginRedelegateAmino; -} -/** - * MsgBeginRedelegate defines a SDK message for performing a redelegation - * of coins from a delegator and source validator to a destination validator. - */ -export interface MsgBeginRedelegateSDKType { - delegator_address: string; - validator_src_address: string; - validator_dst_address: string; - amount: CoinSDKType | undefined; -} -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponse { - completionTime: Date | undefined; -} -export interface MsgBeginRedelegateResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse"; - value: Uint8Array; -} -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponseAmino { - completion_time?: Date | undefined; -} -export interface MsgBeginRedelegateResponseAminoMsg { - type: "cosmos-sdk/MsgBeginRedelegateResponse"; - value: MsgBeginRedelegateResponseAmino; -} -/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ -export interface MsgBeginRedelegateResponseSDKType { - completion_time: Date | undefined; -} -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegate { - delegatorAddress: string; - validatorAddress: string; - amount: Coin | undefined; -} -export interface MsgUndelegateProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate"; - value: Uint8Array; -} -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegateAmino { - delegator_address: string; - validator_address: string; - amount?: CoinAmino | undefined; -} -export interface MsgUndelegateAminoMsg { - type: "cosmos-sdk/MsgUndelegate"; - value: MsgUndelegateAmino; -} -/** - * MsgUndelegate defines a SDK message for performing an undelegation from a - * delegate and a validator. - */ -export interface MsgUndelegateSDKType { - delegator_address: string; - validator_address: string; - amount: CoinSDKType | undefined; -} -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponse { - completionTime: Date | undefined; -} -export interface MsgUndelegateResponseProtoMsg { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse"; - value: Uint8Array; -} -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponseAmino { - completion_time?: Date | undefined; -} -export interface MsgUndelegateResponseAminoMsg { - type: "cosmos-sdk/MsgUndelegateResponse"; - value: MsgUndelegateResponseAmino; -} -/** MsgUndelegateResponse defines the Msg/Undelegate response type. */ -export interface MsgUndelegateResponseSDKType { - completion_time: Date | undefined; -} -function createBaseMsgCreateValidator(): MsgCreateValidator { - return { - description: Description.fromPartial({}), - commission: CommissionRates.fromPartial({}), - minSelfDelegation: "", - delegatorAddress: "", - validatorAddress: "", - pubkey: Any.fromPartial({}), - value: Coin.fromPartial({}) - }; -} -export const MsgCreateValidator = { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - aminoType: "cosmos-sdk/MsgCreateValidator", - encode(message: MsgCreateValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(10).fork()).ldelim(); - } - if (message.commission !== undefined) { - CommissionRates.encode(message.commission, writer.uint32(18).fork()).ldelim(); - } - if (message.minSelfDelegation !== "") { - writer.uint32(26).string(message.minSelfDelegation); - } - if (message.delegatorAddress !== "") { - writer.uint32(34).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(42).string(message.validatorAddress); - } - if (message.pubkey !== undefined) { - Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim(); - } - if (message.value !== undefined) { - Coin.encode(message.value, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateValidator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.commission = CommissionRates.decode(reader, reader.uint32()); - break; - case 3: - message.minSelfDelegation = reader.string(); - break; - case 4: - message.delegatorAddress = reader.string(); - break; - case 5: - message.validatorAddress = reader.string(); - break; - case 6: - message.pubkey = Any.decode(reader, reader.uint32()); - break; - case 7: - message.value = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateValidator { - return { - description: isSet(object.description) ? Description.fromJSON(object.description) : undefined, - commission: isSet(object.commission) ? CommissionRates.fromJSON(object.commission) : undefined, - minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "", - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - pubkey: isSet(object.pubkey) ? Any.fromJSON(object.pubkey) : undefined, - value: isSet(object.value) ? Coin.fromJSON(object.value) : undefined - }; - }, - toJSON(message: MsgCreateValidator): unknown { - const obj: any = {}; - message.description !== undefined && (obj.description = message.description ? Description.toJSON(message.description) : undefined); - message.commission !== undefined && (obj.commission = message.commission ? CommissionRates.toJSON(message.commission) : undefined); - message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation); - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.pubkey !== undefined && (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined); - message.value !== undefined && (obj.value = message.value ? Coin.toJSON(message.value) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateValidator { - const message = createBaseMsgCreateValidator(); - message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined; - message.commission = object.commission !== undefined && object.commission !== null ? CommissionRates.fromPartial(object.commission) : undefined; - message.minSelfDelegation = object.minSelfDelegation ?? ""; - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.pubkey = object.pubkey !== undefined && object.pubkey !== null ? Any.fromPartial(object.pubkey) : undefined; - message.value = object.value !== undefined && object.value !== null ? Coin.fromPartial(object.value) : undefined; - return message; - }, - fromSDK(object: MsgCreateValidatorSDKType): MsgCreateValidator { - return { - description: object.description ? Description.fromSDK(object.description) : undefined, - commission: object.commission ? CommissionRates.fromSDK(object.commission) : undefined, - minSelfDelegation: object?.min_self_delegation, - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - pubkey: object.pubkey ? Any.fromSDK(object.pubkey) : undefined, - value: object.value ? Coin.fromSDK(object.value) : undefined - }; - }, - toSDK(message: MsgCreateValidator): MsgCreateValidatorSDKType { - const obj: any = {}; - message.description !== undefined && (obj.description = message.description ? Description.toSDK(message.description) : undefined); - message.commission !== undefined && (obj.commission = message.commission ? CommissionRates.toSDK(message.commission) : undefined); - obj.min_self_delegation = message.minSelfDelegation; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - message.pubkey !== undefined && (obj.pubkey = message.pubkey ? Any.toSDK(message.pubkey) : undefined); - message.value !== undefined && (obj.value = message.value ? Coin.toSDK(message.value) : undefined); - return obj; - }, - fromAmino(object: MsgCreateValidatorAmino): MsgCreateValidator { - return { - description: object?.description ? Description.fromAmino(object.description) : undefined, - commission: object?.commission ? CommissionRates.fromAmino(object.commission) : undefined, - minSelfDelegation: object.min_self_delegation, - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - pubkey: object?.pubkey ? encodePubkey(object.pubkey) : undefined, - value: object?.value ? Coin.fromAmino(object.value) : undefined - }; - }, - toAmino(message: MsgCreateValidator): MsgCreateValidatorAmino { - const obj: any = {}; - obj.description = message.description ? Description.toAmino(message.description) : undefined; - obj.commission = message.commission ? CommissionRates.toAmino(message.commission) : undefined; - obj.min_self_delegation = message.minSelfDelegation; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.pubkey = message.pubkey ? decodePubkey(message.pubkey) : undefined; - obj.value = message.value ? Coin.toAmino(message.value) : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateValidatorAminoMsg): MsgCreateValidator { - return MsgCreateValidator.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateValidator): MsgCreateValidatorAminoMsg { - return { - type: "cosmos-sdk/MsgCreateValidator", - value: MsgCreateValidator.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateValidatorProtoMsg): MsgCreateValidator { - return MsgCreateValidator.decode(message.value); - }, - toProto(message: MsgCreateValidator): Uint8Array { - return MsgCreateValidator.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateValidator): MsgCreateValidatorProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", - value: MsgCreateValidator.encode(message).finish() - }; - } -}; -function createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse { - return {}; -} -export const MsgCreateValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", - aminoType: "cosmos-sdk/MsgCreateValidatorResponse", - encode(_: MsgCreateValidatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateValidatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateValidatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCreateValidatorResponse { - return {}; - }, - toJSON(_: MsgCreateValidatorResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCreateValidatorResponse { - const message = createBaseMsgCreateValidatorResponse(); - return message; - }, - fromSDK(_: MsgCreateValidatorResponseSDKType): MsgCreateValidatorResponse { - return {}; - }, - toSDK(_: MsgCreateValidatorResponse): MsgCreateValidatorResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCreateValidatorResponseAmino): MsgCreateValidatorResponse { - return {}; - }, - toAmino(_: MsgCreateValidatorResponse): MsgCreateValidatorResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCreateValidatorResponseAminoMsg): MsgCreateValidatorResponse { - return MsgCreateValidatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateValidatorResponse): MsgCreateValidatorResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreateValidatorResponse", - value: MsgCreateValidatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateValidatorResponseProtoMsg): MsgCreateValidatorResponse { - return MsgCreateValidatorResponse.decode(message.value); - }, - toProto(message: MsgCreateValidatorResponse): Uint8Array { - return MsgCreateValidatorResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateValidatorResponse): MsgCreateValidatorResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidatorResponse", - value: MsgCreateValidatorResponse.encode(message).finish() - }; - } -}; -function createBaseMsgEditValidator(): MsgEditValidator { - return { - description: Description.fromPartial({}), - validatorAddress: "", - commissionRate: "", - minSelfDelegation: "" - }; -} -export const MsgEditValidator = { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - aminoType: "cosmos-sdk/MsgEditValidator", - encode(message: MsgEditValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.description !== undefined) { - Description.encode(message.description, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.commissionRate !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.commissionRate, 18).atomics); - } - if (message.minSelfDelegation !== "") { - writer.uint32(34).string(message.minSelfDelegation); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgEditValidator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgEditValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = Description.decode(reader, reader.uint32()); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.commissionRate = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 4: - message.minSelfDelegation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgEditValidator { - return { - description: isSet(object.description) ? Description.fromJSON(object.description) : undefined, - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - commissionRate: isSet(object.commissionRate) ? String(object.commissionRate) : "", - minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "" - }; - }, - toJSON(message: MsgEditValidator): unknown { - const obj: any = {}; - message.description !== undefined && (obj.description = message.description ? Description.toJSON(message.description) : undefined); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.commissionRate !== undefined && (obj.commissionRate = message.commissionRate); - message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation); - return obj; - }, - fromPartial(object: DeepPartial): MsgEditValidator { - const message = createBaseMsgEditValidator(); - message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined; - message.validatorAddress = object.validatorAddress ?? ""; - message.commissionRate = object.commissionRate ?? ""; - message.minSelfDelegation = object.minSelfDelegation ?? ""; - return message; - }, - fromSDK(object: MsgEditValidatorSDKType): MsgEditValidator { - return { - description: object.description ? Description.fromSDK(object.description) : undefined, - validatorAddress: object?.validator_address, - commissionRate: object?.commission_rate, - minSelfDelegation: object?.min_self_delegation - }; - }, - toSDK(message: MsgEditValidator): MsgEditValidatorSDKType { - const obj: any = {}; - message.description !== undefined && (obj.description = message.description ? Description.toSDK(message.description) : undefined); - obj.validator_address = message.validatorAddress; - obj.commission_rate = message.commissionRate; - obj.min_self_delegation = message.minSelfDelegation; - return obj; - }, - fromAmino(object: MsgEditValidatorAmino): MsgEditValidator { - return { - description: object?.description ? Description.fromAmino(object.description) : undefined, - validatorAddress: object.validator_address, - commissionRate: object.commission_rate, - minSelfDelegation: object.min_self_delegation - }; - }, - toAmino(message: MsgEditValidator): MsgEditValidatorAmino { - const obj: any = {}; - obj.description = message.description ? Description.toAmino(message.description) : undefined; - obj.validator_address = message.validatorAddress; - obj.commission_rate = message.commissionRate; - obj.min_self_delegation = message.minSelfDelegation; - return obj; - }, - fromAminoMsg(object: MsgEditValidatorAminoMsg): MsgEditValidator { - return MsgEditValidator.fromAmino(object.value); - }, - toAminoMsg(message: MsgEditValidator): MsgEditValidatorAminoMsg { - return { - type: "cosmos-sdk/MsgEditValidator", - value: MsgEditValidator.toAmino(message) - }; - }, - fromProtoMsg(message: MsgEditValidatorProtoMsg): MsgEditValidator { - return MsgEditValidator.decode(message.value); - }, - toProto(message: MsgEditValidator): Uint8Array { - return MsgEditValidator.encode(message).finish(); - }, - toProtoMsg(message: MsgEditValidator): MsgEditValidatorProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", - value: MsgEditValidator.encode(message).finish() - }; - } -}; -function createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse { - return {}; -} -export const MsgEditValidatorResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", - aminoType: "cosmos-sdk/MsgEditValidatorResponse", - encode(_: MsgEditValidatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgEditValidatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgEditValidatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgEditValidatorResponse { - return {}; - }, - toJSON(_: MsgEditValidatorResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgEditValidatorResponse { - const message = createBaseMsgEditValidatorResponse(); - return message; - }, - fromSDK(_: MsgEditValidatorResponseSDKType): MsgEditValidatorResponse { - return {}; - }, - toSDK(_: MsgEditValidatorResponse): MsgEditValidatorResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgEditValidatorResponseAmino): MsgEditValidatorResponse { - return {}; - }, - toAmino(_: MsgEditValidatorResponse): MsgEditValidatorResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgEditValidatorResponseAminoMsg): MsgEditValidatorResponse { - return MsgEditValidatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgEditValidatorResponse): MsgEditValidatorResponseAminoMsg { - return { - type: "cosmos-sdk/MsgEditValidatorResponse", - value: MsgEditValidatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgEditValidatorResponseProtoMsg): MsgEditValidatorResponse { - return MsgEditValidatorResponse.decode(message.value); - }, - toProto(message: MsgEditValidatorResponse): Uint8Array { - return MsgEditValidatorResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgEditValidatorResponse): MsgEditValidatorResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgEditValidatorResponse", - value: MsgEditValidatorResponse.encode(message).finish() - }; - } -}; -function createBaseMsgDelegate(): MsgDelegate { - return { - delegatorAddress: "", - validatorAddress: "", - amount: Coin.fromPartial({}) - }; -} -export const MsgDelegate = { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - aminoType: "cosmos-sdk/MsgDelegate", - encode(message: MsgDelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDelegate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDelegate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgDelegate { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined - }; - }, - toJSON(message: MsgDelegate): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgDelegate { - const message = createBaseMsgDelegate(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; - return message; - }, - fromSDK(object: MsgDelegateSDKType): MsgDelegate { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - amount: object.amount ? Coin.fromSDK(object.amount) : undefined - }; - }, - toSDK(message: MsgDelegate): MsgDelegateSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toSDK(message.amount) : undefined); - return obj; - }, - fromAmino(object: MsgDelegateAmino): MsgDelegate { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - amount: object?.amount ? Coin.fromAmino(object.amount) : undefined - }; - }, - toAmino(message: MsgDelegate): MsgDelegateAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount) : undefined; - return obj; - }, - fromAminoMsg(object: MsgDelegateAminoMsg): MsgDelegate { - return MsgDelegate.fromAmino(object.value); - }, - toAminoMsg(message: MsgDelegate): MsgDelegateAminoMsg { - return { - type: "cosmos-sdk/MsgDelegate", - value: MsgDelegate.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDelegateProtoMsg): MsgDelegate { - return MsgDelegate.decode(message.value); - }, - toProto(message: MsgDelegate): Uint8Array { - return MsgDelegate.encode(message).finish(); - }, - toProtoMsg(message: MsgDelegate): MsgDelegateProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", - value: MsgDelegate.encode(message).finish() - }; - } -}; -function createBaseMsgDelegateResponse(): MsgDelegateResponse { - return {}; -} -export const MsgDelegateResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", - aminoType: "cosmos-sdk/MsgDelegateResponse", - encode(_: MsgDelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgDelegateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgDelegateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgDelegateResponse { - return {}; - }, - toJSON(_: MsgDelegateResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgDelegateResponse { - const message = createBaseMsgDelegateResponse(); - return message; - }, - fromSDK(_: MsgDelegateResponseSDKType): MsgDelegateResponse { - return {}; - }, - toSDK(_: MsgDelegateResponse): MsgDelegateResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgDelegateResponseAmino): MsgDelegateResponse { - return {}; - }, - toAmino(_: MsgDelegateResponse): MsgDelegateResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgDelegateResponseAminoMsg): MsgDelegateResponse { - return MsgDelegateResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgDelegateResponse): MsgDelegateResponseAminoMsg { - return { - type: "cosmos-sdk/MsgDelegateResponse", - value: MsgDelegateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgDelegateResponseProtoMsg): MsgDelegateResponse { - return MsgDelegateResponse.decode(message.value); - }, - toProto(message: MsgDelegateResponse): Uint8Array { - return MsgDelegateResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgDelegateResponse): MsgDelegateResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgDelegateResponse", - value: MsgDelegateResponse.encode(message).finish() - }; - } -}; -function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { - return { - delegatorAddress: "", - validatorSrcAddress: "", - validatorDstAddress: "", - amount: Coin.fromPartial({}) - }; -} -export const MsgBeginRedelegate = { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - aminoType: "cosmos-sdk/MsgBeginRedelegate", - encode(message: MsgBeginRedelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorSrcAddress !== "") { - writer.uint32(18).string(message.validatorSrcAddress); - } - if (message.validatorDstAddress !== "") { - writer.uint32(26).string(message.validatorDstAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBeginRedelegate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBeginRedelegate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorSrcAddress = reader.string(); - break; - case 3: - message.validatorDstAddress = reader.string(); - break; - case 4: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBeginRedelegate { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorSrcAddress: isSet(object.validatorSrcAddress) ? String(object.validatorSrcAddress) : "", - validatorDstAddress: isSet(object.validatorDstAddress) ? String(object.validatorDstAddress) : "", - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined - }; - }, - toJSON(message: MsgBeginRedelegate): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress); - message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress); - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgBeginRedelegate { - const message = createBaseMsgBeginRedelegate(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorSrcAddress = object.validatorSrcAddress ?? ""; - message.validatorDstAddress = object.validatorDstAddress ?? ""; - message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; - return message; - }, - fromSDK(object: MsgBeginRedelegateSDKType): MsgBeginRedelegate { - return { - delegatorAddress: object?.delegator_address, - validatorSrcAddress: object?.validator_src_address, - validatorDstAddress: object?.validator_dst_address, - amount: object.amount ? Coin.fromSDK(object.amount) : undefined - }; - }, - toSDK(message: MsgBeginRedelegate): MsgBeginRedelegateSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toSDK(message.amount) : undefined); - return obj; - }, - fromAmino(object: MsgBeginRedelegateAmino): MsgBeginRedelegate { - return { - delegatorAddress: object.delegator_address, - validatorSrcAddress: object.validator_src_address, - validatorDstAddress: object.validator_dst_address, - amount: object?.amount ? Coin.fromAmino(object.amount) : undefined - }; - }, - toAmino(message: MsgBeginRedelegate): MsgBeginRedelegateAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_src_address = message.validatorSrcAddress; - obj.validator_dst_address = message.validatorDstAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount) : undefined; - return obj; - }, - fromAminoMsg(object: MsgBeginRedelegateAminoMsg): MsgBeginRedelegate { - return MsgBeginRedelegate.fromAmino(object.value); - }, - toAminoMsg(message: MsgBeginRedelegate): MsgBeginRedelegateAminoMsg { - return { - type: "cosmos-sdk/MsgBeginRedelegate", - value: MsgBeginRedelegate.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBeginRedelegateProtoMsg): MsgBeginRedelegate { - return MsgBeginRedelegate.decode(message.value); - }, - toProto(message: MsgBeginRedelegate): Uint8Array { - return MsgBeginRedelegate.encode(message).finish(); - }, - toProtoMsg(message: MsgBeginRedelegate): MsgBeginRedelegateProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", - value: MsgBeginRedelegate.encode(message).finish() - }; - } -}; -function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { - return { - completionTime: new Date() - }; -} -export const MsgBeginRedelegateResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", - aminoType: "cosmos-sdk/MsgBeginRedelegateResponse", - encode(message: MsgBeginRedelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBeginRedelegateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBeginRedelegateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBeginRedelegateResponse { - return { - completionTime: isSet(object.completionTime) ? new Date(object.completionTime) : undefined - }; - }, - toJSON(message: MsgBeginRedelegateResponse): unknown { - const obj: any = {}; - message.completionTime !== undefined && (obj.completionTime = message.completionTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgBeginRedelegateResponse { - const message = createBaseMsgBeginRedelegateResponse(); - message.completionTime = object.completionTime ?? undefined; - return message; - }, - fromSDK(object: MsgBeginRedelegateResponseSDKType): MsgBeginRedelegateResponse { - return { - completionTime: object.completion_time ?? undefined - }; - }, - toSDK(message: MsgBeginRedelegateResponse): MsgBeginRedelegateResponseSDKType { - const obj: any = {}; - message.completionTime !== undefined && (obj.completion_time = message.completionTime ?? undefined); - return obj; - }, - fromAmino(object: MsgBeginRedelegateResponseAmino): MsgBeginRedelegateResponse { - return { - completionTime: object.completion_time - }; - }, - toAmino(message: MsgBeginRedelegateResponse): MsgBeginRedelegateResponseAmino { - const obj: any = {}; - obj.completion_time = message.completionTime; - return obj; - }, - fromAminoMsg(object: MsgBeginRedelegateResponseAminoMsg): MsgBeginRedelegateResponse { - return MsgBeginRedelegateResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgBeginRedelegateResponse): MsgBeginRedelegateResponseAminoMsg { - return { - type: "cosmos-sdk/MsgBeginRedelegateResponse", - value: MsgBeginRedelegateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBeginRedelegateResponseProtoMsg): MsgBeginRedelegateResponse { - return MsgBeginRedelegateResponse.decode(message.value); - }, - toProto(message: MsgBeginRedelegateResponse): Uint8Array { - return MsgBeginRedelegateResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgBeginRedelegateResponse): MsgBeginRedelegateResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse", - value: MsgBeginRedelegateResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUndelegate(): MsgUndelegate { - return { - delegatorAddress: "", - validatorAddress: "", - amount: Coin.fromPartial({}) - }; -} -export const MsgUndelegate = { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - aminoType: "cosmos-sdk/MsgUndelegate", - encode(message: MsgUndelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUndelegate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUndelegate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUndelegate { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined - }; - }, - toJSON(message: MsgUndelegate): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgUndelegate { - const message = createBaseMsgUndelegate(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; - return message; - }, - fromSDK(object: MsgUndelegateSDKType): MsgUndelegate { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - amount: object.amount ? Coin.fromSDK(object.amount) : undefined - }; - }, - toSDK(message: MsgUndelegate): MsgUndelegateSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toSDK(message.amount) : undefined); - return obj; - }, - fromAmino(object: MsgUndelegateAmino): MsgUndelegate { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - amount: object?.amount ? Coin.fromAmino(object.amount) : undefined - }; - }, - toAmino(message: MsgUndelegate): MsgUndelegateAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.amount = message.amount ? Coin.toAmino(message.amount) : undefined; - return obj; - }, - fromAminoMsg(object: MsgUndelegateAminoMsg): MsgUndelegate { - return MsgUndelegate.fromAmino(object.value); - }, - toAminoMsg(message: MsgUndelegate): MsgUndelegateAminoMsg { - return { - type: "cosmos-sdk/MsgUndelegate", - value: MsgUndelegate.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUndelegateProtoMsg): MsgUndelegate { - return MsgUndelegate.decode(message.value); - }, - toProto(message: MsgUndelegate): Uint8Array { - return MsgUndelegate.encode(message).finish(); - }, - toProtoMsg(message: MsgUndelegate): MsgUndelegateProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", - value: MsgUndelegate.encode(message).finish() - }; - } -}; -function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { - return { - completionTime: new Date() - }; -} -export const MsgUndelegateResponse = { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", - aminoType: "cosmos-sdk/MsgUndelegateResponse", - encode(message: MsgUndelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.completionTime !== undefined) { - Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUndelegateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUndelegateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUndelegateResponse { - return { - completionTime: isSet(object.completionTime) ? new Date(object.completionTime) : undefined - }; - }, - toJSON(message: MsgUndelegateResponse): unknown { - const obj: any = {}; - message.completionTime !== undefined && (obj.completionTime = message.completionTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgUndelegateResponse { - const message = createBaseMsgUndelegateResponse(); - message.completionTime = object.completionTime ?? undefined; - return message; - }, - fromSDK(object: MsgUndelegateResponseSDKType): MsgUndelegateResponse { - return { - completionTime: object.completion_time ?? undefined - }; - }, - toSDK(message: MsgUndelegateResponse): MsgUndelegateResponseSDKType { - const obj: any = {}; - message.completionTime !== undefined && (obj.completion_time = message.completionTime ?? undefined); - return obj; - }, - fromAmino(object: MsgUndelegateResponseAmino): MsgUndelegateResponse { - return { - completionTime: object.completion_time - }; - }, - toAmino(message: MsgUndelegateResponse): MsgUndelegateResponseAmino { - const obj: any = {}; - obj.completion_time = message.completionTime; - return obj; - }, - fromAminoMsg(object: MsgUndelegateResponseAminoMsg): MsgUndelegateResponse { - return MsgUndelegateResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUndelegateResponse): MsgUndelegateResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUndelegateResponse", - value: MsgUndelegateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUndelegateResponseProtoMsg): MsgUndelegateResponse { - return MsgUndelegateResponse.decode(message.value); - }, - toProto(message: MsgUndelegateResponse): Uint8Array { - return MsgUndelegateResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUndelegateResponse): MsgUndelegateResponseProtoMsg { - return { - typeUrl: "/cosmos.staking.v1beta1.MsgUndelegateResponse", - value: MsgUndelegateResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/tx/signing/v1beta1/signing.ts b/examples/interchainjs/src/codegen/cosmos/tx/signing/v1beta1/signing.ts deleted file mode 100644 index 402f430e..00000000 --- a/examples/interchainjs/src/codegen/cosmos/tx/signing/v1beta1/signing.ts +++ /dev/null @@ -1,780 +0,0 @@ -//@ts-nocheck -import { CompactBitArray, CompactBitArrayAmino, CompactBitArraySDKType } from "../../../crypto/multisig/v1beta1/multisig"; -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * SignMode represents a signing mode with its own security guarantees. - * - * This enum should be considered a registry of all known sign modes - * in the Cosmos ecosystem. Apps are not expected to support all known - * sign modes. Apps that would like to support custom sign modes are - * encouraged to open a small PR against this file to add a new case - * to this SignMode enum describing their sign mode so that different - * apps have a consistent version of this enum. - */ -export enum SignMode { - /** - * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - * rejected. - */ - SIGN_MODE_UNSPECIFIED = 0, - /** - * SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - * verified with raw bytes from Tx. - */ - SIGN_MODE_DIRECT = 1, - /** - * SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some - * human-readable textual representation on top of the binary representation - * from SIGN_MODE_DIRECT. It is currently not supported. - */ - SIGN_MODE_TEXTUAL = 2, - /** - * SIGN_MODE_DIRECT_AUX - SIGN_MODE_DIRECT_AUX specifies a signing mode which uses - * SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - * require signers signing over other signers' `signer_info`. It also allows - * for adding Tips in transactions. - * - * Since: cosmos-sdk 0.46 - */ - SIGN_MODE_DIRECT_AUX = 3, - /** - * SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - * Amino JSON and will be removed in the future. - */ - SIGN_MODE_LEGACY_AMINO_JSON = 127, - UNRECOGNIZED = -1, -} -export const SignModeSDKType = SignMode; -export const SignModeAmino = SignMode; -export function signModeFromJSON(object: any): SignMode { - switch (object) { - case 0: - case "SIGN_MODE_UNSPECIFIED": - return SignMode.SIGN_MODE_UNSPECIFIED; - case 1: - case "SIGN_MODE_DIRECT": - return SignMode.SIGN_MODE_DIRECT; - case 2: - case "SIGN_MODE_TEXTUAL": - return SignMode.SIGN_MODE_TEXTUAL; - case 3: - case "SIGN_MODE_DIRECT_AUX": - return SignMode.SIGN_MODE_DIRECT_AUX; - case 127: - case "SIGN_MODE_LEGACY_AMINO_JSON": - return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; - case -1: - case "UNRECOGNIZED": - default: - return SignMode.UNRECOGNIZED; - } -} -export function signModeToJSON(object: SignMode): string { - switch (object) { - case SignMode.SIGN_MODE_UNSPECIFIED: - return "SIGN_MODE_UNSPECIFIED"; - case SignMode.SIGN_MODE_DIRECT: - return "SIGN_MODE_DIRECT"; - case SignMode.SIGN_MODE_TEXTUAL: - return "SIGN_MODE_TEXTUAL"; - case SignMode.SIGN_MODE_DIRECT_AUX: - return "SIGN_MODE_DIRECT_AUX"; - case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: - return "SIGN_MODE_LEGACY_AMINO_JSON"; - case SignMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ -export interface SignatureDescriptors { - /** signatures are the signature descriptors */ - signatures: SignatureDescriptor[]; -} -export interface SignatureDescriptorsProtoMsg { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors"; - value: Uint8Array; -} -/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ -export interface SignatureDescriptorsAmino { - /** signatures are the signature descriptors */ - signatures: SignatureDescriptorAmino[]; -} -export interface SignatureDescriptorsAminoMsg { - type: "cosmos-sdk/SignatureDescriptors"; - value: SignatureDescriptorsAmino; -} -/** SignatureDescriptors wraps multiple SignatureDescriptor's. */ -export interface SignatureDescriptorsSDKType { - signatures: SignatureDescriptorSDKType[]; -} -/** - * SignatureDescriptor is a convenience type which represents the full data for - * a signature including the public key of the signer, signing modes and the - * signature itself. It is primarily used for coordinating signatures between - * clients. - */ -export interface SignatureDescriptor { - /** public_key is the public key of the signer */ - publicKey: Any | undefined; - data: SignatureDescriptor_Data | undefined; - /** - * sequence is the sequence of the account, which describes the - * number of committed transactions signed by a given address. It is used to prevent - * replay attacks. - */ - sequence: bigint; -} -export interface SignatureDescriptorProtoMsg { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor"; - value: Uint8Array; -} -/** - * SignatureDescriptor is a convenience type which represents the full data for - * a signature including the public key of the signer, signing modes and the - * signature itself. It is primarily used for coordinating signatures between - * clients. - */ -export interface SignatureDescriptorAmino { - /** public_key is the public key of the signer */ - public_key?: AnyAmino | undefined; - data?: SignatureDescriptor_DataAmino | undefined; - /** - * sequence is the sequence of the account, which describes the - * number of committed transactions signed by a given address. It is used to prevent - * replay attacks. - */ - sequence: string; -} -export interface SignatureDescriptorAminoMsg { - type: "cosmos-sdk/SignatureDescriptor"; - value: SignatureDescriptorAmino; -} -/** - * SignatureDescriptor is a convenience type which represents the full data for - * a signature including the public key of the signer, signing modes and the - * signature itself. It is primarily used for coordinating signatures between - * clients. - */ -export interface SignatureDescriptorSDKType { - public_key: AnySDKType | undefined; - data: SignatureDescriptor_DataSDKType | undefined; - sequence: bigint; -} -/** Data represents signature data */ -export interface SignatureDescriptor_Data { - /** single represents a single signer */ - single?: SignatureDescriptor_Data_Single | undefined; - /** multi represents a multisig signer */ - multi?: SignatureDescriptor_Data_Multi | undefined; -} -export interface SignatureDescriptor_DataProtoMsg { - typeUrl: "/cosmos.tx.signing.v1beta1.Data"; - value: Uint8Array; -} -/** Data represents signature data */ -export interface SignatureDescriptor_DataAmino { - /** single represents a single signer */ - single?: SignatureDescriptor_Data_SingleAmino | undefined; - /** multi represents a multisig signer */ - multi?: SignatureDescriptor_Data_MultiAmino | undefined; -} -export interface SignatureDescriptor_DataAminoMsg { - type: "cosmos-sdk/Data"; - value: SignatureDescriptor_DataAmino; -} -/** Data represents signature data */ -export interface SignatureDescriptor_DataSDKType { - single?: SignatureDescriptor_Data_SingleSDKType | undefined; - multi?: SignatureDescriptor_Data_MultiSDKType | undefined; -} -/** Single is the signature data for a single signer */ -export interface SignatureDescriptor_Data_Single { - /** mode is the signing mode of the single signer */ - mode: SignMode; - /** signature is the raw signature bytes */ - signature: Uint8Array; -} -export interface SignatureDescriptor_Data_SingleProtoMsg { - typeUrl: "/cosmos.tx.signing.v1beta1.Single"; - value: Uint8Array; -} -/** Single is the signature data for a single signer */ -export interface SignatureDescriptor_Data_SingleAmino { - /** mode is the signing mode of the single signer */ - mode: SignMode; - /** signature is the raw signature bytes */ - signature: Uint8Array; -} -export interface SignatureDescriptor_Data_SingleAminoMsg { - type: "cosmos-sdk/Single"; - value: SignatureDescriptor_Data_SingleAmino; -} -/** Single is the signature data for a single signer */ -export interface SignatureDescriptor_Data_SingleSDKType { - mode: SignMode; - signature: Uint8Array; -} -/** Multi is the signature data for a multisig public key */ -export interface SignatureDescriptor_Data_Multi { - /** bitarray specifies which keys within the multisig are signing */ - bitarray: CompactBitArray | undefined; - /** signatures is the signatures of the multi-signature */ - signatures: SignatureDescriptor_Data[]; -} -export interface SignatureDescriptor_Data_MultiProtoMsg { - typeUrl: "/cosmos.tx.signing.v1beta1.Multi"; - value: Uint8Array; -} -/** Multi is the signature data for a multisig public key */ -export interface SignatureDescriptor_Data_MultiAmino { - /** bitarray specifies which keys within the multisig are signing */ - bitarray?: CompactBitArrayAmino | undefined; - /** signatures is the signatures of the multi-signature */ - signatures: SignatureDescriptor_DataAmino[]; -} -export interface SignatureDescriptor_Data_MultiAminoMsg { - type: "cosmos-sdk/Multi"; - value: SignatureDescriptor_Data_MultiAmino; -} -/** Multi is the signature data for a multisig public key */ -export interface SignatureDescriptor_Data_MultiSDKType { - bitarray: CompactBitArraySDKType | undefined; - signatures: SignatureDescriptor_DataSDKType[]; -} -function createBaseSignatureDescriptors(): SignatureDescriptors { - return { - signatures: [] - }; -} -export const SignatureDescriptors = { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", - aminoType: "cosmos-sdk/SignatureDescriptors", - encode(message: SignatureDescriptors, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.signatures) { - SignatureDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptors { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptors(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatures.push(SignatureDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureDescriptors { - return { - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => SignatureDescriptor.fromJSON(e)) : [] - }; - }, - toJSON(message: SignatureDescriptors): unknown { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? SignatureDescriptor.toJSON(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SignatureDescriptors { - const message = createBaseSignatureDescriptors(); - message.signatures = object.signatures?.map(e => SignatureDescriptor.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SignatureDescriptorsSDKType): SignatureDescriptors { - return { - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => SignatureDescriptor.fromSDK(e)) : [] - }; - }, - toSDK(message: SignatureDescriptors): SignatureDescriptorsSDKType { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? SignatureDescriptor.toSDK(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromAmino(object: SignatureDescriptorsAmino): SignatureDescriptors { - return { - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => SignatureDescriptor.fromAmino(e)) : [] - }; - }, - toAmino(message: SignatureDescriptors): SignatureDescriptorsAmino { - const obj: any = {}; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? SignatureDescriptor.toAmino(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromAminoMsg(object: SignatureDescriptorsAminoMsg): SignatureDescriptors { - return SignatureDescriptors.fromAmino(object.value); - }, - toAminoMsg(message: SignatureDescriptors): SignatureDescriptorsAminoMsg { - return { - type: "cosmos-sdk/SignatureDescriptors", - value: SignatureDescriptors.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureDescriptorsProtoMsg): SignatureDescriptors { - return SignatureDescriptors.decode(message.value); - }, - toProto(message: SignatureDescriptors): Uint8Array { - return SignatureDescriptors.encode(message).finish(); - }, - toProtoMsg(message: SignatureDescriptors): SignatureDescriptorsProtoMsg { - return { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptors", - value: SignatureDescriptors.encode(message).finish() - }; - } -}; -function createBaseSignatureDescriptor(): SignatureDescriptor { - return { - publicKey: Any.fromPartial({}), - data: SignatureDescriptor_Data.fromPartial({}), - sequence: BigInt(0) - }; -} -export const SignatureDescriptor = { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", - aminoType: "cosmos-sdk/SignatureDescriptor", - encode(message: SignatureDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - SignatureDescriptor_Data.encode(message.data, writer.uint32(18).fork()).ldelim(); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.data = SignatureDescriptor_Data.decode(reader, reader.uint32()); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureDescriptor { - return { - publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, - data: isSet(object.data) ? SignatureDescriptor_Data.fromJSON(object.data) : undefined, - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: SignatureDescriptor): unknown { - const obj: any = {}; - message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined); - message.data !== undefined && (obj.data = message.data ? SignatureDescriptor_Data.toJSON(message.data) : undefined); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SignatureDescriptor { - const message = createBaseSignatureDescriptor(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.data = object.data !== undefined && object.data !== null ? SignatureDescriptor_Data.fromPartial(object.data) : undefined; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SignatureDescriptorSDKType): SignatureDescriptor { - return { - publicKey: object.public_key ? Any.fromSDK(object.public_key) : undefined, - data: object.data ? SignatureDescriptor_Data.fromSDK(object.data) : undefined, - sequence: object?.sequence - }; - }, - toSDK(message: SignatureDescriptor): SignatureDescriptorSDKType { - const obj: any = {}; - message.publicKey !== undefined && (obj.public_key = message.publicKey ? Any.toSDK(message.publicKey) : undefined); - message.data !== undefined && (obj.data = message.data ? SignatureDescriptor_Data.toSDK(message.data) : undefined); - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: SignatureDescriptorAmino): SignatureDescriptor { - return { - publicKey: object?.public_key ? Any.fromAmino(object.public_key) : undefined, - data: object?.data ? SignatureDescriptor_Data.fromAmino(object.data) : undefined, - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: SignatureDescriptor): SignatureDescriptorAmino { - const obj: any = {}; - obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; - obj.data = message.data ? SignatureDescriptor_Data.toAmino(message.data) : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SignatureDescriptorAminoMsg): SignatureDescriptor { - return SignatureDescriptor.fromAmino(object.value); - }, - toAminoMsg(message: SignatureDescriptor): SignatureDescriptorAminoMsg { - return { - type: "cosmos-sdk/SignatureDescriptor", - value: SignatureDescriptor.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureDescriptorProtoMsg): SignatureDescriptor { - return SignatureDescriptor.decode(message.value); - }, - toProto(message: SignatureDescriptor): Uint8Array { - return SignatureDescriptor.encode(message).finish(); - }, - toProtoMsg(message: SignatureDescriptor): SignatureDescriptorProtoMsg { - return { - typeUrl: "/cosmos.tx.signing.v1beta1.SignatureDescriptor", - value: SignatureDescriptor.encode(message).finish() - }; - } -}; -function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { - return { - single: undefined, - multi: undefined - }; -} -export const SignatureDescriptor_Data = { - typeUrl: "/cosmos.tx.signing.v1beta1.Data", - aminoType: "cosmos-sdk/Data", - encode(message: SignatureDescriptor_Data, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.single !== undefined) { - SignatureDescriptor_Data_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); - } - if (message.multi !== undefined) { - SignatureDescriptor_Data_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor_Data { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor_Data(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.single = SignatureDescriptor_Data_Single.decode(reader, reader.uint32()); - break; - case 2: - message.multi = SignatureDescriptor_Data_Multi.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureDescriptor_Data { - return { - single: isSet(object.single) ? SignatureDescriptor_Data_Single.fromJSON(object.single) : undefined, - multi: isSet(object.multi) ? SignatureDescriptor_Data_Multi.fromJSON(object.multi) : undefined - }; - }, - toJSON(message: SignatureDescriptor_Data): unknown { - const obj: any = {}; - message.single !== undefined && (obj.single = message.single ? SignatureDescriptor_Data_Single.toJSON(message.single) : undefined); - message.multi !== undefined && (obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SignatureDescriptor_Data { - const message = createBaseSignatureDescriptor_Data(); - message.single = object.single !== undefined && object.single !== null ? SignatureDescriptor_Data_Single.fromPartial(object.single) : undefined; - message.multi = object.multi !== undefined && object.multi !== null ? SignatureDescriptor_Data_Multi.fromPartial(object.multi) : undefined; - return message; - }, - fromSDK(object: SignatureDescriptor_DataSDKType): SignatureDescriptor_Data { - return { - single: object.single ? SignatureDescriptor_Data_Single.fromSDK(object.single) : undefined, - multi: object.multi ? SignatureDescriptor_Data_Multi.fromSDK(object.multi) : undefined - }; - }, - toSDK(message: SignatureDescriptor_Data): SignatureDescriptor_DataSDKType { - const obj: any = {}; - message.single !== undefined && (obj.single = message.single ? SignatureDescriptor_Data_Single.toSDK(message.single) : undefined); - message.multi !== undefined && (obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toSDK(message.multi) : undefined); - return obj; - }, - fromAmino(object: SignatureDescriptor_DataAmino): SignatureDescriptor_Data { - return { - single: object?.single ? SignatureDescriptor_Data_Single.fromAmino(object.single) : undefined, - multi: object?.multi ? SignatureDescriptor_Data_Multi.fromAmino(object.multi) : undefined - }; - }, - toAmino(message: SignatureDescriptor_Data): SignatureDescriptor_DataAmino { - const obj: any = {}; - obj.single = message.single ? SignatureDescriptor_Data_Single.toAmino(message.single) : undefined; - obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toAmino(message.multi) : undefined; - return obj; - }, - fromAminoMsg(object: SignatureDescriptor_DataAminoMsg): SignatureDescriptor_Data { - return SignatureDescriptor_Data.fromAmino(object.value); - }, - toAminoMsg(message: SignatureDescriptor_Data): SignatureDescriptor_DataAminoMsg { - return { - type: "cosmos-sdk/Data", - value: SignatureDescriptor_Data.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureDescriptor_DataProtoMsg): SignatureDescriptor_Data { - return SignatureDescriptor_Data.decode(message.value); - }, - toProto(message: SignatureDescriptor_Data): Uint8Array { - return SignatureDescriptor_Data.encode(message).finish(); - }, - toProtoMsg(message: SignatureDescriptor_Data): SignatureDescriptor_DataProtoMsg { - return { - typeUrl: "/cosmos.tx.signing.v1beta1.Data", - value: SignatureDescriptor_Data.encode(message).finish() - }; - } -}; -function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { - return { - mode: 0, - signature: new Uint8Array() - }; -} -export const SignatureDescriptor_Data_Single = { - typeUrl: "/cosmos.tx.signing.v1beta1.Single", - aminoType: "cosmos-sdk/Single", - encode(message: SignatureDescriptor_Data_Single, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode); - } - if (message.signature.length !== 0) { - writer.uint32(18).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor_Data_Single { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor_Data_Single(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = (reader.int32() as any); - break; - case 2: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureDescriptor_Data_Single { - return { - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1, - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array() - }; - }, - toJSON(message: SignatureDescriptor_Data_Single): unknown { - const obj: any = {}; - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): SignatureDescriptor_Data_Single { - const message = createBaseSignatureDescriptor_Data_Single(); - message.mode = object.mode ?? 0; - message.signature = object.signature ?? new Uint8Array(); - return message; - }, - fromSDK(object: SignatureDescriptor_Data_SingleSDKType): SignatureDescriptor_Data_Single { - return { - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1, - signature: object?.signature - }; - }, - toSDK(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleSDKType { - const obj: any = {}; - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - obj.signature = message.signature; - return obj; - }, - fromAmino(object: SignatureDescriptor_Data_SingleAmino): SignatureDescriptor_Data_Single { - return { - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1, - signature: object.signature - }; - }, - toAmino(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleAmino { - const obj: any = {}; - obj.mode = message.mode; - obj.signature = message.signature; - return obj; - }, - fromAminoMsg(object: SignatureDescriptor_Data_SingleAminoMsg): SignatureDescriptor_Data_Single { - return SignatureDescriptor_Data_Single.fromAmino(object.value); - }, - toAminoMsg(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleAminoMsg { - return { - type: "cosmos-sdk/Single", - value: SignatureDescriptor_Data_Single.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureDescriptor_Data_SingleProtoMsg): SignatureDescriptor_Data_Single { - return SignatureDescriptor_Data_Single.decode(message.value); - }, - toProto(message: SignatureDescriptor_Data_Single): Uint8Array { - return SignatureDescriptor_Data_Single.encode(message).finish(); - }, - toProtoMsg(message: SignatureDescriptor_Data_Single): SignatureDescriptor_Data_SingleProtoMsg { - return { - typeUrl: "/cosmos.tx.signing.v1beta1.Single", - value: SignatureDescriptor_Data_Single.encode(message).finish() - }; - } -}; -function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { - return { - bitarray: CompactBitArray.fromPartial({}), - signatures: [] - }; -} -export const SignatureDescriptor_Data_Multi = { - typeUrl: "/cosmos.tx.signing.v1beta1.Multi", - aminoType: "cosmos-sdk/Multi", - encode(message: SignatureDescriptor_Data_Multi, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bitarray !== undefined) { - CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.signatures) { - SignatureDescriptor_Data.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureDescriptor_Data_Multi { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureDescriptor_Data_Multi(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bitarray = CompactBitArray.decode(reader, reader.uint32()); - break; - case 2: - message.signatures.push(SignatureDescriptor_Data.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureDescriptor_Data_Multi { - return { - bitarray: isSet(object.bitarray) ? CompactBitArray.fromJSON(object.bitarray) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => SignatureDescriptor_Data.fromJSON(e)) : [] - }; - }, - toJSON(message: SignatureDescriptor_Data_Multi): unknown { - const obj: any = {}; - message.bitarray !== undefined && (obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? SignatureDescriptor_Data.toJSON(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SignatureDescriptor_Data_Multi { - const message = createBaseSignatureDescriptor_Data_Multi(); - message.bitarray = object.bitarray !== undefined && object.bitarray !== null ? CompactBitArray.fromPartial(object.bitarray) : undefined; - message.signatures = object.signatures?.map(e => SignatureDescriptor_Data.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SignatureDescriptor_Data_MultiSDKType): SignatureDescriptor_Data_Multi { - return { - bitarray: object.bitarray ? CompactBitArray.fromSDK(object.bitarray) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => SignatureDescriptor_Data.fromSDK(e)) : [] - }; - }, - toSDK(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiSDKType { - const obj: any = {}; - message.bitarray !== undefined && (obj.bitarray = message.bitarray ? CompactBitArray.toSDK(message.bitarray) : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? SignatureDescriptor_Data.toSDK(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromAmino(object: SignatureDescriptor_Data_MultiAmino): SignatureDescriptor_Data_Multi { - return { - bitarray: object?.bitarray ? CompactBitArray.fromAmino(object.bitarray) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => SignatureDescriptor_Data.fromAmino(e)) : [] - }; - }, - toAmino(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiAmino { - const obj: any = {}; - obj.bitarray = message.bitarray ? CompactBitArray.toAmino(message.bitarray) : undefined; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? SignatureDescriptor_Data.toAmino(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromAminoMsg(object: SignatureDescriptor_Data_MultiAminoMsg): SignatureDescriptor_Data_Multi { - return SignatureDescriptor_Data_Multi.fromAmino(object.value); - }, - toAminoMsg(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiAminoMsg { - return { - type: "cosmos-sdk/Multi", - value: SignatureDescriptor_Data_Multi.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureDescriptor_Data_MultiProtoMsg): SignatureDescriptor_Data_Multi { - return SignatureDescriptor_Data_Multi.decode(message.value); - }, - toProto(message: SignatureDescriptor_Data_Multi): Uint8Array { - return SignatureDescriptor_Data_Multi.encode(message).finish(); - }, - toProtoMsg(message: SignatureDescriptor_Data_Multi): SignatureDescriptor_Data_MultiProtoMsg { - return { - typeUrl: "/cosmos.tx.signing.v1beta1.Multi", - value: SignatureDescriptor_Data_Multi.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts b/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts deleted file mode 100644 index 79092e89..00000000 --- a/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { SimulateRequest, SimulateResponse, GetTxRequest, GetTxResponse, BroadcastTxRequest, BroadcastTxResponse, GetTxsEventRequest, GetTxsEventResponse, GetBlockWithTxsRequest, GetBlockWithTxsResponse } from "./service"; -/** Service defines a gRPC service for interacting with transactions. */ -export interface Service { - /** Simulate simulates executing a transaction for estimating gas usage. */ - simulate(request: SimulateRequest): Promise; - /** GetTx fetches a tx by hash. */ - getTx(request: GetTxRequest): Promise; - /** BroadcastTx broadcast transaction. */ - broadcastTx(request: BroadcastTxRequest): Promise; - /** GetTxsEvent fetches txs by event. */ - getTxsEvent(request: GetTxsEventRequest): Promise; - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - getBlockWithTxs(request: GetBlockWithTxsRequest): Promise; -} -export class ServiceClientImpl implements Service { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.simulate = this.simulate.bind(this); - this.getTx = this.getTx.bind(this); - this.broadcastTx = this.broadcastTx.bind(this); - this.getTxsEvent = this.getTxsEvent.bind(this); - this.getBlockWithTxs = this.getBlockWithTxs.bind(this); - } - simulate(request: SimulateRequest): Promise { - const data = SimulateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "Simulate", data); - return promise.then(data => SimulateResponse.decode(new BinaryReader(data))); - } - getTx(request: GetTxRequest): Promise { - const data = GetTxRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetTx", data); - return promise.then(data => GetTxResponse.decode(new BinaryReader(data))); - } - broadcastTx(request: BroadcastTxRequest): Promise { - const data = BroadcastTxRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "BroadcastTx", data); - return promise.then(data => BroadcastTxResponse.decode(new BinaryReader(data))); - } - getTxsEvent(request: GetTxsEventRequest): Promise { - const data = GetTxsEventRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetTxsEvent", data); - return promise.then(data => GetTxsEventResponse.decode(new BinaryReader(data))); - } - getBlockWithTxs(request: GetBlockWithTxsRequest): Promise { - const data = GetBlockWithTxsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetBlockWithTxs", data); - return promise.then(data => GetBlockWithTxsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new ServiceClientImpl(rpc); - return { - simulate(request: SimulateRequest): Promise { - return queryService.simulate(request); - }, - getTx(request: GetTxRequest): Promise { - return queryService.getTx(request); - }, - broadcastTx(request: BroadcastTxRequest): Promise { - return queryService.broadcastTx(request); - }, - getTxsEvent(request: GetTxsEventRequest): Promise { - return queryService.getTxsEvent(request); - }, - getBlockWithTxs(request: GetBlockWithTxsRequest): Promise { - return queryService.getBlockWithTxs(request); - } - }; -}; -export interface UseSimulateQuery extends ReactQueryParams { - request: SimulateRequest; -} -export interface UseGetTxQuery extends ReactQueryParams { - request: GetTxRequest; -} -export interface UseBroadcastTxQuery extends ReactQueryParams { - request: BroadcastTxRequest; -} -export interface UseGetTxsEventQuery extends ReactQueryParams { - request: GetTxsEventRequest; -} -export interface UseGetBlockWithTxsQuery extends ReactQueryParams { - request: GetBlockWithTxsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): ServiceClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new ServiceClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useSimulate = ({ - request, - options - }: UseSimulateQuery) => { - return useQuery(["simulateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.simulate(request); - }, options); - }; - const useGetTx = ({ - request, - options - }: UseGetTxQuery) => { - return useQuery(["getTxQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getTx(request); - }, options); - }; - const useBroadcastTx = ({ - request, - options - }: UseBroadcastTxQuery) => { - return useQuery(["broadcastTxQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.broadcastTx(request); - }, options); - }; - const useGetTxsEvent = ({ - request, - options - }: UseGetTxsEventQuery) => { - return useQuery(["getTxsEventQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getTxsEvent(request); - }, options); - }; - const useGetBlockWithTxs = ({ - request, - options - }: UseGetBlockWithTxsQuery) => { - return useQuery(["getBlockWithTxsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.getBlockWithTxs(request); - }, options); - }; - return { - /** Simulate simulates executing a transaction for estimating gas usage. */useSimulate, - /** GetTx fetches a tx by hash. */useGetTx, - /** BroadcastTx broadcast transaction. */useBroadcastTx, - /** GetTxsEvent fetches txs by event. */useGetTxsEvent, - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - useGetBlockWithTxs - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QuerySimulateStore { - store = new QueryStore(queryService?.simulate); - simulate(request: SimulateRequest) { - return this.store.getData(request); - } - } - class QueryGetTxStore { - store = new QueryStore(queryService?.getTx); - getTx(request: GetTxRequest) { - return this.store.getData(request); - } - } - class QueryBroadcastTxStore { - store = new QueryStore(queryService?.broadcastTx); - broadcastTx(request: BroadcastTxRequest) { - return this.store.getData(request); - } - } - class QueryGetTxsEventStore { - store = new QueryStore(queryService?.getTxsEvent); - getTxsEvent(request: GetTxsEventRequest) { - return this.store.getData(request); - } - } - class QueryGetBlockWithTxsStore { - store = new QueryStore(queryService?.getBlockWithTxs); - getBlockWithTxs(request: GetBlockWithTxsRequest) { - return this.store.getData(request); - } - } - return { - /** Simulate simulates executing a transaction for estimating gas usage. */QuerySimulateStore, - /** GetTx fetches a tx by hash. */QueryGetTxStore, - /** BroadcastTx broadcast transaction. */QueryBroadcastTxStore, - /** GetTxsEvent fetches txs by event. */QueryGetTxsEventStore, - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - QueryGetBlockWithTxsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/service.ts b/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/service.ts deleted file mode 100644 index a0817a52..00000000 --- a/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/service.ts +++ /dev/null @@ -1,1582 +0,0 @@ -import { Tx, TxAmino, TxSDKType } from "./tx"; -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; -import { TxResponse, TxResponseAmino, TxResponseSDKType, GasInfo, GasInfoAmino, GasInfoSDKType, Result, ResultAmino, ResultSDKType } from "../../base/abci/v1beta1/abci"; -import { BlockID, BlockIDAmino, BlockIDSDKType } from "../../../tendermint/types/types"; -import { Block, BlockAmino, BlockSDKType } from "../../../tendermint/types/block"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** OrderBy defines the sorting order */ -export enum OrderBy { - /** ORDER_BY_UNSPECIFIED - ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. */ - ORDER_BY_UNSPECIFIED = 0, - /** ORDER_BY_ASC - ORDER_BY_ASC defines ascending order */ - ORDER_BY_ASC = 1, - /** ORDER_BY_DESC - ORDER_BY_DESC defines descending order */ - ORDER_BY_DESC = 2, - UNRECOGNIZED = -1, -} -export const OrderBySDKType = OrderBy; -export const OrderByAmino = OrderBy; -export function orderByFromJSON(object: any): OrderBy { - switch (object) { - case 0: - case "ORDER_BY_UNSPECIFIED": - return OrderBy.ORDER_BY_UNSPECIFIED; - case 1: - case "ORDER_BY_ASC": - return OrderBy.ORDER_BY_ASC; - case 2: - case "ORDER_BY_DESC": - return OrderBy.ORDER_BY_DESC; - case -1: - case "UNRECOGNIZED": - default: - return OrderBy.UNRECOGNIZED; - } -} -export function orderByToJSON(object: OrderBy): string { - switch (object) { - case OrderBy.ORDER_BY_UNSPECIFIED: - return "ORDER_BY_UNSPECIFIED"; - case OrderBy.ORDER_BY_ASC: - return "ORDER_BY_ASC"; - case OrderBy.ORDER_BY_DESC: - return "ORDER_BY_DESC"; - case OrderBy.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. */ -export enum BroadcastMode { - /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */ - BROADCAST_MODE_UNSPECIFIED = 0, - /** - * BROADCAST_MODE_BLOCK - BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - * the tx to be committed in a block. - */ - BROADCAST_MODE_BLOCK = 1, - /** - * BROADCAST_MODE_SYNC - BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - * a CheckTx execution response only. - */ - BROADCAST_MODE_SYNC = 2, - /** - * BROADCAST_MODE_ASYNC - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - * immediately. - */ - BROADCAST_MODE_ASYNC = 3, - UNRECOGNIZED = -1, -} -export const BroadcastModeSDKType = BroadcastMode; -export const BroadcastModeAmino = BroadcastMode; -export function broadcastModeFromJSON(object: any): BroadcastMode { - switch (object) { - case 0: - case "BROADCAST_MODE_UNSPECIFIED": - return BroadcastMode.BROADCAST_MODE_UNSPECIFIED; - case 1: - case "BROADCAST_MODE_BLOCK": - return BroadcastMode.BROADCAST_MODE_BLOCK; - case 2: - case "BROADCAST_MODE_SYNC": - return BroadcastMode.BROADCAST_MODE_SYNC; - case 3: - case "BROADCAST_MODE_ASYNC": - return BroadcastMode.BROADCAST_MODE_ASYNC; - case -1: - case "UNRECOGNIZED": - default: - return BroadcastMode.UNRECOGNIZED; - } -} -export function broadcastModeToJSON(object: BroadcastMode): string { - switch (object) { - case BroadcastMode.BROADCAST_MODE_UNSPECIFIED: - return "BROADCAST_MODE_UNSPECIFIED"; - case BroadcastMode.BROADCAST_MODE_BLOCK: - return "BROADCAST_MODE_BLOCK"; - case BroadcastMode.BROADCAST_MODE_SYNC: - return "BROADCAST_MODE_SYNC"; - case BroadcastMode.BROADCAST_MODE_ASYNC: - return "BROADCAST_MODE_ASYNC"; - case BroadcastMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * GetTxsEventRequest is the request type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventRequest { - /** events is the list of transaction event type. */ - events: string[]; - /** pagination defines a pagination for the request. */ - pagination: PageRequest | undefined; - orderBy: OrderBy; -} -export interface GetTxsEventRequestProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest"; - value: Uint8Array; -} -/** - * GetTxsEventRequest is the request type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventRequestAmino { - /** events is the list of transaction event type. */ - events: string[]; - /** pagination defines a pagination for the request. */ - pagination?: PageRequestAmino | undefined; - order_by: OrderBy; -} -export interface GetTxsEventRequestAminoMsg { - type: "cosmos-sdk/GetTxsEventRequest"; - value: GetTxsEventRequestAmino; -} -/** - * GetTxsEventRequest is the request type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventRequestSDKType { - events: string[]; - pagination: PageRequestSDKType | undefined; - order_by: OrderBy; -} -/** - * GetTxsEventResponse is the response type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventResponse { - /** txs is the list of queried transactions. */ - txs: Tx[]; - /** tx_responses is the list of queried TxResponses. */ - txResponses: TxResponse[]; - /** pagination defines a pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface GetTxsEventResponseProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse"; - value: Uint8Array; -} -/** - * GetTxsEventResponse is the response type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventResponseAmino { - /** txs is the list of queried transactions. */ - txs: TxAmino[]; - /** tx_responses is the list of queried TxResponses. */ - tx_responses: TxResponseAmino[]; - /** pagination defines a pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface GetTxsEventResponseAminoMsg { - type: "cosmos-sdk/GetTxsEventResponse"; - value: GetTxsEventResponseAmino; -} -/** - * GetTxsEventResponse is the response type for the Service.TxsByEvents - * RPC method. - */ -export interface GetTxsEventResponseSDKType { - txs: TxSDKType[]; - tx_responses: TxResponseSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - * RPC method. - */ -export interface BroadcastTxRequest { - /** tx_bytes is the raw transaction. */ - txBytes: Uint8Array; - mode: BroadcastMode; -} -export interface BroadcastTxRequestProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest"; - value: Uint8Array; -} -/** - * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - * RPC method. - */ -export interface BroadcastTxRequestAmino { - /** tx_bytes is the raw transaction. */ - tx_bytes: Uint8Array; - mode: BroadcastMode; -} -export interface BroadcastTxRequestAminoMsg { - type: "cosmos-sdk/BroadcastTxRequest"; - value: BroadcastTxRequestAmino; -} -/** - * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - * RPC method. - */ -export interface BroadcastTxRequestSDKType { - tx_bytes: Uint8Array; - mode: BroadcastMode; -} -/** - * BroadcastTxResponse is the response type for the - * Service.BroadcastTx method. - */ -export interface BroadcastTxResponse { - /** tx_response is the queried TxResponses. */ - txResponse: TxResponse | undefined; -} -export interface BroadcastTxResponseProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse"; - value: Uint8Array; -} -/** - * BroadcastTxResponse is the response type for the - * Service.BroadcastTx method. - */ -export interface BroadcastTxResponseAmino { - /** tx_response is the queried TxResponses. */ - tx_response?: TxResponseAmino | undefined; -} -export interface BroadcastTxResponseAminoMsg { - type: "cosmos-sdk/BroadcastTxResponse"; - value: BroadcastTxResponseAmino; -} -/** - * BroadcastTxResponse is the response type for the - * Service.BroadcastTx method. - */ -export interface BroadcastTxResponseSDKType { - tx_response: TxResponseSDKType | undefined; -} -/** - * SimulateRequest is the request type for the Service.Simulate - * RPC method. - */ -export interface SimulateRequest { - /** - * tx is the transaction to simulate. - * Deprecated. Send raw tx bytes instead. - */ - /** @deprecated */ - tx: Tx | undefined; - /** - * tx_bytes is the raw transaction. - * - * Since: cosmos-sdk 0.43 - */ - txBytes: Uint8Array; -} -export interface SimulateRequestProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.SimulateRequest"; - value: Uint8Array; -} -/** - * SimulateRequest is the request type for the Service.Simulate - * RPC method. - */ -export interface SimulateRequestAmino { - /** - * tx is the transaction to simulate. - * Deprecated. Send raw tx bytes instead. - */ - /** @deprecated */ - tx?: TxAmino | undefined; - /** - * tx_bytes is the raw transaction. - * - * Since: cosmos-sdk 0.43 - */ - tx_bytes: Uint8Array; -} -export interface SimulateRequestAminoMsg { - type: "cosmos-sdk/SimulateRequest"; - value: SimulateRequestAmino; -} -/** - * SimulateRequest is the request type for the Service.Simulate - * RPC method. - */ -export interface SimulateRequestSDKType { - /** @deprecated */ - tx: TxSDKType | undefined; - tx_bytes: Uint8Array; -} -/** - * SimulateResponse is the response type for the - * Service.SimulateRPC method. - */ -export interface SimulateResponse { - /** gas_info is the information about gas used in the simulation. */ - gasInfo: GasInfo | undefined; - /** result is the result of the simulation. */ - result: Result | undefined; -} -export interface SimulateResponseProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.SimulateResponse"; - value: Uint8Array; -} -/** - * SimulateResponse is the response type for the - * Service.SimulateRPC method. - */ -export interface SimulateResponseAmino { - /** gas_info is the information about gas used in the simulation. */ - gas_info?: GasInfoAmino | undefined; - /** result is the result of the simulation. */ - result?: ResultAmino | undefined; -} -export interface SimulateResponseAminoMsg { - type: "cosmos-sdk/SimulateResponse"; - value: SimulateResponseAmino; -} -/** - * SimulateResponse is the response type for the - * Service.SimulateRPC method. - */ -export interface SimulateResponseSDKType { - gas_info: GasInfoSDKType | undefined; - result: ResultSDKType | undefined; -} -/** - * GetTxRequest is the request type for the Service.GetTx - * RPC method. - */ -export interface GetTxRequest { - /** hash is the tx hash to query, encoded as a hex string. */ - hash: string; -} -export interface GetTxRequestProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.GetTxRequest"; - value: Uint8Array; -} -/** - * GetTxRequest is the request type for the Service.GetTx - * RPC method. - */ -export interface GetTxRequestAmino { - /** hash is the tx hash to query, encoded as a hex string. */ - hash: string; -} -export interface GetTxRequestAminoMsg { - type: "cosmos-sdk/GetTxRequest"; - value: GetTxRequestAmino; -} -/** - * GetTxRequest is the request type for the Service.GetTx - * RPC method. - */ -export interface GetTxRequestSDKType { - hash: string; -} -/** GetTxResponse is the response type for the Service.GetTx method. */ -export interface GetTxResponse { - /** tx is the queried transaction. */ - tx: Tx | undefined; - /** tx_response is the queried TxResponses. */ - txResponse: TxResponse | undefined; -} -export interface GetTxResponseProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.GetTxResponse"; - value: Uint8Array; -} -/** GetTxResponse is the response type for the Service.GetTx method. */ -export interface GetTxResponseAmino { - /** tx is the queried transaction. */ - tx?: TxAmino | undefined; - /** tx_response is the queried TxResponses. */ - tx_response?: TxResponseAmino | undefined; -} -export interface GetTxResponseAminoMsg { - type: "cosmos-sdk/GetTxResponse"; - value: GetTxResponseAmino; -} -/** GetTxResponse is the response type for the Service.GetTx method. */ -export interface GetTxResponseSDKType { - tx: TxSDKType | undefined; - tx_response: TxResponseSDKType | undefined; -} -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsRequest { - /** height is the height of the block to query. */ - height: bigint; - /** pagination defines a pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface GetBlockWithTxsRequestProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest"; - value: Uint8Array; -} -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsRequestAmino { - /** height is the height of the block to query. */ - height: string; - /** pagination defines a pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface GetBlockWithTxsRequestAminoMsg { - type: "cosmos-sdk/GetBlockWithTxsRequest"; - value: GetBlockWithTxsRequestAmino; -} -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsRequestSDKType { - height: bigint; - pagination: PageRequestSDKType | undefined; -} -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsResponse { - /** txs are the transactions in the block. */ - txs: Tx[]; - blockId: BlockID | undefined; - block: Block | undefined; - /** pagination defines a pagination for the response. */ - pagination: PageResponse | undefined; -} -export interface GetBlockWithTxsResponseProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse"; - value: Uint8Array; -} -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsResponseAmino { - /** txs are the transactions in the block. */ - txs: TxAmino[]; - block_id?: BlockIDAmino | undefined; - block?: BlockAmino | undefined; - /** pagination defines a pagination for the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface GetBlockWithTxsResponseAminoMsg { - type: "cosmos-sdk/GetBlockWithTxsResponse"; - value: GetBlockWithTxsResponseAmino; -} -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsResponseSDKType { - txs: TxSDKType[]; - block_id: BlockIDSDKType | undefined; - block: BlockSDKType | undefined; - pagination: PageResponseSDKType | undefined; -} -function createBaseGetTxsEventRequest(): GetTxsEventRequest { - return { - events: [], - pagination: PageRequest.fromPartial({}), - orderBy: 0 - }; -} -export const GetTxsEventRequest = { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", - aminoType: "cosmos-sdk/GetTxsEventRequest", - encode(message: GetTxsEventRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.events) { - writer.uint32(10).string(v!); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.orderBy !== 0) { - writer.uint32(24).int32(message.orderBy); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxsEventRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(reader.string()); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 3: - message.orderBy = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetTxsEventRequest { - return { - events: Array.isArray(object?.events) ? object.events.map((e: any) => String(e)) : [], - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - orderBy: isSet(object.orderBy) ? orderByFromJSON(object.orderBy) : -1 - }; - }, - toJSON(message: GetTxsEventRequest): unknown { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map(e => e); - } else { - obj.events = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - message.orderBy !== undefined && (obj.orderBy = orderByToJSON(message.orderBy)); - return obj; - }, - fromPartial(object: DeepPartial): GetTxsEventRequest { - const message = createBaseGetTxsEventRequest(); - message.events = object.events?.map(e => e) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - message.orderBy = object.orderBy ?? 0; - return message; - }, - fromSDK(object: GetTxsEventRequestSDKType): GetTxsEventRequest { - return { - events: Array.isArray(object?.events) ? object.events.map((e: any) => e) : [], - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined, - orderBy: isSet(object.order_by) ? orderByFromJSON(object.order_by) : -1 - }; - }, - toSDK(message: GetTxsEventRequest): GetTxsEventRequestSDKType { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map(e => e); - } else { - obj.events = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - message.orderBy !== undefined && (obj.order_by = orderByToJSON(message.orderBy)); - return obj; - }, - fromAmino(object: GetTxsEventRequestAmino): GetTxsEventRequest { - return { - events: Array.isArray(object?.events) ? object.events.map((e: any) => e) : [], - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined, - orderBy: isSet(object.order_by) ? orderByFromJSON(object.order_by) : -1 - }; - }, - toAmino(message: GetTxsEventRequest): GetTxsEventRequestAmino { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map(e => e); - } else { - obj.events = []; - } - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - obj.order_by = message.orderBy; - return obj; - }, - fromAminoMsg(object: GetTxsEventRequestAminoMsg): GetTxsEventRequest { - return GetTxsEventRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetTxsEventRequest): GetTxsEventRequestAminoMsg { - return { - type: "cosmos-sdk/GetTxsEventRequest", - value: GetTxsEventRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetTxsEventRequestProtoMsg): GetTxsEventRequest { - return GetTxsEventRequest.decode(message.value); - }, - toProto(message: GetTxsEventRequest): Uint8Array { - return GetTxsEventRequest.encode(message).finish(); - }, - toProtoMsg(message: GetTxsEventRequest): GetTxsEventRequestProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventRequest", - value: GetTxsEventRequest.encode(message).finish() - }; - } -}; -function createBaseGetTxsEventResponse(): GetTxsEventResponse { - return { - txs: [], - txResponses: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const GetTxsEventResponse = { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", - aminoType: "cosmos-sdk/GetTxsEventResponse", - encode(message: GetTxsEventResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.txResponses) { - TxResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxsEventResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.txResponses.push(TxResponse.decode(reader, reader.uint32())); - break; - case 3: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetTxsEventResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromJSON(e)) : [], - txResponses: Array.isArray(object?.txResponses) ? object.txResponses.map((e: any) => TxResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetTxsEventResponse): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e ? Tx.toJSON(e) : undefined); - } else { - obj.txs = []; - } - if (message.txResponses) { - obj.txResponses = message.txResponses.map(e => e ? TxResponse.toJSON(e) : undefined); - } else { - obj.txResponses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetTxsEventResponse { - const message = createBaseGetTxsEventResponse(); - message.txs = object.txs?.map(e => Tx.fromPartial(e)) || []; - message.txResponses = object.txResponses?.map(e => TxResponse.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetTxsEventResponseSDKType): GetTxsEventResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromSDK(e)) : [], - txResponses: Array.isArray(object?.tx_responses) ? object.tx_responses.map((e: any) => TxResponse.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetTxsEventResponse): GetTxsEventResponseSDKType { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e ? Tx.toSDK(e) : undefined); - } else { - obj.txs = []; - } - if (message.txResponses) { - obj.tx_responses = message.txResponses.map(e => e ? TxResponse.toSDK(e) : undefined); - } else { - obj.tx_responses = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetTxsEventResponseAmino): GetTxsEventResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromAmino(e)) : [], - txResponses: Array.isArray(object?.tx_responses) ? object.tx_responses.map((e: any) => TxResponse.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetTxsEventResponse): GetTxsEventResponseAmino { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e ? Tx.toAmino(e) : undefined); - } else { - obj.txs = []; - } - if (message.txResponses) { - obj.tx_responses = message.txResponses.map(e => e ? TxResponse.toAmino(e) : undefined); - } else { - obj.tx_responses = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetTxsEventResponseAminoMsg): GetTxsEventResponse { - return GetTxsEventResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetTxsEventResponse): GetTxsEventResponseAminoMsg { - return { - type: "cosmos-sdk/GetTxsEventResponse", - value: GetTxsEventResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetTxsEventResponseProtoMsg): GetTxsEventResponse { - return GetTxsEventResponse.decode(message.value); - }, - toProto(message: GetTxsEventResponse): Uint8Array { - return GetTxsEventResponse.encode(message).finish(); - }, - toProtoMsg(message: GetTxsEventResponse): GetTxsEventResponseProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.GetTxsEventResponse", - value: GetTxsEventResponse.encode(message).finish() - }; - } -}; -function createBaseBroadcastTxRequest(): BroadcastTxRequest { - return { - txBytes: new Uint8Array(), - mode: 0 - }; -} -export const BroadcastTxRequest = { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", - aminoType: "cosmos-sdk/BroadcastTxRequest", - encode(message: BroadcastTxRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txBytes.length !== 0) { - writer.uint32(10).bytes(message.txBytes); - } - if (message.mode !== 0) { - writer.uint32(16).int32(message.mode); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBroadcastTxRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txBytes = reader.bytes(); - break; - case 2: - message.mode = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BroadcastTxRequest { - return { - txBytes: isSet(object.txBytes) ? bytesFromBase64(object.txBytes) : new Uint8Array(), - mode: isSet(object.mode) ? broadcastModeFromJSON(object.mode) : -1 - }; - }, - toJSON(message: BroadcastTxRequest): unknown { - const obj: any = {}; - message.txBytes !== undefined && (obj.txBytes = base64FromBytes(message.txBytes !== undefined ? message.txBytes : new Uint8Array())); - message.mode !== undefined && (obj.mode = broadcastModeToJSON(message.mode)); - return obj; - }, - fromPartial(object: DeepPartial): BroadcastTxRequest { - const message = createBaseBroadcastTxRequest(); - message.txBytes = object.txBytes ?? new Uint8Array(); - message.mode = object.mode ?? 0; - return message; - }, - fromSDK(object: BroadcastTxRequestSDKType): BroadcastTxRequest { - return { - txBytes: object?.tx_bytes, - mode: isSet(object.mode) ? broadcastModeFromJSON(object.mode) : -1 - }; - }, - toSDK(message: BroadcastTxRequest): BroadcastTxRequestSDKType { - const obj: any = {}; - obj.tx_bytes = message.txBytes; - message.mode !== undefined && (obj.mode = broadcastModeToJSON(message.mode)); - return obj; - }, - fromAmino(object: BroadcastTxRequestAmino): BroadcastTxRequest { - return { - txBytes: object.tx_bytes, - mode: isSet(object.mode) ? broadcastModeFromJSON(object.mode) : -1 - }; - }, - toAmino(message: BroadcastTxRequest): BroadcastTxRequestAmino { - const obj: any = {}; - obj.tx_bytes = message.txBytes; - obj.mode = message.mode; - return obj; - }, - fromAminoMsg(object: BroadcastTxRequestAminoMsg): BroadcastTxRequest { - return BroadcastTxRequest.fromAmino(object.value); - }, - toAminoMsg(message: BroadcastTxRequest): BroadcastTxRequestAminoMsg { - return { - type: "cosmos-sdk/BroadcastTxRequest", - value: BroadcastTxRequest.toAmino(message) - }; - }, - fromProtoMsg(message: BroadcastTxRequestProtoMsg): BroadcastTxRequest { - return BroadcastTxRequest.decode(message.value); - }, - toProto(message: BroadcastTxRequest): Uint8Array { - return BroadcastTxRequest.encode(message).finish(); - }, - toProtoMsg(message: BroadcastTxRequest): BroadcastTxRequestProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxRequest", - value: BroadcastTxRequest.encode(message).finish() - }; - } -}; -function createBaseBroadcastTxResponse(): BroadcastTxResponse { - return { - txResponse: TxResponse.fromPartial({}) - }; -} -export const BroadcastTxResponse = { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", - aminoType: "cosmos-sdk/BroadcastTxResponse", - encode(message: BroadcastTxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txResponse !== undefined) { - TxResponse.encode(message.txResponse, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBroadcastTxResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txResponse = TxResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BroadcastTxResponse { - return { - txResponse: isSet(object.txResponse) ? TxResponse.fromJSON(object.txResponse) : undefined - }; - }, - toJSON(message: BroadcastTxResponse): unknown { - const obj: any = {}; - message.txResponse !== undefined && (obj.txResponse = message.txResponse ? TxResponse.toJSON(message.txResponse) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): BroadcastTxResponse { - const message = createBaseBroadcastTxResponse(); - message.txResponse = object.txResponse !== undefined && object.txResponse !== null ? TxResponse.fromPartial(object.txResponse) : undefined; - return message; - }, - fromSDK(object: BroadcastTxResponseSDKType): BroadcastTxResponse { - return { - txResponse: object.tx_response ? TxResponse.fromSDK(object.tx_response) : undefined - }; - }, - toSDK(message: BroadcastTxResponse): BroadcastTxResponseSDKType { - const obj: any = {}; - message.txResponse !== undefined && (obj.tx_response = message.txResponse ? TxResponse.toSDK(message.txResponse) : undefined); - return obj; - }, - fromAmino(object: BroadcastTxResponseAmino): BroadcastTxResponse { - return { - txResponse: object?.tx_response ? TxResponse.fromAmino(object.tx_response) : undefined - }; - }, - toAmino(message: BroadcastTxResponse): BroadcastTxResponseAmino { - const obj: any = {}; - obj.tx_response = message.txResponse ? TxResponse.toAmino(message.txResponse) : undefined; - return obj; - }, - fromAminoMsg(object: BroadcastTxResponseAminoMsg): BroadcastTxResponse { - return BroadcastTxResponse.fromAmino(object.value); - }, - toAminoMsg(message: BroadcastTxResponse): BroadcastTxResponseAminoMsg { - return { - type: "cosmos-sdk/BroadcastTxResponse", - value: BroadcastTxResponse.toAmino(message) - }; - }, - fromProtoMsg(message: BroadcastTxResponseProtoMsg): BroadcastTxResponse { - return BroadcastTxResponse.decode(message.value); - }, - toProto(message: BroadcastTxResponse): Uint8Array { - return BroadcastTxResponse.encode(message).finish(); - }, - toProtoMsg(message: BroadcastTxResponse): BroadcastTxResponseProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.BroadcastTxResponse", - value: BroadcastTxResponse.encode(message).finish() - }; - } -}; -function createBaseSimulateRequest(): SimulateRequest { - return { - tx: Tx.fromPartial({}), - txBytes: new Uint8Array() - }; -} -export const SimulateRequest = { - typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", - aminoType: "cosmos-sdk/SimulateRequest", - encode(message: SimulateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - if (message.txBytes.length !== 0) { - writer.uint32(18).bytes(message.txBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimulateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimulateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - case 2: - message.txBytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SimulateRequest { - return { - tx: isSet(object.tx) ? Tx.fromJSON(object.tx) : undefined, - txBytes: isSet(object.txBytes) ? bytesFromBase64(object.txBytes) : new Uint8Array() - }; - }, - toJSON(message: SimulateRequest): unknown { - const obj: any = {}; - message.tx !== undefined && (obj.tx = message.tx ? Tx.toJSON(message.tx) : undefined); - message.txBytes !== undefined && (obj.txBytes = base64FromBytes(message.txBytes !== undefined ? message.txBytes : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): SimulateRequest { - const message = createBaseSimulateRequest(); - message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; - message.txBytes = object.txBytes ?? new Uint8Array(); - return message; - }, - fromSDK(object: SimulateRequestSDKType): SimulateRequest { - return { - tx: object.tx ? Tx.fromSDK(object.tx) : undefined, - txBytes: object?.tx_bytes - }; - }, - toSDK(message: SimulateRequest): SimulateRequestSDKType { - const obj: any = {}; - message.tx !== undefined && (obj.tx = message.tx ? Tx.toSDK(message.tx) : undefined); - obj.tx_bytes = message.txBytes; - return obj; - }, - fromAmino(object: SimulateRequestAmino): SimulateRequest { - return { - tx: object?.tx ? Tx.fromAmino(object.tx) : undefined, - txBytes: object.tx_bytes - }; - }, - toAmino(message: SimulateRequest): SimulateRequestAmino { - const obj: any = {}; - obj.tx = message.tx ? Tx.toAmino(message.tx) : undefined; - obj.tx_bytes = message.txBytes; - return obj; - }, - fromAminoMsg(object: SimulateRequestAminoMsg): SimulateRequest { - return SimulateRequest.fromAmino(object.value); - }, - toAminoMsg(message: SimulateRequest): SimulateRequestAminoMsg { - return { - type: "cosmos-sdk/SimulateRequest", - value: SimulateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: SimulateRequestProtoMsg): SimulateRequest { - return SimulateRequest.decode(message.value); - }, - toProto(message: SimulateRequest): Uint8Array { - return SimulateRequest.encode(message).finish(); - }, - toProtoMsg(message: SimulateRequest): SimulateRequestProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.SimulateRequest", - value: SimulateRequest.encode(message).finish() - }; - } -}; -function createBaseSimulateResponse(): SimulateResponse { - return { - gasInfo: GasInfo.fromPartial({}), - result: Result.fromPartial({}) - }; -} -export const SimulateResponse = { - typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", - aminoType: "cosmos-sdk/SimulateResponse", - encode(message: SimulateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gasInfo !== undefined) { - GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== undefined) { - Result.encode(message.result, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimulateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimulateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SimulateResponse { - return { - gasInfo: isSet(object.gasInfo) ? GasInfo.fromJSON(object.gasInfo) : undefined, - result: isSet(object.result) ? Result.fromJSON(object.result) : undefined - }; - }, - toJSON(message: SimulateResponse): unknown { - const obj: any = {}; - message.gasInfo !== undefined && (obj.gasInfo = message.gasInfo ? GasInfo.toJSON(message.gasInfo) : undefined); - message.result !== undefined && (obj.result = message.result ? Result.toJSON(message.result) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SimulateResponse { - const message = createBaseSimulateResponse(); - message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null ? GasInfo.fromPartial(object.gasInfo) : undefined; - message.result = object.result !== undefined && object.result !== null ? Result.fromPartial(object.result) : undefined; - return message; - }, - fromSDK(object: SimulateResponseSDKType): SimulateResponse { - return { - gasInfo: object.gas_info ? GasInfo.fromSDK(object.gas_info) : undefined, - result: object.result ? Result.fromSDK(object.result) : undefined - }; - }, - toSDK(message: SimulateResponse): SimulateResponseSDKType { - const obj: any = {}; - message.gasInfo !== undefined && (obj.gas_info = message.gasInfo ? GasInfo.toSDK(message.gasInfo) : undefined); - message.result !== undefined && (obj.result = message.result ? Result.toSDK(message.result) : undefined); - return obj; - }, - fromAmino(object: SimulateResponseAmino): SimulateResponse { - return { - gasInfo: object?.gas_info ? GasInfo.fromAmino(object.gas_info) : undefined, - result: object?.result ? Result.fromAmino(object.result) : undefined - }; - }, - toAmino(message: SimulateResponse): SimulateResponseAmino { - const obj: any = {}; - obj.gas_info = message.gasInfo ? GasInfo.toAmino(message.gasInfo) : undefined; - obj.result = message.result ? Result.toAmino(message.result) : undefined; - return obj; - }, - fromAminoMsg(object: SimulateResponseAminoMsg): SimulateResponse { - return SimulateResponse.fromAmino(object.value); - }, - toAminoMsg(message: SimulateResponse): SimulateResponseAminoMsg { - return { - type: "cosmos-sdk/SimulateResponse", - value: SimulateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SimulateResponseProtoMsg): SimulateResponse { - return SimulateResponse.decode(message.value); - }, - toProto(message: SimulateResponse): Uint8Array { - return SimulateResponse.encode(message).finish(); - }, - toProtoMsg(message: SimulateResponse): SimulateResponseProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.SimulateResponse", - value: SimulateResponse.encode(message).finish() - }; - } -}; -function createBaseGetTxRequest(): GetTxRequest { - return { - hash: "" - }; -} -export const GetTxRequest = { - typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", - aminoType: "cosmos-sdk/GetTxRequest", - encode(message: GetTxRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetTxRequest { - return { - hash: isSet(object.hash) ? String(object.hash) : "" - }; - }, - toJSON(message: GetTxRequest): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - fromPartial(object: DeepPartial): GetTxRequest { - const message = createBaseGetTxRequest(); - message.hash = object.hash ?? ""; - return message; - }, - fromSDK(object: GetTxRequestSDKType): GetTxRequest { - return { - hash: object?.hash - }; - }, - toSDK(message: GetTxRequest): GetTxRequestSDKType { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAmino(object: GetTxRequestAmino): GetTxRequest { - return { - hash: object.hash - }; - }, - toAmino(message: GetTxRequest): GetTxRequestAmino { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: GetTxRequestAminoMsg): GetTxRequest { - return GetTxRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetTxRequest): GetTxRequestAminoMsg { - return { - type: "cosmos-sdk/GetTxRequest", - value: GetTxRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetTxRequestProtoMsg): GetTxRequest { - return GetTxRequest.decode(message.value); - }, - toProto(message: GetTxRequest): Uint8Array { - return GetTxRequest.encode(message).finish(); - }, - toProtoMsg(message: GetTxRequest): GetTxRequestProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.GetTxRequest", - value: GetTxRequest.encode(message).finish() - }; - } -}; -function createBaseGetTxResponse(): GetTxResponse { - return { - tx: Tx.fromPartial({}), - txResponse: TxResponse.fromPartial({}) - }; -} -export const GetTxResponse = { - typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", - aminoType: "cosmos-sdk/GetTxResponse", - encode(message: GetTxResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx !== undefined) { - Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); - } - if (message.txResponse !== undefined) { - TxResponse.encode(message.txResponse, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetTxResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetTxResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = Tx.decode(reader, reader.uint32()); - break; - case 2: - message.txResponse = TxResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetTxResponse { - return { - tx: isSet(object.tx) ? Tx.fromJSON(object.tx) : undefined, - txResponse: isSet(object.txResponse) ? TxResponse.fromJSON(object.txResponse) : undefined - }; - }, - toJSON(message: GetTxResponse): unknown { - const obj: any = {}; - message.tx !== undefined && (obj.tx = message.tx ? Tx.toJSON(message.tx) : undefined); - message.txResponse !== undefined && (obj.txResponse = message.txResponse ? TxResponse.toJSON(message.txResponse) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetTxResponse { - const message = createBaseGetTxResponse(); - message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; - message.txResponse = object.txResponse !== undefined && object.txResponse !== null ? TxResponse.fromPartial(object.txResponse) : undefined; - return message; - }, - fromSDK(object: GetTxResponseSDKType): GetTxResponse { - return { - tx: object.tx ? Tx.fromSDK(object.tx) : undefined, - txResponse: object.tx_response ? TxResponse.fromSDK(object.tx_response) : undefined - }; - }, - toSDK(message: GetTxResponse): GetTxResponseSDKType { - const obj: any = {}; - message.tx !== undefined && (obj.tx = message.tx ? Tx.toSDK(message.tx) : undefined); - message.txResponse !== undefined && (obj.tx_response = message.txResponse ? TxResponse.toSDK(message.txResponse) : undefined); - return obj; - }, - fromAmino(object: GetTxResponseAmino): GetTxResponse { - return { - tx: object?.tx ? Tx.fromAmino(object.tx) : undefined, - txResponse: object?.tx_response ? TxResponse.fromAmino(object.tx_response) : undefined - }; - }, - toAmino(message: GetTxResponse): GetTxResponseAmino { - const obj: any = {}; - obj.tx = message.tx ? Tx.toAmino(message.tx) : undefined; - obj.tx_response = message.txResponse ? TxResponse.toAmino(message.txResponse) : undefined; - return obj; - }, - fromAminoMsg(object: GetTxResponseAminoMsg): GetTxResponse { - return GetTxResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetTxResponse): GetTxResponseAminoMsg { - return { - type: "cosmos-sdk/GetTxResponse", - value: GetTxResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetTxResponseProtoMsg): GetTxResponse { - return GetTxResponse.decode(message.value); - }, - toProto(message: GetTxResponse): Uint8Array { - return GetTxResponse.encode(message).finish(); - }, - toProtoMsg(message: GetTxResponse): GetTxResponseProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.GetTxResponse", - value: GetTxResponse.encode(message).finish() - }; - } -}; -function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { - return { - height: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const GetBlockWithTxsRequest = { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", - aminoType: "cosmos-sdk/GetBlockWithTxsRequest", - encode(message: GetBlockWithTxsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockWithTxsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetBlockWithTxsRequest { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetBlockWithTxsRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetBlockWithTxsRequest { - const message = createBaseGetBlockWithTxsRequest(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetBlockWithTxsRequestSDKType): GetBlockWithTxsRequest { - return { - height: object?.height, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestSDKType { - const obj: any = {}; - obj.height = message.height; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetBlockWithTxsRequestAmino): GetBlockWithTxsRequest { - return { - height: BigInt(object.height), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetBlockWithTxsRequestAminoMsg): GetBlockWithTxsRequest { - return GetBlockWithTxsRequest.fromAmino(object.value); - }, - toAminoMsg(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestAminoMsg { - return { - type: "cosmos-sdk/GetBlockWithTxsRequest", - value: GetBlockWithTxsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GetBlockWithTxsRequestProtoMsg): GetBlockWithTxsRequest { - return GetBlockWithTxsRequest.decode(message.value); - }, - toProto(message: GetBlockWithTxsRequest): Uint8Array { - return GetBlockWithTxsRequest.encode(message).finish(); - }, - toProtoMsg(message: GetBlockWithTxsRequest): GetBlockWithTxsRequestProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsRequest", - value: GetBlockWithTxsRequest.encode(message).finish() - }; - } -}; -function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { - return { - txs: [], - blockId: BlockID.fromPartial({}), - block: Block.fromPartial({}), - pagination: PageResponse.fromPartial({}) - }; -} -export const GetBlockWithTxsResponse = { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", - aminoType: "cosmos-sdk/GetBlockWithTxsResponse", - encode(message: GetBlockWithTxsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(26).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockWithTxsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 3: - message.block = Block.decode(reader, reader.uint32()); - break; - case 4: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GetBlockWithTxsResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromJSON(e)) : [], - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - block: isSet(object.block) ? Block.fromJSON(object.block) : undefined, - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GetBlockWithTxsResponse): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e ? Tx.toJSON(e) : undefined); - } else { - obj.txs = []; - } - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GetBlockWithTxsResponse { - const message = createBaseGetBlockWithTxsResponse(); - message.txs = object.txs?.map(e => Tx.fromPartial(e)) || []; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.block = object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GetBlockWithTxsResponseSDKType): GetBlockWithTxsResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromSDK(e)) : [], - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - block: object.block ? Block.fromSDK(object.block) : undefined, - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseSDKType { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e ? Tx.toSDK(e) : undefined); - } else { - obj.txs = []; - } - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toSDK(message.block) : undefined); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GetBlockWithTxsResponseAmino): GetBlockWithTxsResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromAmino(e)) : [], - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - block: object?.block ? Block.fromAmino(object.block) : undefined, - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseAmino { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e ? Tx.toAmino(e) : undefined); - } else { - obj.txs = []; - } - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - obj.block = message.block ? Block.toAmino(message.block) : undefined; - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GetBlockWithTxsResponseAminoMsg): GetBlockWithTxsResponse { - return GetBlockWithTxsResponse.fromAmino(object.value); - }, - toAminoMsg(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseAminoMsg { - return { - type: "cosmos-sdk/GetBlockWithTxsResponse", - value: GetBlockWithTxsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GetBlockWithTxsResponseProtoMsg): GetBlockWithTxsResponse { - return GetBlockWithTxsResponse.decode(message.value); - }, - toProto(message: GetBlockWithTxsResponse): Uint8Array { - return GetBlockWithTxsResponse.encode(message).finish(); - }, - toProtoMsg(message: GetBlockWithTxsResponse): GetBlockWithTxsResponseProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.GetBlockWithTxsResponse", - value: GetBlockWithTxsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/tx.ts deleted file mode 100644 index 16126743..00000000 --- a/examples/interchainjs/src/codegen/cosmos/tx/v1beta1/tx.ts +++ /dev/null @@ -1,2417 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; -import { CompactBitArray, CompactBitArrayAmino, CompactBitArraySDKType } from "../../crypto/multisig/v1beta1/multisig"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** Tx is the standard type used for broadcasting transactions. */ -export interface Tx { - /** body is the processable content of the transaction */ - body: TxBody | undefined; - /** - * auth_info is the authorization related content of the transaction, - * specifically signers, signer modes and fee - */ - authInfo: AuthInfo | undefined; - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures: Uint8Array[]; -} -export interface TxProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.Tx"; - value: Uint8Array; -} -/** Tx is the standard type used for broadcasting transactions. */ -export interface TxAmino { - /** body is the processable content of the transaction */ - body?: TxBodyAmino | undefined; - /** - * auth_info is the authorization related content of the transaction, - * specifically signers, signer modes and fee - */ - auth_info?: AuthInfoAmino | undefined; - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures: Uint8Array[]; -} -export interface TxAminoMsg { - type: "cosmos-sdk/Tx"; - value: TxAmino; -} -/** Tx is the standard type used for broadcasting transactions. */ -export interface TxSDKType { - body: TxBodySDKType | undefined; - auth_info: AuthInfoSDKType | undefined; - signatures: Uint8Array[]; -} -/** - * TxRaw is a variant of Tx that pins the signer's exact binary representation - * of body and auth_info. This is used for signing, broadcasting and - * verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and - * the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used - * as the transaction ID. - */ -export interface TxRaw { - /** - * body_bytes is a protobuf serialization of a TxBody that matches the - * representation in SignDoc. - */ - bodyBytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in SignDoc. - */ - authInfoBytes: Uint8Array; - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures: Uint8Array[]; -} -export interface TxRawProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.TxRaw"; - value: Uint8Array; -} -/** - * TxRaw is a variant of Tx that pins the signer's exact binary representation - * of body and auth_info. This is used for signing, broadcasting and - * verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and - * the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used - * as the transaction ID. - */ -export interface TxRawAmino { - /** - * body_bytes is a protobuf serialization of a TxBody that matches the - * representation in SignDoc. - */ - body_bytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in SignDoc. - */ - auth_info_bytes: Uint8Array; - /** - * signatures is a list of signatures that matches the length and order of - * AuthInfo's signer_infos to allow connecting signature meta information like - * public key and signing mode by position. - */ - signatures: Uint8Array[]; -} -export interface TxRawAminoMsg { - type: "cosmos-sdk/TxRaw"; - value: TxRawAmino; -} -/** - * TxRaw is a variant of Tx that pins the signer's exact binary representation - * of body and auth_info. This is used for signing, broadcasting and - * verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and - * the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used - * as the transaction ID. - */ -export interface TxRawSDKType { - body_bytes: Uint8Array; - auth_info_bytes: Uint8Array; - signatures: Uint8Array[]; -} -/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ -export interface SignDoc { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - bodyBytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in TxRaw. - */ - authInfoBytes: Uint8Array; - /** - * chain_id is the unique identifier of the chain this transaction targets. - * It prevents signed transactions from being used on another chain by an - * attacker - */ - chainId: string; - /** account_number is the account number of the account in state */ - accountNumber: bigint; -} -export interface SignDocProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.SignDoc"; - value: Uint8Array; -} -/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ -export interface SignDocAmino { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - body_bytes: Uint8Array; - /** - * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - * representation in TxRaw. - */ - auth_info_bytes: Uint8Array; - /** - * chain_id is the unique identifier of the chain this transaction targets. - * It prevents signed transactions from being used on another chain by an - * attacker - */ - chain_id: string; - /** account_number is the account number of the account in state */ - account_number: string; -} -export interface SignDocAminoMsg { - type: "cosmos-sdk/SignDoc"; - value: SignDocAmino; -} -/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ -export interface SignDocSDKType { - body_bytes: Uint8Array; - auth_info_bytes: Uint8Array; - chain_id: string; - account_number: bigint; -} -/** - * SignDocDirectAux is the type used for generating sign bytes for - * SIGN_MODE_DIRECT_AUX. - * - * Since: cosmos-sdk 0.46 - */ -export interface SignDocDirectAux { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - bodyBytes: Uint8Array; - /** public_key is the public key of the signing account. */ - publicKey: Any | undefined; - /** - * chain_id is the identifier of the chain this transaction targets. - * It prevents signed transactions from being used on another chain by an - * attacker. - */ - chainId: string; - /** account_number is the account number of the account in state. */ - accountNumber: bigint; - /** sequence is the sequence number of the signing account. */ - sequence: bigint; - /** - * Tip is the optional tip used for meta-transactions. It should be left - * empty if the signer is not the tipper for this transaction. - */ - tip: Tip | undefined; -} -export interface SignDocDirectAuxProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux"; - value: Uint8Array; -} -/** - * SignDocDirectAux is the type used for generating sign bytes for - * SIGN_MODE_DIRECT_AUX. - * - * Since: cosmos-sdk 0.46 - */ -export interface SignDocDirectAuxAmino { - /** - * body_bytes is protobuf serialization of a TxBody that matches the - * representation in TxRaw. - */ - body_bytes: Uint8Array; - /** public_key is the public key of the signing account. */ - public_key?: AnyAmino | undefined; - /** - * chain_id is the identifier of the chain this transaction targets. - * It prevents signed transactions from being used on another chain by an - * attacker. - */ - chain_id: string; - /** account_number is the account number of the account in state. */ - account_number: string; - /** sequence is the sequence number of the signing account. */ - sequence: string; - /** - * Tip is the optional tip used for meta-transactions. It should be left - * empty if the signer is not the tipper for this transaction. - */ - tip?: TipAmino | undefined; -} -export interface SignDocDirectAuxAminoMsg { - type: "cosmos-sdk/SignDocDirectAux"; - value: SignDocDirectAuxAmino; -} -/** - * SignDocDirectAux is the type used for generating sign bytes for - * SIGN_MODE_DIRECT_AUX. - * - * Since: cosmos-sdk 0.46 - */ -export interface SignDocDirectAuxSDKType { - body_bytes: Uint8Array; - public_key: AnySDKType | undefined; - chain_id: string; - account_number: bigint; - sequence: bigint; - tip: TipSDKType | undefined; -} -/** TxBody is the body of a transaction that all signers sign over. */ -export interface TxBody { - /** - * messages is a list of messages to be executed. The required signers of - * those messages define the number and order of elements in AuthInfo's - * signer_infos and Tx's signatures. Each required signer address is added to - * the list only the first time it occurs. - * By convention, the first required signer (usually from the first message) - * is referred to as the primary signer and pays the fee for the whole - * transaction. - */ - messages: Any[]; - /** - * memo is any arbitrary note/comment to be added to the transaction. - * WARNING: in clients, any publicly exposed text should not be called memo, - * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - */ - memo: string; - /** - * timeout is the block height after which this transaction will not - * be processed by the chain - */ - timeoutHeight: bigint; - /** - * extension_options are arbitrary options that can be added by chains - * when the default options are not sufficient. If any of these are present - * and can't be handled, the transaction will be rejected - */ - extensionOptions: Any[]; - /** - * extension_options are arbitrary options that can be added by chains - * when the default options are not sufficient. If any of these are present - * and can't be handled, they will be ignored - */ - nonCriticalExtensionOptions: Any[]; -} -export interface TxBodyProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.TxBody"; - value: Uint8Array; -} -/** TxBody is the body of a transaction that all signers sign over. */ -export interface TxBodyAmino { - /** - * messages is a list of messages to be executed. The required signers of - * those messages define the number and order of elements in AuthInfo's - * signer_infos and Tx's signatures. Each required signer address is added to - * the list only the first time it occurs. - * By convention, the first required signer (usually from the first message) - * is referred to as the primary signer and pays the fee for the whole - * transaction. - */ - messages: AnyAmino[]; - /** - * memo is any arbitrary note/comment to be added to the transaction. - * WARNING: in clients, any publicly exposed text should not be called memo, - * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - */ - memo: string; - /** - * timeout is the block height after which this transaction will not - * be processed by the chain - */ - timeout_height: string; - /** - * extension_options are arbitrary options that can be added by chains - * when the default options are not sufficient. If any of these are present - * and can't be handled, the transaction will be rejected - */ - extension_options: AnyAmino[]; - /** - * extension_options are arbitrary options that can be added by chains - * when the default options are not sufficient. If any of these are present - * and can't be handled, they will be ignored - */ - non_critical_extension_options: AnyAmino[]; -} -export interface TxBodyAminoMsg { - type: "cosmos-sdk/TxBody"; - value: TxBodyAmino; -} -/** TxBody is the body of a transaction that all signers sign over. */ -export interface TxBodySDKType { - messages: AnySDKType[]; - memo: string; - timeout_height: bigint; - extension_options: AnySDKType[]; - non_critical_extension_options: AnySDKType[]; -} -/** - * AuthInfo describes the fee and signer modes that are used to sign a - * transaction. - */ -export interface AuthInfo { - /** - * signer_infos defines the signing modes for the required signers. The number - * and order of elements must match the required signers from TxBody's - * messages. The first element is the primary signer and the one which pays - * the fee. - */ - signerInfos: SignerInfo[]; - /** - * Fee is the fee and gas limit for the transaction. The first signer is the - * primary signer and the one which pays the fee. The fee can be calculated - * based on the cost of evaluating the body and doing signature verification - * of the signers. This can be estimated via simulation. - */ - fee: Fee | undefined; - /** - * Tip is the optional tip used for meta-transactions. - * - * Since: cosmos-sdk 0.46 - */ - tip: Tip | undefined; -} -export interface AuthInfoProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.AuthInfo"; - value: Uint8Array; -} -/** - * AuthInfo describes the fee and signer modes that are used to sign a - * transaction. - */ -export interface AuthInfoAmino { - /** - * signer_infos defines the signing modes for the required signers. The number - * and order of elements must match the required signers from TxBody's - * messages. The first element is the primary signer and the one which pays - * the fee. - */ - signer_infos: SignerInfoAmino[]; - /** - * Fee is the fee and gas limit for the transaction. The first signer is the - * primary signer and the one which pays the fee. The fee can be calculated - * based on the cost of evaluating the body and doing signature verification - * of the signers. This can be estimated via simulation. - */ - fee?: FeeAmino | undefined; - /** - * Tip is the optional tip used for meta-transactions. - * - * Since: cosmos-sdk 0.46 - */ - tip?: TipAmino | undefined; -} -export interface AuthInfoAminoMsg { - type: "cosmos-sdk/AuthInfo"; - value: AuthInfoAmino; -} -/** - * AuthInfo describes the fee and signer modes that are used to sign a - * transaction. - */ -export interface AuthInfoSDKType { - signer_infos: SignerInfoSDKType[]; - fee: FeeSDKType | undefined; - tip: TipSDKType | undefined; -} -/** - * SignerInfo describes the public key and signing mode of a single top-level - * signer. - */ -export interface SignerInfo { - /** - * public_key is the public key of the signer. It is optional for accounts - * that already exist in state. If unset, the verifier can use the required \ - * signer address for this position and lookup the public key. - */ - publicKey: Any | undefined; - /** - * mode_info describes the signing mode of the signer and is a nested - * structure to support nested multisig pubkey's - */ - modeInfo: ModeInfo | undefined; - /** - * sequence is the sequence of the account, which describes the - * number of committed transactions signed by a given address. It is used to - * prevent replay attacks. - */ - sequence: bigint; -} -export interface SignerInfoProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.SignerInfo"; - value: Uint8Array; -} -/** - * SignerInfo describes the public key and signing mode of a single top-level - * signer. - */ -export interface SignerInfoAmino { - /** - * public_key is the public key of the signer. It is optional for accounts - * that already exist in state. If unset, the verifier can use the required \ - * signer address for this position and lookup the public key. - */ - public_key?: AnyAmino | undefined; - /** - * mode_info describes the signing mode of the signer and is a nested - * structure to support nested multisig pubkey's - */ - mode_info?: ModeInfoAmino | undefined; - /** - * sequence is the sequence of the account, which describes the - * number of committed transactions signed by a given address. It is used to - * prevent replay attacks. - */ - sequence: string; -} -export interface SignerInfoAminoMsg { - type: "cosmos-sdk/SignerInfo"; - value: SignerInfoAmino; -} -/** - * SignerInfo describes the public key and signing mode of a single top-level - * signer. - */ -export interface SignerInfoSDKType { - public_key: AnySDKType | undefined; - mode_info: ModeInfoSDKType | undefined; - sequence: bigint; -} -/** ModeInfo describes the signing mode of a single or nested multisig signer. */ -export interface ModeInfo { - /** single represents a single signer */ - single?: ModeInfo_Single | undefined; - /** multi represents a nested multisig signer */ - multi?: ModeInfo_Multi | undefined; -} -export interface ModeInfoProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.ModeInfo"; - value: Uint8Array; -} -/** ModeInfo describes the signing mode of a single or nested multisig signer. */ -export interface ModeInfoAmino { - /** single represents a single signer */ - single?: ModeInfo_SingleAmino | undefined; - /** multi represents a nested multisig signer */ - multi?: ModeInfo_MultiAmino | undefined; -} -export interface ModeInfoAminoMsg { - type: "cosmos-sdk/ModeInfo"; - value: ModeInfoAmino; -} -/** ModeInfo describes the signing mode of a single or nested multisig signer. */ -export interface ModeInfoSDKType { - single?: ModeInfo_SingleSDKType | undefined; - multi?: ModeInfo_MultiSDKType | undefined; -} -/** - * Single is the mode info for a single signer. It is structured as a message - * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - * future - */ -export interface ModeInfo_Single { - /** mode is the signing mode of the single signer */ - mode: SignMode; -} -export interface ModeInfo_SingleProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.Single"; - value: Uint8Array; -} -/** - * Single is the mode info for a single signer. It is structured as a message - * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - * future - */ -export interface ModeInfo_SingleAmino { - /** mode is the signing mode of the single signer */ - mode: SignMode; -} -export interface ModeInfo_SingleAminoMsg { - type: "cosmos-sdk/Single"; - value: ModeInfo_SingleAmino; -} -/** - * Single is the mode info for a single signer. It is structured as a message - * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - * future - */ -export interface ModeInfo_SingleSDKType { - mode: SignMode; -} -/** Multi is the mode info for a multisig public key */ -export interface ModeInfo_Multi { - /** bitarray specifies which keys within the multisig are signing */ - bitarray: CompactBitArray | undefined; - /** - * mode_infos is the corresponding modes of the signers of the multisig - * which could include nested multisig public keys - */ - modeInfos: ModeInfo[]; -} -export interface ModeInfo_MultiProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.Multi"; - value: Uint8Array; -} -/** Multi is the mode info for a multisig public key */ -export interface ModeInfo_MultiAmino { - /** bitarray specifies which keys within the multisig are signing */ - bitarray?: CompactBitArrayAmino | undefined; - /** - * mode_infos is the corresponding modes of the signers of the multisig - * which could include nested multisig public keys - */ - mode_infos: ModeInfoAmino[]; -} -export interface ModeInfo_MultiAminoMsg { - type: "cosmos-sdk/Multi"; - value: ModeInfo_MultiAmino; -} -/** Multi is the mode info for a multisig public key */ -export interface ModeInfo_MultiSDKType { - bitarray: CompactBitArraySDKType | undefined; - mode_infos: ModeInfoSDKType[]; -} -/** - * Fee includes the amount of coins paid in fees and the maximum - * gas to be used by the transaction. The ratio yields an effective "gasprice", - * which must be above some miminum to be accepted into the mempool. - */ -export interface Fee { - /** amount is the amount of coins to be paid as a fee */ - amount: Coin[]; - /** - * gas_limit is the maximum gas that can be used in transaction processing - * before an out of gas error occurs - */ - gasLimit: bigint; - /** - * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - * the payer must be a tx signer (and thus have signed this field in AuthInfo). - * setting this field does *not* change the ordering of required signers for the transaction. - */ - payer: string; - /** - * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - * not support fee grants, this will fail - */ - granter: string; -} -export interface FeeProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.Fee"; - value: Uint8Array; -} -/** - * Fee includes the amount of coins paid in fees and the maximum - * gas to be used by the transaction. The ratio yields an effective "gasprice", - * which must be above some miminum to be accepted into the mempool. - */ -export interface FeeAmino { - /** amount is the amount of coins to be paid as a fee */ - amount: CoinAmino[]; - /** - * gas_limit is the maximum gas that can be used in transaction processing - * before an out of gas error occurs - */ - gas_limit: string; - /** - * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - * the payer must be a tx signer (and thus have signed this field in AuthInfo). - * setting this field does *not* change the ordering of required signers for the transaction. - */ - payer: string; - /** - * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - * not support fee grants, this will fail - */ - granter: string; -} -export interface FeeAminoMsg { - type: "cosmos-sdk/Fee"; - value: FeeAmino; -} -/** - * Fee includes the amount of coins paid in fees and the maximum - * gas to be used by the transaction. The ratio yields an effective "gasprice", - * which must be above some miminum to be accepted into the mempool. - */ -export interface FeeSDKType { - amount: CoinSDKType[]; - gas_limit: bigint; - payer: string; - granter: string; -} -/** - * Tip is the tip used for meta-transactions. - * - * Since: cosmos-sdk 0.46 - */ -export interface Tip { - /** amount is the amount of the tip */ - amount: Coin[]; - /** tipper is the address of the account paying for the tip */ - tipper: string; -} -export interface TipProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.Tip"; - value: Uint8Array; -} -/** - * Tip is the tip used for meta-transactions. - * - * Since: cosmos-sdk 0.46 - */ -export interface TipAmino { - /** amount is the amount of the tip */ - amount: CoinAmino[]; - /** tipper is the address of the account paying for the tip */ - tipper: string; -} -export interface TipAminoMsg { - type: "cosmos-sdk/Tip"; - value: TipAmino; -} -/** - * Tip is the tip used for meta-transactions. - * - * Since: cosmos-sdk 0.46 - */ -export interface TipSDKType { - amount: CoinSDKType[]; - tipper: string; -} -/** - * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a - * tipper) builds and sends to the fee payer (who will build and broadcast the - * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected - * by the node if sent directly as-is. - * - * Since: cosmos-sdk 0.46 - */ -export interface AuxSignerData { - /** - * address is the bech32-encoded address of the auxiliary signer. If using - * AuxSignerData across different chains, the bech32 prefix of the target - * chain (where the final transaction is broadcasted) should be used. - */ - address: string; - /** - * sign_doc is the SIGN_MOD_DIRECT_AUX sign doc that the auxiliary signer - * signs. Note: we use the same sign doc even if we're signing with - * LEGACY_AMINO_JSON. - */ - signDoc: SignDocDirectAux | undefined; - /** mode is the signing mode of the single signer */ - mode: SignMode; - /** sig is the signature of the sign doc. */ - sig: Uint8Array; -} -export interface AuxSignerDataProtoMsg { - typeUrl: "/cosmos.tx.v1beta1.AuxSignerData"; - value: Uint8Array; -} -/** - * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a - * tipper) builds and sends to the fee payer (who will build and broadcast the - * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected - * by the node if sent directly as-is. - * - * Since: cosmos-sdk 0.46 - */ -export interface AuxSignerDataAmino { - /** - * address is the bech32-encoded address of the auxiliary signer. If using - * AuxSignerData across different chains, the bech32 prefix of the target - * chain (where the final transaction is broadcasted) should be used. - */ - address: string; - /** - * sign_doc is the SIGN_MOD_DIRECT_AUX sign doc that the auxiliary signer - * signs. Note: we use the same sign doc even if we're signing with - * LEGACY_AMINO_JSON. - */ - sign_doc?: SignDocDirectAuxAmino | undefined; - /** mode is the signing mode of the single signer */ - mode: SignMode; - /** sig is the signature of the sign doc. */ - sig: Uint8Array; -} -export interface AuxSignerDataAminoMsg { - type: "cosmos-sdk/AuxSignerData"; - value: AuxSignerDataAmino; -} -/** - * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a - * tipper) builds and sends to the fee payer (who will build and broadcast the - * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected - * by the node if sent directly as-is. - * - * Since: cosmos-sdk 0.46 - */ -export interface AuxSignerDataSDKType { - address: string; - sign_doc: SignDocDirectAuxSDKType | undefined; - mode: SignMode; - sig: Uint8Array; -} -function createBaseTx(): Tx { - return { - body: TxBody.fromPartial({}), - authInfo: AuthInfo.fromPartial({}), - signatures: [] - }; -} -export const Tx = { - typeUrl: "/cosmos.tx.v1beta1.Tx", - aminoType: "cosmos-sdk/Tx", - encode(message: Tx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.body !== undefined) { - TxBody.encode(message.body, writer.uint32(10).fork()).ldelim(); - } - if (message.authInfo !== undefined) { - AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.signatures) { - writer.uint32(26).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Tx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body = TxBody.decode(reader, reader.uint32()); - break; - case 2: - message.authInfo = AuthInfo.decode(reader, reader.uint32()); - break; - case 3: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Tx { - return { - body: isSet(object.body) ? TxBody.fromJSON(object.body) : undefined, - authInfo: isSet(object.authInfo) ? AuthInfo.fromJSON(object.authInfo) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: Tx): unknown { - const obj: any = {}; - message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined); - message.authInfo !== undefined && (obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Tx { - const message = createBaseTx(); - message.body = object.body !== undefined && object.body !== null ? TxBody.fromPartial(object.body) : undefined; - message.authInfo = object.authInfo !== undefined && object.authInfo !== null ? AuthInfo.fromPartial(object.authInfo) : undefined; - message.signatures = object.signatures?.map(e => e) || []; - return message; - }, - fromSDK(object: TxSDKType): Tx { - return { - body: object.body ? TxBody.fromSDK(object.body) : undefined, - authInfo: object.auth_info ? AuthInfo.fromSDK(object.auth_info) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => e) : [] - }; - }, - toSDK(message: Tx): TxSDKType { - const obj: any = {}; - message.body !== undefined && (obj.body = message.body ? TxBody.toSDK(message.body) : undefined); - message.authInfo !== undefined && (obj.auth_info = message.authInfo ? AuthInfo.toSDK(message.authInfo) : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map(e => e); - } else { - obj.signatures = []; - } - return obj; - }, - fromAmino(object: TxAmino): Tx { - return { - body: object?.body ? TxBody.fromAmino(object.body) : undefined, - authInfo: object?.auth_info ? AuthInfo.fromAmino(object.auth_info) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => e) : [] - }; - }, - toAmino(message: Tx): TxAmino { - const obj: any = {}; - obj.body = message.body ? TxBody.toAmino(message.body) : undefined; - obj.auth_info = message.authInfo ? AuthInfo.toAmino(message.authInfo) : undefined; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e); - } else { - obj.signatures = []; - } - return obj; - }, - fromAminoMsg(object: TxAminoMsg): Tx { - return Tx.fromAmino(object.value); - }, - toAminoMsg(message: Tx): TxAminoMsg { - return { - type: "cosmos-sdk/Tx", - value: Tx.toAmino(message) - }; - }, - fromProtoMsg(message: TxProtoMsg): Tx { - return Tx.decode(message.value); - }, - toProto(message: Tx): Uint8Array { - return Tx.encode(message).finish(); - }, - toProtoMsg(message: Tx): TxProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.Tx", - value: Tx.encode(message).finish() - }; - } -}; -function createBaseTxRaw(): TxRaw { - return { - bodyBytes: new Uint8Array(), - authInfoBytes: new Uint8Array(), - signatures: [] - }; -} -export const TxRaw = { - typeUrl: "/cosmos.tx.v1beta1.TxRaw", - aminoType: "cosmos-sdk/TxRaw", - encode(message: TxRaw, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bodyBytes.length !== 0) { - writer.uint32(10).bytes(message.bodyBytes); - } - if (message.authInfoBytes.length !== 0) { - writer.uint32(18).bytes(message.authInfoBytes); - } - for (const v of message.signatures) { - writer.uint32(26).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxRaw { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxRaw(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bodyBytes = reader.bytes(); - break; - case 2: - message.authInfoBytes = reader.bytes(); - break; - case 3: - message.signatures.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxRaw { - return { - bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(), - authInfoBytes: isSet(object.authInfoBytes) ? bytesFromBase64(object.authInfoBytes) : new Uint8Array(), - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: TxRaw): unknown { - const obj: any = {}; - message.bodyBytes !== undefined && (obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array())); - message.authInfoBytes !== undefined && (obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array())); - if (message.signatures) { - obj.signatures = message.signatures.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object: DeepPartial): TxRaw { - const message = createBaseTxRaw(); - message.bodyBytes = object.bodyBytes ?? new Uint8Array(); - message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); - message.signatures = object.signatures?.map(e => e) || []; - return message; - }, - fromSDK(object: TxRawSDKType): TxRaw { - return { - bodyBytes: object?.body_bytes, - authInfoBytes: object?.auth_info_bytes, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => e) : [] - }; - }, - toSDK(message: TxRaw): TxRawSDKType { - const obj: any = {}; - obj.body_bytes = message.bodyBytes; - obj.auth_info_bytes = message.authInfoBytes; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e); - } else { - obj.signatures = []; - } - return obj; - }, - fromAmino(object: TxRawAmino): TxRaw { - return { - bodyBytes: object.body_bytes, - authInfoBytes: object.auth_info_bytes, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => e) : [] - }; - }, - toAmino(message: TxRaw): TxRawAmino { - const obj: any = {}; - obj.body_bytes = message.bodyBytes; - obj.auth_info_bytes = message.authInfoBytes; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e); - } else { - obj.signatures = []; - } - return obj; - }, - fromAminoMsg(object: TxRawAminoMsg): TxRaw { - return TxRaw.fromAmino(object.value); - }, - toAminoMsg(message: TxRaw): TxRawAminoMsg { - return { - type: "cosmos-sdk/TxRaw", - value: TxRaw.toAmino(message) - }; - }, - fromProtoMsg(message: TxRawProtoMsg): TxRaw { - return TxRaw.decode(message.value); - }, - toProto(message: TxRaw): Uint8Array { - return TxRaw.encode(message).finish(); - }, - toProtoMsg(message: TxRaw): TxRawProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.TxRaw", - value: TxRaw.encode(message).finish() - }; - } -}; -function createBaseSignDoc(): SignDoc { - return { - bodyBytes: new Uint8Array(), - authInfoBytes: new Uint8Array(), - chainId: "", - accountNumber: BigInt(0) - }; -} -export const SignDoc = { - typeUrl: "/cosmos.tx.v1beta1.SignDoc", - aminoType: "cosmos-sdk/SignDoc", - encode(message: SignDoc, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bodyBytes.length !== 0) { - writer.uint32(10).bytes(message.bodyBytes); - } - if (message.authInfoBytes.length !== 0) { - writer.uint32(18).bytes(message.authInfoBytes); - } - if (message.chainId !== "") { - writer.uint32(26).string(message.chainId); - } - if (message.accountNumber !== BigInt(0)) { - writer.uint32(32).uint64(message.accountNumber); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignDoc { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignDoc(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bodyBytes = reader.bytes(); - break; - case 2: - message.authInfoBytes = reader.bytes(); - break; - case 3: - message.chainId = reader.string(); - break; - case 4: - message.accountNumber = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignDoc { - return { - bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(), - authInfoBytes: isSet(object.authInfoBytes) ? bytesFromBase64(object.authInfoBytes) : new Uint8Array(), - chainId: isSet(object.chainId) ? String(object.chainId) : "", - accountNumber: isSet(object.accountNumber) ? BigInt(object.accountNumber.toString()) : BigInt(0) - }; - }, - toJSON(message: SignDoc): unknown { - const obj: any = {}; - message.bodyBytes !== undefined && (obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array())); - message.authInfoBytes !== undefined && (obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array())); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.accountNumber !== undefined && (obj.accountNumber = (message.accountNumber || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SignDoc { - const message = createBaseSignDoc(); - message.bodyBytes = object.bodyBytes ?? new Uint8Array(); - message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); - message.chainId = object.chainId ?? ""; - message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SignDocSDKType): SignDoc { - return { - bodyBytes: object?.body_bytes, - authInfoBytes: object?.auth_info_bytes, - chainId: object?.chain_id, - accountNumber: object?.account_number - }; - }, - toSDK(message: SignDoc): SignDocSDKType { - const obj: any = {}; - obj.body_bytes = message.bodyBytes; - obj.auth_info_bytes = message.authInfoBytes; - obj.chain_id = message.chainId; - obj.account_number = message.accountNumber; - return obj; - }, - fromAmino(object: SignDocAmino): SignDoc { - return { - bodyBytes: object.body_bytes, - authInfoBytes: object.auth_info_bytes, - chainId: object.chain_id, - accountNumber: BigInt(object.account_number) - }; - }, - toAmino(message: SignDoc): SignDocAmino { - const obj: any = {}; - obj.body_bytes = message.bodyBytes; - obj.auth_info_bytes = message.authInfoBytes; - obj.chain_id = message.chainId; - obj.account_number = message.accountNumber ? message.accountNumber.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SignDocAminoMsg): SignDoc { - return SignDoc.fromAmino(object.value); - }, - toAminoMsg(message: SignDoc): SignDocAminoMsg { - return { - type: "cosmos-sdk/SignDoc", - value: SignDoc.toAmino(message) - }; - }, - fromProtoMsg(message: SignDocProtoMsg): SignDoc { - return SignDoc.decode(message.value); - }, - toProto(message: SignDoc): Uint8Array { - return SignDoc.encode(message).finish(); - }, - toProtoMsg(message: SignDoc): SignDocProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.SignDoc", - value: SignDoc.encode(message).finish() - }; - } -}; -function createBaseSignDocDirectAux(): SignDocDirectAux { - return { - bodyBytes: new Uint8Array(), - publicKey: Any.fromPartial({}), - chainId: "", - accountNumber: BigInt(0), - sequence: BigInt(0), - tip: Tip.fromPartial({}) - }; -} -export const SignDocDirectAux = { - typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", - aminoType: "cosmos-sdk/SignDocDirectAux", - encode(message: SignDocDirectAux, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bodyBytes.length !== 0) { - writer.uint32(10).bytes(message.bodyBytes); - } - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(18).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(26).string(message.chainId); - } - if (message.accountNumber !== BigInt(0)) { - writer.uint32(32).uint64(message.accountNumber); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(40).uint64(message.sequence); - } - if (message.tip !== undefined) { - Tip.encode(message.tip, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignDocDirectAux { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignDocDirectAux(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bodyBytes = reader.bytes(); - break; - case 2: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 3: - message.chainId = reader.string(); - break; - case 4: - message.accountNumber = reader.uint64(); - break; - case 5: - message.sequence = reader.uint64(); - break; - case 6: - message.tip = Tip.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignDocDirectAux { - return { - bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(), - publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, - chainId: isSet(object.chainId) ? String(object.chainId) : "", - accountNumber: isSet(object.accountNumber) ? BigInt(object.accountNumber.toString()) : BigInt(0), - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - tip: isSet(object.tip) ? Tip.fromJSON(object.tip) : undefined - }; - }, - toJSON(message: SignDocDirectAux): unknown { - const obj: any = {}; - message.bodyBytes !== undefined && (obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array())); - message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.accountNumber !== undefined && (obj.accountNumber = (message.accountNumber || BigInt(0)).toString()); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.tip !== undefined && (obj.tip = message.tip ? Tip.toJSON(message.tip) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SignDocDirectAux { - const message = createBaseSignDocDirectAux(); - message.bodyBytes = object.bodyBytes ?? new Uint8Array(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.chainId = object.chainId ?? ""; - message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.tip = object.tip !== undefined && object.tip !== null ? Tip.fromPartial(object.tip) : undefined; - return message; - }, - fromSDK(object: SignDocDirectAuxSDKType): SignDocDirectAux { - return { - bodyBytes: object?.body_bytes, - publicKey: object.public_key ? Any.fromSDK(object.public_key) : undefined, - chainId: object?.chain_id, - accountNumber: object?.account_number, - sequence: object?.sequence, - tip: object.tip ? Tip.fromSDK(object.tip) : undefined - }; - }, - toSDK(message: SignDocDirectAux): SignDocDirectAuxSDKType { - const obj: any = {}; - obj.body_bytes = message.bodyBytes; - message.publicKey !== undefined && (obj.public_key = message.publicKey ? Any.toSDK(message.publicKey) : undefined); - obj.chain_id = message.chainId; - obj.account_number = message.accountNumber; - obj.sequence = message.sequence; - message.tip !== undefined && (obj.tip = message.tip ? Tip.toSDK(message.tip) : undefined); - return obj; - }, - fromAmino(object: SignDocDirectAuxAmino): SignDocDirectAux { - return { - bodyBytes: object.body_bytes, - publicKey: object?.public_key ? Any.fromAmino(object.public_key) : undefined, - chainId: object.chain_id, - accountNumber: BigInt(object.account_number), - sequence: BigInt(object.sequence), - tip: object?.tip ? Tip.fromAmino(object.tip) : undefined - }; - }, - toAmino(message: SignDocDirectAux): SignDocDirectAuxAmino { - const obj: any = {}; - obj.body_bytes = message.bodyBytes; - obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; - obj.chain_id = message.chainId; - obj.account_number = message.accountNumber ? message.accountNumber.toString() : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.tip = message.tip ? Tip.toAmino(message.tip) : undefined; - return obj; - }, - fromAminoMsg(object: SignDocDirectAuxAminoMsg): SignDocDirectAux { - return SignDocDirectAux.fromAmino(object.value); - }, - toAminoMsg(message: SignDocDirectAux): SignDocDirectAuxAminoMsg { - return { - type: "cosmos-sdk/SignDocDirectAux", - value: SignDocDirectAux.toAmino(message) - }; - }, - fromProtoMsg(message: SignDocDirectAuxProtoMsg): SignDocDirectAux { - return SignDocDirectAux.decode(message.value); - }, - toProto(message: SignDocDirectAux): Uint8Array { - return SignDocDirectAux.encode(message).finish(); - }, - toProtoMsg(message: SignDocDirectAux): SignDocDirectAuxProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.SignDocDirectAux", - value: SignDocDirectAux.encode(message).finish() - }; - } -}; -function createBaseTxBody(): TxBody { - return { - messages: [], - memo: "", - timeoutHeight: BigInt(0), - extensionOptions: [], - nonCriticalExtensionOptions: [] - }; -} -export const TxBody = { - typeUrl: "/cosmos.tx.v1beta1.TxBody", - aminoType: "cosmos-sdk/TxBody", - encode(message: TxBody, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.messages) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.memo !== "") { - writer.uint32(18).string(message.memo); - } - if (message.timeoutHeight !== BigInt(0)) { - writer.uint32(24).uint64(message.timeoutHeight); - } - for (const v of message.extensionOptions) { - Any.encode(v!, writer.uint32(8186).fork()).ldelim(); - } - for (const v of message.nonCriticalExtensionOptions) { - Any.encode(v!, writer.uint32(16378).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxBody { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxBody(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messages.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.memo = reader.string(); - break; - case 3: - message.timeoutHeight = reader.uint64(); - break; - case 1023: - message.extensionOptions.push(Any.decode(reader, reader.uint32())); - break; - case 2047: - message.nonCriticalExtensionOptions.push(Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxBody { - return { - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], - memo: isSet(object.memo) ? String(object.memo) : "", - timeoutHeight: isSet(object.timeoutHeight) ? BigInt(object.timeoutHeight.toString()) : BigInt(0), - extensionOptions: Array.isArray(object?.extensionOptions) ? object.extensionOptions.map((e: any) => Any.fromJSON(e)) : [], - nonCriticalExtensionOptions: Array.isArray(object?.nonCriticalExtensionOptions) ? object.nonCriticalExtensionOptions.map((e: any) => Any.fromJSON(e)) : [] - }; - }, - toJSON(message: TxBody): unknown { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.messages = []; - } - message.memo !== undefined && (obj.memo = message.memo); - message.timeoutHeight !== undefined && (obj.timeoutHeight = (message.timeoutHeight || BigInt(0)).toString()); - if (message.extensionOptions) { - obj.extensionOptions = message.extensionOptions.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.extensionOptions = []; - } - if (message.nonCriticalExtensionOptions) { - obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.nonCriticalExtensionOptions = []; - } - return obj; - }, - fromPartial(object: DeepPartial): TxBody { - const message = createBaseTxBody(); - message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; - message.memo = object.memo ?? ""; - message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? BigInt(object.timeoutHeight.toString()) : BigInt(0); - message.extensionOptions = object.extensionOptions?.map(e => Any.fromPartial(e)) || []; - message.nonCriticalExtensionOptions = object.nonCriticalExtensionOptions?.map(e => Any.fromPartial(e)) || []; - return message; - }, - fromSDK(object: TxBodySDKType): TxBody { - return { - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromSDK(e)) : [], - memo: object?.memo, - timeoutHeight: object?.timeout_height, - extensionOptions: Array.isArray(object?.extension_options) ? object.extension_options.map((e: any) => Any.fromSDK(e)) : [], - nonCriticalExtensionOptions: Array.isArray(object?.non_critical_extension_options) ? object.non_critical_extension_options.map((e: any) => Any.fromSDK(e)) : [] - }; - }, - toSDK(message: TxBody): TxBodySDKType { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.messages = []; - } - obj.memo = message.memo; - obj.timeout_height = message.timeoutHeight; - if (message.extensionOptions) { - obj.extension_options = message.extensionOptions.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.extension_options = []; - } - if (message.nonCriticalExtensionOptions) { - obj.non_critical_extension_options = message.nonCriticalExtensionOptions.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.non_critical_extension_options = []; - } - return obj; - }, - fromAmino(object: TxBodyAmino): TxBody { - return { - messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromAmino(e)) : [], - memo: object.memo, - timeoutHeight: BigInt(object.timeout_height), - extensionOptions: Array.isArray(object?.extension_options) ? object.extension_options.map((e: any) => Any.fromAmino(e)) : [], - nonCriticalExtensionOptions: Array.isArray(object?.non_critical_extension_options) ? object.non_critical_extension_options.map((e: any) => Any.fromAmino(e)) : [] - }; - }, - toAmino(message: TxBody): TxBodyAmino { - const obj: any = {}; - if (message.messages) { - obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.messages = []; - } - obj.memo = message.memo; - obj.timeout_height = message.timeoutHeight ? message.timeoutHeight.toString() : undefined; - if (message.extensionOptions) { - obj.extension_options = message.extensionOptions.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.extension_options = []; - } - if (message.nonCriticalExtensionOptions) { - obj.non_critical_extension_options = message.nonCriticalExtensionOptions.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.non_critical_extension_options = []; - } - return obj; - }, - fromAminoMsg(object: TxBodyAminoMsg): TxBody { - return TxBody.fromAmino(object.value); - }, - toAminoMsg(message: TxBody): TxBodyAminoMsg { - return { - type: "cosmos-sdk/TxBody", - value: TxBody.toAmino(message) - }; - }, - fromProtoMsg(message: TxBodyProtoMsg): TxBody { - return TxBody.decode(message.value); - }, - toProto(message: TxBody): Uint8Array { - return TxBody.encode(message).finish(); - }, - toProtoMsg(message: TxBody): TxBodyProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.TxBody", - value: TxBody.encode(message).finish() - }; - } -}; -function createBaseAuthInfo(): AuthInfo { - return { - signerInfos: [], - fee: Fee.fromPartial({}), - tip: Tip.fromPartial({}) - }; -} -export const AuthInfo = { - typeUrl: "/cosmos.tx.v1beta1.AuthInfo", - aminoType: "cosmos-sdk/AuthInfo", - encode(message: AuthInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.signerInfos) { - SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fee !== undefined) { - Fee.encode(message.fee, writer.uint32(18).fork()).ldelim(); - } - if (message.tip !== undefined) { - Tip.encode(message.tip, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AuthInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signerInfos.push(SignerInfo.decode(reader, reader.uint32())); - break; - case 2: - message.fee = Fee.decode(reader, reader.uint32()); - break; - case 3: - message.tip = Tip.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AuthInfo { - return { - signerInfos: Array.isArray(object?.signerInfos) ? object.signerInfos.map((e: any) => SignerInfo.fromJSON(e)) : [], - fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined, - tip: isSet(object.tip) ? Tip.fromJSON(object.tip) : undefined - }; - }, - toJSON(message: AuthInfo): unknown { - const obj: any = {}; - if (message.signerInfos) { - obj.signerInfos = message.signerInfos.map(e => e ? SignerInfo.toJSON(e) : undefined); - } else { - obj.signerInfos = []; - } - message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined); - message.tip !== undefined && (obj.tip = message.tip ? Tip.toJSON(message.tip) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AuthInfo { - const message = createBaseAuthInfo(); - message.signerInfos = object.signerInfos?.map(e => SignerInfo.fromPartial(e)) || []; - message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; - message.tip = object.tip !== undefined && object.tip !== null ? Tip.fromPartial(object.tip) : undefined; - return message; - }, - fromSDK(object: AuthInfoSDKType): AuthInfo { - return { - signerInfos: Array.isArray(object?.signer_infos) ? object.signer_infos.map((e: any) => SignerInfo.fromSDK(e)) : [], - fee: object.fee ? Fee.fromSDK(object.fee) : undefined, - tip: object.tip ? Tip.fromSDK(object.tip) : undefined - }; - }, - toSDK(message: AuthInfo): AuthInfoSDKType { - const obj: any = {}; - if (message.signerInfos) { - obj.signer_infos = message.signerInfos.map(e => e ? SignerInfo.toSDK(e) : undefined); - } else { - obj.signer_infos = []; - } - message.fee !== undefined && (obj.fee = message.fee ? Fee.toSDK(message.fee) : undefined); - message.tip !== undefined && (obj.tip = message.tip ? Tip.toSDK(message.tip) : undefined); - return obj; - }, - fromAmino(object: AuthInfoAmino): AuthInfo { - return { - signerInfos: Array.isArray(object?.signer_infos) ? object.signer_infos.map((e: any) => SignerInfo.fromAmino(e)) : [], - fee: object?.fee ? Fee.fromAmino(object.fee) : undefined, - tip: object?.tip ? Tip.fromAmino(object.tip) : undefined - }; - }, - toAmino(message: AuthInfo): AuthInfoAmino { - const obj: any = {}; - if (message.signerInfos) { - obj.signer_infos = message.signerInfos.map(e => e ? SignerInfo.toAmino(e) : undefined); - } else { - obj.signer_infos = []; - } - obj.fee = message.fee ? Fee.toAmino(message.fee) : undefined; - obj.tip = message.tip ? Tip.toAmino(message.tip) : undefined; - return obj; - }, - fromAminoMsg(object: AuthInfoAminoMsg): AuthInfo { - return AuthInfo.fromAmino(object.value); - }, - toAminoMsg(message: AuthInfo): AuthInfoAminoMsg { - return { - type: "cosmos-sdk/AuthInfo", - value: AuthInfo.toAmino(message) - }; - }, - fromProtoMsg(message: AuthInfoProtoMsg): AuthInfo { - return AuthInfo.decode(message.value); - }, - toProto(message: AuthInfo): Uint8Array { - return AuthInfo.encode(message).finish(); - }, - toProtoMsg(message: AuthInfo): AuthInfoProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.AuthInfo", - value: AuthInfo.encode(message).finish() - }; - } -}; -function createBaseSignerInfo(): SignerInfo { - return { - publicKey: Any.fromPartial({}), - modeInfo: ModeInfo.fromPartial({}), - sequence: BigInt(0) - }; -} -export const SignerInfo = { - typeUrl: "/cosmos.tx.v1beta1.SignerInfo", - aminoType: "cosmos-sdk/SignerInfo", - encode(message: SignerInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); - } - if (message.modeInfo !== undefined) { - ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim(); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignerInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignerInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.modeInfo = ModeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignerInfo { - return { - publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, - modeInfo: isSet(object.modeInfo) ? ModeInfo.fromJSON(object.modeInfo) : undefined, - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: SignerInfo): unknown { - const obj: any = {}; - message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined); - message.modeInfo !== undefined && (obj.modeInfo = message.modeInfo ? ModeInfo.toJSON(message.modeInfo) : undefined); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SignerInfo { - const message = createBaseSignerInfo(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.modeInfo = object.modeInfo !== undefined && object.modeInfo !== null ? ModeInfo.fromPartial(object.modeInfo) : undefined; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SignerInfoSDKType): SignerInfo { - return { - publicKey: object.public_key ? Any.fromSDK(object.public_key) : undefined, - modeInfo: object.mode_info ? ModeInfo.fromSDK(object.mode_info) : undefined, - sequence: object?.sequence - }; - }, - toSDK(message: SignerInfo): SignerInfoSDKType { - const obj: any = {}; - message.publicKey !== undefined && (obj.public_key = message.publicKey ? Any.toSDK(message.publicKey) : undefined); - message.modeInfo !== undefined && (obj.mode_info = message.modeInfo ? ModeInfo.toSDK(message.modeInfo) : undefined); - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: SignerInfoAmino): SignerInfo { - return { - publicKey: object?.public_key ? Any.fromAmino(object.public_key) : undefined, - modeInfo: object?.mode_info ? ModeInfo.fromAmino(object.mode_info) : undefined, - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: SignerInfo): SignerInfoAmino { - const obj: any = {}; - obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; - obj.mode_info = message.modeInfo ? ModeInfo.toAmino(message.modeInfo) : undefined; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SignerInfoAminoMsg): SignerInfo { - return SignerInfo.fromAmino(object.value); - }, - toAminoMsg(message: SignerInfo): SignerInfoAminoMsg { - return { - type: "cosmos-sdk/SignerInfo", - value: SignerInfo.toAmino(message) - }; - }, - fromProtoMsg(message: SignerInfoProtoMsg): SignerInfo { - return SignerInfo.decode(message.value); - }, - toProto(message: SignerInfo): Uint8Array { - return SignerInfo.encode(message).finish(); - }, - toProtoMsg(message: SignerInfo): SignerInfoProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.SignerInfo", - value: SignerInfo.encode(message).finish() - }; - } -}; -function createBaseModeInfo(): ModeInfo { - return { - single: undefined, - multi: undefined - }; -} -export const ModeInfo = { - typeUrl: "/cosmos.tx.v1beta1.ModeInfo", - aminoType: "cosmos-sdk/ModeInfo", - encode(message: ModeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.single !== undefined) { - ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); - } - if (message.multi !== undefined) { - ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.single = ModeInfo_Single.decode(reader, reader.uint32()); - break; - case 2: - message.multi = ModeInfo_Multi.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModeInfo { - return { - single: isSet(object.single) ? ModeInfo_Single.fromJSON(object.single) : undefined, - multi: isSet(object.multi) ? ModeInfo_Multi.fromJSON(object.multi) : undefined - }; - }, - toJSON(message: ModeInfo): unknown { - const obj: any = {}; - message.single !== undefined && (obj.single = message.single ? ModeInfo_Single.toJSON(message.single) : undefined); - message.multi !== undefined && (obj.multi = message.multi ? ModeInfo_Multi.toJSON(message.multi) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ModeInfo { - const message = createBaseModeInfo(); - message.single = object.single !== undefined && object.single !== null ? ModeInfo_Single.fromPartial(object.single) : undefined; - message.multi = object.multi !== undefined && object.multi !== null ? ModeInfo_Multi.fromPartial(object.multi) : undefined; - return message; - }, - fromSDK(object: ModeInfoSDKType): ModeInfo { - return { - single: object.single ? ModeInfo_Single.fromSDK(object.single) : undefined, - multi: object.multi ? ModeInfo_Multi.fromSDK(object.multi) : undefined - }; - }, - toSDK(message: ModeInfo): ModeInfoSDKType { - const obj: any = {}; - message.single !== undefined && (obj.single = message.single ? ModeInfo_Single.toSDK(message.single) : undefined); - message.multi !== undefined && (obj.multi = message.multi ? ModeInfo_Multi.toSDK(message.multi) : undefined); - return obj; - }, - fromAmino(object: ModeInfoAmino): ModeInfo { - return { - single: object?.single ? ModeInfo_Single.fromAmino(object.single) : undefined, - multi: object?.multi ? ModeInfo_Multi.fromAmino(object.multi) : undefined - }; - }, - toAmino(message: ModeInfo): ModeInfoAmino { - const obj: any = {}; - obj.single = message.single ? ModeInfo_Single.toAmino(message.single) : undefined; - obj.multi = message.multi ? ModeInfo_Multi.toAmino(message.multi) : undefined; - return obj; - }, - fromAminoMsg(object: ModeInfoAminoMsg): ModeInfo { - return ModeInfo.fromAmino(object.value); - }, - toAminoMsg(message: ModeInfo): ModeInfoAminoMsg { - return { - type: "cosmos-sdk/ModeInfo", - value: ModeInfo.toAmino(message) - }; - }, - fromProtoMsg(message: ModeInfoProtoMsg): ModeInfo { - return ModeInfo.decode(message.value); - }, - toProto(message: ModeInfo): Uint8Array { - return ModeInfo.encode(message).finish(); - }, - toProtoMsg(message: ModeInfo): ModeInfoProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.ModeInfo", - value: ModeInfo.encode(message).finish() - }; - } -}; -function createBaseModeInfo_Single(): ModeInfo_Single { - return { - mode: 0 - }; -} -export const ModeInfo_Single = { - typeUrl: "/cosmos.tx.v1beta1.Single", - aminoType: "cosmos-sdk/Single", - encode(message: ModeInfo_Single, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo_Single { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModeInfo_Single(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModeInfo_Single { - return { - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1 - }; - }, - toJSON(message: ModeInfo_Single): unknown { - const obj: any = {}; - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - return obj; - }, - fromPartial(object: DeepPartial): ModeInfo_Single { - const message = createBaseModeInfo_Single(); - message.mode = object.mode ?? 0; - return message; - }, - fromSDK(object: ModeInfo_SingleSDKType): ModeInfo_Single { - return { - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1 - }; - }, - toSDK(message: ModeInfo_Single): ModeInfo_SingleSDKType { - const obj: any = {}; - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - return obj; - }, - fromAmino(object: ModeInfo_SingleAmino): ModeInfo_Single { - return { - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1 - }; - }, - toAmino(message: ModeInfo_Single): ModeInfo_SingleAmino { - const obj: any = {}; - obj.mode = message.mode; - return obj; - }, - fromAminoMsg(object: ModeInfo_SingleAminoMsg): ModeInfo_Single { - return ModeInfo_Single.fromAmino(object.value); - }, - toAminoMsg(message: ModeInfo_Single): ModeInfo_SingleAminoMsg { - return { - type: "cosmos-sdk/Single", - value: ModeInfo_Single.toAmino(message) - }; - }, - fromProtoMsg(message: ModeInfo_SingleProtoMsg): ModeInfo_Single { - return ModeInfo_Single.decode(message.value); - }, - toProto(message: ModeInfo_Single): Uint8Array { - return ModeInfo_Single.encode(message).finish(); - }, - toProtoMsg(message: ModeInfo_Single): ModeInfo_SingleProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.Single", - value: ModeInfo_Single.encode(message).finish() - }; - } -}; -function createBaseModeInfo_Multi(): ModeInfo_Multi { - return { - bitarray: CompactBitArray.fromPartial({}), - modeInfos: [] - }; -} -export const ModeInfo_Multi = { - typeUrl: "/cosmos.tx.v1beta1.Multi", - aminoType: "cosmos-sdk/Multi", - encode(message: ModeInfo_Multi, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bitarray !== undefined) { - CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.modeInfos) { - ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModeInfo_Multi { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModeInfo_Multi(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bitarray = CompactBitArray.decode(reader, reader.uint32()); - break; - case 2: - message.modeInfos.push(ModeInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModeInfo_Multi { - return { - bitarray: isSet(object.bitarray) ? CompactBitArray.fromJSON(object.bitarray) : undefined, - modeInfos: Array.isArray(object?.modeInfos) ? object.modeInfos.map((e: any) => ModeInfo.fromJSON(e)) : [] - }; - }, - toJSON(message: ModeInfo_Multi): unknown { - const obj: any = {}; - message.bitarray !== undefined && (obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined); - if (message.modeInfos) { - obj.modeInfos = message.modeInfos.map(e => e ? ModeInfo.toJSON(e) : undefined); - } else { - obj.modeInfos = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ModeInfo_Multi { - const message = createBaseModeInfo_Multi(); - message.bitarray = object.bitarray !== undefined && object.bitarray !== null ? CompactBitArray.fromPartial(object.bitarray) : undefined; - message.modeInfos = object.modeInfos?.map(e => ModeInfo.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ModeInfo_MultiSDKType): ModeInfo_Multi { - return { - bitarray: object.bitarray ? CompactBitArray.fromSDK(object.bitarray) : undefined, - modeInfos: Array.isArray(object?.mode_infos) ? object.mode_infos.map((e: any) => ModeInfo.fromSDK(e)) : [] - }; - }, - toSDK(message: ModeInfo_Multi): ModeInfo_MultiSDKType { - const obj: any = {}; - message.bitarray !== undefined && (obj.bitarray = message.bitarray ? CompactBitArray.toSDK(message.bitarray) : undefined); - if (message.modeInfos) { - obj.mode_infos = message.modeInfos.map(e => e ? ModeInfo.toSDK(e) : undefined); - } else { - obj.mode_infos = []; - } - return obj; - }, - fromAmino(object: ModeInfo_MultiAmino): ModeInfo_Multi { - return { - bitarray: object?.bitarray ? CompactBitArray.fromAmino(object.bitarray) : undefined, - modeInfos: Array.isArray(object?.mode_infos) ? object.mode_infos.map((e: any) => ModeInfo.fromAmino(e)) : [] - }; - }, - toAmino(message: ModeInfo_Multi): ModeInfo_MultiAmino { - const obj: any = {}; - obj.bitarray = message.bitarray ? CompactBitArray.toAmino(message.bitarray) : undefined; - if (message.modeInfos) { - obj.mode_infos = message.modeInfos.map(e => e ? ModeInfo.toAmino(e) : undefined); - } else { - obj.mode_infos = []; - } - return obj; - }, - fromAminoMsg(object: ModeInfo_MultiAminoMsg): ModeInfo_Multi { - return ModeInfo_Multi.fromAmino(object.value); - }, - toAminoMsg(message: ModeInfo_Multi): ModeInfo_MultiAminoMsg { - return { - type: "cosmos-sdk/Multi", - value: ModeInfo_Multi.toAmino(message) - }; - }, - fromProtoMsg(message: ModeInfo_MultiProtoMsg): ModeInfo_Multi { - return ModeInfo_Multi.decode(message.value); - }, - toProto(message: ModeInfo_Multi): Uint8Array { - return ModeInfo_Multi.encode(message).finish(); - }, - toProtoMsg(message: ModeInfo_Multi): ModeInfo_MultiProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.Multi", - value: ModeInfo_Multi.encode(message).finish() - }; - } -}; -function createBaseFee(): Fee { - return { - amount: [], - gasLimit: BigInt(0), - payer: "", - granter: "" - }; -} -export const Fee = { - typeUrl: "/cosmos.tx.v1beta1.Fee", - aminoType: "cosmos-sdk/Fee", - encode(message: Fee, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.gasLimit !== BigInt(0)) { - writer.uint32(16).uint64(message.gasLimit); - } - if (message.payer !== "") { - writer.uint32(26).string(message.payer); - } - if (message.granter !== "") { - writer.uint32(34).string(message.granter); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Fee { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFee(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.gasLimit = reader.uint64(); - break; - case 3: - message.payer = reader.string(); - break; - case 4: - message.granter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Fee { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - gasLimit: isSet(object.gasLimit) ? BigInt(object.gasLimit.toString()) : BigInt(0), - payer: isSet(object.payer) ? String(object.payer) : "", - granter: isSet(object.granter) ? String(object.granter) : "" - }; - }, - toJSON(message: Fee): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || BigInt(0)).toString()); - message.payer !== undefined && (obj.payer = message.payer); - message.granter !== undefined && (obj.granter = message.granter); - return obj; - }, - fromPartial(object: DeepPartial): Fee { - const message = createBaseFee(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.gasLimit = object.gasLimit !== undefined && object.gasLimit !== null ? BigInt(object.gasLimit.toString()) : BigInt(0); - message.payer = object.payer ?? ""; - message.granter = object.granter ?? ""; - return message; - }, - fromSDK(object: FeeSDKType): Fee { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [], - gasLimit: object?.gas_limit, - payer: object?.payer, - granter: object?.granter - }; - }, - toSDK(message: Fee): FeeSDKType { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - obj.gas_limit = message.gasLimit; - obj.payer = message.payer; - obj.granter = message.granter; - return obj; - }, - fromAmino(object: FeeAmino): Fee { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [], - gasLimit: BigInt(object.gas_limit), - payer: object.payer, - granter: object.granter - }; - }, - toAmino(message: Fee): FeeAmino { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - obj.gas_limit = message.gasLimit ? message.gasLimit.toString() : undefined; - obj.payer = message.payer; - obj.granter = message.granter; - return obj; - }, - fromAminoMsg(object: FeeAminoMsg): Fee { - return Fee.fromAmino(object.value); - }, - toAminoMsg(message: Fee): FeeAminoMsg { - return { - type: "cosmos-sdk/Fee", - value: Fee.toAmino(message) - }; - }, - fromProtoMsg(message: FeeProtoMsg): Fee { - return Fee.decode(message.value); - }, - toProto(message: Fee): Uint8Array { - return Fee.encode(message).finish(); - }, - toProtoMsg(message: Fee): FeeProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.Fee", - value: Fee.encode(message).finish() - }; - } -}; -function createBaseTip(): Tip { - return { - amount: [], - tipper: "" - }; -} -export const Tip = { - typeUrl: "/cosmos.tx.v1beta1.Tip", - aminoType: "cosmos-sdk/Tip", - encode(message: Tip, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.tipper !== "") { - writer.uint32(18).string(message.tipper); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Tip { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTip(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.tipper = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Tip { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - tipper: isSet(object.tipper) ? String(object.tipper) : "" - }; - }, - toJSON(message: Tip): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - message.tipper !== undefined && (obj.tipper = message.tipper); - return obj; - }, - fromPartial(object: DeepPartial): Tip { - const message = createBaseTip(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.tipper = object.tipper ?? ""; - return message; - }, - fromSDK(object: TipSDKType): Tip { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [], - tipper: object?.tipper - }; - }, - toSDK(message: Tip): TipSDKType { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - obj.tipper = message.tipper; - return obj; - }, - fromAmino(object: TipAmino): Tip { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [], - tipper: object.tipper - }; - }, - toAmino(message: Tip): TipAmino { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - obj.tipper = message.tipper; - return obj; - }, - fromAminoMsg(object: TipAminoMsg): Tip { - return Tip.fromAmino(object.value); - }, - toAminoMsg(message: Tip): TipAminoMsg { - return { - type: "cosmos-sdk/Tip", - value: Tip.toAmino(message) - }; - }, - fromProtoMsg(message: TipProtoMsg): Tip { - return Tip.decode(message.value); - }, - toProto(message: Tip): Uint8Array { - return Tip.encode(message).finish(); - }, - toProtoMsg(message: Tip): TipProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.Tip", - value: Tip.encode(message).finish() - }; - } -}; -function createBaseAuxSignerData(): AuxSignerData { - return { - address: "", - signDoc: SignDocDirectAux.fromPartial({}), - mode: 0, - sig: new Uint8Array() - }; -} -export const AuxSignerData = { - typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", - aminoType: "cosmos-sdk/AuxSignerData", - encode(message: AuxSignerData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.signDoc !== undefined) { - SignDocDirectAux.encode(message.signDoc, writer.uint32(18).fork()).ldelim(); - } - if (message.mode !== 0) { - writer.uint32(24).int32(message.mode); - } - if (message.sig.length !== 0) { - writer.uint32(34).bytes(message.sig); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AuxSignerData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuxSignerData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.signDoc = SignDocDirectAux.decode(reader, reader.uint32()); - break; - case 3: - message.mode = (reader.int32() as any); - break; - case 4: - message.sig = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AuxSignerData { - return { - address: isSet(object.address) ? String(object.address) : "", - signDoc: isSet(object.signDoc) ? SignDocDirectAux.fromJSON(object.signDoc) : undefined, - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1, - sig: isSet(object.sig) ? bytesFromBase64(object.sig) : new Uint8Array() - }; - }, - toJSON(message: AuxSignerData): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.signDoc !== undefined && (obj.signDoc = message.signDoc ? SignDocDirectAux.toJSON(message.signDoc) : undefined); - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - message.sig !== undefined && (obj.sig = base64FromBytes(message.sig !== undefined ? message.sig : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): AuxSignerData { - const message = createBaseAuxSignerData(); - message.address = object.address ?? ""; - message.signDoc = object.signDoc !== undefined && object.signDoc !== null ? SignDocDirectAux.fromPartial(object.signDoc) : undefined; - message.mode = object.mode ?? 0; - message.sig = object.sig ?? new Uint8Array(); - return message; - }, - fromSDK(object: AuxSignerDataSDKType): AuxSignerData { - return { - address: object?.address, - signDoc: object.sign_doc ? SignDocDirectAux.fromSDK(object.sign_doc) : undefined, - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1, - sig: object?.sig - }; - }, - toSDK(message: AuxSignerData): AuxSignerDataSDKType { - const obj: any = {}; - obj.address = message.address; - message.signDoc !== undefined && (obj.sign_doc = message.signDoc ? SignDocDirectAux.toSDK(message.signDoc) : undefined); - message.mode !== undefined && (obj.mode = signModeToJSON(message.mode)); - obj.sig = message.sig; - return obj; - }, - fromAmino(object: AuxSignerDataAmino): AuxSignerData { - return { - address: object.address, - signDoc: object?.sign_doc ? SignDocDirectAux.fromAmino(object.sign_doc) : undefined, - mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1, - sig: object.sig - }; - }, - toAmino(message: AuxSignerData): AuxSignerDataAmino { - const obj: any = {}; - obj.address = message.address; - obj.sign_doc = message.signDoc ? SignDocDirectAux.toAmino(message.signDoc) : undefined; - obj.mode = message.mode; - obj.sig = message.sig; - return obj; - }, - fromAminoMsg(object: AuxSignerDataAminoMsg): AuxSignerData { - return AuxSignerData.fromAmino(object.value); - }, - toAminoMsg(message: AuxSignerData): AuxSignerDataAminoMsg { - return { - type: "cosmos-sdk/AuxSignerData", - value: AuxSignerData.toAmino(message) - }; - }, - fromProtoMsg(message: AuxSignerDataProtoMsg): AuxSignerData { - return AuxSignerData.decode(message.value); - }, - toProto(message: AuxSignerData): Uint8Array { - return AuxSignerData.encode(message).finish(); - }, - toProtoMsg(message: AuxSignerData): AuxSignerDataProtoMsg { - return { - typeUrl: "/cosmos.tx.v1beta1.AuxSignerData", - value: AuxSignerData.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 4f30d255..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,234 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryCurrentPlanRequest, QueryCurrentPlanResponse, QueryAppliedPlanRequest, QueryAppliedPlanResponse, QueryUpgradedConsensusStateRequest, QueryUpgradedConsensusStateResponse, QueryModuleVersionsRequest, QueryModuleVersionsResponse, QueryAuthorityRequest, QueryAuthorityResponse } from "./query"; -/** Query defines the gRPC upgrade querier service. */ -export interface Query { - /** CurrentPlan queries the current upgrade plan. */ - currentPlan(request?: QueryCurrentPlanRequest): Promise; - /** AppliedPlan queries a previously applied upgrade plan by its name. */ - appliedPlan(request: QueryAppliedPlanRequest): Promise; - /** - * UpgradedConsensusState queries the consensus state that will serve - * as a trusted kernel for the next version of this chain. It will only be - * stored at the last height of this chain. - * UpgradedConsensusState RPC not supported with legacy querier - * This rpc is deprecated now that IBC has its own replacement - * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - */ - upgradedConsensusState(request: QueryUpgradedConsensusStateRequest): Promise; - /** - * ModuleVersions queries the list of module versions from state. - * - * Since: cosmos-sdk 0.43 - */ - moduleVersions(request: QueryModuleVersionsRequest): Promise; - /** Returns the account with authority to conduct upgrades */ - authority(request?: QueryAuthorityRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.currentPlan = this.currentPlan.bind(this); - this.appliedPlan = this.appliedPlan.bind(this); - this.upgradedConsensusState = this.upgradedConsensusState.bind(this); - this.moduleVersions = this.moduleVersions.bind(this); - this.authority = this.authority.bind(this); - } - currentPlan(request: QueryCurrentPlanRequest = {}): Promise { - const data = QueryCurrentPlanRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Query", "CurrentPlan", data); - return promise.then(data => QueryCurrentPlanResponse.decode(new BinaryReader(data))); - } - appliedPlan(request: QueryAppliedPlanRequest): Promise { - const data = QueryAppliedPlanRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Query", "AppliedPlan", data); - return promise.then(data => QueryAppliedPlanResponse.decode(new BinaryReader(data))); - } - upgradedConsensusState(request: QueryUpgradedConsensusStateRequest): Promise { - const data = QueryUpgradedConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Query", "UpgradedConsensusState", data); - return promise.then(data => QueryUpgradedConsensusStateResponse.decode(new BinaryReader(data))); - } - moduleVersions(request: QueryModuleVersionsRequest): Promise { - const data = QueryModuleVersionsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Query", "ModuleVersions", data); - return promise.then(data => QueryModuleVersionsResponse.decode(new BinaryReader(data))); - } - authority(request: QueryAuthorityRequest = {}): Promise { - const data = QueryAuthorityRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Query", "Authority", data); - return promise.then(data => QueryAuthorityResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - currentPlan(request?: QueryCurrentPlanRequest): Promise { - return queryService.currentPlan(request); - }, - appliedPlan(request: QueryAppliedPlanRequest): Promise { - return queryService.appliedPlan(request); - }, - upgradedConsensusState(request: QueryUpgradedConsensusStateRequest): Promise { - return queryService.upgradedConsensusState(request); - }, - moduleVersions(request: QueryModuleVersionsRequest): Promise { - return queryService.moduleVersions(request); - }, - authority(request?: QueryAuthorityRequest): Promise { - return queryService.authority(request); - } - }; -}; -export interface UseCurrentPlanQuery extends ReactQueryParams { - request?: QueryCurrentPlanRequest; -} -export interface UseAppliedPlanQuery extends ReactQueryParams { - request: QueryAppliedPlanRequest; -} -export interface UseUpgradedConsensusStateQuery extends ReactQueryParams { - request: QueryUpgradedConsensusStateRequest; -} -export interface UseModuleVersionsQuery extends ReactQueryParams { - request: QueryModuleVersionsRequest; -} -export interface UseAuthorityQuery extends ReactQueryParams { - request?: QueryAuthorityRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useCurrentPlan = ({ - request, - options - }: UseCurrentPlanQuery) => { - return useQuery(["currentPlanQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.currentPlan(request); - }, options); - }; - const useAppliedPlan = ({ - request, - options - }: UseAppliedPlanQuery) => { - return useQuery(["appliedPlanQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.appliedPlan(request); - }, options); - }; - const useUpgradedConsensusState = ({ - request, - options - }: UseUpgradedConsensusStateQuery) => { - return useQuery(["upgradedConsensusStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.upgradedConsensusState(request); - }, options); - }; - const useModuleVersions = ({ - request, - options - }: UseModuleVersionsQuery) => { - return useQuery(["moduleVersionsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.moduleVersions(request); - }, options); - }; - const useAuthority = ({ - request, - options - }: UseAuthorityQuery) => { - return useQuery(["authorityQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.authority(request); - }, options); - }; - return { - /** CurrentPlan queries the current upgrade plan. */useCurrentPlan, - /** AppliedPlan queries a previously applied upgrade plan by its name. */useAppliedPlan, - /** - * UpgradedConsensusState queries the consensus state that will serve - * as a trusted kernel for the next version of this chain. It will only be - * stored at the last height of this chain. - * UpgradedConsensusState RPC not supported with legacy querier - * This rpc is deprecated now that IBC has its own replacement - * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - */ - useUpgradedConsensusState, - /** - * ModuleVersions queries the list of module versions from state. - * - * Since: cosmos-sdk 0.43 - */ - useModuleVersions, - /** Returns the account with authority to conduct upgrades */useAuthority - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryCurrentPlanStore { - store = new QueryStore(queryService?.currentPlan); - currentPlan(request: QueryCurrentPlanRequest) { - return this.store.getData(request); - } - } - class QueryAppliedPlanStore { - store = new QueryStore(queryService?.appliedPlan); - appliedPlan(request: QueryAppliedPlanRequest) { - return this.store.getData(request); - } - } - class QueryUpgradedConsensusStateStore { - store = new QueryStore(queryService?.upgradedConsensusState); - upgradedConsensusState(request: QueryUpgradedConsensusStateRequest) { - return this.store.getData(request); - } - } - class QueryModuleVersionsStore { - store = new QueryStore(queryService?.moduleVersions); - moduleVersions(request: QueryModuleVersionsRequest) { - return this.store.getData(request); - } - } - class QueryAuthorityStore { - store = new QueryStore(queryService?.authority); - authority(request: QueryAuthorityRequest) { - return this.store.getData(request); - } - } - return { - /** CurrentPlan queries the current upgrade plan. */QueryCurrentPlanStore, - /** AppliedPlan queries a previously applied upgrade plan by its name. */QueryAppliedPlanStore, - /** - * UpgradedConsensusState queries the consensus state that will serve - * as a trusted kernel for the next version of this chain. It will only be - * stored at the last height of this chain. - * UpgradedConsensusState RPC not supported with legacy querier - * This rpc is deprecated now that IBC has its own replacement - * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - */ - QueryUpgradedConsensusStateStore, - /** - * ModuleVersions queries the list of module versions from state. - * - * Since: cosmos-sdk 0.43 - */ - QueryModuleVersionsStore, - /** Returns the account with authority to conduct upgrades */QueryAuthorityStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/query.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/query.ts deleted file mode 100644 index cbee1eeb..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/query.ts +++ /dev/null @@ -1,1189 +0,0 @@ -import { Plan, PlanAmino, PlanSDKType, ModuleVersion, ModuleVersionAmino, ModuleVersionSDKType } from "./upgrade"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** - * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanRequest {} -export interface QueryCurrentPlanRequestProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryCurrentPlanRequest"; - value: Uint8Array; -} -/** - * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanRequestAmino {} -export interface QueryCurrentPlanRequestAminoMsg { - type: "cosmos-sdk/QueryCurrentPlanRequest"; - value: QueryCurrentPlanRequestAmino; -} -/** - * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanRequestSDKType {} -/** - * QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanResponse { - /** plan is the current upgrade plan. */ - plan: Plan | undefined; -} -export interface QueryCurrentPlanResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryCurrentPlanResponse"; - value: Uint8Array; -} -/** - * QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanResponseAmino { - /** plan is the current upgrade plan. */ - plan?: PlanAmino | undefined; -} -export interface QueryCurrentPlanResponseAminoMsg { - type: "cosmos-sdk/QueryCurrentPlanResponse"; - value: QueryCurrentPlanResponseAmino; -} -/** - * QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC - * method. - */ -export interface QueryCurrentPlanResponseSDKType { - plan: PlanSDKType | undefined; -} -/** - * QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanRequest { - /** name is the name of the applied plan to query for. */ - name: string; -} -export interface QueryAppliedPlanRequestProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAppliedPlanRequest"; - value: Uint8Array; -} -/** - * QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanRequestAmino { - /** name is the name of the applied plan to query for. */ - name: string; -} -export interface QueryAppliedPlanRequestAminoMsg { - type: "cosmos-sdk/QueryAppliedPlanRequest"; - value: QueryAppliedPlanRequestAmino; -} -/** - * QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanRequestSDKType { - name: string; -} -/** - * QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanResponse { - /** height is the block height at which the plan was applied. */ - height: bigint; -} -export interface QueryAppliedPlanResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAppliedPlanResponse"; - value: Uint8Array; -} -/** - * QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanResponseAmino { - /** height is the block height at which the plan was applied. */ - height: string; -} -export interface QueryAppliedPlanResponseAminoMsg { - type: "cosmos-sdk/QueryAppliedPlanResponse"; - value: QueryAppliedPlanResponseAmino; -} -/** - * QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC - * method. - */ -export interface QueryAppliedPlanResponseSDKType { - height: bigint; -} -/** - * QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState - * RPC method. - */ -/** @deprecated */ -export interface QueryUpgradedConsensusStateRequest { - /** - * last height of the current chain must be sent in request - * as this is the height under which next consensus state is stored - */ - lastHeight: bigint; -} -export interface QueryUpgradedConsensusStateRequestProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest"; - value: Uint8Array; -} -/** - * QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState - * RPC method. - */ -/** @deprecated */ -export interface QueryUpgradedConsensusStateRequestAmino { - /** - * last height of the current chain must be sent in request - * as this is the height under which next consensus state is stored - */ - last_height: string; -} -export interface QueryUpgradedConsensusStateRequestAminoMsg { - type: "cosmos-sdk/QueryUpgradedConsensusStateRequest"; - value: QueryUpgradedConsensusStateRequestAmino; -} -/** - * QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState - * RPC method. - */ -/** @deprecated */ -export interface QueryUpgradedConsensusStateRequestSDKType { - last_height: bigint; -} -/** - * QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState - * RPC method. - */ -/** @deprecated */ -export interface QueryUpgradedConsensusStateResponse { - /** Since: cosmos-sdk 0.43 */ - upgradedConsensusState: Uint8Array; -} -export interface QueryUpgradedConsensusStateResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse"; - value: Uint8Array; -} -/** - * QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState - * RPC method. - */ -/** @deprecated */ -export interface QueryUpgradedConsensusStateResponseAmino { - /** Since: cosmos-sdk 0.43 */ - upgraded_consensus_state: Uint8Array; -} -export interface QueryUpgradedConsensusStateResponseAminoMsg { - type: "cosmos-sdk/QueryUpgradedConsensusStateResponse"; - value: QueryUpgradedConsensusStateResponseAmino; -} -/** - * QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState - * RPC method. - */ -/** @deprecated */ -export interface QueryUpgradedConsensusStateResponseSDKType { - upgraded_consensus_state: Uint8Array; -} -/** - * QueryModuleVersionsRequest is the request type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsRequest { - /** - * module_name is a field to query a specific module - * consensus version from state. Leaving this empty will - * fetch the full list of module versions from state - */ - moduleName: string; -} -export interface QueryModuleVersionsRequestProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryModuleVersionsRequest"; - value: Uint8Array; -} -/** - * QueryModuleVersionsRequest is the request type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsRequestAmino { - /** - * module_name is a field to query a specific module - * consensus version from state. Leaving this empty will - * fetch the full list of module versions from state - */ - module_name: string; -} -export interface QueryModuleVersionsRequestAminoMsg { - type: "cosmos-sdk/QueryModuleVersionsRequest"; - value: QueryModuleVersionsRequestAmino; -} -/** - * QueryModuleVersionsRequest is the request type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsRequestSDKType { - module_name: string; -} -/** - * QueryModuleVersionsResponse is the response type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsResponse { - /** module_versions is a list of module names with their consensus versions. */ - moduleVersions: ModuleVersion[]; -} -export interface QueryModuleVersionsResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryModuleVersionsResponse"; - value: Uint8Array; -} -/** - * QueryModuleVersionsResponse is the response type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsResponseAmino { - /** module_versions is a list of module names with their consensus versions. */ - module_versions: ModuleVersionAmino[]; -} -export interface QueryModuleVersionsResponseAminoMsg { - type: "cosmos-sdk/QueryModuleVersionsResponse"; - value: QueryModuleVersionsResponseAmino; -} -/** - * QueryModuleVersionsResponse is the response type for the Query/ModuleVersions - * RPC method. - * - * Since: cosmos-sdk 0.43 - */ -export interface QueryModuleVersionsResponseSDKType { - module_versions: ModuleVersionSDKType[]; -} -/** - * QueryAuthorityRequest is the request type for Query/Authority - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryAuthorityRequest {} -export interface QueryAuthorityRequestProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAuthorityRequest"; - value: Uint8Array; -} -/** - * QueryAuthorityRequest is the request type for Query/Authority - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryAuthorityRequestAmino {} -export interface QueryAuthorityRequestAminoMsg { - type: "cosmos-sdk/QueryAuthorityRequest"; - value: QueryAuthorityRequestAmino; -} -/** - * QueryAuthorityRequest is the request type for Query/Authority - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryAuthorityRequestSDKType {} -/** - * QueryAuthorityResponse is the response type for Query/Authority - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryAuthorityResponse { - address: string; -} -export interface QueryAuthorityResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAuthorityResponse"; - value: Uint8Array; -} -/** - * QueryAuthorityResponse is the response type for Query/Authority - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryAuthorityResponseAmino { - address: string; -} -export interface QueryAuthorityResponseAminoMsg { - type: "cosmos-sdk/QueryAuthorityResponse"; - value: QueryAuthorityResponseAmino; -} -/** - * QueryAuthorityResponse is the response type for Query/Authority - * - * Since: cosmos-sdk 0.46 - */ -export interface QueryAuthorityResponseSDKType { - address: string; -} -function createBaseQueryCurrentPlanRequest(): QueryCurrentPlanRequest { - return {}; -} -export const QueryCurrentPlanRequest = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", - aminoType: "cosmos-sdk/QueryCurrentPlanRequest", - encode(_: QueryCurrentPlanRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCurrentPlanRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCurrentPlanRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryCurrentPlanRequest { - return {}; - }, - toJSON(_: QueryCurrentPlanRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryCurrentPlanRequest { - const message = createBaseQueryCurrentPlanRequest(); - return message; - }, - fromSDK(_: QueryCurrentPlanRequestSDKType): QueryCurrentPlanRequest { - return {}; - }, - toSDK(_: QueryCurrentPlanRequest): QueryCurrentPlanRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryCurrentPlanRequestAmino): QueryCurrentPlanRequest { - return {}; - }, - toAmino(_: QueryCurrentPlanRequest): QueryCurrentPlanRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryCurrentPlanRequestAminoMsg): QueryCurrentPlanRequest { - return QueryCurrentPlanRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCurrentPlanRequest): QueryCurrentPlanRequestAminoMsg { - return { - type: "cosmos-sdk/QueryCurrentPlanRequest", - value: QueryCurrentPlanRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCurrentPlanRequestProtoMsg): QueryCurrentPlanRequest { - return QueryCurrentPlanRequest.decode(message.value); - }, - toProto(message: QueryCurrentPlanRequest): Uint8Array { - return QueryCurrentPlanRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCurrentPlanRequest): QueryCurrentPlanRequestProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", - value: QueryCurrentPlanRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCurrentPlanResponse(): QueryCurrentPlanResponse { - return { - plan: Plan.fromPartial({}) - }; -} -export const QueryCurrentPlanResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", - aminoType: "cosmos-sdk/QueryCurrentPlanResponse", - encode(message: QueryCurrentPlanResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCurrentPlanResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCurrentPlanResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCurrentPlanResponse { - return { - plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined - }; - }, - toJSON(message: QueryCurrentPlanResponse): unknown { - const obj: any = {}; - message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryCurrentPlanResponse { - const message = createBaseQueryCurrentPlanResponse(); - message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; - return message; - }, - fromSDK(object: QueryCurrentPlanResponseSDKType): QueryCurrentPlanResponse { - return { - plan: object.plan ? Plan.fromSDK(object.plan) : undefined - }; - }, - toSDK(message: QueryCurrentPlanResponse): QueryCurrentPlanResponseSDKType { - const obj: any = {}; - message.plan !== undefined && (obj.plan = message.plan ? Plan.toSDK(message.plan) : undefined); - return obj; - }, - fromAmino(object: QueryCurrentPlanResponseAmino): QueryCurrentPlanResponse { - return { - plan: object?.plan ? Plan.fromAmino(object.plan) : undefined - }; - }, - toAmino(message: QueryCurrentPlanResponse): QueryCurrentPlanResponseAmino { - const obj: any = {}; - obj.plan = message.plan ? Plan.toAmino(message.plan) : undefined; - return obj; - }, - fromAminoMsg(object: QueryCurrentPlanResponseAminoMsg): QueryCurrentPlanResponse { - return QueryCurrentPlanResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCurrentPlanResponse): QueryCurrentPlanResponseAminoMsg { - return { - type: "cosmos-sdk/QueryCurrentPlanResponse", - value: QueryCurrentPlanResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCurrentPlanResponseProtoMsg): QueryCurrentPlanResponse { - return QueryCurrentPlanResponse.decode(message.value); - }, - toProto(message: QueryCurrentPlanResponse): Uint8Array { - return QueryCurrentPlanResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCurrentPlanResponse): QueryCurrentPlanResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", - value: QueryCurrentPlanResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAppliedPlanRequest(): QueryAppliedPlanRequest { - return { - name: "" - }; -} -export const QueryAppliedPlanRequest = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", - aminoType: "cosmos-sdk/QueryAppliedPlanRequest", - encode(message: QueryAppliedPlanRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAppliedPlanRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAppliedPlanRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAppliedPlanRequest { - return { - name: isSet(object.name) ? String(object.name) : "" - }; - }, - toJSON(message: QueryAppliedPlanRequest): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - fromPartial(object: DeepPartial): QueryAppliedPlanRequest { - const message = createBaseQueryAppliedPlanRequest(); - message.name = object.name ?? ""; - return message; - }, - fromSDK(object: QueryAppliedPlanRequestSDKType): QueryAppliedPlanRequest { - return { - name: object?.name - }; - }, - toSDK(message: QueryAppliedPlanRequest): QueryAppliedPlanRequestSDKType { - const obj: any = {}; - obj.name = message.name; - return obj; - }, - fromAmino(object: QueryAppliedPlanRequestAmino): QueryAppliedPlanRequest { - return { - name: object.name - }; - }, - toAmino(message: QueryAppliedPlanRequest): QueryAppliedPlanRequestAmino { - const obj: any = {}; - obj.name = message.name; - return obj; - }, - fromAminoMsg(object: QueryAppliedPlanRequestAminoMsg): QueryAppliedPlanRequest { - return QueryAppliedPlanRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAppliedPlanRequest): QueryAppliedPlanRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAppliedPlanRequest", - value: QueryAppliedPlanRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAppliedPlanRequestProtoMsg): QueryAppliedPlanRequest { - return QueryAppliedPlanRequest.decode(message.value); - }, - toProto(message: QueryAppliedPlanRequest): Uint8Array { - return QueryAppliedPlanRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAppliedPlanRequest): QueryAppliedPlanRequestProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", - value: QueryAppliedPlanRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAppliedPlanResponse(): QueryAppliedPlanResponse { - return { - height: BigInt(0) - }; -} -export const QueryAppliedPlanResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", - aminoType: "cosmos-sdk/QueryAppliedPlanResponse", - encode(message: QueryAppliedPlanResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAppliedPlanResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAppliedPlanResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAppliedPlanResponse { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryAppliedPlanResponse): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryAppliedPlanResponse { - const message = createBaseQueryAppliedPlanResponse(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryAppliedPlanResponseSDKType): QueryAppliedPlanResponse { - return { - height: object?.height - }; - }, - toSDK(message: QueryAppliedPlanResponse): QueryAppliedPlanResponseSDKType { - const obj: any = {}; - obj.height = message.height; - return obj; - }, - fromAmino(object: QueryAppliedPlanResponseAmino): QueryAppliedPlanResponse { - return { - height: BigInt(object.height) - }; - }, - toAmino(message: QueryAppliedPlanResponse): QueryAppliedPlanResponseAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryAppliedPlanResponseAminoMsg): QueryAppliedPlanResponse { - return QueryAppliedPlanResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAppliedPlanResponse): QueryAppliedPlanResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAppliedPlanResponse", - value: QueryAppliedPlanResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAppliedPlanResponseProtoMsg): QueryAppliedPlanResponse { - return QueryAppliedPlanResponse.decode(message.value); - }, - toProto(message: QueryAppliedPlanResponse): Uint8Array { - return QueryAppliedPlanResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAppliedPlanResponse): QueryAppliedPlanResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", - value: QueryAppliedPlanResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUpgradedConsensusStateRequest(): QueryUpgradedConsensusStateRequest { - return { - lastHeight: BigInt(0) - }; -} -export const QueryUpgradedConsensusStateRequest = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", - aminoType: "cosmos-sdk/QueryUpgradedConsensusStateRequest", - encode(message: QueryUpgradedConsensusStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lastHeight !== BigInt(0)) { - writer.uint32(8).int64(message.lastHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUpgradedConsensusStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUpgradedConsensusStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lastHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUpgradedConsensusStateRequest { - return { - lastHeight: isSet(object.lastHeight) ? BigInt(object.lastHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryUpgradedConsensusStateRequest): unknown { - const obj: any = {}; - message.lastHeight !== undefined && (obj.lastHeight = (message.lastHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryUpgradedConsensusStateRequest { - const message = createBaseQueryUpgradedConsensusStateRequest(); - message.lastHeight = object.lastHeight !== undefined && object.lastHeight !== null ? BigInt(object.lastHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryUpgradedConsensusStateRequestSDKType): QueryUpgradedConsensusStateRequest { - return { - lastHeight: object?.last_height - }; - }, - toSDK(message: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestSDKType { - const obj: any = {}; - obj.last_height = message.lastHeight; - return obj; - }, - fromAmino(object: QueryUpgradedConsensusStateRequestAmino): QueryUpgradedConsensusStateRequest { - return { - lastHeight: BigInt(object.last_height) - }; - }, - toAmino(message: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestAmino { - const obj: any = {}; - obj.last_height = message.lastHeight ? message.lastHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryUpgradedConsensusStateRequestAminoMsg): QueryUpgradedConsensusStateRequest { - return QueryUpgradedConsensusStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryUpgradedConsensusStateRequest", - value: QueryUpgradedConsensusStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUpgradedConsensusStateRequestProtoMsg): QueryUpgradedConsensusStateRequest { - return QueryUpgradedConsensusStateRequest.decode(message.value); - }, - toProto(message: QueryUpgradedConsensusStateRequest): Uint8Array { - return QueryUpgradedConsensusStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", - value: QueryUpgradedConsensusStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUpgradedConsensusStateResponse(): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: new Uint8Array() - }; -} -export const QueryUpgradedConsensusStateResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", - aminoType: "cosmos-sdk/QueryUpgradedConsensusStateResponse", - encode(message: QueryUpgradedConsensusStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.upgradedConsensusState.length !== 0) { - writer.uint32(18).bytes(message.upgradedConsensusState); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUpgradedConsensusStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUpgradedConsensusStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.upgradedConsensusState = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: isSet(object.upgradedConsensusState) ? bytesFromBase64(object.upgradedConsensusState) : new Uint8Array() - }; - }, - toJSON(message: QueryUpgradedConsensusStateResponse): unknown { - const obj: any = {}; - message.upgradedConsensusState !== undefined && (obj.upgradedConsensusState = base64FromBytes(message.upgradedConsensusState !== undefined ? message.upgradedConsensusState : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryUpgradedConsensusStateResponse { - const message = createBaseQueryUpgradedConsensusStateResponse(); - message.upgradedConsensusState = object.upgradedConsensusState ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryUpgradedConsensusStateResponseSDKType): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: object?.upgraded_consensus_state - }; - }, - toSDK(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseSDKType { - const obj: any = {}; - obj.upgraded_consensus_state = message.upgradedConsensusState; - return obj; - }, - fromAmino(object: QueryUpgradedConsensusStateResponseAmino): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: object.upgraded_consensus_state - }; - }, - toAmino(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseAmino { - const obj: any = {}; - obj.upgraded_consensus_state = message.upgradedConsensusState; - return obj; - }, - fromAminoMsg(object: QueryUpgradedConsensusStateResponseAminoMsg): QueryUpgradedConsensusStateResponse { - return QueryUpgradedConsensusStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryUpgradedConsensusStateResponse", - value: QueryUpgradedConsensusStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUpgradedConsensusStateResponseProtoMsg): QueryUpgradedConsensusStateResponse { - return QueryUpgradedConsensusStateResponse.decode(message.value); - }, - toProto(message: QueryUpgradedConsensusStateResponse): Uint8Array { - return QueryUpgradedConsensusStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", - value: QueryUpgradedConsensusStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryModuleVersionsRequest(): QueryModuleVersionsRequest { - return { - moduleName: "" - }; -} -export const QueryModuleVersionsRequest = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", - aminoType: "cosmos-sdk/QueryModuleVersionsRequest", - encode(message: QueryModuleVersionsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.moduleName !== "") { - writer.uint32(10).string(message.moduleName); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleVersionsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleVersionsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moduleName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryModuleVersionsRequest { - return { - moduleName: isSet(object.moduleName) ? String(object.moduleName) : "" - }; - }, - toJSON(message: QueryModuleVersionsRequest): unknown { - const obj: any = {}; - message.moduleName !== undefined && (obj.moduleName = message.moduleName); - return obj; - }, - fromPartial(object: DeepPartial): QueryModuleVersionsRequest { - const message = createBaseQueryModuleVersionsRequest(); - message.moduleName = object.moduleName ?? ""; - return message; - }, - fromSDK(object: QueryModuleVersionsRequestSDKType): QueryModuleVersionsRequest { - return { - moduleName: object?.module_name - }; - }, - toSDK(message: QueryModuleVersionsRequest): QueryModuleVersionsRequestSDKType { - const obj: any = {}; - obj.module_name = message.moduleName; - return obj; - }, - fromAmino(object: QueryModuleVersionsRequestAmino): QueryModuleVersionsRequest { - return { - moduleName: object.module_name - }; - }, - toAmino(message: QueryModuleVersionsRequest): QueryModuleVersionsRequestAmino { - const obj: any = {}; - obj.module_name = message.moduleName; - return obj; - }, - fromAminoMsg(object: QueryModuleVersionsRequestAminoMsg): QueryModuleVersionsRequest { - return QueryModuleVersionsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryModuleVersionsRequest): QueryModuleVersionsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryModuleVersionsRequest", - value: QueryModuleVersionsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryModuleVersionsRequestProtoMsg): QueryModuleVersionsRequest { - return QueryModuleVersionsRequest.decode(message.value); - }, - toProto(message: QueryModuleVersionsRequest): Uint8Array { - return QueryModuleVersionsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryModuleVersionsRequest): QueryModuleVersionsRequestProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", - value: QueryModuleVersionsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryModuleVersionsResponse(): QueryModuleVersionsResponse { - return { - moduleVersions: [] - }; -} -export const QueryModuleVersionsResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", - aminoType: "cosmos-sdk/QueryModuleVersionsResponse", - encode(message: QueryModuleVersionsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.moduleVersions) { - ModuleVersion.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleVersionsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleVersionsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moduleVersions.push(ModuleVersion.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryModuleVersionsResponse { - return { - moduleVersions: Array.isArray(object?.moduleVersions) ? object.moduleVersions.map((e: any) => ModuleVersion.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryModuleVersionsResponse): unknown { - const obj: any = {}; - if (message.moduleVersions) { - obj.moduleVersions = message.moduleVersions.map(e => e ? ModuleVersion.toJSON(e) : undefined); - } else { - obj.moduleVersions = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryModuleVersionsResponse { - const message = createBaseQueryModuleVersionsResponse(); - message.moduleVersions = object.moduleVersions?.map(e => ModuleVersion.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryModuleVersionsResponseSDKType): QueryModuleVersionsResponse { - return { - moduleVersions: Array.isArray(object?.module_versions) ? object.module_versions.map((e: any) => ModuleVersion.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryModuleVersionsResponse): QueryModuleVersionsResponseSDKType { - const obj: any = {}; - if (message.moduleVersions) { - obj.module_versions = message.moduleVersions.map(e => e ? ModuleVersion.toSDK(e) : undefined); - } else { - obj.module_versions = []; - } - return obj; - }, - fromAmino(object: QueryModuleVersionsResponseAmino): QueryModuleVersionsResponse { - return { - moduleVersions: Array.isArray(object?.module_versions) ? object.module_versions.map((e: any) => ModuleVersion.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryModuleVersionsResponse): QueryModuleVersionsResponseAmino { - const obj: any = {}; - if (message.moduleVersions) { - obj.module_versions = message.moduleVersions.map(e => e ? ModuleVersion.toAmino(e) : undefined); - } else { - obj.module_versions = []; - } - return obj; - }, - fromAminoMsg(object: QueryModuleVersionsResponseAminoMsg): QueryModuleVersionsResponse { - return QueryModuleVersionsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryModuleVersionsResponse): QueryModuleVersionsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryModuleVersionsResponse", - value: QueryModuleVersionsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryModuleVersionsResponseProtoMsg): QueryModuleVersionsResponse { - return QueryModuleVersionsResponse.decode(message.value); - }, - toProto(message: QueryModuleVersionsResponse): Uint8Array { - return QueryModuleVersionsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryModuleVersionsResponse): QueryModuleVersionsResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", - value: QueryModuleVersionsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAuthorityRequest(): QueryAuthorityRequest { - return {}; -} -export const QueryAuthorityRequest = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAuthorityRequest", - aminoType: "cosmos-sdk/QueryAuthorityRequest", - encode(_: QueryAuthorityRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAuthorityRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAuthorityRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryAuthorityRequest { - return {}; - }, - toJSON(_: QueryAuthorityRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryAuthorityRequest { - const message = createBaseQueryAuthorityRequest(); - return message; - }, - fromSDK(_: QueryAuthorityRequestSDKType): QueryAuthorityRequest { - return {}; - }, - toSDK(_: QueryAuthorityRequest): QueryAuthorityRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryAuthorityRequestAmino): QueryAuthorityRequest { - return {}; - }, - toAmino(_: QueryAuthorityRequest): QueryAuthorityRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryAuthorityRequestAminoMsg): QueryAuthorityRequest { - return QueryAuthorityRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAuthorityRequest): QueryAuthorityRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAuthorityRequest", - value: QueryAuthorityRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAuthorityRequestProtoMsg): QueryAuthorityRequest { - return QueryAuthorityRequest.decode(message.value); - }, - toProto(message: QueryAuthorityRequest): Uint8Array { - return QueryAuthorityRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAuthorityRequest): QueryAuthorityRequestProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAuthorityRequest", - value: QueryAuthorityRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAuthorityResponse(): QueryAuthorityResponse { - return { - address: "" - }; -} -export const QueryAuthorityResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAuthorityResponse", - aminoType: "cosmos-sdk/QueryAuthorityResponse", - encode(message: QueryAuthorityResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAuthorityResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAuthorityResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAuthorityResponse { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: QueryAuthorityResponse): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): QueryAuthorityResponse { - const message = createBaseQueryAuthorityResponse(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: QueryAuthorityResponseSDKType): QueryAuthorityResponse { - return { - address: object?.address - }; - }, - toSDK(message: QueryAuthorityResponse): QueryAuthorityResponseSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: QueryAuthorityResponseAmino): QueryAuthorityResponse { - return { - address: object.address - }; - }, - toAmino(message: QueryAuthorityResponse): QueryAuthorityResponseAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: QueryAuthorityResponseAminoMsg): QueryAuthorityResponse { - return QueryAuthorityResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAuthorityResponse): QueryAuthorityResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAuthorityResponse", - value: QueryAuthorityResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAuthorityResponseProtoMsg): QueryAuthorityResponse { - return QueryAuthorityResponse.decode(message.value); - }, - toProto(message: QueryAuthorityResponse): Uint8Array { - return QueryAuthorityResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAuthorityResponse): QueryAuthorityResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.QueryAuthorityResponse", - value: QueryAuthorityResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.amino.ts deleted file mode 100644 index 1734b0fa..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.amino.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MsgSoftwareUpgrade, MsgCancelUpgrade } from "./tx"; -export const AminoConverter = { - "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade": { - aminoType: "cosmos-sdk/MsgSoftwareUpgrade", - toAmino: MsgSoftwareUpgrade.toAmino, - fromAmino: MsgSoftwareUpgrade.fromAmino - }, - "/cosmos.upgrade.v1beta1.MsgCancelUpgrade": { - aminoType: "cosmos-sdk/MsgCancelUpgrade", - toAmino: MsgCancelUpgrade.toAmino, - fromAmino: MsgCancelUpgrade.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.registry.ts deleted file mode 100644 index e57c26fd..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.registry.ts +++ /dev/null @@ -1,81 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSoftwareUpgrade, MsgCancelUpgrade } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", MsgSoftwareUpgrade], ["/cosmos.upgrade.v1beta1.MsgCancelUpgrade", MsgCancelUpgrade]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - softwareUpgrade(value: MsgSoftwareUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - value: MsgSoftwareUpgrade.encode(value).finish() - }; - }, - cancelUpgrade(value: MsgCancelUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - value: MsgCancelUpgrade.encode(value).finish() - }; - } - }, - withTypeUrl: { - softwareUpgrade(value: MsgSoftwareUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - value - }; - }, - cancelUpgrade(value: MsgCancelUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - value - }; - } - }, - toJSON: { - softwareUpgrade(value: MsgSoftwareUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - value: MsgSoftwareUpgrade.toJSON(value) - }; - }, - cancelUpgrade(value: MsgCancelUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - value: MsgCancelUpgrade.toJSON(value) - }; - } - }, - fromJSON: { - softwareUpgrade(value: any) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - value: MsgSoftwareUpgrade.fromJSON(value) - }; - }, - cancelUpgrade(value: any) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - value: MsgCancelUpgrade.fromJSON(value) - }; - } - }, - fromPartial: { - softwareUpgrade(value: MsgSoftwareUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - value: MsgSoftwareUpgrade.fromPartial(value) - }; - }, - cancelUpgrade(value: MsgCancelUpgrade) { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - value: MsgCancelUpgrade.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index cbef95a8..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgSoftwareUpgrade, MsgSoftwareUpgradeResponse, MsgCancelUpgrade, MsgCancelUpgradeResponse } from "./tx"; -/** Msg defines the upgrade Msg service. */ -export interface Msg { - /** - * SoftwareUpgrade is a governance operation for initiating a software upgrade. - * - * Since: cosmos-sdk 0.46 - */ - softwareUpgrade(request: MsgSoftwareUpgrade): Promise; - /** - * CancelUpgrade is a governance operation for cancelling a previously - * approvid software upgrade. - * - * Since: cosmos-sdk 0.46 - */ - cancelUpgrade(request: MsgCancelUpgrade): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.softwareUpgrade = this.softwareUpgrade.bind(this); - this.cancelUpgrade = this.cancelUpgrade.bind(this); - } - softwareUpgrade(request: MsgSoftwareUpgrade): Promise { - const data = MsgSoftwareUpgrade.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Msg", "SoftwareUpgrade", data); - return promise.then(data => MsgSoftwareUpgradeResponse.decode(new BinaryReader(data))); - } - cancelUpgrade(request: MsgCancelUpgrade): Promise { - const data = MsgCancelUpgrade.encode(request).finish(); - const promise = this.rpc.request("cosmos.upgrade.v1beta1.Msg", "CancelUpgrade", data); - return promise.then(data => MsgCancelUpgradeResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.ts deleted file mode 100644 index aab777be..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/tx.ts +++ /dev/null @@ -1,458 +0,0 @@ -import { Plan, PlanAmino, PlanSDKType } from "./upgrade"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgSoftwareUpgrade { - /** authority is the address of the governance account. */ - authority: string; - /** plan is the upgrade plan. */ - plan: Plan | undefined; -} -export interface MsgSoftwareUpgradeProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade"; - value: Uint8Array; -} -/** - * MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgSoftwareUpgradeAmino { - /** authority is the address of the governance account. */ - authority: string; - /** plan is the upgrade plan. */ - plan?: PlanAmino | undefined; -} -export interface MsgSoftwareUpgradeAminoMsg { - type: "cosmos-sdk/MsgSoftwareUpgrade"; - value: MsgSoftwareUpgradeAmino; -} -/** - * MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgSoftwareUpgradeSDKType { - authority: string; - plan: PlanSDKType | undefined; -} -/** - * MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgSoftwareUpgradeResponse {} -export interface MsgSoftwareUpgradeResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse"; - value: Uint8Array; -} -/** - * MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgSoftwareUpgradeResponseAmino {} -export interface MsgSoftwareUpgradeResponseAminoMsg { - type: "cosmos-sdk/MsgSoftwareUpgradeResponse"; - value: MsgSoftwareUpgradeResponseAmino; -} -/** - * MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgSoftwareUpgradeResponseSDKType {} -/** - * MsgCancelUpgrade is the Msg/CancelUpgrade request type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgCancelUpgrade { - /** authority is the address of the governance account. */ - authority: string; -} -export interface MsgCancelUpgradeProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade"; - value: Uint8Array; -} -/** - * MsgCancelUpgrade is the Msg/CancelUpgrade request type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgCancelUpgradeAmino { - /** authority is the address of the governance account. */ - authority: string; -} -export interface MsgCancelUpgradeAminoMsg { - type: "cosmos-sdk/MsgCancelUpgrade"; - value: MsgCancelUpgradeAmino; -} -/** - * MsgCancelUpgrade is the Msg/CancelUpgrade request type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgCancelUpgradeSDKType { - authority: string; -} -/** - * MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgCancelUpgradeResponse {} -export interface MsgCancelUpgradeResponseProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse"; - value: Uint8Array; -} -/** - * MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgCancelUpgradeResponseAmino {} -export interface MsgCancelUpgradeResponseAminoMsg { - type: "cosmos-sdk/MsgCancelUpgradeResponse"; - value: MsgCancelUpgradeResponseAmino; -} -/** - * MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. - * - * Since: cosmos-sdk 0.46 - */ -export interface MsgCancelUpgradeResponseSDKType {} -function createBaseMsgSoftwareUpgrade(): MsgSoftwareUpgrade { - return { - authority: "", - plan: Plan.fromPartial({}) - }; -} -export const MsgSoftwareUpgrade = { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - aminoType: "cosmos-sdk/MsgSoftwareUpgrade", - encode(message: MsgSoftwareUpgrade, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { - writer.uint32(10).string(message.authority); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSoftwareUpgrade { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSoftwareUpgrade(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSoftwareUpgrade { - return { - authority: isSet(object.authority) ? String(object.authority) : "", - plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined - }; - }, - toJSON(message: MsgSoftwareUpgrade): unknown { - const obj: any = {}; - message.authority !== undefined && (obj.authority = message.authority); - message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgSoftwareUpgrade { - const message = createBaseMsgSoftwareUpgrade(); - message.authority = object.authority ?? ""; - message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; - return message; - }, - fromSDK(object: MsgSoftwareUpgradeSDKType): MsgSoftwareUpgrade { - return { - authority: object?.authority, - plan: object.plan ? Plan.fromSDK(object.plan) : undefined - }; - }, - toSDK(message: MsgSoftwareUpgrade): MsgSoftwareUpgradeSDKType { - const obj: any = {}; - obj.authority = message.authority; - message.plan !== undefined && (obj.plan = message.plan ? Plan.toSDK(message.plan) : undefined); - return obj; - }, - fromAmino(object: MsgSoftwareUpgradeAmino): MsgSoftwareUpgrade { - return { - authority: object.authority, - plan: object?.plan ? Plan.fromAmino(object.plan) : undefined - }; - }, - toAmino(message: MsgSoftwareUpgrade): MsgSoftwareUpgradeAmino { - const obj: any = {}; - obj.authority = message.authority; - obj.plan = message.plan ? Plan.toAmino(message.plan) : undefined; - return obj; - }, - fromAminoMsg(object: MsgSoftwareUpgradeAminoMsg): MsgSoftwareUpgrade { - return MsgSoftwareUpgrade.fromAmino(object.value); - }, - toAminoMsg(message: MsgSoftwareUpgrade): MsgSoftwareUpgradeAminoMsg { - return { - type: "cosmos-sdk/MsgSoftwareUpgrade", - value: MsgSoftwareUpgrade.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSoftwareUpgradeProtoMsg): MsgSoftwareUpgrade { - return MsgSoftwareUpgrade.decode(message.value); - }, - toProto(message: MsgSoftwareUpgrade): Uint8Array { - return MsgSoftwareUpgrade.encode(message).finish(); - }, - toProtoMsg(message: MsgSoftwareUpgrade): MsgSoftwareUpgradeProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - value: MsgSoftwareUpgrade.encode(message).finish() - }; - } -}; -function createBaseMsgSoftwareUpgradeResponse(): MsgSoftwareUpgradeResponse { - return {}; -} -export const MsgSoftwareUpgradeResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", - aminoType: "cosmos-sdk/MsgSoftwareUpgradeResponse", - encode(_: MsgSoftwareUpgradeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSoftwareUpgradeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSoftwareUpgradeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSoftwareUpgradeResponse { - return {}; - }, - toJSON(_: MsgSoftwareUpgradeResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSoftwareUpgradeResponse { - const message = createBaseMsgSoftwareUpgradeResponse(); - return message; - }, - fromSDK(_: MsgSoftwareUpgradeResponseSDKType): MsgSoftwareUpgradeResponse { - return {}; - }, - toSDK(_: MsgSoftwareUpgradeResponse): MsgSoftwareUpgradeResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSoftwareUpgradeResponseAmino): MsgSoftwareUpgradeResponse { - return {}; - }, - toAmino(_: MsgSoftwareUpgradeResponse): MsgSoftwareUpgradeResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSoftwareUpgradeResponseAminoMsg): MsgSoftwareUpgradeResponse { - return MsgSoftwareUpgradeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSoftwareUpgradeResponse): MsgSoftwareUpgradeResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSoftwareUpgradeResponse", - value: MsgSoftwareUpgradeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSoftwareUpgradeResponseProtoMsg): MsgSoftwareUpgradeResponse { - return MsgSoftwareUpgradeResponse.decode(message.value); - }, - toProto(message: MsgSoftwareUpgradeResponse): Uint8Array { - return MsgSoftwareUpgradeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSoftwareUpgradeResponse): MsgSoftwareUpgradeResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", - value: MsgSoftwareUpgradeResponse.encode(message).finish() - }; - } -}; -function createBaseMsgCancelUpgrade(): MsgCancelUpgrade { - return { - authority: "" - }; -} -export const MsgCancelUpgrade = { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - aminoType: "cosmos-sdk/MsgCancelUpgrade", - encode(message: MsgCancelUpgrade, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authority !== "") { - writer.uint32(10).string(message.authority); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCancelUpgrade { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCancelUpgrade(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCancelUpgrade { - return { - authority: isSet(object.authority) ? String(object.authority) : "" - }; - }, - toJSON(message: MsgCancelUpgrade): unknown { - const obj: any = {}; - message.authority !== undefined && (obj.authority = message.authority); - return obj; - }, - fromPartial(object: DeepPartial): MsgCancelUpgrade { - const message = createBaseMsgCancelUpgrade(); - message.authority = object.authority ?? ""; - return message; - }, - fromSDK(object: MsgCancelUpgradeSDKType): MsgCancelUpgrade { - return { - authority: object?.authority - }; - }, - toSDK(message: MsgCancelUpgrade): MsgCancelUpgradeSDKType { - const obj: any = {}; - obj.authority = message.authority; - return obj; - }, - fromAmino(object: MsgCancelUpgradeAmino): MsgCancelUpgrade { - return { - authority: object.authority - }; - }, - toAmino(message: MsgCancelUpgrade): MsgCancelUpgradeAmino { - const obj: any = {}; - obj.authority = message.authority; - return obj; - }, - fromAminoMsg(object: MsgCancelUpgradeAminoMsg): MsgCancelUpgrade { - return MsgCancelUpgrade.fromAmino(object.value); - }, - toAminoMsg(message: MsgCancelUpgrade): MsgCancelUpgradeAminoMsg { - return { - type: "cosmos-sdk/MsgCancelUpgrade", - value: MsgCancelUpgrade.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCancelUpgradeProtoMsg): MsgCancelUpgrade { - return MsgCancelUpgrade.decode(message.value); - }, - toProto(message: MsgCancelUpgrade): Uint8Array { - return MsgCancelUpgrade.encode(message).finish(); - }, - toProtoMsg(message: MsgCancelUpgrade): MsgCancelUpgradeProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", - value: MsgCancelUpgrade.encode(message).finish() - }; - } -}; -function createBaseMsgCancelUpgradeResponse(): MsgCancelUpgradeResponse { - return {}; -} -export const MsgCancelUpgradeResponse = { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", - aminoType: "cosmos-sdk/MsgCancelUpgradeResponse", - encode(_: MsgCancelUpgradeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCancelUpgradeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCancelUpgradeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCancelUpgradeResponse { - return {}; - }, - toJSON(_: MsgCancelUpgradeResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCancelUpgradeResponse { - const message = createBaseMsgCancelUpgradeResponse(); - return message; - }, - fromSDK(_: MsgCancelUpgradeResponseSDKType): MsgCancelUpgradeResponse { - return {}; - }, - toSDK(_: MsgCancelUpgradeResponse): MsgCancelUpgradeResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCancelUpgradeResponseAmino): MsgCancelUpgradeResponse { - return {}; - }, - toAmino(_: MsgCancelUpgradeResponse): MsgCancelUpgradeResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCancelUpgradeResponseAminoMsg): MsgCancelUpgradeResponse { - return MsgCancelUpgradeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCancelUpgradeResponse): MsgCancelUpgradeResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCancelUpgradeResponse", - value: MsgCancelUpgradeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCancelUpgradeResponseProtoMsg): MsgCancelUpgradeResponse { - return MsgCancelUpgradeResponse.decode(message.value); - }, - toProto(message: MsgCancelUpgradeResponse): Uint8Array { - return MsgCancelUpgradeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCancelUpgradeResponse): MsgCancelUpgradeResponseProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", - value: MsgCancelUpgradeResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/upgrade.ts b/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/upgrade.ts deleted file mode 100644 index 5dea89a3..00000000 --- a/examples/interchainjs/src/codegen/cosmos/upgrade/v1beta1/upgrade.ts +++ /dev/null @@ -1,684 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface Plan { - /** - * Sets the name for the upgrade. This name will be used by the upgraded - * version of the software to apply any special "on-upgrade" commands during - * the first BeginBlock method after the upgrade is applied. It is also used - * to detect whether a software version can handle a given upgrade. If no - * upgrade handler with this name has been set in the software, it will be - * assumed that the software is out-of-date when the upgrade Time or Height is - * reached and the software will exit. - */ - name: string; - /** - * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - * has been removed from the SDK. - * If this field is not empty, an error will be thrown. - */ - /** @deprecated */ - time: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: bigint; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; - /** - * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - * moved to the IBC module in the sub module 02-client. - * If this field is not empty, an error will be thrown. - */ - /** @deprecated */ - upgradedClientState: Any | undefined; -} -export interface PlanProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.Plan"; - value: Uint8Array; -} -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface PlanAmino { - /** - * Sets the name for the upgrade. This name will be used by the upgraded - * version of the software to apply any special "on-upgrade" commands during - * the first BeginBlock method after the upgrade is applied. It is also used - * to detect whether a software version can handle a given upgrade. If no - * upgrade handler with this name has been set in the software, it will be - * assumed that the software is out-of-date when the upgrade Time or Height is - * reached and the software will exit. - */ - name: string; - /** - * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - * has been removed from the SDK. - * If this field is not empty, an error will be thrown. - */ - /** @deprecated */ - time?: Date | undefined; - /** - * The height at which the upgrade must be performed. - * Only used if Time is not set. - */ - height: string; - /** - * Any application specific upgrade info to be included on-chain - * such as a git commit that validators could automatically upgrade to - */ - info: string; - /** - * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - * moved to the IBC module in the sub module 02-client. - * If this field is not empty, an error will be thrown. - */ - /** @deprecated */ - upgraded_client_state?: AnyAmino | undefined; -} -export interface PlanAminoMsg { - type: "cosmos-sdk/Plan"; - value: PlanAmino; -} -/** Plan specifies information about a planned upgrade and when it should occur. */ -export interface PlanSDKType { - name: string; - /** @deprecated */ - time: Date | undefined; - height: bigint; - info: string; - /** @deprecated */ - upgraded_client_state: AnySDKType | undefined; -} -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov - * proposals, see MsgSoftwareUpgrade. - */ -/** @deprecated */ -export interface SoftwareUpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; -} -export interface SoftwareUpgradeProposalProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal"; - value: Uint8Array; -} -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov - * proposals, see MsgSoftwareUpgrade. - */ -/** @deprecated */ -export interface SoftwareUpgradeProposalAmino { - title: string; - description: string; - plan?: PlanAmino | undefined; -} -export interface SoftwareUpgradeProposalAminoMsg { - type: "cosmos-sdk/SoftwareUpgradeProposal"; - value: SoftwareUpgradeProposalAmino; -} -/** - * SoftwareUpgradeProposal is a gov Content type for initiating a software - * upgrade. - * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov - * proposals, see MsgSoftwareUpgrade. - */ -/** @deprecated */ -export interface SoftwareUpgradeProposalSDKType { - title: string; - description: string; - plan: PlanSDKType | undefined; -} -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov - * proposals, see MsgCancelUpgrade. - */ -/** @deprecated */ -export interface CancelSoftwareUpgradeProposal { - title: string; - description: string; -} -export interface CancelSoftwareUpgradeProposalProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal"; - value: Uint8Array; -} -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov - * proposals, see MsgCancelUpgrade. - */ -/** @deprecated */ -export interface CancelSoftwareUpgradeProposalAmino { - title: string; - description: string; -} -export interface CancelSoftwareUpgradeProposalAminoMsg { - type: "cosmos-sdk/CancelSoftwareUpgradeProposal"; - value: CancelSoftwareUpgradeProposalAmino; -} -/** - * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software - * upgrade. - * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov - * proposals, see MsgCancelUpgrade. - */ -/** @deprecated */ -export interface CancelSoftwareUpgradeProposalSDKType { - title: string; - description: string; -} -/** - * ModuleVersion specifies a module and its consensus version. - * - * Since: cosmos-sdk 0.43 - */ -export interface ModuleVersion { - /** name of the app module */ - name: string; - /** consensus version of the app module */ - version: bigint; -} -export interface ModuleVersionProtoMsg { - typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion"; - value: Uint8Array; -} -/** - * ModuleVersion specifies a module and its consensus version. - * - * Since: cosmos-sdk 0.43 - */ -export interface ModuleVersionAmino { - /** name of the app module */ - name: string; - /** consensus version of the app module */ - version: string; -} -export interface ModuleVersionAminoMsg { - type: "cosmos-sdk/ModuleVersion"; - value: ModuleVersionAmino; -} -/** - * ModuleVersion specifies a module and its consensus version. - * - * Since: cosmos-sdk 0.43 - */ -export interface ModuleVersionSDKType { - name: string; - version: bigint; -} -function createBasePlan(): Plan { - return { - name: "", - time: new Date(), - height: BigInt(0), - info: "", - upgradedClientState: Any.fromPartial({}) - }; -} -export const Plan = { - typeUrl: "/cosmos.upgrade.v1beta1.Plan", - aminoType: "cosmos-sdk/Plan", - encode(message: Plan, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(18).fork()).ldelim(); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.upgradedClientState !== undefined) { - Any.encode(message.upgradedClientState, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Plan { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlan(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Plan { - return { - name: isSet(object.name) ? String(object.name) : "", - time: isSet(object.time) ? new Date(object.time) : undefined, - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - info: isSet(object.info) ? String(object.info) : "", - upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) : undefined - }; - }, - toJSON(message: Plan): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.time !== undefined && (obj.time = message.time.toISOString()); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.info !== undefined && (obj.info = message.info); - message.upgradedClientState !== undefined && (obj.upgradedClientState = message.upgradedClientState ? Any.toJSON(message.upgradedClientState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Plan { - const message = createBasePlan(); - message.name = object.name ?? ""; - message.time = object.time ?? undefined; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.info = object.info ?? ""; - message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; - return message; - }, - fromSDK(object: PlanSDKType): Plan { - return { - name: object?.name, - time: object.time ?? undefined, - height: object?.height, - info: object?.info, - upgradedClientState: object.upgraded_client_state ? Any.fromSDK(object.upgraded_client_state) : undefined - }; - }, - toSDK(message: Plan): PlanSDKType { - const obj: any = {}; - obj.name = message.name; - message.time !== undefined && (obj.time = message.time ?? undefined); - obj.height = message.height; - obj.info = message.info; - message.upgradedClientState !== undefined && (obj.upgraded_client_state = message.upgradedClientState ? Any.toSDK(message.upgradedClientState) : undefined); - return obj; - }, - fromAmino(object: PlanAmino): Plan { - return { - name: object.name, - time: object.time, - height: BigInt(object.height), - info: object.info, - upgradedClientState: object?.upgraded_client_state ? Any.fromAmino(object.upgraded_client_state) : undefined - }; - }, - toAmino(message: Plan): PlanAmino { - const obj: any = {}; - obj.name = message.name; - obj.time = message.time; - obj.height = message.height ? message.height.toString() : undefined; - obj.info = message.info; - obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState) : undefined; - return obj; - }, - fromAminoMsg(object: PlanAminoMsg): Plan { - return Plan.fromAmino(object.value); - }, - toAminoMsg(message: Plan): PlanAminoMsg { - return { - type: "cosmos-sdk/Plan", - value: Plan.toAmino(message) - }; - }, - fromProtoMsg(message: PlanProtoMsg): Plan { - return Plan.decode(message.value); - }, - toProto(message: Plan): Uint8Array { - return Plan.encode(message).finish(); - }, - toProtoMsg(message: Plan): PlanProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.Plan", - value: Plan.encode(message).finish() - }; - } -}; -function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { - return { - title: "", - description: "", - plan: Plan.fromPartial({}) - }; -} -export const SoftwareUpgradeProposal = { - typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", - aminoType: "cosmos-sdk/SoftwareUpgradeProposal", - encode(message: SoftwareUpgradeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SoftwareUpgradeProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSoftwareUpgradeProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SoftwareUpgradeProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined - }; - }, - toJSON(message: SoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SoftwareUpgradeProposal { - const message = createBaseSoftwareUpgradeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; - return message; - }, - fromSDK(object: SoftwareUpgradeProposalSDKType): SoftwareUpgradeProposal { - return { - title: object?.title, - description: object?.description, - plan: object.plan ? Plan.fromSDK(object.plan) : undefined - }; - }, - toSDK(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - message.plan !== undefined && (obj.plan = message.plan ? Plan.toSDK(message.plan) : undefined); - return obj; - }, - fromAmino(object: SoftwareUpgradeProposalAmino): SoftwareUpgradeProposal { - return { - title: object.title, - description: object.description, - plan: object?.plan ? Plan.fromAmino(object.plan) : undefined - }; - }, - toAmino(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.plan = message.plan ? Plan.toAmino(message.plan) : undefined; - return obj; - }, - fromAminoMsg(object: SoftwareUpgradeProposalAminoMsg): SoftwareUpgradeProposal { - return SoftwareUpgradeProposal.fromAmino(object.value); - }, - toAminoMsg(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalAminoMsg { - return { - type: "cosmos-sdk/SoftwareUpgradeProposal", - value: SoftwareUpgradeProposal.toAmino(message) - }; - }, - fromProtoMsg(message: SoftwareUpgradeProposalProtoMsg): SoftwareUpgradeProposal { - return SoftwareUpgradeProposal.decode(message.value); - }, - toProto(message: SoftwareUpgradeProposal): Uint8Array { - return SoftwareUpgradeProposal.encode(message).finish(); - }, - toProtoMsg(message: SoftwareUpgradeProposal): SoftwareUpgradeProposalProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", - value: SoftwareUpgradeProposal.encode(message).finish() - }; - } -}; -function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { - return { - title: "", - description: "" - }; -} -export const CancelSoftwareUpgradeProposal = { - typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", - aminoType: "cosmos-sdk/CancelSoftwareUpgradeProposal", - encode(message: CancelSoftwareUpgradeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CancelSoftwareUpgradeProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCancelSoftwareUpgradeProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CancelSoftwareUpgradeProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "" - }; - }, - toJSON(message: CancelSoftwareUpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - fromPartial(object: DeepPartial): CancelSoftwareUpgradeProposal { - const message = createBaseCancelSoftwareUpgradeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - return message; - }, - fromSDK(object: CancelSoftwareUpgradeProposalSDKType): CancelSoftwareUpgradeProposal { - return { - title: object?.title, - description: object?.description - }; - }, - toSDK(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - return obj; - }, - fromAmino(object: CancelSoftwareUpgradeProposalAmino): CancelSoftwareUpgradeProposal { - return { - title: object.title, - description: object.description - }; - }, - toAmino(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - return obj; - }, - fromAminoMsg(object: CancelSoftwareUpgradeProposalAminoMsg): CancelSoftwareUpgradeProposal { - return CancelSoftwareUpgradeProposal.fromAmino(object.value); - }, - toAminoMsg(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalAminoMsg { - return { - type: "cosmos-sdk/CancelSoftwareUpgradeProposal", - value: CancelSoftwareUpgradeProposal.toAmino(message) - }; - }, - fromProtoMsg(message: CancelSoftwareUpgradeProposalProtoMsg): CancelSoftwareUpgradeProposal { - return CancelSoftwareUpgradeProposal.decode(message.value); - }, - toProto(message: CancelSoftwareUpgradeProposal): Uint8Array { - return CancelSoftwareUpgradeProposal.encode(message).finish(); - }, - toProtoMsg(message: CancelSoftwareUpgradeProposal): CancelSoftwareUpgradeProposalProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", - value: CancelSoftwareUpgradeProposal.encode(message).finish() - }; - } -}; -function createBaseModuleVersion(): ModuleVersion { - return { - name: "", - version: BigInt(0) - }; -} -export const ModuleVersion = { - typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", - aminoType: "cosmos-sdk/ModuleVersion", - encode(message: ModuleVersion, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.version !== BigInt(0)) { - writer.uint32(16).uint64(message.version); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleVersion { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleVersion(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.version = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleVersion { - return { - name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? BigInt(object.version.toString()) : BigInt(0) - }; - }, - toJSON(message: ModuleVersion): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.version !== undefined && (obj.version = (message.version || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ModuleVersion { - const message = createBaseModuleVersion(); - message.name = object.name ?? ""; - message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ModuleVersionSDKType): ModuleVersion { - return { - name: object?.name, - version: object?.version - }; - }, - toSDK(message: ModuleVersion): ModuleVersionSDKType { - const obj: any = {}; - obj.name = message.name; - obj.version = message.version; - return obj; - }, - fromAmino(object: ModuleVersionAmino): ModuleVersion { - return { - name: object.name, - version: BigInt(object.version) - }; - }, - toAmino(message: ModuleVersion): ModuleVersionAmino { - const obj: any = {}; - obj.name = message.name; - obj.version = message.version ? message.version.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ModuleVersionAminoMsg): ModuleVersion { - return ModuleVersion.fromAmino(object.value); - }, - toAminoMsg(message: ModuleVersion): ModuleVersionAminoMsg { - return { - type: "cosmos-sdk/ModuleVersion", - value: ModuleVersion.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleVersionProtoMsg): ModuleVersion { - return ModuleVersion.decode(message.value); - }, - toProto(message: ModuleVersion): Uint8Array { - return ModuleVersion.encode(message).finish(); - }, - toProtoMsg(message: ModuleVersion): ModuleVersionProtoMsg { - return { - typeUrl: "/cosmos.upgrade.v1beta1.ModuleVersion", - value: ModuleVersion.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.amino.ts deleted file mode 100644 index a197b23b..00000000 --- a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.amino.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; -export const AminoConverter = { - "/cosmos.vesting.v1beta1.MsgCreateVestingAccount": { - aminoType: "cosmos-sdk/MsgCreateVestingAccount", - toAmino: MsgCreateVestingAccount.toAmino, - fromAmino: MsgCreateVestingAccount.fromAmino - }, - "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount": { - aminoType: "cosmos-sdk/MsgCreatePermanentLockedAccount", - toAmino: MsgCreatePermanentLockedAccount.toAmino, - fromAmino: MsgCreatePermanentLockedAccount.fromAmino - }, - "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount": { - aminoType: "cosmos-sdk/MsgCreatePeriodicVestingAccount", - toAmino: MsgCreatePeriodicVestingAccount.toAmino, - fromAmino: MsgCreatePeriodicVestingAccount.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.registry.ts deleted file mode 100644 index 258b6f52..00000000 --- a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.registry.ts +++ /dev/null @@ -1,111 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], ["/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", MsgCreatePermanentLockedAccount], ["/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", MsgCreatePeriodicVestingAccount]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createVestingAccount(value: MsgCreateVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - value: MsgCreateVestingAccount.encode(value).finish() - }; - }, - createPermanentLockedAccount(value: MsgCreatePermanentLockedAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - value: MsgCreatePermanentLockedAccount.encode(value).finish() - }; - }, - createPeriodicVestingAccount(value: MsgCreatePeriodicVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - value: MsgCreatePeriodicVestingAccount.encode(value).finish() - }; - } - }, - withTypeUrl: { - createVestingAccount(value: MsgCreateVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - value - }; - }, - createPermanentLockedAccount(value: MsgCreatePermanentLockedAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - value - }; - }, - createPeriodicVestingAccount(value: MsgCreatePeriodicVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - value - }; - } - }, - toJSON: { - createVestingAccount(value: MsgCreateVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - value: MsgCreateVestingAccount.toJSON(value) - }; - }, - createPermanentLockedAccount(value: MsgCreatePermanentLockedAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - value: MsgCreatePermanentLockedAccount.toJSON(value) - }; - }, - createPeriodicVestingAccount(value: MsgCreatePeriodicVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - value: MsgCreatePeriodicVestingAccount.toJSON(value) - }; - } - }, - fromJSON: { - createVestingAccount(value: any) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - value: MsgCreateVestingAccount.fromJSON(value) - }; - }, - createPermanentLockedAccount(value: any) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - value: MsgCreatePermanentLockedAccount.fromJSON(value) - }; - }, - createPeriodicVestingAccount(value: any) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - value: MsgCreatePeriodicVestingAccount.fromJSON(value) - }; - } - }, - fromPartial: { - createVestingAccount(value: MsgCreateVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - value: MsgCreateVestingAccount.fromPartial(value) - }; - }, - createPermanentLockedAccount(value: MsgCreatePermanentLockedAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - value: MsgCreatePermanentLockedAccount.fromPartial(value) - }; - }, - createPeriodicVestingAccount(value: MsgCreatePeriodicVestingAccount) { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - value: MsgCreatePeriodicVestingAccount.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index b30e2e7f..00000000 --- a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgCreateVestingAccount, MsgCreateVestingAccountResponse, MsgCreatePermanentLockedAccount, MsgCreatePermanentLockedAccountResponse, MsgCreatePeriodicVestingAccount, MsgCreatePeriodicVestingAccountResponse } from "./tx"; -/** Msg defines the bank Msg service. */ -export interface Msg { - /** - * CreateVestingAccount defines a method that enables creating a vesting - * account. - */ - createVestingAccount(request: MsgCreateVestingAccount): Promise; - /** - * CreatePermanentLockedAccount defines a method that enables creating a permanent - * locked account. - */ - createPermanentLockedAccount(request: MsgCreatePermanentLockedAccount): Promise; - /** - * CreatePeriodicVestingAccount defines a method that enables creating a - * periodic vesting account. - */ - createPeriodicVestingAccount(request: MsgCreatePeriodicVestingAccount): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createVestingAccount = this.createVestingAccount.bind(this); - this.createPermanentLockedAccount = this.createPermanentLockedAccount.bind(this); - this.createPeriodicVestingAccount = this.createPeriodicVestingAccount.bind(this); - } - createVestingAccount(request: MsgCreateVestingAccount): Promise { - const data = MsgCreateVestingAccount.encode(request).finish(); - const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreateVestingAccount", data); - return promise.then(data => MsgCreateVestingAccountResponse.decode(new BinaryReader(data))); - } - createPermanentLockedAccount(request: MsgCreatePermanentLockedAccount): Promise { - const data = MsgCreatePermanentLockedAccount.encode(request).finish(); - const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreatePermanentLockedAccount", data); - return promise.then(data => MsgCreatePermanentLockedAccountResponse.decode(new BinaryReader(data))); - } - createPeriodicVestingAccount(request: MsgCreatePeriodicVestingAccount): Promise { - const data = MsgCreatePeriodicVestingAccount.encode(request).finish(); - const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreatePeriodicVestingAccount", data); - return promise.then(data => MsgCreatePeriodicVestingAccountResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.ts b/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.ts deleted file mode 100644 index 07bc0fe9..00000000 --- a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/tx.ts +++ /dev/null @@ -1,805 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { Period, PeriodAmino, PeriodSDKType } from "./vesting"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccount { - fromAddress: string; - toAddress: string; - amount: Coin[]; - endTime: bigint; - delayed: boolean; -} -export interface MsgCreateVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount"; - value: Uint8Array; -} -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccountAmino { - from_address: string; - to_address: string; - amount: CoinAmino[]; - end_time: string; - delayed: boolean; -} -export interface MsgCreateVestingAccountAminoMsg { - type: "cosmos-sdk/MsgCreateVestingAccount"; - value: MsgCreateVestingAccountAmino; -} -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreateVestingAccountSDKType { - from_address: string; - to_address: string; - amount: CoinSDKType[]; - end_time: bigint; - delayed: boolean; -} -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponse {} -export interface MsgCreateVestingAccountResponseProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse"; - value: Uint8Array; -} -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponseAmino {} -export interface MsgCreateVestingAccountResponseAminoMsg { - type: "cosmos-sdk/MsgCreateVestingAccountResponse"; - value: MsgCreateVestingAccountResponseAmino; -} -/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ -export interface MsgCreateVestingAccountResponseSDKType {} -/** - * MsgCreatePermanentLockedAccount defines a message that enables creating a permanent - * locked account. - */ -export interface MsgCreatePermanentLockedAccount { - fromAddress: string; - toAddress: string; - amount: Coin[]; -} -export interface MsgCreatePermanentLockedAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount"; - value: Uint8Array; -} -/** - * MsgCreatePermanentLockedAccount defines a message that enables creating a permanent - * locked account. - */ -export interface MsgCreatePermanentLockedAccountAmino { - from_address: string; - to_address: string; - amount: CoinAmino[]; -} -export interface MsgCreatePermanentLockedAccountAminoMsg { - type: "cosmos-sdk/MsgCreatePermanentLockedAccount"; - value: MsgCreatePermanentLockedAccountAmino; -} -/** - * MsgCreatePermanentLockedAccount defines a message that enables creating a permanent - * locked account. - */ -export interface MsgCreatePermanentLockedAccountSDKType { - from_address: string; - to_address: string; - amount: CoinSDKType[]; -} -/** MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. */ -export interface MsgCreatePermanentLockedAccountResponse {} -export interface MsgCreatePermanentLockedAccountResponseProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse"; - value: Uint8Array; -} -/** MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. */ -export interface MsgCreatePermanentLockedAccountResponseAmino {} -export interface MsgCreatePermanentLockedAccountResponseAminoMsg { - type: "cosmos-sdk/MsgCreatePermanentLockedAccountResponse"; - value: MsgCreatePermanentLockedAccountResponseAmino; -} -/** MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. */ -export interface MsgCreatePermanentLockedAccountResponseSDKType {} -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreatePeriodicVestingAccount { - fromAddress: string; - toAddress: string; - startTime: bigint; - vestingPeriods: Period[]; -} -export interface MsgCreatePeriodicVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount"; - value: Uint8Array; -} -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreatePeriodicVestingAccountAmino { - from_address: string; - to_address: string; - start_time: string; - vesting_periods: PeriodAmino[]; -} -export interface MsgCreatePeriodicVestingAccountAminoMsg { - type: "cosmos-sdk/MsgCreatePeriodicVestingAccount"; - value: MsgCreatePeriodicVestingAccountAmino; -} -/** - * MsgCreateVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreatePeriodicVestingAccountSDKType { - from_address: string; - to_address: string; - start_time: bigint; - vesting_periods: PeriodSDKType[]; -} -/** - * MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount - * response type. - */ -export interface MsgCreatePeriodicVestingAccountResponse {} -export interface MsgCreatePeriodicVestingAccountResponseProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse"; - value: Uint8Array; -} -/** - * MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount - * response type. - */ -export interface MsgCreatePeriodicVestingAccountResponseAmino {} -export interface MsgCreatePeriodicVestingAccountResponseAminoMsg { - type: "cosmos-sdk/MsgCreatePeriodicVestingAccountResponse"; - value: MsgCreatePeriodicVestingAccountResponseAmino; -} -/** - * MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount - * response type. - */ -export interface MsgCreatePeriodicVestingAccountResponseSDKType {} -function createBaseMsgCreateVestingAccount(): MsgCreateVestingAccount { - return { - fromAddress: "", - toAddress: "", - amount: [], - endTime: BigInt(0), - delayed: false - }; -} -export const MsgCreateVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - aminoType: "cosmos-sdk/MsgCreateVestingAccount", - encode(message: MsgCreateVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.endTime !== BigInt(0)) { - writer.uint32(32).int64(message.endTime); - } - if (message.delayed === true) { - writer.uint32(40).bool(message.delayed); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.endTime = reader.int64(); - break; - case 5: - message.delayed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateVestingAccount { - return { - fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "", - toAddress: isSet(object.toAddress) ? String(object.toAddress) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - endTime: isSet(object.endTime) ? BigInt(object.endTime.toString()) : BigInt(0), - delayed: isSet(object.delayed) ? Boolean(object.delayed) : false - }; - }, - toJSON(message: MsgCreateVestingAccount): unknown { - const obj: any = {}; - message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - message.endTime !== undefined && (obj.endTime = (message.endTime || BigInt(0)).toString()); - message.delayed !== undefined && (obj.delayed = message.delayed); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateVestingAccount { - const message = createBaseMsgCreateVestingAccount(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - message.endTime = object.endTime !== undefined && object.endTime !== null ? BigInt(object.endTime.toString()) : BigInt(0); - message.delayed = object.delayed ?? false; - return message; - }, - fromSDK(object: MsgCreateVestingAccountSDKType): MsgCreateVestingAccount { - return { - fromAddress: object?.from_address, - toAddress: object?.to_address, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [], - endTime: object?.end_time, - delayed: object?.delayed - }; - }, - toSDK(message: MsgCreateVestingAccount): MsgCreateVestingAccountSDKType { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - obj.end_time = message.endTime; - obj.delayed = message.delayed; - return obj; - }, - fromAmino(object: MsgCreateVestingAccountAmino): MsgCreateVestingAccount { - return { - fromAddress: object.from_address, - toAddress: object.to_address, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [], - endTime: BigInt(object.end_time), - delayed: object.delayed - }; - }, - toAmino(message: MsgCreateVestingAccount): MsgCreateVestingAccountAmino { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - obj.end_time = message.endTime ? message.endTime.toString() : undefined; - obj.delayed = message.delayed; - return obj; - }, - fromAminoMsg(object: MsgCreateVestingAccountAminoMsg): MsgCreateVestingAccount { - return MsgCreateVestingAccount.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateVestingAccount): MsgCreateVestingAccountAminoMsg { - return { - type: "cosmos-sdk/MsgCreateVestingAccount", - value: MsgCreateVestingAccount.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateVestingAccountProtoMsg): MsgCreateVestingAccount { - return MsgCreateVestingAccount.decode(message.value); - }, - toProto(message: MsgCreateVestingAccount): Uint8Array { - return MsgCreateVestingAccount.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateVestingAccount): MsgCreateVestingAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - value: MsgCreateVestingAccount.encode(message).finish() - }; - } -}; -function createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountResponse { - return {}; -} -export const MsgCreateVestingAccountResponse = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", - aminoType: "cosmos-sdk/MsgCreateVestingAccountResponse", - encode(_: MsgCreateVestingAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateVestingAccountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateVestingAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCreateVestingAccountResponse { - return {}; - }, - toJSON(_: MsgCreateVestingAccountResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCreateVestingAccountResponse { - const message = createBaseMsgCreateVestingAccountResponse(); - return message; - }, - fromSDK(_: MsgCreateVestingAccountResponseSDKType): MsgCreateVestingAccountResponse { - return {}; - }, - toSDK(_: MsgCreateVestingAccountResponse): MsgCreateVestingAccountResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCreateVestingAccountResponseAmino): MsgCreateVestingAccountResponse { - return {}; - }, - toAmino(_: MsgCreateVestingAccountResponse): MsgCreateVestingAccountResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCreateVestingAccountResponseAminoMsg): MsgCreateVestingAccountResponse { - return MsgCreateVestingAccountResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateVestingAccountResponse): MsgCreateVestingAccountResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreateVestingAccountResponse", - value: MsgCreateVestingAccountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateVestingAccountResponseProtoMsg): MsgCreateVestingAccountResponse { - return MsgCreateVestingAccountResponse.decode(message.value); - }, - toProto(message: MsgCreateVestingAccountResponse): Uint8Array { - return MsgCreateVestingAccountResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateVestingAccountResponse): MsgCreateVestingAccountResponseProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", - value: MsgCreateVestingAccountResponse.encode(message).finish() - }; - } -}; -function createBaseMsgCreatePermanentLockedAccount(): MsgCreatePermanentLockedAccount { - return { - fromAddress: "", - toAddress: "", - amount: [] - }; -} -export const MsgCreatePermanentLockedAccount = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - aminoType: "cosmos-sdk/MsgCreatePermanentLockedAccount", - encode(message: MsgCreatePermanentLockedAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreatePermanentLockedAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreatePermanentLockedAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreatePermanentLockedAccount { - return { - fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "", - toAddress: isSet(object.toAddress) ? String(object.toAddress) : "", - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgCreatePermanentLockedAccount): unknown { - const obj: any = {}; - message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgCreatePermanentLockedAccount { - const message = createBaseMsgCreatePermanentLockedAccount(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgCreatePermanentLockedAccountSDKType): MsgCreatePermanentLockedAccount { - return { - fromAddress: object?.from_address, - toAddress: object?.to_address, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountSDKType { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: MsgCreatePermanentLockedAccountAmino): MsgCreatePermanentLockedAccount { - return { - fromAddress: object.from_address, - toAddress: object.to_address, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountAmino { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: MsgCreatePermanentLockedAccountAminoMsg): MsgCreatePermanentLockedAccount { - return MsgCreatePermanentLockedAccount.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountAminoMsg { - return { - type: "cosmos-sdk/MsgCreatePermanentLockedAccount", - value: MsgCreatePermanentLockedAccount.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreatePermanentLockedAccountProtoMsg): MsgCreatePermanentLockedAccount { - return MsgCreatePermanentLockedAccount.decode(message.value); - }, - toProto(message: MsgCreatePermanentLockedAccount): Uint8Array { - return MsgCreatePermanentLockedAccount.encode(message).finish(); - }, - toProtoMsg(message: MsgCreatePermanentLockedAccount): MsgCreatePermanentLockedAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", - value: MsgCreatePermanentLockedAccount.encode(message).finish() - }; - } -}; -function createBaseMsgCreatePermanentLockedAccountResponse(): MsgCreatePermanentLockedAccountResponse { - return {}; -} -export const MsgCreatePermanentLockedAccountResponse = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", - aminoType: "cosmos-sdk/MsgCreatePermanentLockedAccountResponse", - encode(_: MsgCreatePermanentLockedAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreatePermanentLockedAccountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreatePermanentLockedAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCreatePermanentLockedAccountResponse { - return {}; - }, - toJSON(_: MsgCreatePermanentLockedAccountResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCreatePermanentLockedAccountResponse { - const message = createBaseMsgCreatePermanentLockedAccountResponse(); - return message; - }, - fromSDK(_: MsgCreatePermanentLockedAccountResponseSDKType): MsgCreatePermanentLockedAccountResponse { - return {}; - }, - toSDK(_: MsgCreatePermanentLockedAccountResponse): MsgCreatePermanentLockedAccountResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCreatePermanentLockedAccountResponseAmino): MsgCreatePermanentLockedAccountResponse { - return {}; - }, - toAmino(_: MsgCreatePermanentLockedAccountResponse): MsgCreatePermanentLockedAccountResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCreatePermanentLockedAccountResponseAminoMsg): MsgCreatePermanentLockedAccountResponse { - return MsgCreatePermanentLockedAccountResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreatePermanentLockedAccountResponse): MsgCreatePermanentLockedAccountResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreatePermanentLockedAccountResponse", - value: MsgCreatePermanentLockedAccountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreatePermanentLockedAccountResponseProtoMsg): MsgCreatePermanentLockedAccountResponse { - return MsgCreatePermanentLockedAccountResponse.decode(message.value); - }, - toProto(message: MsgCreatePermanentLockedAccountResponse): Uint8Array { - return MsgCreatePermanentLockedAccountResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreatePermanentLockedAccountResponse): MsgCreatePermanentLockedAccountResponseProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", - value: MsgCreatePermanentLockedAccountResponse.encode(message).finish() - }; - } -}; -function createBaseMsgCreatePeriodicVestingAccount(): MsgCreatePeriodicVestingAccount { - return { - fromAddress: "", - toAddress: "", - startTime: BigInt(0), - vestingPeriods: [] - }; -} -export const MsgCreatePeriodicVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - aminoType: "cosmos-sdk/MsgCreatePeriodicVestingAccount", - encode(message: MsgCreatePeriodicVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - if (message.startTime !== BigInt(0)) { - writer.uint32(24).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreatePeriodicVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreatePeriodicVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.startTime = reader.int64(); - break; - case 4: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreatePeriodicVestingAccount { - return { - fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "", - toAddress: isSet(object.toAddress) ? String(object.toAddress) : "", - startTime: isSet(object.startTime) ? BigInt(object.startTime.toString()) : BigInt(0), - vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e: any) => Period.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgCreatePeriodicVestingAccount): unknown { - const obj: any = {}; - message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - message.startTime !== undefined && (obj.startTime = (message.startTime || BigInt(0)).toString()); - if (message.vestingPeriods) { - obj.vestingPeriods = message.vestingPeriods.map(e => e ? Period.toJSON(e) : undefined); - } else { - obj.vestingPeriods = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgCreatePeriodicVestingAccount { - const message = createBaseMsgCreatePeriodicVestingAccount(); - message.fromAddress = object.fromAddress ?? ""; - message.toAddress = object.toAddress ?? ""; - message.startTime = object.startTime !== undefined && object.startTime !== null ? BigInt(object.startTime.toString()) : BigInt(0); - message.vestingPeriods = object.vestingPeriods?.map(e => Period.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgCreatePeriodicVestingAccountSDKType): MsgCreatePeriodicVestingAccount { - return { - fromAddress: object?.from_address, - toAddress: object?.to_address, - startTime: object?.start_time, - vestingPeriods: Array.isArray(object?.vesting_periods) ? object.vesting_periods.map((e: any) => Period.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountSDKType { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - obj.start_time = message.startTime; - if (message.vestingPeriods) { - obj.vesting_periods = message.vestingPeriods.map(e => e ? Period.toSDK(e) : undefined); - } else { - obj.vesting_periods = []; - } - return obj; - }, - fromAmino(object: MsgCreatePeriodicVestingAccountAmino): MsgCreatePeriodicVestingAccount { - return { - fromAddress: object.from_address, - toAddress: object.to_address, - startTime: BigInt(object.start_time), - vestingPeriods: Array.isArray(object?.vesting_periods) ? object.vesting_periods.map((e: any) => Period.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountAmino { - const obj: any = {}; - obj.from_address = message.fromAddress; - obj.to_address = message.toAddress; - obj.start_time = message.startTime ? message.startTime.toString() : undefined; - if (message.vestingPeriods) { - obj.vesting_periods = message.vestingPeriods.map(e => e ? Period.toAmino(e) : undefined); - } else { - obj.vesting_periods = []; - } - return obj; - }, - fromAminoMsg(object: MsgCreatePeriodicVestingAccountAminoMsg): MsgCreatePeriodicVestingAccount { - return MsgCreatePeriodicVestingAccount.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountAminoMsg { - return { - type: "cosmos-sdk/MsgCreatePeriodicVestingAccount", - value: MsgCreatePeriodicVestingAccount.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreatePeriodicVestingAccountProtoMsg): MsgCreatePeriodicVestingAccount { - return MsgCreatePeriodicVestingAccount.decode(message.value); - }, - toProto(message: MsgCreatePeriodicVestingAccount): Uint8Array { - return MsgCreatePeriodicVestingAccount.encode(message).finish(); - }, - toProtoMsg(message: MsgCreatePeriodicVestingAccount): MsgCreatePeriodicVestingAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", - value: MsgCreatePeriodicVestingAccount.encode(message).finish() - }; - } -}; -function createBaseMsgCreatePeriodicVestingAccountResponse(): MsgCreatePeriodicVestingAccountResponse { - return {}; -} -export const MsgCreatePeriodicVestingAccountResponse = { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", - aminoType: "cosmos-sdk/MsgCreatePeriodicVestingAccountResponse", - encode(_: MsgCreatePeriodicVestingAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreatePeriodicVestingAccountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreatePeriodicVestingAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCreatePeriodicVestingAccountResponse { - return {}; - }, - toJSON(_: MsgCreatePeriodicVestingAccountResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCreatePeriodicVestingAccountResponse { - const message = createBaseMsgCreatePeriodicVestingAccountResponse(); - return message; - }, - fromSDK(_: MsgCreatePeriodicVestingAccountResponseSDKType): MsgCreatePeriodicVestingAccountResponse { - return {}; - }, - toSDK(_: MsgCreatePeriodicVestingAccountResponse): MsgCreatePeriodicVestingAccountResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCreatePeriodicVestingAccountResponseAmino): MsgCreatePeriodicVestingAccountResponse { - return {}; - }, - toAmino(_: MsgCreatePeriodicVestingAccountResponse): MsgCreatePeriodicVestingAccountResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCreatePeriodicVestingAccountResponseAminoMsg): MsgCreatePeriodicVestingAccountResponse { - return MsgCreatePeriodicVestingAccountResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreatePeriodicVestingAccountResponse): MsgCreatePeriodicVestingAccountResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreatePeriodicVestingAccountResponse", - value: MsgCreatePeriodicVestingAccountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreatePeriodicVestingAccountResponseProtoMsg): MsgCreatePeriodicVestingAccountResponse { - return MsgCreatePeriodicVestingAccountResponse.decode(message.value); - }, - toProto(message: MsgCreatePeriodicVestingAccountResponse): Uint8Array { - return MsgCreatePeriodicVestingAccountResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreatePeriodicVestingAccountResponse): MsgCreatePeriodicVestingAccountResponseProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", - value: MsgCreatePeriodicVestingAccountResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/vesting.ts b/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/vesting.ts deleted file mode 100644 index 0d85477d..00000000 --- a/examples/interchainjs/src/codegen/cosmos/vesting/v1beta1/vesting.ts +++ /dev/null @@ -1,905 +0,0 @@ -import { BaseAccount, BaseAccountAmino, BaseAccountSDKType } from "../../auth/v1beta1/auth"; -import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccount { - baseAccount: BaseAccount | undefined; - originalVesting: Coin[]; - delegatedFree: Coin[]; - delegatedVesting: Coin[]; - endTime: bigint; -} -export interface BaseVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount"; - value: Uint8Array; -} -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccountAmino { - base_account?: BaseAccountAmino | undefined; - original_vesting: CoinAmino[]; - delegated_free: CoinAmino[]; - delegated_vesting: CoinAmino[]; - end_time: string; -} -export interface BaseVestingAccountAminoMsg { - type: "cosmos-sdk/BaseVestingAccount"; - value: BaseVestingAccountAmino; -} -/** - * BaseVestingAccount implements the VestingAccount interface. It contains all - * the necessary fields needed for any vesting account implementation. - */ -export interface BaseVestingAccountSDKType { - base_account: BaseAccountSDKType | undefined; - original_vesting: CoinSDKType[]; - delegated_free: CoinSDKType[]; - delegated_vesting: CoinSDKType[]; - end_time: bigint; -} -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: bigint; -} -export interface ContinuousVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount"; - value: Uint8Array; -} -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccountAmino { - base_vesting_account?: BaseVestingAccountAmino | undefined; - start_time: string; -} -export interface ContinuousVestingAccountAminoMsg { - type: "cosmos-sdk/ContinuousVestingAccount"; - value: ContinuousVestingAccountAmino; -} -/** - * ContinuousVestingAccount implements the VestingAccount interface. It - * continuously vests by unlocking coins linearly with respect to time. - */ -export interface ContinuousVestingAccountSDKType { - base_vesting_account: BaseVestingAccountSDKType | undefined; - start_time: bigint; -} -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; -} -export interface DelayedVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount"; - value: Uint8Array; -} -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccountAmino { - base_vesting_account?: BaseVestingAccountAmino | undefined; -} -export interface DelayedVestingAccountAminoMsg { - type: "cosmos-sdk/DelayedVestingAccount"; - value: DelayedVestingAccountAmino; -} -/** - * DelayedVestingAccount implements the VestingAccount interface. It vests all - * coins after a specific time, but non prior. In other words, it keeps them - * locked until a specified time. - */ -export interface DelayedVestingAccountSDKType { - base_vesting_account: BaseVestingAccountSDKType | undefined; -} -/** Period defines a length of time and amount of coins that will vest. */ -export interface Period { - length: bigint; - amount: Coin[]; -} -export interface PeriodProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.Period"; - value: Uint8Array; -} -/** Period defines a length of time and amount of coins that will vest. */ -export interface PeriodAmino { - length: string; - amount: CoinAmino[]; -} -export interface PeriodAminoMsg { - type: "cosmos-sdk/Period"; - value: PeriodAmino; -} -/** Period defines a length of time and amount of coins that will vest. */ -export interface PeriodSDKType { - length: bigint; - amount: CoinSDKType[]; -} -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccount { - baseVestingAccount: BaseVestingAccount | undefined; - startTime: bigint; - vestingPeriods: Period[]; -} -export interface PeriodicVestingAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount"; - value: Uint8Array; -} -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccountAmino { - base_vesting_account?: BaseVestingAccountAmino | undefined; - start_time: string; - vesting_periods: PeriodAmino[]; -} -export interface PeriodicVestingAccountAminoMsg { - type: "cosmos-sdk/PeriodicVestingAccount"; - value: PeriodicVestingAccountAmino; -} -/** - * PeriodicVestingAccount implements the VestingAccount interface. It - * periodically vests by unlocking coins during each specified period. - */ -export interface PeriodicVestingAccountSDKType { - base_vesting_account: BaseVestingAccountSDKType | undefined; - start_time: bigint; - vesting_periods: PeriodSDKType[]; -} -/** - * PermanentLockedAccount implements the VestingAccount interface. It does - * not ever release coins, locking them indefinitely. Coins in this account can - * still be used for delegating and for governance votes even while locked. - * - * Since: cosmos-sdk 0.43 - */ -export interface PermanentLockedAccount { - baseVestingAccount: BaseVestingAccount | undefined; -} -export interface PermanentLockedAccountProtoMsg { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount"; - value: Uint8Array; -} -/** - * PermanentLockedAccount implements the VestingAccount interface. It does - * not ever release coins, locking them indefinitely. Coins in this account can - * still be used for delegating and for governance votes even while locked. - * - * Since: cosmos-sdk 0.43 - */ -export interface PermanentLockedAccountAmino { - base_vesting_account?: BaseVestingAccountAmino | undefined; -} -export interface PermanentLockedAccountAminoMsg { - type: "cosmos-sdk/PermanentLockedAccount"; - value: PermanentLockedAccountAmino; -} -/** - * PermanentLockedAccount implements the VestingAccount interface. It does - * not ever release coins, locking them indefinitely. Coins in this account can - * still be used for delegating and for governance votes even while locked. - * - * Since: cosmos-sdk 0.43 - */ -export interface PermanentLockedAccountSDKType { - base_vesting_account: BaseVestingAccountSDKType | undefined; -} -function createBaseBaseVestingAccount(): BaseVestingAccount { - return { - baseAccount: BaseAccount.fromPartial({}), - originalVesting: [], - delegatedFree: [], - delegatedVesting: [], - endTime: BigInt(0) - }; -} -export const BaseVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", - aminoType: "cosmos-sdk/BaseVestingAccount", - encode(message: BaseVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseAccount !== undefined) { - BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.originalVesting) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.delegatedFree) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.delegatedVesting) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.endTime !== BigInt(0)) { - writer.uint32(40).int64(message.endTime); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BaseVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBaseVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.originalVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.delegatedFree.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.delegatedVesting.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BaseVestingAccount { - return { - baseAccount: isSet(object.baseAccount) ? BaseAccount.fromJSON(object.baseAccount) : undefined, - originalVesting: Array.isArray(object?.originalVesting) ? object.originalVesting.map((e: any) => Coin.fromJSON(e)) : [], - delegatedFree: Array.isArray(object?.delegatedFree) ? object.delegatedFree.map((e: any) => Coin.fromJSON(e)) : [], - delegatedVesting: Array.isArray(object?.delegatedVesting) ? object.delegatedVesting.map((e: any) => Coin.fromJSON(e)) : [], - endTime: isSet(object.endTime) ? BigInt(object.endTime.toString()) : BigInt(0) - }; - }, - toJSON(message: BaseVestingAccount): unknown { - const obj: any = {}; - message.baseAccount !== undefined && (obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined); - if (message.originalVesting) { - obj.originalVesting = message.originalVesting.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.originalVesting = []; - } - if (message.delegatedFree) { - obj.delegatedFree = message.delegatedFree.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.delegatedFree = []; - } - if (message.delegatedVesting) { - obj.delegatedVesting = message.delegatedVesting.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.delegatedVesting = []; - } - message.endTime !== undefined && (obj.endTime = (message.endTime || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): BaseVestingAccount { - const message = createBaseBaseVestingAccount(); - message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined; - message.originalVesting = object.originalVesting?.map(e => Coin.fromPartial(e)) || []; - message.delegatedFree = object.delegatedFree?.map(e => Coin.fromPartial(e)) || []; - message.delegatedVesting = object.delegatedVesting?.map(e => Coin.fromPartial(e)) || []; - message.endTime = object.endTime !== undefined && object.endTime !== null ? BigInt(object.endTime.toString()) : BigInt(0); - return message; - }, - fromSDK(object: BaseVestingAccountSDKType): BaseVestingAccount { - return { - baseAccount: object.base_account ? BaseAccount.fromSDK(object.base_account) : undefined, - originalVesting: Array.isArray(object?.original_vesting) ? object.original_vesting.map((e: any) => Coin.fromSDK(e)) : [], - delegatedFree: Array.isArray(object?.delegated_free) ? object.delegated_free.map((e: any) => Coin.fromSDK(e)) : [], - delegatedVesting: Array.isArray(object?.delegated_vesting) ? object.delegated_vesting.map((e: any) => Coin.fromSDK(e)) : [], - endTime: object?.end_time - }; - }, - toSDK(message: BaseVestingAccount): BaseVestingAccountSDKType { - const obj: any = {}; - message.baseAccount !== undefined && (obj.base_account = message.baseAccount ? BaseAccount.toSDK(message.baseAccount) : undefined); - if (message.originalVesting) { - obj.original_vesting = message.originalVesting.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.original_vesting = []; - } - if (message.delegatedFree) { - obj.delegated_free = message.delegatedFree.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.delegated_free = []; - } - if (message.delegatedVesting) { - obj.delegated_vesting = message.delegatedVesting.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.delegated_vesting = []; - } - obj.end_time = message.endTime; - return obj; - }, - fromAmino(object: BaseVestingAccountAmino): BaseVestingAccount { - return { - baseAccount: object?.base_account ? BaseAccount.fromAmino(object.base_account) : undefined, - originalVesting: Array.isArray(object?.original_vesting) ? object.original_vesting.map((e: any) => Coin.fromAmino(e)) : [], - delegatedFree: Array.isArray(object?.delegated_free) ? object.delegated_free.map((e: any) => Coin.fromAmino(e)) : [], - delegatedVesting: Array.isArray(object?.delegated_vesting) ? object.delegated_vesting.map((e: any) => Coin.fromAmino(e)) : [], - endTime: BigInt(object.end_time) - }; - }, - toAmino(message: BaseVestingAccount): BaseVestingAccountAmino { - const obj: any = {}; - obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount) : undefined; - if (message.originalVesting) { - obj.original_vesting = message.originalVesting.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.original_vesting = []; - } - if (message.delegatedFree) { - obj.delegated_free = message.delegatedFree.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.delegated_free = []; - } - if (message.delegatedVesting) { - obj.delegated_vesting = message.delegatedVesting.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.delegated_vesting = []; - } - obj.end_time = message.endTime ? message.endTime.toString() : undefined; - return obj; - }, - fromAminoMsg(object: BaseVestingAccountAminoMsg): BaseVestingAccount { - return BaseVestingAccount.fromAmino(object.value); - }, - toAminoMsg(message: BaseVestingAccount): BaseVestingAccountAminoMsg { - return { - type: "cosmos-sdk/BaseVestingAccount", - value: BaseVestingAccount.toAmino(message) - }; - }, - fromProtoMsg(message: BaseVestingAccountProtoMsg): BaseVestingAccount { - return BaseVestingAccount.decode(message.value); - }, - toProto(message: BaseVestingAccount): Uint8Array { - return BaseVestingAccount.encode(message).finish(); - }, - toProtoMsg(message: BaseVestingAccount): BaseVestingAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.BaseVestingAccount", - value: BaseVestingAccount.encode(message).finish() - }; - } -}; -function createBaseContinuousVestingAccount(): ContinuousVestingAccount { - return { - baseVestingAccount: BaseVestingAccount.fromPartial({}), - startTime: BigInt(0) - }; -} -export const ContinuousVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", - aminoType: "cosmos-sdk/ContinuousVestingAccount", - encode(message: ContinuousVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== BigInt(0)) { - writer.uint32(16).int64(message.startTime); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ContinuousVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContinuousVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ContinuousVestingAccount { - return { - baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined, - startTime: isSet(object.startTime) ? BigInt(object.startTime.toString()) : BigInt(0) - }; - }, - toJSON(message: ContinuousVestingAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : undefined); - message.startTime !== undefined && (obj.startTime = (message.startTime || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ContinuousVestingAccount { - const message = createBaseContinuousVestingAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - message.startTime = object.startTime !== undefined && object.startTime !== null ? BigInt(object.startTime.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ContinuousVestingAccountSDKType): ContinuousVestingAccount { - return { - baseVestingAccount: object.base_vesting_account ? BaseVestingAccount.fromSDK(object.base_vesting_account) : undefined, - startTime: object?.start_time - }; - }, - toSDK(message: ContinuousVestingAccount): ContinuousVestingAccountSDKType { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toSDK(message.baseVestingAccount) : undefined); - obj.start_time = message.startTime; - return obj; - }, - fromAmino(object: ContinuousVestingAccountAmino): ContinuousVestingAccount { - return { - baseVestingAccount: object?.base_vesting_account ? BaseVestingAccount.fromAmino(object.base_vesting_account) : undefined, - startTime: BigInt(object.start_time) - }; - }, - toAmino(message: ContinuousVestingAccount): ContinuousVestingAccountAmino { - const obj: any = {}; - obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : undefined; - obj.start_time = message.startTime ? message.startTime.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ContinuousVestingAccountAminoMsg): ContinuousVestingAccount { - return ContinuousVestingAccount.fromAmino(object.value); - }, - toAminoMsg(message: ContinuousVestingAccount): ContinuousVestingAccountAminoMsg { - return { - type: "cosmos-sdk/ContinuousVestingAccount", - value: ContinuousVestingAccount.toAmino(message) - }; - }, - fromProtoMsg(message: ContinuousVestingAccountProtoMsg): ContinuousVestingAccount { - return ContinuousVestingAccount.decode(message.value); - }, - toProto(message: ContinuousVestingAccount): Uint8Array { - return ContinuousVestingAccount.encode(message).finish(); - }, - toProtoMsg(message: ContinuousVestingAccount): ContinuousVestingAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.ContinuousVestingAccount", - value: ContinuousVestingAccount.encode(message).finish() - }; - } -}; -function createBaseDelayedVestingAccount(): DelayedVestingAccount { - return { - baseVestingAccount: BaseVestingAccount.fromPartial({}) - }; -} -export const DelayedVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", - aminoType: "cosmos-sdk/DelayedVestingAccount", - encode(message: DelayedVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DelayedVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelayedVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DelayedVestingAccount { - return { - baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined - }; - }, - toJSON(message: DelayedVestingAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DelayedVestingAccount { - const message = createBaseDelayedVestingAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - return message; - }, - fromSDK(object: DelayedVestingAccountSDKType): DelayedVestingAccount { - return { - baseVestingAccount: object.base_vesting_account ? BaseVestingAccount.fromSDK(object.base_vesting_account) : undefined - }; - }, - toSDK(message: DelayedVestingAccount): DelayedVestingAccountSDKType { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toSDK(message.baseVestingAccount) : undefined); - return obj; - }, - fromAmino(object: DelayedVestingAccountAmino): DelayedVestingAccount { - return { - baseVestingAccount: object?.base_vesting_account ? BaseVestingAccount.fromAmino(object.base_vesting_account) : undefined - }; - }, - toAmino(message: DelayedVestingAccount): DelayedVestingAccountAmino { - const obj: any = {}; - obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : undefined; - return obj; - }, - fromAminoMsg(object: DelayedVestingAccountAminoMsg): DelayedVestingAccount { - return DelayedVestingAccount.fromAmino(object.value); - }, - toAminoMsg(message: DelayedVestingAccount): DelayedVestingAccountAminoMsg { - return { - type: "cosmos-sdk/DelayedVestingAccount", - value: DelayedVestingAccount.toAmino(message) - }; - }, - fromProtoMsg(message: DelayedVestingAccountProtoMsg): DelayedVestingAccount { - return DelayedVestingAccount.decode(message.value); - }, - toProto(message: DelayedVestingAccount): Uint8Array { - return DelayedVestingAccount.encode(message).finish(); - }, - toProtoMsg(message: DelayedVestingAccount): DelayedVestingAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.DelayedVestingAccount", - value: DelayedVestingAccount.encode(message).finish() - }; - } -}; -function createBasePeriod(): Period { - return { - length: BigInt(0), - amount: [] - }; -} -export const Period = { - typeUrl: "/cosmos.vesting.v1beta1.Period", - aminoType: "cosmos-sdk/Period", - encode(message: Period, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.length !== BigInt(0)) { - writer.uint32(8).int64(message.length); - } - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Period { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeriod(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.length = reader.int64(); - break; - case 2: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Period { - return { - length: isSet(object.length) ? BigInt(object.length.toString()) : BigInt(0), - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Period): unknown { - const obj: any = {}; - message.length !== undefined && (obj.length = (message.length || BigInt(0)).toString()); - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Period { - const message = createBasePeriod(); - message.length = object.length !== undefined && object.length !== null ? BigInt(object.length.toString()) : BigInt(0); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: PeriodSDKType): Period { - return { - length: object?.length, - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Period): PeriodSDKType { - const obj: any = {}; - obj.length = message.length; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: PeriodAmino): Period { - return { - length: BigInt(object.length), - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Period): PeriodAmino { - const obj: any = {}; - obj.length = message.length ? message.length.toString() : undefined; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: PeriodAminoMsg): Period { - return Period.fromAmino(object.value); - }, - toAminoMsg(message: Period): PeriodAminoMsg { - return { - type: "cosmos-sdk/Period", - value: Period.toAmino(message) - }; - }, - fromProtoMsg(message: PeriodProtoMsg): Period { - return Period.decode(message.value); - }, - toProto(message: Period): Uint8Array { - return Period.encode(message).finish(); - }, - toProtoMsg(message: Period): PeriodProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.Period", - value: Period.encode(message).finish() - }; - } -}; -function createBasePeriodicVestingAccount(): PeriodicVestingAccount { - return { - baseVestingAccount: BaseVestingAccount.fromPartial({}), - startTime: BigInt(0), - vestingPeriods: [] - }; -} -export const PeriodicVestingAccount = { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", - aminoType: "cosmos-sdk/PeriodicVestingAccount", - encode(message: PeriodicVestingAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - if (message.startTime !== BigInt(0)) { - writer.uint32(16).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PeriodicVestingAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeriodicVestingAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = reader.int64(); - break; - case 3: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PeriodicVestingAccount { - return { - baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined, - startTime: isSet(object.startTime) ? BigInt(object.startTime.toString()) : BigInt(0), - vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e: any) => Period.fromJSON(e)) : [] - }; - }, - toJSON(message: PeriodicVestingAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : undefined); - message.startTime !== undefined && (obj.startTime = (message.startTime || BigInt(0)).toString()); - if (message.vestingPeriods) { - obj.vestingPeriods = message.vestingPeriods.map(e => e ? Period.toJSON(e) : undefined); - } else { - obj.vestingPeriods = []; - } - return obj; - }, - fromPartial(object: DeepPartial): PeriodicVestingAccount { - const message = createBasePeriodicVestingAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - message.startTime = object.startTime !== undefined && object.startTime !== null ? BigInt(object.startTime.toString()) : BigInt(0); - message.vestingPeriods = object.vestingPeriods?.map(e => Period.fromPartial(e)) || []; - return message; - }, - fromSDK(object: PeriodicVestingAccountSDKType): PeriodicVestingAccount { - return { - baseVestingAccount: object.base_vesting_account ? BaseVestingAccount.fromSDK(object.base_vesting_account) : undefined, - startTime: object?.start_time, - vestingPeriods: Array.isArray(object?.vesting_periods) ? object.vesting_periods.map((e: any) => Period.fromSDK(e)) : [] - }; - }, - toSDK(message: PeriodicVestingAccount): PeriodicVestingAccountSDKType { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toSDK(message.baseVestingAccount) : undefined); - obj.start_time = message.startTime; - if (message.vestingPeriods) { - obj.vesting_periods = message.vestingPeriods.map(e => e ? Period.toSDK(e) : undefined); - } else { - obj.vesting_periods = []; - } - return obj; - }, - fromAmino(object: PeriodicVestingAccountAmino): PeriodicVestingAccount { - return { - baseVestingAccount: object?.base_vesting_account ? BaseVestingAccount.fromAmino(object.base_vesting_account) : undefined, - startTime: BigInt(object.start_time), - vestingPeriods: Array.isArray(object?.vesting_periods) ? object.vesting_periods.map((e: any) => Period.fromAmino(e)) : [] - }; - }, - toAmino(message: PeriodicVestingAccount): PeriodicVestingAccountAmino { - const obj: any = {}; - obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : undefined; - obj.start_time = message.startTime ? message.startTime.toString() : undefined; - if (message.vestingPeriods) { - obj.vesting_periods = message.vestingPeriods.map(e => e ? Period.toAmino(e) : undefined); - } else { - obj.vesting_periods = []; - } - return obj; - }, - fromAminoMsg(object: PeriodicVestingAccountAminoMsg): PeriodicVestingAccount { - return PeriodicVestingAccount.fromAmino(object.value); - }, - toAminoMsg(message: PeriodicVestingAccount): PeriodicVestingAccountAminoMsg { - return { - type: "cosmos-sdk/PeriodicVestingAccount", - value: PeriodicVestingAccount.toAmino(message) - }; - }, - fromProtoMsg(message: PeriodicVestingAccountProtoMsg): PeriodicVestingAccount { - return PeriodicVestingAccount.decode(message.value); - }, - toProto(message: PeriodicVestingAccount): Uint8Array { - return PeriodicVestingAccount.encode(message).finish(); - }, - toProtoMsg(message: PeriodicVestingAccount): PeriodicVestingAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.PeriodicVestingAccount", - value: PeriodicVestingAccount.encode(message).finish() - }; - } -}; -function createBasePermanentLockedAccount(): PermanentLockedAccount { - return { - baseVestingAccount: BaseVestingAccount.fromPartial({}) - }; -} -export const PermanentLockedAccount = { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", - aminoType: "cosmos-sdk/PermanentLockedAccount", - encode(message: PermanentLockedAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseVestingAccount !== undefined) { - BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PermanentLockedAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePermanentLockedAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PermanentLockedAccount { - return { - baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined - }; - }, - toJSON(message: PermanentLockedAccount): unknown { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): PermanentLockedAccount { - const message = createBasePermanentLockedAccount(); - message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : undefined; - return message; - }, - fromSDK(object: PermanentLockedAccountSDKType): PermanentLockedAccount { - return { - baseVestingAccount: object.base_vesting_account ? BaseVestingAccount.fromSDK(object.base_vesting_account) : undefined - }; - }, - toSDK(message: PermanentLockedAccount): PermanentLockedAccountSDKType { - const obj: any = {}; - message.baseVestingAccount !== undefined && (obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toSDK(message.baseVestingAccount) : undefined); - return obj; - }, - fromAmino(object: PermanentLockedAccountAmino): PermanentLockedAccount { - return { - baseVestingAccount: object?.base_vesting_account ? BaseVestingAccount.fromAmino(object.base_vesting_account) : undefined - }; - }, - toAmino(message: PermanentLockedAccount): PermanentLockedAccountAmino { - const obj: any = {}; - obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : undefined; - return obj; - }, - fromAminoMsg(object: PermanentLockedAccountAminoMsg): PermanentLockedAccount { - return PermanentLockedAccount.fromAmino(object.value); - }, - toAminoMsg(message: PermanentLockedAccount): PermanentLockedAccountAminoMsg { - return { - type: "cosmos-sdk/PermanentLockedAccount", - value: PermanentLockedAccount.toAmino(message) - }; - }, - fromProtoMsg(message: PermanentLockedAccountProtoMsg): PermanentLockedAccount { - return PermanentLockedAccount.decode(message.value); - }, - toProto(message: PermanentLockedAccount): Uint8Array { - return PermanentLockedAccount.encode(message).finish(); - }, - toProtoMsg(message: PermanentLockedAccount): PermanentLockedAccountProtoMsg { - return { - typeUrl: "/cosmos.vesting.v1beta1.PermanentLockedAccount", - value: PermanentLockedAccount.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos_proto/bundle.ts b/examples/interchainjs/src/codegen/cosmos_proto/bundle.ts deleted file mode 100644 index fd490026..00000000 --- a/examples/interchainjs/src/codegen/cosmos_proto/bundle.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as _1 from "./cosmos"; -export const cosmos_proto = { - ..._1 -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmos_proto/cosmos.ts b/examples/interchainjs/src/codegen/cosmos_proto/cosmos.ts deleted file mode 100644 index 98ca78a2..00000000 --- a/examples/interchainjs/src/codegen/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,401 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../binary"; -import { isSet, DeepPartial } from "../helpers"; -export enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0, - SCALAR_TYPE_STRING = 1, - SCALAR_TYPE_BYTES = 2, - UNRECOGNIZED = -1, -} -export const ScalarTypeSDKType = ScalarType; -export const ScalarTypeAmino = ScalarType; -export function scalarTypeFromJSON(object: any): ScalarType { - switch (object) { - case 0: - case "SCALAR_TYPE_UNSPECIFIED": - return ScalarType.SCALAR_TYPE_UNSPECIFIED; - case 1: - case "SCALAR_TYPE_STRING": - return ScalarType.SCALAR_TYPE_STRING; - case 2: - case "SCALAR_TYPE_BYTES": - return ScalarType.SCALAR_TYPE_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return ScalarType.UNRECOGNIZED; - } -} -export function scalarTypeToJSON(object: ScalarType): string { - switch (object) { - case ScalarType.SCALAR_TYPE_UNSPECIFIED: - return "SCALAR_TYPE_UNSPECIFIED"; - case ScalarType.SCALAR_TYPE_STRING: - return "SCALAR_TYPE_STRING"; - case ScalarType.SCALAR_TYPE_BYTES: - return "SCALAR_TYPE_BYTES"; - case ScalarType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * InterfaceDescriptor describes an interface type to be used with - * accepts_interface and implements_interface and declared by declare_interface. - */ -export interface InterfaceDescriptor { - /** - * name is the name of the interface. It should be a short-name (without - * a period) such that the fully qualified name of the interface will be - * package.name, ex. for the package a.b and interface named C, the - * fully-qualified name will be a.b.C. - */ - name: string; - /** - * description is a human-readable description of the interface and its - * purpose. - */ - description: string; -} -export interface InterfaceDescriptorProtoMsg { - typeUrl: "/cosmos_proto.InterfaceDescriptor"; - value: Uint8Array; -} -/** - * InterfaceDescriptor describes an interface type to be used with - * accepts_interface and implements_interface and declared by declare_interface. - */ -export interface InterfaceDescriptorAmino { - /** - * name is the name of the interface. It should be a short-name (without - * a period) such that the fully qualified name of the interface will be - * package.name, ex. for the package a.b and interface named C, the - * fully-qualified name will be a.b.C. - */ - name: string; - /** - * description is a human-readable description of the interface and its - * purpose. - */ - description: string; -} -export interface InterfaceDescriptorAminoMsg { - type: "/cosmos_proto.InterfaceDescriptor"; - value: InterfaceDescriptorAmino; -} -/** - * InterfaceDescriptor describes an interface type to be used with - * accepts_interface and implements_interface and declared by declare_interface. - */ -export interface InterfaceDescriptorSDKType { - name: string; - description: string; -} -/** - * ScalarDescriptor describes an scalar type to be used with - * the scalar field option and declared by declare_scalar. - * Scalars extend simple protobuf built-in types with additional - * syntax and semantics, for instance to represent big integers. - * Scalars should ideally define an encoding such that there is only one - * valid syntactical representation for a given semantic meaning, - * i.e. the encoding should be deterministic. - */ -export interface ScalarDescriptor { - /** - * name is the name of the scalar. It should be a short-name (without - * a period) such that the fully qualified name of the scalar will be - * package.name, ex. for the package a.b and scalar named C, the - * fully-qualified name will be a.b.C. - */ - name: string; - /** - * description is a human-readable description of the scalar and its - * encoding format. For instance a big integer or decimal scalar should - * specify precisely the expected encoding format. - */ - description: string; - /** - * field_type is the type of field with which this scalar can be used. - * Scalars can be used with one and only one type of field so that - * encoding standards and simple and clear. Currently only string and - * bytes fields are supported for scalars. - */ - fieldType: ScalarType[]; -} -export interface ScalarDescriptorProtoMsg { - typeUrl: "/cosmos_proto.ScalarDescriptor"; - value: Uint8Array; -} -/** - * ScalarDescriptor describes an scalar type to be used with - * the scalar field option and declared by declare_scalar. - * Scalars extend simple protobuf built-in types with additional - * syntax and semantics, for instance to represent big integers. - * Scalars should ideally define an encoding such that there is only one - * valid syntactical representation for a given semantic meaning, - * i.e. the encoding should be deterministic. - */ -export interface ScalarDescriptorAmino { - /** - * name is the name of the scalar. It should be a short-name (without - * a period) such that the fully qualified name of the scalar will be - * package.name, ex. for the package a.b and scalar named C, the - * fully-qualified name will be a.b.C. - */ - name: string; - /** - * description is a human-readable description of the scalar and its - * encoding format. For instance a big integer or decimal scalar should - * specify precisely the expected encoding format. - */ - description: string; - /** - * field_type is the type of field with which this scalar can be used. - * Scalars can be used with one and only one type of field so that - * encoding standards and simple and clear. Currently only string and - * bytes fields are supported for scalars. - */ - field_type: ScalarType[]; -} -export interface ScalarDescriptorAminoMsg { - type: "/cosmos_proto.ScalarDescriptor"; - value: ScalarDescriptorAmino; -} -/** - * ScalarDescriptor describes an scalar type to be used with - * the scalar field option and declared by declare_scalar. - * Scalars extend simple protobuf built-in types with additional - * syntax and semantics, for instance to represent big integers. - * Scalars should ideally define an encoding such that there is only one - * valid syntactical representation for a given semantic meaning, - * i.e. the encoding should be deterministic. - */ -export interface ScalarDescriptorSDKType { - name: string; - description: string; - field_type: ScalarType[]; -} -function createBaseInterfaceDescriptor(): InterfaceDescriptor { - return { - name: "", - description: "" - }; -} -export const InterfaceDescriptor = { - typeUrl: "/cosmos_proto.InterfaceDescriptor", - encode(message: InterfaceDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InterfaceDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInterfaceDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InterfaceDescriptor { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "" - }; - }, - toJSON(message: InterfaceDescriptor): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - fromPartial(object: DeepPartial): InterfaceDescriptor { - const message = createBaseInterfaceDescriptor(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; - return message; - }, - fromSDK(object: InterfaceDescriptorSDKType): InterfaceDescriptor { - return { - name: object?.name, - description: object?.description - }; - }, - toSDK(message: InterfaceDescriptor): InterfaceDescriptorSDKType { - const obj: any = {}; - obj.name = message.name; - obj.description = message.description; - return obj; - }, - fromAmino(object: InterfaceDescriptorAmino): InterfaceDescriptor { - return { - name: object.name, - description: object.description - }; - }, - toAmino(message: InterfaceDescriptor): InterfaceDescriptorAmino { - const obj: any = {}; - obj.name = message.name; - obj.description = message.description; - return obj; - }, - fromAminoMsg(object: InterfaceDescriptorAminoMsg): InterfaceDescriptor { - return InterfaceDescriptor.fromAmino(object.value); - }, - fromProtoMsg(message: InterfaceDescriptorProtoMsg): InterfaceDescriptor { - return InterfaceDescriptor.decode(message.value); - }, - toProto(message: InterfaceDescriptor): Uint8Array { - return InterfaceDescriptor.encode(message).finish(); - }, - toProtoMsg(message: InterfaceDescriptor): InterfaceDescriptorProtoMsg { - return { - typeUrl: "/cosmos_proto.InterfaceDescriptor", - value: InterfaceDescriptor.encode(message).finish() - }; - } -}; -function createBaseScalarDescriptor(): ScalarDescriptor { - return { - name: "", - description: "", - fieldType: [] - }; -} -export const ScalarDescriptor = { - typeUrl: "/cosmos_proto.ScalarDescriptor", - encode(message: ScalarDescriptor, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.fieldType) { - writer.int32(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ScalarDescriptor { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScalarDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.fieldType.push((reader.int32() as any)); - } - } else { - message.fieldType.push((reader.int32() as any)); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ScalarDescriptor { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "", - fieldType: Array.isArray(object?.fieldType) ? object.fieldType.map((e: any) => scalarTypeFromJSON(e)) : [] - }; - }, - toJSON(message: ScalarDescriptor): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - if (message.fieldType) { - obj.fieldType = message.fieldType.map(e => scalarTypeToJSON(e)); - } else { - obj.fieldType = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ScalarDescriptor { - const message = createBaseScalarDescriptor(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; - message.fieldType = object.fieldType?.map(e => e) || []; - return message; - }, - fromSDK(object: ScalarDescriptorSDKType): ScalarDescriptor { - return { - name: object?.name, - description: object?.description, - fieldType: Array.isArray(object?.field_type) ? object.field_type.map((e: any) => scalarTypeFromJSON(e)) : [] - }; - }, - toSDK(message: ScalarDescriptor): ScalarDescriptorSDKType { - const obj: any = {}; - obj.name = message.name; - obj.description = message.description; - if (message.fieldType) { - obj.field_type = message.fieldType.map(e => scalarTypeToJSON(e)); - } else { - obj.field_type = []; - } - return obj; - }, - fromAmino(object: ScalarDescriptorAmino): ScalarDescriptor { - return { - name: object.name, - description: object.description, - fieldType: Array.isArray(object?.field_type) ? object.field_type.map((e: any) => scalarTypeFromJSON(e)) : [] - }; - }, - toAmino(message: ScalarDescriptor): ScalarDescriptorAmino { - const obj: any = {}; - obj.name = message.name; - obj.description = message.description; - if (message.fieldType) { - obj.field_type = message.fieldType.map(e => scalarTypeToJSON(e)); - } else { - obj.field_type = []; - } - return obj; - }, - fromAminoMsg(object: ScalarDescriptorAminoMsg): ScalarDescriptor { - return ScalarDescriptor.fromAmino(object.value); - }, - fromProtoMsg(message: ScalarDescriptorProtoMsg): ScalarDescriptor { - return ScalarDescriptor.decode(message.value); - }, - toProto(message: ScalarDescriptor): Uint8Array { - return ScalarDescriptor.encode(message).finish(); - }, - toProtoMsg(message: ScalarDescriptor): ScalarDescriptorProtoMsg { - return { - typeUrl: "/cosmos_proto.ScalarDescriptor", - value: ScalarDescriptor.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/bundle.ts b/examples/interchainjs/src/codegen/cosmwasm/bundle.ts deleted file mode 100644 index 6ee41a07..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/bundle.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as _94 from "./wasm/v1/genesis"; -import * as _95 from "./wasm/v1/ibc"; -import * as _96 from "./wasm/v1/proposal"; -import * as _97 from "./wasm/v1/query"; -import * as _98 from "./wasm/v1/tx"; -import * as _99 from "./wasm/v1/types"; -import * as _254 from "./wasm/v1/tx.amino"; -import * as _255 from "./wasm/v1/tx.registry"; -import * as _256 from "./wasm/v1/query.rpc.Query"; -import * as _257 from "./wasm/v1/tx.rpc.msg"; -import * as _311 from "./rpc.query"; -import * as _312 from "./rpc.tx"; -export namespace cosmwasm { - export namespace wasm { - export const v1 = { - ..._94, - ..._95, - ..._96, - ..._97, - ..._98, - ..._99, - ..._254, - ..._255, - ..._256, - ..._257 - }; - } - export const ClientFactory = { - ..._311, - ..._312 - }; -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/client.ts b/examples/interchainjs/src/codegen/cosmwasm/client.ts deleted file mode 100644 index 1b6196fc..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/client.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as cosmwasmWasmV1TxRegistry from "./wasm/v1/tx.registry"; -import * as cosmwasmWasmV1TxAmino from "./wasm/v1/tx.amino"; -export const cosmwasmAminoConverters = { - ...cosmwasmWasmV1TxAmino.AminoConverter -}; -export const cosmwasmProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...cosmwasmWasmV1TxRegistry.registry]; -export const getSigningCosmwasmClientOptions = ({ - defaultTypes = defaultRegistryTypes -}: { - defaultTypes?: ReadonlyArray<[string, GeneratedType]>; -} = {}): { - registry: Registry; - aminoTypes: AminoTypes; -} => { - const registry = new Registry([...defaultTypes, ...cosmwasmProtoRegistry]); - const aminoTypes = new AminoTypes({ - ...cosmwasmAminoConverters - }); - return { - registry, - aminoTypes - }; -}; -export const getSigningCosmwasmClient = async ({ - rpcEndpoint, - signer, - defaultTypes = defaultRegistryTypes -}: { - rpcEndpoint: string | HttpEndpoint; - signer: OfflineSigner; - defaultTypes?: ReadonlyArray<[string, GeneratedType]>; -}) => { - const { - registry, - aminoTypes - } = getSigningCosmwasmClientOptions({ - defaultTypes - }); - const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry: (registry as any), - aminoTypes - }); - return client; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/rpc.query.ts b/examples/interchainjs/src/codegen/cosmwasm/rpc.query.ts deleted file mode 100644 index 8fa98029..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/rpc.query.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import { QueryClient } from "@cosmjs/stargate"; -export const createRPCQueryClient = async ({ - rpcEndpoint -}: { - rpcEndpoint: string | HttpEndpoint; -}) => { - const tmClient = await Tendermint34Client.connect(rpcEndpoint); - const client = new QueryClient(tmClient); - return { - cosmos: { - app: { - v1alpha1: (await import("../cosmos/app/v1alpha1/query.rpc.Query")).createRpcQueryExtension(client) - }, - auth: { - v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - authz: { - v1beta1: (await import("../cosmos/authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - bank: { - v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - base: { - tendermint: { - v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) - } - }, - distribution: { - v1beta1: (await import("../cosmos/distribution/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - evidence: { - v1beta1: (await import("../cosmos/evidence/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - feegrant: { - v1beta1: (await import("../cosmos/feegrant/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - gov: { - v1: (await import("../cosmos/gov/v1/query.rpc.Query")).createRpcQueryExtension(client), - v1beta1: (await import("../cosmos/gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - group: { - v1: (await import("../cosmos/group/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - mint: { - v1beta1: (await import("../cosmos/mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - nft: { - v1beta1: (await import("../cosmos/nft/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - params: { - v1beta1: (await import("../cosmos/params/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - slashing: { - v1beta1: (await import("../cosmos/slashing/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - staking: { - v1beta1: (await import("../cosmos/staking/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - tx: { - v1beta1: (await import("../cosmos/tx/v1beta1/service.rpc.Service")).createRpcQueryExtension(client) - }, - upgrade: { - v1beta1: (await import("../cosmos/upgrade/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - } - }, - cosmwasm: { - wasm: { - v1: (await import("./wasm/v1/query.rpc.Query")).createRpcQueryExtension(client) - } - } - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/rpc.tx.ts b/examples/interchainjs/src/codegen/cosmwasm/rpc.tx.ts deleted file mode 100644 index e0ff07d4..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/rpc.tx.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Rpc } from "../helpers"; -export const createRPCMsgClient = async ({ - rpc -}: { - rpc: Rpc; -}) => ({ - cosmos: { - authz: { - v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - bank: { - v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - crisis: { - v1beta1: new (await import("../cosmos/crisis/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - distribution: { - v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - evidence: { - v1beta1: new (await import("../cosmos/evidence/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - feegrant: { - v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - gov: { - v1: new (await import("../cosmos/gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - group: { - v1: new (await import("../cosmos/group/v1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - nft: { - v1beta1: new (await import("../cosmos/nft/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - slashing: { - v1beta1: new (await import("../cosmos/slashing/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - staking: { - v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - upgrade: { - v1beta1: new (await import("../cosmos/upgrade/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - vesting: { - v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - } - }, - cosmwasm: { - wasm: { - v1: new (await import("./wasm/v1/tx.rpc.msg")).MsgClientImpl(rpc) - } - } -}); \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/genesis.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/genesis.ts deleted file mode 100644 index a9f27e62..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/genesis.ts +++ /dev/null @@ -1,819 +0,0 @@ -import { MsgStoreCode, MsgStoreCodeAmino, MsgStoreCodeSDKType, MsgInstantiateContract, MsgInstantiateContractAmino, MsgInstantiateContractSDKType, MsgExecuteContract, MsgExecuteContractAmino, MsgExecuteContractSDKType } from "./tx"; -import { Params, ParamsAmino, ParamsSDKType, CodeInfo, CodeInfoAmino, CodeInfoSDKType, ContractInfo, ContractInfoAmino, ContractInfoSDKType, Model, ModelAmino, ModelSDKType } from "./types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** GenesisState - genesis state of x/wasm */ -export interface GenesisState { - params: Params | undefined; - codes: Code[]; - contracts: Contract[]; - sequences: Sequence[]; - genMsgs: GenesisState_GenMsgs[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState - genesis state of x/wasm */ -export interface GenesisStateAmino { - params?: ParamsAmino | undefined; - codes: CodeAmino[]; - contracts: ContractAmino[]; - sequences: SequenceAmino[]; - gen_msgs: GenesisState_GenMsgsAmino[]; -} -export interface GenesisStateAminoMsg { - type: "wasm/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState - genesis state of x/wasm */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - codes: CodeSDKType[]; - contracts: ContractSDKType[]; - sequences: SequenceSDKType[]; - gen_msgs: GenesisState_GenMsgsSDKType[]; -} -/** - * GenMsgs define the messages that can be executed during genesis phase in - * order. The intention is to have more human readable data that is auditable. - */ -export interface GenesisState_GenMsgs { - storeCode?: MsgStoreCode | undefined; - instantiateContract?: MsgInstantiateContract | undefined; - executeContract?: MsgExecuteContract | undefined; -} -export interface GenesisState_GenMsgsProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.GenMsgs"; - value: Uint8Array; -} -/** - * GenMsgs define the messages that can be executed during genesis phase in - * order. The intention is to have more human readable data that is auditable. - */ -export interface GenesisState_GenMsgsAmino { - store_code?: MsgStoreCodeAmino | undefined; - instantiate_contract?: MsgInstantiateContractAmino | undefined; - execute_contract?: MsgExecuteContractAmino | undefined; -} -export interface GenesisState_GenMsgsAminoMsg { - type: "wasm/GenMsgs"; - value: GenesisState_GenMsgsAmino; -} -/** - * GenMsgs define the messages that can be executed during genesis phase in - * order. The intention is to have more human readable data that is auditable. - */ -export interface GenesisState_GenMsgsSDKType { - store_code?: MsgStoreCodeSDKType | undefined; - instantiate_contract?: MsgInstantiateContractSDKType | undefined; - execute_contract?: MsgExecuteContractSDKType | undefined; -} -/** Code struct encompasses CodeInfo and CodeBytes */ -export interface Code { - codeId: bigint; - codeInfo: CodeInfo | undefined; - codeBytes: Uint8Array; - /** Pinned to wasmvm cache */ - pinned: boolean; -} -export interface CodeProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Code"; - value: Uint8Array; -} -/** Code struct encompasses CodeInfo and CodeBytes */ -export interface CodeAmino { - code_id: string; - code_info?: CodeInfoAmino | undefined; - code_bytes: Uint8Array; - /** Pinned to wasmvm cache */ - pinned: boolean; -} -export interface CodeAminoMsg { - type: "wasm/Code"; - value: CodeAmino; -} -/** Code struct encompasses CodeInfo and CodeBytes */ -export interface CodeSDKType { - code_id: bigint; - code_info: CodeInfoSDKType | undefined; - code_bytes: Uint8Array; - pinned: boolean; -} -/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ -export interface Contract { - contractAddress: string; - contractInfo: ContractInfo | undefined; - contractState: Model[]; -} -export interface ContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Contract"; - value: Uint8Array; -} -/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ -export interface ContractAmino { - contract_address: string; - contract_info?: ContractInfoAmino | undefined; - contract_state: ModelAmino[]; -} -export interface ContractAminoMsg { - type: "wasm/Contract"; - value: ContractAmino; -} -/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ -export interface ContractSDKType { - contract_address: string; - contract_info: ContractInfoSDKType | undefined; - contract_state: ModelSDKType[]; -} -/** Sequence key and value of an id generation counter */ -export interface Sequence { - idKey: Uint8Array; - value: bigint; -} -export interface SequenceProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Sequence"; - value: Uint8Array; -} -/** Sequence key and value of an id generation counter */ -export interface SequenceAmino { - id_key: Uint8Array; - value: string; -} -export interface SequenceAminoMsg { - type: "wasm/Sequence"; - value: SequenceAmino; -} -/** Sequence key and value of an id generation counter */ -export interface SequenceSDKType { - id_key: Uint8Array; - value: bigint; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - codes: [], - contracts: [], - sequences: [], - genMsgs: [] - }; -} -export const GenesisState = { - typeUrl: "/cosmwasm.wasm.v1.GenesisState", - aminoType: "wasm/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.codes) { - Code.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contracts) { - Contract.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.sequences) { - Sequence.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.genMsgs) { - GenesisState_GenMsgs.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.codes.push(Code.decode(reader, reader.uint32())); - break; - case 3: - message.contracts.push(Contract.decode(reader, reader.uint32())); - break; - case 4: - message.sequences.push(Sequence.decode(reader, reader.uint32())); - break; - case 5: - message.genMsgs.push(GenesisState_GenMsgs.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - codes: Array.isArray(object?.codes) ? object.codes.map((e: any) => Code.fromJSON(e)) : [], - contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => Contract.fromJSON(e)) : [], - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Sequence.fromJSON(e)) : [], - genMsgs: Array.isArray(object?.genMsgs) ? object.genMsgs.map((e: any) => GenesisState_GenMsgs.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.codes) { - obj.codes = message.codes.map(e => e ? Code.toJSON(e) : undefined); - } else { - obj.codes = []; - } - if (message.contracts) { - obj.contracts = message.contracts.map(e => e ? Contract.toJSON(e) : undefined); - } else { - obj.contracts = []; - } - if (message.sequences) { - obj.sequences = message.sequences.map(e => e ? Sequence.toJSON(e) : undefined); - } else { - obj.sequences = []; - } - if (message.genMsgs) { - obj.genMsgs = message.genMsgs.map(e => e ? GenesisState_GenMsgs.toJSON(e) : undefined); - } else { - obj.genMsgs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.codes = object.codes?.map(e => Code.fromPartial(e)) || []; - message.contracts = object.contracts?.map(e => Contract.fromPartial(e)) || []; - message.sequences = object.sequences?.map(e => Sequence.fromPartial(e)) || []; - message.genMsgs = object.genMsgs?.map(e => GenesisState_GenMsgs.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - codes: Array.isArray(object?.codes) ? object.codes.map((e: any) => Code.fromSDK(e)) : [], - contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => Contract.fromSDK(e)) : [], - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Sequence.fromSDK(e)) : [], - genMsgs: Array.isArray(object?.gen_msgs) ? object.gen_msgs.map((e: any) => GenesisState_GenMsgs.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.codes) { - obj.codes = message.codes.map(e => e ? Code.toSDK(e) : undefined); - } else { - obj.codes = []; - } - if (message.contracts) { - obj.contracts = message.contracts.map(e => e ? Contract.toSDK(e) : undefined); - } else { - obj.contracts = []; - } - if (message.sequences) { - obj.sequences = message.sequences.map(e => e ? Sequence.toSDK(e) : undefined); - } else { - obj.sequences = []; - } - if (message.genMsgs) { - obj.gen_msgs = message.genMsgs.map(e => e ? GenesisState_GenMsgs.toSDK(e) : undefined); - } else { - obj.gen_msgs = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - codes: Array.isArray(object?.codes) ? object.codes.map((e: any) => Code.fromAmino(e)) : [], - contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => Contract.fromAmino(e)) : [], - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Sequence.fromAmino(e)) : [], - genMsgs: Array.isArray(object?.gen_msgs) ? object.gen_msgs.map((e: any) => GenesisState_GenMsgs.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.codes) { - obj.codes = message.codes.map(e => e ? Code.toAmino(e) : undefined); - } else { - obj.codes = []; - } - if (message.contracts) { - obj.contracts = message.contracts.map(e => e ? Contract.toAmino(e) : undefined); - } else { - obj.contracts = []; - } - if (message.sequences) { - obj.sequences = message.sequences.map(e => e ? Sequence.toAmino(e) : undefined); - } else { - obj.sequences = []; - } - if (message.genMsgs) { - obj.gen_msgs = message.genMsgs.map(e => e ? GenesisState_GenMsgs.toAmino(e) : undefined); - } else { - obj.gen_msgs = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "wasm/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseGenesisState_GenMsgs(): GenesisState_GenMsgs { - return { - storeCode: undefined, - instantiateContract: undefined, - executeContract: undefined - }; -} -export const GenesisState_GenMsgs = { - typeUrl: "/cosmwasm.wasm.v1.GenMsgs", - aminoType: "wasm/GenMsgs", - encode(message: GenesisState_GenMsgs, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.storeCode !== undefined) { - MsgStoreCode.encode(message.storeCode, writer.uint32(10).fork()).ldelim(); - } - if (message.instantiateContract !== undefined) { - MsgInstantiateContract.encode(message.instantiateContract, writer.uint32(18).fork()).ldelim(); - } - if (message.executeContract !== undefined) { - MsgExecuteContract.encode(message.executeContract, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState_GenMsgs { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState_GenMsgs(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.storeCode = MsgStoreCode.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateContract = MsgInstantiateContract.decode(reader, reader.uint32()); - break; - case 3: - message.executeContract = MsgExecuteContract.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState_GenMsgs { - return { - storeCode: isSet(object.storeCode) ? MsgStoreCode.fromJSON(object.storeCode) : undefined, - instantiateContract: isSet(object.instantiateContract) ? MsgInstantiateContract.fromJSON(object.instantiateContract) : undefined, - executeContract: isSet(object.executeContract) ? MsgExecuteContract.fromJSON(object.executeContract) : undefined - }; - }, - toJSON(message: GenesisState_GenMsgs): unknown { - const obj: any = {}; - message.storeCode !== undefined && (obj.storeCode = message.storeCode ? MsgStoreCode.toJSON(message.storeCode) : undefined); - message.instantiateContract !== undefined && (obj.instantiateContract = message.instantiateContract ? MsgInstantiateContract.toJSON(message.instantiateContract) : undefined); - message.executeContract !== undefined && (obj.executeContract = message.executeContract ? MsgExecuteContract.toJSON(message.executeContract) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState_GenMsgs { - const message = createBaseGenesisState_GenMsgs(); - message.storeCode = object.storeCode !== undefined && object.storeCode !== null ? MsgStoreCode.fromPartial(object.storeCode) : undefined; - message.instantiateContract = object.instantiateContract !== undefined && object.instantiateContract !== null ? MsgInstantiateContract.fromPartial(object.instantiateContract) : undefined; - message.executeContract = object.executeContract !== undefined && object.executeContract !== null ? MsgExecuteContract.fromPartial(object.executeContract) : undefined; - return message; - }, - fromSDK(object: GenesisState_GenMsgsSDKType): GenesisState_GenMsgs { - return { - storeCode: object.store_code ? MsgStoreCode.fromSDK(object.store_code) : undefined, - instantiateContract: object.instantiate_contract ? MsgInstantiateContract.fromSDK(object.instantiate_contract) : undefined, - executeContract: object.execute_contract ? MsgExecuteContract.fromSDK(object.execute_contract) : undefined - }; - }, - toSDK(message: GenesisState_GenMsgs): GenesisState_GenMsgsSDKType { - const obj: any = {}; - message.storeCode !== undefined && (obj.store_code = message.storeCode ? MsgStoreCode.toSDK(message.storeCode) : undefined); - message.instantiateContract !== undefined && (obj.instantiate_contract = message.instantiateContract ? MsgInstantiateContract.toSDK(message.instantiateContract) : undefined); - message.executeContract !== undefined && (obj.execute_contract = message.executeContract ? MsgExecuteContract.toSDK(message.executeContract) : undefined); - return obj; - }, - fromAmino(object: GenesisState_GenMsgsAmino): GenesisState_GenMsgs { - return { - storeCode: object?.store_code ? MsgStoreCode.fromAmino(object.store_code) : undefined, - instantiateContract: object?.instantiate_contract ? MsgInstantiateContract.fromAmino(object.instantiate_contract) : undefined, - executeContract: object?.execute_contract ? MsgExecuteContract.fromAmino(object.execute_contract) : undefined - }; - }, - toAmino(message: GenesisState_GenMsgs): GenesisState_GenMsgsAmino { - const obj: any = {}; - obj.store_code = message.storeCode ? MsgStoreCode.toAmino(message.storeCode) : undefined; - obj.instantiate_contract = message.instantiateContract ? MsgInstantiateContract.toAmino(message.instantiateContract) : undefined; - obj.execute_contract = message.executeContract ? MsgExecuteContract.toAmino(message.executeContract) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisState_GenMsgsAminoMsg): GenesisState_GenMsgs { - return GenesisState_GenMsgs.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState_GenMsgs): GenesisState_GenMsgsAminoMsg { - return { - type: "wasm/GenMsgs", - value: GenesisState_GenMsgs.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisState_GenMsgsProtoMsg): GenesisState_GenMsgs { - return GenesisState_GenMsgs.decode(message.value); - }, - toProto(message: GenesisState_GenMsgs): Uint8Array { - return GenesisState_GenMsgs.encode(message).finish(); - }, - toProtoMsg(message: GenesisState_GenMsgs): GenesisState_GenMsgsProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.GenMsgs", - value: GenesisState_GenMsgs.encode(message).finish() - }; - } -}; -function createBaseCode(): Code { - return { - codeId: BigInt(0), - codeInfo: CodeInfo.fromPartial({}), - codeBytes: new Uint8Array(), - pinned: false - }; -} -export const Code = { - typeUrl: "/cosmwasm.wasm.v1.Code", - aminoType: "wasm/Code", - encode(message: Code, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - if (message.codeInfo !== undefined) { - CodeInfo.encode(message.codeInfo, writer.uint32(18).fork()).ldelim(); - } - if (message.codeBytes.length !== 0) { - writer.uint32(26).bytes(message.codeBytes); - } - if (message.pinned === true) { - writer.uint32(32).bool(message.pinned); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Code { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.codeInfo = CodeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.codeBytes = reader.bytes(); - break; - case 4: - message.pinned = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Code { - return { - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - codeInfo: isSet(object.codeInfo) ? CodeInfo.fromJSON(object.codeInfo) : undefined, - codeBytes: isSet(object.codeBytes) ? bytesFromBase64(object.codeBytes) : new Uint8Array(), - pinned: isSet(object.pinned) ? Boolean(object.pinned) : false - }; - }, - toJSON(message: Code): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.codeInfo !== undefined && (obj.codeInfo = message.codeInfo ? CodeInfo.toJSON(message.codeInfo) : undefined); - message.codeBytes !== undefined && (obj.codeBytes = base64FromBytes(message.codeBytes !== undefined ? message.codeBytes : new Uint8Array())); - message.pinned !== undefined && (obj.pinned = message.pinned); - return obj; - }, - fromPartial(object: DeepPartial): Code { - const message = createBaseCode(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null ? CodeInfo.fromPartial(object.codeInfo) : undefined; - message.codeBytes = object.codeBytes ?? new Uint8Array(); - message.pinned = object.pinned ?? false; - return message; - }, - fromSDK(object: CodeSDKType): Code { - return { - codeId: object?.code_id, - codeInfo: object.code_info ? CodeInfo.fromSDK(object.code_info) : undefined, - codeBytes: object?.code_bytes, - pinned: object?.pinned - }; - }, - toSDK(message: Code): CodeSDKType { - const obj: any = {}; - obj.code_id = message.codeId; - message.codeInfo !== undefined && (obj.code_info = message.codeInfo ? CodeInfo.toSDK(message.codeInfo) : undefined); - obj.code_bytes = message.codeBytes; - obj.pinned = message.pinned; - return obj; - }, - fromAmino(object: CodeAmino): Code { - return { - codeId: BigInt(object.code_id), - codeInfo: object?.code_info ? CodeInfo.fromAmino(object.code_info) : undefined, - codeBytes: object.code_bytes, - pinned: object.pinned - }; - }, - toAmino(message: Code): CodeAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.code_info = message.codeInfo ? CodeInfo.toAmino(message.codeInfo) : undefined; - obj.code_bytes = message.codeBytes; - obj.pinned = message.pinned; - return obj; - }, - fromAminoMsg(object: CodeAminoMsg): Code { - return Code.fromAmino(object.value); - }, - toAminoMsg(message: Code): CodeAminoMsg { - return { - type: "wasm/Code", - value: Code.toAmino(message) - }; - }, - fromProtoMsg(message: CodeProtoMsg): Code { - return Code.decode(message.value); - }, - toProto(message: Code): Uint8Array { - return Code.encode(message).finish(); - }, - toProtoMsg(message: Code): CodeProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.Code", - value: Code.encode(message).finish() - }; - } -}; -function createBaseContract(): Contract { - return { - contractAddress: "", - contractInfo: ContractInfo.fromPartial({}), - contractState: [] - }; -} -export const Contract = { - typeUrl: "/cosmwasm.wasm.v1.Contract", - aminoType: "wasm/Contract", - encode(message: Contract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.contractInfo !== undefined) { - ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contractState) { - Model.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Contract { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContract(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddress = reader.string(); - break; - case 2: - message.contractInfo = ContractInfo.decode(reader, reader.uint32()); - break; - case 3: - message.contractState.push(Model.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Contract { - return { - contractAddress: isSet(object.contractAddress) ? String(object.contractAddress) : "", - contractInfo: isSet(object.contractInfo) ? ContractInfo.fromJSON(object.contractInfo) : undefined, - contractState: Array.isArray(object?.contractState) ? object.contractState.map((e: any) => Model.fromJSON(e)) : [] - }; - }, - toJSON(message: Contract): unknown { - const obj: any = {}; - message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); - message.contractInfo !== undefined && (obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined); - if (message.contractState) { - obj.contractState = message.contractState.map(e => e ? Model.toJSON(e) : undefined); - } else { - obj.contractState = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Contract { - const message = createBaseContract(); - message.contractAddress = object.contractAddress ?? ""; - message.contractInfo = object.contractInfo !== undefined && object.contractInfo !== null ? ContractInfo.fromPartial(object.contractInfo) : undefined; - message.contractState = object.contractState?.map(e => Model.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ContractSDKType): Contract { - return { - contractAddress: object?.contract_address, - contractInfo: object.contract_info ? ContractInfo.fromSDK(object.contract_info) : undefined, - contractState: Array.isArray(object?.contract_state) ? object.contract_state.map((e: any) => Model.fromSDK(e)) : [] - }; - }, - toSDK(message: Contract): ContractSDKType { - const obj: any = {}; - obj.contract_address = message.contractAddress; - message.contractInfo !== undefined && (obj.contract_info = message.contractInfo ? ContractInfo.toSDK(message.contractInfo) : undefined); - if (message.contractState) { - obj.contract_state = message.contractState.map(e => e ? Model.toSDK(e) : undefined); - } else { - obj.contract_state = []; - } - return obj; - }, - fromAmino(object: ContractAmino): Contract { - return { - contractAddress: object.contract_address, - contractInfo: object?.contract_info ? ContractInfo.fromAmino(object.contract_info) : undefined, - contractState: Array.isArray(object?.contract_state) ? object.contract_state.map((e: any) => Model.fromAmino(e)) : [] - }; - }, - toAmino(message: Contract): ContractAmino { - const obj: any = {}; - obj.contract_address = message.contractAddress; - obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo) : undefined; - if (message.contractState) { - obj.contract_state = message.contractState.map(e => e ? Model.toAmino(e) : undefined); - } else { - obj.contract_state = []; - } - return obj; - }, - fromAminoMsg(object: ContractAminoMsg): Contract { - return Contract.fromAmino(object.value); - }, - toAminoMsg(message: Contract): ContractAminoMsg { - return { - type: "wasm/Contract", - value: Contract.toAmino(message) - }; - }, - fromProtoMsg(message: ContractProtoMsg): Contract { - return Contract.decode(message.value); - }, - toProto(message: Contract): Uint8Array { - return Contract.encode(message).finish(); - }, - toProtoMsg(message: Contract): ContractProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.Contract", - value: Contract.encode(message).finish() - }; - } -}; -function createBaseSequence(): Sequence { - return { - idKey: new Uint8Array(), - value: BigInt(0) - }; -} -export const Sequence = { - typeUrl: "/cosmwasm.wasm.v1.Sequence", - aminoType: "wasm/Sequence", - encode(message: Sequence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.idKey.length !== 0) { - writer.uint32(10).bytes(message.idKey); - } - if (message.value !== BigInt(0)) { - writer.uint32(16).uint64(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Sequence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSequence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.idKey = reader.bytes(); - break; - case 2: - message.value = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Sequence { - return { - idKey: isSet(object.idKey) ? bytesFromBase64(object.idKey) : new Uint8Array(), - value: isSet(object.value) ? BigInt(object.value.toString()) : BigInt(0) - }; - }, - toJSON(message: Sequence): unknown { - const obj: any = {}; - message.idKey !== undefined && (obj.idKey = base64FromBytes(message.idKey !== undefined ? message.idKey : new Uint8Array())); - message.value !== undefined && (obj.value = (message.value || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Sequence { - const message = createBaseSequence(); - message.idKey = object.idKey ?? new Uint8Array(); - message.value = object.value !== undefined && object.value !== null ? BigInt(object.value.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SequenceSDKType): Sequence { - return { - idKey: object?.id_key, - value: object?.value - }; - }, - toSDK(message: Sequence): SequenceSDKType { - const obj: any = {}; - obj.id_key = message.idKey; - obj.value = message.value; - return obj; - }, - fromAmino(object: SequenceAmino): Sequence { - return { - idKey: object.id_key, - value: BigInt(object.value) - }; - }, - toAmino(message: Sequence): SequenceAmino { - const obj: any = {}; - obj.id_key = message.idKey; - obj.value = message.value ? message.value.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SequenceAminoMsg): Sequence { - return Sequence.fromAmino(object.value); - }, - toAminoMsg(message: Sequence): SequenceAminoMsg { - return { - type: "wasm/Sequence", - value: Sequence.toAmino(message) - }; - }, - fromProtoMsg(message: SequenceProtoMsg): Sequence { - return Sequence.decode(message.value); - }, - toProto(message: Sequence): Uint8Array { - return Sequence.encode(message).finish(); - }, - toProtoMsg(message: Sequence): SequenceProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.Sequence", - value: Sequence.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/ibc.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/ibc.ts deleted file mode 100644 index 6c413f33..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/ibc.ts +++ /dev/null @@ -1,295 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -/** MsgIBCSend */ -export interface MsgIBCSend { - /** the channel by which the packet will be sent */ - channel: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: bigint; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: bigint; - /** - * Data is the payload to transfer. We must not make assumption what format or - * content is in here. - */ - data: Uint8Array; -} -export interface MsgIBCSendProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend"; - value: Uint8Array; -} -/** MsgIBCSend */ -export interface MsgIBCSendAmino { - /** the channel by which the packet will be sent */ - channel: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeout_height: string; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeout_timestamp: string; - /** - * Data is the payload to transfer. We must not make assumption what format or - * content is in here. - */ - data: Uint8Array; -} -export interface MsgIBCSendAminoMsg { - type: "wasm/MsgIBCSend"; - value: MsgIBCSendAmino; -} -/** MsgIBCSend */ -export interface MsgIBCSendSDKType { - channel: string; - timeout_height: bigint; - timeout_timestamp: bigint; - data: Uint8Array; -} -/** MsgIBCCloseChannel port and channel need to be owned by the contract */ -export interface MsgIBCCloseChannel { - channel: string; -} -export interface MsgIBCCloseChannelProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel"; - value: Uint8Array; -} -/** MsgIBCCloseChannel port and channel need to be owned by the contract */ -export interface MsgIBCCloseChannelAmino { - channel: string; -} -export interface MsgIBCCloseChannelAminoMsg { - type: "wasm/MsgIBCCloseChannel"; - value: MsgIBCCloseChannelAmino; -} -/** MsgIBCCloseChannel port and channel need to be owned by the contract */ -export interface MsgIBCCloseChannelSDKType { - channel: string; -} -function createBaseMsgIBCSend(): MsgIBCSend { - return { - channel: "", - timeoutHeight: BigInt(0), - timeoutTimestamp: BigInt(0), - data: new Uint8Array() - }; -} -export const MsgIBCSend = { - typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend", - aminoType: "wasm/MsgIBCSend", - encode(message: MsgIBCSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - if (message.timeoutHeight !== BigInt(0)) { - writer.uint32(32).uint64(message.timeoutHeight); - } - if (message.timeoutTimestamp !== BigInt(0)) { - writer.uint32(40).uint64(message.timeoutTimestamp); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgIBCSend { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgIBCSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - case 4: - message.timeoutHeight = reader.uint64(); - break; - case 5: - message.timeoutTimestamp = reader.uint64(); - break; - case 6: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgIBCSend { - return { - channel: isSet(object.channel) ? String(object.channel) : "", - timeoutHeight: isSet(object.timeoutHeight) ? BigInt(object.timeoutHeight.toString()) : BigInt(0), - timeoutTimestamp: isSet(object.timeoutTimestamp) ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0), - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: MsgIBCSend): unknown { - const obj: any = {}; - message.channel !== undefined && (obj.channel = message.channel); - message.timeoutHeight !== undefined && (obj.timeoutHeight = (message.timeoutHeight || BigInt(0)).toString()); - message.timeoutTimestamp !== undefined && (obj.timeoutTimestamp = (message.timeoutTimestamp || BigInt(0)).toString()); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgIBCSend { - const message = createBaseMsgIBCSend(); - message.channel = object.channel ?? ""; - message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? BigInt(object.timeoutHeight.toString()) : BigInt(0); - message.timeoutTimestamp = object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgIBCSendSDKType): MsgIBCSend { - return { - channel: object?.channel, - timeoutHeight: object?.timeout_height, - timeoutTimestamp: object?.timeout_timestamp, - data: object?.data - }; - }, - toSDK(message: MsgIBCSend): MsgIBCSendSDKType { - const obj: any = {}; - obj.channel = message.channel; - obj.timeout_height = message.timeoutHeight; - obj.timeout_timestamp = message.timeoutTimestamp; - obj.data = message.data; - return obj; - }, - fromAmino(object: MsgIBCSendAmino): MsgIBCSend { - return { - channel: object.channel, - timeoutHeight: BigInt(object.timeout_height), - timeoutTimestamp: BigInt(object.timeout_timestamp), - data: object.data - }; - }, - toAmino(message: MsgIBCSend): MsgIBCSendAmino { - const obj: any = {}; - obj.channel = message.channel; - obj.timeout_height = message.timeoutHeight ? message.timeoutHeight.toString() : undefined; - obj.timeout_timestamp = message.timeoutTimestamp ? message.timeoutTimestamp.toString() : undefined; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: MsgIBCSendAminoMsg): MsgIBCSend { - return MsgIBCSend.fromAmino(object.value); - }, - toAminoMsg(message: MsgIBCSend): MsgIBCSendAminoMsg { - return { - type: "wasm/MsgIBCSend", - value: MsgIBCSend.toAmino(message) - }; - }, - fromProtoMsg(message: MsgIBCSendProtoMsg): MsgIBCSend { - return MsgIBCSend.decode(message.value); - }, - toProto(message: MsgIBCSend): Uint8Array { - return MsgIBCSend.encode(message).finish(); - }, - toProtoMsg(message: MsgIBCSend): MsgIBCSendProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend", - value: MsgIBCSend.encode(message).finish() - }; - } -}; -function createBaseMsgIBCCloseChannel(): MsgIBCCloseChannel { - return { - channel: "" - }; -} -export const MsgIBCCloseChannel = { - typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel", - aminoType: "wasm/MsgIBCCloseChannel", - encode(message: MsgIBCCloseChannel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgIBCCloseChannel { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgIBCCloseChannel(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgIBCCloseChannel { - return { - channel: isSet(object.channel) ? String(object.channel) : "" - }; - }, - toJSON(message: MsgIBCCloseChannel): unknown { - const obj: any = {}; - message.channel !== undefined && (obj.channel = message.channel); - return obj; - }, - fromPartial(object: DeepPartial): MsgIBCCloseChannel { - const message = createBaseMsgIBCCloseChannel(); - message.channel = object.channel ?? ""; - return message; - }, - fromSDK(object: MsgIBCCloseChannelSDKType): MsgIBCCloseChannel { - return { - channel: object?.channel - }; - }, - toSDK(message: MsgIBCCloseChannel): MsgIBCCloseChannelSDKType { - const obj: any = {}; - obj.channel = message.channel; - return obj; - }, - fromAmino(object: MsgIBCCloseChannelAmino): MsgIBCCloseChannel { - return { - channel: object.channel - }; - }, - toAmino(message: MsgIBCCloseChannel): MsgIBCCloseChannelAmino { - const obj: any = {}; - obj.channel = message.channel; - return obj; - }, - fromAminoMsg(object: MsgIBCCloseChannelAminoMsg): MsgIBCCloseChannel { - return MsgIBCCloseChannel.fromAmino(object.value); - }, - toAminoMsg(message: MsgIBCCloseChannel): MsgIBCCloseChannelAminoMsg { - return { - type: "wasm/MsgIBCCloseChannel", - value: MsgIBCCloseChannel.toAmino(message) - }; - }, - fromProtoMsg(message: MsgIBCCloseChannelProtoMsg): MsgIBCCloseChannel { - return MsgIBCCloseChannel.decode(message.value); - }, - toProto(message: MsgIBCCloseChannel): Uint8Array { - return MsgIBCCloseChannel.encode(message).finish(); - }, - toProtoMsg(message: MsgIBCCloseChannel): MsgIBCCloseChannelProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel", - value: MsgIBCCloseChannel.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/proposal.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/proposal.ts deleted file mode 100644 index c988977f..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/proposal.ts +++ /dev/null @@ -1,1714 +0,0 @@ -import { AccessConfig, AccessConfigAmino, AccessConfigSDKType } from "./types"; -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -/** StoreCodeProposal gov proposal content type to submit WASM code to the system */ -export interface StoreCodeProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** WASMByteCode can be raw or gzip compressed */ - wasmByteCode: Uint8Array; - /** InstantiatePermission to apply on contract creation, optional */ - instantiatePermission: AccessConfig | undefined; -} -export interface StoreCodeProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.StoreCodeProposal"; - value: Uint8Array; -} -/** StoreCodeProposal gov proposal content type to submit WASM code to the system */ -export interface StoreCodeProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - run_as: string; - /** WASMByteCode can be raw or gzip compressed */ - wasm_byte_code: string; - /** InstantiatePermission to apply on contract creation, optional */ - instantiate_permission?: AccessConfigAmino | undefined; -} -export interface StoreCodeProposalAminoMsg { - type: "wasm/StoreCodeProposal"; - value: StoreCodeProposalAmino; -} -/** StoreCodeProposal gov proposal content type to submit WASM code to the system */ -export interface StoreCodeProposalSDKType { - title: string; - description: string; - run_as: string; - wasm_byte_code: Uint8Array; - instantiate_permission: AccessConfigSDKType | undefined; -} -/** - * InstantiateContractProposal gov proposal content type to instantiate a - * contract. - */ -export interface InstantiateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - codeId: bigint; - /** Label is optional metadata to be stored with a constract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -export interface InstantiateContractProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.InstantiateContractProposal"; - value: Uint8Array; -} -/** - * InstantiateContractProposal gov proposal content type to instantiate a - * contract. - */ -export interface InstantiateContractProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - run_as: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - code_id: string; - /** Label is optional metadata to be stored with a constract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: CoinAmino[]; -} -export interface InstantiateContractProposalAminoMsg { - type: "wasm/InstantiateContractProposal"; - value: InstantiateContractProposalAmino; -} -/** - * InstantiateContractProposal gov proposal content type to instantiate a - * contract. - */ -export interface InstantiateContractProposalSDKType { - title: string; - description: string; - run_as: string; - admin: string; - code_id: bigint; - label: string; - msg: Uint8Array; - funds: CoinSDKType[]; -} -/** MigrateContractProposal gov proposal content type to migrate a contract. */ -export interface MigrateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM codesudo */ - codeId: bigint; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -export interface MigrateContractProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MigrateContractProposal"; - value: Uint8Array; -} -/** MigrateContractProposal gov proposal content type to migrate a contract. */ -export interface MigrateContractProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM codesudo */ - code_id: string; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -export interface MigrateContractProposalAminoMsg { - type: "wasm/MigrateContractProposal"; - value: MigrateContractProposalAmino; -} -/** MigrateContractProposal gov proposal content type to migrate a contract. */ -export interface MigrateContractProposalSDKType { - title: string; - description: string; - contract: string; - code_id: bigint; - msg: Uint8Array; -} -/** SudoContractProposal gov proposal content type to call sudo on a contract. */ -export interface SudoContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as sudo */ - msg: Uint8Array; -} -export interface SudoContractProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.SudoContractProposal"; - value: Uint8Array; -} -/** SudoContractProposal gov proposal content type to call sudo on a contract. */ -export interface SudoContractProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as sudo */ - msg: Uint8Array; -} -export interface SudoContractProposalAminoMsg { - type: "wasm/SudoContractProposal"; - value: SudoContractProposalAmino; -} -/** SudoContractProposal gov proposal content type to call sudo on a contract. */ -export interface SudoContractProposalSDKType { - title: string; - description: string; - contract: string; - msg: Uint8Array; -} -/** - * ExecuteContractProposal gov proposal content type to call execute on a - * contract. - */ -export interface ExecuteContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as execute */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -export interface ExecuteContractProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.ExecuteContractProposal"; - value: Uint8Array; -} -/** - * ExecuteContractProposal gov proposal content type to call execute on a - * contract. - */ -export interface ExecuteContractProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - run_as: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as execute */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: CoinAmino[]; -} -export interface ExecuteContractProposalAminoMsg { - type: "wasm/ExecuteContractProposal"; - value: ExecuteContractProposalAmino; -} -/** - * ExecuteContractProposal gov proposal content type to call execute on a - * contract. - */ -export interface ExecuteContractProposalSDKType { - title: string; - description: string; - run_as: string; - contract: string; - msg: Uint8Array; - funds: CoinSDKType[]; -} -/** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ -export interface UpdateAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** NewAdmin address to be set */ - newAdmin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface UpdateAdminProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.UpdateAdminProposal"; - value: Uint8Array; -} -/** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ -export interface UpdateAdminProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** NewAdmin address to be set */ - new_admin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface UpdateAdminProposalAminoMsg { - type: "wasm/UpdateAdminProposal"; - value: UpdateAdminProposalAmino; -} -/** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ -export interface UpdateAdminProposalSDKType { - title: string; - description: string; - new_admin: string; - contract: string; -} -/** - * ClearAdminProposal gov proposal content type to clear the admin of a - * contract. - */ -export interface ClearAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface ClearAdminProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.ClearAdminProposal"; - value: Uint8Array; -} -/** - * ClearAdminProposal gov proposal content type to clear the admin of a - * contract. - */ -export interface ClearAdminProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface ClearAdminProposalAminoMsg { - type: "wasm/ClearAdminProposal"; - value: ClearAdminProposalAmino; -} -/** - * ClearAdminProposal gov proposal content type to clear the admin of a - * contract. - */ -export interface ClearAdminProposalSDKType { - title: string; - description: string; - contract: string; -} -/** - * PinCodesProposal gov proposal content type to pin a set of code ids in the - * wasmvm cache. - */ -export interface PinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the new WASM codes */ - codeIds: bigint[]; -} -export interface PinCodesProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.PinCodesProposal"; - value: Uint8Array; -} -/** - * PinCodesProposal gov proposal content type to pin a set of code ids in the - * wasmvm cache. - */ -export interface PinCodesProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the new WASM codes */ - code_ids: string[]; -} -export interface PinCodesProposalAminoMsg { - type: "wasm/PinCodesProposal"; - value: PinCodesProposalAmino; -} -/** - * PinCodesProposal gov proposal content type to pin a set of code ids in the - * wasmvm cache. - */ -export interface PinCodesProposalSDKType { - title: string; - description: string; - code_ids: bigint[]; -} -/** - * UnpinCodesProposal gov proposal content type to unpin a set of code ids in - * the wasmvm cache. - */ -export interface UnpinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the WASM codes */ - codeIds: bigint[]; -} -export interface UnpinCodesProposalProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.UnpinCodesProposal"; - value: Uint8Array; -} -/** - * UnpinCodesProposal gov proposal content type to unpin a set of code ids in - * the wasmvm cache. - */ -export interface UnpinCodesProposalAmino { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the WASM codes */ - code_ids: string[]; -} -export interface UnpinCodesProposalAminoMsg { - type: "wasm/UnpinCodesProposal"; - value: UnpinCodesProposalAmino; -} -/** - * UnpinCodesProposal gov proposal content type to unpin a set of code ids in - * the wasmvm cache. - */ -export interface UnpinCodesProposalSDKType { - title: string; - description: string; - code_ids: bigint[]; -} -function createBaseStoreCodeProposal(): StoreCodeProposal { - return { - title: "", - description: "", - runAs: "", - wasmByteCode: new Uint8Array(), - instantiatePermission: AccessConfig.fromPartial({}) - }; -} -export const StoreCodeProposal = { - typeUrl: "/cosmwasm.wasm.v1.StoreCodeProposal", - aminoType: "wasm/StoreCodeProposal", - encode(message: StoreCodeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(34).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): StoreCodeProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStoreCodeProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.wasmByteCode = reader.bytes(); - break; - case 7: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): StoreCodeProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - runAs: isSet(object.runAs) ? String(object.runAs) : "", - wasmByteCode: isSet(object.wasmByteCode) ? bytesFromBase64(object.wasmByteCode) : new Uint8Array(), - instantiatePermission: isSet(object.instantiatePermission) ? AccessConfig.fromJSON(object.instantiatePermission) : undefined - }; - }, - toJSON(message: StoreCodeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.wasmByteCode !== undefined && (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array())); - message.instantiatePermission !== undefined && (obj.instantiatePermission = message.instantiatePermission ? AccessConfig.toJSON(message.instantiatePermission) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): StoreCodeProposal { - const message = createBaseStoreCodeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.runAs = object.runAs ?? ""; - message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); - message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; - return message; - }, - fromSDK(object: StoreCodeProposalSDKType): StoreCodeProposal { - return { - title: object?.title, - description: object?.description, - runAs: object?.run_as, - wasmByteCode: object?.wasm_byte_code, - instantiatePermission: object.instantiate_permission ? AccessConfig.fromSDK(object.instantiate_permission) : undefined - }; - }, - toSDK(message: StoreCodeProposal): StoreCodeProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.wasm_byte_code = message.wasmByteCode; - message.instantiatePermission !== undefined && (obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toSDK(message.instantiatePermission) : undefined); - return obj; - }, - fromAmino(object: StoreCodeProposalAmino): StoreCodeProposal { - return { - title: object.title, - description: object.description, - runAs: object.run_as, - wasmByteCode: fromBase64(object.wasm_byte_code), - instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined - }; - }, - toAmino(message: StoreCodeProposal): StoreCodeProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; - obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; - return obj; - }, - fromAminoMsg(object: StoreCodeProposalAminoMsg): StoreCodeProposal { - return StoreCodeProposal.fromAmino(object.value); - }, - toAminoMsg(message: StoreCodeProposal): StoreCodeProposalAminoMsg { - return { - type: "wasm/StoreCodeProposal", - value: StoreCodeProposal.toAmino(message) - }; - }, - fromProtoMsg(message: StoreCodeProposalProtoMsg): StoreCodeProposal { - return StoreCodeProposal.decode(message.value); - }, - toProto(message: StoreCodeProposal): Uint8Array { - return StoreCodeProposal.encode(message).finish(); - }, - toProtoMsg(message: StoreCodeProposal): StoreCodeProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.StoreCodeProposal", - value: StoreCodeProposal.encode(message).finish() - }; - } -}; -function createBaseInstantiateContractProposal(): InstantiateContractProposal { - return { - title: "", - description: "", - runAs: "", - admin: "", - codeId: BigInt(0), - label: "", - msg: new Uint8Array(), - funds: [] - }; -} -export const InstantiateContractProposal = { - typeUrl: "/cosmwasm.wasm.v1.InstantiateContractProposal", - aminoType: "wasm/InstantiateContractProposal", - encode(message: InstantiateContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.admin !== "") { - writer.uint32(34).string(message.admin); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(40).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(50).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(58).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): InstantiateContractProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInstantiateContractProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.admin = reader.string(); - break; - case 5: - message.codeId = reader.uint64(); - break; - case 6: - message.label = reader.string(); - break; - case 7: - message.msg = reader.bytes(); - break; - case 8: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): InstantiateContractProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - runAs: isSet(object.runAs) ? String(object.runAs) : "", - admin: isSet(object.admin) ? String(object.admin) : "", - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - label: isSet(object.label) ? String(object.label) : "", - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: InstantiateContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.admin !== undefined && (obj.admin = message.admin); - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): InstantiateContractProposal { - const message = createBaseInstantiateContractProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.runAs = object.runAs ?? ""; - message.admin = object.admin ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.label = object.label ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: InstantiateContractProposalSDKType): InstantiateContractProposal { - return { - title: object?.title, - description: object?.description, - runAs: object?.run_as, - admin: object?.admin, - codeId: object?.code_id, - label: object?.label, - msg: object?.msg, - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: InstantiateContractProposal): InstantiateContractProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.admin = message.admin; - obj.code_id = message.codeId; - obj.label = message.label; - obj.msg = message.msg; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAmino(object: InstantiateContractProposalAmino): InstantiateContractProposal { - return { - title: object.title, - description: object.description, - runAs: object.run_as, - admin: object.admin, - codeId: BigInt(object.code_id), - label: object.label, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: InstantiateContractProposal): InstantiateContractProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAminoMsg(object: InstantiateContractProposalAminoMsg): InstantiateContractProposal { - return InstantiateContractProposal.fromAmino(object.value); - }, - toAminoMsg(message: InstantiateContractProposal): InstantiateContractProposalAminoMsg { - return { - type: "wasm/InstantiateContractProposal", - value: InstantiateContractProposal.toAmino(message) - }; - }, - fromProtoMsg(message: InstantiateContractProposalProtoMsg): InstantiateContractProposal { - return InstantiateContractProposal.decode(message.value); - }, - toProto(message: InstantiateContractProposal): Uint8Array { - return InstantiateContractProposal.encode(message).finish(); - }, - toProtoMsg(message: InstantiateContractProposal): InstantiateContractProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.InstantiateContractProposal", - value: InstantiateContractProposal.encode(message).finish() - }; - } -}; -function createBaseMigrateContractProposal(): MigrateContractProposal { - return { - title: "", - description: "", - contract: "", - codeId: BigInt(0), - msg: new Uint8Array() - }; -} -export const MigrateContractProposal = { - typeUrl: "/cosmwasm.wasm.v1.MigrateContractProposal", - aminoType: "wasm/MigrateContractProposal", - encode(message: MigrateContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(40).uint64(message.codeId); - } - if (message.msg.length !== 0) { - writer.uint32(50).bytes(message.msg); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MigrateContractProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMigrateContractProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.codeId = reader.uint64(); - break; - case 6: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MigrateContractProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - contract: isSet(object.contract) ? String(object.contract) : "", - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array() - }; - }, - toJSON(message: MigrateContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MigrateContractProposal { - const message = createBaseMigrateContractProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.contract = object.contract ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.msg = object.msg ?? new Uint8Array(); - return message; - }, - fromSDK(object: MigrateContractProposalSDKType): MigrateContractProposal { - return { - title: object?.title, - description: object?.description, - contract: object?.contract, - codeId: object?.code_id, - msg: object?.msg - }; - }, - toSDK(message: MigrateContractProposal): MigrateContractProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - obj.code_id = message.codeId; - obj.msg = message.msg; - return obj; - }, - fromAmino(object: MigrateContractProposalAmino): MigrateContractProposal { - return { - title: object.title, - description: object.description, - contract: object.contract, - codeId: BigInt(object.code_id), - msg: toUtf8(JSON.stringify(object.msg)) - }; - }, - toAmino(message: MigrateContractProposal): MigrateContractProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - return obj; - }, - fromAminoMsg(object: MigrateContractProposalAminoMsg): MigrateContractProposal { - return MigrateContractProposal.fromAmino(object.value); - }, - toAminoMsg(message: MigrateContractProposal): MigrateContractProposalAminoMsg { - return { - type: "wasm/MigrateContractProposal", - value: MigrateContractProposal.toAmino(message) - }; - }, - fromProtoMsg(message: MigrateContractProposalProtoMsg): MigrateContractProposal { - return MigrateContractProposal.decode(message.value); - }, - toProto(message: MigrateContractProposal): Uint8Array { - return MigrateContractProposal.encode(message).finish(); - }, - toProtoMsg(message: MigrateContractProposal): MigrateContractProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MigrateContractProposal", - value: MigrateContractProposal.encode(message).finish() - }; - } -}; -function createBaseSudoContractProposal(): SudoContractProposal { - return { - title: "", - description: "", - contract: "", - msg: new Uint8Array() - }; -} -export const SudoContractProposal = { - typeUrl: "/cosmwasm.wasm.v1.SudoContractProposal", - aminoType: "wasm/SudoContractProposal", - encode(message: SudoContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SudoContractProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSudoContractProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SudoContractProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - contract: isSet(object.contract) ? String(object.contract) : "", - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array() - }; - }, - toJSON(message: SudoContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): SudoContractProposal { - const message = createBaseSudoContractProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.contract = object.contract ?? ""; - message.msg = object.msg ?? new Uint8Array(); - return message; - }, - fromSDK(object: SudoContractProposalSDKType): SudoContractProposal { - return { - title: object?.title, - description: object?.description, - contract: object?.contract, - msg: object?.msg - }; - }, - toSDK(message: SudoContractProposal): SudoContractProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - obj.msg = message.msg; - return obj; - }, - fromAmino(object: SudoContractProposalAmino): SudoContractProposal { - return { - title: object.title, - description: object.description, - contract: object.contract, - msg: toUtf8(JSON.stringify(object.msg)) - }; - }, - toAmino(message: SudoContractProposal): SudoContractProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - return obj; - }, - fromAminoMsg(object: SudoContractProposalAminoMsg): SudoContractProposal { - return SudoContractProposal.fromAmino(object.value); - }, - toAminoMsg(message: SudoContractProposal): SudoContractProposalAminoMsg { - return { - type: "wasm/SudoContractProposal", - value: SudoContractProposal.toAmino(message) - }; - }, - fromProtoMsg(message: SudoContractProposalProtoMsg): SudoContractProposal { - return SudoContractProposal.decode(message.value); - }, - toProto(message: SudoContractProposal): Uint8Array { - return SudoContractProposal.encode(message).finish(); - }, - toProtoMsg(message: SudoContractProposal): SudoContractProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.SudoContractProposal", - value: SudoContractProposal.encode(message).finish() - }; - } -}; -function createBaseExecuteContractProposal(): ExecuteContractProposal { - return { - title: "", - description: "", - runAs: "", - contract: "", - msg: new Uint8Array(), - funds: [] - }; -} -export const ExecuteContractProposal = { - typeUrl: "/cosmwasm.wasm.v1.ExecuteContractProposal", - aminoType: "wasm/ExecuteContractProposal", - encode(message: ExecuteContractProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ExecuteContractProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExecuteContractProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ExecuteContractProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - runAs: isSet(object.runAs) ? String(object.runAs) : "", - contract: isSet(object.contract) ? String(object.contract) : "", - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: ExecuteContractProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ExecuteContractProposal { - const message = createBaseExecuteContractProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.runAs = object.runAs ?? ""; - message.contract = object.contract ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ExecuteContractProposalSDKType): ExecuteContractProposal { - return { - title: object?.title, - description: object?.description, - runAs: object?.run_as, - contract: object?.contract, - msg: object?.msg, - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: ExecuteContractProposal): ExecuteContractProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.contract = message.contract; - obj.msg = message.msg; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAmino(object: ExecuteContractProposalAmino): ExecuteContractProposal { - return { - title: object.title, - description: object.description, - runAs: object.run_as, - contract: object.contract, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: ExecuteContractProposal): ExecuteContractProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.run_as = message.runAs; - obj.contract = message.contract; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAminoMsg(object: ExecuteContractProposalAminoMsg): ExecuteContractProposal { - return ExecuteContractProposal.fromAmino(object.value); - }, - toAminoMsg(message: ExecuteContractProposal): ExecuteContractProposalAminoMsg { - return { - type: "wasm/ExecuteContractProposal", - value: ExecuteContractProposal.toAmino(message) - }; - }, - fromProtoMsg(message: ExecuteContractProposalProtoMsg): ExecuteContractProposal { - return ExecuteContractProposal.decode(message.value); - }, - toProto(message: ExecuteContractProposal): Uint8Array { - return ExecuteContractProposal.encode(message).finish(); - }, - toProtoMsg(message: ExecuteContractProposal): ExecuteContractProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.ExecuteContractProposal", - value: ExecuteContractProposal.encode(message).finish() - }; - } -}; -function createBaseUpdateAdminProposal(): UpdateAdminProposal { - return { - title: "", - description: "", - newAdmin: "", - contract: "" - }; -} -export const UpdateAdminProposal = { - typeUrl: "/cosmwasm.wasm.v1.UpdateAdminProposal", - aminoType: "wasm/UpdateAdminProposal", - encode(message: UpdateAdminProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpdateAdminProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateAdminProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpdateAdminProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - newAdmin: isSet(object.newAdmin) ? String(object.newAdmin) : "", - contract: isSet(object.contract) ? String(object.contract) : "" - }; - }, - toJSON(message: UpdateAdminProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object: DeepPartial): UpdateAdminProposal { - const message = createBaseUpdateAdminProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.newAdmin = object.newAdmin ?? ""; - message.contract = object.contract ?? ""; - return message; - }, - fromSDK(object: UpdateAdminProposalSDKType): UpdateAdminProposal { - return { - title: object?.title, - description: object?.description, - newAdmin: object?.new_admin, - contract: object?.contract - }; - }, - toSDK(message: UpdateAdminProposal): UpdateAdminProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; - return obj; - }, - fromAmino(object: UpdateAdminProposalAmino): UpdateAdminProposal { - return { - title: object.title, - description: object.description, - newAdmin: object.new_admin, - contract: object.contract - }; - }, - toAmino(message: UpdateAdminProposal): UpdateAdminProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; - return obj; - }, - fromAminoMsg(object: UpdateAdminProposalAminoMsg): UpdateAdminProposal { - return UpdateAdminProposal.fromAmino(object.value); - }, - toAminoMsg(message: UpdateAdminProposal): UpdateAdminProposalAminoMsg { - return { - type: "wasm/UpdateAdminProposal", - value: UpdateAdminProposal.toAmino(message) - }; - }, - fromProtoMsg(message: UpdateAdminProposalProtoMsg): UpdateAdminProposal { - return UpdateAdminProposal.decode(message.value); - }, - toProto(message: UpdateAdminProposal): Uint8Array { - return UpdateAdminProposal.encode(message).finish(); - }, - toProtoMsg(message: UpdateAdminProposal): UpdateAdminProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.UpdateAdminProposal", - value: UpdateAdminProposal.encode(message).finish() - }; - } -}; -function createBaseClearAdminProposal(): ClearAdminProposal { - return { - title: "", - description: "", - contract: "" - }; -} -export const ClearAdminProposal = { - typeUrl: "/cosmwasm.wasm.v1.ClearAdminProposal", - aminoType: "wasm/ClearAdminProposal", - encode(message: ClearAdminProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClearAdminProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClearAdminProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClearAdminProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - contract: isSet(object.contract) ? String(object.contract) : "" - }; - }, - toJSON(message: ClearAdminProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object: DeepPartial): ClearAdminProposal { - const message = createBaseClearAdminProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.contract = object.contract ?? ""; - return message; - }, - fromSDK(object: ClearAdminProposalSDKType): ClearAdminProposal { - return { - title: object?.title, - description: object?.description, - contract: object?.contract - }; - }, - toSDK(message: ClearAdminProposal): ClearAdminProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - return obj; - }, - fromAmino(object: ClearAdminProposalAmino): ClearAdminProposal { - return { - title: object.title, - description: object.description, - contract: object.contract - }; - }, - toAmino(message: ClearAdminProposal): ClearAdminProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.contract = message.contract; - return obj; - }, - fromAminoMsg(object: ClearAdminProposalAminoMsg): ClearAdminProposal { - return ClearAdminProposal.fromAmino(object.value); - }, - toAminoMsg(message: ClearAdminProposal): ClearAdminProposalAminoMsg { - return { - type: "wasm/ClearAdminProposal", - value: ClearAdminProposal.toAmino(message) - }; - }, - fromProtoMsg(message: ClearAdminProposalProtoMsg): ClearAdminProposal { - return ClearAdminProposal.decode(message.value); - }, - toProto(message: ClearAdminProposal): Uint8Array { - return ClearAdminProposal.encode(message).finish(); - }, - toProtoMsg(message: ClearAdminProposal): ClearAdminProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.ClearAdminProposal", - value: ClearAdminProposal.encode(message).finish() - }; - } -}; -function createBasePinCodesProposal(): PinCodesProposal { - return { - title: "", - description: "", - codeIds: [] - }; -} -export const PinCodesProposal = { - typeUrl: "/cosmwasm.wasm.v1.PinCodesProposal", - aminoType: "wasm/PinCodesProposal", - encode(message: PinCodesProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PinCodesProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePinCodesProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } else { - message.codeIds.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PinCodesProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: PinCodesProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.codeIds) { - obj.codeIds = message.codeIds.map(e => (e || BigInt(0)).toString()); - } else { - obj.codeIds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): PinCodesProposal { - const message = createBasePinCodesProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: PinCodesProposalSDKType): PinCodesProposal { - return { - title: object?.title, - description: object?.description, - codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => e) : [] - }; - }, - toSDK(message: PinCodesProposal): PinCodesProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.codeIds) { - obj.code_ids = message.codeIds.map(e => e); - } else { - obj.code_ids = []; - } - return obj; - }, - fromAmino(object: PinCodesProposalAmino): PinCodesProposal { - return { - title: object.title, - description: object.description, - codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: PinCodesProposal): PinCodesProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.codeIds) { - obj.code_ids = message.codeIds.map(e => e.toString()); - } else { - obj.code_ids = []; - } - return obj; - }, - fromAminoMsg(object: PinCodesProposalAminoMsg): PinCodesProposal { - return PinCodesProposal.fromAmino(object.value); - }, - toAminoMsg(message: PinCodesProposal): PinCodesProposalAminoMsg { - return { - type: "wasm/PinCodesProposal", - value: PinCodesProposal.toAmino(message) - }; - }, - fromProtoMsg(message: PinCodesProposalProtoMsg): PinCodesProposal { - return PinCodesProposal.decode(message.value); - }, - toProto(message: PinCodesProposal): Uint8Array { - return PinCodesProposal.encode(message).finish(); - }, - toProtoMsg(message: PinCodesProposal): PinCodesProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.PinCodesProposal", - value: PinCodesProposal.encode(message).finish() - }; - } -}; -function createBaseUnpinCodesProposal(): UnpinCodesProposal { - return { - title: "", - description: "", - codeIds: [] - }; -} -export const UnpinCodesProposal = { - typeUrl: "/cosmwasm.wasm.v1.UnpinCodesProposal", - aminoType: "wasm/UnpinCodesProposal", - encode(message: UnpinCodesProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UnpinCodesProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUnpinCodesProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } else { - message.codeIds.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UnpinCodesProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: UnpinCodesProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.codeIds) { - obj.codeIds = message.codeIds.map(e => (e || BigInt(0)).toString()); - } else { - obj.codeIds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): UnpinCodesProposal { - const message = createBaseUnpinCodesProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: UnpinCodesProposalSDKType): UnpinCodesProposal { - return { - title: object?.title, - description: object?.description, - codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => e) : [] - }; - }, - toSDK(message: UnpinCodesProposal): UnpinCodesProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.codeIds) { - obj.code_ids = message.codeIds.map(e => e); - } else { - obj.code_ids = []; - } - return obj; - }, - fromAmino(object: UnpinCodesProposalAmino): UnpinCodesProposal { - return { - title: object.title, - description: object.description, - codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: UnpinCodesProposal): UnpinCodesProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.codeIds) { - obj.code_ids = message.codeIds.map(e => e.toString()); - } else { - obj.code_ids = []; - } - return obj; - }, - fromAminoMsg(object: UnpinCodesProposalAminoMsg): UnpinCodesProposal { - return UnpinCodesProposal.fromAmino(object.value); - }, - toAminoMsg(message: UnpinCodesProposal): UnpinCodesProposalAminoMsg { - return { - type: "wasm/UnpinCodesProposal", - value: UnpinCodesProposal.toAmino(message) - }; - }, - fromProtoMsg(message: UnpinCodesProposalProtoMsg): UnpinCodesProposal { - return UnpinCodesProposal.decode(message.value); - }, - toProto(message: UnpinCodesProposal): Uint8Array { - return UnpinCodesProposal.encode(message).finish(); - }, - toProtoMsg(message: UnpinCodesProposal): UnpinCodesProposalProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.UnpinCodesProposal", - value: UnpinCodesProposal.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/query.rpc.Query.ts deleted file mode 100644 index b8982d8d..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/query.rpc.Query.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryContractInfoRequest, QueryContractInfoResponse, QueryContractHistoryRequest, QueryContractHistoryResponse, QueryContractsByCodeRequest, QueryContractsByCodeResponse, QueryAllContractStateRequest, QueryAllContractStateResponse, QueryRawContractStateRequest, QueryRawContractStateResponse, QuerySmartContractStateRequest, QuerySmartContractStateResponse, QueryCodeRequest, QueryCodeResponse, QueryCodesRequest, QueryCodesResponse, QueryPinnedCodesRequest, QueryPinnedCodesResponse } from "./query"; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ContractInfo gets the contract meta data */ - contractInfo(request: QueryContractInfoRequest): Promise; - /** ContractHistory gets the contract code history */ - contractHistory(request: QueryContractHistoryRequest): Promise; - /** ContractsByCode lists all smart contracts for a code id */ - contractsByCode(request: QueryContractsByCodeRequest): Promise; - /** AllContractState gets all raw store data for a single contract */ - allContractState(request: QueryAllContractStateRequest): Promise; - /** RawContractState gets single key from the raw store data of a contract */ - rawContractState(request: QueryRawContractStateRequest): Promise; - /** SmartContractState get smart query result from the contract */ - smartContractState(request: QuerySmartContractStateRequest): Promise; - /** Code gets the binary code and metadata for a singe wasm code */ - code(request: QueryCodeRequest): Promise; - /** Codes gets the metadata for all stored wasm codes */ - codes(request?: QueryCodesRequest): Promise; - /** PinnedCodes gets the pinned code ids */ - pinnedCodes(request?: QueryPinnedCodesRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.contractInfo = this.contractInfo.bind(this); - this.contractHistory = this.contractHistory.bind(this); - this.contractsByCode = this.contractsByCode.bind(this); - this.allContractState = this.allContractState.bind(this); - this.rawContractState = this.rawContractState.bind(this); - this.smartContractState = this.smartContractState.bind(this); - this.code = this.code.bind(this); - this.codes = this.codes.bind(this); - this.pinnedCodes = this.pinnedCodes.bind(this); - } - contractInfo(request: QueryContractInfoRequest): Promise { - const data = QueryContractInfoRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractInfo", data); - return promise.then(data => QueryContractInfoResponse.decode(new BinaryReader(data))); - } - contractHistory(request: QueryContractHistoryRequest): Promise { - const data = QueryContractHistoryRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractHistory", data); - return promise.then(data => QueryContractHistoryResponse.decode(new BinaryReader(data))); - } - contractsByCode(request: QueryContractsByCodeRequest): Promise { - const data = QueryContractsByCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractsByCode", data); - return promise.then(data => QueryContractsByCodeResponse.decode(new BinaryReader(data))); - } - allContractState(request: QueryAllContractStateRequest): Promise { - const data = QueryAllContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "AllContractState", data); - return promise.then(data => QueryAllContractStateResponse.decode(new BinaryReader(data))); - } - rawContractState(request: QueryRawContractStateRequest): Promise { - const data = QueryRawContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "RawContractState", data); - return promise.then(data => QueryRawContractStateResponse.decode(new BinaryReader(data))); - } - smartContractState(request: QuerySmartContractStateRequest): Promise { - const data = QuerySmartContractStateRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "SmartContractState", data); - return promise.then(data => QuerySmartContractStateResponse.decode(new BinaryReader(data))); - } - code(request: QueryCodeRequest): Promise { - const data = QueryCodeRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Code", data); - return promise.then(data => QueryCodeResponse.decode(new BinaryReader(data))); - } - codes(request: QueryCodesRequest = { - pagination: undefined - }): Promise { - const data = QueryCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Codes", data); - return promise.then(data => QueryCodesResponse.decode(new BinaryReader(data))); - } - pinnedCodes(request: QueryPinnedCodesRequest = { - pagination: undefined - }): Promise { - const data = QueryPinnedCodesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "PinnedCodes", data); - return promise.then(data => QueryPinnedCodesResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - contractInfo(request: QueryContractInfoRequest): Promise { - return queryService.contractInfo(request); - }, - contractHistory(request: QueryContractHistoryRequest): Promise { - return queryService.contractHistory(request); - }, - contractsByCode(request: QueryContractsByCodeRequest): Promise { - return queryService.contractsByCode(request); - }, - allContractState(request: QueryAllContractStateRequest): Promise { - return queryService.allContractState(request); - }, - rawContractState(request: QueryRawContractStateRequest): Promise { - return queryService.rawContractState(request); - }, - smartContractState(request: QuerySmartContractStateRequest): Promise { - return queryService.smartContractState(request); - }, - code(request: QueryCodeRequest): Promise { - return queryService.code(request); - }, - codes(request?: QueryCodesRequest): Promise { - return queryService.codes(request); - }, - pinnedCodes(request?: QueryPinnedCodesRequest): Promise { - return queryService.pinnedCodes(request); - } - }; -}; -export interface UseContractInfoQuery extends ReactQueryParams { - request: QueryContractInfoRequest; -} -export interface UseContractHistoryQuery extends ReactQueryParams { - request: QueryContractHistoryRequest; -} -export interface UseContractsByCodeQuery extends ReactQueryParams { - request: QueryContractsByCodeRequest; -} -export interface UseAllContractStateQuery extends ReactQueryParams { - request: QueryAllContractStateRequest; -} -export interface UseRawContractStateQuery extends ReactQueryParams { - request: QueryRawContractStateRequest; -} -export interface UseSmartContractStateQuery extends ReactQueryParams { - request: QuerySmartContractStateRequest; -} -export interface UseCodeQuery extends ReactQueryParams { - request: QueryCodeRequest; -} -export interface UseCodesQuery extends ReactQueryParams { - request?: QueryCodesRequest; -} -export interface UsePinnedCodesQuery extends ReactQueryParams { - request?: QueryPinnedCodesRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useContractInfo = ({ - request, - options - }: UseContractInfoQuery) => { - return useQuery(["contractInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.contractInfo(request); - }, options); - }; - const useContractHistory = ({ - request, - options - }: UseContractHistoryQuery) => { - return useQuery(["contractHistoryQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.contractHistory(request); - }, options); - }; - const useContractsByCode = ({ - request, - options - }: UseContractsByCodeQuery) => { - return useQuery(["contractsByCodeQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.contractsByCode(request); - }, options); - }; - const useAllContractState = ({ - request, - options - }: UseAllContractStateQuery) => { - return useQuery(["allContractStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allContractState(request); - }, options); - }; - const useRawContractState = ({ - request, - options - }: UseRawContractStateQuery) => { - return useQuery(["rawContractStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.rawContractState(request); - }, options); - }; - const useSmartContractState = ({ - request, - options - }: UseSmartContractStateQuery) => { - return useQuery(["smartContractStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.smartContractState(request); - }, options); - }; - const useCode = ({ - request, - options - }: UseCodeQuery) => { - return useQuery(["codeQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.code(request); - }, options); - }; - const useCodes = ({ - request, - options - }: UseCodesQuery) => { - return useQuery(["codesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.codes(request); - }, options); - }; - const usePinnedCodes = ({ - request, - options - }: UsePinnedCodesQuery) => { - return useQuery(["pinnedCodesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.pinnedCodes(request); - }, options); - }; - return { - /** ContractInfo gets the contract meta data */useContractInfo, - /** ContractHistory gets the contract code history */useContractHistory, - /** ContractsByCode lists all smart contracts for a code id */useContractsByCode, - /** AllContractState gets all raw store data for a single contract */useAllContractState, - /** RawContractState gets single key from the raw store data of a contract */useRawContractState, - /** SmartContractState get smart query result from the contract */useSmartContractState, - /** Code gets the binary code and metadata for a singe wasm code */useCode, - /** Codes gets the metadata for all stored wasm codes */useCodes, - /** PinnedCodes gets the pinned code ids */usePinnedCodes - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryContractInfoStore { - store = new QueryStore(queryService?.contractInfo); - contractInfo(request: QueryContractInfoRequest) { - return this.store.getData(request); - } - } - class QueryContractHistoryStore { - store = new QueryStore(queryService?.contractHistory); - contractHistory(request: QueryContractHistoryRequest) { - return this.store.getData(request); - } - } - class QueryContractsByCodeStore { - store = new QueryStore(queryService?.contractsByCode); - contractsByCode(request: QueryContractsByCodeRequest) { - return this.store.getData(request); - } - } - class QueryAllContractStateStore { - store = new QueryStore(queryService?.allContractState); - allContractState(request: QueryAllContractStateRequest) { - return this.store.getData(request); - } - } - class QueryRawContractStateStore { - store = new QueryStore(queryService?.rawContractState); - rawContractState(request: QueryRawContractStateRequest) { - return this.store.getData(request); - } - } - class QuerySmartContractStateStore { - store = new QueryStore(queryService?.smartContractState); - smartContractState(request: QuerySmartContractStateRequest) { - return this.store.getData(request); - } - } - class QueryCodeStore { - store = new QueryStore(queryService?.code); - code(request: QueryCodeRequest) { - return this.store.getData(request); - } - } - class QueryCodesStore { - store = new QueryStore(queryService?.codes); - codes(request: QueryCodesRequest) { - return this.store.getData(request); - } - } - class QueryPinnedCodesStore { - store = new QueryStore(queryService?.pinnedCodes); - pinnedCodes(request: QueryPinnedCodesRequest) { - return this.store.getData(request); - } - } - return { - /** ContractInfo gets the contract meta data */QueryContractInfoStore, - /** ContractHistory gets the contract code history */QueryContractHistoryStore, - /** ContractsByCode lists all smart contracts for a code id */QueryContractsByCodeStore, - /** AllContractState gets all raw store data for a single contract */QueryAllContractStateStore, - /** RawContractState gets single key from the raw store data of a contract */QueryRawContractStateStore, - /** SmartContractState get smart query result from the contract */QuerySmartContractStateStore, - /** Code gets the binary code and metadata for a singe wasm code */QueryCodeStore, - /** Codes gets the metadata for all stored wasm codes */QueryCodesStore, - /** PinnedCodes gets the pinned code ids */QueryPinnedCodesStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/query.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/query.ts deleted file mode 100644 index 6f9948a0..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/query.ts +++ /dev/null @@ -1,2538 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination"; -import { ContractInfo, ContractInfoAmino, ContractInfoSDKType, ContractCodeHistoryEntry, ContractCodeHistoryEntryAmino, ContractCodeHistoryEntrySDKType, Model, ModelAmino, ModelSDKType } from "./types"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; -/** - * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoRequest { - /** address is the address of the contract to query */ - address: string; -} -export interface QueryContractInfoRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest"; - value: Uint8Array; -} -/** - * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoRequestAmino { - /** address is the address of the contract to query */ - address: string; -} -export interface QueryContractInfoRequestAminoMsg { - type: "wasm/QueryContractInfoRequest"; - value: QueryContractInfoRequestAmino; -} -/** - * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoRequestSDKType { - address: string; -} -/** - * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoResponse { - /** address is the address of the contract */ - address: string; - contractInfo: ContractInfo | undefined; -} -export interface QueryContractInfoResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse"; - value: Uint8Array; -} -/** - * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoResponseAmino { - /** address is the address of the contract */ - address: string; - contract_info?: ContractInfoAmino | undefined; -} -export interface QueryContractInfoResponseAminoMsg { - type: "wasm/QueryContractInfoResponse"; - value: QueryContractInfoResponseAmino; -} -/** - * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoResponseSDKType { - address: string; - contract_info: ContractInfoSDKType | undefined; -} -/** - * QueryContractHistoryRequest is the request type for the Query/ContractHistory - * RPC method - */ -export interface QueryContractHistoryRequest { - /** address is the address of the contract to query */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryContractHistoryRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest"; - value: Uint8Array; -} -/** - * QueryContractHistoryRequest is the request type for the Query/ContractHistory - * RPC method - */ -export interface QueryContractHistoryRequestAmino { - /** address is the address of the contract to query */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryContractHistoryRequestAminoMsg { - type: "wasm/QueryContractHistoryRequest"; - value: QueryContractHistoryRequestAmino; -} -/** - * QueryContractHistoryRequest is the request type for the Query/ContractHistory - * RPC method - */ -export interface QueryContractHistoryRequestSDKType { - address: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryContractHistoryResponse is the response type for the - * Query/ContractHistory RPC method - */ -export interface QueryContractHistoryResponse { - entries: ContractCodeHistoryEntry[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryContractHistoryResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse"; - value: Uint8Array; -} -/** - * QueryContractHistoryResponse is the response type for the - * Query/ContractHistory RPC method - */ -export interface QueryContractHistoryResponseAmino { - entries: ContractCodeHistoryEntryAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryContractHistoryResponseAminoMsg { - type: "wasm/QueryContractHistoryResponse"; - value: QueryContractHistoryResponseAmino; -} -/** - * QueryContractHistoryResponse is the response type for the - * Query/ContractHistory RPC method - */ -export interface QueryContractHistoryResponseSDKType { - entries: ContractCodeHistoryEntrySDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode - * RPC method - */ -export interface QueryContractsByCodeRequest { - /** - * grpc-gateway_out does not support Go style CodID - * pagination defines an optional pagination for the request. - */ - codeId: bigint; - pagination: PageRequest | undefined; -} -export interface QueryContractsByCodeRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest"; - value: Uint8Array; -} -/** - * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode - * RPC method - */ -export interface QueryContractsByCodeRequestAmino { - /** - * grpc-gateway_out does not support Go style CodID - * pagination defines an optional pagination for the request. - */ - code_id: string; - pagination?: PageRequestAmino | undefined; -} -export interface QueryContractsByCodeRequestAminoMsg { - type: "wasm/QueryContractsByCodeRequest"; - value: QueryContractsByCodeRequestAmino; -} -/** - * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode - * RPC method - */ -export interface QueryContractsByCodeRequestSDKType { - code_id: bigint; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryContractsByCodeResponse is the response type for the - * Query/ContractsByCode RPC method - */ -export interface QueryContractsByCodeResponse { - /** contracts are a set of contract addresses */ - contracts: string[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryContractsByCodeResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse"; - value: Uint8Array; -} -/** - * QueryContractsByCodeResponse is the response type for the - * Query/ContractsByCode RPC method - */ -export interface QueryContractsByCodeResponseAmino { - /** contracts are a set of contract addresses */ - contracts: string[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryContractsByCodeResponseAminoMsg { - type: "wasm/QueryContractsByCodeResponse"; - value: QueryContractsByCodeResponseAmino; -} -/** - * QueryContractsByCodeResponse is the response type for the - * Query/ContractsByCode RPC method - */ -export interface QueryContractsByCodeResponseSDKType { - contracts: string[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryAllContractStateRequest is the request type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateRequest { - /** address is the address of the contract */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryAllContractStateRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest"; - value: Uint8Array; -} -/** - * QueryAllContractStateRequest is the request type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateRequestAmino { - /** address is the address of the contract */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryAllContractStateRequestAminoMsg { - type: "wasm/QueryAllContractStateRequest"; - value: QueryAllContractStateRequestAmino; -} -/** - * QueryAllContractStateRequest is the request type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateRequestSDKType { - address: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryAllContractStateResponse is the response type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateResponse { - models: Model[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryAllContractStateResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse"; - value: Uint8Array; -} -/** - * QueryAllContractStateResponse is the response type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateResponseAmino { - models: ModelAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryAllContractStateResponseAminoMsg { - type: "wasm/QueryAllContractStateResponse"; - value: QueryAllContractStateResponseAmino; -} -/** - * QueryAllContractStateResponse is the response type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateResponseSDKType { - models: ModelSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryRawContractStateRequest is the request type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateRequest { - /** address is the address of the contract */ - address: string; - queryData: Uint8Array; -} -export interface QueryRawContractStateRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest"; - value: Uint8Array; -} -/** - * QueryRawContractStateRequest is the request type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateRequestAmino { - /** address is the address of the contract */ - address: string; - query_data: Uint8Array; -} -export interface QueryRawContractStateRequestAminoMsg { - type: "wasm/QueryRawContractStateRequest"; - value: QueryRawContractStateRequestAmino; -} -/** - * QueryRawContractStateRequest is the request type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateRequestSDKType { - address: string; - query_data: Uint8Array; -} -/** - * QueryRawContractStateResponse is the response type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateResponse { - /** Data contains the raw store data */ - data: Uint8Array; -} -export interface QueryRawContractStateResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse"; - value: Uint8Array; -} -/** - * QueryRawContractStateResponse is the response type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateResponseAmino { - /** Data contains the raw store data */ - data: Uint8Array; -} -export interface QueryRawContractStateResponseAminoMsg { - type: "wasm/QueryRawContractStateResponse"; - value: QueryRawContractStateResponseAmino; -} -/** - * QueryRawContractStateResponse is the response type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateResponseSDKType { - data: Uint8Array; -} -/** - * QuerySmartContractStateRequest is the request type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateRequest { - /** address is the address of the contract */ - address: string; - /** QueryData contains the query data passed to the contract */ - queryData: Uint8Array; -} -export interface QuerySmartContractStateRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest"; - value: Uint8Array; -} -/** - * QuerySmartContractStateRequest is the request type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateRequestAmino { - /** address is the address of the contract */ - address: string; - /** QueryData contains the query data passed to the contract */ - query_data: Uint8Array; -} -export interface QuerySmartContractStateRequestAminoMsg { - type: "wasm/QuerySmartContractStateRequest"; - value: QuerySmartContractStateRequestAmino; -} -/** - * QuerySmartContractStateRequest is the request type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateRequestSDKType { - address: string; - query_data: Uint8Array; -} -/** - * QuerySmartContractStateResponse is the response type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateResponse { - /** Data contains the json data returned from the smart contract */ - data: Uint8Array; -} -export interface QuerySmartContractStateResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse"; - value: Uint8Array; -} -/** - * QuerySmartContractStateResponse is the response type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateResponseAmino { - /** Data contains the json data returned from the smart contract */ - data: Uint8Array; -} -export interface QuerySmartContractStateResponseAminoMsg { - type: "wasm/QuerySmartContractStateResponse"; - value: QuerySmartContractStateResponseAmino; -} -/** - * QuerySmartContractStateResponse is the response type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateResponseSDKType { - data: Uint8Array; -} -/** QueryCodeRequest is the request type for the Query/Code RPC method */ -export interface QueryCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - codeId: bigint; -} -export interface QueryCodeRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest"; - value: Uint8Array; -} -/** QueryCodeRequest is the request type for the Query/Code RPC method */ -export interface QueryCodeRequestAmino { - /** grpc-gateway_out does not support Go style CodID */ - code_id: string; -} -export interface QueryCodeRequestAminoMsg { - type: "wasm/QueryCodeRequest"; - value: QueryCodeRequestAmino; -} -/** QueryCodeRequest is the request type for the Query/Code RPC method */ -export interface QueryCodeRequestSDKType { - code_id: bigint; -} -/** CodeInfoResponse contains code meta data from CodeInfo */ -export interface CodeInfoResponse { - codeId: bigint; - creator: string; - dataHash: Uint8Array; -} -export interface CodeInfoResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse"; - value: Uint8Array; -} -/** CodeInfoResponse contains code meta data from CodeInfo */ -export interface CodeInfoResponseAmino { - code_id: string; - creator: string; - data_hash: Uint8Array; -} -export interface CodeInfoResponseAminoMsg { - type: "wasm/CodeInfoResponse"; - value: CodeInfoResponseAmino; -} -/** CodeInfoResponse contains code meta data from CodeInfo */ -export interface CodeInfoResponseSDKType { - code_id: bigint; - creator: string; - data_hash: Uint8Array; -} -/** QueryCodeResponse is the response type for the Query/Code RPC method */ -export interface QueryCodeResponse { - codeInfo: CodeInfoResponse | undefined; - data: Uint8Array; -} -export interface QueryCodeResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse"; - value: Uint8Array; -} -/** QueryCodeResponse is the response type for the Query/Code RPC method */ -export interface QueryCodeResponseAmino { - code_info?: CodeInfoResponseAmino | undefined; - data: Uint8Array; -} -export interface QueryCodeResponseAminoMsg { - type: "wasm/QueryCodeResponse"; - value: QueryCodeResponseAmino; -} -/** QueryCodeResponse is the response type for the Query/Code RPC method */ -export interface QueryCodeResponseSDKType { - code_info: CodeInfoResponseSDKType | undefined; - data: Uint8Array; -} -/** QueryCodesRequest is the request type for the Query/Codes RPC method */ -export interface QueryCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryCodesRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest"; - value: Uint8Array; -} -/** QueryCodesRequest is the request type for the Query/Codes RPC method */ -export interface QueryCodesRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryCodesRequestAminoMsg { - type: "wasm/QueryCodesRequest"; - value: QueryCodesRequestAmino; -} -/** QueryCodesRequest is the request type for the Query/Codes RPC method */ -export interface QueryCodesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** QueryCodesResponse is the response type for the Query/Codes RPC method */ -export interface QueryCodesResponse { - codeInfos: CodeInfoResponse[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryCodesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse"; - value: Uint8Array; -} -/** QueryCodesResponse is the response type for the Query/Codes RPC method */ -export interface QueryCodesResponseAmino { - code_infos: CodeInfoResponseAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryCodesResponseAminoMsg { - type: "wasm/QueryCodesResponse"; - value: QueryCodesResponseAmino; -} -/** QueryCodesResponse is the response type for the Query/Codes RPC method */ -export interface QueryCodesResponseSDKType { - code_infos: CodeInfoResponseSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes - * RPC method - */ -export interface QueryPinnedCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryPinnedCodesRequestProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest"; - value: Uint8Array; -} -/** - * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes - * RPC method - */ -export interface QueryPinnedCodesRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryPinnedCodesRequestAminoMsg { - type: "wasm/QueryPinnedCodesRequest"; - value: QueryPinnedCodesRequestAmino; -} -/** - * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes - * RPC method - */ -export interface QueryPinnedCodesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryPinnedCodesResponse is the response type for the - * Query/PinnedCodes RPC method - */ -export interface QueryPinnedCodesResponse { - codeIds: bigint[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryPinnedCodesResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse"; - value: Uint8Array; -} -/** - * QueryPinnedCodesResponse is the response type for the - * Query/PinnedCodes RPC method - */ -export interface QueryPinnedCodesResponseAmino { - code_ids: string[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryPinnedCodesResponseAminoMsg { - type: "wasm/QueryPinnedCodesResponse"; - value: QueryPinnedCodesResponseAmino; -} -/** - * QueryPinnedCodesResponse is the response type for the - * Query/PinnedCodes RPC method - */ -export interface QueryPinnedCodesResponseSDKType { - code_ids: bigint[]; - pagination: PageResponseSDKType | undefined; -} -function createBaseQueryContractInfoRequest(): QueryContractInfoRequest { - return { - address: "" - }; -} -export const QueryContractInfoRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", - aminoType: "wasm/QueryContractInfoRequest", - encode(message: QueryContractInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryContractInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryContractInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryContractInfoRequest { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: QueryContractInfoRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): QueryContractInfoRequest { - const message = createBaseQueryContractInfoRequest(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: QueryContractInfoRequestSDKType): QueryContractInfoRequest { - return { - address: object?.address - }; - }, - toSDK(message: QueryContractInfoRequest): QueryContractInfoRequestSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: QueryContractInfoRequestAmino): QueryContractInfoRequest { - return { - address: object.address - }; - }, - toAmino(message: QueryContractInfoRequest): QueryContractInfoRequestAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: QueryContractInfoRequestAminoMsg): QueryContractInfoRequest { - return QueryContractInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryContractInfoRequest): QueryContractInfoRequestAminoMsg { - return { - type: "wasm/QueryContractInfoRequest", - value: QueryContractInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryContractInfoRequestProtoMsg): QueryContractInfoRequest { - return QueryContractInfoRequest.decode(message.value); - }, - toProto(message: QueryContractInfoRequest): Uint8Array { - return QueryContractInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryContractInfoRequest): QueryContractInfoRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoRequest", - value: QueryContractInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { - return { - address: "", - contractInfo: ContractInfo.fromPartial({}) - }; -} -export const QueryContractInfoResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", - aminoType: "wasm/QueryContractInfoResponse", - encode(message: QueryContractInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.contractInfo !== undefined) { - ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryContractInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryContractInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.contractInfo = ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryContractInfoResponse { - return { - address: isSet(object.address) ? String(object.address) : "", - contractInfo: isSet(object.contractInfo) ? ContractInfo.fromJSON(object.contractInfo) : undefined - }; - }, - toJSON(message: QueryContractInfoResponse): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.contractInfo !== undefined && (obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryContractInfoResponse { - const message = createBaseQueryContractInfoResponse(); - message.address = object.address ?? ""; - message.contractInfo = object.contractInfo !== undefined && object.contractInfo !== null ? ContractInfo.fromPartial(object.contractInfo) : undefined; - return message; - }, - fromSDK(object: QueryContractInfoResponseSDKType): QueryContractInfoResponse { - return { - address: object?.address, - contractInfo: object.contract_info ? ContractInfo.fromSDK(object.contract_info) : undefined - }; - }, - toSDK(message: QueryContractInfoResponse): QueryContractInfoResponseSDKType { - const obj: any = {}; - obj.address = message.address; - message.contractInfo !== undefined && (obj.contract_info = message.contractInfo ? ContractInfo.toSDK(message.contractInfo) : undefined); - return obj; - }, - fromAmino(object: QueryContractInfoResponseAmino): QueryContractInfoResponse { - return { - address: object.address, - contractInfo: object?.contract_info ? ContractInfo.fromAmino(object.contract_info) : undefined - }; - }, - toAmino(message: QueryContractInfoResponse): QueryContractInfoResponseAmino { - const obj: any = {}; - obj.address = message.address; - obj.contract_info = message.contractInfo ? ContractInfo.toAmino(message.contractInfo) : undefined; - return obj; - }, - fromAminoMsg(object: QueryContractInfoResponseAminoMsg): QueryContractInfoResponse { - return QueryContractInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryContractInfoResponse): QueryContractInfoResponseAminoMsg { - return { - type: "wasm/QueryContractInfoResponse", - value: QueryContractInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryContractInfoResponseProtoMsg): QueryContractInfoResponse { - return QueryContractInfoResponse.decode(message.value); - }, - toProto(message: QueryContractInfoResponse): Uint8Array { - return QueryContractInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryContractInfoResponse): QueryContractInfoResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractInfoResponse", - value: QueryContractInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { - return { - address: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryContractHistoryRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", - aminoType: "wasm/QueryContractHistoryRequest", - encode(message: QueryContractHistoryRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryContractHistoryRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryContractHistoryRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryContractHistoryRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryContractHistoryRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryContractHistoryRequest { - const message = createBaseQueryContractHistoryRequest(); - message.address = object.address ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryContractHistoryRequestSDKType): QueryContractHistoryRequest { - return { - address: object?.address, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryContractHistoryRequest): QueryContractHistoryRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryContractHistoryRequestAmino): QueryContractHistoryRequest { - return { - address: object.address, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryContractHistoryRequest): QueryContractHistoryRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryContractHistoryRequestAminoMsg): QueryContractHistoryRequest { - return QueryContractHistoryRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryContractHistoryRequest): QueryContractHistoryRequestAminoMsg { - return { - type: "wasm/QueryContractHistoryRequest", - value: QueryContractHistoryRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryContractHistoryRequestProtoMsg): QueryContractHistoryRequest { - return QueryContractHistoryRequest.decode(message.value); - }, - toProto(message: QueryContractHistoryRequest): Uint8Array { - return QueryContractHistoryRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryContractHistoryRequest): QueryContractHistoryRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryRequest", - value: QueryContractHistoryRequest.encode(message).finish() - }; - } -}; -function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { - return { - entries: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryContractHistoryResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", - aminoType: "wasm/QueryContractHistoryResponse", - encode(message: QueryContractHistoryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.entries) { - ContractCodeHistoryEntry.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryContractHistoryResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryContractHistoryResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(ContractCodeHistoryEntry.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryContractHistoryResponse { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => ContractCodeHistoryEntry.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryContractHistoryResponse): unknown { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? ContractCodeHistoryEntry.toJSON(e) : undefined); - } else { - obj.entries = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryContractHistoryResponse { - const message = createBaseQueryContractHistoryResponse(); - message.entries = object.entries?.map(e => ContractCodeHistoryEntry.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryContractHistoryResponseSDKType): QueryContractHistoryResponse { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => ContractCodeHistoryEntry.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryContractHistoryResponse): QueryContractHistoryResponseSDKType { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? ContractCodeHistoryEntry.toSDK(e) : undefined); - } else { - obj.entries = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryContractHistoryResponseAmino): QueryContractHistoryResponse { - return { - entries: Array.isArray(object?.entries) ? object.entries.map((e: any) => ContractCodeHistoryEntry.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryContractHistoryResponse): QueryContractHistoryResponseAmino { - const obj: any = {}; - if (message.entries) { - obj.entries = message.entries.map(e => e ? ContractCodeHistoryEntry.toAmino(e) : undefined); - } else { - obj.entries = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryContractHistoryResponseAminoMsg): QueryContractHistoryResponse { - return QueryContractHistoryResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryContractHistoryResponse): QueryContractHistoryResponseAminoMsg { - return { - type: "wasm/QueryContractHistoryResponse", - value: QueryContractHistoryResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryContractHistoryResponseProtoMsg): QueryContractHistoryResponse { - return QueryContractHistoryResponse.decode(message.value); - }, - toProto(message: QueryContractHistoryResponse): Uint8Array { - return QueryContractHistoryResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryContractHistoryResponse): QueryContractHistoryResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractHistoryResponse", - value: QueryContractHistoryResponse.encode(message).finish() - }; - } -}; -function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { - return { - codeId: BigInt(0), - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryContractsByCodeRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", - aminoType: "wasm/QueryContractsByCodeRequest", - encode(message: QueryContractsByCodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryContractsByCodeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryContractsByCodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryContractsByCodeRequest { - return { - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryContractsByCodeRequest): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryContractsByCodeRequest { - const message = createBaseQueryContractsByCodeRequest(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryContractsByCodeRequestSDKType): QueryContractsByCodeRequest { - return { - codeId: object?.code_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryContractsByCodeRequest): QueryContractsByCodeRequestSDKType { - const obj: any = {}; - obj.code_id = message.codeId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryContractsByCodeRequestAmino): QueryContractsByCodeRequest { - return { - codeId: BigInt(object.code_id), - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryContractsByCodeRequest): QueryContractsByCodeRequestAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryContractsByCodeRequestAminoMsg): QueryContractsByCodeRequest { - return QueryContractsByCodeRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryContractsByCodeRequest): QueryContractsByCodeRequestAminoMsg { - return { - type: "wasm/QueryContractsByCodeRequest", - value: QueryContractsByCodeRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryContractsByCodeRequestProtoMsg): QueryContractsByCodeRequest { - return QueryContractsByCodeRequest.decode(message.value); - }, - toProto(message: QueryContractsByCodeRequest): Uint8Array { - return QueryContractsByCodeRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryContractsByCodeRequest): QueryContractsByCodeRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeRequest", - value: QueryContractsByCodeRequest.encode(message).finish() - }; - } -}; -function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { - return { - contracts: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryContractsByCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", - aminoType: "wasm/QueryContractsByCodeResponse", - encode(message: QueryContractsByCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.contracts) { - writer.uint32(10).string(v!); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryContractsByCodeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryContractsByCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contracts.push(reader.string()); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryContractsByCodeResponse { - return { - contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => String(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryContractsByCodeResponse): unknown { - const obj: any = {}; - if (message.contracts) { - obj.contracts = message.contracts.map(e => e); - } else { - obj.contracts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryContractsByCodeResponse { - const message = createBaseQueryContractsByCodeResponse(); - message.contracts = object.contracts?.map(e => e) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryContractsByCodeResponseSDKType): QueryContractsByCodeResponse { - return { - contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => e) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryContractsByCodeResponse): QueryContractsByCodeResponseSDKType { - const obj: any = {}; - if (message.contracts) { - obj.contracts = message.contracts.map(e => e); - } else { - obj.contracts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryContractsByCodeResponseAmino): QueryContractsByCodeResponse { - return { - contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => e) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryContractsByCodeResponse): QueryContractsByCodeResponseAmino { - const obj: any = {}; - if (message.contracts) { - obj.contracts = message.contracts.map(e => e); - } else { - obj.contracts = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryContractsByCodeResponseAminoMsg): QueryContractsByCodeResponse { - return QueryContractsByCodeResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryContractsByCodeResponse): QueryContractsByCodeResponseAminoMsg { - return { - type: "wasm/QueryContractsByCodeResponse", - value: QueryContractsByCodeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryContractsByCodeResponseProtoMsg): QueryContractsByCodeResponse { - return QueryContractsByCodeResponse.decode(message.value); - }, - toProto(message: QueryContractsByCodeResponse): Uint8Array { - return QueryContractsByCodeResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryContractsByCodeResponse): QueryContractsByCodeResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryContractsByCodeResponse", - value: QueryContractsByCodeResponse.encode(message).finish() - }; - } -}; -function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { - return { - address: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryAllContractStateRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", - aminoType: "wasm/QueryAllContractStateRequest", - encode(message: QueryAllContractStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllContractStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllContractStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllContractStateRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllContractStateRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllContractStateRequest { - const message = createBaseQueryAllContractStateRequest(); - message.address = object.address ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllContractStateRequestSDKType): QueryAllContractStateRequest { - return { - address: object?.address, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllContractStateRequest): QueryAllContractStateRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllContractStateRequestAmino): QueryAllContractStateRequest { - return { - address: object.address, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllContractStateRequest): QueryAllContractStateRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllContractStateRequestAminoMsg): QueryAllContractStateRequest { - return QueryAllContractStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllContractStateRequest): QueryAllContractStateRequestAminoMsg { - return { - type: "wasm/QueryAllContractStateRequest", - value: QueryAllContractStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllContractStateRequestProtoMsg): QueryAllContractStateRequest { - return QueryAllContractStateRequest.decode(message.value); - }, - toProto(message: QueryAllContractStateRequest): Uint8Array { - return QueryAllContractStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAllContractStateRequest): QueryAllContractStateRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateRequest", - value: QueryAllContractStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { - return { - models: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryAllContractStateResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", - aminoType: "wasm/QueryAllContractStateResponse", - encode(message: QueryAllContractStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.models) { - Model.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAllContractStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllContractStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.models.push(Model.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAllContractStateResponse { - return { - models: Array.isArray(object?.models) ? object.models.map((e: any) => Model.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryAllContractStateResponse): unknown { - const obj: any = {}; - if (message.models) { - obj.models = message.models.map(e => e ? Model.toJSON(e) : undefined); - } else { - obj.models = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryAllContractStateResponse { - const message = createBaseQueryAllContractStateResponse(); - message.models = object.models?.map(e => Model.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryAllContractStateResponseSDKType): QueryAllContractStateResponse { - return { - models: Array.isArray(object?.models) ? object.models.map((e: any) => Model.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryAllContractStateResponse): QueryAllContractStateResponseSDKType { - const obj: any = {}; - if (message.models) { - obj.models = message.models.map(e => e ? Model.toSDK(e) : undefined); - } else { - obj.models = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryAllContractStateResponseAmino): QueryAllContractStateResponse { - return { - models: Array.isArray(object?.models) ? object.models.map((e: any) => Model.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryAllContractStateResponse): QueryAllContractStateResponseAmino { - const obj: any = {}; - if (message.models) { - obj.models = message.models.map(e => e ? Model.toAmino(e) : undefined); - } else { - obj.models = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryAllContractStateResponseAminoMsg): QueryAllContractStateResponse { - return QueryAllContractStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAllContractStateResponse): QueryAllContractStateResponseAminoMsg { - return { - type: "wasm/QueryAllContractStateResponse", - value: QueryAllContractStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAllContractStateResponseProtoMsg): QueryAllContractStateResponse { - return QueryAllContractStateResponse.decode(message.value); - }, - toProto(message: QueryAllContractStateResponse): Uint8Array { - return QueryAllContractStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAllContractStateResponse): QueryAllContractStateResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryAllContractStateResponse", - value: QueryAllContractStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { - return { - address: "", - queryData: new Uint8Array() - }; -} -export const QueryRawContractStateRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", - aminoType: "wasm/QueryRawContractStateRequest", - encode(message: QueryRawContractStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.queryData.length !== 0) { - writer.uint32(18).bytes(message.queryData); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryRawContractStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryRawContractStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryRawContractStateRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - queryData: isSet(object.queryData) ? bytesFromBase64(object.queryData) : new Uint8Array() - }; - }, - toJSON(message: QueryRawContractStateRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.queryData !== undefined && (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryRawContractStateRequest { - const message = createBaseQueryRawContractStateRequest(); - message.address = object.address ?? ""; - message.queryData = object.queryData ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryRawContractStateRequestSDKType): QueryRawContractStateRequest { - return { - address: object?.address, - queryData: object?.query_data - }; - }, - toSDK(message: QueryRawContractStateRequest): QueryRawContractStateRequestSDKType { - const obj: any = {}; - obj.address = message.address; - obj.query_data = message.queryData; - return obj; - }, - fromAmino(object: QueryRawContractStateRequestAmino): QueryRawContractStateRequest { - return { - address: object.address, - queryData: object.query_data - }; - }, - toAmino(message: QueryRawContractStateRequest): QueryRawContractStateRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.query_data = message.queryData; - return obj; - }, - fromAminoMsg(object: QueryRawContractStateRequestAminoMsg): QueryRawContractStateRequest { - return QueryRawContractStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryRawContractStateRequest): QueryRawContractStateRequestAminoMsg { - return { - type: "wasm/QueryRawContractStateRequest", - value: QueryRawContractStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryRawContractStateRequestProtoMsg): QueryRawContractStateRequest { - return QueryRawContractStateRequest.decode(message.value); - }, - toProto(message: QueryRawContractStateRequest): Uint8Array { - return QueryRawContractStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryRawContractStateRequest): QueryRawContractStateRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateRequest", - value: QueryRawContractStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { - return { - data: new Uint8Array() - }; -} -export const QueryRawContractStateResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", - aminoType: "wasm/QueryRawContractStateResponse", - encode(message: QueryRawContractStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryRawContractStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryRawContractStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryRawContractStateResponse { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: QueryRawContractStateResponse): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryRawContractStateResponse { - const message = createBaseQueryRawContractStateResponse(); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryRawContractStateResponseSDKType): QueryRawContractStateResponse { - return { - data: object?.data - }; - }, - toSDK(message: QueryRawContractStateResponse): QueryRawContractStateResponseSDKType { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAmino(object: QueryRawContractStateResponseAmino): QueryRawContractStateResponse { - return { - data: object.data - }; - }, - toAmino(message: QueryRawContractStateResponse): QueryRawContractStateResponseAmino { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: QueryRawContractStateResponseAminoMsg): QueryRawContractStateResponse { - return QueryRawContractStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryRawContractStateResponse): QueryRawContractStateResponseAminoMsg { - return { - type: "wasm/QueryRawContractStateResponse", - value: QueryRawContractStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryRawContractStateResponseProtoMsg): QueryRawContractStateResponse { - return QueryRawContractStateResponse.decode(message.value); - }, - toProto(message: QueryRawContractStateResponse): Uint8Array { - return QueryRawContractStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryRawContractStateResponse): QueryRawContractStateResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryRawContractStateResponse", - value: QueryRawContractStateResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { - return { - address: "", - queryData: new Uint8Array() - }; -} -export const QuerySmartContractStateRequest = { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", - aminoType: "wasm/QuerySmartContractStateRequest", - encode(message: QuerySmartContractStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.queryData.length !== 0) { - writer.uint32(18).bytes(message.queryData); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySmartContractStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySmartContractStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySmartContractStateRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - queryData: isSet(object.queryData) ? bytesFromBase64(object.queryData) : new Uint8Array() - }; - }, - toJSON(message: QuerySmartContractStateRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.queryData !== undefined && (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QuerySmartContractStateRequest { - const message = createBaseQuerySmartContractStateRequest(); - message.address = object.address ?? ""; - message.queryData = object.queryData ?? new Uint8Array(); - return message; - }, - fromSDK(object: QuerySmartContractStateRequestSDKType): QuerySmartContractStateRequest { - return { - address: object?.address, - queryData: object?.query_data - }; - }, - toSDK(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestSDKType { - const obj: any = {}; - obj.address = message.address; - obj.query_data = message.queryData; - return obj; - }, - fromAmino(object: QuerySmartContractStateRequestAmino): QuerySmartContractStateRequest { - return { - address: object.address, - queryData: toUtf8(JSON.stringify(object.query_data)) - }; - }, - toAmino(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.query_data = message.queryData ? JSON.parse(fromUtf8(message.queryData)) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySmartContractStateRequestAminoMsg): QuerySmartContractStateRequest { - return QuerySmartContractStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestAminoMsg { - return { - type: "wasm/QuerySmartContractStateRequest", - value: QuerySmartContractStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySmartContractStateRequestProtoMsg): QuerySmartContractStateRequest { - return QuerySmartContractStateRequest.decode(message.value); - }, - toProto(message: QuerySmartContractStateRequest): Uint8Array { - return QuerySmartContractStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySmartContractStateRequest): QuerySmartContractStateRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateRequest", - value: QuerySmartContractStateRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { - return { - data: new Uint8Array() - }; -} -export const QuerySmartContractStateResponse = { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", - aminoType: "wasm/QuerySmartContractStateResponse", - encode(message: QuerySmartContractStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySmartContractStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySmartContractStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySmartContractStateResponse { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: QuerySmartContractStateResponse): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QuerySmartContractStateResponse { - const message = createBaseQuerySmartContractStateResponse(); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: QuerySmartContractStateResponseSDKType): QuerySmartContractStateResponse { - return { - data: object?.data - }; - }, - toSDK(message: QuerySmartContractStateResponse): QuerySmartContractStateResponseSDKType { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAmino(object: QuerySmartContractStateResponseAmino): QuerySmartContractStateResponse { - return { - data: toUtf8(JSON.stringify(object.data)) - }; - }, - toAmino(message: QuerySmartContractStateResponse): QuerySmartContractStateResponseAmino { - const obj: any = {}; - obj.data = message.data ? JSON.parse(fromUtf8(message.data)) : undefined; - return obj; - }, - fromAminoMsg(object: QuerySmartContractStateResponseAminoMsg): QuerySmartContractStateResponse { - return QuerySmartContractStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySmartContractStateResponse): QuerySmartContractStateResponseAminoMsg { - return { - type: "wasm/QuerySmartContractStateResponse", - value: QuerySmartContractStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySmartContractStateResponseProtoMsg): QuerySmartContractStateResponse { - return QuerySmartContractStateResponse.decode(message.value); - }, - toProto(message: QuerySmartContractStateResponse): Uint8Array { - return QuerySmartContractStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySmartContractStateResponse): QuerySmartContractStateResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QuerySmartContractStateResponse", - value: QuerySmartContractStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCodeRequest(): QueryCodeRequest { - return { - codeId: BigInt(0) - }; -} -export const QueryCodeRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", - aminoType: "wasm/QueryCodeRequest", - encode(message: QueryCodeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCodeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCodeRequest { - return { - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryCodeRequest): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryCodeRequest { - const message = createBaseQueryCodeRequest(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryCodeRequestSDKType): QueryCodeRequest { - return { - codeId: object?.code_id - }; - }, - toSDK(message: QueryCodeRequest): QueryCodeRequestSDKType { - const obj: any = {}; - obj.code_id = message.codeId; - return obj; - }, - fromAmino(object: QueryCodeRequestAmino): QueryCodeRequest { - return { - codeId: BigInt(object.code_id) - }; - }, - toAmino(message: QueryCodeRequest): QueryCodeRequestAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryCodeRequestAminoMsg): QueryCodeRequest { - return QueryCodeRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCodeRequest): QueryCodeRequestAminoMsg { - return { - type: "wasm/QueryCodeRequest", - value: QueryCodeRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCodeRequestProtoMsg): QueryCodeRequest { - return QueryCodeRequest.decode(message.value); - }, - toProto(message: QueryCodeRequest): Uint8Array { - return QueryCodeRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCodeRequest): QueryCodeRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeRequest", - value: QueryCodeRequest.encode(message).finish() - }; - } -}; -function createBaseCodeInfoResponse(): CodeInfoResponse { - return { - codeId: BigInt(0), - creator: "", - dataHash: new Uint8Array() - }; -} -export const CodeInfoResponse = { - typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", - aminoType: "wasm/CodeInfoResponse", - encode(message: CodeInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.dataHash.length !== 0) { - writer.uint32(26).bytes(message.dataHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CodeInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCodeInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.dataHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CodeInfoResponse { - return { - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - creator: isSet(object.creator) ? String(object.creator) : "", - dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array() - }; - }, - toJSON(message: CodeInfoResponse): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.creator !== undefined && (obj.creator = message.creator); - message.dataHash !== undefined && (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): CodeInfoResponse { - const message = createBaseCodeInfoResponse(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.creator = object.creator ?? ""; - message.dataHash = object.dataHash ?? new Uint8Array(); - return message; - }, - fromSDK(object: CodeInfoResponseSDKType): CodeInfoResponse { - return { - codeId: object?.code_id, - creator: object?.creator, - dataHash: object?.data_hash - }; - }, - toSDK(message: CodeInfoResponse): CodeInfoResponseSDKType { - const obj: any = {}; - obj.code_id = message.codeId; - obj.creator = message.creator; - obj.data_hash = message.dataHash; - return obj; - }, - fromAmino(object: CodeInfoResponseAmino): CodeInfoResponse { - return { - codeId: BigInt(object.code_id), - creator: object.creator, - dataHash: object.data_hash - }; - }, - toAmino(message: CodeInfoResponse): CodeInfoResponseAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.creator = message.creator; - obj.data_hash = message.dataHash; - return obj; - }, - fromAminoMsg(object: CodeInfoResponseAminoMsg): CodeInfoResponse { - return CodeInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: CodeInfoResponse): CodeInfoResponseAminoMsg { - return { - type: "wasm/CodeInfoResponse", - value: CodeInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: CodeInfoResponseProtoMsg): CodeInfoResponse { - return CodeInfoResponse.decode(message.value); - }, - toProto(message: CodeInfoResponse): Uint8Array { - return CodeInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: CodeInfoResponse): CodeInfoResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.CodeInfoResponse", - value: CodeInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCodeResponse(): QueryCodeResponse { - return { - codeInfo: CodeInfoResponse.fromPartial({}), - data: new Uint8Array() - }; -} -export const QueryCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", - aminoType: "wasm/QueryCodeResponse", - encode(message: QueryCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeInfo !== undefined) { - CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCodeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32()); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCodeResponse { - return { - codeInfo: isSet(object.codeInfo) ? CodeInfoResponse.fromJSON(object.codeInfo) : undefined, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: QueryCodeResponse): unknown { - const obj: any = {}; - message.codeInfo !== undefined && (obj.codeInfo = message.codeInfo ? CodeInfoResponse.toJSON(message.codeInfo) : undefined); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryCodeResponse { - const message = createBaseQueryCodeResponse(); - message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null ? CodeInfoResponse.fromPartial(object.codeInfo) : undefined; - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryCodeResponseSDKType): QueryCodeResponse { - return { - codeInfo: object.code_info ? CodeInfoResponse.fromSDK(object.code_info) : undefined, - data: object?.data - }; - }, - toSDK(message: QueryCodeResponse): QueryCodeResponseSDKType { - const obj: any = {}; - message.codeInfo !== undefined && (obj.code_info = message.codeInfo ? CodeInfoResponse.toSDK(message.codeInfo) : undefined); - obj.data = message.data; - return obj; - }, - fromAmino(object: QueryCodeResponseAmino): QueryCodeResponse { - return { - codeInfo: object?.code_info ? CodeInfoResponse.fromAmino(object.code_info) : undefined, - data: object.data - }; - }, - toAmino(message: QueryCodeResponse): QueryCodeResponseAmino { - const obj: any = {}; - obj.code_info = message.codeInfo ? CodeInfoResponse.toAmino(message.codeInfo) : undefined; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: QueryCodeResponseAminoMsg): QueryCodeResponse { - return QueryCodeResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCodeResponse): QueryCodeResponseAminoMsg { - return { - type: "wasm/QueryCodeResponse", - value: QueryCodeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCodeResponseProtoMsg): QueryCodeResponse { - return QueryCodeResponse.decode(message.value); - }, - toProto(message: QueryCodeResponse): Uint8Array { - return QueryCodeResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCodeResponse): QueryCodeResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodeResponse", - value: QueryCodeResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCodesRequest(): QueryCodesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryCodesRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", - aminoType: "wasm/QueryCodesRequest", - encode(message: QueryCodesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCodesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCodesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCodesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryCodesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryCodesRequest { - const message = createBaseQueryCodesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryCodesRequestSDKType): QueryCodesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryCodesRequest): QueryCodesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryCodesRequestAmino): QueryCodesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryCodesRequest): QueryCodesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryCodesRequestAminoMsg): QueryCodesRequest { - return QueryCodesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCodesRequest): QueryCodesRequestAminoMsg { - return { - type: "wasm/QueryCodesRequest", - value: QueryCodesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCodesRequestProtoMsg): QueryCodesRequest { - return QueryCodesRequest.decode(message.value); - }, - toProto(message: QueryCodesRequest): Uint8Array { - return QueryCodesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCodesRequest): QueryCodesRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesRequest", - value: QueryCodesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCodesResponse(): QueryCodesResponse { - return { - codeInfos: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryCodesResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", - aminoType: "wasm/QueryCodesResponse", - encode(message: QueryCodesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.codeInfos) { - CodeInfoResponse.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCodesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCodesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCodesResponse { - return { - codeInfos: Array.isArray(object?.codeInfos) ? object.codeInfos.map((e: any) => CodeInfoResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryCodesResponse): unknown { - const obj: any = {}; - if (message.codeInfos) { - obj.codeInfos = message.codeInfos.map(e => e ? CodeInfoResponse.toJSON(e) : undefined); - } else { - obj.codeInfos = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryCodesResponse { - const message = createBaseQueryCodesResponse(); - message.codeInfos = object.codeInfos?.map(e => CodeInfoResponse.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryCodesResponseSDKType): QueryCodesResponse { - return { - codeInfos: Array.isArray(object?.code_infos) ? object.code_infos.map((e: any) => CodeInfoResponse.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryCodesResponse): QueryCodesResponseSDKType { - const obj: any = {}; - if (message.codeInfos) { - obj.code_infos = message.codeInfos.map(e => e ? CodeInfoResponse.toSDK(e) : undefined); - } else { - obj.code_infos = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryCodesResponseAmino): QueryCodesResponse { - return { - codeInfos: Array.isArray(object?.code_infos) ? object.code_infos.map((e: any) => CodeInfoResponse.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryCodesResponse): QueryCodesResponseAmino { - const obj: any = {}; - if (message.codeInfos) { - obj.code_infos = message.codeInfos.map(e => e ? CodeInfoResponse.toAmino(e) : undefined); - } else { - obj.code_infos = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryCodesResponseAminoMsg): QueryCodesResponse { - return QueryCodesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCodesResponse): QueryCodesResponseAminoMsg { - return { - type: "wasm/QueryCodesResponse", - value: QueryCodesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCodesResponseProtoMsg): QueryCodesResponse { - return QueryCodesResponse.decode(message.value); - }, - toProto(message: QueryCodesResponse): Uint8Array { - return QueryCodesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCodesResponse): QueryCodesResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryCodesResponse", - value: QueryCodesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryPinnedCodesRequest = { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", - aminoType: "wasm/QueryPinnedCodesRequest", - encode(message: QueryPinnedCodesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPinnedCodesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPinnedCodesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPinnedCodesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPinnedCodesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPinnedCodesRequest { - const message = createBaseQueryPinnedCodesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPinnedCodesRequestSDKType): QueryPinnedCodesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPinnedCodesRequest): QueryPinnedCodesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPinnedCodesRequestAmino): QueryPinnedCodesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPinnedCodesRequest): QueryPinnedCodesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPinnedCodesRequestAminoMsg): QueryPinnedCodesRequest { - return QueryPinnedCodesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPinnedCodesRequest): QueryPinnedCodesRequestAminoMsg { - return { - type: "wasm/QueryPinnedCodesRequest", - value: QueryPinnedCodesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPinnedCodesRequestProtoMsg): QueryPinnedCodesRequest { - return QueryPinnedCodesRequest.decode(message.value); - }, - toProto(message: QueryPinnedCodesRequest): Uint8Array { - return QueryPinnedCodesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPinnedCodesRequest): QueryPinnedCodesRequestProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesRequest", - value: QueryPinnedCodesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { - return { - codeIds: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryPinnedCodesResponse = { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", - aminoType: "wasm/QueryPinnedCodesResponse", - encode(message: QueryPinnedCodesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPinnedCodesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPinnedCodesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } else { - message.codeIds.push(reader.uint64()); - } - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPinnedCodesResponse { - return { - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => BigInt(e.toString())) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPinnedCodesResponse): unknown { - const obj: any = {}; - if (message.codeIds) { - obj.codeIds = message.codeIds.map(e => (e || BigInt(0)).toString()); - } else { - obj.codeIds = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPinnedCodesResponse { - const message = createBaseQueryPinnedCodesResponse(); - message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPinnedCodesResponseSDKType): QueryPinnedCodesResponse { - return { - codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => e) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPinnedCodesResponse): QueryPinnedCodesResponseSDKType { - const obj: any = {}; - if (message.codeIds) { - obj.code_ids = message.codeIds.map(e => e); - } else { - obj.code_ids = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPinnedCodesResponseAmino): QueryPinnedCodesResponse { - return { - codeIds: Array.isArray(object?.code_ids) ? object.code_ids.map((e: any) => BigInt(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPinnedCodesResponse): QueryPinnedCodesResponseAmino { - const obj: any = {}; - if (message.codeIds) { - obj.code_ids = message.codeIds.map(e => e.toString()); - } else { - obj.code_ids = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPinnedCodesResponseAminoMsg): QueryPinnedCodesResponse { - return QueryPinnedCodesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPinnedCodesResponse): QueryPinnedCodesResponseAminoMsg { - return { - type: "wasm/QueryPinnedCodesResponse", - value: QueryPinnedCodesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPinnedCodesResponseProtoMsg): QueryPinnedCodesResponse { - return QueryPinnedCodesResponse.decode(message.value); - }, - toProto(message: QueryPinnedCodesResponse): Uint8Array { - return QueryPinnedCodesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPinnedCodesResponse): QueryPinnedCodesResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.QueryPinnedCodesResponse", - value: QueryPinnedCodesResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.amino.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.amino.ts deleted file mode 100644 index 6ee2dfe8..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.amino.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin } from "./tx"; -export const AminoConverter = { - "/cosmwasm.wasm.v1.MsgStoreCode": { - aminoType: "wasm/MsgStoreCode", - toAmino: MsgStoreCode.toAmino, - fromAmino: MsgStoreCode.fromAmino - }, - "/cosmwasm.wasm.v1.MsgInstantiateContract": { - aminoType: "wasm/MsgInstantiateContract", - toAmino: MsgInstantiateContract.toAmino, - fromAmino: MsgInstantiateContract.fromAmino - }, - "/cosmwasm.wasm.v1.MsgExecuteContract": { - aminoType: "wasm/MsgExecuteContract", - toAmino: MsgExecuteContract.toAmino, - fromAmino: MsgExecuteContract.fromAmino - }, - "/cosmwasm.wasm.v1.MsgMigrateContract": { - aminoType: "wasm/MsgMigrateContract", - toAmino: MsgMigrateContract.toAmino, - fromAmino: MsgMigrateContract.fromAmino - }, - "/cosmwasm.wasm.v1.MsgUpdateAdmin": { - aminoType: "wasm/MsgUpdateAdmin", - toAmino: MsgUpdateAdmin.toAmino, - fromAmino: MsgUpdateAdmin.fromAmino - }, - "/cosmwasm.wasm.v1.MsgClearAdmin": { - aminoType: "wasm/MsgClearAdmin", - toAmino: MsgClearAdmin.toAmino, - fromAmino: MsgClearAdmin.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.registry.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.registry.ts deleted file mode 100644 index fb07817a..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.registry.ts +++ /dev/null @@ -1,201 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - storeCode(value: MsgStoreCode) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value: MsgStoreCode.encode(value).finish() - }; - }, - instantiateContract(value: MsgInstantiateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value: MsgInstantiateContract.encode(value).finish() - }; - }, - executeContract(value: MsgExecuteContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value: MsgExecuteContract.encode(value).finish() - }; - }, - migrateContract(value: MsgMigrateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value: MsgMigrateContract.encode(value).finish() - }; - }, - updateAdmin(value: MsgUpdateAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value: MsgUpdateAdmin.encode(value).finish() - }; - }, - clearAdmin(value: MsgClearAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value: MsgClearAdmin.encode(value).finish() - }; - } - }, - withTypeUrl: { - storeCode(value: MsgStoreCode) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value - }; - }, - instantiateContract(value: MsgInstantiateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value - }; - }, - executeContract(value: MsgExecuteContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value - }; - }, - migrateContract(value: MsgMigrateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value - }; - }, - updateAdmin(value: MsgUpdateAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value - }; - }, - clearAdmin(value: MsgClearAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value - }; - } - }, - toJSON: { - storeCode(value: MsgStoreCode) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value: MsgStoreCode.toJSON(value) - }; - }, - instantiateContract(value: MsgInstantiateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value: MsgInstantiateContract.toJSON(value) - }; - }, - executeContract(value: MsgExecuteContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value: MsgExecuteContract.toJSON(value) - }; - }, - migrateContract(value: MsgMigrateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value: MsgMigrateContract.toJSON(value) - }; - }, - updateAdmin(value: MsgUpdateAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value: MsgUpdateAdmin.toJSON(value) - }; - }, - clearAdmin(value: MsgClearAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value: MsgClearAdmin.toJSON(value) - }; - } - }, - fromJSON: { - storeCode(value: any) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value: MsgStoreCode.fromJSON(value) - }; - }, - instantiateContract(value: any) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value: MsgInstantiateContract.fromJSON(value) - }; - }, - executeContract(value: any) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value: MsgExecuteContract.fromJSON(value) - }; - }, - migrateContract(value: any) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value: MsgMigrateContract.fromJSON(value) - }; - }, - updateAdmin(value: any) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value: MsgUpdateAdmin.fromJSON(value) - }; - }, - clearAdmin(value: any) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value: MsgClearAdmin.fromJSON(value) - }; - } - }, - fromPartial: { - storeCode(value: MsgStoreCode) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value: MsgStoreCode.fromPartial(value) - }; - }, - instantiateContract(value: MsgInstantiateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value: MsgInstantiateContract.fromPartial(value) - }; - }, - executeContract(value: MsgExecuteContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value: MsgExecuteContract.fromPartial(value) - }; - }, - migrateContract(value: MsgMigrateContract) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value: MsgMigrateContract.fromPartial(value) - }; - }, - updateAdmin(value: MsgUpdateAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value: MsgUpdateAdmin.fromPartial(value) - }; - }, - clearAdmin(value: MsgClearAdmin) { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value: MsgClearAdmin.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts deleted file mode 100644 index 0996eb0e..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgStoreCode, MsgStoreCodeResponse, MsgInstantiateContract, MsgInstantiateContractResponse, MsgExecuteContract, MsgExecuteContractResponse, MsgMigrateContract, MsgMigrateContractResponse, MsgUpdateAdmin, MsgUpdateAdminResponse, MsgClearAdmin, MsgClearAdminResponse } from "./tx"; -/** Msg defines the wasm Msg service. */ -export interface Msg { - /** StoreCode to submit Wasm code to the system */ - storeCode(request: MsgStoreCode): Promise; - /** Instantiate creates a new smart contract instance for the given code id. */ - instantiateContract(request: MsgInstantiateContract): Promise; - /** Execute submits the given message data to a smart contract */ - executeContract(request: MsgExecuteContract): Promise; - /** Migrate runs a code upgrade/ downgrade for a smart contract */ - migrateContract(request: MsgMigrateContract): Promise; - /** UpdateAdmin sets a new admin for a smart contract */ - updateAdmin(request: MsgUpdateAdmin): Promise; - /** ClearAdmin removes any admin stored for a smart contract */ - clearAdmin(request: MsgClearAdmin): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.storeCode = this.storeCode.bind(this); - this.instantiateContract = this.instantiateContract.bind(this); - this.executeContract = this.executeContract.bind(this); - this.migrateContract = this.migrateContract.bind(this); - this.updateAdmin = this.updateAdmin.bind(this); - this.clearAdmin = this.clearAdmin.bind(this); - } - storeCode(request: MsgStoreCode): Promise { - const data = MsgStoreCode.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreCode", data); - return promise.then(data => MsgStoreCodeResponse.decode(new BinaryReader(data))); - } - instantiateContract(request: MsgInstantiateContract): Promise { - const data = MsgInstantiateContract.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "InstantiateContract", data); - return promise.then(data => MsgInstantiateContractResponse.decode(new BinaryReader(data))); - } - executeContract(request: MsgExecuteContract): Promise { - const data = MsgExecuteContract.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "ExecuteContract", data); - return promise.then(data => MsgExecuteContractResponse.decode(new BinaryReader(data))); - } - migrateContract(request: MsgMigrateContract): Promise { - const data = MsgMigrateContract.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "MigrateContract", data); - return promise.then(data => MsgMigrateContractResponse.decode(new BinaryReader(data))); - } - updateAdmin(request: MsgUpdateAdmin): Promise { - const data = MsgUpdateAdmin.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateAdmin", data); - return promise.then(data => MsgUpdateAdminResponse.decode(new BinaryReader(data))); - } - clearAdmin(request: MsgClearAdmin): Promise { - const data = MsgClearAdmin.encode(request).finish(); - const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "ClearAdmin", data); - return promise.then(data => MsgClearAdminResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.ts deleted file mode 100644 index 694691a7..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/tx.ts +++ /dev/null @@ -1,1641 +0,0 @@ -import { AccessConfig, AccessConfigAmino, AccessConfigSDKType } from "./types"; -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; -import { fromBase64, toBase64, toUtf8, fromUtf8 } from "@cosmjs/encoding"; -/** MsgStoreCode submit Wasm code to the system */ -export interface MsgStoreCode { - /** Sender is the that actor that signed the messages */ - sender: string; - /** WASMByteCode can be raw or gzip compressed */ - wasmByteCode: Uint8Array; - /** - * InstantiatePermission access control to apply on contract creation, - * optional - */ - instantiatePermission: AccessConfig | undefined; -} -export interface MsgStoreCodeProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode"; - value: Uint8Array; -} -/** MsgStoreCode submit Wasm code to the system */ -export interface MsgStoreCodeAmino { - /** Sender is the that actor that signed the messages */ - sender: string; - /** WASMByteCode can be raw or gzip compressed */ - wasm_byte_code: string; - /** - * InstantiatePermission access control to apply on contract creation, - * optional - */ - instantiate_permission?: AccessConfigAmino | undefined; -} -export interface MsgStoreCodeAminoMsg { - type: "wasm/MsgStoreCode"; - value: MsgStoreCodeAmino; -} -/** MsgStoreCode submit Wasm code to the system */ -export interface MsgStoreCodeSDKType { - sender: string; - wasm_byte_code: Uint8Array; - instantiate_permission: AccessConfigSDKType | undefined; -} -/** MsgStoreCodeResponse returns store result data. */ -export interface MsgStoreCodeResponse { - /** CodeID is the reference to the stored WASM code */ - codeId: bigint; -} -export interface MsgStoreCodeResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse"; - value: Uint8Array; -} -/** MsgStoreCodeResponse returns store result data. */ -export interface MsgStoreCodeResponseAmino { - /** CodeID is the reference to the stored WASM code */ - code_id: string; -} -export interface MsgStoreCodeResponseAminoMsg { - type: "wasm/MsgStoreCodeResponse"; - value: MsgStoreCodeResponseAmino; -} -/** MsgStoreCodeResponse returns store result data. */ -export interface MsgStoreCodeResponseSDKType { - code_id: bigint; -} -/** - * MsgInstantiateContract create a new smart contract instance for the given - * code id. - */ -export interface MsgInstantiateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - codeId: bigint; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -export interface MsgInstantiateContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract"; - value: Uint8Array; -} -/** - * MsgInstantiateContract create a new smart contract instance for the given - * code id. - */ -export interface MsgInstantiateContractAmino { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - code_id: string; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: CoinAmino[]; -} -export interface MsgInstantiateContractAminoMsg { - type: "wasm/MsgInstantiateContract"; - value: MsgInstantiateContractAmino; -} -/** - * MsgInstantiateContract create a new smart contract instance for the given - * code id. - */ -export interface MsgInstantiateContractSDKType { - sender: string; - admin: string; - code_id: bigint; - label: string; - msg: Uint8Array; - funds: CoinSDKType[]; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -export interface MsgInstantiateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse"; - value: Uint8Array; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponseAmino { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -export interface MsgInstantiateContractResponseAminoMsg { - type: "wasm/MsgInstantiateContractResponse"; - value: MsgInstantiateContractResponseAmino; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponseSDKType { - address: string; - data: Uint8Array; -} -/** MsgExecuteContract submits the given message data to a smart contract */ -export interface MsgExecuteContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on execution */ - funds: Coin[]; -} -export interface MsgExecuteContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract"; - value: Uint8Array; -} -/** MsgExecuteContract submits the given message data to a smart contract */ -export interface MsgExecuteContractAmino { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on execution */ - funds: CoinAmino[]; -} -export interface MsgExecuteContractAminoMsg { - type: "wasm/MsgExecuteContract"; - value: MsgExecuteContractAmino; -} -/** MsgExecuteContract submits the given message data to a smart contract */ -export interface MsgExecuteContractSDKType { - sender: string; - contract: string; - msg: Uint8Array; - funds: CoinSDKType[]; -} -/** MsgExecuteContractResponse returns execution result data. */ -export interface MsgExecuteContractResponse { - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -export interface MsgExecuteContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse"; - value: Uint8Array; -} -/** MsgExecuteContractResponse returns execution result data. */ -export interface MsgExecuteContractResponseAmino { - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -export interface MsgExecuteContractResponseAminoMsg { - type: "wasm/MsgExecuteContractResponse"; - value: MsgExecuteContractResponseAmino; -} -/** MsgExecuteContractResponse returns execution result data. */ -export interface MsgExecuteContractResponseSDKType { - data: Uint8Array; -} -/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ -export interface MsgMigrateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - codeId: bigint; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -export interface MsgMigrateContractProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract"; - value: Uint8Array; -} -/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ -export interface MsgMigrateContractAmino { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - code_id: string; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -export interface MsgMigrateContractAminoMsg { - type: "wasm/MsgMigrateContract"; - value: MsgMigrateContractAmino; -} -/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ -export interface MsgMigrateContractSDKType { - sender: string; - contract: string; - code_id: bigint; - msg: Uint8Array; -} -/** MsgMigrateContractResponse returns contract migration result data. */ -export interface MsgMigrateContractResponse { - /** - * Data contains same raw bytes returned as data from the wasm contract. - * (May be empty) - */ - data: Uint8Array; -} -export interface MsgMigrateContractResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse"; - value: Uint8Array; -} -/** MsgMigrateContractResponse returns contract migration result data. */ -export interface MsgMigrateContractResponseAmino { - /** - * Data contains same raw bytes returned as data from the wasm contract. - * (May be empty) - */ - data: Uint8Array; -} -export interface MsgMigrateContractResponseAminoMsg { - type: "wasm/MsgMigrateContractResponse"; - value: MsgMigrateContractResponseAmino; -} -/** MsgMigrateContractResponse returns contract migration result data. */ -export interface MsgMigrateContractResponseSDKType { - data: Uint8Array; -} -/** MsgUpdateAdmin sets a new admin for a smart contract */ -export interface MsgUpdateAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** NewAdmin address to be set */ - newAdmin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface MsgUpdateAdminProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin"; - value: Uint8Array; -} -/** MsgUpdateAdmin sets a new admin for a smart contract */ -export interface MsgUpdateAdminAmino { - /** Sender is the that actor that signed the messages */ - sender: string; - /** NewAdmin address to be set */ - new_admin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface MsgUpdateAdminAminoMsg { - type: "wasm/MsgUpdateAdmin"; - value: MsgUpdateAdminAmino; -} -/** MsgUpdateAdmin sets a new admin for a smart contract */ -export interface MsgUpdateAdminSDKType { - sender: string; - new_admin: string; - contract: string; -} -/** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponse {} -export interface MsgUpdateAdminResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse"; - value: Uint8Array; -} -/** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponseAmino {} -export interface MsgUpdateAdminResponseAminoMsg { - type: "wasm/MsgUpdateAdminResponse"; - value: MsgUpdateAdminResponseAmino; -} -/** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponseSDKType {} -/** MsgClearAdmin removes any admin stored for a smart contract */ -export interface MsgClearAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface MsgClearAdminProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin"; - value: Uint8Array; -} -/** MsgClearAdmin removes any admin stored for a smart contract */ -export interface MsgClearAdminAmino { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; -} -export interface MsgClearAdminAminoMsg { - type: "wasm/MsgClearAdmin"; - value: MsgClearAdminAmino; -} -/** MsgClearAdmin removes any admin stored for a smart contract */ -export interface MsgClearAdminSDKType { - sender: string; - contract: string; -} -/** MsgClearAdminResponse returns empty data */ -export interface MsgClearAdminResponse {} -export interface MsgClearAdminResponseProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse"; - value: Uint8Array; -} -/** MsgClearAdminResponse returns empty data */ -export interface MsgClearAdminResponseAmino {} -export interface MsgClearAdminResponseAminoMsg { - type: "wasm/MsgClearAdminResponse"; - value: MsgClearAdminResponseAmino; -} -/** MsgClearAdminResponse returns empty data */ -export interface MsgClearAdminResponseSDKType {} -function createBaseMsgStoreCode(): MsgStoreCode { - return { - sender: "", - wasmByteCode: new Uint8Array(), - instantiatePermission: AccessConfig.fromPartial({}) - }; -} -export const MsgStoreCode = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - aminoType: "wasm/MsgStoreCode", - encode(message: MsgStoreCode, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(18).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreCode { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStoreCode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.wasmByteCode = reader.bytes(); - break; - case 5: - message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgStoreCode { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - wasmByteCode: isSet(object.wasmByteCode) ? bytesFromBase64(object.wasmByteCode) : new Uint8Array(), - instantiatePermission: isSet(object.instantiatePermission) ? AccessConfig.fromJSON(object.instantiatePermission) : undefined - }; - }, - toJSON(message: MsgStoreCode): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.wasmByteCode !== undefined && (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array())); - message.instantiatePermission !== undefined && (obj.instantiatePermission = message.instantiatePermission ? AccessConfig.toJSON(message.instantiatePermission) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgStoreCode { - const message = createBaseMsgStoreCode(); - message.sender = object.sender ?? ""; - message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); - message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; - return message; - }, - fromSDK(object: MsgStoreCodeSDKType): MsgStoreCode { - return { - sender: object?.sender, - wasmByteCode: object?.wasm_byte_code, - instantiatePermission: object.instantiate_permission ? AccessConfig.fromSDK(object.instantiate_permission) : undefined - }; - }, - toSDK(message: MsgStoreCode): MsgStoreCodeSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.wasm_byte_code = message.wasmByteCode; - message.instantiatePermission !== undefined && (obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toSDK(message.instantiatePermission) : undefined); - return obj; - }, - fromAmino(object: MsgStoreCodeAmino): MsgStoreCode { - return { - sender: object.sender, - wasmByteCode: fromBase64(object.wasm_byte_code), - instantiatePermission: object?.instantiate_permission ? AccessConfig.fromAmino(object.instantiate_permission) : undefined - }; - }, - toAmino(message: MsgStoreCode): MsgStoreCodeAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.wasm_byte_code = message.wasmByteCode ? toBase64(message.wasmByteCode) : undefined; - obj.instantiate_permission = message.instantiatePermission ? AccessConfig.toAmino(message.instantiatePermission) : undefined; - return obj; - }, - fromAminoMsg(object: MsgStoreCodeAminoMsg): MsgStoreCode { - return MsgStoreCode.fromAmino(object.value); - }, - toAminoMsg(message: MsgStoreCode): MsgStoreCodeAminoMsg { - return { - type: "wasm/MsgStoreCode", - value: MsgStoreCode.toAmino(message) - }; - }, - fromProtoMsg(message: MsgStoreCodeProtoMsg): MsgStoreCode { - return MsgStoreCode.decode(message.value); - }, - toProto(message: MsgStoreCode): Uint8Array { - return MsgStoreCode.encode(message).finish(); - }, - toProtoMsg(message: MsgStoreCode): MsgStoreCodeProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", - value: MsgStoreCode.encode(message).finish() - }; - } -}; -function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { - return { - codeId: BigInt(0) - }; -} -export const MsgStoreCodeResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", - aminoType: "wasm/MsgStoreCodeResponse", - encode(message: MsgStoreCodeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgStoreCodeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStoreCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgStoreCodeResponse { - return { - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgStoreCodeResponse): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgStoreCodeResponse { - const message = createBaseMsgStoreCodeResponse(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgStoreCodeResponseSDKType): MsgStoreCodeResponse { - return { - codeId: object?.code_id - }; - }, - toSDK(message: MsgStoreCodeResponse): MsgStoreCodeResponseSDKType { - const obj: any = {}; - obj.code_id = message.codeId; - return obj; - }, - fromAmino(object: MsgStoreCodeResponseAmino): MsgStoreCodeResponse { - return { - codeId: BigInt(object.code_id) - }; - }, - toAmino(message: MsgStoreCodeResponse): MsgStoreCodeResponseAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgStoreCodeResponseAminoMsg): MsgStoreCodeResponse { - return MsgStoreCodeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseAminoMsg { - return { - type: "wasm/MsgStoreCodeResponse", - value: MsgStoreCodeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgStoreCodeResponseProtoMsg): MsgStoreCodeResponse { - return MsgStoreCodeResponse.decode(message.value); - }, - toProto(message: MsgStoreCodeResponse): Uint8Array { - return MsgStoreCodeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgStoreCodeResponse): MsgStoreCodeResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgStoreCodeResponse", - value: MsgStoreCodeResponse.encode(message).finish() - }; - } -}; -function createBaseMsgInstantiateContract(): MsgInstantiateContract { - return { - sender: "", - admin: "", - codeId: BigInt(0), - label: "", - msg: new Uint8Array(), - funds: [] - }; -} -export const MsgInstantiateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - aminoType: "wasm/MsgInstantiateContract", - encode(message: MsgInstantiateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(24).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContract { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgInstantiateContract(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgInstantiateContract { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - admin: isSet(object.admin) ? String(object.admin) : "", - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - label: isSet(object.label) ? String(object.label) : "", - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgInstantiateContract): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.admin !== undefined && (obj.admin = message.admin); - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgInstantiateContract { - const message = createBaseMsgInstantiateContract(); - message.sender = object.sender ?? ""; - message.admin = object.admin ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.label = object.label ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgInstantiateContractSDKType): MsgInstantiateContract { - return { - sender: object?.sender, - admin: object?.admin, - codeId: object?.code_id, - label: object?.label, - msg: object?.msg, - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgInstantiateContract): MsgInstantiateContractSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.admin = message.admin; - obj.code_id = message.codeId; - obj.label = message.label; - obj.msg = message.msg; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAmino(object: MsgInstantiateContractAmino): MsgInstantiateContract { - return { - sender: object.sender, - admin: object.admin, - codeId: BigInt(object.code_id), - label: object.label, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgInstantiateContract): MsgInstantiateContractAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.admin = message.admin; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.label = message.label; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAminoMsg(object: MsgInstantiateContractAminoMsg): MsgInstantiateContract { - return MsgInstantiateContract.fromAmino(object.value); - }, - toAminoMsg(message: MsgInstantiateContract): MsgInstantiateContractAminoMsg { - return { - type: "wasm/MsgInstantiateContract", - value: MsgInstantiateContract.toAmino(message) - }; - }, - fromProtoMsg(message: MsgInstantiateContractProtoMsg): MsgInstantiateContract { - return MsgInstantiateContract.decode(message.value); - }, - toProto(message: MsgInstantiateContract): Uint8Array { - return MsgInstantiateContract.encode(message).finish(); - }, - toProtoMsg(message: MsgInstantiateContract): MsgInstantiateContractProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", - value: MsgInstantiateContract.encode(message).finish() - }; - } -}; -function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { - return { - address: "", - data: new Uint8Array() - }; -} -export const MsgInstantiateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", - aminoType: "wasm/MsgInstantiateContractResponse", - encode(message: MsgInstantiateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgInstantiateContractResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgInstantiateContractResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgInstantiateContractResponse { - return { - address: isSet(object.address) ? String(object.address) : "", - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: MsgInstantiateContractResponse): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgInstantiateContractResponse { - const message = createBaseMsgInstantiateContractResponse(); - message.address = object.address ?? ""; - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgInstantiateContractResponseSDKType): MsgInstantiateContractResponse { - return { - address: object?.address, - data: object?.data - }; - }, - toSDK(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseSDKType { - const obj: any = {}; - obj.address = message.address; - obj.data = message.data; - return obj; - }, - fromAmino(object: MsgInstantiateContractResponseAmino): MsgInstantiateContractResponse { - return { - address: object.address, - data: object.data - }; - }, - toAmino(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAmino { - const obj: any = {}; - obj.address = message.address; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: MsgInstantiateContractResponseAminoMsg): MsgInstantiateContractResponse { - return MsgInstantiateContractResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseAminoMsg { - return { - type: "wasm/MsgInstantiateContractResponse", - value: MsgInstantiateContractResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgInstantiateContractResponseProtoMsg): MsgInstantiateContractResponse { - return MsgInstantiateContractResponse.decode(message.value); - }, - toProto(message: MsgInstantiateContractResponse): Uint8Array { - return MsgInstantiateContractResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgInstantiateContractResponse): MsgInstantiateContractResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContractResponse", - value: MsgInstantiateContractResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExecuteContract(): MsgExecuteContract { - return { - sender: "", - contract: "", - msg: new Uint8Array(), - funds: [] - }; -} -export const MsgExecuteContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - aminoType: "wasm/MsgExecuteContract", - encode(message: MsgExecuteContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(26).bytes(message.msg); - } - for (const v of message.funds) { - Coin.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecuteContract { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecuteContract(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - case 5: - message.funds.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExecuteContract { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - contract: isSet(object.contract) ? String(object.contract) : "", - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgExecuteContract): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgExecuteContract { - const message = createBaseMsgExecuteContract(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; - message.msg = object.msg ?? new Uint8Array(); - message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgExecuteContractSDKType): MsgExecuteContract { - return { - sender: object?.sender, - contract: object?.contract, - msg: object?.msg, - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgExecuteContract): MsgExecuteContractSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.msg = message.msg; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAmino(object: MsgExecuteContractAmino): MsgExecuteContract { - return { - sender: object.sender, - contract: object.contract, - msg: toUtf8(JSON.stringify(object.msg)), - funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgExecuteContract): MsgExecuteContractAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - if (message.funds) { - obj.funds = message.funds.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.funds = []; - } - return obj; - }, - fromAminoMsg(object: MsgExecuteContractAminoMsg): MsgExecuteContract { - return MsgExecuteContract.fromAmino(object.value); - }, - toAminoMsg(message: MsgExecuteContract): MsgExecuteContractAminoMsg { - return { - type: "wasm/MsgExecuteContract", - value: MsgExecuteContract.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecuteContractProtoMsg): MsgExecuteContract { - return MsgExecuteContract.decode(message.value); - }, - toProto(message: MsgExecuteContract): Uint8Array { - return MsgExecuteContract.encode(message).finish(); - }, - toProtoMsg(message: MsgExecuteContract): MsgExecuteContractProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", - value: MsgExecuteContract.encode(message).finish() - }; - } -}; -function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { - return { - data: new Uint8Array() - }; -} -export const MsgExecuteContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", - aminoType: "wasm/MsgExecuteContractResponse", - encode(message: MsgExecuteContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExecuteContractResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecuteContractResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExecuteContractResponse { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: MsgExecuteContractResponse): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgExecuteContractResponse { - const message = createBaseMsgExecuteContractResponse(); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgExecuteContractResponseSDKType): MsgExecuteContractResponse { - return { - data: object?.data - }; - }, - toSDK(message: MsgExecuteContractResponse): MsgExecuteContractResponseSDKType { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAmino(object: MsgExecuteContractResponseAmino): MsgExecuteContractResponse { - return { - data: object.data - }; - }, - toAmino(message: MsgExecuteContractResponse): MsgExecuteContractResponseAmino { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: MsgExecuteContractResponseAminoMsg): MsgExecuteContractResponse { - return MsgExecuteContractResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseAminoMsg { - return { - type: "wasm/MsgExecuteContractResponse", - value: MsgExecuteContractResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExecuteContractResponseProtoMsg): MsgExecuteContractResponse { - return MsgExecuteContractResponse.decode(message.value); - }, - toProto(message: MsgExecuteContractResponse): Uint8Array { - return MsgExecuteContractResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExecuteContractResponse): MsgExecuteContractResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContractResponse", - value: MsgExecuteContractResponse.encode(message).finish() - }; - } -}; -function createBaseMsgMigrateContract(): MsgMigrateContract { - return { - sender: "", - contract: "", - codeId: BigInt(0), - msg: new Uint8Array() - }; -} -export const MsgMigrateContract = { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - aminoType: "wasm/MsgMigrateContract", - encode(message: MsgMigrateContract, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(24).uint64(message.codeId); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMigrateContract { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMigrateContract(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgMigrateContract { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - contract: isSet(object.contract) ? String(object.contract) : "", - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array() - }; - }, - toJSON(message: MsgMigrateContract): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgMigrateContract { - const message = createBaseMsgMigrateContract(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.msg = object.msg ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgMigrateContractSDKType): MsgMigrateContract { - return { - sender: object?.sender, - contract: object?.contract, - codeId: object?.code_id, - msg: object?.msg - }; - }, - toSDK(message: MsgMigrateContract): MsgMigrateContractSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.code_id = message.codeId; - obj.msg = message.msg; - return obj; - }, - fromAmino(object: MsgMigrateContractAmino): MsgMigrateContract { - return { - sender: object.sender, - contract: object.contract, - codeId: BigInt(object.code_id), - msg: toUtf8(JSON.stringify(object.msg)) - }; - }, - toAmino(message: MsgMigrateContract): MsgMigrateContractAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - return obj; - }, - fromAminoMsg(object: MsgMigrateContractAminoMsg): MsgMigrateContract { - return MsgMigrateContract.fromAmino(object.value); - }, - toAminoMsg(message: MsgMigrateContract): MsgMigrateContractAminoMsg { - return { - type: "wasm/MsgMigrateContract", - value: MsgMigrateContract.toAmino(message) - }; - }, - fromProtoMsg(message: MsgMigrateContractProtoMsg): MsgMigrateContract { - return MsgMigrateContract.decode(message.value); - }, - toProto(message: MsgMigrateContract): Uint8Array { - return MsgMigrateContract.encode(message).finish(); - }, - toProtoMsg(message: MsgMigrateContract): MsgMigrateContractProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", - value: MsgMigrateContract.encode(message).finish() - }; - } -}; -function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { - return { - data: new Uint8Array() - }; -} -export const MsgMigrateContractResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", - aminoType: "wasm/MsgMigrateContractResponse", - encode(message: MsgMigrateContractResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMigrateContractResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMigrateContractResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgMigrateContractResponse { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: MsgMigrateContractResponse): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MsgMigrateContractResponse { - const message = createBaseMsgMigrateContractResponse(); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: MsgMigrateContractResponseSDKType): MsgMigrateContractResponse { - return { - data: object?.data - }; - }, - toSDK(message: MsgMigrateContractResponse): MsgMigrateContractResponseSDKType { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAmino(object: MsgMigrateContractResponseAmino): MsgMigrateContractResponse { - return { - data: object.data - }; - }, - toAmino(message: MsgMigrateContractResponse): MsgMigrateContractResponseAmino { - const obj: any = {}; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: MsgMigrateContractResponseAminoMsg): MsgMigrateContractResponse { - return MsgMigrateContractResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseAminoMsg { - return { - type: "wasm/MsgMigrateContractResponse", - value: MsgMigrateContractResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgMigrateContractResponseProtoMsg): MsgMigrateContractResponse { - return MsgMigrateContractResponse.decode(message.value); - }, - toProto(message: MsgMigrateContractResponse): Uint8Array { - return MsgMigrateContractResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgMigrateContractResponse): MsgMigrateContractResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContractResponse", - value: MsgMigrateContractResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { - return { - sender: "", - newAdmin: "", - contract: "" - }; -} -export const MsgUpdateAdmin = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - aminoType: "wasm/MsgUpdateAdmin", - encode(message: MsgUpdateAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.newAdmin !== "") { - writer.uint32(18).string(message.newAdmin); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateAdmin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.newAdmin = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateAdmin { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - newAdmin: isSet(object.newAdmin) ? String(object.newAdmin) : "", - contract: isSet(object.contract) ? String(object.contract) : "" - }; - }, - toJSON(message: MsgUpdateAdmin): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateAdmin { - const message = createBaseMsgUpdateAdmin(); - message.sender = object.sender ?? ""; - message.newAdmin = object.newAdmin ?? ""; - message.contract = object.contract ?? ""; - return message; - }, - fromSDK(object: MsgUpdateAdminSDKType): MsgUpdateAdmin { - return { - sender: object?.sender, - newAdmin: object?.new_admin, - contract: object?.contract - }; - }, - toSDK(message: MsgUpdateAdmin): MsgUpdateAdminSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; - return obj; - }, - fromAmino(object: MsgUpdateAdminAmino): MsgUpdateAdmin { - return { - sender: object.sender, - newAdmin: object.new_admin, - contract: object.contract - }; - }, - toAmino(message: MsgUpdateAdmin): MsgUpdateAdminAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.new_admin = message.newAdmin; - obj.contract = message.contract; - return obj; - }, - fromAminoMsg(object: MsgUpdateAdminAminoMsg): MsgUpdateAdmin { - return MsgUpdateAdmin.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateAdmin): MsgUpdateAdminAminoMsg { - return { - type: "wasm/MsgUpdateAdmin", - value: MsgUpdateAdmin.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateAdminProtoMsg): MsgUpdateAdmin { - return MsgUpdateAdmin.decode(message.value); - }, - toProto(message: MsgUpdateAdmin): Uint8Array { - return MsgUpdateAdmin.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateAdmin): MsgUpdateAdminProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdmin", - value: MsgUpdateAdmin.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { - return {}; -} -export const MsgUpdateAdminResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", - aminoType: "wasm/MsgUpdateAdminResponse", - encode(_: MsgUpdateAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateAdminResponse { - return {}; - }, - toJSON(_: MsgUpdateAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateAdminResponse { - const message = createBaseMsgUpdateAdminResponse(); - return message; - }, - fromSDK(_: MsgUpdateAdminResponseSDKType): MsgUpdateAdminResponse { - return {}; - }, - toSDK(_: MsgUpdateAdminResponse): MsgUpdateAdminResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateAdminResponseAmino): MsgUpdateAdminResponse { - return {}; - }, - toAmino(_: MsgUpdateAdminResponse): MsgUpdateAdminResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateAdminResponseAminoMsg): MsgUpdateAdminResponse { - return MsgUpdateAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseAminoMsg { - return { - type: "wasm/MsgUpdateAdminResponse", - value: MsgUpdateAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateAdminResponseProtoMsg): MsgUpdateAdminResponse { - return MsgUpdateAdminResponse.decode(message.value); - }, - toProto(message: MsgUpdateAdminResponse): Uint8Array { - return MsgUpdateAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateAdminResponse): MsgUpdateAdminResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgUpdateAdminResponse", - value: MsgUpdateAdminResponse.encode(message).finish() - }; - } -}; -function createBaseMsgClearAdmin(): MsgClearAdmin { - return { - sender: "", - contract: "" - }; -} -export const MsgClearAdmin = { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - aminoType: "wasm/MsgClearAdmin", - encode(message: MsgClearAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgClearAdmin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgClearAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgClearAdmin { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - contract: isSet(object.contract) ? String(object.contract) : "" - }; - }, - toJSON(message: MsgClearAdmin): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object: DeepPartial): MsgClearAdmin { - const message = createBaseMsgClearAdmin(); - message.sender = object.sender ?? ""; - message.contract = object.contract ?? ""; - return message; - }, - fromSDK(object: MsgClearAdminSDKType): MsgClearAdmin { - return { - sender: object?.sender, - contract: object?.contract - }; - }, - toSDK(message: MsgClearAdmin): MsgClearAdminSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - return obj; - }, - fromAmino(object: MsgClearAdminAmino): MsgClearAdmin { - return { - sender: object.sender, - contract: object.contract - }; - }, - toAmino(message: MsgClearAdmin): MsgClearAdminAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.contract = message.contract; - return obj; - }, - fromAminoMsg(object: MsgClearAdminAminoMsg): MsgClearAdmin { - return MsgClearAdmin.fromAmino(object.value); - }, - toAminoMsg(message: MsgClearAdmin): MsgClearAdminAminoMsg { - return { - type: "wasm/MsgClearAdmin", - value: MsgClearAdmin.toAmino(message) - }; - }, - fromProtoMsg(message: MsgClearAdminProtoMsg): MsgClearAdmin { - return MsgClearAdmin.decode(message.value); - }, - toProto(message: MsgClearAdmin): Uint8Array { - return MsgClearAdmin.encode(message).finish(); - }, - toProtoMsg(message: MsgClearAdmin): MsgClearAdminProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", - value: MsgClearAdmin.encode(message).finish() - }; - } -}; -function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { - return {}; -} -export const MsgClearAdminResponse = { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", - aminoType: "wasm/MsgClearAdminResponse", - encode(_: MsgClearAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgClearAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgClearAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgClearAdminResponse { - return {}; - }, - toJSON(_: MsgClearAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgClearAdminResponse { - const message = createBaseMsgClearAdminResponse(); - return message; - }, - fromSDK(_: MsgClearAdminResponseSDKType): MsgClearAdminResponse { - return {}; - }, - toSDK(_: MsgClearAdminResponse): MsgClearAdminResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgClearAdminResponseAmino): MsgClearAdminResponse { - return {}; - }, - toAmino(_: MsgClearAdminResponse): MsgClearAdminResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgClearAdminResponseAminoMsg): MsgClearAdminResponse { - return MsgClearAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseAminoMsg { - return { - type: "wasm/MsgClearAdminResponse", - value: MsgClearAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgClearAdminResponseProtoMsg): MsgClearAdminResponse { - return MsgClearAdminResponse.decode(message.value); - }, - toProto(message: MsgClearAdminResponse): Uint8Array { - return MsgClearAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgClearAdminResponse): MsgClearAdminResponseProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.MsgClearAdminResponse", - value: MsgClearAdminResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/types.ts b/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/types.ts deleted file mode 100644 index 83b73f65..00000000 --- a/examples/interchainjs/src/codegen/cosmwasm/wasm/v1/types.ts +++ /dev/null @@ -1,1297 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers"; -import { toUtf8, fromUtf8 } from "@cosmjs/encoding"; -/** AccessType permission types */ -export enum AccessType { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - ACCESS_TYPE_UNSPECIFIED = 0, - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - ACCESS_TYPE_NOBODY = 1, - /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ - ACCESS_TYPE_ONLY_ADDRESS = 2, - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - ACCESS_TYPE_EVERYBODY = 3, - UNRECOGNIZED = -1, -} -export const AccessTypeSDKType = AccessType; -export const AccessTypeAmino = AccessType; -export function accessTypeFromJSON(object: any): AccessType { - switch (object) { - case 0: - case "ACCESS_TYPE_UNSPECIFIED": - return AccessType.ACCESS_TYPE_UNSPECIFIED; - case 1: - case "ACCESS_TYPE_NOBODY": - return AccessType.ACCESS_TYPE_NOBODY; - case 2: - case "ACCESS_TYPE_ONLY_ADDRESS": - return AccessType.ACCESS_TYPE_ONLY_ADDRESS; - case 3: - case "ACCESS_TYPE_EVERYBODY": - return AccessType.ACCESS_TYPE_EVERYBODY; - case -1: - case "UNRECOGNIZED": - default: - return AccessType.UNRECOGNIZED; - } -} -export function accessTypeToJSON(object: AccessType): string { - switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: - return "ACCESS_TYPE_UNSPECIFIED"; - case AccessType.ACCESS_TYPE_NOBODY: - return "ACCESS_TYPE_NOBODY"; - case AccessType.ACCESS_TYPE_ONLY_ADDRESS: - return "ACCESS_TYPE_ONLY_ADDRESS"; - case AccessType.ACCESS_TYPE_EVERYBODY: - return "ACCESS_TYPE_EVERYBODY"; - case AccessType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** ContractCodeHistoryOperationType actions that caused a code change */ -export enum ContractCodeHistoryOperationType { - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3, - UNRECOGNIZED = -1, -} -export const ContractCodeHistoryOperationTypeSDKType = ContractCodeHistoryOperationType; -export const ContractCodeHistoryOperationTypeAmino = ContractCodeHistoryOperationType; -export function contractCodeHistoryOperationTypeFromJSON(object: any): ContractCodeHistoryOperationType { - switch (object) { - case 0: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; - case 1: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; - case 2: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; - case 3: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; - case -1: - case "UNRECOGNIZED": - default: - return ContractCodeHistoryOperationType.UNRECOGNIZED; - } -} -export function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHistoryOperationType): string { - switch (object) { - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - case ContractCodeHistoryOperationType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** AccessTypeParam */ -export interface AccessTypeParam { - value: AccessType; -} -export interface AccessTypeParamProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam"; - value: Uint8Array; -} -/** AccessTypeParam */ -export interface AccessTypeParamAmino { - value: AccessType; -} -export interface AccessTypeParamAminoMsg { - type: "wasm/AccessTypeParam"; - value: AccessTypeParamAmino; -} -/** AccessTypeParam */ -export interface AccessTypeParamSDKType { - value: AccessType; -} -/** AccessConfig access control type. */ -export interface AccessConfig { - permission: AccessType; - address: string; -} -export interface AccessConfigProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.AccessConfig"; - value: Uint8Array; -} -/** AccessConfig access control type. */ -export interface AccessConfigAmino { - permission: AccessType; - address: string; -} -export interface AccessConfigAminoMsg { - type: "wasm/AccessConfig"; - value: AccessConfigAmino; -} -/** AccessConfig access control type. */ -export interface AccessConfigSDKType { - permission: AccessType; - address: string; -} -/** Params defines the set of wasm parameters. */ -export interface Params { - codeUploadAccess: AccessConfig | undefined; - instantiateDefaultPermission: AccessType; - maxWasmCodeSize: bigint; -} -export interface ParamsProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Params"; - value: Uint8Array; -} -/** Params defines the set of wasm parameters. */ -export interface ParamsAmino { - code_upload_access?: AccessConfigAmino | undefined; - instantiate_default_permission: AccessType; - max_wasm_code_size: string; -} -export interface ParamsAminoMsg { - type: "wasm/Params"; - value: ParamsAmino; -} -/** Params defines the set of wasm parameters. */ -export interface ParamsSDKType { - code_upload_access: AccessConfigSDKType | undefined; - instantiate_default_permission: AccessType; - max_wasm_code_size: bigint; -} -/** CodeInfo is data for the uploaded contract WASM code */ -export interface CodeInfo { - /** CodeHash is the unique identifier created by wasmvm */ - codeHash: Uint8Array; - /** Creator address who initially stored the code */ - creator: string; - /** InstantiateConfig access control to apply on contract creation, optional */ - instantiateConfig: AccessConfig | undefined; -} -export interface CodeInfoProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.CodeInfo"; - value: Uint8Array; -} -/** CodeInfo is data for the uploaded contract WASM code */ -export interface CodeInfoAmino { - /** CodeHash is the unique identifier created by wasmvm */ - code_hash: Uint8Array; - /** Creator address who initially stored the code */ - creator: string; - /** InstantiateConfig access control to apply on contract creation, optional */ - instantiate_config?: AccessConfigAmino | undefined; -} -export interface CodeInfoAminoMsg { - type: "wasm/CodeInfo"; - value: CodeInfoAmino; -} -/** CodeInfo is data for the uploaded contract WASM code */ -export interface CodeInfoSDKType { - code_hash: Uint8Array; - creator: string; - instantiate_config: AccessConfigSDKType | undefined; -} -/** ContractInfo stores a WASM contract instance */ -export interface ContractInfo { - /** CodeID is the reference to the stored Wasm code */ - codeId: bigint; - /** Creator address who initially instantiated the contract */ - creator: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** - * Created Tx position when the contract was instantiated. - * This data should kept internal and not be exposed via query results. Just - * use for sorting - */ - created: AbsoluteTxPosition | undefined; - ibcPortId: string; - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension: Any | undefined; -} -export interface ContractInfoProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.ContractInfo"; - value: Uint8Array; -} -/** ContractInfo stores a WASM contract instance */ -export interface ContractInfoAmino { - /** CodeID is the reference to the stored Wasm code */ - code_id: string; - /** Creator address who initially instantiated the contract */ - creator: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** - * Created Tx position when the contract was instantiated. - * This data should kept internal and not be exposed via query results. Just - * use for sorting - */ - created?: AbsoluteTxPositionAmino | undefined; - ibc_port_id: string; - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension?: AnyAmino | undefined; -} -export interface ContractInfoAminoMsg { - type: "wasm/ContractInfo"; - value: ContractInfoAmino; -} -/** ContractInfo stores a WASM contract instance */ -export interface ContractInfoSDKType { - code_id: bigint; - creator: string; - admin: string; - label: string; - created: AbsoluteTxPositionSDKType | undefined; - ibc_port_id: string; - extension: AnySDKType | undefined; -} -/** ContractCodeHistoryEntry metadata to a contract. */ -export interface ContractCodeHistoryEntry { - operation: ContractCodeHistoryOperationType; - /** CodeID is the reference to the stored WASM code */ - codeId: bigint; - /** Updated Tx position when the operation was executed. */ - updated: AbsoluteTxPosition | undefined; - msg: Uint8Array; -} -export interface ContractCodeHistoryEntryProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry"; - value: Uint8Array; -} -/** ContractCodeHistoryEntry metadata to a contract. */ -export interface ContractCodeHistoryEntryAmino { - operation: ContractCodeHistoryOperationType; - /** CodeID is the reference to the stored WASM code */ - code_id: string; - /** Updated Tx position when the operation was executed. */ - updated?: AbsoluteTxPositionAmino | undefined; - msg: Uint8Array; -} -export interface ContractCodeHistoryEntryAminoMsg { - type: "wasm/ContractCodeHistoryEntry"; - value: ContractCodeHistoryEntryAmino; -} -/** ContractCodeHistoryEntry metadata to a contract. */ -export interface ContractCodeHistoryEntrySDKType { - operation: ContractCodeHistoryOperationType; - code_id: bigint; - updated: AbsoluteTxPositionSDKType | undefined; - msg: Uint8Array; -} -/** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ -export interface AbsoluteTxPosition { - /** BlockHeight is the block the contract was created at */ - blockHeight: bigint; - /** - * TxIndex is a monotonic counter within the block (actual transaction index, - * or gas consumed) - */ - txIndex: bigint; -} -export interface AbsoluteTxPositionProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition"; - value: Uint8Array; -} -/** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ -export interface AbsoluteTxPositionAmino { - /** BlockHeight is the block the contract was created at */ - block_height: string; - /** - * TxIndex is a monotonic counter within the block (actual transaction index, - * or gas consumed) - */ - tx_index: string; -} -export interface AbsoluteTxPositionAminoMsg { - type: "wasm/AbsoluteTxPosition"; - value: AbsoluteTxPositionAmino; -} -/** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ -export interface AbsoluteTxPositionSDKType { - block_height: bigint; - tx_index: bigint; -} -/** Model is a struct that holds a KV pair */ -export interface Model { - /** hex-encode key to read it better (this is often ascii) */ - key: Uint8Array; - /** base64-encode raw value */ - value: Uint8Array; -} -export interface ModelProtoMsg { - typeUrl: "/cosmwasm.wasm.v1.Model"; - value: Uint8Array; -} -/** Model is a struct that holds a KV pair */ -export interface ModelAmino { - /** hex-encode key to read it better (this is often ascii) */ - key: Uint8Array; - /** base64-encode raw value */ - value: Uint8Array; -} -export interface ModelAminoMsg { - type: "wasm/Model"; - value: ModelAmino; -} -/** Model is a struct that holds a KV pair */ -export interface ModelSDKType { - key: Uint8Array; - value: Uint8Array; -} -function createBaseAccessTypeParam(): AccessTypeParam { - return { - value: 0 - }; -} -export const AccessTypeParam = { - typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", - aminoType: "wasm/AccessTypeParam", - encode(message: AccessTypeParam, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.value !== 0) { - writer.uint32(8).int32(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccessTypeParam { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccessTypeParam(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccessTypeParam { - return { - value: isSet(object.value) ? accessTypeFromJSON(object.value) : -1 - }; - }, - toJSON(message: AccessTypeParam): unknown { - const obj: any = {}; - message.value !== undefined && (obj.value = accessTypeToJSON(message.value)); - return obj; - }, - fromPartial(object: DeepPartial): AccessTypeParam { - const message = createBaseAccessTypeParam(); - message.value = object.value ?? 0; - return message; - }, - fromSDK(object: AccessTypeParamSDKType): AccessTypeParam { - return { - value: isSet(object.value) ? accessTypeFromJSON(object.value) : -1 - }; - }, - toSDK(message: AccessTypeParam): AccessTypeParamSDKType { - const obj: any = {}; - message.value !== undefined && (obj.value = accessTypeToJSON(message.value)); - return obj; - }, - fromAmino(object: AccessTypeParamAmino): AccessTypeParam { - return { - value: isSet(object.value) ? accessTypeFromJSON(object.value) : -1 - }; - }, - toAmino(message: AccessTypeParam): AccessTypeParamAmino { - const obj: any = {}; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: AccessTypeParamAminoMsg): AccessTypeParam { - return AccessTypeParam.fromAmino(object.value); - }, - toAminoMsg(message: AccessTypeParam): AccessTypeParamAminoMsg { - return { - type: "wasm/AccessTypeParam", - value: AccessTypeParam.toAmino(message) - }; - }, - fromProtoMsg(message: AccessTypeParamProtoMsg): AccessTypeParam { - return AccessTypeParam.decode(message.value); - }, - toProto(message: AccessTypeParam): Uint8Array { - return AccessTypeParam.encode(message).finish(); - }, - toProtoMsg(message: AccessTypeParam): AccessTypeParamProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.AccessTypeParam", - value: AccessTypeParam.encode(message).finish() - }; - } -}; -function createBaseAccessConfig(): AccessConfig { - return { - permission: 0, - address: "" - }; -} -export const AccessConfig = { - typeUrl: "/cosmwasm.wasm.v1.AccessConfig", - aminoType: "wasm/AccessConfig", - encode(message: AccessConfig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.permission !== 0) { - writer.uint32(8).int32(message.permission); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccessConfig { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccessConfig(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.permission = (reader.int32() as any); - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccessConfig { - return { - permission: isSet(object.permission) ? accessTypeFromJSON(object.permission) : -1, - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: AccessConfig): unknown { - const obj: any = {}; - message.permission !== undefined && (obj.permission = accessTypeToJSON(message.permission)); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): AccessConfig { - const message = createBaseAccessConfig(); - message.permission = object.permission ?? 0; - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: AccessConfigSDKType): AccessConfig { - return { - permission: isSet(object.permission) ? accessTypeFromJSON(object.permission) : -1, - address: object?.address - }; - }, - toSDK(message: AccessConfig): AccessConfigSDKType { - const obj: any = {}; - message.permission !== undefined && (obj.permission = accessTypeToJSON(message.permission)); - obj.address = message.address; - return obj; - }, - fromAmino(object: AccessConfigAmino): AccessConfig { - return { - permission: isSet(object.permission) ? accessTypeFromJSON(object.permission) : -1, - address: object.address - }; - }, - toAmino(message: AccessConfig): AccessConfigAmino { - const obj: any = {}; - obj.permission = message.permission; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: AccessConfigAminoMsg): AccessConfig { - return AccessConfig.fromAmino(object.value); - }, - toAminoMsg(message: AccessConfig): AccessConfigAminoMsg { - return { - type: "wasm/AccessConfig", - value: AccessConfig.toAmino(message) - }; - }, - fromProtoMsg(message: AccessConfigProtoMsg): AccessConfig { - return AccessConfig.decode(message.value); - }, - toProto(message: AccessConfig): Uint8Array { - return AccessConfig.encode(message).finish(); - }, - toProtoMsg(message: AccessConfig): AccessConfigProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.AccessConfig", - value: AccessConfig.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - codeUploadAccess: AccessConfig.fromPartial({}), - instantiateDefaultPermission: 0, - maxWasmCodeSize: BigInt(0) - }; -} -export const Params = { - typeUrl: "/cosmwasm.wasm.v1.Params", - aminoType: "wasm/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeUploadAccess !== undefined) { - AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim(); - } - if (message.instantiateDefaultPermission !== 0) { - writer.uint32(16).int32(message.instantiateDefaultPermission); - } - if (message.maxWasmCodeSize !== BigInt(0)) { - writer.uint32(24).uint64(message.maxWasmCodeSize); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateDefaultPermission = (reader.int32() as any); - break; - case 3: - message.maxWasmCodeSize = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - codeUploadAccess: isSet(object.codeUploadAccess) ? AccessConfig.fromJSON(object.codeUploadAccess) : undefined, - instantiateDefaultPermission: isSet(object.instantiateDefaultPermission) ? accessTypeFromJSON(object.instantiateDefaultPermission) : -1, - maxWasmCodeSize: isSet(object.maxWasmCodeSize) ? BigInt(object.maxWasmCodeSize.toString()) : BigInt(0) - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.codeUploadAccess !== undefined && (obj.codeUploadAccess = message.codeUploadAccess ? AccessConfig.toJSON(message.codeUploadAccess) : undefined); - message.instantiateDefaultPermission !== undefined && (obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission)); - message.maxWasmCodeSize !== undefined && (obj.maxWasmCodeSize = (message.maxWasmCodeSize || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.codeUploadAccess = object.codeUploadAccess !== undefined && object.codeUploadAccess !== null ? AccessConfig.fromPartial(object.codeUploadAccess) : undefined; - message.instantiateDefaultPermission = object.instantiateDefaultPermission ?? 0; - message.maxWasmCodeSize = object.maxWasmCodeSize !== undefined && object.maxWasmCodeSize !== null ? BigInt(object.maxWasmCodeSize.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - codeUploadAccess: object.code_upload_access ? AccessConfig.fromSDK(object.code_upload_access) : undefined, - instantiateDefaultPermission: isSet(object.instantiate_default_permission) ? accessTypeFromJSON(object.instantiate_default_permission) : -1, - maxWasmCodeSize: object?.max_wasm_code_size - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - message.codeUploadAccess !== undefined && (obj.code_upload_access = message.codeUploadAccess ? AccessConfig.toSDK(message.codeUploadAccess) : undefined); - message.instantiateDefaultPermission !== undefined && (obj.instantiate_default_permission = accessTypeToJSON(message.instantiateDefaultPermission)); - obj.max_wasm_code_size = message.maxWasmCodeSize; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - codeUploadAccess: object?.code_upload_access ? AccessConfig.fromAmino(object.code_upload_access) : undefined, - instantiateDefaultPermission: isSet(object.instantiate_default_permission) ? accessTypeFromJSON(object.instantiate_default_permission) : -1, - maxWasmCodeSize: BigInt(object.max_wasm_code_size) - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.code_upload_access = message.codeUploadAccess ? AccessConfig.toAmino(message.codeUploadAccess) : undefined; - obj.instantiate_default_permission = message.instantiateDefaultPermission; - obj.max_wasm_code_size = message.maxWasmCodeSize ? message.maxWasmCodeSize.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "wasm/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseCodeInfo(): CodeInfo { - return { - codeHash: new Uint8Array(), - creator: "", - instantiateConfig: AccessConfig.fromPartial({}) - }; -} -export const CodeInfo = { - typeUrl: "/cosmwasm.wasm.v1.CodeInfo", - aminoType: "wasm/CodeInfo", - encode(message: CodeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeHash.length !== 0) { - writer.uint32(10).bytes(message.codeHash); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.instantiateConfig !== undefined) { - AccessConfig.encode(message.instantiateConfig, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CodeInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCodeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeHash = reader.bytes(); - break; - case 2: - message.creator = reader.string(); - break; - case 5: - message.instantiateConfig = AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CodeInfo { - return { - codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(), - creator: isSet(object.creator) ? String(object.creator) : "", - instantiateConfig: isSet(object.instantiateConfig) ? AccessConfig.fromJSON(object.instantiateConfig) : undefined - }; - }, - toJSON(message: CodeInfo): unknown { - const obj: any = {}; - message.codeHash !== undefined && (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); - message.creator !== undefined && (obj.creator = message.creator); - message.instantiateConfig !== undefined && (obj.instantiateConfig = message.instantiateConfig ? AccessConfig.toJSON(message.instantiateConfig) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): CodeInfo { - const message = createBaseCodeInfo(); - message.codeHash = object.codeHash ?? new Uint8Array(); - message.creator = object.creator ?? ""; - message.instantiateConfig = object.instantiateConfig !== undefined && object.instantiateConfig !== null ? AccessConfig.fromPartial(object.instantiateConfig) : undefined; - return message; - }, - fromSDK(object: CodeInfoSDKType): CodeInfo { - return { - codeHash: object?.code_hash, - creator: object?.creator, - instantiateConfig: object.instantiate_config ? AccessConfig.fromSDK(object.instantiate_config) : undefined - }; - }, - toSDK(message: CodeInfo): CodeInfoSDKType { - const obj: any = {}; - obj.code_hash = message.codeHash; - obj.creator = message.creator; - message.instantiateConfig !== undefined && (obj.instantiate_config = message.instantiateConfig ? AccessConfig.toSDK(message.instantiateConfig) : undefined); - return obj; - }, - fromAmino(object: CodeInfoAmino): CodeInfo { - return { - codeHash: object.code_hash, - creator: object.creator, - instantiateConfig: object?.instantiate_config ? AccessConfig.fromAmino(object.instantiate_config) : undefined - }; - }, - toAmino(message: CodeInfo): CodeInfoAmino { - const obj: any = {}; - obj.code_hash = message.codeHash; - obj.creator = message.creator; - obj.instantiate_config = message.instantiateConfig ? AccessConfig.toAmino(message.instantiateConfig) : undefined; - return obj; - }, - fromAminoMsg(object: CodeInfoAminoMsg): CodeInfo { - return CodeInfo.fromAmino(object.value); - }, - toAminoMsg(message: CodeInfo): CodeInfoAminoMsg { - return { - type: "wasm/CodeInfo", - value: CodeInfo.toAmino(message) - }; - }, - fromProtoMsg(message: CodeInfoProtoMsg): CodeInfo { - return CodeInfo.decode(message.value); - }, - toProto(message: CodeInfo): Uint8Array { - return CodeInfo.encode(message).finish(); - }, - toProtoMsg(message: CodeInfo): CodeInfoProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.CodeInfo", - value: CodeInfo.encode(message).finish() - }; - } -}; -function createBaseContractInfo(): ContractInfo { - return { - codeId: BigInt(0), - creator: "", - admin: "", - label: "", - created: AbsoluteTxPosition.fromPartial({}), - ibcPortId: "", - extension: Any.fromPartial({}) - }; -} -export const ContractInfo = { - typeUrl: "/cosmwasm.wasm.v1.ContractInfo", - aminoType: "wasm/ContractInfo", - encode(message: ContractInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.codeId !== BigInt(0)) { - writer.uint32(8).uint64(message.codeId); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.admin !== "") { - writer.uint32(26).string(message.admin); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.created !== undefined) { - AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim(); - } - if (message.ibcPortId !== "") { - writer.uint32(50).string(message.ibcPortId); - } - if (message.extension !== undefined) { - Any.encode(message.extension, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ContractInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContractInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.created = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 6: - message.ibcPortId = reader.string(); - break; - case 7: - message.extension = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ContractInfo { - return { - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - creator: isSet(object.creator) ? String(object.creator) : "", - admin: isSet(object.admin) ? String(object.admin) : "", - label: isSet(object.label) ? String(object.label) : "", - created: isSet(object.created) ? AbsoluteTxPosition.fromJSON(object.created) : undefined, - ibcPortId: isSet(object.ibcPortId) ? String(object.ibcPortId) : "", - extension: isSet(object.extension) ? Any.fromJSON(object.extension) : undefined - }; - }, - toJSON(message: ContractInfo): unknown { - const obj: any = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.creator !== undefined && (obj.creator = message.creator); - message.admin !== undefined && (obj.admin = message.admin); - message.label !== undefined && (obj.label = message.label); - message.created !== undefined && (obj.created = message.created ? AbsoluteTxPosition.toJSON(message.created) : undefined); - message.ibcPortId !== undefined && (obj.ibcPortId = message.ibcPortId); - message.extension !== undefined && (obj.extension = message.extension ? Any.toJSON(message.extension) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ContractInfo { - const message = createBaseContractInfo(); - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.creator = object.creator ?? ""; - message.admin = object.admin ?? ""; - message.label = object.label ?? ""; - message.created = object.created !== undefined && object.created !== null ? AbsoluteTxPosition.fromPartial(object.created) : undefined; - message.ibcPortId = object.ibcPortId ?? ""; - message.extension = object.extension !== undefined && object.extension !== null ? Any.fromPartial(object.extension) : undefined; - return message; - }, - fromSDK(object: ContractInfoSDKType): ContractInfo { - return { - codeId: object?.code_id, - creator: object?.creator, - admin: object?.admin, - label: object?.label, - created: object.created ? AbsoluteTxPosition.fromSDK(object.created) : undefined, - ibcPortId: object?.ibc_port_id, - extension: object.extension ? Any.fromSDK(object.extension) : undefined - }; - }, - toSDK(message: ContractInfo): ContractInfoSDKType { - const obj: any = {}; - obj.code_id = message.codeId; - obj.creator = message.creator; - obj.admin = message.admin; - obj.label = message.label; - message.created !== undefined && (obj.created = message.created ? AbsoluteTxPosition.toSDK(message.created) : undefined); - obj.ibc_port_id = message.ibcPortId; - message.extension !== undefined && (obj.extension = message.extension ? Any.toSDK(message.extension) : undefined); - return obj; - }, - fromAmino(object: ContractInfoAmino): ContractInfo { - return { - codeId: BigInt(object.code_id), - creator: object.creator, - admin: object.admin, - label: object.label, - created: object?.created ? AbsoluteTxPosition.fromAmino(object.created) : undefined, - ibcPortId: object.ibc_port_id, - extension: object?.extension ? Any.fromAmino(object.extension) : undefined - }; - }, - toAmino(message: ContractInfo): ContractInfoAmino { - const obj: any = {}; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.creator = message.creator; - obj.admin = message.admin; - obj.label = message.label; - obj.created = message.created ? AbsoluteTxPosition.toAmino(message.created) : undefined; - obj.ibc_port_id = message.ibcPortId; - obj.extension = message.extension ? Any.toAmino(message.extension) : undefined; - return obj; - }, - fromAminoMsg(object: ContractInfoAminoMsg): ContractInfo { - return ContractInfo.fromAmino(object.value); - }, - toAminoMsg(message: ContractInfo): ContractInfoAminoMsg { - return { - type: "wasm/ContractInfo", - value: ContractInfo.toAmino(message) - }; - }, - fromProtoMsg(message: ContractInfoProtoMsg): ContractInfo { - return ContractInfo.decode(message.value); - }, - toProto(message: ContractInfo): Uint8Array { - return ContractInfo.encode(message).finish(); - }, - toProtoMsg(message: ContractInfo): ContractInfoProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.ContractInfo", - value: ContractInfo.encode(message).finish() - }; - } -}; -function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { - return { - operation: 0, - codeId: BigInt(0), - updated: AbsoluteTxPosition.fromPartial({}), - msg: new Uint8Array() - }; -} -export const ContractCodeHistoryEntry = { - typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", - aminoType: "wasm/ContractCodeHistoryEntry", - encode(message: ContractCodeHistoryEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.operation !== 0) { - writer.uint32(8).int32(message.operation); - } - if (message.codeId !== BigInt(0)) { - writer.uint32(16).uint64(message.codeId); - } - if (message.updated !== undefined) { - AbsoluteTxPosition.encode(message.updated, writer.uint32(26).fork()).ldelim(); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ContractCodeHistoryEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContractCodeHistoryEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operation = (reader.int32() as any); - break; - case 2: - message.codeId = reader.uint64(); - break; - case 3: - message.updated = AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ContractCodeHistoryEntry { - return { - operation: isSet(object.operation) ? contractCodeHistoryOperationTypeFromJSON(object.operation) : -1, - codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt(0), - updated: isSet(object.updated) ? AbsoluteTxPosition.fromJSON(object.updated) : undefined, - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array() - }; - }, - toJSON(message: ContractCodeHistoryEntry): unknown { - const obj: any = {}; - message.operation !== undefined && (obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation)); - message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt(0)).toString()); - message.updated !== undefined && (obj.updated = message.updated ? AbsoluteTxPosition.toJSON(message.updated) : undefined); - message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ContractCodeHistoryEntry { - const message = createBaseContractCodeHistoryEntry(); - message.operation = object.operation ?? 0; - message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt(0); - message.updated = object.updated !== undefined && object.updated !== null ? AbsoluteTxPosition.fromPartial(object.updated) : undefined; - message.msg = object.msg ?? new Uint8Array(); - return message; - }, - fromSDK(object: ContractCodeHistoryEntrySDKType): ContractCodeHistoryEntry { - return { - operation: isSet(object.operation) ? contractCodeHistoryOperationTypeFromJSON(object.operation) : -1, - codeId: object?.code_id, - updated: object.updated ? AbsoluteTxPosition.fromSDK(object.updated) : undefined, - msg: object?.msg - }; - }, - toSDK(message: ContractCodeHistoryEntry): ContractCodeHistoryEntrySDKType { - const obj: any = {}; - message.operation !== undefined && (obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation)); - obj.code_id = message.codeId; - message.updated !== undefined && (obj.updated = message.updated ? AbsoluteTxPosition.toSDK(message.updated) : undefined); - obj.msg = message.msg; - return obj; - }, - fromAmino(object: ContractCodeHistoryEntryAmino): ContractCodeHistoryEntry { - return { - operation: isSet(object.operation) ? contractCodeHistoryOperationTypeFromJSON(object.operation) : -1, - codeId: BigInt(object.code_id), - updated: object?.updated ? AbsoluteTxPosition.fromAmino(object.updated) : undefined, - msg: toUtf8(JSON.stringify(object.msg)) - }; - }, - toAmino(message: ContractCodeHistoryEntry): ContractCodeHistoryEntryAmino { - const obj: any = {}; - obj.operation = message.operation; - obj.code_id = message.codeId ? message.codeId.toString() : undefined; - obj.updated = message.updated ? AbsoluteTxPosition.toAmino(message.updated) : undefined; - obj.msg = message.msg ? JSON.parse(fromUtf8(message.msg)) : undefined; - return obj; - }, - fromAminoMsg(object: ContractCodeHistoryEntryAminoMsg): ContractCodeHistoryEntry { - return ContractCodeHistoryEntry.fromAmino(object.value); - }, - toAminoMsg(message: ContractCodeHistoryEntry): ContractCodeHistoryEntryAminoMsg { - return { - type: "wasm/ContractCodeHistoryEntry", - value: ContractCodeHistoryEntry.toAmino(message) - }; - }, - fromProtoMsg(message: ContractCodeHistoryEntryProtoMsg): ContractCodeHistoryEntry { - return ContractCodeHistoryEntry.decode(message.value); - }, - toProto(message: ContractCodeHistoryEntry): Uint8Array { - return ContractCodeHistoryEntry.encode(message).finish(); - }, - toProtoMsg(message: ContractCodeHistoryEntry): ContractCodeHistoryEntryProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.ContractCodeHistoryEntry", - value: ContractCodeHistoryEntry.encode(message).finish() - }; - } -}; -function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { - return { - blockHeight: BigInt(0), - txIndex: BigInt(0) - }; -} -export const AbsoluteTxPosition = { - typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", - aminoType: "wasm/AbsoluteTxPosition", - encode(message: AbsoluteTxPosition, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockHeight !== BigInt(0)) { - writer.uint32(8).uint64(message.blockHeight); - } - if (message.txIndex !== BigInt(0)) { - writer.uint32(16).uint64(message.txIndex); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AbsoluteTxPosition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAbsoluteTxPosition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockHeight = reader.uint64(); - break; - case 2: - message.txIndex = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AbsoluteTxPosition { - return { - blockHeight: isSet(object.blockHeight) ? BigInt(object.blockHeight.toString()) : BigInt(0), - txIndex: isSet(object.txIndex) ? BigInt(object.txIndex.toString()) : BigInt(0) - }; - }, - toJSON(message: AbsoluteTxPosition): unknown { - const obj: any = {}; - message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || BigInt(0)).toString()); - message.txIndex !== undefined && (obj.txIndex = (message.txIndex || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): AbsoluteTxPosition { - const message = createBaseAbsoluteTxPosition(); - message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? BigInt(object.blockHeight.toString()) : BigInt(0); - message.txIndex = object.txIndex !== undefined && object.txIndex !== null ? BigInt(object.txIndex.toString()) : BigInt(0); - return message; - }, - fromSDK(object: AbsoluteTxPositionSDKType): AbsoluteTxPosition { - return { - blockHeight: object?.block_height, - txIndex: object?.tx_index - }; - }, - toSDK(message: AbsoluteTxPosition): AbsoluteTxPositionSDKType { - const obj: any = {}; - obj.block_height = message.blockHeight; - obj.tx_index = message.txIndex; - return obj; - }, - fromAmino(object: AbsoluteTxPositionAmino): AbsoluteTxPosition { - return { - blockHeight: BigInt(object.block_height), - txIndex: BigInt(object.tx_index) - }; - }, - toAmino(message: AbsoluteTxPosition): AbsoluteTxPositionAmino { - const obj: any = {}; - obj.block_height = message.blockHeight ? message.blockHeight.toString() : undefined; - obj.tx_index = message.txIndex ? message.txIndex.toString() : undefined; - return obj; - }, - fromAminoMsg(object: AbsoluteTxPositionAminoMsg): AbsoluteTxPosition { - return AbsoluteTxPosition.fromAmino(object.value); - }, - toAminoMsg(message: AbsoluteTxPosition): AbsoluteTxPositionAminoMsg { - return { - type: "wasm/AbsoluteTxPosition", - value: AbsoluteTxPosition.toAmino(message) - }; - }, - fromProtoMsg(message: AbsoluteTxPositionProtoMsg): AbsoluteTxPosition { - return AbsoluteTxPosition.decode(message.value); - }, - toProto(message: AbsoluteTxPosition): Uint8Array { - return AbsoluteTxPosition.encode(message).finish(); - }, - toProtoMsg(message: AbsoluteTxPosition): AbsoluteTxPositionProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.AbsoluteTxPosition", - value: AbsoluteTxPosition.encode(message).finish() - }; - } -}; -function createBaseModel(): Model { - return { - key: new Uint8Array(), - value: new Uint8Array() - }; -} -export const Model = { - typeUrl: "/cosmwasm.wasm.v1.Model", - aminoType: "wasm/Model", - encode(message: Model, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Model { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModel(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Model { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() - }; - }, - toJSON(message: Model): unknown { - 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())); - return obj; - }, - fromPartial(object: DeepPartial): Model { - const message = createBaseModel(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - return message; - }, - fromSDK(object: ModelSDKType): Model { - return { - key: object?.key, - value: object?.value - }; - }, - toSDK(message: Model): ModelSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: ModelAmino): Model { - return { - key: object.key, - value: object.value - }; - }, - toAmino(message: Model): ModelAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: ModelAminoMsg): Model { - return Model.fromAmino(object.value); - }, - toAminoMsg(message: Model): ModelAminoMsg { - return { - type: "wasm/Model", - value: Model.toAmino(message) - }; - }, - fromProtoMsg(message: ModelProtoMsg): Model { - return Model.decode(message.value); - }, - toProto(message: Model): Uint8Array { - return Model.encode(message).finish(); - }, - toProtoMsg(message: Model): ModelProtoMsg { - return { - typeUrl: "/cosmwasm.wasm.v1.Model", - value: Model.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/extern.ts b/examples/interchainjs/src/codegen/extern.ts deleted file mode 100644 index 3dffe5ec..00000000 --- a/examples/interchainjs/src/codegen/extern.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from '@cosmjs/stargate' -import { Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc"; - -const _rpcClients: Record = {}; - -export const getRpcEndpointKey = (rpcEndpoint: string | HttpEndpoint) => { - if (typeof rpcEndpoint === 'string') { - return rpcEndpoint; - } else if (!!rpcEndpoint) { - //@ts-ignore - return rpcEndpoint.url; - } -} - -export const getRpcClient = async (rpcEndpoint: string | HttpEndpoint) => { - const key = getRpcEndpointKey(rpcEndpoint); - if (!key) return; - if (_rpcClients.hasOwnProperty(key)) { - return _rpcClients[key]; - } - const tmClient = await Tendermint34Client.connect(rpcEndpoint); - //@ts-ignore - const client = new QueryClient(tmClient); - const rpc = createProtobufRpcClient(client); - _rpcClients[key] = rpc; - return rpc; -} diff --git a/examples/interchainjs/src/codegen/gogoproto/bundle.ts b/examples/interchainjs/src/codegen/gogoproto/bundle.ts deleted file mode 100644 index 33a6fc1b..00000000 --- a/examples/interchainjs/src/codegen/gogoproto/bundle.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as _100 from "./gogo"; -export const gogoproto = { - ..._100 -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/gogoproto/gogo.ts b/examples/interchainjs/src/codegen/gogoproto/gogo.ts deleted file mode 100644 index 693da49f..00000000 --- a/examples/interchainjs/src/codegen/gogoproto/gogo.ts +++ /dev/null @@ -1 +0,0 @@ -export {} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/api/annotations.ts b/examples/interchainjs/src/codegen/google/api/annotations.ts deleted file mode 100644 index 693da49f..00000000 --- a/examples/interchainjs/src/codegen/google/api/annotations.ts +++ /dev/null @@ -1 +0,0 @@ -export {} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/api/http.ts b/examples/interchainjs/src/codegen/google/api/http.ts deleted file mode 100644 index 8b979a64..00000000 --- a/examples/interchainjs/src/codegen/google/api/http.ts +++ /dev/null @@ -1,1448 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface Http { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRule[]; - /** - * When set to true, URL path parameters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fullyDecodeReservedExpansion: boolean; -} -export interface HttpProtoMsg { - typeUrl: "/google.api.Http"; - value: Uint8Array; -} -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface HttpAmino { - /** - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - */ - rules: HttpRuleAmino[]; - /** - * When set to true, URL path parameters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - */ - fully_decode_reserved_expansion: boolean; -} -export interface HttpAminoMsg { - type: "/google.api.Http"; - value: HttpAmino; -} -/** - * Defines the HTTP configuration for an API service. It contains a list of - * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method - * to one or more HTTP REST API methods. - */ -export interface HttpSDKType { - rules: HttpRuleSDKType[]; - fully_decode_reserved_expansion: boolean; -} -/** - * # gRPC Transcoding - * - * gRPC Transcoding is a feature for mapping between a gRPC method and one or - * more HTTP REST endpoints. It allows developers to build a single API service - * that supports both gRPC APIs and REST APIs. Many systems, including [Google - * APIs](https://github.com/googleapis/googleapis), - * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC - * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), - * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature - * and use it for large scale production services. - * - * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies - * how different portions of the gRPC request message are mapped to the URL - * path, URL query parameters, and HTTP request body. It also controls how the - * gRPC response message is mapped to the HTTP response body. `HttpRule` is - * typically specified as an `google.api.http` annotation on the gRPC method. - * - * Each mapping specifies a URL path template and an HTTP method. The path - * template may refer to one or more fields in the gRPC request message, as long - * as each field is a non-repeated field with a primitive (non-message) type. - * The path template controls how fields of the request message are mapped to - * the URL path. - * - * Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/{name=messages/*}" - * }; - * } - * } - * message GetMessageRequest { - * string name = 1; // Mapped to URL path. - * } - * message Message { - * string text = 1; // The resource content. - * } - * - * This enables an HTTP REST to gRPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` - * - * Any fields in the request message which are not bound by the path template - * automatically become HTTP query parameters if there is no HTTP request body. - * For example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get:"/v1/messages/{message_id}" - * }; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // Mapped to URL path. - * int64 revision = 2; // Mapped to URL query parameter `revision`. - * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. - * } - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | - * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: - * "foo"))` - * - * Note that fields which are mapped to URL query parameters must have a - * primitive type or a repeated primitive type or a non-repeated message type. - * In the case of a repeated type, the parameter can be repeated in the URL - * as `...?param=A¶m=B`. In the case of a message type, each field of the - * message is mapped to a separate parameter, such as - * `...?foo.a=A&foo.b=B&foo.c=C`. - * - * For HTTP methods that allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice when - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * This enables the following two alternative HTTP JSON to RPC mappings: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: - * "123456")` - * - * ## Rules for HTTP mapping - * - * 1. Leaf request fields (recursive expansion nested messages in the request - * message) are classified into three categories: - * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP - * request body. - * - All other fields are passed via the URL query parameters, and the - * parameter name is the field path in the request message. A repeated - * field can be represented as multiple query parameters under the same - * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields - * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all - * fields are passed via URL path and URL query parameters. - * - * ### Path template syntax - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single URL path segment. The syntax `**` matches - * zero or more URL path segments, which must be the last part of the URL path - * except the `Verb`. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` - * contains any reserved character, such characters should be percent-encoded - * before the matching. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path on the client - * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The - * server side does the reverse decoding. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{var}`. - * - * If a variable contains multiple path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path on the - * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. - * The server side does the reverse decoding, except "%2F" and "%2f" are left - * unchanged. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{+var}`. - * - * ## Using gRPC API Service Configuration - * - * gRPC API Service Configuration (service config) is a configuration language - * for configuring a gRPC service to become a user-facing product. The - * service config is simply the YAML representation of the `google.api.Service` - * proto message. - * - * As an alternative to annotating your proto file, you can configure gRPC - * transcoding in your service config YAML files. You do this by specifying a - * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same - * effect as the proto annotation. This can be particularly useful if you - * have a proto that is reused in multiple services. Note that any transcoding - * specified in the service config will override any matching transcoding - * configuration in the proto. - * - * Example: - * - * http: - * rules: - * # Selects a gRPC method and applies HttpRule to it. - * - selector: example.v1.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * ## Special notes - * - * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the - * proto to JSON conversion must follow the [proto3 - * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). - * - * While the single segment variable follows the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** follow RFC 6570 Section - * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding - * for multi segment variables. - * - * The path variables **must not** refer to any repeated or mapped field, - * because client libraries are not capable of handling such variable expansion. - * - * The path variables **must not** capture the leading "/" character. The reason - * is that the most common use case "{var}" does not capture the leading "/" - * character. For consistency, all path variables must share the same behavior. - * - * Repeated message fields must not be mapped to URL query parameters, because - * no client library can support such complicated mapping. - * - * If an API needs to use a JSON array for request or response body, it can map - * the request or response body to a repeated field. However, some gRPC - * Transcoding implementations may not support this feature. - */ -export interface HttpRule { - /** - * Selects a method to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** - * Maps to HTTP GET. Used for listing and getting information about - * resources. - */ - get?: string; - /** Maps to HTTP PUT. Used for replacing a resource. */ - put?: string; - /** Maps to HTTP POST. Used for creating a resource or performing an action. */ - post?: string; - /** Maps to HTTP DELETE. Used for deleting a resource. */ - delete?: string; - /** Maps to HTTP PATCH. Used for updating a resource. */ - patch?: string; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom?: CustomHttpPattern | undefined; - /** - * The name of the request field whose value is mapped to the HTTP request - * body, or `*` for mapping all request fields not captured by the path - * pattern to the HTTP body, or omitted for not having any HTTP request body. - * - * NOTE: the referred field must be present at the top-level of the request - * message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * response body. When omitted, the entire response message will be used - * as the HTTP response body. - * - * NOTE: The referred field must be present at the top-level of the response - * message type. - */ - responseBody: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additionalBindings: HttpRule[]; -} -export interface HttpRuleProtoMsg { - typeUrl: "/google.api.HttpRule"; - value: Uint8Array; -} -/** - * # gRPC Transcoding - * - * gRPC Transcoding is a feature for mapping between a gRPC method and one or - * more HTTP REST endpoints. It allows developers to build a single API service - * that supports both gRPC APIs and REST APIs. Many systems, including [Google - * APIs](https://github.com/googleapis/googleapis), - * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC - * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), - * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature - * and use it for large scale production services. - * - * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies - * how different portions of the gRPC request message are mapped to the URL - * path, URL query parameters, and HTTP request body. It also controls how the - * gRPC response message is mapped to the HTTP response body. `HttpRule` is - * typically specified as an `google.api.http` annotation on the gRPC method. - * - * Each mapping specifies a URL path template and an HTTP method. The path - * template may refer to one or more fields in the gRPC request message, as long - * as each field is a non-repeated field with a primitive (non-message) type. - * The path template controls how fields of the request message are mapped to - * the URL path. - * - * Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/{name=messages/*}" - * }; - * } - * } - * message GetMessageRequest { - * string name = 1; // Mapped to URL path. - * } - * message Message { - * string text = 1; // The resource content. - * } - * - * This enables an HTTP REST to gRPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` - * - * Any fields in the request message which are not bound by the path template - * automatically become HTTP query parameters if there is no HTTP request body. - * For example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get:"/v1/messages/{message_id}" - * }; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // Mapped to URL path. - * int64 revision = 2; // Mapped to URL query parameter `revision`. - * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. - * } - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | - * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: - * "foo"))` - * - * Note that fields which are mapped to URL query parameters must have a - * primitive type or a repeated primitive type or a non-repeated message type. - * In the case of a repeated type, the parameter can be repeated in the URL - * as `...?param=A¶m=B`. In the case of a message type, each field of the - * message is mapped to a separate parameter, such as - * `...?foo.a=A&foo.b=B&foo.c=C`. - * - * For HTTP methods that allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice when - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * This enables the following two alternative HTTP JSON to RPC mappings: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: - * "123456")` - * - * ## Rules for HTTP mapping - * - * 1. Leaf request fields (recursive expansion nested messages in the request - * message) are classified into three categories: - * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP - * request body. - * - All other fields are passed via the URL query parameters, and the - * parameter name is the field path in the request message. A repeated - * field can be represented as multiple query parameters under the same - * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields - * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all - * fields are passed via URL path and URL query parameters. - * - * ### Path template syntax - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single URL path segment. The syntax `**` matches - * zero or more URL path segments, which must be the last part of the URL path - * except the `Verb`. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` - * contains any reserved character, such characters should be percent-encoded - * before the matching. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path on the client - * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The - * server side does the reverse decoding. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{var}`. - * - * If a variable contains multiple path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path on the - * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. - * The server side does the reverse decoding, except "%2F" and "%2f" are left - * unchanged. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{+var}`. - * - * ## Using gRPC API Service Configuration - * - * gRPC API Service Configuration (service config) is a configuration language - * for configuring a gRPC service to become a user-facing product. The - * service config is simply the YAML representation of the `google.api.Service` - * proto message. - * - * As an alternative to annotating your proto file, you can configure gRPC - * transcoding in your service config YAML files. You do this by specifying a - * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same - * effect as the proto annotation. This can be particularly useful if you - * have a proto that is reused in multiple services. Note that any transcoding - * specified in the service config will override any matching transcoding - * configuration in the proto. - * - * Example: - * - * http: - * rules: - * # Selects a gRPC method and applies HttpRule to it. - * - selector: example.v1.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * ## Special notes - * - * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the - * proto to JSON conversion must follow the [proto3 - * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). - * - * While the single segment variable follows the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** follow RFC 6570 Section - * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding - * for multi segment variables. - * - * The path variables **must not** refer to any repeated or mapped field, - * because client libraries are not capable of handling such variable expansion. - * - * The path variables **must not** capture the leading "/" character. The reason - * is that the most common use case "{var}" does not capture the leading "/" - * character. For consistency, all path variables must share the same behavior. - * - * Repeated message fields must not be mapped to URL query parameters, because - * no client library can support such complicated mapping. - * - * If an API needs to use a JSON array for request or response body, it can map - * the request or response body to a repeated field. However, some gRPC - * Transcoding implementations may not support this feature. - */ -export interface HttpRuleAmino { - /** - * Selects a method to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - */ - selector: string; - /** - * Maps to HTTP GET. Used for listing and getting information about - * resources. - */ - get?: string; - /** Maps to HTTP PUT. Used for replacing a resource. */ - put?: string; - /** Maps to HTTP POST. Used for creating a resource or performing an action. */ - post?: string; - /** Maps to HTTP DELETE. Used for deleting a resource. */ - delete?: string; - /** Maps to HTTP PATCH. Used for updating a resource. */ - patch?: string; - /** - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - */ - custom?: CustomHttpPatternAmino | undefined; - /** - * The name of the request field whose value is mapped to the HTTP request - * body, or `*` for mapping all request fields not captured by the path - * pattern to the HTTP body, or omitted for not having any HTTP request body. - * - * NOTE: the referred field must be present at the top-level of the request - * message type. - */ - body: string; - /** - * Optional. The name of the response field whose value is mapped to the HTTP - * response body. When omitted, the entire response message will be used - * as the HTTP response body. - * - * NOTE: The referred field must be present at the top-level of the response - * message type. - */ - response_body: string; - /** - * Additional HTTP bindings for the selector. Nested bindings must - * not contain an `additional_bindings` field themselves (that is, - * the nesting may only be one level deep). - */ - additional_bindings: HttpRuleAmino[]; -} -export interface HttpRuleAminoMsg { - type: "/google.api.HttpRule"; - value: HttpRuleAmino; -} -/** - * # gRPC Transcoding - * - * gRPC Transcoding is a feature for mapping between a gRPC method and one or - * more HTTP REST endpoints. It allows developers to build a single API service - * that supports both gRPC APIs and REST APIs. Many systems, including [Google - * APIs](https://github.com/googleapis/googleapis), - * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC - * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), - * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature - * and use it for large scale production services. - * - * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies - * how different portions of the gRPC request message are mapped to the URL - * path, URL query parameters, and HTTP request body. It also controls how the - * gRPC response message is mapped to the HTTP response body. `HttpRule` is - * typically specified as an `google.api.http` annotation on the gRPC method. - * - * Each mapping specifies a URL path template and an HTTP method. The path - * template may refer to one or more fields in the gRPC request message, as long - * as each field is a non-repeated field with a primitive (non-message) type. - * The path template controls how fields of the request message are mapped to - * the URL path. - * - * Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/{name=messages/*}" - * }; - * } - * } - * message GetMessageRequest { - * string name = 1; // Mapped to URL path. - * } - * message Message { - * string text = 1; // The resource content. - * } - * - * This enables an HTTP REST to gRPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` - * - * Any fields in the request message which are not bound by the path template - * automatically become HTTP query parameters if there is no HTTP request body. - * For example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get:"/v1/messages/{message_id}" - * }; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // Mapped to URL path. - * int64 revision = 2; // Mapped to URL query parameter `revision`. - * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. - * } - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | - * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: - * "foo"))` - * - * Note that fields which are mapped to URL query parameters must have a - * primitive type or a repeated primitive type or a non-repeated message type. - * In the case of a repeated type, the parameter can be repeated in the URL - * as `...?param=A¶m=B`. In the case of a message type, each field of the - * message is mapped to a separate parameter, such as - * `...?foo.a=A&foo.b=B&foo.c=C`. - * - * For HTTP methods that allow a request body, the `body` field - * specifies the mapping. Consider a REST update method on the - * message resource collection: - * - * service Messaging { - * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "message" - * }; - * } - * } - * message UpdateMessageRequest { - * string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body - * } - * - * The following HTTP JSON to RPC mapping is enabled, where the - * representation of the JSON in the request body is determined by - * protos JSON encoding: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" message { text: "Hi!" })` - * - * The special name `*` can be used in the body mapping to define that - * every field not bound by the path template should be mapped to the - * request body. This enables the following alternative definition of - * the update method: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * patch: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * string text = 2; - * } - * - * - * The following HTTP JSON to RPC mapping is enabled: - * - * HTTP | gRPC - * -----|----- - * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` - * - * Note that when using `*` in the body mapping, it is not possible to - * have HTTP parameters, as all fields not bound by the path end in - * the body. This makes this option more rarely used in practice when - * defining REST APIs. The common usage of `*` is in custom methods - * which don't use the URL at all for transferring data. - * - * It is possible to define multiple HTTP methods for one RPC by using - * the `additional_bindings` option. Example: - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http) = { - * get: "/v1/messages/{message_id}" - * additional_bindings { - * get: "/v1/users/{user_id}/messages/{message_id}" - * } - * }; - * } - * } - * message GetMessageRequest { - * string message_id = 1; - * string user_id = 2; - * } - * - * This enables the following two alternative HTTP JSON to RPC mappings: - * - * HTTP | gRPC - * -----|----- - * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: - * "123456")` - * - * ## Rules for HTTP mapping - * - * 1. Leaf request fields (recursive expansion nested messages in the request - * message) are classified into three categories: - * - Fields referred by the path template. They are passed via the URL path. - * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP - * request body. - * - All other fields are passed via the URL query parameters, and the - * parameter name is the field path in the request message. A repeated - * field can be represented as multiple query parameters under the same - * name. - * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields - * are passed via URL path and HTTP request body. - * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all - * fields are passed via URL path and URL query parameters. - * - * ### Path template syntax - * - * Template = "/" Segments [ Verb ] ; - * Segments = Segment { "/" Segment } ; - * Segment = "*" | "**" | LITERAL | Variable ; - * Variable = "{" FieldPath [ "=" Segments ] "}" ; - * FieldPath = IDENT { "." IDENT } ; - * Verb = ":" LITERAL ; - * - * The syntax `*` matches a single URL path segment. The syntax `**` matches - * zero or more URL path segments, which must be the last part of the URL path - * except the `Verb`. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` - * contains any reserved character, such characters should be percent-encoded - * before the matching. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path on the client - * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The - * server side does the reverse decoding. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{var}`. - * - * If a variable contains multiple path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path on the - * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. - * The server side does the reverse decoding, except "%2F" and "%2f" are left - * unchanged. Such variables show up in the - * [Discovery - * Document](https://developers.google.com/discovery/v1/reference/apis) as - * `{+var}`. - * - * ## Using gRPC API Service Configuration - * - * gRPC API Service Configuration (service config) is a configuration language - * for configuring a gRPC service to become a user-facing product. The - * service config is simply the YAML representation of the `google.api.Service` - * proto message. - * - * As an alternative to annotating your proto file, you can configure gRPC - * transcoding in your service config YAML files. You do this by specifying a - * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same - * effect as the proto annotation. This can be particularly useful if you - * have a proto that is reused in multiple services. Note that any transcoding - * specified in the service config will override any matching transcoding - * configuration in the proto. - * - * Example: - * - * http: - * rules: - * # Selects a gRPC method and applies HttpRule to it. - * - selector: example.v1.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * ## Special notes - * - * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the - * proto to JSON conversion must follow the [proto3 - * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). - * - * While the single segment variable follows the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** follow RFC 6570 Section - * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding - * for multi segment variables. - * - * The path variables **must not** refer to any repeated or mapped field, - * because client libraries are not capable of handling such variable expansion. - * - * The path variables **must not** capture the leading "/" character. The reason - * is that the most common use case "{var}" does not capture the leading "/" - * character. For consistency, all path variables must share the same behavior. - * - * Repeated message fields must not be mapped to URL query parameters, because - * no client library can support such complicated mapping. - * - * If an API needs to use a JSON array for request or response body, it can map - * the request or response body to a repeated field. However, some gRPC - * Transcoding implementations may not support this feature. - */ -export interface HttpRuleSDKType { - selector: string; - get?: string; - put?: string; - post?: string; - delete?: string; - patch?: string; - custom?: CustomHttpPatternSDKType | undefined; - body: string; - response_body: string; - additional_bindings: HttpRuleSDKType[]; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPattern { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export interface CustomHttpPatternProtoMsg { - typeUrl: "/google.api.CustomHttpPattern"; - value: Uint8Array; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPatternAmino { - /** The name of this custom HTTP verb. */ - kind: string; - /** The path matched by this custom verb. */ - path: string; -} -export interface CustomHttpPatternAminoMsg { - type: "/google.api.CustomHttpPattern"; - value: CustomHttpPatternAmino; -} -/** A custom pattern is used for defining custom HTTP verb. */ -export interface CustomHttpPatternSDKType { - kind: string; - path: string; -} -function createBaseHttp(): Http { - return { - rules: [], - fullyDecodeReservedExpansion: false - }; -} -export const Http = { - typeUrl: "/google.api.Http", - encode(message: Http, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.rules) { - HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.fullyDecodeReservedExpansion === true) { - writer.uint32(16).bool(message.fullyDecodeReservedExpansion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Http { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rules.push(HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Http { - return { - rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [], - fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion) ? Boolean(object.fullyDecodeReservedExpansion) : false - }; - }, - toJSON(message: Http): unknown { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map(e => e ? HttpRule.toJSON(e) : undefined); - } else { - obj.rules = []; - } - message.fullyDecodeReservedExpansion !== undefined && (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); - return obj; - }, - fromPartial(object: DeepPartial): Http { - const message = createBaseHttp(); - message.rules = object.rules?.map(e => HttpRule.fromPartial(e)) || []; - message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; - return message; - }, - fromSDK(object: HttpSDKType): Http { - return { - rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromSDK(e)) : [], - fullyDecodeReservedExpansion: object?.fully_decode_reserved_expansion - }; - }, - toSDK(message: Http): HttpSDKType { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map(e => e ? HttpRule.toSDK(e) : undefined); - } else { - obj.rules = []; - } - obj.fully_decode_reserved_expansion = message.fullyDecodeReservedExpansion; - return obj; - }, - fromAmino(object: HttpAmino): Http { - return { - rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromAmino(e)) : [], - fullyDecodeReservedExpansion: object.fully_decode_reserved_expansion - }; - }, - toAmino(message: Http): HttpAmino { - const obj: any = {}; - if (message.rules) { - obj.rules = message.rules.map(e => e ? HttpRule.toAmino(e) : undefined); - } else { - obj.rules = []; - } - obj.fully_decode_reserved_expansion = message.fullyDecodeReservedExpansion; - return obj; - }, - fromAminoMsg(object: HttpAminoMsg): Http { - return Http.fromAmino(object.value); - }, - fromProtoMsg(message: HttpProtoMsg): Http { - return Http.decode(message.value); - }, - toProto(message: Http): Uint8Array { - return Http.encode(message).finish(); - }, - toProtoMsg(message: Http): HttpProtoMsg { - return { - typeUrl: "/google.api.Http", - value: Http.encode(message).finish() - }; - } -}; -function createBaseHttpRule(): HttpRule { - return { - selector: "", - get: undefined, - put: undefined, - post: undefined, - delete: undefined, - patch: undefined, - custom: undefined, - body: "", - responseBody: "", - additionalBindings: [] - }; -} -export const HttpRule = { - typeUrl: "/google.api.HttpRule", - encode(message: HttpRule, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.selector !== "") { - writer.uint32(10).string(message.selector); - } - if (message.get !== undefined) { - writer.uint32(18).string(message.get); - } - if (message.put !== undefined) { - writer.uint32(26).string(message.put); - } - if (message.post !== undefined) { - writer.uint32(34).string(message.post); - } - if (message.delete !== undefined) { - writer.uint32(42).string(message.delete); - } - if (message.patch !== undefined) { - writer.uint32(50).string(message.patch); - } - if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); - } - if (message.body !== "") { - writer.uint32(58).string(message.body); - } - if (message.responseBody !== "") { - writer.uint32(98).string(message.responseBody); - } - for (const v of message.additionalBindings) { - HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttpRule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message.delete = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): HttpRule { - return { - selector: isSet(object.selector) ? String(object.selector) : "", - get: isSet(object.get) ? String(object.get) : undefined, - put: isSet(object.put) ? String(object.put) : undefined, - post: isSet(object.post) ? String(object.post) : undefined, - delete: isSet(object.delete) ? String(object.delete) : undefined, - patch: isSet(object.patch) ? String(object.patch) : undefined, - custom: isSet(object.custom) ? CustomHttpPattern.fromJSON(object.custom) : undefined, - body: isSet(object.body) ? String(object.body) : "", - responseBody: isSet(object.responseBody) ? String(object.responseBody) : "", - additionalBindings: Array.isArray(object?.additionalBindings) ? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e)) : [] - }; - }, - toJSON(message: HttpRule): unknown { - const obj: any = {}; - message.selector !== undefined && (obj.selector = message.selector); - message.get !== undefined && (obj.get = message.get); - message.put !== undefined && (obj.put = message.put); - message.post !== undefined && (obj.post = message.post); - message.delete !== undefined && (obj.delete = message.delete); - message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && (obj.custom = message.custom ? CustomHttpPattern.toJSON(message.custom) : undefined); - message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && (obj.responseBody = message.responseBody); - if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map(e => e ? HttpRule.toJSON(e) : undefined); - } else { - obj.additionalBindings = []; - } - return obj; - }, - fromPartial(object: DeepPartial): HttpRule { - const message = createBaseHttpRule(); - message.selector = object.selector ?? ""; - message.get = object.get ?? undefined; - message.put = object.put ?? undefined; - message.post = object.post ?? undefined; - message.delete = object.delete ?? undefined; - message.patch = object.patch ?? undefined; - message.custom = object.custom !== undefined && object.custom !== null ? CustomHttpPattern.fromPartial(object.custom) : undefined; - message.body = object.body ?? ""; - message.responseBody = object.responseBody ?? ""; - message.additionalBindings = object.additionalBindings?.map(e => HttpRule.fromPartial(e)) || []; - return message; - }, - fromSDK(object: HttpRuleSDKType): HttpRule { - return { - selector: object?.selector, - get: object?.get, - put: object?.put, - post: object?.post, - delete: object?.delete, - patch: object?.patch, - custom: object.custom ? CustomHttpPattern.fromSDK(object.custom) : undefined, - body: object?.body, - responseBody: object?.response_body, - additionalBindings: Array.isArray(object?.additional_bindings) ? object.additional_bindings.map((e: any) => HttpRule.fromSDK(e)) : [] - }; - }, - toSDK(message: HttpRule): HttpRuleSDKType { - const obj: any = {}; - obj.selector = message.selector; - obj.get = message.get; - obj.put = message.put; - obj.post = message.post; - obj.delete = message.delete; - obj.patch = message.patch; - message.custom !== undefined && (obj.custom = message.custom ? CustomHttpPattern.toSDK(message.custom) : undefined); - obj.body = message.body; - obj.response_body = message.responseBody; - if (message.additionalBindings) { - obj.additional_bindings = message.additionalBindings.map(e => e ? HttpRule.toSDK(e) : undefined); - } else { - obj.additional_bindings = []; - } - return obj; - }, - fromAmino(object: HttpRuleAmino): HttpRule { - return { - selector: object.selector, - get: object?.get, - put: object?.put, - post: object?.post, - delete: object?.delete, - patch: object?.patch, - custom: object?.custom ? CustomHttpPattern.fromAmino(object.custom) : undefined, - body: object.body, - responseBody: object.response_body, - additionalBindings: Array.isArray(object?.additional_bindings) ? object.additional_bindings.map((e: any) => HttpRule.fromAmino(e)) : [] - }; - }, - toAmino(message: HttpRule): HttpRuleAmino { - const obj: any = {}; - obj.selector = message.selector; - obj.get = message.get; - obj.put = message.put; - obj.post = message.post; - obj.delete = message.delete; - obj.patch = message.patch; - obj.custom = message.custom ? CustomHttpPattern.toAmino(message.custom) : undefined; - obj.body = message.body; - obj.response_body = message.responseBody; - if (message.additionalBindings) { - obj.additional_bindings = message.additionalBindings.map(e => e ? HttpRule.toAmino(e) : undefined); - } else { - obj.additional_bindings = []; - } - return obj; - }, - fromAminoMsg(object: HttpRuleAminoMsg): HttpRule { - return HttpRule.fromAmino(object.value); - }, - fromProtoMsg(message: HttpRuleProtoMsg): HttpRule { - return HttpRule.decode(message.value); - }, - toProto(message: HttpRule): Uint8Array { - return HttpRule.encode(message).finish(); - }, - toProtoMsg(message: HttpRule): HttpRuleProtoMsg { - return { - typeUrl: "/google.api.HttpRule", - value: HttpRule.encode(message).finish() - }; - } -}; -function createBaseCustomHttpPattern(): CustomHttpPattern { - return { - kind: "", - path: "" - }; -} -export const CustomHttpPattern = { - typeUrl: "/google.api.CustomHttpPattern", - encode(message: CustomHttpPattern, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCustomHttpPattern(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CustomHttpPattern { - return { - kind: isSet(object.kind) ? String(object.kind) : "", - path: isSet(object.path) ? String(object.path) : "" - }; - }, - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - fromPartial(object: DeepPartial): CustomHttpPattern { - const message = createBaseCustomHttpPattern(); - message.kind = object.kind ?? ""; - message.path = object.path ?? ""; - return message; - }, - fromSDK(object: CustomHttpPatternSDKType): CustomHttpPattern { - return { - kind: object?.kind, - path: object?.path - }; - }, - toSDK(message: CustomHttpPattern): CustomHttpPatternSDKType { - const obj: any = {}; - obj.kind = message.kind; - obj.path = message.path; - return obj; - }, - fromAmino(object: CustomHttpPatternAmino): CustomHttpPattern { - return { - kind: object.kind, - path: object.path - }; - }, - toAmino(message: CustomHttpPattern): CustomHttpPatternAmino { - const obj: any = {}; - obj.kind = message.kind; - obj.path = message.path; - return obj; - }, - fromAminoMsg(object: CustomHttpPatternAminoMsg): CustomHttpPattern { - return CustomHttpPattern.fromAmino(object.value); - }, - fromProtoMsg(message: CustomHttpPatternProtoMsg): CustomHttpPattern { - return CustomHttpPattern.decode(message.value); - }, - toProto(message: CustomHttpPattern): Uint8Array { - return CustomHttpPattern.encode(message).finish(); - }, - toProtoMsg(message: CustomHttpPattern): CustomHttpPatternProtoMsg { - return { - typeUrl: "/google.api.CustomHttpPattern", - value: CustomHttpPattern.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/bundle.ts b/examples/interchainjs/src/codegen/google/bundle.ts deleted file mode 100644 index a1b510de..00000000 --- a/examples/interchainjs/src/codegen/google/bundle.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as _101 from "./api/annotations"; -import * as _102 from "./api/http"; -import * as _103 from "./protobuf/any"; -import * as _104 from "./protobuf/descriptor"; -import * as _105 from "./protobuf/duration"; -import * as _106 from "./protobuf/empty"; -import * as _107 from "./protobuf/timestamp"; -export namespace google { - export const api = { - ..._101, - ..._102 - }; - export const protobuf = { - ..._103, - ..._104, - ..._105, - ..._106, - ..._107 - }; -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/protobuf/any.ts b/examples/interchainjs/src/codegen/google/protobuf/any.ts deleted file mode 100644 index 7565d80c..00000000 --- a/examples/interchainjs/src/codegen/google/protobuf/any.ts +++ /dev/null @@ -1,420 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface Any { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - typeUrl: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: Uint8Array; -} -export interface AnyProtoMsg { - typeUrl: "/google.protobuf.Any"; - value: Uint8Array; -} -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface AnyAmino { - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - */ - type: string; - /** Must be a valid serialized protocol buffer of the above specified type. */ - value: any; -} -export interface AnyAminoMsg { - type: string; - value: AnyAmino; -} -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - */ -export interface AnySDKType { - type_url: string; - value: Uint8Array; -} -function createBaseAny(): Any { - return { - typeUrl: "", - value: new Uint8Array() - }; -} -export const Any = { - typeUrl: "/google.protobuf.Any", - encode(message: Any, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.typeUrl !== "") { - writer.uint32(10).string(message.typeUrl); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Any { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAny(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.typeUrl = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Any { - return { - typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "", - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() - }; - }, - toJSON(message: Any): unknown { - const obj: any = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): Any { - const message = createBaseAny(); - message.typeUrl = object.typeUrl ?? ""; - message.value = object.value ?? new Uint8Array(); - return message; - }, - fromSDK(object: AnySDKType): Any { - return { - typeUrl: object?.type_url, - value: object?.value - }; - }, - toSDK(message: Any): AnySDKType { - const obj: any = {}; - obj.type_url = message.typeUrl; - obj.value = message.value; - return obj; - }, - fromAmino(object: AnyAmino): Any { - return { - typeUrl: object.type, - value: object.value - }; - }, - toAmino(message: Any): AnyAmino { - const obj: any = {}; - obj.type = message.typeUrl; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: AnyAminoMsg): Any { - return Any.fromAmino(object.value); - }, - fromProtoMsg(message: AnyProtoMsg): Any { - return Any.decode(message.value); - }, - toProto(message: Any): Uint8Array { - return Any.encode(message).finish(); - }, - toProtoMsg(message: Any): AnyProtoMsg { - return { - typeUrl: "/google.protobuf.Any", - value: Any.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/protobuf/descriptor.ts b/examples/interchainjs/src/codegen/google/protobuf/descriptor.ts deleted file mode 100644 index 23324f59..00000000 --- a/examples/interchainjs/src/codegen/google/protobuf/descriptor.ts +++ /dev/null @@ -1,6220 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; -export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, -} -export const FieldDescriptorProto_TypeSDKType = FieldDescriptorProto_Type; -export const FieldDescriptorProto_TypeAmino = FieldDescriptorProto_Type; -export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - case FieldDescriptorProto_Type.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, -} -export const FieldDescriptorProto_LabelSDKType = FieldDescriptorProto_Label; -export const FieldDescriptorProto_LabelAmino = FieldDescriptorProto_Label; -export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } -} -export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - case FieldDescriptorProto_Label.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** Generated classes can be optimized for speed or code size. */ -export enum FileOptions_OptimizeMode { - /** - * SPEED - Generate complete code for parsing, serialization, - * etc. - */ - SPEED = 1, - /** CODE_SIZE - Use ReflectionOps to implement these methods. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, -} -export const FileOptions_OptimizeModeSDKType = FileOptions_OptimizeMode; -export const FileOptions_OptimizeModeAmino = FileOptions_OptimizeMode; -export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } -} -export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - case FileOptions_OptimizeMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, -} -export const FieldOptions_CTypeSDKType = FieldOptions_CType; -export const FieldOptions_CTypeAmino = FieldOptions_CType; -export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } -} -export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - case FieldOptions_CType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, -} -export const FieldOptions_JSTypeSDKType = FieldOptions_JSType; -export const FieldOptions_JSTypeAmino = FieldOptions_JSType; -export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } -} -export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - case FieldOptions_JSType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, -} -export const MethodOptions_IdempotencyLevelSDKType = MethodOptions_IdempotencyLevel; -export const MethodOptions_IdempotencyLevelAmino = MethodOptions_IdempotencyLevel; -export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } -} -export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - case MethodOptions_IdempotencyLevel.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSet { - file: FileDescriptorProto[]; -} -export interface FileDescriptorSetProtoMsg { - typeUrl: "/google.protobuf.FileDescriptorSet"; - value: Uint8Array; -} -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSetAmino { - file: FileDescriptorProtoAmino[]; -} -export interface FileDescriptorSetAminoMsg { - type: "/google.protobuf.FileDescriptorSet"; - value: FileDescriptorSetAmino; -} -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - */ -export interface FileDescriptorSetSDKType { - file: FileDescriptorProtoSDKType[]; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name: string; - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency: number[]; - /** All top-level definitions in this file. */ - messageType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -export interface FileDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.FileDescriptorProto"; - value: Uint8Array; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProtoAmino { - /** file name, relative to root of source tree */ - name: string; - package: string; - /** Names of files imported by this file. */ - dependency: string[]; - /** Indexes of the public imported files in the dependency list above. */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weak_dependency: number[]; - /** All top-level definitions in this file. */ - message_type: DescriptorProtoAmino[]; - enum_type: EnumDescriptorProtoAmino[]; - service: ServiceDescriptorProtoAmino[]; - extension: FieldDescriptorProtoAmino[]; - options?: FileOptionsAmino | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - source_code_info?: SourceCodeInfoAmino | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax: string; -} -export interface FileDescriptorProtoAminoMsg { - type: "/google.protobuf.FileDescriptorProto"; - value: FileDescriptorProtoAmino; -} -/** Describes a complete .proto file. */ -export interface FileDescriptorProtoSDKType { - name: string; - package: string; - dependency: string[]; - public_dependency: number[]; - weak_dependency: number[]; - message_type: DescriptorProtoSDKType[]; - enum_type: EnumDescriptorProtoSDKType[]; - service: ServiceDescriptorProtoSDKType[]; - extension: FieldDescriptorProtoSDKType[]; - options: FileOptionsSDKType | undefined; - source_code_info: SourceCodeInfoSDKType | undefined; - syntax: string; -} -/** Describes a message type. */ -export interface DescriptorProto { - name: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nestedType: DescriptorProto[]; - enumType: EnumDescriptorProto[]; - extensionRange: DescriptorProto_ExtensionRange[]; - oneofDecl: OneofDescriptorProto[]; - options: MessageOptions | undefined; - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName: string[]; -} -export interface DescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.DescriptorProto"; - value: Uint8Array; -} -/** Describes a message type. */ -export interface DescriptorProtoAmino { - name: string; - field: FieldDescriptorProtoAmino[]; - extension: FieldDescriptorProtoAmino[]; - nested_type: DescriptorProtoAmino[]; - enum_type: EnumDescriptorProtoAmino[]; - extension_range: DescriptorProto_ExtensionRangeAmino[]; - oneof_decl: OneofDescriptorProtoAmino[]; - options?: MessageOptionsAmino | undefined; - reserved_range: DescriptorProto_ReservedRangeAmino[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reserved_name: string[]; -} -export interface DescriptorProtoAminoMsg { - type: "/google.protobuf.DescriptorProto"; - value: DescriptorProtoAmino; -} -/** Describes a message type. */ -export interface DescriptorProtoSDKType { - name: string; - field: FieldDescriptorProtoSDKType[]; - extension: FieldDescriptorProtoSDKType[]; - nested_type: DescriptorProtoSDKType[]; - enum_type: EnumDescriptorProtoSDKType[]; - extension_range: DescriptorProto_ExtensionRangeSDKType[]; - oneof_decl: OneofDescriptorProtoSDKType[]; - options: MessageOptionsSDKType | undefined; - reserved_range: DescriptorProto_ReservedRangeSDKType[]; - reserved_name: string[]; -} -export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options: ExtensionRangeOptions | undefined; -} -export interface DescriptorProto_ExtensionRangeProtoMsg { - typeUrl: "/google.protobuf.ExtensionRange"; - value: Uint8Array; -} -export interface DescriptorProto_ExtensionRangeAmino { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options?: ExtensionRangeOptionsAmino | undefined; -} -export interface DescriptorProto_ExtensionRangeAminoMsg { - type: "/google.protobuf.ExtensionRange"; - value: DescriptorProto_ExtensionRangeAmino; -} -export interface DescriptorProto_ExtensionRangeSDKType { - start: number; - end: number; - options: ExtensionRangeOptionsSDKType | undefined; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface DescriptorProto_ReservedRangeProtoMsg { - typeUrl: "/google.protobuf.ReservedRange"; - value: Uint8Array; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRangeAmino { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; -} -export interface DescriptorProto_ReservedRangeAminoMsg { - type: "/google.protobuf.ReservedRange"; - value: DescriptorProto_ReservedRangeAmino; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - */ -export interface DescriptorProto_ReservedRangeSDKType { - start: number; - end: number; -} -export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ExtensionRangeOptionsProtoMsg { - typeUrl: "/google.protobuf.ExtensionRangeOptions"; - value: Uint8Array; -} -export interface ExtensionRangeOptionsAmino { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface ExtensionRangeOptionsAminoMsg { - type: "/google.protobuf.ExtensionRangeOptions"; - value: ExtensionRangeOptionsAmino; -} -export interface ExtensionRangeOptionsSDKType { - uninterpreted_option: UninterpretedOptionSDKType[]; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProto { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - defaultValue: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName: string; - options: FieldOptions | undefined; -} -export interface FieldDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.FieldDescriptorProto"; - value: Uint8Array; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProtoAmino { - name: string; - number: number; - label: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - type_name: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * TODO(kenton): Base-64 encode? - */ - default_value: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneof_index: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - json_name: string; - options?: FieldOptionsAmino | undefined; -} -export interface FieldDescriptorProtoAminoMsg { - type: "/google.protobuf.FieldDescriptorProto"; - value: FieldDescriptorProtoAmino; -} -/** Describes a field within a message. */ -export interface FieldDescriptorProtoSDKType { - name: string; - number: number; - label: FieldDescriptorProto_Label; - type: FieldDescriptorProto_Type; - type_name: string; - extendee: string; - default_value: string; - oneof_index: number; - json_name: string; - options: FieldOptionsSDKType | undefined; -} -/** Describes a oneof. */ -export interface OneofDescriptorProto { - name: string; - options: OneofOptions | undefined; -} -export interface OneofDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.OneofDescriptorProto"; - value: Uint8Array; -} -/** Describes a oneof. */ -export interface OneofDescriptorProtoAmino { - name: string; - options?: OneofOptionsAmino | undefined; -} -export interface OneofDescriptorProtoAminoMsg { - type: "/google.protobuf.OneofDescriptorProto"; - value: OneofDescriptorProtoAmino; -} -/** Describes a oneof. */ -export interface OneofDescriptorProtoSDKType { - name: string; - options: OneofOptionsSDKType | undefined; -} -/** Describes an enum type. */ -export interface EnumDescriptorProto { - name: string; - value: EnumValueDescriptorProto[]; - options: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName: string[]; -} -export interface EnumDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.EnumDescriptorProto"; - value: Uint8Array; -} -/** Describes an enum type. */ -export interface EnumDescriptorProtoAmino { - name: string; - value: EnumValueDescriptorProtoAmino[]; - options?: EnumOptionsAmino | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reserved_range: EnumDescriptorProto_EnumReservedRangeAmino[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reserved_name: string[]; -} -export interface EnumDescriptorProtoAminoMsg { - type: "/google.protobuf.EnumDescriptorProto"; - value: EnumDescriptorProtoAmino; -} -/** Describes an enum type. */ -export interface EnumDescriptorProtoSDKType { - name: string; - value: EnumValueDescriptorProtoSDKType[]; - options: EnumOptionsSDKType | undefined; - reserved_range: EnumDescriptorProto_EnumReservedRangeSDKType[]; - reserved_name: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -export interface EnumDescriptorProto_EnumReservedRangeProtoMsg { - typeUrl: "/google.protobuf.EnumReservedRange"; - value: Uint8Array; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRangeAmino { - /** Inclusive. */ - start: number; - /** Inclusive. */ - end: number; -} -export interface EnumDescriptorProto_EnumReservedRangeAminoMsg { - type: "/google.protobuf.EnumReservedRange"; - value: EnumDescriptorProto_EnumReservedRangeAmino; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - */ -export interface EnumDescriptorProto_EnumReservedRangeSDKType { - start: number; - end: number; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProto { - name: string; - number: number; - options: EnumValueOptions | undefined; -} -export interface EnumValueDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.EnumValueDescriptorProto"; - value: Uint8Array; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProtoAmino { - name: string; - number: number; - options?: EnumValueOptionsAmino | undefined; -} -export interface EnumValueDescriptorProtoAminoMsg { - type: "/google.protobuf.EnumValueDescriptorProto"; - value: EnumValueDescriptorProtoAmino; -} -/** Describes a value within an enum. */ -export interface EnumValueDescriptorProtoSDKType { - name: string; - number: number; - options: EnumValueOptionsSDKType | undefined; -} -/** Describes a service. */ -export interface ServiceDescriptorProto { - name: string; - method: MethodDescriptorProto[]; - options: ServiceOptions | undefined; -} -export interface ServiceDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.ServiceDescriptorProto"; - value: Uint8Array; -} -/** Describes a service. */ -export interface ServiceDescriptorProtoAmino { - name: string; - method: MethodDescriptorProtoAmino[]; - options?: ServiceOptionsAmino | undefined; -} -export interface ServiceDescriptorProtoAminoMsg { - type: "/google.protobuf.ServiceDescriptorProto"; - value: ServiceDescriptorProtoAmino; -} -/** Describes a service. */ -export interface ServiceDescriptorProtoSDKType { - name: string; - method: MethodDescriptorProtoSDKType[]; - options: ServiceOptionsSDKType | undefined; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProto { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType: string; - outputType: string; - options: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming: boolean; - /** Identifies if server streams multiple server messages */ - serverStreaming: boolean; -} -export interface MethodDescriptorProtoProtoMsg { - typeUrl: "/google.protobuf.MethodDescriptorProto"; - value: Uint8Array; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProtoAmino { - name: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - input_type: string; - output_type: string; - options?: MethodOptionsAmino | undefined; - /** Identifies if client streams multiple client messages */ - client_streaming: boolean; - /** Identifies if server streams multiple server messages */ - server_streaming: boolean; -} -export interface MethodDescriptorProtoAminoMsg { - type: "/google.protobuf.MethodDescriptorProto"; - value: MethodDescriptorProtoAmino; -} -/** Describes a method of a service. */ -export interface MethodDescriptorProtoSDKType { - name: string; - input_type: string; - output_type: string; - options: MethodOptionsSDKType | undefined; - client_streaming: boolean; - server_streaming: boolean; -} -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - javaOuterClassname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles: boolean; - /** This option does nothing. */ - /** @deprecated */ - javaGenerateEqualsAndHash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8: boolean; - optimizeFor: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices: boolean; - javaGenericServices: boolean; - pyGenericServices: boolean; - phpGenericServices: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FileOptionsProtoMsg { - typeUrl: "/google.protobuf.FileOptions"; - value: Uint8Array; -} -export interface FileOptionsAmino { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - java_package: string; - /** - * If set, all the classes from the .proto file are wrapped in a single - * outer class with the given name. This applies to both Proto1 - * (equivalent to the old "--one_java_file" option) and Proto2 (where - * a .proto always translates to a single class, but you may want to - * explicitly choose the class name). - */ - java_outer_classname: string; - /** - * If set true, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the outer class - * named by java_outer_classname. However, the outer class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - java_multiple_files: boolean; - /** This option does nothing. */ - /** @deprecated */ - java_generate_equals_and_hash: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - go_package: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - cc_enable_arenas: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objc_class_prefix: string; - /** Namespace for generated classes; defaults to the package. */ - csharp_namespace: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swift_prefix: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - php_class_prefix: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - php_namespace: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - php_metadata_namespace: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - ruby_package: string; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface FileOptionsAminoMsg { - type: "/google.protobuf.FileOptions"; - value: FileOptionsAmino; -} -export interface FileOptionsSDKType { - java_package: string; - java_outer_classname: string; - java_multiple_files: boolean; - /** @deprecated */ - java_generate_equals_and_hash: boolean; - java_string_check_utf8: boolean; - optimize_for: FileOptions_OptimizeMode; - go_package: string; - cc_generic_services: boolean; - java_generic_services: boolean; - py_generic_services: boolean; - php_generic_services: boolean; - deprecated: boolean; - cc_enable_arenas: boolean; - objc_class_prefix: string; - csharp_namespace: string; - swift_prefix: string; - php_class_prefix: string; - php_namespace: string; - php_metadata_namespace: string; - ruby_package: string; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MessageOptionsProtoMsg { - typeUrl: "/google.protobuf.MessageOptions"; - value: Uint8Array; -} -export interface MessageOptionsAmino { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - message_set_wire_format: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - no_standard_descriptor_accessor: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated: boolean; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - map_entry: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface MessageOptionsAminoMsg { - type: "/google.protobuf.MessageOptions"; - value: MessageOptionsAmino; -} -export interface MessageOptionsSDKType { - message_set_wire_format: boolean; - no_standard_descriptor_accessor: boolean; - deprecated: boolean; - map_entry: boolean; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface FieldOptionsProtoMsg { - typeUrl: "/google.protobuf.FieldOptions"; - value: Uint8Array; -} -export interface FieldOptionsAmino { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - */ - lazy: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated: boolean; - /** For Google-internal migration only. Do not use. */ - weak: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface FieldOptionsAminoMsg { - type: "/google.protobuf.FieldOptions"; - value: FieldOptionsAmino; -} -export interface FieldOptionsSDKType { - ctype: FieldOptions_CType; - packed: boolean; - jstype: FieldOptions_JSType; - lazy: boolean; - deprecated: boolean; - weak: boolean; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface OneofOptionsProtoMsg { - typeUrl: "/google.protobuf.OneofOptions"; - value: Uint8Array; -} -export interface OneofOptionsAmino { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface OneofOptionsAminoMsg { - type: "/google.protobuf.OneofOptions"; - value: OneofOptionsAmino; -} -export interface OneofOptionsSDKType { - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumOptionsProtoMsg { - typeUrl: "/google.protobuf.EnumOptions"; - value: Uint8Array; -} -export interface EnumOptionsAmino { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allow_alias: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface EnumOptionsAminoMsg { - type: "/google.protobuf.EnumOptions"; - value: EnumOptionsAmino; -} -export interface EnumOptionsSDKType { - allow_alias: boolean; - deprecated: boolean; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface EnumValueOptionsProtoMsg { - typeUrl: "/google.protobuf.EnumValueOptions"; - value: Uint8Array; -} -export interface EnumValueOptionsAmino { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface EnumValueOptionsAminoMsg { - type: "/google.protobuf.EnumValueOptions"; - value: EnumValueOptionsAmino; -} -export interface EnumValueOptionsSDKType { - deprecated: boolean; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface ServiceOptionsProtoMsg { - typeUrl: "/google.protobuf.ServiceOptions"; - value: Uint8Array; -} -export interface ServiceOptionsAmino { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated: boolean; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface ServiceOptionsAminoMsg { - type: "/google.protobuf.ServiceOptions"; - value: ServiceOptionsAmino; -} -export interface ServiceOptionsSDKType { - deprecated: boolean; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotencyLevel: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption: UninterpretedOption[]; -} -export interface MethodOptionsProtoMsg { - typeUrl: "/google.protobuf.MethodOptions"; - value: Uint8Array; -} -export interface MethodOptionsAmino { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpreted_option: UninterpretedOptionAmino[]; -} -export interface MethodOptionsAminoMsg { - type: "/google.protobuf.MethodOptions"; - value: MethodOptionsAmino; -} -export interface MethodOptionsSDKType { - deprecated: boolean; - idempotency_level: MethodOptions_IdempotencyLevel; - uninterpreted_option: UninterpretedOptionSDKType[]; -} -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOption { - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue: string; - positiveIntValue: bigint; - negativeIntValue: bigint; - doubleValue: number; - stringValue: Uint8Array; - aggregateValue: string; -} -export interface UninterpretedOptionProtoMsg { - typeUrl: "/google.protobuf.UninterpretedOption"; - value: Uint8Array; -} -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOptionAmino { - name: UninterpretedOption_NamePartAmino[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifier_value: string; - positive_int_value: string; - negative_int_value: string; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} -export interface UninterpretedOptionAminoMsg { - type: "/google.protobuf.UninterpretedOption"; - value: UninterpretedOptionAmino; -} -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - */ -export interface UninterpretedOptionSDKType { - name: UninterpretedOption_NamePartSDKType[]; - identifier_value: string; - positive_int_value: bigint; - negative_int_value: bigint; - double_value: number; - string_value: Uint8Array; - aggregate_value: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePart { - namePart: string; - isExtension: boolean; -} -export interface UninterpretedOption_NamePartProtoMsg { - typeUrl: "/google.protobuf.NamePart"; - value: Uint8Array; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePartAmino { - name_part: string; - is_extension: boolean; -} -export interface UninterpretedOption_NamePartAminoMsg { - type: "/google.protobuf.NamePart"; - value: UninterpretedOption_NamePartAmino; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". - */ -export interface UninterpretedOption_NamePartSDKType { - name_part: string; - is_extension: boolean; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; -} -export interface SourceCodeInfoProtoMsg { - typeUrl: "/google.protobuf.SourceCodeInfo"; - value: Uint8Array; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfoAmino { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_LocationAmino[]; -} -export interface SourceCodeInfoAminoMsg { - type: "/google.protobuf.SourceCodeInfo"; - value: SourceCodeInfoAmino; -} -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfoSDKType { - location: SourceCodeInfo_LocationSDKType[]; -} -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. *\/ - * /* Block comment attached to - * * grault. *\/ - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments: string; - trailingComments: string; - leadingDetachedComments: string[]; -} -export interface SourceCodeInfo_LocationProtoMsg { - typeUrl: "/google.protobuf.Location"; - value: Uint8Array; -} -export interface SourceCodeInfo_LocationAmino { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition. For - * example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. *\/ - * /* Block comment attached to - * * grault. *\/ - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} -export interface SourceCodeInfo_LocationAminoMsg { - type: "/google.protobuf.Location"; - value: SourceCodeInfo_LocationAmino; -} -export interface SourceCodeInfo_LocationSDKType { - path: number[]; - span: number[]; - leading_comments: string; - trailing_comments: string; - leading_detached_comments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -export interface GeneratedCodeInfoProtoMsg { - typeUrl: "/google.protobuf.GeneratedCodeInfo"; - value: Uint8Array; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfoAmino { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation: GeneratedCodeInfo_AnnotationAmino[]; -} -export interface GeneratedCodeInfoAminoMsg { - type: "/google.protobuf.GeneratedCodeInfo"; - value: GeneratedCodeInfoAmino; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - */ -export interface GeneratedCodeInfoSDKType { - annotation: GeneratedCodeInfo_AnnotationSDKType[]; -} -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export interface GeneratedCodeInfo_AnnotationProtoMsg { - typeUrl: "/google.protobuf.Annotation"; - value: Uint8Array; -} -export interface GeneratedCodeInfo_AnnotationAmino { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path: number[]; - /** Identifies the filesystem path to the original source .proto. */ - source_file: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end: number; -} -export interface GeneratedCodeInfo_AnnotationAminoMsg { - type: "/google.protobuf.Annotation"; - value: GeneratedCodeInfo_AnnotationAmino; -} -export interface GeneratedCodeInfo_AnnotationSDKType { - path: number[]; - source_file: string; - begin: number; - end: number; -} -function createBaseFileDescriptorSet(): FileDescriptorSet { - return { - file: [] - }; -} -export const FileDescriptorSet = { - typeUrl: "/google.protobuf.FileDescriptorSet", - encode(message: FileDescriptorSet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FileDescriptorSet { - return { - file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [] - }; - }, - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map(e => e ? FileDescriptorProto.toJSON(e) : undefined); - } else { - obj.file = []; - } - return obj; - }, - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = createBaseFileDescriptorSet(); - message.file = object.file?.map(e => FileDescriptorProto.fromPartial(e)) || []; - return message; - }, - fromSDK(object: FileDescriptorSetSDKType): FileDescriptorSet { - return { - file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromSDK(e)) : [] - }; - }, - toSDK(message: FileDescriptorSet): FileDescriptorSetSDKType { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map(e => e ? FileDescriptorProto.toSDK(e) : undefined); - } else { - obj.file = []; - } - return obj; - }, - fromAmino(object: FileDescriptorSetAmino): FileDescriptorSet { - return { - file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromAmino(e)) : [] - }; - }, - toAmino(message: FileDescriptorSet): FileDescriptorSetAmino { - const obj: any = {}; - if (message.file) { - obj.file = message.file.map(e => e ? FileDescriptorProto.toAmino(e) : undefined); - } else { - obj.file = []; - } - return obj; - }, - fromAminoMsg(object: FileDescriptorSetAminoMsg): FileDescriptorSet { - return FileDescriptorSet.fromAmino(object.value); - }, - fromProtoMsg(message: FileDescriptorSetProtoMsg): FileDescriptorSet { - return FileDescriptorSet.decode(message.value); - }, - toProto(message: FileDescriptorSet): Uint8Array { - return FileDescriptorSet.encode(message).finish(); - }, - toProtoMsg(message: FileDescriptorSet): FileDescriptorSetProtoMsg { - return { - typeUrl: "/google.protobuf.FileDescriptorSet", - value: FileDescriptorSet.encode(message).finish() - }; - } -}; -function createBaseFileDescriptorProto(): FileDescriptorProto { - return { - name: "", - package: "", - dependency: [], - publicDependency: [], - weakDependency: [], - messageType: [], - enumType: [], - service: [], - extension: [], - options: FileOptions.fromPartial({}), - sourceCodeInfo: SourceCodeInfo.fromPartial({}), - syntax: "" - }; -} -export const FileDescriptorProto = { - typeUrl: "/google.protobuf.FileDescriptorProto", - encode(message: FileDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== "") { - writer.uint32(18).string(message.package); - } - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.service) { - ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.options !== undefined) { - FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); - } - if (message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.package = reader.string(); - break; - case 3: - message.dependency.push(reader.string()); - break; - case 10: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency.push(reader.int32()); - } - } else { - message.publicDependency.push(reader.int32()); - } - break; - case 11: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency.push(reader.int32()); - } - } else { - message.weakDependency.push(reader.int32()); - } - break; - case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FileDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => String(e)) : [], - publicDependency: Array.isArray(object?.publicDependency) ? object.publicDependency.map((e: any) => Number(e)) : [], - weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => Number(e)) : [], - messageType: Array.isArray(object?.messageType) ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], - service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "" - }; - }, - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map(e => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map(e => Math.round(e)); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map(e => Math.round(e)); - } else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map(e => e ? DescriptorProto.toJSON(e) : undefined); - } else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map(e => e ? EnumDescriptorProto.toJSON(e) : undefined); - } else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map(e => e ? ServiceDescriptorProto.toJSON(e) : undefined); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toJSON(e) : undefined); - } else { - obj.extension = []; - } - message.options !== undefined && (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined); - message.sourceCodeInfo !== undefined && (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = createBaseFileDescriptorProto(); - message.name = object.name ?? ""; - message.package = object.package ?? ""; - message.dependency = object.dependency?.map(e => e) || []; - message.publicDependency = object.publicDependency?.map(e => e) || []; - message.weakDependency = object.weakDependency?.map(e => e) || []; - message.messageType = object.messageType?.map(e => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; - message.service = object.service?.map(e => ServiceDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.options = object.options !== undefined && object.options !== null ? FileOptions.fromPartial(object.options) : undefined; - message.sourceCodeInfo = object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) : undefined; - message.syntax = object.syntax ?? ""; - return message; - }, - fromSDK(object: FileDescriptorProtoSDKType): FileDescriptorProto { - return { - name: object?.name, - package: object?.package, - dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => e) : [], - publicDependency: Array.isArray(object?.public_dependency) ? object.public_dependency.map((e: any) => e) : [], - weakDependency: Array.isArray(object?.weak_dependency) ? object.weak_dependency.map((e: any) => e) : [], - messageType: Array.isArray(object?.message_type) ? object.message_type.map((e: any) => DescriptorProto.fromSDK(e)) : [], - enumType: Array.isArray(object?.enum_type) ? object.enum_type.map((e: any) => EnumDescriptorProto.fromSDK(e)) : [], - service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromSDK(e)) : [], - extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromSDK(e)) : [], - options: object.options ? FileOptions.fromSDK(object.options) : undefined, - sourceCodeInfo: object.source_code_info ? SourceCodeInfo.fromSDK(object.source_code_info) : undefined, - syntax: object?.syntax - }; - }, - toSDK(message: FileDescriptorProto): FileDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - obj.package = message.package; - if (message.dependency) { - obj.dependency = message.dependency.map(e => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.public_dependency = message.publicDependency.map(e => e); - } else { - obj.public_dependency = []; - } - if (message.weakDependency) { - obj.weak_dependency = message.weakDependency.map(e => e); - } else { - obj.weak_dependency = []; - } - if (message.messageType) { - obj.message_type = message.messageType.map(e => e ? DescriptorProto.toSDK(e) : undefined); - } else { - obj.message_type = []; - } - if (message.enumType) { - obj.enum_type = message.enumType.map(e => e ? EnumDescriptorProto.toSDK(e) : undefined); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map(e => e ? ServiceDescriptorProto.toSDK(e) : undefined); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toSDK(e) : undefined); - } else { - obj.extension = []; - } - message.options !== undefined && (obj.options = message.options ? FileOptions.toSDK(message.options) : undefined); - message.sourceCodeInfo !== undefined && (obj.source_code_info = message.sourceCodeInfo ? SourceCodeInfo.toSDK(message.sourceCodeInfo) : undefined); - obj.syntax = message.syntax; - return obj; - }, - fromAmino(object: FileDescriptorProtoAmino): FileDescriptorProto { - return { - name: object.name, - package: object.package, - dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => e) : [], - publicDependency: Array.isArray(object?.public_dependency) ? object.public_dependency.map((e: any) => e) : [], - weakDependency: Array.isArray(object?.weak_dependency) ? object.weak_dependency.map((e: any) => e) : [], - messageType: Array.isArray(object?.message_type) ? object.message_type.map((e: any) => DescriptorProto.fromAmino(e)) : [], - enumType: Array.isArray(object?.enum_type) ? object.enum_type.map((e: any) => EnumDescriptorProto.fromAmino(e)) : [], - service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromAmino(e)) : [], - extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromAmino(e)) : [], - options: object?.options ? FileOptions.fromAmino(object.options) : undefined, - sourceCodeInfo: object?.source_code_info ? SourceCodeInfo.fromAmino(object.source_code_info) : undefined, - syntax: object.syntax - }; - }, - toAmino(message: FileDescriptorProto): FileDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - obj.package = message.package; - if (message.dependency) { - obj.dependency = message.dependency.map(e => e); - } else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.public_dependency = message.publicDependency.map(e => e); - } else { - obj.public_dependency = []; - } - if (message.weakDependency) { - obj.weak_dependency = message.weakDependency.map(e => e); - } else { - obj.weak_dependency = []; - } - if (message.messageType) { - obj.message_type = message.messageType.map(e => e ? DescriptorProto.toAmino(e) : undefined); - } else { - obj.message_type = []; - } - if (message.enumType) { - obj.enum_type = message.enumType.map(e => e ? EnumDescriptorProto.toAmino(e) : undefined); - } else { - obj.enum_type = []; - } - if (message.service) { - obj.service = message.service.map(e => e ? ServiceDescriptorProto.toAmino(e) : undefined); - } else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toAmino(e) : undefined); - } else { - obj.extension = []; - } - obj.options = message.options ? FileOptions.toAmino(message.options) : undefined; - obj.source_code_info = message.sourceCodeInfo ? SourceCodeInfo.toAmino(message.sourceCodeInfo) : undefined; - obj.syntax = message.syntax; - return obj; - }, - fromAminoMsg(object: FileDescriptorProtoAminoMsg): FileDescriptorProto { - return FileDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: FileDescriptorProtoProtoMsg): FileDescriptorProto { - return FileDescriptorProto.decode(message.value); - }, - toProto(message: FileDescriptorProto): Uint8Array { - return FileDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: FileDescriptorProto): FileDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.FileDescriptorProto", - value: FileDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseDescriptorProto(): DescriptorProto { - return { - name: "", - field: [], - extension: [], - nestedType: [], - enumType: [], - extensionRange: [], - oneofDecl: [], - options: MessageOptions.fromPartial({}), - reservedRange: [], - reservedName: [] - }; -} -export const DescriptorProto = { - typeUrl: "/google.protobuf.DescriptorProto", - encode(message: DescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.field) { - FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.extension) { - FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.enumType) { - EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); - } - if (message.options !== undefined) { - MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], - nestedType: Array.isArray(object?.nestedType) ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], - extensionRange: Array.isArray(object?.extensionRange) ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e)) : [], - oneofDecl: Array.isArray(object?.oneofDecl) ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e)) : [], - reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map(e => e ? FieldDescriptorProto.toJSON(e) : undefined); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toJSON(e) : undefined); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map(e => e ? DescriptorProto.toJSON(e) : undefined); - } else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map(e => e ? EnumDescriptorProto.toJSON(e) : undefined); - } else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map(e => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map(e => e ? OneofDescriptorProto.toJSON(e) : undefined); - } else { - obj.oneofDecl = []; - } - message.options !== undefined && (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map(e => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map(e => e); - } else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object: DeepPartial): DescriptorProto { - const message = createBaseDescriptorProto(); - message.name = object.name ?? ""; - message.field = object.field?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.nestedType = object.nestedType?.map(e => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; - message.extensionRange = object.extensionRange?.map(e => DescriptorProto_ExtensionRange.fromPartial(e)) || []; - message.oneofDecl = object.oneofDecl?.map(e => OneofDescriptorProto.fromPartial(e)) || []; - message.options = object.options !== undefined && object.options !== null ? MessageOptions.fromPartial(object.options) : undefined; - message.reservedRange = object.reservedRange?.map(e => DescriptorProto_ReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map(e => e) || []; - return message; - }, - fromSDK(object: DescriptorProtoSDKType): DescriptorProto { - return { - name: object?.name, - field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromSDK(e)) : [], - extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromSDK(e)) : [], - nestedType: Array.isArray(object?.nested_type) ? object.nested_type.map((e: any) => DescriptorProto.fromSDK(e)) : [], - enumType: Array.isArray(object?.enum_type) ? object.enum_type.map((e: any) => EnumDescriptorProto.fromSDK(e)) : [], - extensionRange: Array.isArray(object?.extension_range) ? object.extension_range.map((e: any) => DescriptorProto_ExtensionRange.fromSDK(e)) : [], - oneofDecl: Array.isArray(object?.oneof_decl) ? object.oneof_decl.map((e: any) => OneofDescriptorProto.fromSDK(e)) : [], - options: object.options ? MessageOptions.fromSDK(object.options) : undefined, - reservedRange: Array.isArray(object?.reserved_range) ? object.reserved_range.map((e: any) => DescriptorProto_ReservedRange.fromSDK(e)) : [], - reservedName: Array.isArray(object?.reserved_name) ? object.reserved_name.map((e: any) => e) : [] - }; - }, - toSDK(message: DescriptorProto): DescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - if (message.field) { - obj.field = message.field.map(e => e ? FieldDescriptorProto.toSDK(e) : undefined); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toSDK(e) : undefined); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nested_type = message.nestedType.map(e => e ? DescriptorProto.toSDK(e) : undefined); - } else { - obj.nested_type = []; - } - if (message.enumType) { - obj.enum_type = message.enumType.map(e => e ? EnumDescriptorProto.toSDK(e) : undefined); - } else { - obj.enum_type = []; - } - if (message.extensionRange) { - obj.extension_range = message.extensionRange.map(e => e ? DescriptorProto_ExtensionRange.toSDK(e) : undefined); - } else { - obj.extension_range = []; - } - if (message.oneofDecl) { - obj.oneof_decl = message.oneofDecl.map(e => e ? OneofDescriptorProto.toSDK(e) : undefined); - } else { - obj.oneof_decl = []; - } - message.options !== undefined && (obj.options = message.options ? MessageOptions.toSDK(message.options) : undefined); - if (message.reservedRange) { - obj.reserved_range = message.reservedRange.map(e => e ? DescriptorProto_ReservedRange.toSDK(e) : undefined); - } else { - obj.reserved_range = []; - } - if (message.reservedName) { - obj.reserved_name = message.reservedName.map(e => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - fromAmino(object: DescriptorProtoAmino): DescriptorProto { - return { - name: object.name, - field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromAmino(e)) : [], - extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromAmino(e)) : [], - nestedType: Array.isArray(object?.nested_type) ? object.nested_type.map((e: any) => DescriptorProto.fromAmino(e)) : [], - enumType: Array.isArray(object?.enum_type) ? object.enum_type.map((e: any) => EnumDescriptorProto.fromAmino(e)) : [], - extensionRange: Array.isArray(object?.extension_range) ? object.extension_range.map((e: any) => DescriptorProto_ExtensionRange.fromAmino(e)) : [], - oneofDecl: Array.isArray(object?.oneof_decl) ? object.oneof_decl.map((e: any) => OneofDescriptorProto.fromAmino(e)) : [], - options: object?.options ? MessageOptions.fromAmino(object.options) : undefined, - reservedRange: Array.isArray(object?.reserved_range) ? object.reserved_range.map((e: any) => DescriptorProto_ReservedRange.fromAmino(e)) : [], - reservedName: Array.isArray(object?.reserved_name) ? object.reserved_name.map((e: any) => e) : [] - }; - }, - toAmino(message: DescriptorProto): DescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - if (message.field) { - obj.field = message.field.map(e => e ? FieldDescriptorProto.toAmino(e) : undefined); - } else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map(e => e ? FieldDescriptorProto.toAmino(e) : undefined); - } else { - obj.extension = []; - } - if (message.nestedType) { - obj.nested_type = message.nestedType.map(e => e ? DescriptorProto.toAmino(e) : undefined); - } else { - obj.nested_type = []; - } - if (message.enumType) { - obj.enum_type = message.enumType.map(e => e ? EnumDescriptorProto.toAmino(e) : undefined); - } else { - obj.enum_type = []; - } - if (message.extensionRange) { - obj.extension_range = message.extensionRange.map(e => e ? DescriptorProto_ExtensionRange.toAmino(e) : undefined); - } else { - obj.extension_range = []; - } - if (message.oneofDecl) { - obj.oneof_decl = message.oneofDecl.map(e => e ? OneofDescriptorProto.toAmino(e) : undefined); - } else { - obj.oneof_decl = []; - } - obj.options = message.options ? MessageOptions.toAmino(message.options) : undefined; - if (message.reservedRange) { - obj.reserved_range = message.reservedRange.map(e => e ? DescriptorProto_ReservedRange.toAmino(e) : undefined); - } else { - obj.reserved_range = []; - } - if (message.reservedName) { - obj.reserved_name = message.reservedName.map(e => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - fromAminoMsg(object: DescriptorProtoAminoMsg): DescriptorProto { - return DescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: DescriptorProtoProtoMsg): DescriptorProto { - return DescriptorProto.decode(message.value); - }, - toProto(message: DescriptorProto): Uint8Array { - return DescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: DescriptorProto): DescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.DescriptorProto", - value: DescriptorProto.encode(message).finish() - }; - } -}; -function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { - return { - start: 0, - end: 0, - options: ExtensionRangeOptions.fromPartial({}) - }; -} -export const DescriptorProto_ExtensionRange = { - typeUrl: "/google.protobuf.ExtensionRange", - encode(message: DescriptorProto_ExtensionRange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_ExtensionRange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DescriptorProto_ExtensionRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined - }; - }, - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - message.options !== undefined && (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange { - const message = createBaseDescriptorProto_ExtensionRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - message.options = object.options !== undefined && object.options !== null ? ExtensionRangeOptions.fromPartial(object.options) : undefined; - return message; - }, - fromSDK(object: DescriptorProto_ExtensionRangeSDKType): DescriptorProto_ExtensionRange { - return { - start: object?.start, - end: object?.end, - options: object.options ? ExtensionRangeOptions.fromSDK(object.options) : undefined - }; - }, - toSDK(message: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRangeSDKType { - const obj: any = {}; - obj.start = message.start; - obj.end = message.end; - message.options !== undefined && (obj.options = message.options ? ExtensionRangeOptions.toSDK(message.options) : undefined); - return obj; - }, - fromAmino(object: DescriptorProto_ExtensionRangeAmino): DescriptorProto_ExtensionRange { - return { - start: object.start, - end: object.end, - options: object?.options ? ExtensionRangeOptions.fromAmino(object.options) : undefined - }; - }, - toAmino(message: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRangeAmino { - const obj: any = {}; - obj.start = message.start; - obj.end = message.end; - obj.options = message.options ? ExtensionRangeOptions.toAmino(message.options) : undefined; - return obj; - }, - fromAminoMsg(object: DescriptorProto_ExtensionRangeAminoMsg): DescriptorProto_ExtensionRange { - return DescriptorProto_ExtensionRange.fromAmino(object.value); - }, - fromProtoMsg(message: DescriptorProto_ExtensionRangeProtoMsg): DescriptorProto_ExtensionRange { - return DescriptorProto_ExtensionRange.decode(message.value); - }, - toProto(message: DescriptorProto_ExtensionRange): Uint8Array { - return DescriptorProto_ExtensionRange.encode(message).finish(); - }, - toProtoMsg(message: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRangeProtoMsg { - return { - typeUrl: "/google.protobuf.ExtensionRange", - value: DescriptorProto_ExtensionRange.encode(message).finish() - }; - } -}; -function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { - return { - start: 0, - end: 0 - }; -} -export const DescriptorProto_ReservedRange = { - typeUrl: "/google.protobuf.ReservedRange", - encode(message: DescriptorProto_ReservedRange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DescriptorProto_ReservedRange { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_ReservedRange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DescriptorProto_ReservedRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0 - }; - }, - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange { - const message = createBaseDescriptorProto_ReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - return message; - }, - fromSDK(object: DescriptorProto_ReservedRangeSDKType): DescriptorProto_ReservedRange { - return { - start: object?.start, - end: object?.end - }; - }, - toSDK(message: DescriptorProto_ReservedRange): DescriptorProto_ReservedRangeSDKType { - const obj: any = {}; - obj.start = message.start; - obj.end = message.end; - return obj; - }, - fromAmino(object: DescriptorProto_ReservedRangeAmino): DescriptorProto_ReservedRange { - return { - start: object.start, - end: object.end - }; - }, - toAmino(message: DescriptorProto_ReservedRange): DescriptorProto_ReservedRangeAmino { - const obj: any = {}; - obj.start = message.start; - obj.end = message.end; - return obj; - }, - fromAminoMsg(object: DescriptorProto_ReservedRangeAminoMsg): DescriptorProto_ReservedRange { - return DescriptorProto_ReservedRange.fromAmino(object.value); - }, - fromProtoMsg(message: DescriptorProto_ReservedRangeProtoMsg): DescriptorProto_ReservedRange { - return DescriptorProto_ReservedRange.decode(message.value); - }, - toProto(message: DescriptorProto_ReservedRange): Uint8Array { - return DescriptorProto_ReservedRange.encode(message).finish(); - }, - toProtoMsg(message: DescriptorProto_ReservedRange): DescriptorProto_ReservedRangeProtoMsg { - return { - typeUrl: "/google.protobuf.ReservedRange", - value: DescriptorProto_ReservedRange.encode(message).finish() - }; - } -}; -function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { - uninterpretedOption: [] - }; -} -export const ExtensionRangeOptions = { - typeUrl: "/google.protobuf.ExtensionRangeOptions", - encode(message: ExtensionRangeOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtensionRangeOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ExtensionRangeOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ExtensionRangeOptions { - const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ExtensionRangeOptionsSDKType): ExtensionRangeOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: ExtensionRangeOptions): ExtensionRangeOptionsSDKType { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: ExtensionRangeOptionsAmino): ExtensionRangeOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: ExtensionRangeOptions): ExtensionRangeOptionsAmino { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: ExtensionRangeOptionsAminoMsg): ExtensionRangeOptions { - return ExtensionRangeOptions.fromAmino(object.value); - }, - fromProtoMsg(message: ExtensionRangeOptionsProtoMsg): ExtensionRangeOptions { - return ExtensionRangeOptions.decode(message.value); - }, - toProto(message: ExtensionRangeOptions): Uint8Array { - return ExtensionRangeOptions.encode(message).finish(); - }, - toProtoMsg(message: ExtensionRangeOptions): ExtensionRangeOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.ExtensionRangeOptions", - value: ExtensionRangeOptions.encode(message).finish() - }; - } -}; -function createBaseFieldDescriptorProto(): FieldDescriptorProto { - return { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - options: FieldOptions.fromPartial({}) - }; -} -export const FieldDescriptorProto = { - typeUrl: "/google.protobuf.FieldDescriptorProto", - encode(message: FieldDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = (reader.int32() as any); - break; - case 5: - message.type = (reader.int32() as any); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FieldDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : -1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : -1, - typeName: isSet(object.typeName) ? String(object.typeName) : "", - extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", - oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, - jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", - options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined - }; - }, - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex)); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): FieldDescriptorProto { - const message = createBaseFieldDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.label = object.label ?? 1; - message.type = object.type ?? 1; - message.typeName = object.typeName ?? ""; - message.extendee = object.extendee ?? ""; - message.defaultValue = object.defaultValue ?? ""; - message.oneofIndex = object.oneofIndex ?? 0; - message.jsonName = object.jsonName ?? ""; - message.options = object.options !== undefined && object.options !== null ? FieldOptions.fromPartial(object.options) : undefined; - return message; - }, - fromSDK(object: FieldDescriptorProtoSDKType): FieldDescriptorProto { - return { - name: object?.name, - number: object?.number, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : -1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : -1, - typeName: object?.type_name, - extendee: object?.extendee, - defaultValue: object?.default_value, - oneofIndex: object?.oneof_index, - jsonName: object?.json_name, - options: object.options ? FieldOptions.fromSDK(object.options) : undefined - }; - }, - toSDK(message: FieldDescriptorProto): FieldDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - obj.type_name = message.typeName; - obj.extendee = message.extendee; - obj.default_value = message.defaultValue; - obj.oneof_index = message.oneofIndex; - obj.json_name = message.jsonName; - message.options !== undefined && (obj.options = message.options ? FieldOptions.toSDK(message.options) : undefined); - return obj; - }, - fromAmino(object: FieldDescriptorProtoAmino): FieldDescriptorProto { - return { - name: object.name, - number: object.number, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : -1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : -1, - typeName: object.type_name, - extendee: object.extendee, - defaultValue: object.default_value, - oneofIndex: object.oneof_index, - jsonName: object.json_name, - options: object?.options ? FieldOptions.fromAmino(object.options) : undefined - }; - }, - toAmino(message: FieldDescriptorProto): FieldDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - obj.label = message.label; - obj.type = message.type; - obj.type_name = message.typeName; - obj.extendee = message.extendee; - obj.default_value = message.defaultValue; - obj.oneof_index = message.oneofIndex; - obj.json_name = message.jsonName; - obj.options = message.options ? FieldOptions.toAmino(message.options) : undefined; - return obj; - }, - fromAminoMsg(object: FieldDescriptorProtoAminoMsg): FieldDescriptorProto { - return FieldDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: FieldDescriptorProtoProtoMsg): FieldDescriptorProto { - return FieldDescriptorProto.decode(message.value); - }, - toProto(message: FieldDescriptorProto): Uint8Array { - return FieldDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: FieldDescriptorProto): FieldDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.FieldDescriptorProto", - value: FieldDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseOneofDescriptorProto(): OneofDescriptorProto { - return { - name: "", - options: OneofOptions.fromPartial({}) - }; -} -export const OneofDescriptorProto = { - typeUrl: "/google.protobuf.OneofDescriptorProto", - encode(message: OneofDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): OneofDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined - }; - }, - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): OneofDescriptorProto { - const message = createBaseOneofDescriptorProto(); - message.name = object.name ?? ""; - message.options = object.options !== undefined && object.options !== null ? OneofOptions.fromPartial(object.options) : undefined; - return message; - }, - fromSDK(object: OneofDescriptorProtoSDKType): OneofDescriptorProto { - return { - name: object?.name, - options: object.options ? OneofOptions.fromSDK(object.options) : undefined - }; - }, - toSDK(message: OneofDescriptorProto): OneofDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - message.options !== undefined && (obj.options = message.options ? OneofOptions.toSDK(message.options) : undefined); - return obj; - }, - fromAmino(object: OneofDescriptorProtoAmino): OneofDescriptorProto { - return { - name: object.name, - options: object?.options ? OneofOptions.fromAmino(object.options) : undefined - }; - }, - toAmino(message: OneofDescriptorProto): OneofDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - obj.options = message.options ? OneofOptions.toAmino(message.options) : undefined; - return obj; - }, - fromAminoMsg(object: OneofDescriptorProtoAminoMsg): OneofDescriptorProto { - return OneofDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: OneofDescriptorProtoProtoMsg): OneofDescriptorProto { - return OneofDescriptorProto.decode(message.value); - }, - toProto(message: OneofDescriptorProto): Uint8Array { - return OneofDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: OneofDescriptorProto): OneofDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.OneofDescriptorProto", - value: OneofDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseEnumDescriptorProto(): EnumDescriptorProto { - return { - name: "", - value: [], - options: EnumOptions.fromPartial({}), - reservedRange: [], - reservedName: [] - }; -} -export const EnumDescriptorProto = { - typeUrl: "/google.protobuf.EnumDescriptorProto", - encode(message: EnumDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.value) { - EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EnumDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e)) : [], - reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map(e => e ? EnumValueDescriptorProto.toJSON(e) : undefined); - } else { - obj.value = []; - } - message.options !== undefined && (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map(e => e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map(e => e); - } else { - obj.reservedName = []; - } - return obj; - }, - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = createBaseEnumDescriptorProto(); - message.name = object.name ?? ""; - message.value = object.value?.map(e => EnumValueDescriptorProto.fromPartial(e)) || []; - message.options = object.options !== undefined && object.options !== null ? EnumOptions.fromPartial(object.options) : undefined; - message.reservedRange = object.reservedRange?.map(e => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map(e => e) || []; - return message; - }, - fromSDK(object: EnumDescriptorProtoSDKType): EnumDescriptorProto { - return { - name: object?.name, - value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromSDK(e)) : [], - options: object.options ? EnumOptions.fromSDK(object.options) : undefined, - reservedRange: Array.isArray(object?.reserved_range) ? object.reserved_range.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromSDK(e)) : [], - reservedName: Array.isArray(object?.reserved_name) ? object.reserved_name.map((e: any) => e) : [] - }; - }, - toSDK(message: EnumDescriptorProto): EnumDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - if (message.value) { - obj.value = message.value.map(e => e ? EnumValueDescriptorProto.toSDK(e) : undefined); - } else { - obj.value = []; - } - message.options !== undefined && (obj.options = message.options ? EnumOptions.toSDK(message.options) : undefined); - if (message.reservedRange) { - obj.reserved_range = message.reservedRange.map(e => e ? EnumDescriptorProto_EnumReservedRange.toSDK(e) : undefined); - } else { - obj.reserved_range = []; - } - if (message.reservedName) { - obj.reserved_name = message.reservedName.map(e => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - fromAmino(object: EnumDescriptorProtoAmino): EnumDescriptorProto { - return { - name: object.name, - value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromAmino(e)) : [], - options: object?.options ? EnumOptions.fromAmino(object.options) : undefined, - reservedRange: Array.isArray(object?.reserved_range) ? object.reserved_range.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromAmino(e)) : [], - reservedName: Array.isArray(object?.reserved_name) ? object.reserved_name.map((e: any) => e) : [] - }; - }, - toAmino(message: EnumDescriptorProto): EnumDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - if (message.value) { - obj.value = message.value.map(e => e ? EnumValueDescriptorProto.toAmino(e) : undefined); - } else { - obj.value = []; - } - obj.options = message.options ? EnumOptions.toAmino(message.options) : undefined; - if (message.reservedRange) { - obj.reserved_range = message.reservedRange.map(e => e ? EnumDescriptorProto_EnumReservedRange.toAmino(e) : undefined); - } else { - obj.reserved_range = []; - } - if (message.reservedName) { - obj.reserved_name = message.reservedName.map(e => e); - } else { - obj.reserved_name = []; - } - return obj; - }, - fromAminoMsg(object: EnumDescriptorProtoAminoMsg): EnumDescriptorProto { - return EnumDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: EnumDescriptorProtoProtoMsg): EnumDescriptorProto { - return EnumDescriptorProto.decode(message.value); - }, - toProto(message: EnumDescriptorProto): Uint8Array { - return EnumDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: EnumDescriptorProto): EnumDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.EnumDescriptorProto", - value: EnumDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { - return { - start: 0, - end: 0 - }; -} -export const EnumDescriptorProto_EnumReservedRange = { - typeUrl: "/google.protobuf.EnumReservedRange", - encode(message: EnumDescriptorProto_EnumReservedRange, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto_EnumReservedRange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0 - }; - }, - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, - fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange { - const message = createBaseEnumDescriptorProto_EnumReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - return message; - }, - fromSDK(object: EnumDescriptorProto_EnumReservedRangeSDKType): EnumDescriptorProto_EnumReservedRange { - return { - start: object?.start, - end: object?.end - }; - }, - toSDK(message: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRangeSDKType { - const obj: any = {}; - obj.start = message.start; - obj.end = message.end; - return obj; - }, - fromAmino(object: EnumDescriptorProto_EnumReservedRangeAmino): EnumDescriptorProto_EnumReservedRange { - return { - start: object.start, - end: object.end - }; - }, - toAmino(message: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRangeAmino { - const obj: any = {}; - obj.start = message.start; - obj.end = message.end; - return obj; - }, - fromAminoMsg(object: EnumDescriptorProto_EnumReservedRangeAminoMsg): EnumDescriptorProto_EnumReservedRange { - return EnumDescriptorProto_EnumReservedRange.fromAmino(object.value); - }, - fromProtoMsg(message: EnumDescriptorProto_EnumReservedRangeProtoMsg): EnumDescriptorProto_EnumReservedRange { - return EnumDescriptorProto_EnumReservedRange.decode(message.value); - }, - toProto(message: EnumDescriptorProto_EnumReservedRange): Uint8Array { - return EnumDescriptorProto_EnumReservedRange.encode(message).finish(); - }, - toProtoMsg(message: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRangeProtoMsg { - return { - typeUrl: "/google.protobuf.EnumReservedRange", - value: EnumDescriptorProto_EnumReservedRange.encode(message).finish() - }; - } -}; -function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { - return { - name: "", - number: 0, - options: EnumValueOptions.fromPartial({}) - }; -} -export const EnumValueDescriptorProto = { - typeUrl: "/google.protobuf.EnumValueDescriptorProto", - encode(message: EnumValueDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EnumValueDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EnumValueDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined - }; - }, - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.options !== undefined && (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): EnumValueDescriptorProto { - const message = createBaseEnumValueDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.options = object.options !== undefined && object.options !== null ? EnumValueOptions.fromPartial(object.options) : undefined; - return message; - }, - fromSDK(object: EnumValueDescriptorProtoSDKType): EnumValueDescriptorProto { - return { - name: object?.name, - number: object?.number, - options: object.options ? EnumValueOptions.fromSDK(object.options) : undefined - }; - }, - toSDK(message: EnumValueDescriptorProto): EnumValueDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - message.options !== undefined && (obj.options = message.options ? EnumValueOptions.toSDK(message.options) : undefined); - return obj; - }, - fromAmino(object: EnumValueDescriptorProtoAmino): EnumValueDescriptorProto { - return { - name: object.name, - number: object.number, - options: object?.options ? EnumValueOptions.fromAmino(object.options) : undefined - }; - }, - toAmino(message: EnumValueDescriptorProto): EnumValueDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - obj.number = message.number; - obj.options = message.options ? EnumValueOptions.toAmino(message.options) : undefined; - return obj; - }, - fromAminoMsg(object: EnumValueDescriptorProtoAminoMsg): EnumValueDescriptorProto { - return EnumValueDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: EnumValueDescriptorProtoProtoMsg): EnumValueDescriptorProto { - return EnumValueDescriptorProto.decode(message.value); - }, - toProto(message: EnumValueDescriptorProto): Uint8Array { - return EnumValueDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: EnumValueDescriptorProto): EnumValueDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.EnumValueDescriptorProto", - value: EnumValueDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseServiceDescriptorProto(): ServiceDescriptorProto { - return { - name: "", - method: [], - options: ServiceOptions.fromPartial({}) - }; -} -export const ServiceDescriptorProto = { - typeUrl: "/google.protobuf.ServiceDescriptorProto", - encode(message: ServiceDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - for (const v of message.method) { - MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.options !== undefined) { - ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ServiceDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined - }; - }, - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map(e => e ? MethodDescriptorProto.toJSON(e) : undefined); - } else { - obj.method = []; - } - message.options !== undefined && (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ServiceDescriptorProto { - const message = createBaseServiceDescriptorProto(); - message.name = object.name ?? ""; - message.method = object.method?.map(e => MethodDescriptorProto.fromPartial(e)) || []; - message.options = object.options !== undefined && object.options !== null ? ServiceOptions.fromPartial(object.options) : undefined; - return message; - }, - fromSDK(object: ServiceDescriptorProtoSDKType): ServiceDescriptorProto { - return { - name: object?.name, - method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromSDK(e)) : [], - options: object.options ? ServiceOptions.fromSDK(object.options) : undefined - }; - }, - toSDK(message: ServiceDescriptorProto): ServiceDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - if (message.method) { - obj.method = message.method.map(e => e ? MethodDescriptorProto.toSDK(e) : undefined); - } else { - obj.method = []; - } - message.options !== undefined && (obj.options = message.options ? ServiceOptions.toSDK(message.options) : undefined); - return obj; - }, - fromAmino(object: ServiceDescriptorProtoAmino): ServiceDescriptorProto { - return { - name: object.name, - method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromAmino(e)) : [], - options: object?.options ? ServiceOptions.fromAmino(object.options) : undefined - }; - }, - toAmino(message: ServiceDescriptorProto): ServiceDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - if (message.method) { - obj.method = message.method.map(e => e ? MethodDescriptorProto.toAmino(e) : undefined); - } else { - obj.method = []; - } - obj.options = message.options ? ServiceOptions.toAmino(message.options) : undefined; - return obj; - }, - fromAminoMsg(object: ServiceDescriptorProtoAminoMsg): ServiceDescriptorProto { - return ServiceDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: ServiceDescriptorProtoProtoMsg): ServiceDescriptorProto { - return ServiceDescriptorProto.decode(message.value); - }, - toProto(message: ServiceDescriptorProto): Uint8Array { - return ServiceDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: ServiceDescriptorProto): ServiceDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.ServiceDescriptorProto", - value: ServiceDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseMethodDescriptorProto(): MethodDescriptorProto { - return { - name: "", - inputType: "", - outputType: "", - options: MethodOptions.fromPartial({}), - clientStreaming: false, - serverStreaming: false - }; -} -export const MethodDescriptorProto = { - typeUrl: "/google.protobuf.MethodDescriptorProto", - encode(message: MethodDescriptorProto, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MethodDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - inputType: isSet(object.inputType) ? String(object.inputType) : "", - outputType: isSet(object.outputType) ? String(object.outputType) : "", - options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined, - clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, - serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false - }; - }, - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined); - message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming); - return obj; - }, - fromPartial(object: DeepPartial): MethodDescriptorProto { - const message = createBaseMethodDescriptorProto(); - message.name = object.name ?? ""; - message.inputType = object.inputType ?? ""; - message.outputType = object.outputType ?? ""; - message.options = object.options !== undefined && object.options !== null ? MethodOptions.fromPartial(object.options) : undefined; - message.clientStreaming = object.clientStreaming ?? false; - message.serverStreaming = object.serverStreaming ?? false; - return message; - }, - fromSDK(object: MethodDescriptorProtoSDKType): MethodDescriptorProto { - return { - name: object?.name, - inputType: object?.input_type, - outputType: object?.output_type, - options: object.options ? MethodOptions.fromSDK(object.options) : undefined, - clientStreaming: object?.client_streaming, - serverStreaming: object?.server_streaming - }; - }, - toSDK(message: MethodDescriptorProto): MethodDescriptorProtoSDKType { - const obj: any = {}; - obj.name = message.name; - obj.input_type = message.inputType; - obj.output_type = message.outputType; - message.options !== undefined && (obj.options = message.options ? MethodOptions.toSDK(message.options) : undefined); - obj.client_streaming = message.clientStreaming; - obj.server_streaming = message.serverStreaming; - return obj; - }, - fromAmino(object: MethodDescriptorProtoAmino): MethodDescriptorProto { - return { - name: object.name, - inputType: object.input_type, - outputType: object.output_type, - options: object?.options ? MethodOptions.fromAmino(object.options) : undefined, - clientStreaming: object.client_streaming, - serverStreaming: object.server_streaming - }; - }, - toAmino(message: MethodDescriptorProto): MethodDescriptorProtoAmino { - const obj: any = {}; - obj.name = message.name; - obj.input_type = message.inputType; - obj.output_type = message.outputType; - obj.options = message.options ? MethodOptions.toAmino(message.options) : undefined; - obj.client_streaming = message.clientStreaming; - obj.server_streaming = message.serverStreaming; - return obj; - }, - fromAminoMsg(object: MethodDescriptorProtoAminoMsg): MethodDescriptorProto { - return MethodDescriptorProto.fromAmino(object.value); - }, - fromProtoMsg(message: MethodDescriptorProtoProtoMsg): MethodDescriptorProto { - return MethodDescriptorProto.decode(message.value); - }, - toProto(message: MethodDescriptorProto): Uint8Array { - return MethodDescriptorProto.encode(message).finish(); - }, - toProtoMsg(message: MethodDescriptorProto): MethodDescriptorProtoProtoMsg { - return { - typeUrl: "/google.protobuf.MethodDescriptorProto", - value: MethodDescriptorProto.encode(message).finish() - }; - } -}; -function createBaseFileOptions(): FileOptions { - return { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", - uninterpretedOption: [] - }; -} -export const FileOptions = { - typeUrl: "/google.protobuf.FileOptions", - encode(message: FileOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if (message.javaOuterClassname !== "") { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if (message.objcClassPrefix !== "") { - writer.uint32(290).string(message.objcClassPrefix); - } - if (message.csharpNamespace !== "") { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if (message.phpClassPrefix !== "") { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if (message.phpMetadataNamespace !== "") { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = (reader.int32() as any); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FileOptions { - return { - javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", - javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false, - javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) ? Boolean(object.javaGenerateEqualsAndHash) : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, - optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : -1, - goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, - javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, - pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false, - phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, - objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", - csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", - swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", - phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", - phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "", - rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: FileOptions): unknown { - const obj: any = {}; - message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): FileOptions { - const message = createBaseFileOptions(); - message.javaPackage = object.javaPackage ?? ""; - message.javaOuterClassname = object.javaOuterClassname ?? ""; - message.javaMultipleFiles = object.javaMultipleFiles ?? false; - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; - message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; - message.optimizeFor = object.optimizeFor ?? 1; - message.goPackage = object.goPackage ?? ""; - message.ccGenericServices = object.ccGenericServices ?? false; - message.javaGenericServices = object.javaGenericServices ?? false; - message.pyGenericServices = object.pyGenericServices ?? false; - message.phpGenericServices = object.phpGenericServices ?? false; - message.deprecated = object.deprecated ?? false; - message.ccEnableArenas = object.ccEnableArenas ?? false; - message.objcClassPrefix = object.objcClassPrefix ?? ""; - message.csharpNamespace = object.csharpNamespace ?? ""; - message.swiftPrefix = object.swiftPrefix ?? ""; - message.phpClassPrefix = object.phpClassPrefix ?? ""; - message.phpNamespace = object.phpNamespace ?? ""; - message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; - message.rubyPackage = object.rubyPackage ?? ""; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: FileOptionsSDKType): FileOptions { - return { - javaPackage: object?.java_package, - javaOuterClassname: object?.java_outer_classname, - javaMultipleFiles: object?.java_multiple_files, - javaGenerateEqualsAndHash: object?.java_generate_equals_and_hash, - javaStringCheckUtf8: object?.java_string_check_utf8, - optimizeFor: isSet(object.optimize_for) ? fileOptions_OptimizeModeFromJSON(object.optimize_for) : -1, - goPackage: object?.go_package, - ccGenericServices: object?.cc_generic_services, - javaGenericServices: object?.java_generic_services, - pyGenericServices: object?.py_generic_services, - phpGenericServices: object?.php_generic_services, - deprecated: object?.deprecated, - ccEnableArenas: object?.cc_enable_arenas, - objcClassPrefix: object?.objc_class_prefix, - csharpNamespace: object?.csharp_namespace, - swiftPrefix: object?.swift_prefix, - phpClassPrefix: object?.php_class_prefix, - phpNamespace: object?.php_namespace, - phpMetadataNamespace: object?.php_metadata_namespace, - rubyPackage: object?.ruby_package, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: FileOptions): FileOptionsSDKType { - const obj: any = {}; - obj.java_package = message.javaPackage; - obj.java_outer_classname = message.javaOuterClassname; - obj.java_multiple_files = message.javaMultipleFiles; - obj.java_generate_equals_and_hash = message.javaGenerateEqualsAndHash; - obj.java_string_check_utf8 = message.javaStringCheckUtf8; - message.optimizeFor !== undefined && (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - obj.go_package = message.goPackage; - obj.cc_generic_services = message.ccGenericServices; - obj.java_generic_services = message.javaGenericServices; - obj.py_generic_services = message.pyGenericServices; - obj.php_generic_services = message.phpGenericServices; - obj.deprecated = message.deprecated; - obj.cc_enable_arenas = message.ccEnableArenas; - obj.objc_class_prefix = message.objcClassPrefix; - obj.csharp_namespace = message.csharpNamespace; - obj.swift_prefix = message.swiftPrefix; - obj.php_class_prefix = message.phpClassPrefix; - obj.php_namespace = message.phpNamespace; - obj.php_metadata_namespace = message.phpMetadataNamespace; - obj.ruby_package = message.rubyPackage; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: FileOptionsAmino): FileOptions { - return { - javaPackage: object.java_package, - javaOuterClassname: object.java_outer_classname, - javaMultipleFiles: object.java_multiple_files, - javaGenerateEqualsAndHash: object.java_generate_equals_and_hash, - javaStringCheckUtf8: object.java_string_check_utf8, - optimizeFor: isSet(object.optimize_for) ? fileOptions_OptimizeModeFromJSON(object.optimize_for) : -1, - goPackage: object.go_package, - ccGenericServices: object.cc_generic_services, - javaGenericServices: object.java_generic_services, - pyGenericServices: object.py_generic_services, - phpGenericServices: object.php_generic_services, - deprecated: object.deprecated, - ccEnableArenas: object.cc_enable_arenas, - objcClassPrefix: object.objc_class_prefix, - csharpNamespace: object.csharp_namespace, - swiftPrefix: object.swift_prefix, - phpClassPrefix: object.php_class_prefix, - phpNamespace: object.php_namespace, - phpMetadataNamespace: object.php_metadata_namespace, - rubyPackage: object.ruby_package, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: FileOptions): FileOptionsAmino { - const obj: any = {}; - obj.java_package = message.javaPackage; - obj.java_outer_classname = message.javaOuterClassname; - obj.java_multiple_files = message.javaMultipleFiles; - obj.java_generate_equals_and_hash = message.javaGenerateEqualsAndHash; - obj.java_string_check_utf8 = message.javaStringCheckUtf8; - obj.optimize_for = message.optimizeFor; - obj.go_package = message.goPackage; - obj.cc_generic_services = message.ccGenericServices; - obj.java_generic_services = message.javaGenericServices; - obj.py_generic_services = message.pyGenericServices; - obj.php_generic_services = message.phpGenericServices; - obj.deprecated = message.deprecated; - obj.cc_enable_arenas = message.ccEnableArenas; - obj.objc_class_prefix = message.objcClassPrefix; - obj.csharp_namespace = message.csharpNamespace; - obj.swift_prefix = message.swiftPrefix; - obj.php_class_prefix = message.phpClassPrefix; - obj.php_namespace = message.phpNamespace; - obj.php_metadata_namespace = message.phpMetadataNamespace; - obj.ruby_package = message.rubyPackage; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: FileOptionsAminoMsg): FileOptions { - return FileOptions.fromAmino(object.value); - }, - fromProtoMsg(message: FileOptionsProtoMsg): FileOptions { - return FileOptions.decode(message.value); - }, - toProto(message: FileOptions): Uint8Array { - return FileOptions.encode(message).finish(); - }, - toProtoMsg(message: FileOptions): FileOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.FileOptions", - value: FileOptions.encode(message).finish() - }; - } -}; -function createBaseMessageOptions(): MessageOptions { - return { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, - uninterpretedOption: [] - }; -} -export const MessageOptions = { - typeUrl: "/google.protobuf.MessageOptions", - encode(message: MessageOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMessageOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MessageOptions { - return { - messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false, - noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) ? Boolean(object.noStandardDescriptorAccessor) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MessageOptions { - const message = createBaseMessageOptions(); - message.messageSetWireFormat = object.messageSetWireFormat ?? false; - message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; - message.deprecated = object.deprecated ?? false; - message.mapEntry = object.mapEntry ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MessageOptionsSDKType): MessageOptions { - return { - messageSetWireFormat: object?.message_set_wire_format, - noStandardDescriptorAccessor: object?.no_standard_descriptor_accessor, - deprecated: object?.deprecated, - mapEntry: object?.map_entry, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: MessageOptions): MessageOptionsSDKType { - const obj: any = {}; - obj.message_set_wire_format = message.messageSetWireFormat; - obj.no_standard_descriptor_accessor = message.noStandardDescriptorAccessor; - obj.deprecated = message.deprecated; - obj.map_entry = message.mapEntry; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: MessageOptionsAmino): MessageOptions { - return { - messageSetWireFormat: object.message_set_wire_format, - noStandardDescriptorAccessor: object.no_standard_descriptor_accessor, - deprecated: object.deprecated, - mapEntry: object.map_entry, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: MessageOptions): MessageOptionsAmino { - const obj: any = {}; - obj.message_set_wire_format = message.messageSetWireFormat; - obj.no_standard_descriptor_accessor = message.noStandardDescriptorAccessor; - obj.deprecated = message.deprecated; - obj.map_entry = message.mapEntry; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: MessageOptionsAminoMsg): MessageOptions { - return MessageOptions.fromAmino(object.value); - }, - fromProtoMsg(message: MessageOptionsProtoMsg): MessageOptions { - return MessageOptions.decode(message.value); - }, - toProto(message: MessageOptions): Uint8Array { - return MessageOptions.encode(message).finish(); - }, - toProtoMsg(message: MessageOptions): MessageOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.MessageOptions", - value: MessageOptions.encode(message).finish() - }; - } -}; -function createBaseFieldOptions(): FieldOptions { - return { - ctype: 1, - packed: false, - jstype: 1, - lazy: false, - deprecated: false, - weak: false, - uninterpretedOption: [] - }; -} -export const FieldOptions = { - typeUrl: "/google.protobuf.FieldOptions", - encode(message: FieldOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ctype !== 1) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== 1) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = (reader.int32() as any); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = (reader.int32() as any); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FieldOptions { - return { - ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : -1, - packed: isSet(object.packed) ? Boolean(object.packed) : false, - jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : -1, - lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): FieldOptions { - const message = createBaseFieldOptions(); - message.ctype = object.ctype ?? 1; - message.packed = object.packed ?? false; - message.jstype = object.jstype ?? 1; - message.lazy = object.lazy ?? false; - message.deprecated = object.deprecated ?? false; - message.weak = object.weak ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: FieldOptionsSDKType): FieldOptions { - return { - ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : -1, - packed: object?.packed, - jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : -1, - lazy: object?.lazy, - deprecated: object?.deprecated, - weak: object?.weak, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: FieldOptions): FieldOptionsSDKType { - const obj: any = {}; - message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - obj.packed = message.packed; - message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - obj.lazy = message.lazy; - obj.deprecated = message.deprecated; - obj.weak = message.weak; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: FieldOptionsAmino): FieldOptions { - return { - ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : -1, - packed: object.packed, - jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : -1, - lazy: object.lazy, - deprecated: object.deprecated, - weak: object.weak, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: FieldOptions): FieldOptionsAmino { - const obj: any = {}; - obj.ctype = message.ctype; - obj.packed = message.packed; - obj.jstype = message.jstype; - obj.lazy = message.lazy; - obj.deprecated = message.deprecated; - obj.weak = message.weak; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: FieldOptionsAminoMsg): FieldOptions { - return FieldOptions.fromAmino(object.value); - }, - fromProtoMsg(message: FieldOptionsProtoMsg): FieldOptions { - return FieldOptions.decode(message.value); - }, - toProto(message: FieldOptions): Uint8Array { - return FieldOptions.encode(message).finish(); - }, - toProtoMsg(message: FieldOptions): FieldOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.FieldOptions", - value: FieldOptions.encode(message).finish() - }; - } -}; -function createBaseOneofOptions(): OneofOptions { - return { - uninterpretedOption: [] - }; -} -export const OneofOptions = { - typeUrl: "/google.protobuf.OneofOptions", - encode(message: OneofOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): OneofOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): OneofOptions { - const message = createBaseOneofOptions(); - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: OneofOptionsSDKType): OneofOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: OneofOptions): OneofOptionsSDKType { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: OneofOptionsAmino): OneofOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: OneofOptions): OneofOptionsAmino { - const obj: any = {}; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: OneofOptionsAminoMsg): OneofOptions { - return OneofOptions.fromAmino(object.value); - }, - fromProtoMsg(message: OneofOptionsProtoMsg): OneofOptions { - return OneofOptions.decode(message.value); - }, - toProto(message: OneofOptions): Uint8Array { - return OneofOptions.encode(message).finish(); - }, - toProtoMsg(message: OneofOptions): OneofOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.OneofOptions", - value: OneofOptions.encode(message).finish() - }; - } -}; -function createBaseEnumOptions(): EnumOptions { - return { - allowAlias: false, - deprecated: false, - uninterpretedOption: [] - }; -} -export const EnumOptions = { - typeUrl: "/google.protobuf.EnumOptions", - encode(message: EnumOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EnumOptions { - return { - allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): EnumOptions { - const message = createBaseEnumOptions(); - message.allowAlias = object.allowAlias ?? false; - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: EnumOptionsSDKType): EnumOptions { - return { - allowAlias: object?.allow_alias, - deprecated: object?.deprecated, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: EnumOptions): EnumOptionsSDKType { - const obj: any = {}; - obj.allow_alias = message.allowAlias; - obj.deprecated = message.deprecated; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: EnumOptionsAmino): EnumOptions { - return { - allowAlias: object.allow_alias, - deprecated: object.deprecated, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: EnumOptions): EnumOptionsAmino { - const obj: any = {}; - obj.allow_alias = message.allowAlias; - obj.deprecated = message.deprecated; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: EnumOptionsAminoMsg): EnumOptions { - return EnumOptions.fromAmino(object.value); - }, - fromProtoMsg(message: EnumOptionsProtoMsg): EnumOptions { - return EnumOptions.decode(message.value); - }, - toProto(message: EnumOptions): Uint8Array { - return EnumOptions.encode(message).finish(); - }, - toProtoMsg(message: EnumOptions): EnumOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.EnumOptions", - value: EnumOptions.encode(message).finish() - }; - } -}; -function createBaseEnumValueOptions(): EnumValueOptions { - return { - deprecated: false, - uninterpretedOption: [] - }; -} -export const EnumValueOptions = { - typeUrl: "/google.protobuf.EnumValueOptions", - encode(message: EnumValueOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EnumValueOptions { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): EnumValueOptions { - const message = createBaseEnumValueOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: EnumValueOptionsSDKType): EnumValueOptions { - return { - deprecated: object?.deprecated, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: EnumValueOptions): EnumValueOptionsSDKType { - const obj: any = {}; - obj.deprecated = message.deprecated; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: EnumValueOptionsAmino): EnumValueOptions { - return { - deprecated: object.deprecated, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: EnumValueOptions): EnumValueOptionsAmino { - const obj: any = {}; - obj.deprecated = message.deprecated; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: EnumValueOptionsAminoMsg): EnumValueOptions { - return EnumValueOptions.fromAmino(object.value); - }, - fromProtoMsg(message: EnumValueOptionsProtoMsg): EnumValueOptions { - return EnumValueOptions.decode(message.value); - }, - toProto(message: EnumValueOptions): Uint8Array { - return EnumValueOptions.encode(message).finish(); - }, - toProtoMsg(message: EnumValueOptions): EnumValueOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.EnumValueOptions", - value: EnumValueOptions.encode(message).finish() - }; - } -}; -function createBaseServiceOptions(): ServiceOptions { - return { - deprecated: false, - uninterpretedOption: [] - }; -} -export const ServiceOptions = { - typeUrl: "/google.protobuf.ServiceOptions", - encode(message: ServiceOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ServiceOptions { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ServiceOptions { - const message = createBaseServiceOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ServiceOptionsSDKType): ServiceOptions { - return { - deprecated: object?.deprecated, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: ServiceOptions): ServiceOptionsSDKType { - const obj: any = {}; - obj.deprecated = message.deprecated; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: ServiceOptionsAmino): ServiceOptions { - return { - deprecated: object.deprecated, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: ServiceOptions): ServiceOptionsAmino { - const obj: any = {}; - obj.deprecated = message.deprecated; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: ServiceOptionsAminoMsg): ServiceOptions { - return ServiceOptions.fromAmino(object.value); - }, - fromProtoMsg(message: ServiceOptionsProtoMsg): ServiceOptions { - return ServiceOptions.decode(message.value); - }, - toProto(message: ServiceOptions): Uint8Array { - return ServiceOptions.encode(message).finish(); - }, - toProtoMsg(message: ServiceOptions): ServiceOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.ServiceOptions", - value: ServiceOptions.encode(message).finish() - }; - } -}; -function createBaseMethodOptions(): MethodOptions { - return { - deprecated: false, - idempotencyLevel: 1, - uninterpretedOption: [] - }; -} -export const MethodOptions = { - typeUrl: "/google.protobuf.MethodOptions", - encode(message: MethodOptions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if (message.idempotencyLevel !== 1) { - writer.uint32(272).int32(message.idempotencyLevel); - } - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = (reader.int32() as any); - break; - case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MethodOptions { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - idempotencyLevel: isSet(object.idempotencyLevel) ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) : -1, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] - }; - }, - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => e ? UninterpretedOption.toJSON(e) : undefined); - } else { - obj.uninterpretedOption = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MethodOptions { - const message = createBaseMethodOptions(); - message.deprecated = object.deprecated ?? false; - message.idempotencyLevel = object.idempotencyLevel ?? 1; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MethodOptionsSDKType): MethodOptions { - return { - deprecated: object?.deprecated, - idempotencyLevel: isSet(object.idempotency_level) ? methodOptions_IdempotencyLevelFromJSON(object.idempotency_level) : -1, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromSDK(e)) : [] - }; - }, - toSDK(message: MethodOptions): MethodOptionsSDKType { - const obj: any = {}; - obj.deprecated = message.deprecated; - message.idempotencyLevel !== undefined && (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toSDK(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAmino(object: MethodOptionsAmino): MethodOptions { - return { - deprecated: object.deprecated, - idempotencyLevel: isSet(object.idempotency_level) ? methodOptions_IdempotencyLevelFromJSON(object.idempotency_level) : -1, - uninterpretedOption: Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromAmino(e)) : [] - }; - }, - toAmino(message: MethodOptions): MethodOptionsAmino { - const obj: any = {}; - obj.deprecated = message.deprecated; - obj.idempotency_level = message.idempotencyLevel; - if (message.uninterpretedOption) { - obj.uninterpreted_option = message.uninterpretedOption.map(e => e ? UninterpretedOption.toAmino(e) : undefined); - } else { - obj.uninterpreted_option = []; - } - return obj; - }, - fromAminoMsg(object: MethodOptionsAminoMsg): MethodOptions { - return MethodOptions.fromAmino(object.value); - }, - fromProtoMsg(message: MethodOptionsProtoMsg): MethodOptions { - return MethodOptions.decode(message.value); - }, - toProto(message: MethodOptions): Uint8Array { - return MethodOptions.encode(message).finish(); - }, - toProtoMsg(message: MethodOptions): MethodOptionsProtoMsg { - return { - typeUrl: "/google.protobuf.MethodOptions", - value: MethodOptions.encode(message).finish() - }; - } -}; -function createBaseUninterpretedOption(): UninterpretedOption { - return { - name: [], - identifierValue: "", - positiveIntValue: BigInt(0), - negativeIntValue: BigInt(0), - doubleValue: 0, - stringValue: new Uint8Array(), - aggregateValue: "" - }; -} -export const UninterpretedOption = { - typeUrl: "/google.protobuf.UninterpretedOption", - encode(message: UninterpretedOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.name) { - UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.identifierValue !== "") { - writer.uint32(26).string(message.identifierValue); - } - if (message.positiveIntValue !== BigInt(0)) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if (message.negativeIntValue !== BigInt(0)) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if (message.stringValue.length !== 0) { - writer.uint32(58).bytes(message.stringValue); - } - if (message.aggregateValue !== "") { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UninterpretedOption { - return { - name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], - identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) ? BigInt(object.positiveIntValue.toString()) : BigInt(0), - negativeIntValue: isSet(object.negativeIntValue) ? BigInt(object.negativeIntValue.toString()) : BigInt(0), - doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, - stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(), - aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "" - }; - }, - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map(e => e ? UninterpretedOption_NamePart.toJSON(e) : undefined); - } else { - obj.name = []; - } - message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && (obj.positiveIntValue = (message.positiveIntValue || BigInt(0)).toString()); - message.negativeIntValue !== undefined && (obj.negativeIntValue = (message.negativeIntValue || BigInt(0)).toString()); - message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : new Uint8Array())); - message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue); - return obj; - }, - fromPartial(object: DeepPartial): UninterpretedOption { - const message = createBaseUninterpretedOption(); - message.name = object.name?.map(e => UninterpretedOption_NamePart.fromPartial(e)) || []; - message.identifierValue = object.identifierValue ?? ""; - message.positiveIntValue = object.positiveIntValue !== undefined && object.positiveIntValue !== null ? BigInt(object.positiveIntValue.toString()) : BigInt(0); - message.negativeIntValue = object.negativeIntValue !== undefined && object.negativeIntValue !== null ? BigInt(object.negativeIntValue.toString()) : BigInt(0); - message.doubleValue = object.doubleValue ?? 0; - message.stringValue = object.stringValue ?? new Uint8Array(); - message.aggregateValue = object.aggregateValue ?? ""; - return message; - }, - fromSDK(object: UninterpretedOptionSDKType): UninterpretedOption { - return { - name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromSDK(e)) : [], - identifierValue: object?.identifier_value, - positiveIntValue: object?.positive_int_value, - negativeIntValue: object?.negative_int_value, - doubleValue: object?.double_value, - stringValue: object?.string_value, - aggregateValue: object?.aggregate_value - }; - }, - toSDK(message: UninterpretedOption): UninterpretedOptionSDKType { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map(e => e ? UninterpretedOption_NamePart.toSDK(e) : undefined); - } else { - obj.name = []; - } - obj.identifier_value = message.identifierValue; - obj.positive_int_value = message.positiveIntValue; - obj.negative_int_value = message.negativeIntValue; - obj.double_value = message.doubleValue; - obj.string_value = message.stringValue; - obj.aggregate_value = message.aggregateValue; - return obj; - }, - fromAmino(object: UninterpretedOptionAmino): UninterpretedOption { - return { - name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromAmino(e)) : [], - identifierValue: object.identifier_value, - positiveIntValue: BigInt(object.positive_int_value), - negativeIntValue: BigInt(object.negative_int_value), - doubleValue: object.double_value, - stringValue: object.string_value, - aggregateValue: object.aggregate_value - }; - }, - toAmino(message: UninterpretedOption): UninterpretedOptionAmino { - const obj: any = {}; - if (message.name) { - obj.name = message.name.map(e => e ? UninterpretedOption_NamePart.toAmino(e) : undefined); - } else { - obj.name = []; - } - obj.identifier_value = message.identifierValue; - obj.positive_int_value = message.positiveIntValue ? message.positiveIntValue.toString() : undefined; - obj.negative_int_value = message.negativeIntValue ? message.negativeIntValue.toString() : undefined; - obj.double_value = message.doubleValue; - obj.string_value = message.stringValue; - obj.aggregate_value = message.aggregateValue; - return obj; - }, - fromAminoMsg(object: UninterpretedOptionAminoMsg): UninterpretedOption { - return UninterpretedOption.fromAmino(object.value); - }, - fromProtoMsg(message: UninterpretedOptionProtoMsg): UninterpretedOption { - return UninterpretedOption.decode(message.value); - }, - toProto(message: UninterpretedOption): Uint8Array { - return UninterpretedOption.encode(message).finish(); - }, - toProtoMsg(message: UninterpretedOption): UninterpretedOptionProtoMsg { - return { - typeUrl: "/google.protobuf.UninterpretedOption", - value: UninterpretedOption.encode(message).finish() - }; - } -}; -function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { - return { - namePart: "", - isExtension: false - }; -} -export const UninterpretedOption_NamePart = { - typeUrl: "/google.protobuf.NamePart", - encode(message: UninterpretedOption_NamePart, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UninterpretedOption_NamePart { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption_NamePart(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UninterpretedOption_NamePart { - return { - namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false - }; - }, - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && (obj.isExtension = message.isExtension); - return obj; - }, - fromPartial(object: DeepPartial): UninterpretedOption_NamePart { - const message = createBaseUninterpretedOption_NamePart(); - message.namePart = object.namePart ?? ""; - message.isExtension = object.isExtension ?? false; - return message; - }, - fromSDK(object: UninterpretedOption_NamePartSDKType): UninterpretedOption_NamePart { - return { - namePart: object?.name_part, - isExtension: object?.is_extension - }; - }, - toSDK(message: UninterpretedOption_NamePart): UninterpretedOption_NamePartSDKType { - const obj: any = {}; - obj.name_part = message.namePart; - obj.is_extension = message.isExtension; - return obj; - }, - fromAmino(object: UninterpretedOption_NamePartAmino): UninterpretedOption_NamePart { - return { - namePart: object.name_part, - isExtension: object.is_extension - }; - }, - toAmino(message: UninterpretedOption_NamePart): UninterpretedOption_NamePartAmino { - const obj: any = {}; - obj.name_part = message.namePart; - obj.is_extension = message.isExtension; - return obj; - }, - fromAminoMsg(object: UninterpretedOption_NamePartAminoMsg): UninterpretedOption_NamePart { - return UninterpretedOption_NamePart.fromAmino(object.value); - }, - fromProtoMsg(message: UninterpretedOption_NamePartProtoMsg): UninterpretedOption_NamePart { - return UninterpretedOption_NamePart.decode(message.value); - }, - toProto(message: UninterpretedOption_NamePart): Uint8Array { - return UninterpretedOption_NamePart.encode(message).finish(); - }, - toProtoMsg(message: UninterpretedOption_NamePart): UninterpretedOption_NamePartProtoMsg { - return { - typeUrl: "/google.protobuf.NamePart", - value: UninterpretedOption_NamePart.encode(message).finish() - }; - } -}; -function createBaseSourceCodeInfo(): SourceCodeInfo { - return { - location: [] - }; -} -export const SourceCodeInfo = { - typeUrl: "/google.protobuf.SourceCodeInfo", - encode(message: SourceCodeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SourceCodeInfo { - return { - location: Array.isArray(object?.location) ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e)) : [] - }; - }, - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map(e => e ? SourceCodeInfo_Location.toJSON(e) : undefined); - } else { - obj.location = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = createBaseSourceCodeInfo(); - message.location = object.location?.map(e => SourceCodeInfo_Location.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SourceCodeInfoSDKType): SourceCodeInfo { - return { - location: Array.isArray(object?.location) ? object.location.map((e: any) => SourceCodeInfo_Location.fromSDK(e)) : [] - }; - }, - toSDK(message: SourceCodeInfo): SourceCodeInfoSDKType { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map(e => e ? SourceCodeInfo_Location.toSDK(e) : undefined); - } else { - obj.location = []; - } - return obj; - }, - fromAmino(object: SourceCodeInfoAmino): SourceCodeInfo { - return { - location: Array.isArray(object?.location) ? object.location.map((e: any) => SourceCodeInfo_Location.fromAmino(e)) : [] - }; - }, - toAmino(message: SourceCodeInfo): SourceCodeInfoAmino { - const obj: any = {}; - if (message.location) { - obj.location = message.location.map(e => e ? SourceCodeInfo_Location.toAmino(e) : undefined); - } else { - obj.location = []; - } - return obj; - }, - fromAminoMsg(object: SourceCodeInfoAminoMsg): SourceCodeInfo { - return SourceCodeInfo.fromAmino(object.value); - }, - fromProtoMsg(message: SourceCodeInfoProtoMsg): SourceCodeInfo { - return SourceCodeInfo.decode(message.value); - }, - toProto(message: SourceCodeInfo): Uint8Array { - return SourceCodeInfo.encode(message).finish(); - }, - toProtoMsg(message: SourceCodeInfo): SourceCodeInfoProtoMsg { - return { - typeUrl: "/google.protobuf.SourceCodeInfo", - value: SourceCodeInfo.encode(message).finish() - }; - } -}; -function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { - return { - path: [], - span: [], - leadingComments: "", - trailingComments: "", - leadingDetachedComments: [] - }; -} -export const SourceCodeInfo_Location = { - typeUrl: "/google.protobuf.Location", - encode(message: SourceCodeInfo_Location, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - if (message.leadingComments !== "") { - writer.uint32(26).string(message.leadingComments); - } - if (message.trailingComments !== "") { - writer.uint32(34).string(message.trailingComments); - } - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo_Location(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span.push(reader.int32()); - } - } else { - message.span.push(reader.int32()); - } - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SourceCodeInfo_Location { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], - span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [], - leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", - trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", - leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) ? object.leadingDetachedComments.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map(e => Math.round(e)); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map(e => Math.round(e)); - } else { - obj.span = []; - } - message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map(e => e); - } else { - obj.leadingDetachedComments = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SourceCodeInfo_Location { - const message = createBaseSourceCodeInfo_Location(); - message.path = object.path?.map(e => e) || []; - message.span = object.span?.map(e => e) || []; - message.leadingComments = object.leadingComments ?? ""; - message.trailingComments = object.trailingComments ?? ""; - message.leadingDetachedComments = object.leadingDetachedComments?.map(e => e) || []; - return message; - }, - fromSDK(object: SourceCodeInfo_LocationSDKType): SourceCodeInfo_Location { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => e) : [], - span: Array.isArray(object?.span) ? object.span.map((e: any) => e) : [], - leadingComments: object?.leading_comments, - trailingComments: object?.trailing_comments, - leadingDetachedComments: Array.isArray(object?.leading_detached_comments) ? object.leading_detached_comments.map((e: any) => e) : [] - }; - }, - toSDK(message: SourceCodeInfo_Location): SourceCodeInfo_LocationSDKType { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map(e => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map(e => e); - } else { - obj.span = []; - } - obj.leading_comments = message.leadingComments; - obj.trailing_comments = message.trailingComments; - if (message.leadingDetachedComments) { - obj.leading_detached_comments = message.leadingDetachedComments.map(e => e); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - fromAmino(object: SourceCodeInfo_LocationAmino): SourceCodeInfo_Location { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => e) : [], - span: Array.isArray(object?.span) ? object.span.map((e: any) => e) : [], - leadingComments: object.leading_comments, - trailingComments: object.trailing_comments, - leadingDetachedComments: Array.isArray(object?.leading_detached_comments) ? object.leading_detached_comments.map((e: any) => e) : [] - }; - }, - toAmino(message: SourceCodeInfo_Location): SourceCodeInfo_LocationAmino { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map(e => e); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map(e => e); - } else { - obj.span = []; - } - obj.leading_comments = message.leadingComments; - obj.trailing_comments = message.trailingComments; - if (message.leadingDetachedComments) { - obj.leading_detached_comments = message.leadingDetachedComments.map(e => e); - } else { - obj.leading_detached_comments = []; - } - return obj; - }, - fromAminoMsg(object: SourceCodeInfo_LocationAminoMsg): SourceCodeInfo_Location { - return SourceCodeInfo_Location.fromAmino(object.value); - }, - fromProtoMsg(message: SourceCodeInfo_LocationProtoMsg): SourceCodeInfo_Location { - return SourceCodeInfo_Location.decode(message.value); - }, - toProto(message: SourceCodeInfo_Location): Uint8Array { - return SourceCodeInfo_Location.encode(message).finish(); - }, - toProtoMsg(message: SourceCodeInfo_Location): SourceCodeInfo_LocationProtoMsg { - return { - typeUrl: "/google.protobuf.Location", - value: SourceCodeInfo_Location.encode(message).finish() - }; - } -}; -function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { - return { - annotation: [] - }; -} -export const GeneratedCodeInfo = { - typeUrl: "/google.protobuf.GeneratedCodeInfo", - encode(message: GeneratedCodeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GeneratedCodeInfo { - return { - annotation: Array.isArray(object?.annotation) ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e)) : [] - }; - }, - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map(e => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } else { - obj.annotation = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = createBaseGeneratedCodeInfo(); - message.annotation = object.annotation?.map(e => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GeneratedCodeInfoSDKType): GeneratedCodeInfo { - return { - annotation: Array.isArray(object?.annotation) ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromSDK(e)) : [] - }; - }, - toSDK(message: GeneratedCodeInfo): GeneratedCodeInfoSDKType { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map(e => e ? GeneratedCodeInfo_Annotation.toSDK(e) : undefined); - } else { - obj.annotation = []; - } - return obj; - }, - fromAmino(object: GeneratedCodeInfoAmino): GeneratedCodeInfo { - return { - annotation: Array.isArray(object?.annotation) ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromAmino(e)) : [] - }; - }, - toAmino(message: GeneratedCodeInfo): GeneratedCodeInfoAmino { - const obj: any = {}; - if (message.annotation) { - obj.annotation = message.annotation.map(e => e ? GeneratedCodeInfo_Annotation.toAmino(e) : undefined); - } else { - obj.annotation = []; - } - return obj; - }, - fromAminoMsg(object: GeneratedCodeInfoAminoMsg): GeneratedCodeInfo { - return GeneratedCodeInfo.fromAmino(object.value); - }, - fromProtoMsg(message: GeneratedCodeInfoProtoMsg): GeneratedCodeInfo { - return GeneratedCodeInfo.decode(message.value); - }, - toProto(message: GeneratedCodeInfo): Uint8Array { - return GeneratedCodeInfo.encode(message).finish(); - }, - toProtoMsg(message: GeneratedCodeInfo): GeneratedCodeInfoProtoMsg { - return { - typeUrl: "/google.protobuf.GeneratedCodeInfo", - value: GeneratedCodeInfo.encode(message).finish() - }; - } -}; -function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { - path: [], - sourceFile: "", - begin: 0, - end: 0 - }; -} -export const GeneratedCodeInfo_Annotation = { - typeUrl: "/google.protobuf.Annotation", - encode(message: GeneratedCodeInfo_Annotation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - if (message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo_Annotation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path.push(reader.int32()); - } - } else { - message.path.push(reader.int32()); - } - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GeneratedCodeInfo_Annotation { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], - sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", - begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0 - }; - }, - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map(e => Math.round(e)); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = Math.round(message.begin)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { - const message = createBaseGeneratedCodeInfo_Annotation(); - message.path = object.path?.map(e => e) || []; - message.sourceFile = object.sourceFile ?? ""; - message.begin = object.begin ?? 0; - message.end = object.end ?? 0; - return message; - }, - fromSDK(object: GeneratedCodeInfo_AnnotationSDKType): GeneratedCodeInfo_Annotation { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => e) : [], - sourceFile: object?.source_file, - begin: object?.begin, - end: object?.end - }; - }, - toSDK(message: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_AnnotationSDKType { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map(e => e); - } else { - obj.path = []; - } - obj.source_file = message.sourceFile; - obj.begin = message.begin; - obj.end = message.end; - return obj; - }, - fromAmino(object: GeneratedCodeInfo_AnnotationAmino): GeneratedCodeInfo_Annotation { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => e) : [], - sourceFile: object.source_file, - begin: object.begin, - end: object.end - }; - }, - toAmino(message: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_AnnotationAmino { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map(e => e); - } else { - obj.path = []; - } - obj.source_file = message.sourceFile; - obj.begin = message.begin; - obj.end = message.end; - return obj; - }, - fromAminoMsg(object: GeneratedCodeInfo_AnnotationAminoMsg): GeneratedCodeInfo_Annotation { - return GeneratedCodeInfo_Annotation.fromAmino(object.value); - }, - fromProtoMsg(message: GeneratedCodeInfo_AnnotationProtoMsg): GeneratedCodeInfo_Annotation { - return GeneratedCodeInfo_Annotation.decode(message.value); - }, - toProto(message: GeneratedCodeInfo_Annotation): Uint8Array { - return GeneratedCodeInfo_Annotation.encode(message).finish(); - }, - toProtoMsg(message: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_AnnotationProtoMsg { - return { - typeUrl: "/google.protobuf.Annotation", - value: GeneratedCodeInfo_Annotation.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/protobuf/duration.ts b/examples/interchainjs/src/codegen/google/protobuf/duration.ts deleted file mode 100644 index e285f645..00000000 --- a/examples/interchainjs/src/codegen/google/protobuf/duration.ts +++ /dev/null @@ -1,305 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: bigint; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - nanos: number; -} -export interface DurationProtoMsg { - typeUrl: "/google.protobuf.Duration"; - value: Uint8Array; -} -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export type DurationAmino = string; -export interface DurationAminoMsg { - type: "/google.protobuf.Duration"; - value: DurationAmino; -} -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - */ -export interface DurationSDKType { - seconds: bigint; - nanos: number; -} -function createBaseDuration(): Duration { - return { - seconds: BigInt(0), - nanos: 0 - }; -} -export const Duration = { - typeUrl: "/google.protobuf.Duration", - encode(message: Duration, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.seconds !== BigInt(0)) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Duration { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDuration(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Duration { - return { - seconds: isSet(object.seconds) ? BigInt(object.seconds.toString()) : BigInt(0), - nanos: isSet(object.nanos) ? Number(object.nanos) : 0 - }; - }, - toJSON(message: Duration): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = (message.seconds || BigInt(0)).toString()); - message.nanos !== undefined && (obj.nanos = Math.round(message.nanos)); - return obj; - }, - fromPartial(object: DeepPartial): Duration { - const message = createBaseDuration(); - message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0); - message.nanos = object.nanos ?? 0; - return message; - }, - fromSDK(object: DurationSDKType): Duration { - return { - seconds: object?.seconds, - nanos: object?.nanos - }; - }, - toSDK(message: Duration): DurationSDKType { - const obj: any = {}; - obj.seconds = message.seconds; - obj.nanos = message.nanos; - return obj; - }, - fromAmino(object: DurationAmino): Duration { - const value = BigInt(object); - return { - seconds: value / BigInt("1000000000"), - nanos: Number(value % BigInt("1000000000")) - }; - }, - toAmino(message: Duration): DurationAmino { - return (message.seconds * BigInt("1000000000") + BigInt(message.nanos)).toString(); - }, - fromAminoMsg(object: DurationAminoMsg): Duration { - return Duration.fromAmino(object.value); - }, - fromProtoMsg(message: DurationProtoMsg): Duration { - return Duration.decode(message.value); - }, - toProto(message: Duration): Uint8Array { - return Duration.encode(message).finish(); - }, - toProtoMsg(message: Duration): DurationProtoMsg { - return { - typeUrl: "/google.protobuf.Duration", - value: Duration.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/protobuf/empty.ts b/examples/interchainjs/src/codegen/google/protobuf/empty.ts deleted file mode 100644 index 04ef44de..00000000 --- a/examples/interchainjs/src/codegen/google/protobuf/empty.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - */ -export interface Empty {} -export interface EmptyProtoMsg { - typeUrl: "/google.protobuf.Empty"; - value: Uint8Array; -} -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - */ -export interface EmptyAmino {} -export interface EmptyAminoMsg { - type: "/google.protobuf.Empty"; - value: EmptyAmino; -} -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - */ -export interface EmptySDKType {} -function createBaseEmpty(): Empty { - return {}; -} -export const Empty = { - typeUrl: "/google.protobuf.Empty", - encode(_: Empty, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Empty { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEmpty(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): Empty { - return {}; - }, - toJSON(_: Empty): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): Empty { - const message = createBaseEmpty(); - return message; - }, - fromSDK(_: EmptySDKType): Empty { - return {}; - }, - toSDK(_: Empty): EmptySDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: EmptyAmino): Empty { - return {}; - }, - toAmino(_: Empty): EmptyAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: EmptyAminoMsg): Empty { - return Empty.fromAmino(object.value); - }, - fromProtoMsg(message: EmptyProtoMsg): Empty { - return Empty.decode(message.value); - }, - toProto(message: Empty): Uint8Array { - return Empty.encode(message).finish(); - }, - toProtoMsg(message: Empty): EmptyProtoMsg { - return { - typeUrl: "/google.protobuf.Empty", - value: Empty.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/google/protobuf/timestamp.ts b/examples/interchainjs/src/codegen/google/protobuf/timestamp.ts deleted file mode 100644 index 1d34cd5a..00000000 --- a/examples/interchainjs/src/codegen/google/protobuf/timestamp.ts +++ /dev/null @@ -1,371 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../helpers"; -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: bigint; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - nanos: number; -} -export interface TimestampProtoMsg { - typeUrl: "/google.protobuf.Timestamp"; - value: Uint8Array; -} -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export type TimestampAmino = string; -export interface TimestampAminoMsg { - type: "/google.protobuf.Timestamp"; - value: TimestampAmino; -} -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - */ -export interface TimestampSDKType { - seconds: bigint; - nanos: number; -} -function createBaseTimestamp(): Timestamp { - return { - seconds: BigInt(0), - nanos: 0 - }; -} -export const Timestamp = { - typeUrl: "/google.protobuf.Timestamp", - encode(message: Timestamp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.seconds !== BigInt(0)) { - writer.uint32(8).int64(message.seconds); - } - if (message.nanos !== 0) { - writer.uint32(16).int32(message.nanos); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Timestamp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimestamp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Timestamp { - return { - seconds: isSet(object.seconds) ? BigInt(object.seconds.toString()) : BigInt(0), - nanos: isSet(object.nanos) ? Number(object.nanos) : 0 - }; - }, - toJSON(message: Timestamp): unknown { - const obj: any = {}; - message.seconds !== undefined && (obj.seconds = (message.seconds || BigInt(0)).toString()); - message.nanos !== undefined && (obj.nanos = Math.round(message.nanos)); - return obj; - }, - fromPartial(object: DeepPartial): Timestamp { - const message = createBaseTimestamp(); - message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0); - message.nanos = object.nanos ?? 0; - return message; - }, - fromSDK(object: TimestampSDKType): Timestamp { - return { - seconds: object?.seconds, - nanos: object?.nanos - }; - }, - toSDK(message: Timestamp): TimestampSDKType { - const obj: any = {}; - obj.seconds = message.seconds; - obj.nanos = message.nanos; - return obj; - }, - fromAmino(object: TimestampAmino): Timestamp { - return fromJsonTimestamp(object); - }, - toAmino(message: Timestamp): TimestampAmino { - return fromTimestamp(message).toString(); - }, - fromAminoMsg(object: TimestampAminoMsg): Timestamp { - return Timestamp.fromAmino(object.value); - }, - fromProtoMsg(message: TimestampProtoMsg): Timestamp { - return Timestamp.decode(message.value); - }, - toProto(message: Timestamp): Uint8Array { - return Timestamp.encode(message).finish(); - }, - toProtoMsg(message: Timestamp): TimestampProtoMsg { - return { - typeUrl: "/google.protobuf.Timestamp", - value: Timestamp.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/helpers.ts b/examples/interchainjs/src/codegen/helpers.ts deleted file mode 100644 index 510d40b8..00000000 --- a/examples/interchainjs/src/codegen/helpers.ts +++ /dev/null @@ -1,257 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== 'undefined') return globalThis; - if (typeof self !== 'undefined') return self; - if (typeof window !== 'undefined') return window; - if (typeof global !== 'undefined') return global; - throw 'Unable to locate global object'; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, 'base64').toString('binary')); - -export function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, 'binary').toString('base64')); - -export function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return btoa(bin.join('')); -} - -export interface AminoHeight { - readonly revision_number?: string; - readonly revision_height?: string; -} - -export function omitDefault( - input: T -): T | undefined { - if (typeof input === 'string') { - return input === '' ? undefined : input; - } - - if (typeof input === 'number') { - return input === 0 ? undefined : input; - } - - if (typeof input === 'bigint') { - return input === BigInt(0) ? undefined : input; - } - - throw new Error(`Got unsupported type ${typeof input}`); -} - -interface Duration { - /** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - */ - seconds: bigint; - /** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - */ - - nanos: number; -} - -export function toDuration(duration: string): Duration { - return { - seconds: BigInt(Math.floor(parseInt(duration) / 1000000000)), - nanos: parseInt(duration) % 1000000000 - }; -} - -export function fromDuration(duration: Duration): string { - return ( - parseInt(duration.seconds.toString()) * 1000000000 + - duration.nanos - ).toString(); -} - -export function isSet(value: any): boolean { - return value !== null && value !== undefined; -} - -export function isObject(value: any): boolean { - return typeof value === 'object' && value !== null; -} - -export interface PageRequest { - key: Uint8Array; - offset: bigint; - limit: bigint; - countTotal: boolean; - reverse: boolean; -} - -export interface PageRequestParams { - 'pagination.key'?: string; - 'pagination.offset'?: string; - 'pagination.limit'?: string; - 'pagination.count_total'?: boolean; - 'pagination.reverse'?: boolean; -} - -export interface Params { - params: PageRequestParams; -} - -export const setPaginationParams = ( - options: Params, - pagination?: PageRequest -) => { - if (!pagination) { - return options; - } - - if (typeof pagination?.countTotal !== 'undefined') { - options.params['pagination.count_total'] = pagination.countTotal; - } - if (typeof pagination?.key !== 'undefined') { - // String to Uint8Array - // let uint8arr = new Uint8Array(Buffer.from(data,'base64')); - - // Uint8Array to String - options.params['pagination.key'] = Buffer.from(pagination.key).toString( - 'base64' - ); - } - if (typeof pagination?.limit !== 'undefined') { - options.params['pagination.limit'] = pagination.limit.toString(); - } - if (typeof pagination?.offset !== 'undefined') { - options.params['pagination.offset'] = pagination.offset.toString(); - } - if (typeof pagination?.reverse !== 'undefined') { - options.params['pagination.reverse'] = pagination.reverse; - } - - return options; -}; - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | bigint - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude>, - never - >; - -export interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -interface Timestamp { - /** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - */ - seconds: bigint; - /** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - */ - - nanos: number; -} - -export function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(date.getTime() / 1_000); - const nanos = (date.getTime() % 1000) * 1000000; - return { - seconds, - nanos - }; -} - -export function fromTimestamp(t: Timestamp): Date { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} - -const fromJSON = (object: any): Timestamp => { - return { - seconds: isSet(object.seconds) ? BigInt(object.seconds) : BigInt(0), - nanos: isSet(object.nanos) ? Number(object.nanos) : 0 - }; -}; - -const timestampFromJSON = (object: any): Timestamp => { - return { - seconds: isSet(object.seconds) - ? BigInt(object.seconds.toString()) - : BigInt(0), - nanos: isSet(object.nanos) ? Number(object.nanos) : 0 - }; -}; - -export function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === 'string') { - return toTimestamp(new Date(o)); - } else { - return timestampFromJSON(o); - } -} - -function numberToLong(number: number) { - return BigInt(number); -} diff --git a/examples/interchainjs/src/codegen/hooks.ts b/examples/interchainjs/src/codegen/hooks.ts deleted file mode 100644 index a85792d4..00000000 --- a/examples/interchainjs/src/codegen/hooks.ts +++ /dev/null @@ -1,1374 +0,0 @@ -import { ProtobufRpcClient } from "@cosmjs/stargate"; -import * as _CosmosAppV1alpha1Queryrpc from "./cosmos/app/v1alpha1/query.rpc.Query"; -import * as _CosmosAuthV1beta1Queryrpc from "./cosmos/auth/v1beta1/query.rpc.Query"; -import * as _CosmosAuthzV1beta1Queryrpc from "./cosmos/authz/v1beta1/query.rpc.Query"; -import * as _CosmosBankV1beta1Queryrpc from "./cosmos/bank/v1beta1/query.rpc.Query"; -import * as _CosmosBaseTendermintV1beta1Queryrpc from "./cosmos/base/tendermint/v1beta1/query.rpc.Service"; -import * as _CosmosDistributionV1beta1Queryrpc from "./cosmos/distribution/v1beta1/query.rpc.Query"; -import * as _CosmosEvidenceV1beta1Queryrpc from "./cosmos/evidence/v1beta1/query.rpc.Query"; -import * as _CosmosFeegrantV1beta1Queryrpc from "./cosmos/feegrant/v1beta1/query.rpc.Query"; -import * as _CosmosGovV1Queryrpc from "./cosmos/gov/v1/query.rpc.Query"; -import * as _CosmosGovV1beta1Queryrpc from "./cosmos/gov/v1beta1/query.rpc.Query"; -import * as _CosmosGroupV1Queryrpc from "./cosmos/group/v1/query.rpc.Query"; -import * as _CosmosMintV1beta1Queryrpc from "./cosmos/mint/v1beta1/query.rpc.Query"; -import * as _CosmosNftV1beta1Queryrpc from "./cosmos/nft/v1beta1/query.rpc.Query"; -import * as _CosmosParamsV1beta1Queryrpc from "./cosmos/params/v1beta1/query.rpc.Query"; -import * as _CosmosSlashingV1beta1Queryrpc from "./cosmos/slashing/v1beta1/query.rpc.Query"; -import * as _CosmosStakingV1beta1Queryrpc from "./cosmos/staking/v1beta1/query.rpc.Query"; -import * as _CosmosTxV1beta1Servicerpc from "./cosmos/tx/v1beta1/service.rpc.Service"; -import * as _CosmosUpgradeV1beta1Queryrpc from "./cosmos/upgrade/v1beta1/query.rpc.Query"; -import * as _CosmwasmWasmV1Queryrpc from "./cosmwasm/wasm/v1/query.rpc.Query"; -import * as _IbcApplicationsTransferV1Queryrpc from "./ibc/applications/transfer/v1/query.rpc.Query"; -import * as _IbcCoreChannelV1Queryrpc from "./ibc/core/channel/v1/query.rpc.Query"; -import * as _IbcCoreClientV1Queryrpc from "./ibc/core/client/v1/query.rpc.Query"; -import * as _IbcCoreConnectionV1Queryrpc from "./ibc/core/connection/v1/query.rpc.Query"; -import * as _IbcCorePortV1Queryrpc from "./ibc/core/port/v1/query.rpc.Query"; -import * as _OsmosisClaimV1beta1Queryrpc from "./osmosis/claim/v1beta1/query.rpc.Query"; -import * as _OsmosisEpochsQueryrpc from "./osmosis/epochs/query.rpc.Query"; -import * as _OsmosisGammV1beta1Queryrpc from "./osmosis/gamm/v1beta1/query.rpc.Query"; -import * as _OsmosisGammV2Queryrpc from "./osmosis/gamm/v2/query.rpc.Query"; -import * as _OsmosisIbcratelimitV1beta1Queryrpc from "./osmosis/ibc-rate-limit/v1beta1/query.rpc.Query"; -import * as _OsmosisIncentivesQueryrpc from "./osmosis/incentives/query.rpc.Query"; -import * as _OsmosisLockupQueryrpc from "./osmosis/lockup/query.rpc.Query"; -import * as _OsmosisMintV1beta1Queryrpc from "./osmosis/mint/v1beta1/query.rpc.Query"; -import * as _OsmosisPoolincentivesV1beta1Queryrpc from "./osmosis/pool-incentives/v1beta1/query.rpc.Query"; -import * as _OsmosisSuperfluidQueryrpc from "./osmosis/superfluid/query.rpc.Query"; -import * as _OsmosisTokenfactoryV1beta1Queryrpc from "./osmosis/tokenfactory/v1beta1/query.rpc.Query"; -import * as _OsmosisTwapV1beta1Queryrpc from "./osmosis/twap/v1beta1/query.rpc.Query"; -import * as _OsmosisTxfeesV1beta1Queryrpc from "./osmosis/txfees/v1beta1/query.rpc.Query"; -export const createRpcQueryHooks = ({ - rpc -}: { - rpc: ProtobufRpcClient | undefined; -}) => { - return { - cosmos: { - app: { - v1alpha1: _CosmosAppV1alpha1Queryrpc.createRpcQueryHooks(rpc) - }, - auth: { - v1beta1: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - authz: { - v1beta1: _CosmosAuthzV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - bank: { - v1beta1: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - base: { - tendermint: { - v1beta1: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc) - } - }, - distribution: { - v1beta1: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - evidence: { - v1beta1: _CosmosEvidenceV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - feegrant: { - v1beta1: _CosmosFeegrantV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - gov: { - v1: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc), - v1beta1: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - group: { - v1: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc) - }, - mint: { - v1beta1: _CosmosMintV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - nft: { - v1beta1: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - params: { - v1beta1: _CosmosParamsV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - slashing: { - v1beta1: _CosmosSlashingV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - staking: { - v1beta1: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - tx: { - v1beta1: _CosmosTxV1beta1Servicerpc.createRpcQueryHooks(rpc) - }, - upgrade: { - v1beta1: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryHooks(rpc) - } - }, - cosmwasm: { - wasm: { - v1: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc) - } - }, - ibc: { - applications: { - transfer: { - v1: _IbcApplicationsTransferV1Queryrpc.createRpcQueryHooks(rpc) - } - }, - core: { - channel: { - v1: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc) - }, - client: { - v1: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc) - }, - connection: { - v1: _IbcCoreConnectionV1Queryrpc.createRpcQueryHooks(rpc) - }, - port: { - v1: _IbcCorePortV1Queryrpc.createRpcQueryHooks(rpc) - } - } - }, - osmosis: { - claim: { - v1beta1: _OsmosisClaimV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - epochs: { - v1beta1: _OsmosisEpochsQueryrpc.createRpcQueryHooks(rpc) - }, - gamm: { - v1beta1: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc), - v2: _OsmosisGammV2Queryrpc.createRpcQueryHooks(rpc) - }, - ibcratelimit: { - v1beta1: _OsmosisIbcratelimitV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - incentives: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc), - lockup: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc), - mint: { - v1beta1: _OsmosisMintV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - poolincentives: { - v1beta1: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - superfluid: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc), - tokenfactory: { - v1beta1: _OsmosisTokenfactoryV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - twap: { - v1beta1: _OsmosisTwapV1beta1Queryrpc.createRpcQueryHooks(rpc) - }, - txfees: { - v1beta1: _OsmosisTxfeesV1beta1Queryrpc.createRpcQueryHooks(rpc) - } - }, - /** - * cosmos.app.v1alpha1.useConfig - * Config returns the current app config. - */ - useConfig: _CosmosAppV1alpha1Queryrpc.createRpcQueryHooks(rpc).useConfig, - /** - * cosmos.auth.v1beta1.useAccounts - * Accounts returns all the existing accounts - * - * Since: cosmos-sdk 0.43 - */ - useAccounts: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useAccounts, - /** - * cosmos.auth.v1beta1.useAccount - * Account returns account details based on address. - */ - useAccount: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useAccount, - /** - * cosmos.auth.v1beta1.useParams - * Params queries all parameters. - */ - useParams: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.auth.v1beta1.useModuleAccounts - * ModuleAccounts returns all the existing module accounts. - */ - useModuleAccounts: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useModuleAccounts, - /** - * cosmos.auth.v1beta1.useBech32Prefix - * Bech32 queries bech32Prefix - */ - useBech32Prefix: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useBech32Prefix, - /** - * cosmos.auth.v1beta1.useAddressBytesToString - * AddressBytesToString converts Account Address bytes to string - */ - useAddressBytesToString: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useAddressBytesToString, - /** - * cosmos.auth.v1beta1.useAddressStringToBytes - * AddressStringToBytes converts Address string to bytes - */ - useAddressStringToBytes: _CosmosAuthV1beta1Queryrpc.createRpcQueryHooks(rpc).useAddressStringToBytes, - /** - * cosmos.authz.v1beta1.useGrants - * Returns list of `Authorization`, granted to the grantee by the granter. - */ - useGrants: _CosmosAuthzV1beta1Queryrpc.createRpcQueryHooks(rpc).useGrants, - /** - * cosmos.authz.v1beta1.useGranterGrants - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.46 - */ - useGranterGrants: _CosmosAuthzV1beta1Queryrpc.createRpcQueryHooks(rpc).useGranterGrants, - /** - * cosmos.authz.v1beta1.useGranteeGrants - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.46 - */ - useGranteeGrants: _CosmosAuthzV1beta1Queryrpc.createRpcQueryHooks(rpc).useGranteeGrants, - /** - * cosmos.bank.v1beta1.useBalance - * Balance queries the balance of a single coin for a single account. - */ - useBalance: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useBalance, - /** - * cosmos.bank.v1beta1.useAllBalances - * AllBalances queries the balance of all coins for a single account. - */ - useAllBalances: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useAllBalances, - /** - * cosmos.bank.v1beta1.useSpendableBalances - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - useSpendableBalances: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useSpendableBalances, - /** - * cosmos.bank.v1beta1.useTotalSupply - * TotalSupply queries the total supply of all coins. - */ - useTotalSupply: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useTotalSupply, - /** - * cosmos.bank.v1beta1.useSupplyOf - * SupplyOf queries the supply of a single coin. - */ - useSupplyOf: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useSupplyOf, - /** - * cosmos.bank.v1beta1.useParams - * Params queries the parameters of x/bank module. - */ - useCosmosBankV1beta1Params: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.bank.v1beta1.useDenomMetadata - * DenomsMetadata queries the client metadata of a given coin denomination. - */ - useDenomMetadata: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomMetadata, - /** - * cosmos.bank.v1beta1.useDenomsMetadata - * DenomsMetadata queries the client metadata for all registered coin - * denominations. - */ - useDenomsMetadata: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomsMetadata, - /** - * cosmos.bank.v1beta1.useDenomOwners - * DenomOwners queries for all account addresses that own a particular token - * denomination. - */ - useDenomOwners: _CosmosBankV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomOwners, - /** - * cosmos.base.tendermint.v1beta1.useGetNodeInfo - * GetNodeInfo queries the current node info. - */ - useGetNodeInfo: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc).useGetNodeInfo, - /** - * cosmos.base.tendermint.v1beta1.useGetSyncing - * GetSyncing queries node syncing. - */ - useGetSyncing: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc).useGetSyncing, - /** - * cosmos.base.tendermint.v1beta1.useGetLatestBlock - * GetLatestBlock returns the latest block. - */ - useGetLatestBlock: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc).useGetLatestBlock, - /** - * cosmos.base.tendermint.v1beta1.useGetBlockByHeight - * GetBlockByHeight queries block for given height. - */ - useGetBlockByHeight: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc).useGetBlockByHeight, - /** - * cosmos.base.tendermint.v1beta1.useGetLatestValidatorSet - * GetLatestValidatorSet queries latest validator-set. - */ - useGetLatestValidatorSet: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc).useGetLatestValidatorSet, - /** - * cosmos.base.tendermint.v1beta1.useGetValidatorSetByHeight - * GetValidatorSetByHeight queries validator-set at a given height. - */ - useGetValidatorSetByHeight: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryHooks(rpc).useGetValidatorSetByHeight, - /** - * cosmos.distribution.v1beta1.useParams - * Params queries params of the distribution module. - */ - useCosmosDistributionV1beta1Params: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.distribution.v1beta1.useValidatorOutstandingRewards - * ValidatorOutstandingRewards queries rewards of a validator address. - */ - useValidatorOutstandingRewards: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidatorOutstandingRewards, - /** - * cosmos.distribution.v1beta1.useValidatorCommission - * ValidatorCommission queries accumulated commission for a validator. - */ - useValidatorCommission: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidatorCommission, - /** - * cosmos.distribution.v1beta1.useValidatorSlashes - * ValidatorSlashes queries slash events of a validator. - */ - useValidatorSlashes: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidatorSlashes, - /** - * cosmos.distribution.v1beta1.useDelegationRewards - * DelegationRewards queries the total rewards accrued by a delegation. - */ - useDelegationRewards: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegationRewards, - /** - * cosmos.distribution.v1beta1.useDelegationTotalRewards - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ - useDelegationTotalRewards: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegationTotalRewards, - /** - * cosmos.distribution.v1beta1.useDelegatorValidators - * DelegatorValidators queries the validators of a delegator. - */ - useDelegatorValidators: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegatorValidators, - /** - * cosmos.distribution.v1beta1.useDelegatorWithdrawAddress - * DelegatorWithdrawAddress queries withdraw address of a delegator. - */ - useDelegatorWithdrawAddress: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegatorWithdrawAddress, - /** - * cosmos.distribution.v1beta1.useCommunityPool - * CommunityPool queries the community pool coins. - */ - useCommunityPool: _CosmosDistributionV1beta1Queryrpc.createRpcQueryHooks(rpc).useCommunityPool, - /** - * cosmos.evidence.v1beta1.useEvidence - * Evidence queries evidence based on evidence hash. - */ - useEvidence: _CosmosEvidenceV1beta1Queryrpc.createRpcQueryHooks(rpc).useEvidence, - /** - * cosmos.evidence.v1beta1.useAllEvidence - * AllEvidence queries all evidence. - */ - useAllEvidence: _CosmosEvidenceV1beta1Queryrpc.createRpcQueryHooks(rpc).useAllEvidence, - /** - * cosmos.feegrant.v1beta1.useAllowance - * Allowance returns fee granted to the grantee by the granter. - */ - useAllowance: _CosmosFeegrantV1beta1Queryrpc.createRpcQueryHooks(rpc).useAllowance, - /** - * cosmos.feegrant.v1beta1.useAllowances - * Allowances returns all the grants for address. - */ - useAllowances: _CosmosFeegrantV1beta1Queryrpc.createRpcQueryHooks(rpc).useAllowances, - /** - * cosmos.feegrant.v1beta1.useAllowancesByGranter - * AllowancesByGranter returns all the grants given by an address - * Since v0.46 - */ - useAllowancesByGranter: _CosmosFeegrantV1beta1Queryrpc.createRpcQueryHooks(rpc).useAllowancesByGranter, - /** - * cosmos.gov.v1.useProposal - * Proposal queries proposal details based on ProposalID. - */ - useProposal: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useProposal, - /** - * cosmos.gov.v1.useProposals - * Proposals queries all proposals based on given status. - */ - useProposals: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useProposals, - /** - * cosmos.gov.v1.useVote - * Vote queries voted information based on proposalID, voterAddr. - */ - useVote: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useVote, - /** - * cosmos.gov.v1.useVotes - * Votes queries votes of a given proposal. - */ - useVotes: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useVotes, - /** - * cosmos.gov.v1.useParams - * Params queries all parameters of the gov module. - */ - useCosmosGovV1Params: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.gov.v1.useDeposit - * Deposit queries single deposit information based proposalID, depositAddr. - */ - useDeposit: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useDeposit, - /** - * cosmos.gov.v1.useDeposits - * Deposits queries all deposits of a single proposal. - */ - useDeposits: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useDeposits, - /** - * cosmos.gov.v1.useTallyResult - * TallyResult queries the tally of a proposal vote. - */ - useTallyResult: _CosmosGovV1Queryrpc.createRpcQueryHooks(rpc).useTallyResult, - /** - * cosmos.gov.v1beta1.useProposal - * Proposal queries proposal details based on ProposalID. - */ - useCosmosGovV1beta1Proposal: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useProposal, - /** - * cosmos.gov.v1beta1.useProposals - * Proposals queries all proposals based on given status. - */ - useCosmosGovV1beta1Proposals: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useProposals, - /** - * cosmos.gov.v1beta1.useVote - * Vote queries voted information based on proposalID, voterAddr. - */ - useCosmosGovV1beta1Vote: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useVote, - /** - * cosmos.gov.v1beta1.useVotes - * Votes queries votes of a given proposal. - */ - useCosmosGovV1beta1Votes: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useVotes, - /** - * cosmos.gov.v1beta1.useParams - * Params queries all parameters of the gov module. - */ - useCosmosGovV1beta1Params: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.gov.v1beta1.useDeposit - * Deposit queries single deposit information based proposalID, depositAddr. - */ - useCosmosGovV1beta1Deposit: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useDeposit, - /** - * cosmos.gov.v1beta1.useDeposits - * Deposits queries all deposits of a single proposal. - */ - useCosmosGovV1beta1Deposits: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useDeposits, - /** - * cosmos.gov.v1beta1.useTallyResult - * TallyResult queries the tally of a proposal vote. - */ - useCosmosGovV1beta1TallyResult: _CosmosGovV1beta1Queryrpc.createRpcQueryHooks(rpc).useTallyResult, - /** - * cosmos.group.v1.useGroupInfo - * GroupInfo queries group info based on group id. - */ - useGroupInfo: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupInfo, - /** - * cosmos.group.v1.useGroupPolicyInfo - * GroupPolicyInfo queries group policy info based on account address of group policy. - */ - useGroupPolicyInfo: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupPolicyInfo, - /** - * cosmos.group.v1.useGroupMembers - * GroupMembers queries members of a group - */ - useGroupMembers: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupMembers, - /** - * cosmos.group.v1.useGroupsByAdmin - * GroupsByAdmin queries groups by admin address. - */ - useGroupsByAdmin: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupsByAdmin, - /** - * cosmos.group.v1.useGroupPoliciesByGroup - * GroupPoliciesByGroup queries group policies by group id. - */ - useGroupPoliciesByGroup: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupPoliciesByGroup, - /** - * cosmos.group.v1.useGroupPoliciesByAdmin - * GroupsByAdmin queries group policies by admin address. - */ - useGroupPoliciesByAdmin: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupPoliciesByAdmin, - /** - * cosmos.group.v1.useProposal - * Proposal queries a proposal based on proposal id. - */ - useCosmosGroupV1Proposal: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useProposal, - /** - * cosmos.group.v1.useProposalsByGroupPolicy - * ProposalsByGroupPolicy queries proposals based on account address of group policy. - */ - useProposalsByGroupPolicy: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useProposalsByGroupPolicy, - /** - * cosmos.group.v1.useVoteByProposalVoter - * VoteByProposalVoter queries a vote by proposal id and voter. - */ - useVoteByProposalVoter: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useVoteByProposalVoter, - /** - * cosmos.group.v1.useVotesByProposal - * VotesByProposal queries a vote by proposal. - */ - useVotesByProposal: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useVotesByProposal, - /** - * cosmos.group.v1.useVotesByVoter - * VotesByVoter queries a vote by voter. - */ - useVotesByVoter: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useVotesByVoter, - /** - * cosmos.group.v1.useGroupsByMember - * GroupsByMember queries groups by member address. - */ - useGroupsByMember: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useGroupsByMember, - /** - * cosmos.group.v1.useTallyResult - * TallyResult queries the tally of a proposal votes. - */ - useCosmosGroupV1TallyResult: _CosmosGroupV1Queryrpc.createRpcQueryHooks(rpc).useTallyResult, - /** - * cosmos.mint.v1beta1.useParams - * Params returns the total set of minting parameters. - */ - useCosmosMintV1beta1Params: _CosmosMintV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.mint.v1beta1.useInflation - * Inflation returns the current minting inflation value. - */ - useInflation: _CosmosMintV1beta1Queryrpc.createRpcQueryHooks(rpc).useInflation, - /** - * cosmos.mint.v1beta1.useAnnualProvisions - * AnnualProvisions current minting annual provisions value. - */ - useAnnualProvisions: _CosmosMintV1beta1Queryrpc.createRpcQueryHooks(rpc).useAnnualProvisions, - /** - * cosmos.nft.v1beta1.useBalance - * Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 - */ - useCosmosNftV1beta1Balance: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useBalance, - /** - * cosmos.nft.v1beta1.useOwner - * Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 - */ - useOwner: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useOwner, - /** - * cosmos.nft.v1beta1.useSupply - * Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. - */ - useSupply: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useSupply, - /** - * cosmos.nft.v1beta1.useNFTs - * NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - * ERC721Enumerable - */ - useNFTs: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useNFTs, - /** - * cosmos.nft.v1beta1.useNFT - * NFT queries an NFT based on its class and id. - */ - useNFT: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useNFT, - /** - * cosmos.nft.v1beta1.useClass - * Class queries an NFT class based on its id - */ - useClass: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useClass, - /** - * cosmos.nft.v1beta1.useClasses - * Classes queries all NFT classes - */ - useClasses: _CosmosNftV1beta1Queryrpc.createRpcQueryHooks(rpc).useClasses, - /** - * cosmos.params.v1beta1.useParams - * Params queries a specific parameter of a module, given its subspace and - * key. - */ - useCosmosParamsV1beta1Params: _CosmosParamsV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.params.v1beta1.useSubspaces - * Subspaces queries for all registered subspaces and all keys for a subspace. - */ - useSubspaces: _CosmosParamsV1beta1Queryrpc.createRpcQueryHooks(rpc).useSubspaces, - /** - * cosmos.slashing.v1beta1.useParams - * Params queries the parameters of slashing module - */ - useCosmosSlashingV1beta1Params: _CosmosSlashingV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.slashing.v1beta1.useSigningInfo - * SigningInfo queries the signing info of given cons address - */ - useSigningInfo: _CosmosSlashingV1beta1Queryrpc.createRpcQueryHooks(rpc).useSigningInfo, - /** - * cosmos.slashing.v1beta1.useSigningInfos - * SigningInfos queries signing info of all validators - */ - useSigningInfos: _CosmosSlashingV1beta1Queryrpc.createRpcQueryHooks(rpc).useSigningInfos, - /** - * cosmos.staking.v1beta1.useValidators - * Validators queries all validators that match the given status. - */ - useValidators: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidators, - /** - * cosmos.staking.v1beta1.useValidator - * Validator queries validator info for given validator address. - */ - useValidator: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidator, - /** - * cosmos.staking.v1beta1.useValidatorDelegations - * ValidatorDelegations queries delegate info for given validator. - */ - useValidatorDelegations: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidatorDelegations, - /** - * cosmos.staking.v1beta1.useValidatorUnbondingDelegations - * ValidatorUnbondingDelegations queries unbonding delegations of a validator. - */ - useValidatorUnbondingDelegations: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useValidatorUnbondingDelegations, - /** - * cosmos.staking.v1beta1.useDelegation - * Delegation queries delegate info for given validator delegator pair. - */ - useDelegation: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegation, - /** - * cosmos.staking.v1beta1.useUnbondingDelegation - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ - useUnbondingDelegation: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useUnbondingDelegation, - /** - * cosmos.staking.v1beta1.useDelegatorDelegations - * DelegatorDelegations queries all delegations of a given delegator address. - */ - useDelegatorDelegations: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegatorDelegations, - /** - * cosmos.staking.v1beta1.useDelegatorUnbondingDelegations - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ - useDelegatorUnbondingDelegations: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegatorUnbondingDelegations, - /** - * cosmos.staking.v1beta1.useRedelegations - * Redelegations queries redelegations of given address. - */ - useRedelegations: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useRedelegations, - /** - * cosmos.staking.v1beta1.useDelegatorValidators - * DelegatorValidators queries all validators info for given delegator - * address. - */ - useCosmosStakingV1beta1DelegatorValidators: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegatorValidators, - /** - * cosmos.staking.v1beta1.useDelegatorValidator - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ - useDelegatorValidator: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useDelegatorValidator, - /** - * cosmos.staking.v1beta1.useHistoricalInfo - * HistoricalInfo queries the historical info for given height. - */ - useHistoricalInfo: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useHistoricalInfo, - /** - * cosmos.staking.v1beta1.usePool - * Pool queries the pool info. - */ - usePool: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).usePool, - /** - * cosmos.staking.v1beta1.useParams - * Parameters queries the staking parameters. - */ - useCosmosStakingV1beta1Params: _CosmosStakingV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * cosmos.tx.v1beta1.useSimulate - * Simulate simulates executing a transaction for estimating gas usage. - */ - useSimulate: _CosmosTxV1beta1Servicerpc.createRpcQueryHooks(rpc).useSimulate, - /** - * cosmos.tx.v1beta1.useGetTx - * GetTx fetches a tx by hash. - */ - useGetTx: _CosmosTxV1beta1Servicerpc.createRpcQueryHooks(rpc).useGetTx, - /** - * cosmos.tx.v1beta1.useBroadcastTx - * BroadcastTx broadcast transaction. - */ - useBroadcastTx: _CosmosTxV1beta1Servicerpc.createRpcQueryHooks(rpc).useBroadcastTx, - /** - * cosmos.tx.v1beta1.useGetTxsEvent - * GetTxsEvent fetches txs by event. - */ - useGetTxsEvent: _CosmosTxV1beta1Servicerpc.createRpcQueryHooks(rpc).useGetTxsEvent, - /** - * cosmos.tx.v1beta1.useGetBlockWithTxs - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - useGetBlockWithTxs: _CosmosTxV1beta1Servicerpc.createRpcQueryHooks(rpc).useGetBlockWithTxs, - /** - * cosmos.upgrade.v1beta1.useCurrentPlan - * CurrentPlan queries the current upgrade plan. - */ - useCurrentPlan: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryHooks(rpc).useCurrentPlan, - /** - * cosmos.upgrade.v1beta1.useAppliedPlan - * AppliedPlan queries a previously applied upgrade plan by its name. - */ - useAppliedPlan: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryHooks(rpc).useAppliedPlan, - /** - * cosmos.upgrade.v1beta1.useUpgradedConsensusState - * UpgradedConsensusState queries the consensus state that will serve - * as a trusted kernel for the next version of this chain. It will only be - * stored at the last height of this chain. - * UpgradedConsensusState RPC not supported with legacy querier - * This rpc is deprecated now that IBC has its own replacement - * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - */ - useUpgradedConsensusState: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryHooks(rpc).useUpgradedConsensusState, - /** - * cosmos.upgrade.v1beta1.useModuleVersions - * ModuleVersions queries the list of module versions from state. - * - * Since: cosmos-sdk 0.43 - */ - useModuleVersions: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryHooks(rpc).useModuleVersions, - /** - * cosmos.upgrade.v1beta1.useAuthority - * Returns the account with authority to conduct upgrades - */ - useAuthority: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryHooks(rpc).useAuthority, - /** - * cosmwasm.wasm.v1.useContractInfo - * ContractInfo gets the contract meta data - */ - useContractInfo: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useContractInfo, - /** - * cosmwasm.wasm.v1.useContractHistory - * ContractHistory gets the contract code history - */ - useContractHistory: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useContractHistory, - /** - * cosmwasm.wasm.v1.useContractsByCode - * ContractsByCode lists all smart contracts for a code id - */ - useContractsByCode: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useContractsByCode, - /** - * cosmwasm.wasm.v1.useAllContractState - * AllContractState gets all raw store data for a single contract - */ - useAllContractState: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useAllContractState, - /** - * cosmwasm.wasm.v1.useRawContractState - * RawContractState gets single key from the raw store data of a contract - */ - useRawContractState: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useRawContractState, - /** - * cosmwasm.wasm.v1.useSmartContractState - * SmartContractState get smart query result from the contract - */ - useSmartContractState: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useSmartContractState, - /** - * cosmwasm.wasm.v1.useCode - * Code gets the binary code and metadata for a singe wasm code - */ - useCode: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useCode, - /** - * cosmwasm.wasm.v1.useCodes - * Codes gets the metadata for all stored wasm codes - */ - useCodes: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).useCodes, - /** - * cosmwasm.wasm.v1.usePinnedCodes - * PinnedCodes gets the pinned code ids - */ - usePinnedCodes: _CosmwasmWasmV1Queryrpc.createRpcQueryHooks(rpc).usePinnedCodes, - /** - * ibc.applications.transfer.v1.useDenomTrace - * DenomTrace queries a denomination trace information. - */ - useDenomTrace: _IbcApplicationsTransferV1Queryrpc.createRpcQueryHooks(rpc).useDenomTrace, - /** - * ibc.applications.transfer.v1.useDenomTraces - * DenomTraces queries all denomination traces. - */ - useDenomTraces: _IbcApplicationsTransferV1Queryrpc.createRpcQueryHooks(rpc).useDenomTraces, - /** - * ibc.applications.transfer.v1.useParams - * Params queries all parameters of the ibc-transfer module. - */ - useIbcApplicationsTransferV1Params: _IbcApplicationsTransferV1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * ibc.core.channel.v1.useChannel - * Channel queries an IBC Channel. - */ - useChannel: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useChannel, - /** - * ibc.core.channel.v1.useChannels - * Channels queries all the IBC channels of a chain. - */ - useChannels: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useChannels, - /** - * ibc.core.channel.v1.useConnectionChannels - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - useConnectionChannels: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useConnectionChannels, - /** - * ibc.core.channel.v1.useChannelClientState - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - useChannelClientState: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useChannelClientState, - /** - * ibc.core.channel.v1.useChannelConsensusState - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - useChannelConsensusState: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useChannelConsensusState, - /** - * ibc.core.channel.v1.usePacketCommitment - * PacketCommitment queries a stored packet commitment hash. - */ - usePacketCommitment: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).usePacketCommitment, - /** - * ibc.core.channel.v1.usePacketCommitments - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - usePacketCommitments: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).usePacketCommitments, - /** - * ibc.core.channel.v1.usePacketReceipt - * PacketReceipt queries if a given packet sequence has been received on the - * queried chain - */ - usePacketReceipt: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).usePacketReceipt, - /** - * ibc.core.channel.v1.usePacketAcknowledgement - * PacketAcknowledgement queries a stored packet acknowledgement hash. - */ - usePacketAcknowledgement: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).usePacketAcknowledgement, - /** - * ibc.core.channel.v1.usePacketAcknowledgements - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - usePacketAcknowledgements: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).usePacketAcknowledgements, - /** - * ibc.core.channel.v1.useUnreceivedPackets - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - useUnreceivedPackets: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useUnreceivedPackets, - /** - * ibc.core.channel.v1.useUnreceivedAcks - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated - * with a channel and sequences. - */ - useUnreceivedAcks: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useUnreceivedAcks, - /** - * ibc.core.channel.v1.useNextSequenceReceive - * NextSequenceReceive returns the next receive sequence for a given channel. - */ - useNextSequenceReceive: _IbcCoreChannelV1Queryrpc.createRpcQueryHooks(rpc).useNextSequenceReceive, - /** - * ibc.core.client.v1.useClientState - * ClientState queries an IBC light client. - */ - useClientState: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useClientState, - /** - * ibc.core.client.v1.useClientStates - * ClientStates queries all the IBC light clients of a chain. - */ - useClientStates: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useClientStates, - /** - * ibc.core.client.v1.useConsensusState - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - useConsensusState: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useConsensusState, - /** - * ibc.core.client.v1.useConsensusStates - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - useConsensusStates: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useConsensusStates, - /** - * ibc.core.client.v1.useClientStatus - * Status queries the status of an IBC client. - */ - useClientStatus: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useClientStatus, - /** - * ibc.core.client.v1.useClientParams - * ClientParams queries all parameters of the ibc client. - */ - useClientParams: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useClientParams, - /** - * ibc.core.client.v1.useUpgradedClientState - * UpgradedClientState queries an Upgraded IBC light client. - */ - useUpgradedClientState: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useUpgradedClientState, - /** - * ibc.core.client.v1.useUpgradedConsensusState - * UpgradedConsensusState queries an Upgraded IBC consensus state. - */ - useIbcCoreClientV1UpgradedConsensusState: _IbcCoreClientV1Queryrpc.createRpcQueryHooks(rpc).useUpgradedConsensusState, - /** - * ibc.core.connection.v1.useConnection - * Connection queries an IBC connection end. - */ - useConnection: _IbcCoreConnectionV1Queryrpc.createRpcQueryHooks(rpc).useConnection, - /** - * ibc.core.connection.v1.useConnections - * Connections queries all the IBC connections of a chain. - */ - useConnections: _IbcCoreConnectionV1Queryrpc.createRpcQueryHooks(rpc).useConnections, - /** - * ibc.core.connection.v1.useClientConnections - * ClientConnections queries the connection paths associated with a client - * state. - */ - useClientConnections: _IbcCoreConnectionV1Queryrpc.createRpcQueryHooks(rpc).useClientConnections, - /** - * ibc.core.connection.v1.useConnectionClientState - * ConnectionClientState queries the client state associated with the - * connection. - */ - useConnectionClientState: _IbcCoreConnectionV1Queryrpc.createRpcQueryHooks(rpc).useConnectionClientState, - /** - * ibc.core.connection.v1.useConnectionConsensusState - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - useConnectionConsensusState: _IbcCoreConnectionV1Queryrpc.createRpcQueryHooks(rpc).useConnectionConsensusState, - /** - * ibc.core.port.v1.useAppVersion - * AppVersion queries an IBC Port and determines the appropriate application version to be used - */ - useAppVersion: _IbcCorePortV1Queryrpc.createRpcQueryHooks(rpc).useAppVersion, - /** - * osmosis.claim.v1beta1.useModuleAccountBalance - * ModuleAccountBalance - */ - useModuleAccountBalance: _OsmosisClaimV1beta1Queryrpc.createRpcQueryHooks(rpc).useModuleAccountBalance, - /** - * osmosis.claim.v1beta1.useParams - * Params - */ - useOsmosisClaimV1beta1Params: _OsmosisClaimV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.claim.v1beta1.useClaimRecord - * ClaimRecord - */ - useClaimRecord: _OsmosisClaimV1beta1Queryrpc.createRpcQueryHooks(rpc).useClaimRecord, - /** - * osmosis.claim.v1beta1.useClaimableForAction - * ClaimableForAction - */ - useClaimableForAction: _OsmosisClaimV1beta1Queryrpc.createRpcQueryHooks(rpc).useClaimableForAction, - /** - * osmosis.claim.v1beta1.useTotalClaimable - * TotalClaimable - */ - useTotalClaimable: _OsmosisClaimV1beta1Queryrpc.createRpcQueryHooks(rpc).useTotalClaimable, - /** - * osmosis.epochs.v1beta1.useEpochInfos - * EpochInfos provide running epochInfos - */ - useEpochInfos: _OsmosisEpochsQueryrpc.createRpcQueryHooks(rpc).useEpochInfos, - /** - * osmosis.epochs.v1beta1.useCurrentEpoch - * CurrentEpoch provide current epoch of specified identifier - */ - useCurrentEpoch: _OsmosisEpochsQueryrpc.createRpcQueryHooks(rpc).useCurrentEpoch, - /** - * osmosis.gamm.v1beta1.usePools - * Pools - */ - usePools: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).usePools, - /** - * osmosis.gamm.v1beta1.useNumPools - * NumPools - */ - useNumPools: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useNumPools, - /** - * osmosis.gamm.v1beta1.useTotalLiquidity - * TotalLiquidity - */ - useTotalLiquidity: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useTotalLiquidity, - /** - * osmosis.gamm.v1beta1.usePoolsWithFilter - * PoolsWithFilter allows you to query specific pools with requested - * parameters - */ - usePoolsWithFilter: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).usePoolsWithFilter, - /** - * osmosis.gamm.v1beta1.usePool - * Per Pool gRPC Endpoints - */ - useOsmosisGammV1beta1Pool: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).usePool, - /** - * osmosis.gamm.v1beta1.usePoolType - * PoolType returns the type of the pool. - * Returns "Balancer" as a string literal when the pool is a balancer pool. - * Errors if the pool is failed to be type caseted. - */ - usePoolType: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).usePoolType, - /** - * osmosis.gamm.v1beta1.useCalcJoinPoolNoSwapShares - * Simulates joining pool without a swap. Returns the amount of shares you'd - * get and tokens needed to provide - */ - useCalcJoinPoolNoSwapShares: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useCalcJoinPoolNoSwapShares, - /** - * osmosis.gamm.v1beta1.useCalcJoinPoolShares - * CalcJoinPoolShares - */ - useCalcJoinPoolShares: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useCalcJoinPoolShares, - /** - * osmosis.gamm.v1beta1.useCalcExitPoolCoinsFromShares - * CalcExitPoolCoinsFromShares - */ - useCalcExitPoolCoinsFromShares: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useCalcExitPoolCoinsFromShares, - /** - * osmosis.gamm.v1beta1.usePoolParams - * PoolParams - */ - usePoolParams: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).usePoolParams, - /** - * osmosis.gamm.v1beta1.useTotalPoolLiquidity - * TotalPoolLiquidity - */ - useTotalPoolLiquidity: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useTotalPoolLiquidity, - /** - * osmosis.gamm.v1beta1.useTotalShares - * TotalShares - */ - useTotalShares: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useTotalShares, - /** - * osmosis.gamm.v1beta1.useSpotPrice - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - useSpotPrice: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useSpotPrice, - /** - * osmosis.gamm.v1beta1.useEstimateSwapExactAmountIn - * Estimate the swap. - */ - useEstimateSwapExactAmountIn: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useEstimateSwapExactAmountIn, - /** - * osmosis.gamm.v1beta1.useEstimateSwapExactAmountOut - * EstimateSwapExactAmountOut - */ - useEstimateSwapExactAmountOut: _OsmosisGammV1beta1Queryrpc.createRpcQueryHooks(rpc).useEstimateSwapExactAmountOut, - /** - * osmosis.gamm.v2.useSpotPrice - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - useOsmosisGammV2SpotPrice: _OsmosisGammV2Queryrpc.createRpcQueryHooks(rpc).useSpotPrice, - /** - * osmosis.ibcratelimit.v1beta1.useParams - * Params defines a gRPC query method that returns the ibc-rate-limit module's - * parameters. - */ - useOsmosisIbcratelimitV1beta1Params: _OsmosisIbcratelimitV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.incentives.useModuleToDistributeCoins - * ModuleToDistributeCoins returns coins that are going to be distributed - */ - useModuleToDistributeCoins: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useModuleToDistributeCoins, - /** - * osmosis.incentives.useGaugeByID - * GaugeByID returns gauges by their respective ID - */ - useGaugeByID: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useGaugeByID, - /** - * osmosis.incentives.useGauges - * Gauges returns both upcoming and active gauges - */ - useGauges: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useGauges, - /** - * osmosis.incentives.useActiveGauges - * ActiveGauges returns active gauges - */ - useActiveGauges: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useActiveGauges, - /** - * osmosis.incentives.useActiveGaugesPerDenom - * ActiveGaugesPerDenom returns active gauges by denom - */ - useActiveGaugesPerDenom: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useActiveGaugesPerDenom, - /** - * osmosis.incentives.useUpcomingGauges - * Returns scheduled gauges that have not yet occured - */ - useUpcomingGauges: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useUpcomingGauges, - /** - * osmosis.incentives.useUpcomingGaugesPerDenom - * UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured - * by denom - */ - useUpcomingGaugesPerDenom: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useUpcomingGaugesPerDenom, - /** - * osmosis.incentives.useRewardsEst - * RewardsEst returns an estimate of the rewards from now until a specified - * time in the future The querier either provides an address or a set of locks - * for which they want to find the associated rewards - */ - useRewardsEst: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useRewardsEst, - /** - * osmosis.incentives.useLockableDurations - * LockableDurations returns lockable durations that are valid to distribute - * incentives for - */ - useLockableDurations: _OsmosisIncentivesQueryrpc.createRpcQueryHooks(rpc).useLockableDurations, - /** - * osmosis.lockup.useModuleBalance - * Return full balance of the module - */ - useModuleBalance: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useModuleBalance, - /** - * osmosis.lockup.useModuleLockedAmount - * Return locked balance of the module - */ - useModuleLockedAmount: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useModuleLockedAmount, - /** - * osmosis.lockup.useAccountUnlockableCoins - * Returns unlockable coins which are not withdrawn yet - */ - useAccountUnlockableCoins: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountUnlockableCoins, - /** - * osmosis.lockup.useAccountUnlockingCoins - * Returns unlocking coins - */ - useAccountUnlockingCoins: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountUnlockingCoins, - /** - * osmosis.lockup.useAccountLockedCoins - * Return a locked coins that can't be withdrawn - */ - useAccountLockedCoins: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedCoins, - /** - * osmosis.lockup.useAccountLockedPastTime - * Returns locked records of an account with unlock time beyond timestamp - */ - useAccountLockedPastTime: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedPastTime, - /** - * osmosis.lockup.useAccountLockedPastTimeNotUnlockingOnly - * Returns locked records of an account with unlock time beyond timestamp - * excluding tokens started unlocking - */ - useAccountLockedPastTimeNotUnlockingOnly: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedPastTimeNotUnlockingOnly, - /** - * osmosis.lockup.useAccountUnlockedBeforeTime - * Returns unlocked records with unlock time before timestamp - */ - useAccountUnlockedBeforeTime: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountUnlockedBeforeTime, - /** - * osmosis.lockup.useAccountLockedPastTimeDenom - * Returns lock records by address, timestamp, denom - */ - useAccountLockedPastTimeDenom: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedPastTimeDenom, - /** - * osmosis.lockup.useLockedDenom - * Returns total locked per denom with longer past given time - */ - useLockedDenom: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useLockedDenom, - /** - * osmosis.lockup.useLockedByID - * Returns lock record by id - */ - useLockedByID: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useLockedByID, - /** - * osmosis.lockup.useSyntheticLockupsByLockupID - * Returns synthetic lockups by native lockup id - */ - useSyntheticLockupsByLockupID: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useSyntheticLockupsByLockupID, - /** - * osmosis.lockup.useAccountLockedLongerDuration - * Returns account locked records with longer duration - */ - useAccountLockedLongerDuration: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedLongerDuration, - /** - * osmosis.lockup.useAccountLockedDuration - * Returns account locked records with a specific duration - */ - useAccountLockedDuration: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedDuration, - /** - * osmosis.lockup.useAccountLockedLongerDurationNotUnlockingOnly - * Returns account locked records with longer duration excluding tokens - * started unlocking - */ - useAccountLockedLongerDurationNotUnlockingOnly: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedLongerDurationNotUnlockingOnly, - /** - * osmosis.lockup.useAccountLockedLongerDurationDenom - * Returns account's locked records for a denom with longer duration - */ - useAccountLockedLongerDurationDenom: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useAccountLockedLongerDurationDenom, - /** - * osmosis.lockup.useParams - * Params returns lockup params. - */ - useOsmosisLockupParams: _OsmosisLockupQueryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.mint.v1beta1.useParams - * Params returns the total set of minting parameters. - */ - useOsmosisMintV1beta1Params: _OsmosisMintV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.mint.v1beta1.useEpochProvisions - * EpochProvisions returns the current minting epoch provisions value. - */ - useEpochProvisions: _OsmosisMintV1beta1Queryrpc.createRpcQueryHooks(rpc).useEpochProvisions, - /** - * osmosis.poolincentives.v1beta1.useGaugeIds - * GaugeIds takes the pool id and returns the matching gauge ids and durations - */ - useGaugeIds: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc).useGaugeIds, - /** - * osmosis.poolincentives.v1beta1.useDistrInfo - * DistrInfo returns the pool's matching gauge ids and weights. - */ - useDistrInfo: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc).useDistrInfo, - /** - * osmosis.poolincentives.v1beta1.useParams - * Params returns pool incentives params. - */ - useOsmosisPoolincentivesV1beta1Params: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.poolincentives.v1beta1.useLockableDurations - * LockableDurations returns lock durations for pools. - */ - useOsmosisPoolincentivesV1beta1LockableDurations: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc).useLockableDurations, - /** - * osmosis.poolincentives.v1beta1.useIncentivizedPools - * IncentivizedPools returns currently incentivized pools - */ - useIncentivizedPools: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc).useIncentivizedPools, - /** - * osmosis.poolincentives.v1beta1.useExternalIncentiveGauges - * ExternalIncentiveGauges returns external incentive gauges. - */ - useExternalIncentiveGauges: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryHooks(rpc).useExternalIncentiveGauges, - /** - * osmosis.superfluid.useParams - * Params returns the total set of superfluid parameters. - */ - useOsmosisSuperfluidParams: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.superfluid.useAssetType - * Returns superfluid asset type, whether if it's a native asset or an lp - * share. - */ - useAssetType: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useAssetType, - /** - * osmosis.superfluid.useAllAssets - * Returns all registered superfluid assets. - */ - useAllAssets: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useAllAssets, - /** - * osmosis.superfluid.useAssetMultiplier - * Returns the osmo equivalent multiplier used in the most recent epoch. - */ - useAssetMultiplier: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useAssetMultiplier, - /** - * osmosis.superfluid.useAllIntermediaryAccounts - * Returns all superfluid intermediary accounts. - */ - useAllIntermediaryAccounts: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useAllIntermediaryAccounts, - /** - * osmosis.superfluid.useConnectedIntermediaryAccount - * Returns intermediary account connected to a superfluid staked lock by id - */ - useConnectedIntermediaryAccount: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useConnectedIntermediaryAccount, - /** - * osmosis.superfluid.useTotalDelegationByValidatorForDenom - * Returns the amount of delegations of specific denom for all validators - */ - useTotalDelegationByValidatorForDenom: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useTotalDelegationByValidatorForDenom, - /** - * osmosis.superfluid.useTotalSuperfluidDelegations - * Returns the total amount of osmo superfluidly staked. - * Response is denominated in uosmo. - */ - useTotalSuperfluidDelegations: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useTotalSuperfluidDelegations, - /** - * osmosis.superfluid.useSuperfluidDelegationAmount - * Returns the coins superfluid delegated for the delegator, validator, denom - * triplet - */ - useSuperfluidDelegationAmount: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useSuperfluidDelegationAmount, - /** - * osmosis.superfluid.useSuperfluidDelegationsByDelegator - * Returns all the delegated superfluid poistions for a specific delegator. - */ - useSuperfluidDelegationsByDelegator: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useSuperfluidDelegationsByDelegator, - /** - * osmosis.superfluid.useSuperfluidUndelegationsByDelegator - * Returns all the undelegating superfluid poistions for a specific delegator. - */ - useSuperfluidUndelegationsByDelegator: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useSuperfluidUndelegationsByDelegator, - /** - * osmosis.superfluid.useSuperfluidDelegationsByValidatorDenom - * Returns all the superfluid positions of a specific denom delegated to one - * validator - */ - useSuperfluidDelegationsByValidatorDenom: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useSuperfluidDelegationsByValidatorDenom, - /** - * osmosis.superfluid.useEstimateSuperfluidDelegatedAmountByValidatorDenom - * Returns the amount of a specific denom delegated to a specific validator - * This is labeled an estimate, because the way it calculates the amount can - * lead rounding errors from the true delegated amount - */ - useEstimateSuperfluidDelegatedAmountByValidatorDenom: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useEstimateSuperfluidDelegatedAmountByValidatorDenom, - /** - * osmosis.superfluid.useTotalDelegationByDelegator - * Returns the specified delegations for a specific delegator - */ - useTotalDelegationByDelegator: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useTotalDelegationByDelegator, - /** - * osmosis.superfluid.useUnpoolWhitelist - * Returns a list of whitelisted pool ids to unpool. - */ - useUnpoolWhitelist: _OsmosisSuperfluidQueryrpc.createRpcQueryHooks(rpc).useUnpoolWhitelist, - /** - * osmosis.tokenfactory.v1beta1.useParams - * Params defines a gRPC query method that returns the tokenfactory module's - * parameters. - */ - useOsmosisTokenfactoryV1beta1Params: _OsmosisTokenfactoryV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.tokenfactory.v1beta1.useDenomAuthorityMetadata - * DenomAuthorityMetadata defines a gRPC query method for fetching - * DenomAuthorityMetadata for a particular denom. - */ - useDenomAuthorityMetadata: _OsmosisTokenfactoryV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomAuthorityMetadata, - /** - * osmosis.tokenfactory.v1beta1.useDenomsFromCreator - * DenomsFromCreator defines a gRPC query method for fetching all - * denominations created by a specific admin/creator. - */ - useDenomsFromCreator: _OsmosisTokenfactoryV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomsFromCreator, - /** - * osmosis.twap.v1beta1.useParams - * Params - */ - useOsmosisTwapV1beta1Params: _OsmosisTwapV1beta1Queryrpc.createRpcQueryHooks(rpc).useParams, - /** - * osmosis.twap.v1beta1.useArithmeticTwap - * ArithmeticTwap - */ - useArithmeticTwap: _OsmosisTwapV1beta1Queryrpc.createRpcQueryHooks(rpc).useArithmeticTwap, - /** - * osmosis.twap.v1beta1.useArithmeticTwapToNow - * ArithmeticTwapToNow - */ - useArithmeticTwapToNow: _OsmosisTwapV1beta1Queryrpc.createRpcQueryHooks(rpc).useArithmeticTwapToNow, - /** - * osmosis.txfees.v1beta1.useFeeTokens - * FeeTokens returns a list of all the whitelisted fee tokens and their - * corresponding pools. It does not include the BaseDenom, which has its own - * query endpoint - */ - useFeeTokens: _OsmosisTxfeesV1beta1Queryrpc.createRpcQueryHooks(rpc).useFeeTokens, - /** - * osmosis.txfees.v1beta1.useDenomSpotPrice - * DenomSpotPrice returns all spot prices by each registered token denom. - */ - useDenomSpotPrice: _OsmosisTxfeesV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomSpotPrice, - /** - * osmosis.txfees.v1beta1.useDenomPoolId - * Returns the poolID for a specified denom input. - */ - useDenomPoolId: _OsmosisTxfeesV1beta1Queryrpc.createRpcQueryHooks(rpc).useDenomPoolId, - /** - * osmosis.txfees.v1beta1.useBaseDenom - * Returns a list of all base denom tokens and their corresponding pools. - */ - useBaseDenom: _OsmosisTxfeesV1beta1Queryrpc.createRpcQueryHooks(rpc).useBaseDenom - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/genesis.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/genesis.ts deleted file mode 100644 index 97113dfe..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/genesis.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { DenomTrace, DenomTraceAmino, DenomTraceSDKType, Params, ParamsAmino, ParamsSDKType } from "./transfer"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisState { - portId: string; - denomTraces: DenomTrace[]; - params: Params | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisStateAmino { - port_id: string; - denom_traces: DenomTraceAmino[]; - params?: ParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the ibc-transfer genesis state */ -export interface GenesisStateSDKType { - port_id: string; - denom_traces: DenomTraceSDKType[]; - params: ParamsSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - portId: "", - denomTraces: [], - params: Params.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/ibc.applications.transfer.v1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - for (const v of message.denomTraces) { - DenomTrace.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - denomTraces: Array.isArray(object?.denomTraces) ? object.denomTraces.map((e: any) => DenomTrace.fromJSON(e)) : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map(e => e ? DenomTrace.toJSON(e) : undefined); - } else { - obj.denomTraces = []; - } - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.portId = object.portId ?? ""; - message.denomTraces = object.denomTraces?.map(e => DenomTrace.fromPartial(e)) || []; - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - portId: object?.port_id, - denomTraces: Array.isArray(object?.denom_traces) ? object.denom_traces.map((e: any) => DenomTrace.fromSDK(e)) : [], - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.port_id = message.portId; - if (message.denomTraces) { - obj.denom_traces = message.denomTraces.map(e => e ? DenomTrace.toSDK(e) : undefined); - } else { - obj.denom_traces = []; - } - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - portId: object.port_id, - denomTraces: Array.isArray(object?.denom_traces) ? object.denom_traces.map((e: any) => DenomTrace.fromAmino(e)) : [], - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.port_id = message.portId; - if (message.denomTraces) { - obj.denom_traces = message.denomTraces.map(e => e ? DenomTrace.toAmino(e) : undefined); - } else { - obj.denom_traces = []; - } - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/query.rpc.Query.ts deleted file mode 100644 index 8bf06c6f..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/query.rpc.Query.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../../mobx"; -import { QueryDenomTraceRequest, QueryDenomTraceResponse, QueryDenomTracesRequest, QueryDenomTracesResponse, QueryParamsRequest, QueryParamsResponse } from "./query"; -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** DenomTrace queries a denomination trace information. */ - denomTrace(request: QueryDenomTraceRequest): Promise; - /** DenomTraces queries all denomination traces. */ - denomTraces(request?: QueryDenomTracesRequest): Promise; - /** Params queries all parameters of the ibc-transfer module. */ - params(request?: QueryParamsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.denomTrace = this.denomTrace.bind(this); - this.denomTraces = this.denomTraces.bind(this); - this.params = this.params.bind(this); - } - denomTrace(request: QueryDenomTraceRequest): Promise { - const data = QueryDenomTraceRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomTrace", data); - return promise.then(data => QueryDenomTraceResponse.decode(new BinaryReader(data))); - } - denomTraces(request: QueryDenomTracesRequest = { - pagination: undefined - }): Promise { - const data = QueryDenomTracesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomTraces", data); - return promise.then(data => QueryDenomTracesResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - denomTrace(request: QueryDenomTraceRequest): Promise { - return queryService.denomTrace(request); - }, - denomTraces(request?: QueryDenomTracesRequest): Promise { - return queryService.denomTraces(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - } - }; -}; -export interface UseDenomTraceQuery extends ReactQueryParams { - request: QueryDenomTraceRequest; -} -export interface UseDenomTracesQuery extends ReactQueryParams { - request?: QueryDenomTracesRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useDenomTrace = ({ - request, - options - }: UseDenomTraceQuery) => { - return useQuery(["denomTraceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomTrace(request); - }, options); - }; - const useDenomTraces = ({ - request, - options - }: UseDenomTracesQuery) => { - return useQuery(["denomTracesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomTraces(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - return { - /** DenomTrace queries a denomination trace information. */useDenomTrace, - /** DenomTraces queries all denomination traces. */useDenomTraces, - /** Params queries all parameters of the ibc-transfer module. */useParams - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryDenomTraceStore { - store = new QueryStore(queryService?.denomTrace); - denomTrace(request: QueryDenomTraceRequest) { - return this.store.getData(request); - } - } - class QueryDenomTracesStore { - store = new QueryStore(queryService?.denomTraces); - denomTraces(request: QueryDenomTracesRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - return { - /** DenomTrace queries a denomination trace information. */QueryDenomTraceStore, - /** DenomTraces queries all denomination traces. */QueryDenomTracesStore, - /** Params queries all parameters of the ibc-transfer module. */QueryParamsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/query.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/query.ts deleted file mode 100644 index d667b42a..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/query.ts +++ /dev/null @@ -1,705 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { DenomTrace, DenomTraceAmino, DenomTraceSDKType, Params, ParamsAmino, ParamsSDKType } from "./transfer"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequest { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} -export interface QueryDenomTraceRequestProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTraceRequest"; - value: Uint8Array; -} -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequestAmino { - /** hash (in hex format) of the denomination trace information. */ - hash: string; -} -export interface QueryDenomTraceRequestAminoMsg { - type: "cosmos-sdk/QueryDenomTraceRequest"; - value: QueryDenomTraceRequestAmino; -} -/** - * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC - * method - */ -export interface QueryDenomTraceRequestSDKType { - hash: string; -} -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponse { - /** denom_trace returns the requested denomination trace information. */ - denomTrace: DenomTrace | undefined; -} -export interface QueryDenomTraceResponseProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTraceResponse"; - value: Uint8Array; -} -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponseAmino { - /** denom_trace returns the requested denomination trace information. */ - denom_trace?: DenomTraceAmino | undefined; -} -export interface QueryDenomTraceResponseAminoMsg { - type: "cosmos-sdk/QueryDenomTraceResponse"; - value: QueryDenomTraceResponseAmino; -} -/** - * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - * method. - */ -export interface QueryDenomTraceResponseSDKType { - denom_trace: DenomTraceSDKType | undefined; -} -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryDenomTracesRequestProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTracesRequest"; - value: Uint8Array; -} -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryDenomTracesRequestAminoMsg { - type: "cosmos-sdk/QueryDenomTracesRequest"; - value: QueryDenomTracesRequestAmino; -} -/** - * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC - * method - */ -export interface QueryDenomTracesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponse { - /** denom_traces returns all denominations trace information. */ - denomTraces: DenomTrace[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryDenomTracesResponseProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTracesResponse"; - value: Uint8Array; -} -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponseAmino { - /** denom_traces returns all denominations trace information. */ - denom_traces: DenomTraceAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryDenomTracesResponseAminoMsg { - type: "cosmos-sdk/QueryDenomTracesResponse"; - value: QueryDenomTracesResponseAmino; -} -/** - * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC - * method. - */ -export interface QueryDenomTracesResponseSDKType { - denom_traces: DenomTraceSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "cosmos-sdk/QueryParamsRequest"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "cosmos-sdk/QueryParamsResponse"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -function createBaseQueryDenomTraceRequest(): QueryDenomTraceRequest { - return { - hash: "" - }; -} -export const QueryDenomTraceRequest = { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTraceRequest", - aminoType: "cosmos-sdk/QueryDenomTraceRequest", - encode(message: QueryDenomTraceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash !== "") { - writer.uint32(10).string(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomTraceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomTraceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomTraceRequest { - return { - hash: isSet(object.hash) ? String(object.hash) : "" - }; - }, - toJSON(message: QueryDenomTraceRequest): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = message.hash); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomTraceRequest { - const message = createBaseQueryDenomTraceRequest(); - message.hash = object.hash ?? ""; - return message; - }, - fromSDK(object: QueryDenomTraceRequestSDKType): QueryDenomTraceRequest { - return { - hash: object?.hash - }; - }, - toSDK(message: QueryDenomTraceRequest): QueryDenomTraceRequestSDKType { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAmino(object: QueryDenomTraceRequestAmino): QueryDenomTraceRequest { - return { - hash: object.hash - }; - }, - toAmino(message: QueryDenomTraceRequest): QueryDenomTraceRequestAmino { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: QueryDenomTraceRequestAminoMsg): QueryDenomTraceRequest { - return QueryDenomTraceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomTraceRequest): QueryDenomTraceRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDenomTraceRequest", - value: QueryDenomTraceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomTraceRequestProtoMsg): QueryDenomTraceRequest { - return QueryDenomTraceRequest.decode(message.value); - }, - toProto(message: QueryDenomTraceRequest): Uint8Array { - return QueryDenomTraceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomTraceRequest): QueryDenomTraceRequestProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTraceRequest", - value: QueryDenomTraceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomTraceResponse(): QueryDenomTraceResponse { - return { - denomTrace: DenomTrace.fromPartial({}) - }; -} -export const QueryDenomTraceResponse = { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTraceResponse", - aminoType: "cosmos-sdk/QueryDenomTraceResponse", - encode(message: QueryDenomTraceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denomTrace !== undefined) { - DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomTraceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomTraceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTrace = DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomTraceResponse { - return { - denomTrace: isSet(object.denomTrace) ? DenomTrace.fromJSON(object.denomTrace) : undefined - }; - }, - toJSON(message: QueryDenomTraceResponse): unknown { - const obj: any = {}; - message.denomTrace !== undefined && (obj.denomTrace = message.denomTrace ? DenomTrace.toJSON(message.denomTrace) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomTraceResponse { - const message = createBaseQueryDenomTraceResponse(); - message.denomTrace = object.denomTrace !== undefined && object.denomTrace !== null ? DenomTrace.fromPartial(object.denomTrace) : undefined; - return message; - }, - fromSDK(object: QueryDenomTraceResponseSDKType): QueryDenomTraceResponse { - return { - denomTrace: object.denom_trace ? DenomTrace.fromSDK(object.denom_trace) : undefined - }; - }, - toSDK(message: QueryDenomTraceResponse): QueryDenomTraceResponseSDKType { - const obj: any = {}; - message.denomTrace !== undefined && (obj.denom_trace = message.denomTrace ? DenomTrace.toSDK(message.denomTrace) : undefined); - return obj; - }, - fromAmino(object: QueryDenomTraceResponseAmino): QueryDenomTraceResponse { - return { - denomTrace: object?.denom_trace ? DenomTrace.fromAmino(object.denom_trace) : undefined - }; - }, - toAmino(message: QueryDenomTraceResponse): QueryDenomTraceResponseAmino { - const obj: any = {}; - obj.denom_trace = message.denomTrace ? DenomTrace.toAmino(message.denomTrace) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomTraceResponseAminoMsg): QueryDenomTraceResponse { - return QueryDenomTraceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomTraceResponse): QueryDenomTraceResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDenomTraceResponse", - value: QueryDenomTraceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomTraceResponseProtoMsg): QueryDenomTraceResponse { - return QueryDenomTraceResponse.decode(message.value); - }, - toProto(message: QueryDenomTraceResponse): Uint8Array { - return QueryDenomTraceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomTraceResponse): QueryDenomTraceResponseProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTraceResponse", - value: QueryDenomTraceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomTracesRequest(): QueryDenomTracesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryDenomTracesRequest = { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTracesRequest", - aminoType: "cosmos-sdk/QueryDenomTracesRequest", - encode(message: QueryDenomTracesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomTracesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomTracesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomTracesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDenomTracesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomTracesRequest { - const message = createBaseQueryDenomTracesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDenomTracesRequestSDKType): QueryDenomTracesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDenomTracesRequest): QueryDenomTracesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDenomTracesRequestAmino): QueryDenomTracesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDenomTracesRequest): QueryDenomTracesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomTracesRequestAminoMsg): QueryDenomTracesRequest { - return QueryDenomTracesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomTracesRequest): QueryDenomTracesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryDenomTracesRequest", - value: QueryDenomTracesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomTracesRequestProtoMsg): QueryDenomTracesRequest { - return QueryDenomTracesRequest.decode(message.value); - }, - toProto(message: QueryDenomTracesRequest): Uint8Array { - return QueryDenomTracesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomTracesRequest): QueryDenomTracesRequestProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTracesRequest", - value: QueryDenomTracesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomTracesResponse(): QueryDenomTracesResponse { - return { - denomTraces: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryDenomTracesResponse = { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTracesResponse", - aminoType: "cosmos-sdk/QueryDenomTracesResponse", - encode(message: QueryDenomTracesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.denomTraces) { - DenomTrace.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomTracesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomTracesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomTraces.push(DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomTracesResponse { - return { - denomTraces: Array.isArray(object?.denomTraces) ? object.denomTraces.map((e: any) => DenomTrace.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryDenomTracesResponse): unknown { - const obj: any = {}; - if (message.denomTraces) { - obj.denomTraces = message.denomTraces.map(e => e ? DenomTrace.toJSON(e) : undefined); - } else { - obj.denomTraces = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomTracesResponse { - const message = createBaseQueryDenomTracesResponse(); - message.denomTraces = object.denomTraces?.map(e => DenomTrace.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryDenomTracesResponseSDKType): QueryDenomTracesResponse { - return { - denomTraces: Array.isArray(object?.denom_traces) ? object.denom_traces.map((e: any) => DenomTrace.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryDenomTracesResponse): QueryDenomTracesResponseSDKType { - const obj: any = {}; - if (message.denomTraces) { - obj.denom_traces = message.denomTraces.map(e => e ? DenomTrace.toSDK(e) : undefined); - } else { - obj.denom_traces = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryDenomTracesResponseAmino): QueryDenomTracesResponse { - return { - denomTraces: Array.isArray(object?.denom_traces) ? object.denom_traces.map((e: any) => DenomTrace.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryDenomTracesResponse): QueryDenomTracesResponseAmino { - const obj: any = {}; - if (message.denomTraces) { - obj.denom_traces = message.denomTraces.map(e => e ? DenomTrace.toAmino(e) : undefined); - } else { - obj.denom_traces = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomTracesResponseAminoMsg): QueryDenomTracesResponse { - return QueryDenomTracesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomTracesResponse): QueryDenomTracesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryDenomTracesResponse", - value: QueryDenomTracesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomTracesResponseProtoMsg): QueryDenomTracesResponse { - return QueryDenomTracesResponse.decode(message.value); - }, - toProto(message: QueryDenomTracesResponse): Uint8Array { - return QueryDenomTracesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomTracesResponse): QueryDenomTracesResponseProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.QueryDenomTracesResponse", - value: QueryDenomTracesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/ibc.applications.transfer.v1.QueryParamsRequest", - aminoType: "cosmos-sdk/QueryParamsRequest", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryParamsRequest", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/ibc.applications.transfer.v1.QueryParamsResponse", - aminoType: "cosmos-sdk/QueryParamsResponse", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryParamsResponse", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/transfer.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/transfer.ts deleted file mode 100644 index 6524585f..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/transfer.ts +++ /dev/null @@ -1,302 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTrace { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - baseDenom: string; -} -export interface DenomTraceProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.DenomTrace"; - value: Uint8Array; -} -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTraceAmino { - /** - * path defines the chain of port/channel identifiers used for tracing the - * source of the fungible token. - */ - path: string; - /** base denomination of the relayed fungible token. */ - base_denom: string; -} -export interface DenomTraceAminoMsg { - type: "cosmos-sdk/DenomTrace"; - value: DenomTraceAmino; -} -/** - * DenomTrace contains the base denomination for ICS20 fungible tokens and the - * source tracing information path. - */ -export interface DenomTraceSDKType { - path: string; - base_denom: string; -} -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface Params { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - sendEnabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receiveEnabled: boolean; -} -export interface ParamsProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.Params"; - value: Uint8Array; -} -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface ParamsAmino { - /** - * send_enabled enables or disables all cross-chain token transfers from this - * chain. - */ - send_enabled: boolean; - /** - * receive_enabled enables or disables all cross-chain token transfers to this - * chain. - */ - receive_enabled: boolean; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** - * Params defines the set of IBC transfer parameters. - * NOTE: To prevent a single token from being transferred, set the - * TransfersEnabled parameter to true and then set the bank module's SendEnabled - * parameter for the denomination to false. - */ -export interface ParamsSDKType { - send_enabled: boolean; - receive_enabled: boolean; -} -function createBaseDenomTrace(): DenomTrace { - return { - path: "", - baseDenom: "" - }; -} -export const DenomTrace = { - typeUrl: "/ibc.applications.transfer.v1.DenomTrace", - aminoType: "cosmos-sdk/DenomTrace", - encode(message: DenomTrace, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path); - } - if (message.baseDenom !== "") { - writer.uint32(18).string(message.baseDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DenomTrace { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDenomTrace(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DenomTrace { - return { - path: isSet(object.path) ? String(object.path) : "", - baseDenom: isSet(object.baseDenom) ? String(object.baseDenom) : "" - }; - }, - toJSON(message: DenomTrace): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = message.path); - message.baseDenom !== undefined && (obj.baseDenom = message.baseDenom); - return obj; - }, - fromPartial(object: DeepPartial): DenomTrace { - const message = createBaseDenomTrace(); - message.path = object.path ?? ""; - message.baseDenom = object.baseDenom ?? ""; - return message; - }, - fromSDK(object: DenomTraceSDKType): DenomTrace { - return { - path: object?.path, - baseDenom: object?.base_denom - }; - }, - toSDK(message: DenomTrace): DenomTraceSDKType { - const obj: any = {}; - obj.path = message.path; - obj.base_denom = message.baseDenom; - return obj; - }, - fromAmino(object: DenomTraceAmino): DenomTrace { - return { - path: object.path, - baseDenom: object.base_denom - }; - }, - toAmino(message: DenomTrace): DenomTraceAmino { - const obj: any = {}; - obj.path = message.path; - obj.base_denom = message.baseDenom; - return obj; - }, - fromAminoMsg(object: DenomTraceAminoMsg): DenomTrace { - return DenomTrace.fromAmino(object.value); - }, - toAminoMsg(message: DenomTrace): DenomTraceAminoMsg { - return { - type: "cosmos-sdk/DenomTrace", - value: DenomTrace.toAmino(message) - }; - }, - fromProtoMsg(message: DenomTraceProtoMsg): DenomTrace { - return DenomTrace.decode(message.value); - }, - toProto(message: DenomTrace): Uint8Array { - return DenomTrace.encode(message).finish(); - }, - toProtoMsg(message: DenomTrace): DenomTraceProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.DenomTrace", - value: DenomTrace.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - sendEnabled: false, - receiveEnabled: false - }; -} -export const Params = { - typeUrl: "/ibc.applications.transfer.v1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sendEnabled === true) { - writer.uint32(8).bool(message.sendEnabled); - } - if (message.receiveEnabled === true) { - writer.uint32(16).bool(message.receiveEnabled); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sendEnabled = reader.bool(); - break; - case 2: - message.receiveEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - sendEnabled: isSet(object.sendEnabled) ? Boolean(object.sendEnabled) : false, - receiveEnabled: isSet(object.receiveEnabled) ? Boolean(object.receiveEnabled) : false - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.sendEnabled !== undefined && (obj.sendEnabled = message.sendEnabled); - message.receiveEnabled !== undefined && (obj.receiveEnabled = message.receiveEnabled); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.sendEnabled = object.sendEnabled ?? false; - message.receiveEnabled = object.receiveEnabled ?? false; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - sendEnabled: object?.send_enabled, - receiveEnabled: object?.receive_enabled - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.send_enabled = message.sendEnabled; - obj.receive_enabled = message.receiveEnabled; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - sendEnabled: object.send_enabled, - receiveEnabled: object.receive_enabled - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.send_enabled = message.sendEnabled; - obj.receive_enabled = message.receiveEnabled; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.amino.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.amino.ts deleted file mode 100644 index 65002c1e..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.amino.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MsgTransfer } from "./tx"; -export const AminoConverter = { - "/ibc.applications.transfer.v1.MsgTransfer": { - aminoType: "cosmos-sdk/MsgTransfer", - toAmino: MsgTransfer.toAmino, - fromAmino: MsgTransfer.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.registry.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.registry.ts deleted file mode 100644 index ad4f60ed..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.registry.ts +++ /dev/null @@ -1,51 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgTransfer } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - transfer(value: MsgTransfer) { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: MsgTransfer.encode(value).finish() - }; - } - }, - withTypeUrl: { - transfer(value: MsgTransfer) { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value - }; - } - }, - toJSON: { - transfer(value: MsgTransfer) { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: MsgTransfer.toJSON(value) - }; - } - }, - fromJSON: { - transfer(value: any) { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: MsgTransfer.fromJSON(value) - }; - } - }, - fromPartial: { - transfer(value: MsgTransfer) { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: MsgTransfer.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts deleted file mode 100644 index c4f28579..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { MsgTransfer, MsgTransferResponse } from "./tx"; -/** Msg defines the ibc/transfer Msg service. */ -export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ - transfer(request: MsgTransfer): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.transfer = this.transfer.bind(this); - } - transfer(request: MsgTransfer): Promise { - const data = MsgTransfer.encode(request).finish(); - const promise = this.rpc.request("ibc.applications.transfer.v1.Msg", "Transfer", data); - return promise.then(data => MsgTransferResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.ts deleted file mode 100644 index f65e29f5..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v1/tx.ts +++ /dev/null @@ -1,336 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; -import { Height, HeightAmino, HeightSDKType } from "../../../core/client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransfer { - /** the port on which the packet will be sent */ - sourcePort: string; - /** the channel by which the packet will be sent */ - sourceChannel: string; - /** the tokens to be transferred */ - token: Coin | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: Height | undefined; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: bigint; -} -export interface MsgTransferProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer"; - value: Uint8Array; -} -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransferAmino { - /** the port on which the packet will be sent */ - source_port: string; - /** the channel by which the packet will be sent */ - source_channel: string; - /** the tokens to be transferred */ - token?: CoinAmino | undefined; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeout_height?: HeightAmino | undefined; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeout_timestamp: string; -} -export interface MsgTransferAminoMsg { - type: "cosmos-sdk/MsgTransfer"; - value: MsgTransferAmino; -} -/** - * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between - * ICS20 enabled chains. See ICS Spec here: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface MsgTransferSDKType { - source_port: string; - source_channel: string; - token: CoinSDKType | undefined; - sender: string; - receiver: string; - timeout_height: HeightSDKType | undefined; - timeout_timestamp: bigint; -} -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponse {} -export interface MsgTransferResponseProtoMsg { - typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse"; - value: Uint8Array; -} -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponseAmino {} -export interface MsgTransferResponseAminoMsg { - type: "cosmos-sdk/MsgTransferResponse"; - value: MsgTransferResponseAmino; -} -/** MsgTransferResponse defines the Msg/Transfer response type. */ -export interface MsgTransferResponseSDKType {} -function createBaseMsgTransfer(): MsgTransfer { - return { - sourcePort: "", - sourceChannel: "", - token: Coin.fromPartial({}), - sender: "", - receiver: "", - timeoutHeight: Height.fromPartial({}), - timeoutTimestamp: BigInt(0) - }; -} -export const MsgTransfer = { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - aminoType: "cosmos-sdk/MsgTransfer", - encode(message: MsgTransfer, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sourcePort !== "") { - writer.uint32(10).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(18).string(message.sourceChannel); - } - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(26).fork()).ldelim(); - } - if (message.sender !== "") { - writer.uint32(34).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(42).string(message.receiver); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.timeoutTimestamp !== BigInt(0)) { - writer.uint32(56).uint64(message.timeoutTimestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgTransfer { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTransfer(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sourcePort = reader.string(); - break; - case 2: - message.sourceChannel = reader.string(); - break; - case 3: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeoutTimestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgTransfer { - return { - sourcePort: isSet(object.sourcePort) ? String(object.sourcePort) : "", - sourceChannel: isSet(object.sourceChannel) ? String(object.sourceChannel) : "", - token: isSet(object.token) ? Coin.fromJSON(object.token) : undefined, - sender: isSet(object.sender) ? String(object.sender) : "", - receiver: isSet(object.receiver) ? String(object.receiver) : "", - timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined, - timeoutTimestamp: isSet(object.timeoutTimestamp) ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgTransfer): unknown { - const obj: any = {}; - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && (obj.sourceChannel = message.sourceChannel); - message.token !== undefined && (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - message.timeoutHeight !== undefined && (obj.timeoutHeight = message.timeoutHeight ? Height.toJSON(message.timeoutHeight) : undefined); - message.timeoutTimestamp !== undefined && (obj.timeoutTimestamp = (message.timeoutTimestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgTransfer { - const message = createBaseMsgTransfer(); - message.sourcePort = object.sourcePort ?? ""; - message.sourceChannel = object.sourceChannel ?? ""; - message.token = object.token !== undefined && object.token !== null ? Coin.fromPartial(object.token) : undefined; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; - message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? Height.fromPartial(object.timeoutHeight) : undefined; - message.timeoutTimestamp = object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgTransferSDKType): MsgTransfer { - return { - sourcePort: object?.source_port, - sourceChannel: object?.source_channel, - token: object.token ? Coin.fromSDK(object.token) : undefined, - sender: object?.sender, - receiver: object?.receiver, - timeoutHeight: object.timeout_height ? Height.fromSDK(object.timeout_height) : undefined, - timeoutTimestamp: object?.timeout_timestamp - }; - }, - toSDK(message: MsgTransfer): MsgTransferSDKType { - const obj: any = {}; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; - message.token !== undefined && (obj.token = message.token ? Coin.toSDK(message.token) : undefined); - obj.sender = message.sender; - obj.receiver = message.receiver; - message.timeoutHeight !== undefined && (obj.timeout_height = message.timeoutHeight ? Height.toSDK(message.timeoutHeight) : undefined); - obj.timeout_timestamp = message.timeoutTimestamp; - return obj; - }, - fromAmino(object: MsgTransferAmino): MsgTransfer { - return { - sourcePort: object.source_port, - sourceChannel: object.source_channel, - token: object?.token ? Coin.fromAmino(object.token) : undefined, - sender: object.sender, - receiver: object.receiver, - timeoutHeight: object?.timeout_height ? Height.fromAmino(object.timeout_height) : undefined, - timeoutTimestamp: BigInt(object.timeout_timestamp) - }; - }, - toAmino(message: MsgTransfer): MsgTransferAmino { - const obj: any = {}; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; - obj.token = message.token ? Coin.toAmino(message.token) : undefined; - obj.sender = message.sender; - obj.receiver = message.receiver; - obj.timeout_height = message.timeoutHeight ? Height.toAmino(message.timeoutHeight) : {}; - obj.timeout_timestamp = message.timeoutTimestamp ? message.timeoutTimestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgTransferAminoMsg): MsgTransfer { - return MsgTransfer.fromAmino(object.value); - }, - toAminoMsg(message: MsgTransfer): MsgTransferAminoMsg { - return { - type: "cosmos-sdk/MsgTransfer", - value: MsgTransfer.toAmino(message) - }; - }, - fromProtoMsg(message: MsgTransferProtoMsg): MsgTransfer { - return MsgTransfer.decode(message.value); - }, - toProto(message: MsgTransfer): Uint8Array { - return MsgTransfer.encode(message).finish(); - }, - toProtoMsg(message: MsgTransfer): MsgTransferProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: MsgTransfer.encode(message).finish() - }; - } -}; -function createBaseMsgTransferResponse(): MsgTransferResponse { - return {}; -} -export const MsgTransferResponse = { - typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", - aminoType: "cosmos-sdk/MsgTransferResponse", - encode(_: MsgTransferResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgTransferResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTransferResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgTransferResponse { - return {}; - }, - toJSON(_: MsgTransferResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgTransferResponse { - const message = createBaseMsgTransferResponse(); - return message; - }, - fromSDK(_: MsgTransferResponseSDKType): MsgTransferResponse { - return {}; - }, - toSDK(_: MsgTransferResponse): MsgTransferResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgTransferResponseAmino): MsgTransferResponse { - return {}; - }, - toAmino(_: MsgTransferResponse): MsgTransferResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgTransferResponseAminoMsg): MsgTransferResponse { - return MsgTransferResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgTransferResponse): MsgTransferResponseAminoMsg { - return { - type: "cosmos-sdk/MsgTransferResponse", - value: MsgTransferResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgTransferResponseProtoMsg): MsgTransferResponse { - return MsgTransferResponse.decode(message.value); - }, - toProto(message: MsgTransferResponse): Uint8Array { - return MsgTransferResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgTransferResponse): MsgTransferResponseProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse", - value: MsgTransferResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/applications/transfer/v2/packet.ts b/examples/interchainjs/src/codegen/ibc/applications/transfer/v2/packet.ts deleted file mode 100644 index 1cdbba0b..00000000 --- a/examples/interchainjs/src/codegen/ibc/applications/transfer/v2/packet.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketData { - /** the token denomination to be transferred */ - denom: string; - /** the token amount to be transferred */ - amount: string; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; -} -export interface FungibleTokenPacketDataProtoMsg { - typeUrl: "/ibc.applications.transfer.v2.FungibleTokenPacketData"; - value: Uint8Array; -} -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketDataAmino { - /** the token denomination to be transferred */ - denom: string; - /** the token amount to be transferred */ - amount: string; - /** the sender address */ - sender: string; - /** the recipient address on the destination chain */ - receiver: string; -} -export interface FungibleTokenPacketDataAminoMsg { - type: "cosmos-sdk/FungibleTokenPacketData"; - value: FungibleTokenPacketDataAmino; -} -/** - * FungibleTokenPacketData defines a struct for the packet payload - * See FungibleTokenPacketData spec: - * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures - */ -export interface FungibleTokenPacketDataSDKType { - denom: string; - amount: string; - sender: string; - receiver: string; -} -function createBaseFungibleTokenPacketData(): FungibleTokenPacketData { - return { - denom: "", - amount: "", - sender: "", - receiver: "" - }; -} -export const FungibleTokenPacketData = { - typeUrl: "/ibc.applications.transfer.v2.FungibleTokenPacketData", - aminoType: "cosmos-sdk/FungibleTokenPacketData", - encode(message: FungibleTokenPacketData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FungibleTokenPacketData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFungibleTokenPacketData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FungibleTokenPacketData { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "", - sender: isSet(object.sender) ? String(object.sender) : "", - receiver: isSet(object.receiver) ? String(object.receiver) : "" - }; - }, - toJSON(message: FungibleTokenPacketData): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - message.sender !== undefined && (obj.sender = message.sender); - message.receiver !== undefined && (obj.receiver = message.receiver); - return obj; - }, - fromPartial(object: DeepPartial): FungibleTokenPacketData { - const message = createBaseFungibleTokenPacketData(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; - return message; - }, - fromSDK(object: FungibleTokenPacketDataSDKType): FungibleTokenPacketData { - return { - denom: object?.denom, - amount: object?.amount, - sender: object?.sender, - receiver: object?.receiver - }; - }, - toSDK(message: FungibleTokenPacketData): FungibleTokenPacketDataSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; - obj.sender = message.sender; - obj.receiver = message.receiver; - return obj; - }, - fromAmino(object: FungibleTokenPacketDataAmino): FungibleTokenPacketData { - return { - denom: object.denom, - amount: object.amount, - sender: object.sender, - receiver: object.receiver - }; - }, - toAmino(message: FungibleTokenPacketData): FungibleTokenPacketDataAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.amount = message.amount; - obj.sender = message.sender; - obj.receiver = message.receiver; - return obj; - }, - fromAminoMsg(object: FungibleTokenPacketDataAminoMsg): FungibleTokenPacketData { - return FungibleTokenPacketData.fromAmino(object.value); - }, - toAminoMsg(message: FungibleTokenPacketData): FungibleTokenPacketDataAminoMsg { - return { - type: "cosmos-sdk/FungibleTokenPacketData", - value: FungibleTokenPacketData.toAmino(message) - }; - }, - fromProtoMsg(message: FungibleTokenPacketDataProtoMsg): FungibleTokenPacketData { - return FungibleTokenPacketData.decode(message.value); - }, - toProto(message: FungibleTokenPacketData): Uint8Array { - return FungibleTokenPacketData.encode(message).finish(); - }, - toProtoMsg(message: FungibleTokenPacketData): FungibleTokenPacketDataProtoMsg { - return { - typeUrl: "/ibc.applications.transfer.v2.FungibleTokenPacketData", - value: FungibleTokenPacketData.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/bundle.ts b/examples/interchainjs/src/codegen/ibc/bundle.ts deleted file mode 100644 index 8cf75133..00000000 --- a/examples/interchainjs/src/codegen/ibc/bundle.ts +++ /dev/null @@ -1,140 +0,0 @@ -import * as _108 from "./applications/transfer/v1/genesis"; -import * as _109 from "./applications/transfer/v1/query"; -import * as _110 from "./applications/transfer/v1/transfer"; -import * as _111 from "./applications/transfer/v1/tx"; -import * as _112 from "./applications/transfer/v2/packet"; -import * as _113 from "./core/channel/v1/channel"; -import * as _114 from "./core/channel/v1/genesis"; -import * as _115 from "./core/channel/v1/query"; -import * as _116 from "./core/channel/v1/tx"; -import * as _117 from "./core/client/v1/client"; -import * as _118 from "./core/client/v1/genesis"; -import * as _119 from "./core/client/v1/query"; -import * as _120 from "./core/client/v1/tx"; -import * as _121 from "./core/commitment/v1/commitment"; -import * as _122 from "./core/connection/v1/connection"; -import * as _123 from "./core/connection/v1/genesis"; -import * as _124 from "./core/connection/v1/query"; -import * as _125 from "./core/connection/v1/tx"; -import * as _126 from "./core/port/v1/query"; -import * as _127 from "./core/types/v1/genesis"; -import * as _128 from "./lightclients/localhost/v1/localhost"; -import * as _129 from "./lightclients/solomachine/v1/solomachine"; -import * as _130 from "./lightclients/solomachine/v2/solomachine"; -import * as _131 from "./lightclients/tendermint/v1/tendermint"; -import * as _258 from "./applications/transfer/v1/tx.amino"; -import * as _259 from "./core/channel/v1/tx.amino"; -import * as _260 from "./core/client/v1/tx.amino"; -import * as _261 from "./core/connection/v1/tx.amino"; -import * as _262 from "./applications/transfer/v1/tx.registry"; -import * as _263 from "./core/channel/v1/tx.registry"; -import * as _264 from "./core/client/v1/tx.registry"; -import * as _265 from "./core/connection/v1/tx.registry"; -import * as _266 from "./applications/transfer/v1/query.rpc.Query"; -import * as _267 from "./core/channel/v1/query.rpc.Query"; -import * as _268 from "./core/client/v1/query.rpc.Query"; -import * as _269 from "./core/connection/v1/query.rpc.Query"; -import * as _270 from "./core/port/v1/query.rpc.Query"; -import * as _271 from "./applications/transfer/v1/tx.rpc.msg"; -import * as _272 from "./core/channel/v1/tx.rpc.msg"; -import * as _273 from "./core/client/v1/tx.rpc.msg"; -import * as _274 from "./core/connection/v1/tx.rpc.msg"; -import * as _313 from "./rpc.query"; -import * as _314 from "./rpc.tx"; -export namespace ibc { - export namespace applications { - export namespace transfer { - export const v1 = { - ..._108, - ..._109, - ..._110, - ..._111, - ..._258, - ..._262, - ..._266, - ..._271 - }; - export const v2 = { - ..._112 - }; - } - } - export namespace core { - export namespace channel { - export const v1 = { - ..._113, - ..._114, - ..._115, - ..._116, - ..._259, - ..._263, - ..._267, - ..._272 - }; - } - export namespace client { - export const v1 = { - ..._117, - ..._118, - ..._119, - ..._120, - ..._260, - ..._264, - ..._268, - ..._273 - }; - } - export namespace commitment { - export const v1 = { - ..._121 - }; - } - export namespace connection { - export const v1 = { - ..._122, - ..._123, - ..._124, - ..._125, - ..._261, - ..._265, - ..._269, - ..._274 - }; - } - export namespace port { - export const v1 = { - ..._126, - ..._270 - }; - } - export namespace types { - export const v1 = { - ..._127 - }; - } - } - export namespace lightclients { - export namespace localhost { - export const v1 = { - ..._128 - }; - } - export namespace solomachine { - export const v1 = { - ..._129 - }; - export const v2 = { - ..._130 - }; - } - export namespace tendermint { - export const v1 = { - ..._131 - }; - } - } - export const ClientFactory = { - ..._313, - ..._314 - }; -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/client.ts b/examples/interchainjs/src/codegen/ibc/client.ts deleted file mode 100644 index 1256ef06..00000000 --- a/examples/interchainjs/src/codegen/ibc/client.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as ibcApplicationsTransferV1TxRegistry from "./applications/transfer/v1/tx.registry"; -import * as ibcCoreChannelV1TxRegistry from "./core/channel/v1/tx.registry"; -import * as ibcCoreClientV1TxRegistry from "./core/client/v1/tx.registry"; -import * as ibcCoreConnectionV1TxRegistry from "./core/connection/v1/tx.registry"; -import * as ibcApplicationsTransferV1TxAmino from "./applications/transfer/v1/tx.amino"; -import * as ibcCoreChannelV1TxAmino from "./core/channel/v1/tx.amino"; -import * as ibcCoreClientV1TxAmino from "./core/client/v1/tx.amino"; -import * as ibcCoreConnectionV1TxAmino from "./core/connection/v1/tx.amino"; -export const ibcAminoConverters = { - ...ibcApplicationsTransferV1TxAmino.AminoConverter, - ...ibcCoreChannelV1TxAmino.AminoConverter, - ...ibcCoreClientV1TxAmino.AminoConverter, - ...ibcCoreConnectionV1TxAmino.AminoConverter -}; -export const ibcProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...ibcApplicationsTransferV1TxRegistry.registry, ...ibcCoreChannelV1TxRegistry.registry, ...ibcCoreClientV1TxRegistry.registry, ...ibcCoreConnectionV1TxRegistry.registry]; -export const getSigningIbcClientOptions = ({ - defaultTypes = defaultRegistryTypes -}: { - defaultTypes?: ReadonlyArray<[string, GeneratedType]>; -} = {}): { - registry: Registry; - aminoTypes: AminoTypes; -} => { - const registry = new Registry([...defaultTypes, ...ibcProtoRegistry]); - const aminoTypes = new AminoTypes({ - ...ibcAminoConverters - }); - return { - registry, - aminoTypes - }; -}; -export const getSigningIbcClient = async ({ - rpcEndpoint, - signer, - defaultTypes = defaultRegistryTypes -}: { - rpcEndpoint: string | HttpEndpoint; - signer: OfflineSigner; - defaultTypes?: ReadonlyArray<[string, GeneratedType]>; -}) => { - const { - registry, - aminoTypes - } = getSigningIbcClientOptions({ - defaultTypes - }); - const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry: (registry as any), - aminoTypes - }); - return client; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/channel.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/channel.ts deleted file mode 100644 index 1c3f7377..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/channel.ts +++ /dev/null @@ -1,1291 +0,0 @@ -import { Height, HeightAmino, HeightSDKType } from "../../client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * State defines if a channel is in one of the following states: - * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A channel has just started the opening handshake. */ - STATE_INIT = 1, - /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */ - STATE_TRYOPEN = 2, - /** - * STATE_OPEN - A channel has completed the handshake. Open channels are - * ready to send and receive packets. - */ - STATE_OPEN = 3, - /** - * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive - * packets. - */ - STATE_CLOSED = 4, - UNRECOGNIZED = -1, -} -export const StateSDKType = State; -export const StateAmino = State; -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case 4: - case "STATE_CLOSED": - return State.STATE_CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} -export function stateToJSON(object: State): string { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.STATE_CLOSED: - return "STATE_CLOSED"; - case State.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** Order defines if a channel is ORDERED or UNORDERED */ -export enum Order { - /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */ - ORDER_NONE_UNSPECIFIED = 0, - /** - * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in - * which they were sent. - */ - ORDER_UNORDERED = 1, - /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */ - ORDER_ORDERED = 2, - UNRECOGNIZED = -1, -} -export const OrderSDKType = Order; -export const OrderAmino = Order; -export function orderFromJSON(object: any): Order { - switch (object) { - case 0: - case "ORDER_NONE_UNSPECIFIED": - return Order.ORDER_NONE_UNSPECIFIED; - case 1: - case "ORDER_UNORDERED": - return Order.ORDER_UNORDERED; - case 2: - case "ORDER_ORDERED": - return Order.ORDER_ORDERED; - case -1: - case "UNRECOGNIZED": - default: - return Order.UNRECOGNIZED; - } -} -export function orderToJSON(object: Order): string { - switch (object) { - case Order.ORDER_NONE_UNSPECIFIED: - return "ORDER_NONE_UNSPECIFIED"; - case Order.ORDER_UNORDERED: - return "ORDER_UNORDERED"; - case Order.ORDER_ORDERED: - return "ORDER_ORDERED"; - case Order.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ -export interface Channel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connectionHops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; -} -export interface ChannelProtoMsg { - typeUrl: "/ibc.core.channel.v1.Channel"; - value: Uint8Array; -} -/** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ -export interface ChannelAmino { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty?: CounterpartyAmino | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connection_hops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; -} -export interface ChannelAminoMsg { - type: "cosmos-sdk/Channel"; - value: ChannelAmino; -} -/** - * Channel defines pipeline for exactly-once packet delivery between specific - * modules on separate blockchains, which has at least one end capable of - * sending packets and one end capable of receiving packets. - */ -export interface ChannelSDKType { - state: State; - ordering: Order; - counterparty: CounterpartySDKType | undefined; - connection_hops: string[]; - version: string; -} -/** - * IdentifiedChannel defines a channel with additional port and channel - * identifier fields. - */ -export interface IdentifiedChannel { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connectionHops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; - /** port identifier */ - portId: string; - /** channel identifier */ - channelId: string; -} -export interface IdentifiedChannelProtoMsg { - typeUrl: "/ibc.core.channel.v1.IdentifiedChannel"; - value: Uint8Array; -} -/** - * IdentifiedChannel defines a channel with additional port and channel - * identifier fields. - */ -export interface IdentifiedChannelAmino { - /** current state of the channel end */ - state: State; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty?: CounterpartyAmino | undefined; - /** - * list of connection identifiers, in order, along which packets sent on - * this channel will travel - */ - connection_hops: string[]; - /** opaque channel version, which is agreed upon during the handshake */ - version: string; - /** port identifier */ - port_id: string; - /** channel identifier */ - channel_id: string; -} -export interface IdentifiedChannelAminoMsg { - type: "cosmos-sdk/IdentifiedChannel"; - value: IdentifiedChannelAmino; -} -/** - * IdentifiedChannel defines a channel with additional port and channel - * identifier fields. - */ -export interface IdentifiedChannelSDKType { - state: State; - ordering: Order; - counterparty: CounterpartySDKType | undefined; - connection_hops: string[]; - version: string; - port_id: string; - channel_id: string; -} -/** Counterparty defines a channel end counterparty */ -export interface Counterparty { - /** port on the counterparty chain which owns the other end of the channel. */ - portId: string; - /** channel end on the counterparty chain */ - channelId: string; -} -export interface CounterpartyProtoMsg { - typeUrl: "/ibc.core.channel.v1.Counterparty"; - value: Uint8Array; -} -/** Counterparty defines a channel end counterparty */ -export interface CounterpartyAmino { - /** port on the counterparty chain which owns the other end of the channel. */ - port_id: string; - /** channel end on the counterparty chain */ - channel_id: string; -} -export interface CounterpartyAminoMsg { - type: "cosmos-sdk/Counterparty"; - value: CounterpartyAmino; -} -/** Counterparty defines a channel end counterparty */ -export interface CounterpartySDKType { - port_id: string; - channel_id: string; -} -/** Packet defines a type that carries data across different chains through IBC */ -export interface Packet { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - */ - sequence: bigint; - /** identifies the port on the sending chain. */ - sourcePort: string; - /** identifies the channel end on the sending chain. */ - sourceChannel: string; - /** identifies the port on the receiving chain. */ - destinationPort: string; - /** identifies the channel end on the receiving chain. */ - destinationChannel: string; - /** actual opaque bytes transferred directly to the application module */ - data: Uint8Array; - /** block height after which the packet times out */ - timeoutHeight: Height | undefined; - /** block timestamp (in nanoseconds) after which the packet times out */ - timeoutTimestamp: bigint; -} -export interface PacketProtoMsg { - typeUrl: "/ibc.core.channel.v1.Packet"; - value: Uint8Array; -} -/** Packet defines a type that carries data across different chains through IBC */ -export interface PacketAmino { - /** - * number corresponds to the order of sends and receives, where a Packet - * with an earlier sequence number must be sent and received before a Packet - * with a later sequence number. - */ - sequence: string; - /** identifies the port on the sending chain. */ - source_port: string; - /** identifies the channel end on the sending chain. */ - source_channel: string; - /** identifies the port on the receiving chain. */ - destination_port: string; - /** identifies the channel end on the receiving chain. */ - destination_channel: string; - /** actual opaque bytes transferred directly to the application module */ - data: Uint8Array; - /** block height after which the packet times out */ - timeout_height?: HeightAmino | undefined; - /** block timestamp (in nanoseconds) after which the packet times out */ - timeout_timestamp: string; -} -export interface PacketAminoMsg { - type: "cosmos-sdk/Packet"; - value: PacketAmino; -} -/** Packet defines a type that carries data across different chains through IBC */ -export interface PacketSDKType { - sequence: bigint; - source_port: string; - source_channel: string; - destination_port: string; - destination_channel: string; - data: Uint8Array; - timeout_height: HeightSDKType | undefined; - timeout_timestamp: bigint; -} -/** - * PacketState defines the generic type necessary to retrieve and store - * packet commitments, acknowledgements, and receipts. - * Caller is responsible for knowing the context necessary to interpret this - * state as a commitment, acknowledgement, or a receipt. - */ -export interface PacketState { - /** channel port identifier. */ - portId: string; - /** channel unique identifier. */ - channelId: string; - /** packet sequence. */ - sequence: bigint; - /** embedded data that represents packet state. */ - data: Uint8Array; -} -export interface PacketStateProtoMsg { - typeUrl: "/ibc.core.channel.v1.PacketState"; - value: Uint8Array; -} -/** - * PacketState defines the generic type necessary to retrieve and store - * packet commitments, acknowledgements, and receipts. - * Caller is responsible for knowing the context necessary to interpret this - * state as a commitment, acknowledgement, or a receipt. - */ -export interface PacketStateAmino { - /** channel port identifier. */ - port_id: string; - /** channel unique identifier. */ - channel_id: string; - /** packet sequence. */ - sequence: string; - /** embedded data that represents packet state. */ - data: Uint8Array; -} -export interface PacketStateAminoMsg { - type: "cosmos-sdk/PacketState"; - value: PacketStateAmino; -} -/** - * PacketState defines the generic type necessary to retrieve and store - * packet commitments, acknowledgements, and receipts. - * Caller is responsible for knowing the context necessary to interpret this - * state as a commitment, acknowledgement, or a receipt. - */ -export interface PacketStateSDKType { - port_id: string; - channel_id: string; - sequence: bigint; - data: Uint8Array; -} -/** - * Acknowledgement is the recommended acknowledgement format to be used by - * app-specific protocols. - * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental - * conflicts with other protobuf message formats used for acknowledgements. - * The first byte of any message with this format will be the non-ASCII values - * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope - */ -export interface Acknowledgement { - result?: Uint8Array; - error?: string; -} -export interface AcknowledgementProtoMsg { - typeUrl: "/ibc.core.channel.v1.Acknowledgement"; - value: Uint8Array; -} -/** - * Acknowledgement is the recommended acknowledgement format to be used by - * app-specific protocols. - * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental - * conflicts with other protobuf message formats used for acknowledgements. - * The first byte of any message with this format will be the non-ASCII values - * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope - */ -export interface AcknowledgementAmino { - result?: Uint8Array; - error?: string; -} -export interface AcknowledgementAminoMsg { - type: "cosmos-sdk/Acknowledgement"; - value: AcknowledgementAmino; -} -/** - * Acknowledgement is the recommended acknowledgement format to be used by - * app-specific protocols. - * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental - * conflicts with other protobuf message formats used for acknowledgements. - * The first byte of any message with this format will be the non-ASCII values - * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope - */ -export interface AcknowledgementSDKType { - result?: Uint8Array; - error?: string; -} -function createBaseChannel(): Channel { - return { - state: 0, - ordering: 0, - counterparty: Counterparty.fromPartial({}), - connectionHops: [], - version: "" - }; -} -export const Channel = { - typeUrl: "/ibc.core.channel.v1.Channel", - aminoType: "cosmos-sdk/Channel", - encode(message: Channel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.connectionHops) { - writer.uint32(34).string(v!); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Channel { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChannel(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = (reader.int32() as any); - break; - case 2: - message.ordering = (reader.int32() as any); - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Channel { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - connectionHops: Array.isArray(object?.connectionHops) ? object.connectionHops.map((e: any) => String(e)) : [], - version: isSet(object.version) ? String(object.version) : "" - }; - }, - toJSON(message: Channel): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - if (message.connectionHops) { - obj.connectionHops = message.connectionHops.map(e => e); - } else { - obj.connectionHops = []; - } - message.version !== undefined && (obj.version = message.version); - return obj; - }, - fromPartial(object: DeepPartial): Channel { - const message = createBaseChannel(); - message.state = object.state ?? 0; - message.ordering = object.ordering ?? 0; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.connectionHops = object.connectionHops?.map(e => e) || []; - message.version = object.version ?? ""; - return message; - }, - fromSDK(object: ChannelSDKType): Channel { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - connectionHops: Array.isArray(object?.connection_hops) ? object.connection_hops.map((e: any) => e) : [], - version: object?.version - }; - }, - toSDK(message: Channel): ChannelSDKType { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - if (message.connectionHops) { - obj.connection_hops = message.connectionHops.map(e => e); - } else { - obj.connection_hops = []; - } - obj.version = message.version; - return obj; - }, - fromAmino(object: ChannelAmino): Channel { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - connectionHops: Array.isArray(object?.connection_hops) ? object.connection_hops.map((e: any) => e) : [], - version: object.version - }; - }, - toAmino(message: Channel): ChannelAmino { - const obj: any = {}; - obj.state = message.state; - obj.ordering = message.ordering; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - if (message.connectionHops) { - obj.connection_hops = message.connectionHops.map(e => e); - } else { - obj.connection_hops = []; - } - obj.version = message.version; - return obj; - }, - fromAminoMsg(object: ChannelAminoMsg): Channel { - return Channel.fromAmino(object.value); - }, - toAminoMsg(message: Channel): ChannelAminoMsg { - return { - type: "cosmos-sdk/Channel", - value: Channel.toAmino(message) - }; - }, - fromProtoMsg(message: ChannelProtoMsg): Channel { - return Channel.decode(message.value); - }, - toProto(message: Channel): Uint8Array { - return Channel.encode(message).finish(); - }, - toProtoMsg(message: Channel): ChannelProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.Channel", - value: Channel.encode(message).finish() - }; - } -}; -function createBaseIdentifiedChannel(): IdentifiedChannel { - return { - state: 0, - ordering: 0, - counterparty: Counterparty.fromPartial({}), - connectionHops: [], - version: "", - portId: "", - channelId: "" - }; -} -export const IdentifiedChannel = { - typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", - aminoType: "cosmos-sdk/IdentifiedChannel", - encode(message: IdentifiedChannel, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.ordering !== 0) { - writer.uint32(16).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.connectionHops) { - writer.uint32(34).string(v!); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.portId !== "") { - writer.uint32(50).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(58).string(message.channelId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IdentifiedChannel { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIdentifiedChannel(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = (reader.int32() as any); - break; - case 2: - message.ordering = (reader.int32() as any); - break; - case 3: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 4: - message.connectionHops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.portId = reader.string(); - break; - case 7: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): IdentifiedChannel { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - connectionHops: Array.isArray(object?.connectionHops) ? object.connectionHops.map((e: any) => String(e)) : [], - version: isSet(object.version) ? String(object.version) : "", - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "" - }; - }, - toJSON(message: IdentifiedChannel): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - if (message.connectionHops) { - obj.connectionHops = message.connectionHops.map(e => e); - } else { - obj.connectionHops = []; - } - message.version !== undefined && (obj.version = message.version); - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object: DeepPartial): IdentifiedChannel { - const message = createBaseIdentifiedChannel(); - message.state = object.state ?? 0; - message.ordering = object.ordering ?? 0; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.connectionHops = object.connectionHops?.map(e => e) || []; - message.version = object.version ?? ""; - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - return message; - }, - fromSDK(object: IdentifiedChannelSDKType): IdentifiedChannel { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - connectionHops: Array.isArray(object?.connection_hops) ? object.connection_hops.map((e: any) => e) : [], - version: object?.version, - portId: object?.port_id, - channelId: object?.channel_id - }; - }, - toSDK(message: IdentifiedChannel): IdentifiedChannelSDKType { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - if (message.connectionHops) { - obj.connection_hops = message.connectionHops.map(e => e); - } else { - obj.connection_hops = []; - } - obj.version = message.version; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAmino(object: IdentifiedChannelAmino): IdentifiedChannel { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - connectionHops: Array.isArray(object?.connection_hops) ? object.connection_hops.map((e: any) => e) : [], - version: object.version, - portId: object.port_id, - channelId: object.channel_id - }; - }, - toAmino(message: IdentifiedChannel): IdentifiedChannelAmino { - const obj: any = {}; - obj.state = message.state; - obj.ordering = message.ordering; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - if (message.connectionHops) { - obj.connection_hops = message.connectionHops.map(e => e); - } else { - obj.connection_hops = []; - } - obj.version = message.version; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAminoMsg(object: IdentifiedChannelAminoMsg): IdentifiedChannel { - return IdentifiedChannel.fromAmino(object.value); - }, - toAminoMsg(message: IdentifiedChannel): IdentifiedChannelAminoMsg { - return { - type: "cosmos-sdk/IdentifiedChannel", - value: IdentifiedChannel.toAmino(message) - }; - }, - fromProtoMsg(message: IdentifiedChannelProtoMsg): IdentifiedChannel { - return IdentifiedChannel.decode(message.value); - }, - toProto(message: IdentifiedChannel): Uint8Array { - return IdentifiedChannel.encode(message).finish(); - }, - toProtoMsg(message: IdentifiedChannel): IdentifiedChannelProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.IdentifiedChannel", - value: IdentifiedChannel.encode(message).finish() - }; - } -}; -function createBaseCounterparty(): Counterparty { - return { - portId: "", - channelId: "" - }; -} -export const Counterparty = { - typeUrl: "/ibc.core.channel.v1.Counterparty", - aminoType: "cosmos-sdk/Counterparty", - encode(message: Counterparty, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Counterparty { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCounterparty(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Counterparty { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "" - }; - }, - toJSON(message: Counterparty): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object: DeepPartial): Counterparty { - const message = createBaseCounterparty(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - return message; - }, - fromSDK(object: CounterpartySDKType): Counterparty { - return { - portId: object?.port_id, - channelId: object?.channel_id - }; - }, - toSDK(message: Counterparty): CounterpartySDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAmino(object: CounterpartyAmino): Counterparty { - return { - portId: object.port_id, - channelId: object.channel_id - }; - }, - toAmino(message: Counterparty): CounterpartyAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAminoMsg(object: CounterpartyAminoMsg): Counterparty { - return Counterparty.fromAmino(object.value); - }, - toAminoMsg(message: Counterparty): CounterpartyAminoMsg { - return { - type: "cosmos-sdk/Counterparty", - value: Counterparty.toAmino(message) - }; - }, - fromProtoMsg(message: CounterpartyProtoMsg): Counterparty { - return Counterparty.decode(message.value); - }, - toProto(message: Counterparty): Uint8Array { - return Counterparty.encode(message).finish(); - }, - toProtoMsg(message: Counterparty): CounterpartyProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.Counterparty", - value: Counterparty.encode(message).finish() - }; - } -}; -function createBasePacket(): Packet { - return { - sequence: BigInt(0), - sourcePort: "", - sourceChannel: "", - destinationPort: "", - destinationChannel: "", - data: new Uint8Array(), - timeoutHeight: Height.fromPartial({}), - timeoutTimestamp: BigInt(0) - }; -} -export const Packet = { - typeUrl: "/ibc.core.channel.v1.Packet", - aminoType: "cosmos-sdk/Packet", - encode(message: Packet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.sourcePort !== "") { - writer.uint32(18).string(message.sourcePort); - } - if (message.sourceChannel !== "") { - writer.uint32(26).string(message.sourceChannel); - } - if (message.destinationPort !== "") { - writer.uint32(34).string(message.destinationPort); - } - if (message.destinationChannel !== "") { - writer.uint32(42).string(message.destinationChannel); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - if (message.timeoutHeight !== undefined) { - Height.encode(message.timeoutHeight, writer.uint32(58).fork()).ldelim(); - } - if (message.timeoutTimestamp !== BigInt(0)) { - writer.uint32(64).uint64(message.timeoutTimestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Packet { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacket(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.sourcePort = reader.string(); - break; - case 3: - message.sourceChannel = reader.string(); - break; - case 4: - message.destinationPort = reader.string(); - break; - case 5: - message.destinationChannel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeoutHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeoutTimestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Packet { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - sourcePort: isSet(object.sourcePort) ? String(object.sourcePort) : "", - sourceChannel: isSet(object.sourceChannel) ? String(object.sourceChannel) : "", - destinationPort: isSet(object.destinationPort) ? String(object.destinationPort) : "", - destinationChannel: isSet(object.destinationChannel) ? String(object.destinationChannel) : "", - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined, - timeoutTimestamp: isSet(object.timeoutTimestamp) ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: Packet): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); - message.sourceChannel !== undefined && (obj.sourceChannel = message.sourceChannel); - message.destinationPort !== undefined && (obj.destinationPort = message.destinationPort); - message.destinationChannel !== undefined && (obj.destinationChannel = message.destinationChannel); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.timeoutHeight !== undefined && (obj.timeoutHeight = message.timeoutHeight ? Height.toJSON(message.timeoutHeight) : undefined); - message.timeoutTimestamp !== undefined && (obj.timeoutTimestamp = (message.timeoutTimestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Packet { - const message = createBasePacket(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.sourcePort = object.sourcePort ?? ""; - message.sourceChannel = object.sourceChannel ?? ""; - message.destinationPort = object.destinationPort ?? ""; - message.destinationChannel = object.destinationChannel ?? ""; - message.data = object.data ?? new Uint8Array(); - message.timeoutHeight = object.timeoutHeight !== undefined && object.timeoutHeight !== null ? Height.fromPartial(object.timeoutHeight) : undefined; - message.timeoutTimestamp = object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null ? BigInt(object.timeoutTimestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: PacketSDKType): Packet { - return { - sequence: object?.sequence, - sourcePort: object?.source_port, - sourceChannel: object?.source_channel, - destinationPort: object?.destination_port, - destinationChannel: object?.destination_channel, - data: object?.data, - timeoutHeight: object.timeout_height ? Height.fromSDK(object.timeout_height) : undefined, - timeoutTimestamp: object?.timeout_timestamp - }; - }, - toSDK(message: Packet): PacketSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; - obj.destination_port = message.destinationPort; - obj.destination_channel = message.destinationChannel; - obj.data = message.data; - message.timeoutHeight !== undefined && (obj.timeout_height = message.timeoutHeight ? Height.toSDK(message.timeoutHeight) : undefined); - obj.timeout_timestamp = message.timeoutTimestamp; - return obj; - }, - fromAmino(object: PacketAmino): Packet { - return { - sequence: BigInt(object.sequence), - sourcePort: object.source_port, - sourceChannel: object.source_channel, - destinationPort: object.destination_port, - destinationChannel: object.destination_channel, - data: object.data, - timeoutHeight: object?.timeout_height ? Height.fromAmino(object.timeout_height) : undefined, - timeoutTimestamp: BigInt(object.timeout_timestamp) - }; - }, - toAmino(message: Packet): PacketAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.source_port = message.sourcePort; - obj.source_channel = message.sourceChannel; - obj.destination_port = message.destinationPort; - obj.destination_channel = message.destinationChannel; - obj.data = message.data; - obj.timeout_height = message.timeoutHeight ? Height.toAmino(message.timeoutHeight) : {}; - obj.timeout_timestamp = message.timeoutTimestamp ? message.timeoutTimestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: PacketAminoMsg): Packet { - return Packet.fromAmino(object.value); - }, - toAminoMsg(message: Packet): PacketAminoMsg { - return { - type: "cosmos-sdk/Packet", - value: Packet.toAmino(message) - }; - }, - fromProtoMsg(message: PacketProtoMsg): Packet { - return Packet.decode(message.value); - }, - toProto(message: Packet): Uint8Array { - return Packet.encode(message).finish(); - }, - toProtoMsg(message: Packet): PacketProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.Packet", - value: Packet.encode(message).finish() - }; - } -}; -function createBasePacketState(): PacketState { - return { - portId: "", - channelId: "", - sequence: BigInt(0), - data: new Uint8Array() - }; -} -export const PacketState = { - typeUrl: "/ibc.core.channel.v1.PacketState", - aminoType: "cosmos-sdk/PacketState", - encode(message: PacketState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - if (message.data.length !== 0) { - writer.uint32(34).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketState { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: PacketState): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketState { - const message = createBasePacketState(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketStateSDKType): PacketState { - return { - portId: object?.port_id, - channelId: object?.channel_id, - sequence: object?.sequence, - data: object?.data - }; - }, - toSDK(message: PacketState): PacketStateSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence; - obj.data = message.data; - return obj; - }, - fromAmino(object: PacketStateAmino): PacketState { - return { - portId: object.port_id, - channelId: object.channel_id, - sequence: BigInt(object.sequence), - data: object.data - }; - }, - toAmino(message: PacketState): PacketStateAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: PacketStateAminoMsg): PacketState { - return PacketState.fromAmino(object.value); - }, - toAminoMsg(message: PacketState): PacketStateAminoMsg { - return { - type: "cosmos-sdk/PacketState", - value: PacketState.toAmino(message) - }; - }, - fromProtoMsg(message: PacketStateProtoMsg): PacketState { - return PacketState.decode(message.value); - }, - toProto(message: PacketState): Uint8Array { - return PacketState.encode(message).finish(); - }, - toProtoMsg(message: PacketState): PacketStateProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.PacketState", - value: PacketState.encode(message).finish() - }; - } -}; -function createBaseAcknowledgement(): Acknowledgement { - return { - result: undefined, - error: undefined - }; -} -export const Acknowledgement = { - typeUrl: "/ibc.core.channel.v1.Acknowledgement", - aminoType: "cosmos-sdk/Acknowledgement", - encode(message: Acknowledgement, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.result !== undefined) { - writer.uint32(170).bytes(message.result); - } - if (message.error !== undefined) { - writer.uint32(178).string(message.error); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Acknowledgement { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAcknowledgement(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Acknowledgement { - return { - result: isSet(object.result) ? bytesFromBase64(object.result) : undefined, - error: isSet(object.error) ? String(object.error) : undefined - }; - }, - toJSON(message: Acknowledgement): unknown { - const obj: any = {}; - message.result !== undefined && (obj.result = message.result !== undefined ? base64FromBytes(message.result) : undefined); - message.error !== undefined && (obj.error = message.error); - return obj; - }, - fromPartial(object: DeepPartial): Acknowledgement { - const message = createBaseAcknowledgement(); - message.result = object.result ?? undefined; - message.error = object.error ?? undefined; - return message; - }, - fromSDK(object: AcknowledgementSDKType): Acknowledgement { - return { - result: object?.result, - error: object?.error - }; - }, - toSDK(message: Acknowledgement): AcknowledgementSDKType { - const obj: any = {}; - obj.result = message.result; - obj.error = message.error; - return obj; - }, - fromAmino(object: AcknowledgementAmino): Acknowledgement { - return { - result: object?.result, - error: object?.error - }; - }, - toAmino(message: Acknowledgement): AcknowledgementAmino { - const obj: any = {}; - obj.result = message.result; - obj.error = message.error; - return obj; - }, - fromAminoMsg(object: AcknowledgementAminoMsg): Acknowledgement { - return Acknowledgement.fromAmino(object.value); - }, - toAminoMsg(message: Acknowledgement): AcknowledgementAminoMsg { - return { - type: "cosmos-sdk/Acknowledgement", - value: Acknowledgement.toAmino(message) - }; - }, - fromProtoMsg(message: AcknowledgementProtoMsg): Acknowledgement { - return Acknowledgement.decode(message.value); - }, - toProto(message: Acknowledgement): Uint8Array { - return Acknowledgement.encode(message).finish(); - }, - toProtoMsg(message: Acknowledgement): AcknowledgementProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.Acknowledgement", - value: Acknowledgement.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/genesis.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/genesis.ts deleted file mode 100644 index 9c12d13b..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/genesis.ts +++ /dev/null @@ -1,467 +0,0 @@ -import { IdentifiedChannel, IdentifiedChannelAmino, IdentifiedChannelSDKType, PacketState, PacketStateAmino, PacketStateSDKType } from "./channel"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** GenesisState defines the ibc channel submodule's genesis state. */ -export interface GenesisState { - channels: IdentifiedChannel[]; - acknowledgements: PacketState[]; - commitments: PacketState[]; - receipts: PacketState[]; - sendSequences: PacketSequence[]; - recvSequences: PacketSequence[]; - ackSequences: PacketSequence[]; - /** the sequence for the next generated channel identifier */ - nextChannelSequence: bigint; -} -export interface GenesisStateProtoMsg { - typeUrl: "/ibc.core.channel.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the ibc channel submodule's genesis state. */ -export interface GenesisStateAmino { - channels: IdentifiedChannelAmino[]; - acknowledgements: PacketStateAmino[]; - commitments: PacketStateAmino[]; - receipts: PacketStateAmino[]; - send_sequences: PacketSequenceAmino[]; - recv_sequences: PacketSequenceAmino[]; - ack_sequences: PacketSequenceAmino[]; - /** the sequence for the next generated channel identifier */ - next_channel_sequence: string; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the ibc channel submodule's genesis state. */ -export interface GenesisStateSDKType { - channels: IdentifiedChannelSDKType[]; - acknowledgements: PacketStateSDKType[]; - commitments: PacketStateSDKType[]; - receipts: PacketStateSDKType[]; - send_sequences: PacketSequenceSDKType[]; - recv_sequences: PacketSequenceSDKType[]; - ack_sequences: PacketSequenceSDKType[]; - next_channel_sequence: bigint; -} -/** - * PacketSequence defines the genesis type necessary to retrieve and store - * next send and receive sequences. - */ -export interface PacketSequence { - portId: string; - channelId: string; - sequence: bigint; -} -export interface PacketSequenceProtoMsg { - typeUrl: "/ibc.core.channel.v1.PacketSequence"; - value: Uint8Array; -} -/** - * PacketSequence defines the genesis type necessary to retrieve and store - * next send and receive sequences. - */ -export interface PacketSequenceAmino { - port_id: string; - channel_id: string; - sequence: string; -} -export interface PacketSequenceAminoMsg { - type: "cosmos-sdk/PacketSequence"; - value: PacketSequenceAmino; -} -/** - * PacketSequence defines the genesis type necessary to retrieve and store - * next send and receive sequences. - */ -export interface PacketSequenceSDKType { - port_id: string; - channel_id: string; - sequence: bigint; -} -function createBaseGenesisState(): GenesisState { - return { - channels: [], - acknowledgements: [], - commitments: [], - receipts: [], - sendSequences: [], - recvSequences: [], - ackSequences: [], - nextChannelSequence: BigInt(0) - }; -} -export const GenesisState = { - typeUrl: "/ibc.core.channel.v1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.acknowledgements) { - PacketState.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.commitments) { - PacketState.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.receipts) { - PacketState.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.sendSequences) { - PacketSequence.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.recvSequences) { - PacketSequence.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.ackSequences) { - PacketSequence.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.nextChannelSequence !== BigInt(0)) { - writer.uint32(64).uint64(message.nextChannelSequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push(IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.acknowledgements.push(PacketState.decode(reader, reader.uint32())); - break; - case 3: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 4: - message.receipts.push(PacketState.decode(reader, reader.uint32())); - break; - case 5: - message.sendSequences.push(PacketSequence.decode(reader, reader.uint32())); - break; - case 6: - message.recvSequences.push(PacketSequence.decode(reader, reader.uint32())); - break; - case 7: - message.ackSequences.push(PacketSequence.decode(reader, reader.uint32())); - break; - case 8: - message.nextChannelSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromJSON(e)) : [], - acknowledgements: Array.isArray(object?.acknowledgements) ? object.acknowledgements.map((e: any) => PacketState.fromJSON(e)) : [], - commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => PacketState.fromJSON(e)) : [], - receipts: Array.isArray(object?.receipts) ? object.receipts.map((e: any) => PacketState.fromJSON(e)) : [], - sendSequences: Array.isArray(object?.sendSequences) ? object.sendSequences.map((e: any) => PacketSequence.fromJSON(e)) : [], - recvSequences: Array.isArray(object?.recvSequences) ? object.recvSequences.map((e: any) => PacketSequence.fromJSON(e)) : [], - ackSequences: Array.isArray(object?.ackSequences) ? object.ackSequences.map((e: any) => PacketSequence.fromJSON(e)) : [], - nextChannelSequence: isSet(object.nextChannelSequence) ? BigInt(object.nextChannelSequence.toString()) : BigInt(0) - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toJSON(e) : undefined); - } else { - obj.channels = []; - } - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toJSON(e) : undefined); - } else { - obj.acknowledgements = []; - } - if (message.commitments) { - obj.commitments = message.commitments.map(e => e ? PacketState.toJSON(e) : undefined); - } else { - obj.commitments = []; - } - if (message.receipts) { - obj.receipts = message.receipts.map(e => e ? PacketState.toJSON(e) : undefined); - } else { - obj.receipts = []; - } - if (message.sendSequences) { - obj.sendSequences = message.sendSequences.map(e => e ? PacketSequence.toJSON(e) : undefined); - } else { - obj.sendSequences = []; - } - if (message.recvSequences) { - obj.recvSequences = message.recvSequences.map(e => e ? PacketSequence.toJSON(e) : undefined); - } else { - obj.recvSequences = []; - } - if (message.ackSequences) { - obj.ackSequences = message.ackSequences.map(e => e ? PacketSequence.toJSON(e) : undefined); - } else { - obj.ackSequences = []; - } - message.nextChannelSequence !== undefined && (obj.nextChannelSequence = (message.nextChannelSequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.channels = object.channels?.map(e => IdentifiedChannel.fromPartial(e)) || []; - message.acknowledgements = object.acknowledgements?.map(e => PacketState.fromPartial(e)) || []; - message.commitments = object.commitments?.map(e => PacketState.fromPartial(e)) || []; - message.receipts = object.receipts?.map(e => PacketState.fromPartial(e)) || []; - message.sendSequences = object.sendSequences?.map(e => PacketSequence.fromPartial(e)) || []; - message.recvSequences = object.recvSequences?.map(e => PacketSequence.fromPartial(e)) || []; - message.ackSequences = object.ackSequences?.map(e => PacketSequence.fromPartial(e)) || []; - message.nextChannelSequence = object.nextChannelSequence !== undefined && object.nextChannelSequence !== null ? BigInt(object.nextChannelSequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromSDK(e)) : [], - acknowledgements: Array.isArray(object?.acknowledgements) ? object.acknowledgements.map((e: any) => PacketState.fromSDK(e)) : [], - commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => PacketState.fromSDK(e)) : [], - receipts: Array.isArray(object?.receipts) ? object.receipts.map((e: any) => PacketState.fromSDK(e)) : [], - sendSequences: Array.isArray(object?.send_sequences) ? object.send_sequences.map((e: any) => PacketSequence.fromSDK(e)) : [], - recvSequences: Array.isArray(object?.recv_sequences) ? object.recv_sequences.map((e: any) => PacketSequence.fromSDK(e)) : [], - ackSequences: Array.isArray(object?.ack_sequences) ? object.ack_sequences.map((e: any) => PacketSequence.fromSDK(e)) : [], - nextChannelSequence: object?.next_channel_sequence - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toSDK(e) : undefined); - } else { - obj.channels = []; - } - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toSDK(e) : undefined); - } else { - obj.acknowledgements = []; - } - if (message.commitments) { - obj.commitments = message.commitments.map(e => e ? PacketState.toSDK(e) : undefined); - } else { - obj.commitments = []; - } - if (message.receipts) { - obj.receipts = message.receipts.map(e => e ? PacketState.toSDK(e) : undefined); - } else { - obj.receipts = []; - } - if (message.sendSequences) { - obj.send_sequences = message.sendSequences.map(e => e ? PacketSequence.toSDK(e) : undefined); - } else { - obj.send_sequences = []; - } - if (message.recvSequences) { - obj.recv_sequences = message.recvSequences.map(e => e ? PacketSequence.toSDK(e) : undefined); - } else { - obj.recv_sequences = []; - } - if (message.ackSequences) { - obj.ack_sequences = message.ackSequences.map(e => e ? PacketSequence.toSDK(e) : undefined); - } else { - obj.ack_sequences = []; - } - obj.next_channel_sequence = message.nextChannelSequence; - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromAmino(e)) : [], - acknowledgements: Array.isArray(object?.acknowledgements) ? object.acknowledgements.map((e: any) => PacketState.fromAmino(e)) : [], - commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => PacketState.fromAmino(e)) : [], - receipts: Array.isArray(object?.receipts) ? object.receipts.map((e: any) => PacketState.fromAmino(e)) : [], - sendSequences: Array.isArray(object?.send_sequences) ? object.send_sequences.map((e: any) => PacketSequence.fromAmino(e)) : [], - recvSequences: Array.isArray(object?.recv_sequences) ? object.recv_sequences.map((e: any) => PacketSequence.fromAmino(e)) : [], - ackSequences: Array.isArray(object?.ack_sequences) ? object.ack_sequences.map((e: any) => PacketSequence.fromAmino(e)) : [], - nextChannelSequence: BigInt(object.next_channel_sequence) - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toAmino(e) : undefined); - } else { - obj.channels = []; - } - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toAmino(e) : undefined); - } else { - obj.acknowledgements = []; - } - if (message.commitments) { - obj.commitments = message.commitments.map(e => e ? PacketState.toAmino(e) : undefined); - } else { - obj.commitments = []; - } - if (message.receipts) { - obj.receipts = message.receipts.map(e => e ? PacketState.toAmino(e) : undefined); - } else { - obj.receipts = []; - } - if (message.sendSequences) { - obj.send_sequences = message.sendSequences.map(e => e ? PacketSequence.toAmino(e) : undefined); - } else { - obj.send_sequences = []; - } - if (message.recvSequences) { - obj.recv_sequences = message.recvSequences.map(e => e ? PacketSequence.toAmino(e) : undefined); - } else { - obj.recv_sequences = []; - } - if (message.ackSequences) { - obj.ack_sequences = message.ackSequences.map(e => e ? PacketSequence.toAmino(e) : undefined); - } else { - obj.ack_sequences = []; - } - obj.next_channel_sequence = message.nextChannelSequence ? message.nextChannelSequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBasePacketSequence(): PacketSequence { - return { - portId: "", - channelId: "", - sequence: BigInt(0) - }; -} -export const PacketSequence = { - typeUrl: "/ibc.core.channel.v1.PacketSequence", - aminoType: "cosmos-sdk/PacketSequence", - encode(message: PacketSequence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketSequence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketSequence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketSequence { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: PacketSequence): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): PacketSequence { - const message = createBasePacketSequence(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: PacketSequenceSDKType): PacketSequence { - return { - portId: object?.port_id, - channelId: object?.channel_id, - sequence: object?.sequence - }; - }, - toSDK(message: PacketSequence): PacketSequenceSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: PacketSequenceAmino): PacketSequence { - return { - portId: object.port_id, - channelId: object.channel_id, - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: PacketSequence): PacketSequenceAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: PacketSequenceAminoMsg): PacketSequence { - return PacketSequence.fromAmino(object.value); - }, - toAminoMsg(message: PacketSequence): PacketSequenceAminoMsg { - return { - type: "cosmos-sdk/PacketSequence", - value: PacketSequence.toAmino(message) - }; - }, - fromProtoMsg(message: PacketSequenceProtoMsg): PacketSequence { - return PacketSequence.decode(message.value); - }, - toProto(message: PacketSequence): Uint8Array { - return PacketSequence.encode(message).finish(); - }, - toProtoMsg(message: PacketSequence): PacketSequenceProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.PacketSequence", - value: PacketSequence.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/query.rpc.Query.ts deleted file mode 100644 index ee19de5b..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/query.rpc.Query.ts +++ /dev/null @@ -1,535 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../../mobx"; -import { QueryChannelRequest, QueryChannelResponse, QueryChannelsRequest, QueryChannelsResponse, QueryConnectionChannelsRequest, QueryConnectionChannelsResponse, QueryChannelClientStateRequest, QueryChannelClientStateResponse, QueryChannelConsensusStateRequest, QueryChannelConsensusStateResponse, QueryPacketCommitmentRequest, QueryPacketCommitmentResponse, QueryPacketCommitmentsRequest, QueryPacketCommitmentsResponse, QueryPacketReceiptRequest, QueryPacketReceiptResponse, QueryPacketAcknowledgementRequest, QueryPacketAcknowledgementResponse, QueryPacketAcknowledgementsRequest, QueryPacketAcknowledgementsResponse, QueryUnreceivedPacketsRequest, QueryUnreceivedPacketsResponse, QueryUnreceivedAcksRequest, QueryUnreceivedAcksResponse, QueryNextSequenceReceiveRequest, QueryNextSequenceReceiveResponse } from "./query"; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Channel queries an IBC Channel. */ - channel(request: QueryChannelRequest): Promise; - /** Channels queries all the IBC channels of a chain. */ - channels(request?: QueryChannelsRequest): Promise; - /** - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - connectionChannels(request: QueryConnectionChannelsRequest): Promise; - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - channelClientState(request: QueryChannelClientStateRequest): Promise; - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - channelConsensusState(request: QueryChannelConsensusStateRequest): Promise; - /** PacketCommitment queries a stored packet commitment hash. */ - packetCommitment(request: QueryPacketCommitmentRequest): Promise; - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - packetCommitments(request: QueryPacketCommitmentsRequest): Promise; - /** - * PacketReceipt queries if a given packet sequence has been received on the - * queried chain - */ - packetReceipt(request: QueryPacketReceiptRequest): Promise; - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */ - packetAcknowledgement(request: QueryPacketAcknowledgementRequest): Promise; - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - packetAcknowledgements(request: QueryPacketAcknowledgementsRequest): Promise; - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - unreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise; - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated - * with a channel and sequences. - */ - unreceivedAcks(request: QueryUnreceivedAcksRequest): Promise; - /** NextSequenceReceive returns the next receive sequence for a given channel. */ - nextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.channel = this.channel.bind(this); - this.channels = this.channels.bind(this); - this.connectionChannels = this.connectionChannels.bind(this); - this.channelClientState = this.channelClientState.bind(this); - this.channelConsensusState = this.channelConsensusState.bind(this); - this.packetCommitment = this.packetCommitment.bind(this); - this.packetCommitments = this.packetCommitments.bind(this); - this.packetReceipt = this.packetReceipt.bind(this); - this.packetAcknowledgement = this.packetAcknowledgement.bind(this); - this.packetAcknowledgements = this.packetAcknowledgements.bind(this); - this.unreceivedPackets = this.unreceivedPackets.bind(this); - this.unreceivedAcks = this.unreceivedAcks.bind(this); - this.nextSequenceReceive = this.nextSequenceReceive.bind(this); - } - channel(request: QueryChannelRequest): Promise { - const data = QueryChannelRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "Channel", data); - return promise.then(data => QueryChannelResponse.decode(new BinaryReader(data))); - } - channels(request: QueryChannelsRequest = { - pagination: undefined - }): Promise { - const data = QueryChannelsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "Channels", data); - return promise.then(data => QueryChannelsResponse.decode(new BinaryReader(data))); - } - connectionChannels(request: QueryConnectionChannelsRequest): Promise { - const data = QueryConnectionChannelsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "ConnectionChannels", data); - return promise.then(data => QueryConnectionChannelsResponse.decode(new BinaryReader(data))); - } - channelClientState(request: QueryChannelClientStateRequest): Promise { - const data = QueryChannelClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "ChannelClientState", data); - return promise.then(data => QueryChannelClientStateResponse.decode(new BinaryReader(data))); - } - channelConsensusState(request: QueryChannelConsensusStateRequest): Promise { - const data = QueryChannelConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "ChannelConsensusState", data); - return promise.then(data => QueryChannelConsensusStateResponse.decode(new BinaryReader(data))); - } - packetCommitment(request: QueryPacketCommitmentRequest): Promise { - const data = QueryPacketCommitmentRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketCommitment", data); - return promise.then(data => QueryPacketCommitmentResponse.decode(new BinaryReader(data))); - } - packetCommitments(request: QueryPacketCommitmentsRequest): Promise { - const data = QueryPacketCommitmentsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketCommitments", data); - return promise.then(data => QueryPacketCommitmentsResponse.decode(new BinaryReader(data))); - } - packetReceipt(request: QueryPacketReceiptRequest): Promise { - const data = QueryPacketReceiptRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketReceipt", data); - return promise.then(data => QueryPacketReceiptResponse.decode(new BinaryReader(data))); - } - packetAcknowledgement(request: QueryPacketAcknowledgementRequest): Promise { - const data = QueryPacketAcknowledgementRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketAcknowledgement", data); - return promise.then(data => QueryPacketAcknowledgementResponse.decode(new BinaryReader(data))); - } - packetAcknowledgements(request: QueryPacketAcknowledgementsRequest): Promise { - const data = QueryPacketAcknowledgementsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "PacketAcknowledgements", data); - return promise.then(data => QueryPacketAcknowledgementsResponse.decode(new BinaryReader(data))); - } - unreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise { - const data = QueryUnreceivedPacketsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "UnreceivedPackets", data); - return promise.then(data => QueryUnreceivedPacketsResponse.decode(new BinaryReader(data))); - } - unreceivedAcks(request: QueryUnreceivedAcksRequest): Promise { - const data = QueryUnreceivedAcksRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "UnreceivedAcks", data); - return promise.then(data => QueryUnreceivedAcksResponse.decode(new BinaryReader(data))); - } - nextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise { - const data = QueryNextSequenceReceiveRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Query", "NextSequenceReceive", data); - return promise.then(data => QueryNextSequenceReceiveResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - channel(request: QueryChannelRequest): Promise { - return queryService.channel(request); - }, - channels(request?: QueryChannelsRequest): Promise { - return queryService.channels(request); - }, - connectionChannels(request: QueryConnectionChannelsRequest): Promise { - return queryService.connectionChannels(request); - }, - channelClientState(request: QueryChannelClientStateRequest): Promise { - return queryService.channelClientState(request); - }, - channelConsensusState(request: QueryChannelConsensusStateRequest): Promise { - return queryService.channelConsensusState(request); - }, - packetCommitment(request: QueryPacketCommitmentRequest): Promise { - return queryService.packetCommitment(request); - }, - packetCommitments(request: QueryPacketCommitmentsRequest): Promise { - return queryService.packetCommitments(request); - }, - packetReceipt(request: QueryPacketReceiptRequest): Promise { - return queryService.packetReceipt(request); - }, - packetAcknowledgement(request: QueryPacketAcknowledgementRequest): Promise { - return queryService.packetAcknowledgement(request); - }, - packetAcknowledgements(request: QueryPacketAcknowledgementsRequest): Promise { - return queryService.packetAcknowledgements(request); - }, - unreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise { - return queryService.unreceivedPackets(request); - }, - unreceivedAcks(request: QueryUnreceivedAcksRequest): Promise { - return queryService.unreceivedAcks(request); - }, - nextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise { - return queryService.nextSequenceReceive(request); - } - }; -}; -export interface UseChannelQuery extends ReactQueryParams { - request: QueryChannelRequest; -} -export interface UseChannelsQuery extends ReactQueryParams { - request?: QueryChannelsRequest; -} -export interface UseConnectionChannelsQuery extends ReactQueryParams { - request: QueryConnectionChannelsRequest; -} -export interface UseChannelClientStateQuery extends ReactQueryParams { - request: QueryChannelClientStateRequest; -} -export interface UseChannelConsensusStateQuery extends ReactQueryParams { - request: QueryChannelConsensusStateRequest; -} -export interface UsePacketCommitmentQuery extends ReactQueryParams { - request: QueryPacketCommitmentRequest; -} -export interface UsePacketCommitmentsQuery extends ReactQueryParams { - request: QueryPacketCommitmentsRequest; -} -export interface UsePacketReceiptQuery extends ReactQueryParams { - request: QueryPacketReceiptRequest; -} -export interface UsePacketAcknowledgementQuery extends ReactQueryParams { - request: QueryPacketAcknowledgementRequest; -} -export interface UsePacketAcknowledgementsQuery extends ReactQueryParams { - request: QueryPacketAcknowledgementsRequest; -} -export interface UseUnreceivedPacketsQuery extends ReactQueryParams { - request: QueryUnreceivedPacketsRequest; -} -export interface UseUnreceivedAcksQuery extends ReactQueryParams { - request: QueryUnreceivedAcksRequest; -} -export interface UseNextSequenceReceiveQuery extends ReactQueryParams { - request: QueryNextSequenceReceiveRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useChannel = ({ - request, - options - }: UseChannelQuery) => { - return useQuery(["channelQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.channel(request); - }, options); - }; - const useChannels = ({ - request, - options - }: UseChannelsQuery) => { - return useQuery(["channelsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.channels(request); - }, options); - }; - const useConnectionChannels = ({ - request, - options - }: UseConnectionChannelsQuery) => { - return useQuery(["connectionChannelsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.connectionChannels(request); - }, options); - }; - const useChannelClientState = ({ - request, - options - }: UseChannelClientStateQuery) => { - return useQuery(["channelClientStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.channelClientState(request); - }, options); - }; - const useChannelConsensusState = ({ - request, - options - }: UseChannelConsensusStateQuery) => { - return useQuery(["channelConsensusStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.channelConsensusState(request); - }, options); - }; - const usePacketCommitment = ({ - request, - options - }: UsePacketCommitmentQuery) => { - return useQuery(["packetCommitmentQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.packetCommitment(request); - }, options); - }; - const usePacketCommitments = ({ - request, - options - }: UsePacketCommitmentsQuery) => { - return useQuery(["packetCommitmentsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.packetCommitments(request); - }, options); - }; - const usePacketReceipt = ({ - request, - options - }: UsePacketReceiptQuery) => { - return useQuery(["packetReceiptQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.packetReceipt(request); - }, options); - }; - const usePacketAcknowledgement = ({ - request, - options - }: UsePacketAcknowledgementQuery) => { - return useQuery(["packetAcknowledgementQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.packetAcknowledgement(request); - }, options); - }; - const usePacketAcknowledgements = ({ - request, - options - }: UsePacketAcknowledgementsQuery) => { - return useQuery(["packetAcknowledgementsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.packetAcknowledgements(request); - }, options); - }; - const useUnreceivedPackets = ({ - request, - options - }: UseUnreceivedPacketsQuery) => { - return useQuery(["unreceivedPacketsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.unreceivedPackets(request); - }, options); - }; - const useUnreceivedAcks = ({ - request, - options - }: UseUnreceivedAcksQuery) => { - return useQuery(["unreceivedAcksQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.unreceivedAcks(request); - }, options); - }; - const useNextSequenceReceive = ({ - request, - options - }: UseNextSequenceReceiveQuery) => { - return useQuery(["nextSequenceReceiveQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.nextSequenceReceive(request); - }, options); - }; - return { - /** Channel queries an IBC Channel. */useChannel, - /** Channels queries all the IBC channels of a chain. */useChannels, - /** - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - useConnectionChannels, - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - useChannelClientState, - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - useChannelConsensusState, - /** PacketCommitment queries a stored packet commitment hash. */usePacketCommitment, - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - usePacketCommitments, - /** - * PacketReceipt queries if a given packet sequence has been received on the - * queried chain - */ - usePacketReceipt, - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */usePacketAcknowledgement, - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - usePacketAcknowledgements, - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - useUnreceivedPackets, - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated - * with a channel and sequences. - */ - useUnreceivedAcks, - /** NextSequenceReceive returns the next receive sequence for a given channel. */useNextSequenceReceive - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryChannelStore { - store = new QueryStore(queryService?.channel); - channel(request: QueryChannelRequest) { - return this.store.getData(request); - } - } - class QueryChannelsStore { - store = new QueryStore(queryService?.channels); - channels(request: QueryChannelsRequest) { - return this.store.getData(request); - } - } - class QueryConnectionChannelsStore { - store = new QueryStore(queryService?.connectionChannels); - connectionChannels(request: QueryConnectionChannelsRequest) { - return this.store.getData(request); - } - } - class QueryChannelClientStateStore { - store = new QueryStore(queryService?.channelClientState); - channelClientState(request: QueryChannelClientStateRequest) { - return this.store.getData(request); - } - } - class QueryChannelConsensusStateStore { - store = new QueryStore(queryService?.channelConsensusState); - channelConsensusState(request: QueryChannelConsensusStateRequest) { - return this.store.getData(request); - } - } - class QueryPacketCommitmentStore { - store = new QueryStore(queryService?.packetCommitment); - packetCommitment(request: QueryPacketCommitmentRequest) { - return this.store.getData(request); - } - } - class QueryPacketCommitmentsStore { - store = new QueryStore(queryService?.packetCommitments); - packetCommitments(request: QueryPacketCommitmentsRequest) { - return this.store.getData(request); - } - } - class QueryPacketReceiptStore { - store = new QueryStore(queryService?.packetReceipt); - packetReceipt(request: QueryPacketReceiptRequest) { - return this.store.getData(request); - } - } - class QueryPacketAcknowledgementStore { - store = new QueryStore(queryService?.packetAcknowledgement); - packetAcknowledgement(request: QueryPacketAcknowledgementRequest) { - return this.store.getData(request); - } - } - class QueryPacketAcknowledgementsStore { - store = new QueryStore(queryService?.packetAcknowledgements); - packetAcknowledgements(request: QueryPacketAcknowledgementsRequest) { - return this.store.getData(request); - } - } - class QueryUnreceivedPacketsStore { - store = new QueryStore(queryService?.unreceivedPackets); - unreceivedPackets(request: QueryUnreceivedPacketsRequest) { - return this.store.getData(request); - } - } - class QueryUnreceivedAcksStore { - store = new QueryStore(queryService?.unreceivedAcks); - unreceivedAcks(request: QueryUnreceivedAcksRequest) { - return this.store.getData(request); - } - } - class QueryNextSequenceReceiveStore { - store = new QueryStore(queryService?.nextSequenceReceive); - nextSequenceReceive(request: QueryNextSequenceReceiveRequest) { - return this.store.getData(request); - } - } - return { - /** Channel queries an IBC Channel. */QueryChannelStore, - /** Channels queries all the IBC channels of a chain. */QueryChannelsStore, - /** - * ConnectionChannels queries all the channels associated with a connection - * end. - */ - QueryConnectionChannelsStore, - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ - QueryChannelClientStateStore, - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ - QueryChannelConsensusStateStore, - /** PacketCommitment queries a stored packet commitment hash. */QueryPacketCommitmentStore, - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ - QueryPacketCommitmentsStore, - /** - * PacketReceipt queries if a given packet sequence has been received on the - * queried chain - */ - QueryPacketReceiptStore, - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */QueryPacketAcknowledgementStore, - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ - QueryPacketAcknowledgementsStore, - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ - QueryUnreceivedPacketsStore, - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated - * with a channel and sequences. - */ - QueryUnreceivedAcksStore, - /** NextSequenceReceive returns the next receive sequence for a given channel. */QueryNextSequenceReceiveStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/query.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/query.ts deleted file mode 100644 index 946f588a..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/query.ts +++ /dev/null @@ -1,4127 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Channel, ChannelAmino, ChannelSDKType, IdentifiedChannel, IdentifiedChannelAmino, IdentifiedChannelSDKType, PacketState, PacketStateAmino, PacketStateSDKType } from "./channel"; -import { Height, HeightAmino, HeightSDKType, IdentifiedClientState, IdentifiedClientStateAmino, IdentifiedClientStateSDKType } from "../../client/v1/client"; -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** QueryChannelRequest is the request type for the Query/Channel RPC method */ -export interface QueryChannelRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} -export interface QueryChannelRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelRequest"; - value: Uint8Array; -} -/** QueryChannelRequest is the request type for the Query/Channel RPC method */ -export interface QueryChannelRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; -} -export interface QueryChannelRequestAminoMsg { - type: "cosmos-sdk/QueryChannelRequest"; - value: QueryChannelRequestAmino; -} -/** QueryChannelRequest is the request type for the Query/Channel RPC method */ -export interface QueryChannelRequestSDKType { - port_id: string; - channel_id: string; -} -/** - * QueryChannelResponse is the response type for the Query/Channel RPC method. - * Besides the Channel end, it includes a proof and the height from which the - * proof was retrieved. - */ -export interface QueryChannelResponse { - /** channel associated with the request identifiers */ - channel: Channel | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryChannelResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelResponse"; - value: Uint8Array; -} -/** - * QueryChannelResponse is the response type for the Query/Channel RPC method. - * Besides the Channel end, it includes a proof and the height from which the - * proof was retrieved. - */ -export interface QueryChannelResponseAmino { - /** channel associated with the request identifiers */ - channel?: ChannelAmino | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryChannelResponseAminoMsg { - type: "cosmos-sdk/QueryChannelResponse"; - value: QueryChannelResponseAmino; -} -/** - * QueryChannelResponse is the response type for the Query/Channel RPC method. - * Besides the Channel end, it includes a proof and the height from which the - * proof was retrieved. - */ -export interface QueryChannelResponseSDKType { - channel: ChannelSDKType | undefined; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ -export interface QueryChannelsRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} -export interface QueryChannelsRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelsRequest"; - value: Uint8Array; -} -/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ -export interface QueryChannelsRequestAmino { - /** pagination request */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryChannelsRequestAminoMsg { - type: "cosmos-sdk/QueryChannelsRequest"; - value: QueryChannelsRequestAmino; -} -/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ -export interface QueryChannelsRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ -export interface QueryChannelsResponse { - /** list of stored channels of the chain. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -export interface QueryChannelsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelsResponse"; - value: Uint8Array; -} -/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ -export interface QueryChannelsResponseAmino { - /** list of stored channels of the chain. */ - channels: IdentifiedChannelAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryChannelsResponseAminoMsg { - type: "cosmos-sdk/QueryChannelsResponse"; - value: QueryChannelsResponseAmino; -} -/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ -export interface QueryChannelsResponseSDKType { - channels: IdentifiedChannelSDKType[]; - pagination: PageResponseSDKType | undefined; - height: HeightSDKType | undefined; -} -/** - * QueryConnectionChannelsRequest is the request type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsRequest { - /** connection unique identifier */ - connection: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -export interface QueryConnectionChannelsRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryConnectionChannelsRequest"; - value: Uint8Array; -} -/** - * QueryConnectionChannelsRequest is the request type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsRequestAmino { - /** connection unique identifier */ - connection: string; - /** pagination request */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryConnectionChannelsRequestAminoMsg { - type: "cosmos-sdk/QueryConnectionChannelsRequest"; - value: QueryConnectionChannelsRequestAmino; -} -/** - * QueryConnectionChannelsRequest is the request type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsRequestSDKType { - connection: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryConnectionChannelsResponse is the Response type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsResponse { - /** list of channels associated with a connection. */ - channels: IdentifiedChannel[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -export interface QueryConnectionChannelsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryConnectionChannelsResponse"; - value: Uint8Array; -} -/** - * QueryConnectionChannelsResponse is the Response type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsResponseAmino { - /** list of channels associated with a connection. */ - channels: IdentifiedChannelAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryConnectionChannelsResponseAminoMsg { - type: "cosmos-sdk/QueryConnectionChannelsResponse"; - value: QueryConnectionChannelsResponseAmino; -} -/** - * QueryConnectionChannelsResponse is the Response type for the - * Query/QueryConnectionChannels RPC method - */ -export interface QueryConnectionChannelsResponseSDKType { - channels: IdentifiedChannelSDKType[]; - pagination: PageResponseSDKType | undefined; - height: HeightSDKType | undefined; -} -/** - * QueryChannelClientStateRequest is the request type for the Query/ClientState - * RPC method - */ -export interface QueryChannelClientStateRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} -export interface QueryChannelClientStateRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelClientStateRequest"; - value: Uint8Array; -} -/** - * QueryChannelClientStateRequest is the request type for the Query/ClientState - * RPC method - */ -export interface QueryChannelClientStateRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; -} -export interface QueryChannelClientStateRequestAminoMsg { - type: "cosmos-sdk/QueryChannelClientStateRequest"; - value: QueryChannelClientStateRequestAmino; -} -/** - * QueryChannelClientStateRequest is the request type for the Query/ClientState - * RPC method - */ -export interface QueryChannelClientStateRequestSDKType { - port_id: string; - channel_id: string; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelClientStateResponse { - /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryChannelClientStateResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelClientStateResponse"; - value: Uint8Array; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelClientStateResponseAmino { - /** client state associated with the channel */ - identified_client_state?: IdentifiedClientStateAmino | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryChannelClientStateResponseAminoMsg { - type: "cosmos-sdk/QueryChannelClientStateResponse"; - value: QueryChannelClientStateResponseAmino; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelClientStateResponseSDKType { - identified_client_state: IdentifiedClientStateSDKType | undefined; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryChannelConsensusStateRequest is the request type for the - * Query/ConsensusState RPC method - */ -export interface QueryChannelConsensusStateRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** revision number of the consensus state */ - revisionNumber: bigint; - /** revision height of the consensus state */ - revisionHeight: bigint; -} -export interface QueryChannelConsensusStateRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelConsensusStateRequest"; - value: Uint8Array; -} -/** - * QueryChannelConsensusStateRequest is the request type for the - * Query/ConsensusState RPC method - */ -export interface QueryChannelConsensusStateRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** revision number of the consensus state */ - revision_number: string; - /** revision height of the consensus state */ - revision_height: string; -} -export interface QueryChannelConsensusStateRequestAminoMsg { - type: "cosmos-sdk/QueryChannelConsensusStateRequest"; - value: QueryChannelConsensusStateRequestAmino; -} -/** - * QueryChannelConsensusStateRequest is the request type for the - * Query/ConsensusState RPC method - */ -export interface QueryChannelConsensusStateRequestSDKType { - port_id: string; - channel_id: string; - revision_number: bigint; - revision_height: bigint; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelConsensusStateResponse { - /** consensus state associated with the channel */ - consensusState: Any | undefined; - /** client ID associated with the consensus state */ - clientId: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryChannelConsensusStateResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryChannelConsensusStateResponse"; - value: Uint8Array; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelConsensusStateResponseAmino { - /** consensus state associated with the channel */ - consensus_state?: AnyAmino | undefined; - /** client ID associated with the consensus state */ - client_id: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryChannelConsensusStateResponseAminoMsg { - type: "cosmos-sdk/QueryChannelConsensusStateResponse"; - value: QueryChannelConsensusStateResponseAmino; -} -/** - * QueryChannelClientStateResponse is the Response type for the - * Query/QueryChannelClientState RPC method - */ -export interface QueryChannelConsensusStateResponseSDKType { - consensus_state: AnySDKType | undefined; - client_id: string; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryPacketCommitmentRequest is the request type for the - * Query/PacketCommitment RPC method - */ -export interface QueryPacketCommitmentRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: bigint; -} -export interface QueryPacketCommitmentRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentRequest"; - value: Uint8Array; -} -/** - * QueryPacketCommitmentRequest is the request type for the - * Query/PacketCommitment RPC method - */ -export interface QueryPacketCommitmentRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** packet sequence */ - sequence: string; -} -export interface QueryPacketCommitmentRequestAminoMsg { - type: "cosmos-sdk/QueryPacketCommitmentRequest"; - value: QueryPacketCommitmentRequestAmino; -} -/** - * QueryPacketCommitmentRequest is the request type for the - * Query/PacketCommitment RPC method - */ -export interface QueryPacketCommitmentRequestSDKType { - port_id: string; - channel_id: string; - sequence: bigint; -} -/** - * QueryPacketCommitmentResponse defines the client query response for a packet - * which also includes a proof and the height from which the proof was - * retrieved - */ -export interface QueryPacketCommitmentResponse { - /** packet associated with the request fields */ - commitment: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryPacketCommitmentResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentResponse"; - value: Uint8Array; -} -/** - * QueryPacketCommitmentResponse defines the client query response for a packet - * which also includes a proof and the height from which the proof was - * retrieved - */ -export interface QueryPacketCommitmentResponseAmino { - /** packet associated with the request fields */ - commitment: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryPacketCommitmentResponseAminoMsg { - type: "cosmos-sdk/QueryPacketCommitmentResponse"; - value: QueryPacketCommitmentResponseAmino; -} -/** - * QueryPacketCommitmentResponse defines the client query response for a packet - * which also includes a proof and the height from which the proof was - * retrieved - */ -export interface QueryPacketCommitmentResponseSDKType { - commitment: Uint8Array; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryPacketCommitmentsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -export interface QueryPacketCommitmentsRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentsRequest"; - value: Uint8Array; -} -/** - * QueryPacketCommitmentsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** pagination request */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryPacketCommitmentsRequestAminoMsg { - type: "cosmos-sdk/QueryPacketCommitmentsRequest"; - value: QueryPacketCommitmentsRequestAmino; -} -/** - * QueryPacketCommitmentsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsRequestSDKType { - port_id: string; - channel_id: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryPacketCommitmentsResponse is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsResponse { - commitments: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -export interface QueryPacketCommitmentsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentsResponse"; - value: Uint8Array; -} -/** - * QueryPacketCommitmentsResponse is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsResponseAmino { - commitments: PacketStateAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryPacketCommitmentsResponseAminoMsg { - type: "cosmos-sdk/QueryPacketCommitmentsResponse"; - value: QueryPacketCommitmentsResponseAmino; -} -/** - * QueryPacketCommitmentsResponse is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketCommitmentsResponseSDKType { - commitments: PacketStateSDKType[]; - pagination: PageResponseSDKType | undefined; - height: HeightSDKType | undefined; -} -/** - * QueryPacketReceiptRequest is the request type for the - * Query/PacketReceipt RPC method - */ -export interface QueryPacketReceiptRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: bigint; -} -export interface QueryPacketReceiptRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketReceiptRequest"; - value: Uint8Array; -} -/** - * QueryPacketReceiptRequest is the request type for the - * Query/PacketReceipt RPC method - */ -export interface QueryPacketReceiptRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** packet sequence */ - sequence: string; -} -export interface QueryPacketReceiptRequestAminoMsg { - type: "cosmos-sdk/QueryPacketReceiptRequest"; - value: QueryPacketReceiptRequestAmino; -} -/** - * QueryPacketReceiptRequest is the request type for the - * Query/PacketReceipt RPC method - */ -export interface QueryPacketReceiptRequestSDKType { - port_id: string; - channel_id: string; - sequence: bigint; -} -/** - * QueryPacketReceiptResponse defines the client query response for a packet - * receipt which also includes a proof, and the height from which the proof was - * retrieved - */ -export interface QueryPacketReceiptResponse { - /** success flag for if receipt exists */ - received: boolean; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryPacketReceiptResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketReceiptResponse"; - value: Uint8Array; -} -/** - * QueryPacketReceiptResponse defines the client query response for a packet - * receipt which also includes a proof, and the height from which the proof was - * retrieved - */ -export interface QueryPacketReceiptResponseAmino { - /** success flag for if receipt exists */ - received: boolean; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryPacketReceiptResponseAminoMsg { - type: "cosmos-sdk/QueryPacketReceiptResponse"; - value: QueryPacketReceiptResponseAmino; -} -/** - * QueryPacketReceiptResponse defines the client query response for a packet - * receipt which also includes a proof, and the height from which the proof was - * retrieved - */ -export interface QueryPacketReceiptResponseSDKType { - received: boolean; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryPacketAcknowledgementRequest is the request type for the - * Query/PacketAcknowledgement RPC method - */ -export interface QueryPacketAcknowledgementRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** packet sequence */ - sequence: bigint; -} -export interface QueryPacketAcknowledgementRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementRequest"; - value: Uint8Array; -} -/** - * QueryPacketAcknowledgementRequest is the request type for the - * Query/PacketAcknowledgement RPC method - */ -export interface QueryPacketAcknowledgementRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** packet sequence */ - sequence: string; -} -export interface QueryPacketAcknowledgementRequestAminoMsg { - type: "cosmos-sdk/QueryPacketAcknowledgementRequest"; - value: QueryPacketAcknowledgementRequestAmino; -} -/** - * QueryPacketAcknowledgementRequest is the request type for the - * Query/PacketAcknowledgement RPC method - */ -export interface QueryPacketAcknowledgementRequestSDKType { - port_id: string; - channel_id: string; - sequence: bigint; -} -/** - * QueryPacketAcknowledgementResponse defines the client query response for a - * packet which also includes a proof and the height from which the - * proof was retrieved - */ -export interface QueryPacketAcknowledgementResponse { - /** packet associated with the request fields */ - acknowledgement: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryPacketAcknowledgementResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementResponse"; - value: Uint8Array; -} -/** - * QueryPacketAcknowledgementResponse defines the client query response for a - * packet which also includes a proof and the height from which the - * proof was retrieved - */ -export interface QueryPacketAcknowledgementResponseAmino { - /** packet associated with the request fields */ - acknowledgement: Uint8Array; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryPacketAcknowledgementResponseAminoMsg { - type: "cosmos-sdk/QueryPacketAcknowledgementResponse"; - value: QueryPacketAcknowledgementResponseAmino; -} -/** - * QueryPacketAcknowledgementResponse defines the client query response for a - * packet which also includes a proof and the height from which the - * proof was retrieved - */ -export interface QueryPacketAcknowledgementResponseSDKType { - acknowledgement: Uint8Array; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryPacketAcknowledgementsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketAcknowledgementsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** pagination request */ - pagination: PageRequest | undefined; - /** list of packet sequences */ - packetCommitmentSequences: bigint[]; -} -export interface QueryPacketAcknowledgementsRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest"; - value: Uint8Array; -} -/** - * QueryPacketAcknowledgementsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketAcknowledgementsRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** pagination request */ - pagination?: PageRequestAmino | undefined; - /** list of packet sequences */ - packet_commitment_sequences: string[]; -} -export interface QueryPacketAcknowledgementsRequestAminoMsg { - type: "cosmos-sdk/QueryPacketAcknowledgementsRequest"; - value: QueryPacketAcknowledgementsRequestAmino; -} -/** - * QueryPacketAcknowledgementsRequest is the request type for the - * Query/QueryPacketCommitments RPC method - */ -export interface QueryPacketAcknowledgementsRequestSDKType { - port_id: string; - channel_id: string; - pagination: PageRequestSDKType | undefined; - packet_commitment_sequences: bigint[]; -} -/** - * QueryPacketAcknowledgemetsResponse is the request type for the - * Query/QueryPacketAcknowledgements RPC method - */ -export interface QueryPacketAcknowledgementsResponse { - acknowledgements: PacketState[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -export interface QueryPacketAcknowledgementsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse"; - value: Uint8Array; -} -/** - * QueryPacketAcknowledgemetsResponse is the request type for the - * Query/QueryPacketAcknowledgements RPC method - */ -export interface QueryPacketAcknowledgementsResponseAmino { - acknowledgements: PacketStateAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryPacketAcknowledgementsResponseAminoMsg { - type: "cosmos-sdk/QueryPacketAcknowledgementsResponse"; - value: QueryPacketAcknowledgementsResponseAmino; -} -/** - * QueryPacketAcknowledgemetsResponse is the request type for the - * Query/QueryPacketAcknowledgements RPC method - */ -export interface QueryPacketAcknowledgementsResponseSDKType { - acknowledgements: PacketStateSDKType[]; - pagination: PageResponseSDKType | undefined; - height: HeightSDKType | undefined; -} -/** - * QueryUnreceivedPacketsRequest is the request type for the - * Query/UnreceivedPackets RPC method - */ -export interface QueryUnreceivedPacketsRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** list of packet sequences */ - packetCommitmentSequences: bigint[]; -} -export interface QueryUnreceivedPacketsRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedPacketsRequest"; - value: Uint8Array; -} -/** - * QueryUnreceivedPacketsRequest is the request type for the - * Query/UnreceivedPackets RPC method - */ -export interface QueryUnreceivedPacketsRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** list of packet sequences */ - packet_commitment_sequences: string[]; -} -export interface QueryUnreceivedPacketsRequestAminoMsg { - type: "cosmos-sdk/QueryUnreceivedPacketsRequest"; - value: QueryUnreceivedPacketsRequestAmino; -} -/** - * QueryUnreceivedPacketsRequest is the request type for the - * Query/UnreceivedPackets RPC method - */ -export interface QueryUnreceivedPacketsRequestSDKType { - port_id: string; - channel_id: string; - packet_commitment_sequences: bigint[]; -} -/** - * QueryUnreceivedPacketsResponse is the response type for the - * Query/UnreceivedPacketCommitments RPC method - */ -export interface QueryUnreceivedPacketsResponse { - /** list of unreceived packet sequences */ - sequences: bigint[]; - /** query block height */ - height: Height | undefined; -} -export interface QueryUnreceivedPacketsResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedPacketsResponse"; - value: Uint8Array; -} -/** - * QueryUnreceivedPacketsResponse is the response type for the - * Query/UnreceivedPacketCommitments RPC method - */ -export interface QueryUnreceivedPacketsResponseAmino { - /** list of unreceived packet sequences */ - sequences: string[]; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryUnreceivedPacketsResponseAminoMsg { - type: "cosmos-sdk/QueryUnreceivedPacketsResponse"; - value: QueryUnreceivedPacketsResponseAmino; -} -/** - * QueryUnreceivedPacketsResponse is the response type for the - * Query/UnreceivedPacketCommitments RPC method - */ -export interface QueryUnreceivedPacketsResponseSDKType { - sequences: bigint[]; - height: HeightSDKType | undefined; -} -/** - * QueryUnreceivedAcks is the request type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; - /** list of acknowledgement sequences */ - packetAckSequences: bigint[]; -} -export interface QueryUnreceivedAcksRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedAcksRequest"; - value: Uint8Array; -} -/** - * QueryUnreceivedAcks is the request type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; - /** list of acknowledgement sequences */ - packet_ack_sequences: string[]; -} -export interface QueryUnreceivedAcksRequestAminoMsg { - type: "cosmos-sdk/QueryUnreceivedAcksRequest"; - value: QueryUnreceivedAcksRequestAmino; -} -/** - * QueryUnreceivedAcks is the request type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksRequestSDKType { - port_id: string; - channel_id: string; - packet_ack_sequences: bigint[]; -} -/** - * QueryUnreceivedAcksResponse is the response type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksResponse { - /** list of unreceived acknowledgement sequences */ - sequences: bigint[]; - /** query block height */ - height: Height | undefined; -} -export interface QueryUnreceivedAcksResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedAcksResponse"; - value: Uint8Array; -} -/** - * QueryUnreceivedAcksResponse is the response type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksResponseAmino { - /** list of unreceived acknowledgement sequences */ - sequences: string[]; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryUnreceivedAcksResponseAminoMsg { - type: "cosmos-sdk/QueryUnreceivedAcksResponse"; - value: QueryUnreceivedAcksResponseAmino; -} -/** - * QueryUnreceivedAcksResponse is the response type for the - * Query/UnreceivedAcks RPC method - */ -export interface QueryUnreceivedAcksResponseSDKType { - sequences: bigint[]; - height: HeightSDKType | undefined; -} -/** - * QueryNextSequenceReceiveRequest is the request type for the - * Query/QueryNextSequenceReceiveRequest RPC method - */ -export interface QueryNextSequenceReceiveRequest { - /** port unique identifier */ - portId: string; - /** channel unique identifier */ - channelId: string; -} -export interface QueryNextSequenceReceiveRequestProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryNextSequenceReceiveRequest"; - value: Uint8Array; -} -/** - * QueryNextSequenceReceiveRequest is the request type for the - * Query/QueryNextSequenceReceiveRequest RPC method - */ -export interface QueryNextSequenceReceiveRequestAmino { - /** port unique identifier */ - port_id: string; - /** channel unique identifier */ - channel_id: string; -} -export interface QueryNextSequenceReceiveRequestAminoMsg { - type: "cosmos-sdk/QueryNextSequenceReceiveRequest"; - value: QueryNextSequenceReceiveRequestAmino; -} -/** - * QueryNextSequenceReceiveRequest is the request type for the - * Query/QueryNextSequenceReceiveRequest RPC method - */ -export interface QueryNextSequenceReceiveRequestSDKType { - port_id: string; - channel_id: string; -} -/** - * QuerySequenceResponse is the request type for the - * Query/QueryNextSequenceReceiveResponse RPC method - */ -export interface QueryNextSequenceReceiveResponse { - /** next sequence receive number */ - nextSequenceReceive: bigint; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryNextSequenceReceiveResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.QueryNextSequenceReceiveResponse"; - value: Uint8Array; -} -/** - * QuerySequenceResponse is the request type for the - * Query/QueryNextSequenceReceiveResponse RPC method - */ -export interface QueryNextSequenceReceiveResponseAmino { - /** next sequence receive number */ - next_sequence_receive: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryNextSequenceReceiveResponseAminoMsg { - type: "cosmos-sdk/QueryNextSequenceReceiveResponse"; - value: QueryNextSequenceReceiveResponseAmino; -} -/** - * QuerySequenceResponse is the request type for the - * Query/QueryNextSequenceReceiveResponse RPC method - */ -export interface QueryNextSequenceReceiveResponseSDKType { - next_sequence_receive: bigint; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -function createBaseQueryChannelRequest(): QueryChannelRequest { - return { - portId: "", - channelId: "" - }; -} -export const QueryChannelRequest = { - typeUrl: "/ibc.core.channel.v1.QueryChannelRequest", - aminoType: "cosmos-sdk/QueryChannelRequest", - encode(message: QueryChannelRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "" - }; - }, - toJSON(message: QueryChannelRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelRequest { - const message = createBaseQueryChannelRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - return message; - }, - fromSDK(object: QueryChannelRequestSDKType): QueryChannelRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id - }; - }, - toSDK(message: QueryChannelRequest): QueryChannelRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAmino(object: QueryChannelRequestAmino): QueryChannelRequest { - return { - portId: object.port_id, - channelId: object.channel_id - }; - }, - toAmino(message: QueryChannelRequest): QueryChannelRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAminoMsg(object: QueryChannelRequestAminoMsg): QueryChannelRequest { - return QueryChannelRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelRequest): QueryChannelRequestAminoMsg { - return { - type: "cosmos-sdk/QueryChannelRequest", - value: QueryChannelRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelRequestProtoMsg): QueryChannelRequest { - return QueryChannelRequest.decode(message.value); - }, - toProto(message: QueryChannelRequest): Uint8Array { - return QueryChannelRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelRequest): QueryChannelRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelRequest", - value: QueryChannelRequest.encode(message).finish() - }; - } -}; -function createBaseQueryChannelResponse(): QueryChannelResponse { - return { - channel: Channel.fromPartial({}), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryChannelResponse = { - typeUrl: "/ibc.core.channel.v1.QueryChannelResponse", - aminoType: "cosmos-sdk/QueryChannelResponse", - encode(message: QueryChannelResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelResponse { - return { - channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryChannelResponse): unknown { - const obj: any = {}; - message.channel !== undefined && (obj.channel = message.channel ? Channel.toJSON(message.channel) : undefined); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelResponse { - const message = createBaseQueryChannelResponse(); - message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryChannelResponseSDKType): QueryChannelResponse { - return { - channel: object.channel ? Channel.fromSDK(object.channel) : undefined, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryChannelResponse): QueryChannelResponseSDKType { - const obj: any = {}; - message.channel !== undefined && (obj.channel = message.channel ? Channel.toSDK(message.channel) : undefined); - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryChannelResponseAmino): QueryChannelResponse { - return { - channel: object?.channel ? Channel.fromAmino(object.channel) : undefined, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryChannelResponse): QueryChannelResponseAmino { - const obj: any = {}; - obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryChannelResponseAminoMsg): QueryChannelResponse { - return QueryChannelResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelResponse): QueryChannelResponseAminoMsg { - return { - type: "cosmos-sdk/QueryChannelResponse", - value: QueryChannelResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelResponseProtoMsg): QueryChannelResponse { - return QueryChannelResponse.decode(message.value); - }, - toProto(message: QueryChannelResponse): Uint8Array { - return QueryChannelResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelResponse): QueryChannelResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelResponse", - value: QueryChannelResponse.encode(message).finish() - }; - } -}; -function createBaseQueryChannelsRequest(): QueryChannelsRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryChannelsRequest = { - typeUrl: "/ibc.core.channel.v1.QueryChannelsRequest", - aminoType: "cosmos-sdk/QueryChannelsRequest", - encode(message: QueryChannelsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelsRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryChannelsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelsRequest { - const message = createBaseQueryChannelsRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryChannelsRequestSDKType): QueryChannelsRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryChannelsRequest): QueryChannelsRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryChannelsRequestAmino): QueryChannelsRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryChannelsRequest): QueryChannelsRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryChannelsRequestAminoMsg): QueryChannelsRequest { - return QueryChannelsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelsRequest): QueryChannelsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryChannelsRequest", - value: QueryChannelsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelsRequestProtoMsg): QueryChannelsRequest { - return QueryChannelsRequest.decode(message.value); - }, - toProto(message: QueryChannelsRequest): Uint8Array { - return QueryChannelsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelsRequest): QueryChannelsRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelsRequest", - value: QueryChannelsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryChannelsResponse(): QueryChannelsResponse { - return { - channels: [], - pagination: PageResponse.fromPartial({}), - height: Height.fromPartial({}) - }; -} -export const QueryChannelsResponse = { - typeUrl: "/ibc.core.channel.v1.QueryChannelsResponse", - aminoType: "cosmos-sdk/QueryChannelsResponse", - encode(message: QueryChannelsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push(IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelsResponse { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryChannelsResponse): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toJSON(e) : undefined); - } else { - obj.channels = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelsResponse { - const message = createBaseQueryChannelsResponse(); - message.channels = object.channels?.map(e => IdentifiedChannel.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryChannelsResponseSDKType): QueryChannelsResponse { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined, - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryChannelsResponse): QueryChannelsResponseSDKType { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toSDK(e) : undefined); - } else { - obj.channels = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryChannelsResponseAmino): QueryChannelsResponse { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined, - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryChannelsResponse): QueryChannelsResponseAmino { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toAmino(e) : undefined); - } else { - obj.channels = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryChannelsResponseAminoMsg): QueryChannelsResponse { - return QueryChannelsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelsResponse): QueryChannelsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryChannelsResponse", - value: QueryChannelsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelsResponseProtoMsg): QueryChannelsResponse { - return QueryChannelsResponse.decode(message.value); - }, - toProto(message: QueryChannelsResponse): Uint8Array { - return QueryChannelsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelsResponse): QueryChannelsResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelsResponse", - value: QueryChannelsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionChannelsRequest(): QueryConnectionChannelsRequest { - return { - connection: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryConnectionChannelsRequest = { - typeUrl: "/ibc.core.channel.v1.QueryConnectionChannelsRequest", - aminoType: "cosmos-sdk/QueryConnectionChannelsRequest", - encode(message: QueryConnectionChannelsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connection !== "") { - writer.uint32(10).string(message.connection); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionChannelsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionChannelsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionChannelsRequest { - return { - connection: isSet(object.connection) ? String(object.connection) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryConnectionChannelsRequest): unknown { - const obj: any = {}; - message.connection !== undefined && (obj.connection = message.connection); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionChannelsRequest { - const message = createBaseQueryConnectionChannelsRequest(); - message.connection = object.connection ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryConnectionChannelsRequestSDKType): QueryConnectionChannelsRequest { - return { - connection: object?.connection, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryConnectionChannelsRequest): QueryConnectionChannelsRequestSDKType { - const obj: any = {}; - obj.connection = message.connection; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionChannelsRequestAmino): QueryConnectionChannelsRequest { - return { - connection: object.connection, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryConnectionChannelsRequest): QueryConnectionChannelsRequestAmino { - const obj: any = {}; - obj.connection = message.connection; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryConnectionChannelsRequestAminoMsg): QueryConnectionChannelsRequest { - return QueryConnectionChannelsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionChannelsRequest): QueryConnectionChannelsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionChannelsRequest", - value: QueryConnectionChannelsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionChannelsRequestProtoMsg): QueryConnectionChannelsRequest { - return QueryConnectionChannelsRequest.decode(message.value); - }, - toProto(message: QueryConnectionChannelsRequest): Uint8Array { - return QueryConnectionChannelsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionChannelsRequest): QueryConnectionChannelsRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryConnectionChannelsRequest", - value: QueryConnectionChannelsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionChannelsResponse(): QueryConnectionChannelsResponse { - return { - channels: [], - pagination: PageResponse.fromPartial({}), - height: Height.fromPartial({}) - }; -} -export const QueryConnectionChannelsResponse = { - typeUrl: "/ibc.core.channel.v1.QueryConnectionChannelsResponse", - aminoType: "cosmos-sdk/QueryConnectionChannelsResponse", - encode(message: QueryConnectionChannelsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.channels) { - IdentifiedChannel.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionChannelsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionChannelsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channels.push(IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionChannelsResponse { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryConnectionChannelsResponse): unknown { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toJSON(e) : undefined); - } else { - obj.channels = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionChannelsResponse { - const message = createBaseQueryConnectionChannelsResponse(); - message.channels = object.channels?.map(e => IdentifiedChannel.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryConnectionChannelsResponseSDKType): QueryConnectionChannelsResponse { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined, - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryConnectionChannelsResponse): QueryConnectionChannelsResponseSDKType { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toSDK(e) : undefined); - } else { - obj.channels = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionChannelsResponseAmino): QueryConnectionChannelsResponse { - return { - channels: Array.isArray(object?.channels) ? object.channels.map((e: any) => IdentifiedChannel.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined, - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryConnectionChannelsResponse): QueryConnectionChannelsResponseAmino { - const obj: any = {}; - if (message.channels) { - obj.channels = message.channels.map(e => e ? IdentifiedChannel.toAmino(e) : undefined); - } else { - obj.channels = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryConnectionChannelsResponseAminoMsg): QueryConnectionChannelsResponse { - return QueryConnectionChannelsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionChannelsResponse): QueryConnectionChannelsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionChannelsResponse", - value: QueryConnectionChannelsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionChannelsResponseProtoMsg): QueryConnectionChannelsResponse { - return QueryConnectionChannelsResponse.decode(message.value); - }, - toProto(message: QueryConnectionChannelsResponse): Uint8Array { - return QueryConnectionChannelsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionChannelsResponse): QueryConnectionChannelsResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryConnectionChannelsResponse", - value: QueryConnectionChannelsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryChannelClientStateRequest(): QueryChannelClientStateRequest { - return { - portId: "", - channelId: "" - }; -} -export const QueryChannelClientStateRequest = { - typeUrl: "/ibc.core.channel.v1.QueryChannelClientStateRequest", - aminoType: "cosmos-sdk/QueryChannelClientStateRequest", - encode(message: QueryChannelClientStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelClientStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelClientStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelClientStateRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "" - }; - }, - toJSON(message: QueryChannelClientStateRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelClientStateRequest { - const message = createBaseQueryChannelClientStateRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - return message; - }, - fromSDK(object: QueryChannelClientStateRequestSDKType): QueryChannelClientStateRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id - }; - }, - toSDK(message: QueryChannelClientStateRequest): QueryChannelClientStateRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAmino(object: QueryChannelClientStateRequestAmino): QueryChannelClientStateRequest { - return { - portId: object.port_id, - channelId: object.channel_id - }; - }, - toAmino(message: QueryChannelClientStateRequest): QueryChannelClientStateRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAminoMsg(object: QueryChannelClientStateRequestAminoMsg): QueryChannelClientStateRequest { - return QueryChannelClientStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelClientStateRequest): QueryChannelClientStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryChannelClientStateRequest", - value: QueryChannelClientStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelClientStateRequestProtoMsg): QueryChannelClientStateRequest { - return QueryChannelClientStateRequest.decode(message.value); - }, - toProto(message: QueryChannelClientStateRequest): Uint8Array { - return QueryChannelClientStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelClientStateRequest): QueryChannelClientStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelClientStateRequest", - value: QueryChannelClientStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryChannelClientStateResponse(): QueryChannelClientStateResponse { - return { - identifiedClientState: IdentifiedClientState.fromPartial({}), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryChannelClientStateResponse = { - typeUrl: "/ibc.core.channel.v1.QueryChannelClientStateResponse", - aminoType: "cosmos-sdk/QueryChannelClientStateResponse", - encode(message: QueryChannelClientStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.identifiedClientState !== undefined) { - IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelClientStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelClientStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifiedClientState = IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelClientStateResponse { - return { - identifiedClientState: isSet(object.identifiedClientState) ? IdentifiedClientState.fromJSON(object.identifiedClientState) : undefined, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryChannelClientStateResponse): unknown { - const obj: any = {}; - message.identifiedClientState !== undefined && (obj.identifiedClientState = message.identifiedClientState ? IdentifiedClientState.toJSON(message.identifiedClientState) : undefined); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelClientStateResponse { - const message = createBaseQueryChannelClientStateResponse(); - message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null ? IdentifiedClientState.fromPartial(object.identifiedClientState) : undefined; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryChannelClientStateResponseSDKType): QueryChannelClientStateResponse { - return { - identifiedClientState: object.identified_client_state ? IdentifiedClientState.fromSDK(object.identified_client_state) : undefined, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryChannelClientStateResponse): QueryChannelClientStateResponseSDKType { - const obj: any = {}; - message.identifiedClientState !== undefined && (obj.identified_client_state = message.identifiedClientState ? IdentifiedClientState.toSDK(message.identifiedClientState) : undefined); - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryChannelClientStateResponseAmino): QueryChannelClientStateResponse { - return { - identifiedClientState: object?.identified_client_state ? IdentifiedClientState.fromAmino(object.identified_client_state) : undefined, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryChannelClientStateResponse): QueryChannelClientStateResponseAmino { - const obj: any = {}; - obj.identified_client_state = message.identifiedClientState ? IdentifiedClientState.toAmino(message.identifiedClientState) : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryChannelClientStateResponseAminoMsg): QueryChannelClientStateResponse { - return QueryChannelClientStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelClientStateResponse): QueryChannelClientStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryChannelClientStateResponse", - value: QueryChannelClientStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelClientStateResponseProtoMsg): QueryChannelClientStateResponse { - return QueryChannelClientStateResponse.decode(message.value); - }, - toProto(message: QueryChannelClientStateResponse): Uint8Array { - return QueryChannelClientStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelClientStateResponse): QueryChannelClientStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelClientStateResponse", - value: QueryChannelClientStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryChannelConsensusStateRequest(): QueryChannelConsensusStateRequest { - return { - portId: "", - channelId: "", - revisionNumber: BigInt(0), - revisionHeight: BigInt(0) - }; -} -export const QueryChannelConsensusStateRequest = { - typeUrl: "/ibc.core.channel.v1.QueryChannelConsensusStateRequest", - aminoType: "cosmos-sdk/QueryChannelConsensusStateRequest", - encode(message: QueryChannelConsensusStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.revisionNumber !== BigInt(0)) { - writer.uint32(24).uint64(message.revisionNumber); - } - if (message.revisionHeight !== BigInt(0)) { - writer.uint32(32).uint64(message.revisionHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelConsensusStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelConsensusStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.revisionNumber = reader.uint64(); - break; - case 4: - message.revisionHeight = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelConsensusStateRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - revisionNumber: isSet(object.revisionNumber) ? BigInt(object.revisionNumber.toString()) : BigInt(0), - revisionHeight: isSet(object.revisionHeight) ? BigInt(object.revisionHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryChannelConsensusStateRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.revisionNumber !== undefined && (obj.revisionNumber = (message.revisionNumber || BigInt(0)).toString()); - message.revisionHeight !== undefined && (obj.revisionHeight = (message.revisionHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelConsensusStateRequest { - const message = createBaseQueryChannelConsensusStateRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null ? BigInt(object.revisionNumber.toString()) : BigInt(0); - message.revisionHeight = object.revisionHeight !== undefined && object.revisionHeight !== null ? BigInt(object.revisionHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryChannelConsensusStateRequestSDKType): QueryChannelConsensusStateRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - revisionNumber: object?.revision_number, - revisionHeight: object?.revision_height - }; - }, - toSDK(message: QueryChannelConsensusStateRequest): QueryChannelConsensusStateRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.revision_number = message.revisionNumber; - obj.revision_height = message.revisionHeight; - return obj; - }, - fromAmino(object: QueryChannelConsensusStateRequestAmino): QueryChannelConsensusStateRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - revisionNumber: BigInt(object.revision_number), - revisionHeight: BigInt(object.revision_height) - }; - }, - toAmino(message: QueryChannelConsensusStateRequest): QueryChannelConsensusStateRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryChannelConsensusStateRequestAminoMsg): QueryChannelConsensusStateRequest { - return QueryChannelConsensusStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelConsensusStateRequest): QueryChannelConsensusStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryChannelConsensusStateRequest", - value: QueryChannelConsensusStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelConsensusStateRequestProtoMsg): QueryChannelConsensusStateRequest { - return QueryChannelConsensusStateRequest.decode(message.value); - }, - toProto(message: QueryChannelConsensusStateRequest): Uint8Array { - return QueryChannelConsensusStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelConsensusStateRequest): QueryChannelConsensusStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelConsensusStateRequest", - value: QueryChannelConsensusStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryChannelConsensusStateResponse(): QueryChannelConsensusStateResponse { - return { - consensusState: Any.fromPartial({}), - clientId: "", - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryChannelConsensusStateResponse = { - typeUrl: "/ibc.core.channel.v1.QueryChannelConsensusStateResponse", - aminoType: "cosmos-sdk/QueryChannelConsensusStateResponse", - encode(message: QueryChannelConsensusStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryChannelConsensusStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChannelConsensusStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryChannelConsensusStateResponse { - return { - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined, - clientId: isSet(object.clientId) ? String(object.clientId) : "", - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryChannelConsensusStateResponse): unknown { - const obj: any = {}; - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryChannelConsensusStateResponse { - const message = createBaseQueryChannelConsensusStateResponse(); - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - message.clientId = object.clientId ?? ""; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryChannelConsensusStateResponseSDKType): QueryChannelConsensusStateResponse { - return { - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined, - clientId: object?.client_id, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryChannelConsensusStateResponse): QueryChannelConsensusStateResponseSDKType { - const obj: any = {}; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - obj.client_id = message.clientId; - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryChannelConsensusStateResponseAmino): QueryChannelConsensusStateResponse { - return { - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined, - clientId: object.client_id, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryChannelConsensusStateResponse): QueryChannelConsensusStateResponseAmino { - const obj: any = {}; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - obj.client_id = message.clientId; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryChannelConsensusStateResponseAminoMsg): QueryChannelConsensusStateResponse { - return QueryChannelConsensusStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryChannelConsensusStateResponse): QueryChannelConsensusStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryChannelConsensusStateResponse", - value: QueryChannelConsensusStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryChannelConsensusStateResponseProtoMsg): QueryChannelConsensusStateResponse { - return QueryChannelConsensusStateResponse.decode(message.value); - }, - toProto(message: QueryChannelConsensusStateResponse): Uint8Array { - return QueryChannelConsensusStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryChannelConsensusStateResponse): QueryChannelConsensusStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryChannelConsensusStateResponse", - value: QueryChannelConsensusStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPacketCommitmentRequest(): QueryPacketCommitmentRequest { - return { - portId: "", - channelId: "", - sequence: BigInt(0) - }; -} -export const QueryPacketCommitmentRequest = { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentRequest", - aminoType: "cosmos-sdk/QueryPacketCommitmentRequest", - encode(message: QueryPacketCommitmentRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketCommitmentRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketCommitmentRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketCommitmentRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryPacketCommitmentRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketCommitmentRequest { - const message = createBaseQueryPacketCommitmentRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryPacketCommitmentRequestSDKType): QueryPacketCommitmentRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - sequence: object?.sequence - }; - }, - toSDK(message: QueryPacketCommitmentRequest): QueryPacketCommitmentRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: QueryPacketCommitmentRequestAmino): QueryPacketCommitmentRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: QueryPacketCommitmentRequest): QueryPacketCommitmentRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryPacketCommitmentRequestAminoMsg): QueryPacketCommitmentRequest { - return QueryPacketCommitmentRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketCommitmentRequest): QueryPacketCommitmentRequestAminoMsg { - return { - type: "cosmos-sdk/QueryPacketCommitmentRequest", - value: QueryPacketCommitmentRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketCommitmentRequestProtoMsg): QueryPacketCommitmentRequest { - return QueryPacketCommitmentRequest.decode(message.value); - }, - toProto(message: QueryPacketCommitmentRequest): Uint8Array { - return QueryPacketCommitmentRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketCommitmentRequest): QueryPacketCommitmentRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentRequest", - value: QueryPacketCommitmentRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPacketCommitmentResponse(): QueryPacketCommitmentResponse { - return { - commitment: new Uint8Array(), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryPacketCommitmentResponse = { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentResponse", - aminoType: "cosmos-sdk/QueryPacketCommitmentResponse", - encode(message: QueryPacketCommitmentResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.commitment.length !== 0) { - writer.uint32(10).bytes(message.commitment); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketCommitmentResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketCommitmentResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitment = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketCommitmentResponse { - return { - commitment: isSet(object.commitment) ? bytesFromBase64(object.commitment) : new Uint8Array(), - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryPacketCommitmentResponse): unknown { - const obj: any = {}; - message.commitment !== undefined && (obj.commitment = base64FromBytes(message.commitment !== undefined ? message.commitment : new Uint8Array())); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketCommitmentResponse { - const message = createBaseQueryPacketCommitmentResponse(); - message.commitment = object.commitment ?? new Uint8Array(); - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryPacketCommitmentResponseSDKType): QueryPacketCommitmentResponse { - return { - commitment: object?.commitment, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryPacketCommitmentResponse): QueryPacketCommitmentResponseSDKType { - const obj: any = {}; - obj.commitment = message.commitment; - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryPacketCommitmentResponseAmino): QueryPacketCommitmentResponse { - return { - commitment: object.commitment, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryPacketCommitmentResponse): QueryPacketCommitmentResponseAmino { - const obj: any = {}; - obj.commitment = message.commitment; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryPacketCommitmentResponseAminoMsg): QueryPacketCommitmentResponse { - return QueryPacketCommitmentResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketCommitmentResponse): QueryPacketCommitmentResponseAminoMsg { - return { - type: "cosmos-sdk/QueryPacketCommitmentResponse", - value: QueryPacketCommitmentResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketCommitmentResponseProtoMsg): QueryPacketCommitmentResponse { - return QueryPacketCommitmentResponse.decode(message.value); - }, - toProto(message: QueryPacketCommitmentResponse): Uint8Array { - return QueryPacketCommitmentResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketCommitmentResponse): QueryPacketCommitmentResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentResponse", - value: QueryPacketCommitmentResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPacketCommitmentsRequest(): QueryPacketCommitmentsRequest { - return { - portId: "", - channelId: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryPacketCommitmentsRequest = { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentsRequest", - aminoType: "cosmos-sdk/QueryPacketCommitmentsRequest", - encode(message: QueryPacketCommitmentsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketCommitmentsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketCommitmentsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketCommitmentsRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPacketCommitmentsRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketCommitmentsRequest { - const message = createBaseQueryPacketCommitmentsRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPacketCommitmentsRequestSDKType): QueryPacketCommitmentsRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPacketCommitmentsRequest): QueryPacketCommitmentsRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPacketCommitmentsRequestAmino): QueryPacketCommitmentsRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPacketCommitmentsRequest): QueryPacketCommitmentsRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPacketCommitmentsRequestAminoMsg): QueryPacketCommitmentsRequest { - return QueryPacketCommitmentsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketCommitmentsRequest): QueryPacketCommitmentsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryPacketCommitmentsRequest", - value: QueryPacketCommitmentsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketCommitmentsRequestProtoMsg): QueryPacketCommitmentsRequest { - return QueryPacketCommitmentsRequest.decode(message.value); - }, - toProto(message: QueryPacketCommitmentsRequest): Uint8Array { - return QueryPacketCommitmentsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketCommitmentsRequest): QueryPacketCommitmentsRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentsRequest", - value: QueryPacketCommitmentsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPacketCommitmentsResponse(): QueryPacketCommitmentsResponse { - return { - commitments: [], - pagination: PageResponse.fromPartial({}), - height: Height.fromPartial({}) - }; -} -export const QueryPacketCommitmentsResponse = { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentsResponse", - aminoType: "cosmos-sdk/QueryPacketCommitmentsResponse", - encode(message: QueryPacketCommitmentsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.commitments) { - PacketState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketCommitmentsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketCommitmentsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitments.push(PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketCommitmentsResponse { - return { - commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => PacketState.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryPacketCommitmentsResponse): unknown { - const obj: any = {}; - if (message.commitments) { - obj.commitments = message.commitments.map(e => e ? PacketState.toJSON(e) : undefined); - } else { - obj.commitments = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketCommitmentsResponse { - const message = createBaseQueryPacketCommitmentsResponse(); - message.commitments = object.commitments?.map(e => PacketState.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryPacketCommitmentsResponseSDKType): QueryPacketCommitmentsResponse { - return { - commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => PacketState.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined, - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryPacketCommitmentsResponse): QueryPacketCommitmentsResponseSDKType { - const obj: any = {}; - if (message.commitments) { - obj.commitments = message.commitments.map(e => e ? PacketState.toSDK(e) : undefined); - } else { - obj.commitments = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryPacketCommitmentsResponseAmino): QueryPacketCommitmentsResponse { - return { - commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => PacketState.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined, - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryPacketCommitmentsResponse): QueryPacketCommitmentsResponseAmino { - const obj: any = {}; - if (message.commitments) { - obj.commitments = message.commitments.map(e => e ? PacketState.toAmino(e) : undefined); - } else { - obj.commitments = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryPacketCommitmentsResponseAminoMsg): QueryPacketCommitmentsResponse { - return QueryPacketCommitmentsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketCommitmentsResponse): QueryPacketCommitmentsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryPacketCommitmentsResponse", - value: QueryPacketCommitmentsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketCommitmentsResponseProtoMsg): QueryPacketCommitmentsResponse { - return QueryPacketCommitmentsResponse.decode(message.value); - }, - toProto(message: QueryPacketCommitmentsResponse): Uint8Array { - return QueryPacketCommitmentsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketCommitmentsResponse): QueryPacketCommitmentsResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketCommitmentsResponse", - value: QueryPacketCommitmentsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPacketReceiptRequest(): QueryPacketReceiptRequest { - return { - portId: "", - channelId: "", - sequence: BigInt(0) - }; -} -export const QueryPacketReceiptRequest = { - typeUrl: "/ibc.core.channel.v1.QueryPacketReceiptRequest", - aminoType: "cosmos-sdk/QueryPacketReceiptRequest", - encode(message: QueryPacketReceiptRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketReceiptRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketReceiptRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketReceiptRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryPacketReceiptRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketReceiptRequest { - const message = createBaseQueryPacketReceiptRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryPacketReceiptRequestSDKType): QueryPacketReceiptRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - sequence: object?.sequence - }; - }, - toSDK(message: QueryPacketReceiptRequest): QueryPacketReceiptRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: QueryPacketReceiptRequestAmino): QueryPacketReceiptRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: QueryPacketReceiptRequest): QueryPacketReceiptRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryPacketReceiptRequestAminoMsg): QueryPacketReceiptRequest { - return QueryPacketReceiptRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketReceiptRequest): QueryPacketReceiptRequestAminoMsg { - return { - type: "cosmos-sdk/QueryPacketReceiptRequest", - value: QueryPacketReceiptRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketReceiptRequestProtoMsg): QueryPacketReceiptRequest { - return QueryPacketReceiptRequest.decode(message.value); - }, - toProto(message: QueryPacketReceiptRequest): Uint8Array { - return QueryPacketReceiptRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketReceiptRequest): QueryPacketReceiptRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketReceiptRequest", - value: QueryPacketReceiptRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPacketReceiptResponse(): QueryPacketReceiptResponse { - return { - received: false, - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryPacketReceiptResponse = { - typeUrl: "/ibc.core.channel.v1.QueryPacketReceiptResponse", - aminoType: "cosmos-sdk/QueryPacketReceiptResponse", - encode(message: QueryPacketReceiptResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.received === true) { - writer.uint32(16).bool(message.received); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketReceiptResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketReceiptResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.received = reader.bool(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketReceiptResponse { - return { - received: isSet(object.received) ? Boolean(object.received) : false, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryPacketReceiptResponse): unknown { - const obj: any = {}; - message.received !== undefined && (obj.received = message.received); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketReceiptResponse { - const message = createBaseQueryPacketReceiptResponse(); - message.received = object.received ?? false; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryPacketReceiptResponseSDKType): QueryPacketReceiptResponse { - return { - received: object?.received, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryPacketReceiptResponse): QueryPacketReceiptResponseSDKType { - const obj: any = {}; - obj.received = message.received; - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryPacketReceiptResponseAmino): QueryPacketReceiptResponse { - return { - received: object.received, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryPacketReceiptResponse): QueryPacketReceiptResponseAmino { - const obj: any = {}; - obj.received = message.received; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryPacketReceiptResponseAminoMsg): QueryPacketReceiptResponse { - return QueryPacketReceiptResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketReceiptResponse): QueryPacketReceiptResponseAminoMsg { - return { - type: "cosmos-sdk/QueryPacketReceiptResponse", - value: QueryPacketReceiptResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketReceiptResponseProtoMsg): QueryPacketReceiptResponse { - return QueryPacketReceiptResponse.decode(message.value); - }, - toProto(message: QueryPacketReceiptResponse): Uint8Array { - return QueryPacketReceiptResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketReceiptResponse): QueryPacketReceiptResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketReceiptResponse", - value: QueryPacketReceiptResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPacketAcknowledgementRequest(): QueryPacketAcknowledgementRequest { - return { - portId: "", - channelId: "", - sequence: BigInt(0) - }; -} -export const QueryPacketAcknowledgementRequest = { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementRequest", - aminoType: "cosmos-sdk/QueryPacketAcknowledgementRequest", - encode(message: QueryPacketAcknowledgementRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(24).uint64(message.sequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketAcknowledgementRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketAcknowledgementRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketAcknowledgementRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryPacketAcknowledgementRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementRequest { - const message = createBaseQueryPacketAcknowledgementRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryPacketAcknowledgementRequestSDKType): QueryPacketAcknowledgementRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - sequence: object?.sequence - }; - }, - toSDK(message: QueryPacketAcknowledgementRequest): QueryPacketAcknowledgementRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence; - return obj; - }, - fromAmino(object: QueryPacketAcknowledgementRequestAmino): QueryPacketAcknowledgementRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - sequence: BigInt(object.sequence) - }; - }, - toAmino(message: QueryPacketAcknowledgementRequest): QueryPacketAcknowledgementRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryPacketAcknowledgementRequestAminoMsg): QueryPacketAcknowledgementRequest { - return QueryPacketAcknowledgementRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketAcknowledgementRequest): QueryPacketAcknowledgementRequestAminoMsg { - return { - type: "cosmos-sdk/QueryPacketAcknowledgementRequest", - value: QueryPacketAcknowledgementRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketAcknowledgementRequestProtoMsg): QueryPacketAcknowledgementRequest { - return QueryPacketAcknowledgementRequest.decode(message.value); - }, - toProto(message: QueryPacketAcknowledgementRequest): Uint8Array { - return QueryPacketAcknowledgementRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketAcknowledgementRequest): QueryPacketAcknowledgementRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementRequest", - value: QueryPacketAcknowledgementRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPacketAcknowledgementResponse(): QueryPacketAcknowledgementResponse { - return { - acknowledgement: new Uint8Array(), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryPacketAcknowledgementResponse = { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementResponse", - aminoType: "cosmos-sdk/QueryPacketAcknowledgementResponse", - encode(message: QueryPacketAcknowledgementResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.acknowledgement.length !== 0) { - writer.uint32(10).bytes(message.acknowledgement); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketAcknowledgementResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketAcknowledgementResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgement = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketAcknowledgementResponse { - return { - acknowledgement: isSet(object.acknowledgement) ? bytesFromBase64(object.acknowledgement) : new Uint8Array(), - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryPacketAcknowledgementResponse): unknown { - const obj: any = {}; - message.acknowledgement !== undefined && (obj.acknowledgement = base64FromBytes(message.acknowledgement !== undefined ? message.acknowledgement : new Uint8Array())); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementResponse { - const message = createBaseQueryPacketAcknowledgementResponse(); - message.acknowledgement = object.acknowledgement ?? new Uint8Array(); - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryPacketAcknowledgementResponseSDKType): QueryPacketAcknowledgementResponse { - return { - acknowledgement: object?.acknowledgement, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryPacketAcknowledgementResponse): QueryPacketAcknowledgementResponseSDKType { - const obj: any = {}; - obj.acknowledgement = message.acknowledgement; - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryPacketAcknowledgementResponseAmino): QueryPacketAcknowledgementResponse { - return { - acknowledgement: object.acknowledgement, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryPacketAcknowledgementResponse): QueryPacketAcknowledgementResponseAmino { - const obj: any = {}; - obj.acknowledgement = message.acknowledgement; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryPacketAcknowledgementResponseAminoMsg): QueryPacketAcknowledgementResponse { - return QueryPacketAcknowledgementResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketAcknowledgementResponse): QueryPacketAcknowledgementResponseAminoMsg { - return { - type: "cosmos-sdk/QueryPacketAcknowledgementResponse", - value: QueryPacketAcknowledgementResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketAcknowledgementResponseProtoMsg): QueryPacketAcknowledgementResponse { - return QueryPacketAcknowledgementResponse.decode(message.value); - }, - toProto(message: QueryPacketAcknowledgementResponse): Uint8Array { - return QueryPacketAcknowledgementResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketAcknowledgementResponse): QueryPacketAcknowledgementResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementResponse", - value: QueryPacketAcknowledgementResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPacketAcknowledgementsRequest(): QueryPacketAcknowledgementsRequest { - return { - portId: "", - channelId: "", - pagination: PageRequest.fromPartial({}), - packetCommitmentSequences: [] - }; -} -export const QueryPacketAcknowledgementsRequest = { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest", - aminoType: "cosmos-sdk/QueryPacketAcknowledgementsRequest", - encode(message: QueryPacketAcknowledgementsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.packetCommitmentSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketAcknowledgementsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketAcknowledgementsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetCommitmentSequences.push(reader.uint64()); - } - } else { - message.packetCommitmentSequences.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketAcknowledgementsRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - packetCommitmentSequences: Array.isArray(object?.packetCommitmentSequences) ? object.packetCommitmentSequences.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: QueryPacketAcknowledgementsRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - if (message.packetCommitmentSequences) { - obj.packetCommitmentSequences = message.packetCommitmentSequences.map(e => (e || BigInt(0)).toString()); - } else { - obj.packetCommitmentSequences = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementsRequest { - const message = createBaseQueryPacketAcknowledgementsRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - message.packetCommitmentSequences = object.packetCommitmentSequences?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: QueryPacketAcknowledgementsRequestSDKType): QueryPacketAcknowledgementsRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined, - packetCommitmentSequences: Array.isArray(object?.packet_commitment_sequences) ? object.packet_commitment_sequences.map((e: any) => e) : [] - }; - }, - toSDK(message: QueryPacketAcknowledgementsRequest): QueryPacketAcknowledgementsRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - if (message.packetCommitmentSequences) { - obj.packet_commitment_sequences = message.packetCommitmentSequences.map(e => e); - } else { - obj.packet_commitment_sequences = []; - } - return obj; - }, - fromAmino(object: QueryPacketAcknowledgementsRequestAmino): QueryPacketAcknowledgementsRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined, - packetCommitmentSequences: Array.isArray(object?.packet_commitment_sequences) ? object.packet_commitment_sequences.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: QueryPacketAcknowledgementsRequest): QueryPacketAcknowledgementsRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - if (message.packetCommitmentSequences) { - obj.packet_commitment_sequences = message.packetCommitmentSequences.map(e => e.toString()); - } else { - obj.packet_commitment_sequences = []; - } - return obj; - }, - fromAminoMsg(object: QueryPacketAcknowledgementsRequestAminoMsg): QueryPacketAcknowledgementsRequest { - return QueryPacketAcknowledgementsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketAcknowledgementsRequest): QueryPacketAcknowledgementsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryPacketAcknowledgementsRequest", - value: QueryPacketAcknowledgementsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketAcknowledgementsRequestProtoMsg): QueryPacketAcknowledgementsRequest { - return QueryPacketAcknowledgementsRequest.decode(message.value); - }, - toProto(message: QueryPacketAcknowledgementsRequest): Uint8Array { - return QueryPacketAcknowledgementsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketAcknowledgementsRequest): QueryPacketAcknowledgementsRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest", - value: QueryPacketAcknowledgementsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPacketAcknowledgementsResponse(): QueryPacketAcknowledgementsResponse { - return { - acknowledgements: [], - pagination: PageResponse.fromPartial({}), - height: Height.fromPartial({}) - }; -} -export const QueryPacketAcknowledgementsResponse = { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse", - aminoType: "cosmos-sdk/QueryPacketAcknowledgementsResponse", - encode(message: QueryPacketAcknowledgementsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.acknowledgements) { - PacketState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPacketAcknowledgementsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPacketAcknowledgementsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgements.push(PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPacketAcknowledgementsResponse { - return { - acknowledgements: Array.isArray(object?.acknowledgements) ? object.acknowledgements.map((e: any) => PacketState.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryPacketAcknowledgementsResponse): unknown { - const obj: any = {}; - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toJSON(e) : undefined); - } else { - obj.acknowledgements = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementsResponse { - const message = createBaseQueryPacketAcknowledgementsResponse(); - message.acknowledgements = object.acknowledgements?.map(e => PacketState.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryPacketAcknowledgementsResponseSDKType): QueryPacketAcknowledgementsResponse { - return { - acknowledgements: Array.isArray(object?.acknowledgements) ? object.acknowledgements.map((e: any) => PacketState.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined, - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryPacketAcknowledgementsResponse): QueryPacketAcknowledgementsResponseSDKType { - const obj: any = {}; - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toSDK(e) : undefined); - } else { - obj.acknowledgements = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryPacketAcknowledgementsResponseAmino): QueryPacketAcknowledgementsResponse { - return { - acknowledgements: Array.isArray(object?.acknowledgements) ? object.acknowledgements.map((e: any) => PacketState.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined, - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryPacketAcknowledgementsResponse): QueryPacketAcknowledgementsResponseAmino { - const obj: any = {}; - if (message.acknowledgements) { - obj.acknowledgements = message.acknowledgements.map(e => e ? PacketState.toAmino(e) : undefined); - } else { - obj.acknowledgements = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryPacketAcknowledgementsResponseAminoMsg): QueryPacketAcknowledgementsResponse { - return QueryPacketAcknowledgementsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPacketAcknowledgementsResponse): QueryPacketAcknowledgementsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryPacketAcknowledgementsResponse", - value: QueryPacketAcknowledgementsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPacketAcknowledgementsResponseProtoMsg): QueryPacketAcknowledgementsResponse { - return QueryPacketAcknowledgementsResponse.decode(message.value); - }, - toProto(message: QueryPacketAcknowledgementsResponse): Uint8Array { - return QueryPacketAcknowledgementsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPacketAcknowledgementsResponse): QueryPacketAcknowledgementsResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse", - value: QueryPacketAcknowledgementsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUnreceivedPacketsRequest(): QueryUnreceivedPacketsRequest { - return { - portId: "", - channelId: "", - packetCommitmentSequences: [] - }; -} -export const QueryUnreceivedPacketsRequest = { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedPacketsRequest", - aminoType: "cosmos-sdk/QueryUnreceivedPacketsRequest", - encode(message: QueryUnreceivedPacketsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - writer.uint32(26).fork(); - for (const v of message.packetCommitmentSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnreceivedPacketsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnreceivedPacketsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetCommitmentSequences.push(reader.uint64()); - } - } else { - message.packetCommitmentSequences.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnreceivedPacketsRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - packetCommitmentSequences: Array.isArray(object?.packetCommitmentSequences) ? object.packetCommitmentSequences.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: QueryUnreceivedPacketsRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - if (message.packetCommitmentSequences) { - obj.packetCommitmentSequences = message.packetCommitmentSequences.map(e => (e || BigInt(0)).toString()); - } else { - obj.packetCommitmentSequences = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryUnreceivedPacketsRequest { - const message = createBaseQueryUnreceivedPacketsRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.packetCommitmentSequences = object.packetCommitmentSequences?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: QueryUnreceivedPacketsRequestSDKType): QueryUnreceivedPacketsRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - packetCommitmentSequences: Array.isArray(object?.packet_commitment_sequences) ? object.packet_commitment_sequences.map((e: any) => e) : [] - }; - }, - toSDK(message: QueryUnreceivedPacketsRequest): QueryUnreceivedPacketsRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - if (message.packetCommitmentSequences) { - obj.packet_commitment_sequences = message.packetCommitmentSequences.map(e => e); - } else { - obj.packet_commitment_sequences = []; - } - return obj; - }, - fromAmino(object: QueryUnreceivedPacketsRequestAmino): QueryUnreceivedPacketsRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - packetCommitmentSequences: Array.isArray(object?.packet_commitment_sequences) ? object.packet_commitment_sequences.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: QueryUnreceivedPacketsRequest): QueryUnreceivedPacketsRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - if (message.packetCommitmentSequences) { - obj.packet_commitment_sequences = message.packetCommitmentSequences.map(e => e.toString()); - } else { - obj.packet_commitment_sequences = []; - } - return obj; - }, - fromAminoMsg(object: QueryUnreceivedPacketsRequestAminoMsg): QueryUnreceivedPacketsRequest { - return QueryUnreceivedPacketsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnreceivedPacketsRequest): QueryUnreceivedPacketsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryUnreceivedPacketsRequest", - value: QueryUnreceivedPacketsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnreceivedPacketsRequestProtoMsg): QueryUnreceivedPacketsRequest { - return QueryUnreceivedPacketsRequest.decode(message.value); - }, - toProto(message: QueryUnreceivedPacketsRequest): Uint8Array { - return QueryUnreceivedPacketsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUnreceivedPacketsRequest): QueryUnreceivedPacketsRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedPacketsRequest", - value: QueryUnreceivedPacketsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUnreceivedPacketsResponse(): QueryUnreceivedPacketsResponse { - return { - sequences: [], - height: Height.fromPartial({}) - }; -} -export const QueryUnreceivedPacketsResponse = { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedPacketsResponse", - aminoType: "cosmos-sdk/QueryUnreceivedPacketsResponse", - encode(message: QueryUnreceivedPacketsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnreceivedPacketsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnreceivedPacketsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(reader.uint64()); - } - } else { - message.sequences.push(reader.uint64()); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnreceivedPacketsResponse { - return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => BigInt(e.toString())) : [], - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryUnreceivedPacketsResponse): unknown { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map(e => (e || BigInt(0)).toString()); - } else { - obj.sequences = []; - } - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryUnreceivedPacketsResponse { - const message = createBaseQueryUnreceivedPacketsResponse(); - message.sequences = object.sequences?.map(e => BigInt(e.toString())) || []; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryUnreceivedPacketsResponseSDKType): QueryUnreceivedPacketsResponse { - return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => e) : [], - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryUnreceivedPacketsResponse): QueryUnreceivedPacketsResponseSDKType { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map(e => e); - } else { - obj.sequences = []; - } - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryUnreceivedPacketsResponseAmino): QueryUnreceivedPacketsResponse { - return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => BigInt(e)) : [], - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryUnreceivedPacketsResponse): QueryUnreceivedPacketsResponseAmino { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map(e => e.toString()); - } else { - obj.sequences = []; - } - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryUnreceivedPacketsResponseAminoMsg): QueryUnreceivedPacketsResponse { - return QueryUnreceivedPacketsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnreceivedPacketsResponse): QueryUnreceivedPacketsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryUnreceivedPacketsResponse", - value: QueryUnreceivedPacketsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnreceivedPacketsResponseProtoMsg): QueryUnreceivedPacketsResponse { - return QueryUnreceivedPacketsResponse.decode(message.value); - }, - toProto(message: QueryUnreceivedPacketsResponse): Uint8Array { - return QueryUnreceivedPacketsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUnreceivedPacketsResponse): QueryUnreceivedPacketsResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedPacketsResponse", - value: QueryUnreceivedPacketsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUnreceivedAcksRequest(): QueryUnreceivedAcksRequest { - return { - portId: "", - channelId: "", - packetAckSequences: [] - }; -} -export const QueryUnreceivedAcksRequest = { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedAcksRequest", - aminoType: "cosmos-sdk/QueryUnreceivedAcksRequest", - encode(message: QueryUnreceivedAcksRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - writer.uint32(26).fork(); - for (const v of message.packetAckSequences) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnreceivedAcksRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnreceivedAcksRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.packetAckSequences.push(reader.uint64()); - } - } else { - message.packetAckSequences.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnreceivedAcksRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - packetAckSequences: Array.isArray(object?.packetAckSequences) ? object.packetAckSequences.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: QueryUnreceivedAcksRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - if (message.packetAckSequences) { - obj.packetAckSequences = message.packetAckSequences.map(e => (e || BigInt(0)).toString()); - } else { - obj.packetAckSequences = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryUnreceivedAcksRequest { - const message = createBaseQueryUnreceivedAcksRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.packetAckSequences = object.packetAckSequences?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: QueryUnreceivedAcksRequestSDKType): QueryUnreceivedAcksRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id, - packetAckSequences: Array.isArray(object?.packet_ack_sequences) ? object.packet_ack_sequences.map((e: any) => e) : [] - }; - }, - toSDK(message: QueryUnreceivedAcksRequest): QueryUnreceivedAcksRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - if (message.packetAckSequences) { - obj.packet_ack_sequences = message.packetAckSequences.map(e => e); - } else { - obj.packet_ack_sequences = []; - } - return obj; - }, - fromAmino(object: QueryUnreceivedAcksRequestAmino): QueryUnreceivedAcksRequest { - return { - portId: object.port_id, - channelId: object.channel_id, - packetAckSequences: Array.isArray(object?.packet_ack_sequences) ? object.packet_ack_sequences.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: QueryUnreceivedAcksRequest): QueryUnreceivedAcksRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - if (message.packetAckSequences) { - obj.packet_ack_sequences = message.packetAckSequences.map(e => e.toString()); - } else { - obj.packet_ack_sequences = []; - } - return obj; - }, - fromAminoMsg(object: QueryUnreceivedAcksRequestAminoMsg): QueryUnreceivedAcksRequest { - return QueryUnreceivedAcksRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnreceivedAcksRequest): QueryUnreceivedAcksRequestAminoMsg { - return { - type: "cosmos-sdk/QueryUnreceivedAcksRequest", - value: QueryUnreceivedAcksRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnreceivedAcksRequestProtoMsg): QueryUnreceivedAcksRequest { - return QueryUnreceivedAcksRequest.decode(message.value); - }, - toProto(message: QueryUnreceivedAcksRequest): Uint8Array { - return QueryUnreceivedAcksRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUnreceivedAcksRequest): QueryUnreceivedAcksRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedAcksRequest", - value: QueryUnreceivedAcksRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUnreceivedAcksResponse(): QueryUnreceivedAcksResponse { - return { - sequences: [], - height: Height.fromPartial({}) - }; -} -export const QueryUnreceivedAcksResponse = { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedAcksResponse", - aminoType: "cosmos-sdk/QueryUnreceivedAcksResponse", - encode(message: QueryUnreceivedAcksResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.sequences) { - writer.uint64(v); - } - writer.ldelim(); - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnreceivedAcksResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnreceivedAcksResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.sequences.push(reader.uint64()); - } - } else { - message.sequences.push(reader.uint64()); - } - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnreceivedAcksResponse { - return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => BigInt(e.toString())) : [], - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryUnreceivedAcksResponse): unknown { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map(e => (e || BigInt(0)).toString()); - } else { - obj.sequences = []; - } - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryUnreceivedAcksResponse { - const message = createBaseQueryUnreceivedAcksResponse(); - message.sequences = object.sequences?.map(e => BigInt(e.toString())) || []; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryUnreceivedAcksResponseSDKType): QueryUnreceivedAcksResponse { - return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => e) : [], - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryUnreceivedAcksResponse): QueryUnreceivedAcksResponseSDKType { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map(e => e); - } else { - obj.sequences = []; - } - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryUnreceivedAcksResponseAmino): QueryUnreceivedAcksResponse { - return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => BigInt(e)) : [], - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryUnreceivedAcksResponse): QueryUnreceivedAcksResponseAmino { - const obj: any = {}; - if (message.sequences) { - obj.sequences = message.sequences.map(e => e.toString()); - } else { - obj.sequences = []; - } - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryUnreceivedAcksResponseAminoMsg): QueryUnreceivedAcksResponse { - return QueryUnreceivedAcksResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnreceivedAcksResponse): QueryUnreceivedAcksResponseAminoMsg { - return { - type: "cosmos-sdk/QueryUnreceivedAcksResponse", - value: QueryUnreceivedAcksResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnreceivedAcksResponseProtoMsg): QueryUnreceivedAcksResponse { - return QueryUnreceivedAcksResponse.decode(message.value); - }, - toProto(message: QueryUnreceivedAcksResponse): Uint8Array { - return QueryUnreceivedAcksResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUnreceivedAcksResponse): QueryUnreceivedAcksResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryUnreceivedAcksResponse", - value: QueryUnreceivedAcksResponse.encode(message).finish() - }; - } -}; -function createBaseQueryNextSequenceReceiveRequest(): QueryNextSequenceReceiveRequest { - return { - portId: "", - channelId: "" - }; -} -export const QueryNextSequenceReceiveRequest = { - typeUrl: "/ibc.core.channel.v1.QueryNextSequenceReceiveRequest", - aminoType: "cosmos-sdk/QueryNextSequenceReceiveRequest", - encode(message: QueryNextSequenceReceiveRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNextSequenceReceiveRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNextSequenceReceiveRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNextSequenceReceiveRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "" - }; - }, - toJSON(message: QueryNextSequenceReceiveRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - return obj; - }, - fromPartial(object: DeepPartial): QueryNextSequenceReceiveRequest { - const message = createBaseQueryNextSequenceReceiveRequest(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - return message; - }, - fromSDK(object: QueryNextSequenceReceiveRequestSDKType): QueryNextSequenceReceiveRequest { - return { - portId: object?.port_id, - channelId: object?.channel_id - }; - }, - toSDK(message: QueryNextSequenceReceiveRequest): QueryNextSequenceReceiveRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAmino(object: QueryNextSequenceReceiveRequestAmino): QueryNextSequenceReceiveRequest { - return { - portId: object.port_id, - channelId: object.channel_id - }; - }, - toAmino(message: QueryNextSequenceReceiveRequest): QueryNextSequenceReceiveRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - return obj; - }, - fromAminoMsg(object: QueryNextSequenceReceiveRequestAminoMsg): QueryNextSequenceReceiveRequest { - return QueryNextSequenceReceiveRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryNextSequenceReceiveRequest): QueryNextSequenceReceiveRequestAminoMsg { - return { - type: "cosmos-sdk/QueryNextSequenceReceiveRequest", - value: QueryNextSequenceReceiveRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNextSequenceReceiveRequestProtoMsg): QueryNextSequenceReceiveRequest { - return QueryNextSequenceReceiveRequest.decode(message.value); - }, - toProto(message: QueryNextSequenceReceiveRequest): Uint8Array { - return QueryNextSequenceReceiveRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryNextSequenceReceiveRequest): QueryNextSequenceReceiveRequestProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryNextSequenceReceiveRequest", - value: QueryNextSequenceReceiveRequest.encode(message).finish() - }; - } -}; -function createBaseQueryNextSequenceReceiveResponse(): QueryNextSequenceReceiveResponse { - return { - nextSequenceReceive: BigInt(0), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryNextSequenceReceiveResponse = { - typeUrl: "/ibc.core.channel.v1.QueryNextSequenceReceiveResponse", - aminoType: "cosmos-sdk/QueryNextSequenceReceiveResponse", - encode(message: QueryNextSequenceReceiveResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.nextSequenceReceive !== BigInt(0)) { - writer.uint32(8).uint64(message.nextSequenceReceive); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNextSequenceReceiveResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNextSequenceReceiveResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextSequenceReceive = reader.uint64(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNextSequenceReceiveResponse { - return { - nextSequenceReceive: isSet(object.nextSequenceReceive) ? BigInt(object.nextSequenceReceive.toString()) : BigInt(0), - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryNextSequenceReceiveResponse): unknown { - const obj: any = {}; - message.nextSequenceReceive !== undefined && (obj.nextSequenceReceive = (message.nextSequenceReceive || BigInt(0)).toString()); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryNextSequenceReceiveResponse { - const message = createBaseQueryNextSequenceReceiveResponse(); - message.nextSequenceReceive = object.nextSequenceReceive !== undefined && object.nextSequenceReceive !== null ? BigInt(object.nextSequenceReceive.toString()) : BigInt(0); - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryNextSequenceReceiveResponseSDKType): QueryNextSequenceReceiveResponse { - return { - nextSequenceReceive: object?.next_sequence_receive, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryNextSequenceReceiveResponse): QueryNextSequenceReceiveResponseSDKType { - const obj: any = {}; - obj.next_sequence_receive = message.nextSequenceReceive; - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryNextSequenceReceiveResponseAmino): QueryNextSequenceReceiveResponse { - return { - nextSequenceReceive: BigInt(object.next_sequence_receive), - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryNextSequenceReceiveResponse): QueryNextSequenceReceiveResponseAmino { - const obj: any = {}; - obj.next_sequence_receive = message.nextSequenceReceive ? message.nextSequenceReceive.toString() : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryNextSequenceReceiveResponseAminoMsg): QueryNextSequenceReceiveResponse { - return QueryNextSequenceReceiveResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryNextSequenceReceiveResponse): QueryNextSequenceReceiveResponseAminoMsg { - return { - type: "cosmos-sdk/QueryNextSequenceReceiveResponse", - value: QueryNextSequenceReceiveResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNextSequenceReceiveResponseProtoMsg): QueryNextSequenceReceiveResponse { - return QueryNextSequenceReceiveResponse.decode(message.value); - }, - toProto(message: QueryNextSequenceReceiveResponse): Uint8Array { - return QueryNextSequenceReceiveResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryNextSequenceReceiveResponse): QueryNextSequenceReceiveResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.QueryNextSequenceReceiveResponse", - value: QueryNextSequenceReceiveResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.amino.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.amino.ts deleted file mode 100644 index 0884ce7d..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.amino.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement } from "./tx"; -export const AminoConverter = { - "/ibc.core.channel.v1.MsgChannelOpenInit": { - aminoType: "cosmos-sdk/MsgChannelOpenInit", - toAmino: MsgChannelOpenInit.toAmino, - fromAmino: MsgChannelOpenInit.fromAmino - }, - "/ibc.core.channel.v1.MsgChannelOpenTry": { - aminoType: "cosmos-sdk/MsgChannelOpenTry", - toAmino: MsgChannelOpenTry.toAmino, - fromAmino: MsgChannelOpenTry.fromAmino - }, - "/ibc.core.channel.v1.MsgChannelOpenAck": { - aminoType: "cosmos-sdk/MsgChannelOpenAck", - toAmino: MsgChannelOpenAck.toAmino, - fromAmino: MsgChannelOpenAck.fromAmino - }, - "/ibc.core.channel.v1.MsgChannelOpenConfirm": { - aminoType: "cosmos-sdk/MsgChannelOpenConfirm", - toAmino: MsgChannelOpenConfirm.toAmino, - fromAmino: MsgChannelOpenConfirm.fromAmino - }, - "/ibc.core.channel.v1.MsgChannelCloseInit": { - aminoType: "cosmos-sdk/MsgChannelCloseInit", - toAmino: MsgChannelCloseInit.toAmino, - fromAmino: MsgChannelCloseInit.fromAmino - }, - "/ibc.core.channel.v1.MsgChannelCloseConfirm": { - aminoType: "cosmos-sdk/MsgChannelCloseConfirm", - toAmino: MsgChannelCloseConfirm.toAmino, - fromAmino: MsgChannelCloseConfirm.fromAmino - }, - "/ibc.core.channel.v1.MsgRecvPacket": { - aminoType: "cosmos-sdk/MsgRecvPacket", - toAmino: MsgRecvPacket.toAmino, - fromAmino: MsgRecvPacket.fromAmino - }, - "/ibc.core.channel.v1.MsgTimeout": { - aminoType: "cosmos-sdk/MsgTimeout", - toAmino: MsgTimeout.toAmino, - fromAmino: MsgTimeout.fromAmino - }, - "/ibc.core.channel.v1.MsgTimeoutOnClose": { - aminoType: "cosmos-sdk/MsgTimeoutOnClose", - toAmino: MsgTimeoutOnClose.toAmino, - fromAmino: MsgTimeoutOnClose.fromAmino - }, - "/ibc.core.channel.v1.MsgAcknowledgement": { - aminoType: "cosmos-sdk/MsgAcknowledgement", - toAmino: MsgAcknowledgement.toAmino, - fromAmino: MsgAcknowledgement.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.registry.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.registry.ts deleted file mode 100644 index 57b3d28a..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.registry.ts +++ /dev/null @@ -1,321 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/ibc.core.channel.v1.MsgChannelOpenInit", MsgChannelOpenInit], ["/ibc.core.channel.v1.MsgChannelOpenTry", MsgChannelOpenTry], ["/ibc.core.channel.v1.MsgChannelOpenAck", MsgChannelOpenAck], ["/ibc.core.channel.v1.MsgChannelOpenConfirm", MsgChannelOpenConfirm], ["/ibc.core.channel.v1.MsgChannelCloseInit", MsgChannelCloseInit], ["/ibc.core.channel.v1.MsgChannelCloseConfirm", MsgChannelCloseConfirm], ["/ibc.core.channel.v1.MsgRecvPacket", MsgRecvPacket], ["/ibc.core.channel.v1.MsgTimeout", MsgTimeout], ["/ibc.core.channel.v1.MsgTimeoutOnClose", MsgTimeoutOnClose], ["/ibc.core.channel.v1.MsgAcknowledgement", MsgAcknowledgement]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - channelOpenInit(value: MsgChannelOpenInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - value: MsgChannelOpenInit.encode(value).finish() - }; - }, - channelOpenTry(value: MsgChannelOpenTry) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - value: MsgChannelOpenTry.encode(value).finish() - }; - }, - channelOpenAck(value: MsgChannelOpenAck) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - value: MsgChannelOpenAck.encode(value).finish() - }; - }, - channelOpenConfirm(value: MsgChannelOpenConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - value: MsgChannelOpenConfirm.encode(value).finish() - }; - }, - channelCloseInit(value: MsgChannelCloseInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - value: MsgChannelCloseInit.encode(value).finish() - }; - }, - channelCloseConfirm(value: MsgChannelCloseConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - value: MsgChannelCloseConfirm.encode(value).finish() - }; - }, - recvPacket(value: MsgRecvPacket) { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - value: MsgRecvPacket.encode(value).finish() - }; - }, - timeout(value: MsgTimeout) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - value: MsgTimeout.encode(value).finish() - }; - }, - timeoutOnClose(value: MsgTimeoutOnClose) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - value: MsgTimeoutOnClose.encode(value).finish() - }; - }, - acknowledgement(value: MsgAcknowledgement) { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - value: MsgAcknowledgement.encode(value).finish() - }; - } - }, - withTypeUrl: { - channelOpenInit(value: MsgChannelOpenInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - value - }; - }, - channelOpenTry(value: MsgChannelOpenTry) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - value - }; - }, - channelOpenAck(value: MsgChannelOpenAck) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - value - }; - }, - channelOpenConfirm(value: MsgChannelOpenConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - value - }; - }, - channelCloseInit(value: MsgChannelCloseInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - value - }; - }, - channelCloseConfirm(value: MsgChannelCloseConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - value - }; - }, - recvPacket(value: MsgRecvPacket) { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - value - }; - }, - timeout(value: MsgTimeout) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - value - }; - }, - timeoutOnClose(value: MsgTimeoutOnClose) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - value - }; - }, - acknowledgement(value: MsgAcknowledgement) { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - value - }; - } - }, - toJSON: { - channelOpenInit(value: MsgChannelOpenInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - value: MsgChannelOpenInit.toJSON(value) - }; - }, - channelOpenTry(value: MsgChannelOpenTry) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - value: MsgChannelOpenTry.toJSON(value) - }; - }, - channelOpenAck(value: MsgChannelOpenAck) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - value: MsgChannelOpenAck.toJSON(value) - }; - }, - channelOpenConfirm(value: MsgChannelOpenConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - value: MsgChannelOpenConfirm.toJSON(value) - }; - }, - channelCloseInit(value: MsgChannelCloseInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - value: MsgChannelCloseInit.toJSON(value) - }; - }, - channelCloseConfirm(value: MsgChannelCloseConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - value: MsgChannelCloseConfirm.toJSON(value) - }; - }, - recvPacket(value: MsgRecvPacket) { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - value: MsgRecvPacket.toJSON(value) - }; - }, - timeout(value: MsgTimeout) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - value: MsgTimeout.toJSON(value) - }; - }, - timeoutOnClose(value: MsgTimeoutOnClose) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - value: MsgTimeoutOnClose.toJSON(value) - }; - }, - acknowledgement(value: MsgAcknowledgement) { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - value: MsgAcknowledgement.toJSON(value) - }; - } - }, - fromJSON: { - channelOpenInit(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - value: MsgChannelOpenInit.fromJSON(value) - }; - }, - channelOpenTry(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - value: MsgChannelOpenTry.fromJSON(value) - }; - }, - channelOpenAck(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - value: MsgChannelOpenAck.fromJSON(value) - }; - }, - channelOpenConfirm(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - value: MsgChannelOpenConfirm.fromJSON(value) - }; - }, - channelCloseInit(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - value: MsgChannelCloseInit.fromJSON(value) - }; - }, - channelCloseConfirm(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - value: MsgChannelCloseConfirm.fromJSON(value) - }; - }, - recvPacket(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - value: MsgRecvPacket.fromJSON(value) - }; - }, - timeout(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - value: MsgTimeout.fromJSON(value) - }; - }, - timeoutOnClose(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - value: MsgTimeoutOnClose.fromJSON(value) - }; - }, - acknowledgement(value: any) { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - value: MsgAcknowledgement.fromJSON(value) - }; - } - }, - fromPartial: { - channelOpenInit(value: MsgChannelOpenInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - value: MsgChannelOpenInit.fromPartial(value) - }; - }, - channelOpenTry(value: MsgChannelOpenTry) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - value: MsgChannelOpenTry.fromPartial(value) - }; - }, - channelOpenAck(value: MsgChannelOpenAck) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - value: MsgChannelOpenAck.fromPartial(value) - }; - }, - channelOpenConfirm(value: MsgChannelOpenConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - value: MsgChannelOpenConfirm.fromPartial(value) - }; - }, - channelCloseInit(value: MsgChannelCloseInit) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - value: MsgChannelCloseInit.fromPartial(value) - }; - }, - channelCloseConfirm(value: MsgChannelCloseConfirm) { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - value: MsgChannelCloseConfirm.fromPartial(value) - }; - }, - recvPacket(value: MsgRecvPacket) { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - value: MsgRecvPacket.fromPartial(value) - }; - }, - timeout(value: MsgTimeout) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - value: MsgTimeout.fromPartial(value) - }; - }, - timeoutOnClose(value: MsgTimeoutOnClose) { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - value: MsgTimeoutOnClose.fromPartial(value) - }; - }, - acknowledgement(value: MsgAcknowledgement) { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - value: MsgAcknowledgement.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts deleted file mode 100644 index 1429bd67..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { MsgChannelOpenInit, MsgChannelOpenInitResponse, MsgChannelOpenTry, MsgChannelOpenTryResponse, MsgChannelOpenAck, MsgChannelOpenAckResponse, MsgChannelOpenConfirm, MsgChannelOpenConfirmResponse, MsgChannelCloseInit, MsgChannelCloseInitResponse, MsgChannelCloseConfirm, MsgChannelCloseConfirmResponse, MsgRecvPacket, MsgRecvPacketResponse, MsgTimeout, MsgTimeoutResponse, MsgTimeoutOnClose, MsgTimeoutOnCloseResponse, MsgAcknowledgement, MsgAcknowledgementResponse } from "./tx"; -/** Msg defines the ibc/channel Msg service. */ -export interface Msg { - /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ - channelOpenInit(request: MsgChannelOpenInit): Promise; - /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ - channelOpenTry(request: MsgChannelOpenTry): Promise; - /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ - channelOpenAck(request: MsgChannelOpenAck): Promise; - /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ - channelOpenConfirm(request: MsgChannelOpenConfirm): Promise; - /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ - channelCloseInit(request: MsgChannelCloseInit): Promise; - /** - * ChannelCloseConfirm defines a rpc handler method for - * MsgChannelCloseConfirm. - */ - channelCloseConfirm(request: MsgChannelCloseConfirm): Promise; - /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ - recvPacket(request: MsgRecvPacket): Promise; - /** Timeout defines a rpc handler method for MsgTimeout. */ - timeout(request: MsgTimeout): Promise; - /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ - timeoutOnClose(request: MsgTimeoutOnClose): Promise; - /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ - acknowledgement(request: MsgAcknowledgement): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.channelOpenInit = this.channelOpenInit.bind(this); - this.channelOpenTry = this.channelOpenTry.bind(this); - this.channelOpenAck = this.channelOpenAck.bind(this); - this.channelOpenConfirm = this.channelOpenConfirm.bind(this); - this.channelCloseInit = this.channelCloseInit.bind(this); - this.channelCloseConfirm = this.channelCloseConfirm.bind(this); - this.recvPacket = this.recvPacket.bind(this); - this.timeout = this.timeout.bind(this); - this.timeoutOnClose = this.timeoutOnClose.bind(this); - this.acknowledgement = this.acknowledgement.bind(this); - } - channelOpenInit(request: MsgChannelOpenInit): Promise { - const data = MsgChannelOpenInit.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenInit", data); - return promise.then(data => MsgChannelOpenInitResponse.decode(new BinaryReader(data))); - } - channelOpenTry(request: MsgChannelOpenTry): Promise { - const data = MsgChannelOpenTry.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenTry", data); - return promise.then(data => MsgChannelOpenTryResponse.decode(new BinaryReader(data))); - } - channelOpenAck(request: MsgChannelOpenAck): Promise { - const data = MsgChannelOpenAck.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenAck", data); - return promise.then(data => MsgChannelOpenAckResponse.decode(new BinaryReader(data))); - } - channelOpenConfirm(request: MsgChannelOpenConfirm): Promise { - const data = MsgChannelOpenConfirm.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenConfirm", data); - return promise.then(data => MsgChannelOpenConfirmResponse.decode(new BinaryReader(data))); - } - channelCloseInit(request: MsgChannelCloseInit): Promise { - const data = MsgChannelCloseInit.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelCloseInit", data); - return promise.then(data => MsgChannelCloseInitResponse.decode(new BinaryReader(data))); - } - channelCloseConfirm(request: MsgChannelCloseConfirm): Promise { - const data = MsgChannelCloseConfirm.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelCloseConfirm", data); - return promise.then(data => MsgChannelCloseConfirmResponse.decode(new BinaryReader(data))); - } - recvPacket(request: MsgRecvPacket): Promise { - const data = MsgRecvPacket.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "RecvPacket", data); - return promise.then(data => MsgRecvPacketResponse.decode(new BinaryReader(data))); - } - timeout(request: MsgTimeout): Promise { - const data = MsgTimeout.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "Timeout", data); - return promise.then(data => MsgTimeoutResponse.decode(new BinaryReader(data))); - } - timeoutOnClose(request: MsgTimeoutOnClose): Promise { - const data = MsgTimeoutOnClose.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "TimeoutOnClose", data); - return promise.then(data => MsgTimeoutOnCloseResponse.decode(new BinaryReader(data))); - } - acknowledgement(request: MsgAcknowledgement): Promise { - const data = MsgAcknowledgement.encode(request).finish(); - const promise = this.rpc.request("ibc.core.channel.v1.Msg", "Acknowledgement", data); - return promise.then(data => MsgAcknowledgementResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.ts b/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.ts deleted file mode 100644 index f7b35b3a..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/channel/v1/tx.ts +++ /dev/null @@ -1,2684 +0,0 @@ -import { Channel, ChannelAmino, ChannelSDKType, Packet, PacketAmino, PacketSDKType } from "./channel"; -import { Height, HeightAmino, HeightSDKType } from "../../client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It - * is called by a relayer on Chain A. - */ -export interface MsgChannelOpenInit { - portId: string; - channel: Channel | undefined; - signer: string; -} -export interface MsgChannelOpenInitProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit"; - value: Uint8Array; -} -/** - * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It - * is called by a relayer on Chain A. - */ -export interface MsgChannelOpenInitAmino { - port_id: string; - channel?: ChannelAmino | undefined; - signer: string; -} -export interface MsgChannelOpenInitAminoMsg { - type: "cosmos-sdk/MsgChannelOpenInit"; - value: MsgChannelOpenInitAmino; -} -/** - * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It - * is called by a relayer on Chain A. - */ -export interface MsgChannelOpenInitSDKType { - port_id: string; - channel: ChannelSDKType | undefined; - signer: string; -} -/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponse {} -export interface MsgChannelOpenInitResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse"; - value: Uint8Array; -} -/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponseAmino {} -export interface MsgChannelOpenInitResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenInitResponse"; - value: MsgChannelOpenInitResponseAmino; -} -/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponseSDKType {} -/** - * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - * on Chain B. - */ -export interface MsgChannelOpenTry { - portId: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need - * the channel identifier of the previous channel in state INIT - */ - previousChannelId: string; - channel: Channel | undefined; - counterpartyVersion: string; - proofInit: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgChannelOpenTryProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry"; - value: Uint8Array; -} -/** - * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - * on Chain B. - */ -export interface MsgChannelOpenTryAmino { - port_id: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need - * the channel identifier of the previous channel in state INIT - */ - previous_channel_id: string; - channel?: ChannelAmino | undefined; - counterparty_version: string; - proof_init: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgChannelOpenTryAminoMsg { - type: "cosmos-sdk/MsgChannelOpenTry"; - value: MsgChannelOpenTryAmino; -} -/** - * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - * on Chain B. - */ -export interface MsgChannelOpenTrySDKType { - port_id: string; - previous_channel_id: string; - channel: ChannelSDKType | undefined; - counterparty_version: string; - proof_init: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponse {} -export interface MsgChannelOpenTryResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse"; - value: Uint8Array; -} -/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponseAmino {} -export interface MsgChannelOpenTryResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenTryResponse"; - value: MsgChannelOpenTryResponseAmino; -} -/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponseSDKType {} -/** - * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge - * the change of channel state to TRYOPEN on Chain B. - */ -export interface MsgChannelOpenAck { - portId: string; - channelId: string; - counterpartyChannelId: string; - counterpartyVersion: string; - proofTry: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgChannelOpenAckProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck"; - value: Uint8Array; -} -/** - * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge - * the change of channel state to TRYOPEN on Chain B. - */ -export interface MsgChannelOpenAckAmino { - port_id: string; - channel_id: string; - counterparty_channel_id: string; - counterparty_version: string; - proof_try: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgChannelOpenAckAminoMsg { - type: "cosmos-sdk/MsgChannelOpenAck"; - value: MsgChannelOpenAckAmino; -} -/** - * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge - * the change of channel state to TRYOPEN on Chain B. - */ -export interface MsgChannelOpenAckSDKType { - port_id: string; - channel_id: string; - counterparty_channel_id: string; - counterparty_version: string; - proof_try: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponse {} -export interface MsgChannelOpenAckResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse"; - value: Uint8Array; -} -/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponseAmino {} -export interface MsgChannelOpenAckResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenAckResponse"; - value: MsgChannelOpenAckResponseAmino; -} -/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponseSDKType {} -/** - * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of channel state to OPEN on Chain A. - */ -export interface MsgChannelOpenConfirm { - portId: string; - channelId: string; - proofAck: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgChannelOpenConfirmProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm"; - value: Uint8Array; -} -/** - * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of channel state to OPEN on Chain A. - */ -export interface MsgChannelOpenConfirmAmino { - port_id: string; - channel_id: string; - proof_ack: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgChannelOpenConfirmAminoMsg { - type: "cosmos-sdk/MsgChannelOpenConfirm"; - value: MsgChannelOpenConfirmAmino; -} -/** - * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of channel state to OPEN on Chain A. - */ -export interface MsgChannelOpenConfirmSDKType { - port_id: string; - channel_id: string; - proof_ack: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** - * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response - * type. - */ -export interface MsgChannelOpenConfirmResponse {} -export interface MsgChannelOpenConfirmResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse"; - value: Uint8Array; -} -/** - * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response - * type. - */ -export interface MsgChannelOpenConfirmResponseAmino {} -export interface MsgChannelOpenConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgChannelOpenConfirmResponse"; - value: MsgChannelOpenConfirmResponseAmino; -} -/** - * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response - * type. - */ -export interface MsgChannelOpenConfirmResponseSDKType {} -/** - * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A - * to close a channel with Chain B. - */ -export interface MsgChannelCloseInit { - portId: string; - channelId: string; - signer: string; -} -export interface MsgChannelCloseInitProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit"; - value: Uint8Array; -} -/** - * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A - * to close a channel with Chain B. - */ -export interface MsgChannelCloseInitAmino { - port_id: string; - channel_id: string; - signer: string; -} -export interface MsgChannelCloseInitAminoMsg { - type: "cosmos-sdk/MsgChannelCloseInit"; - value: MsgChannelCloseInitAmino; -} -/** - * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A - * to close a channel with Chain B. - */ -export interface MsgChannelCloseInitSDKType { - port_id: string; - channel_id: string; - signer: string; -} -/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ -export interface MsgChannelCloseInitResponse {} -export interface MsgChannelCloseInitResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse"; - value: Uint8Array; -} -/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ -export interface MsgChannelCloseInitResponseAmino {} -export interface MsgChannelCloseInitResponseAminoMsg { - type: "cosmos-sdk/MsgChannelCloseInitResponse"; - value: MsgChannelCloseInitResponseAmino; -} -/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ -export interface MsgChannelCloseInitResponseSDKType {} -/** - * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B - * to acknowledge the change of channel state to CLOSED on Chain A. - */ -export interface MsgChannelCloseConfirm { - portId: string; - channelId: string; - proofInit: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgChannelCloseConfirmProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm"; - value: Uint8Array; -} -/** - * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B - * to acknowledge the change of channel state to CLOSED on Chain A. - */ -export interface MsgChannelCloseConfirmAmino { - port_id: string; - channel_id: string; - proof_init: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgChannelCloseConfirmAminoMsg { - type: "cosmos-sdk/MsgChannelCloseConfirm"; - value: MsgChannelCloseConfirmAmino; -} -/** - * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B - * to acknowledge the change of channel state to CLOSED on Chain A. - */ -export interface MsgChannelCloseConfirmSDKType { - port_id: string; - channel_id: string; - proof_init: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** - * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response - * type. - */ -export interface MsgChannelCloseConfirmResponse {} -export interface MsgChannelCloseConfirmResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse"; - value: Uint8Array; -} -/** - * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response - * type. - */ -export interface MsgChannelCloseConfirmResponseAmino {} -export interface MsgChannelCloseConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgChannelCloseConfirmResponse"; - value: MsgChannelCloseConfirmResponseAmino; -} -/** - * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response - * type. - */ -export interface MsgChannelCloseConfirmResponseSDKType {} -/** MsgRecvPacket receives incoming IBC packet */ -export interface MsgRecvPacket { - packet: Packet | undefined; - proofCommitment: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgRecvPacketProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket"; - value: Uint8Array; -} -/** MsgRecvPacket receives incoming IBC packet */ -export interface MsgRecvPacketAmino { - packet?: PacketAmino | undefined; - proof_commitment: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgRecvPacketAminoMsg { - type: "cosmos-sdk/MsgRecvPacket"; - value: MsgRecvPacketAmino; -} -/** MsgRecvPacket receives incoming IBC packet */ -export interface MsgRecvPacketSDKType { - packet: PacketSDKType | undefined; - proof_commitment: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponse {} -export interface MsgRecvPacketResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse"; - value: Uint8Array; -} -/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponseAmino {} -export interface MsgRecvPacketResponseAminoMsg { - type: "cosmos-sdk/MsgRecvPacketResponse"; - value: MsgRecvPacketResponseAmino; -} -/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponseSDKType {} -/** MsgTimeout receives timed-out packet */ -export interface MsgTimeout { - packet: Packet | undefined; - proofUnreceived: Uint8Array; - proofHeight: Height | undefined; - nextSequenceRecv: bigint; - signer: string; -} -export interface MsgTimeoutProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeout"; - value: Uint8Array; -} -/** MsgTimeout receives timed-out packet */ -export interface MsgTimeoutAmino { - packet?: PacketAmino | undefined; - proof_unreceived: Uint8Array; - proof_height?: HeightAmino | undefined; - next_sequence_recv: string; - signer: string; -} -export interface MsgTimeoutAminoMsg { - type: "cosmos-sdk/MsgTimeout"; - value: MsgTimeoutAmino; -} -/** MsgTimeout receives timed-out packet */ -export interface MsgTimeoutSDKType { - packet: PacketSDKType | undefined; - proof_unreceived: Uint8Array; - proof_height: HeightSDKType | undefined; - next_sequence_recv: bigint; - signer: string; -} -/** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponse {} -export interface MsgTimeoutResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse"; - value: Uint8Array; -} -/** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponseAmino {} -export interface MsgTimeoutResponseAminoMsg { - type: "cosmos-sdk/MsgTimeoutResponse"; - value: MsgTimeoutResponseAmino; -} -/** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponseSDKType {} -/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ -export interface MsgTimeoutOnClose { - packet: Packet | undefined; - proofUnreceived: Uint8Array; - proofClose: Uint8Array; - proofHeight: Height | undefined; - nextSequenceRecv: bigint; - signer: string; -} -export interface MsgTimeoutOnCloseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose"; - value: Uint8Array; -} -/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ -export interface MsgTimeoutOnCloseAmino { - packet?: PacketAmino | undefined; - proof_unreceived: Uint8Array; - proof_close: Uint8Array; - proof_height?: HeightAmino | undefined; - next_sequence_recv: string; - signer: string; -} -export interface MsgTimeoutOnCloseAminoMsg { - type: "cosmos-sdk/MsgTimeoutOnClose"; - value: MsgTimeoutOnCloseAmino; -} -/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ -export interface MsgTimeoutOnCloseSDKType { - packet: PacketSDKType | undefined; - proof_unreceived: Uint8Array; - proof_close: Uint8Array; - proof_height: HeightSDKType | undefined; - next_sequence_recv: bigint; - signer: string; -} -/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponse {} -export interface MsgTimeoutOnCloseResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse"; - value: Uint8Array; -} -/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponseAmino {} -export interface MsgTimeoutOnCloseResponseAminoMsg { - type: "cosmos-sdk/MsgTimeoutOnCloseResponse"; - value: MsgTimeoutOnCloseResponseAmino; -} -/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponseSDKType {} -/** MsgAcknowledgement receives incoming IBC acknowledgement */ -export interface MsgAcknowledgement { - packet: Packet | undefined; - acknowledgement: Uint8Array; - proofAcked: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgAcknowledgementProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement"; - value: Uint8Array; -} -/** MsgAcknowledgement receives incoming IBC acknowledgement */ -export interface MsgAcknowledgementAmino { - packet?: PacketAmino | undefined; - acknowledgement: Uint8Array; - proof_acked: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgAcknowledgementAminoMsg { - type: "cosmos-sdk/MsgAcknowledgement"; - value: MsgAcknowledgementAmino; -} -/** MsgAcknowledgement receives incoming IBC acknowledgement */ -export interface MsgAcknowledgementSDKType { - packet: PacketSDKType | undefined; - acknowledgement: Uint8Array; - proof_acked: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -export interface MsgAcknowledgementResponse {} -export interface MsgAcknowledgementResponseProtoMsg { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse"; - value: Uint8Array; -} -/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -export interface MsgAcknowledgementResponseAmino {} -export interface MsgAcknowledgementResponseAminoMsg { - type: "cosmos-sdk/MsgAcknowledgementResponse"; - value: MsgAcknowledgementResponseAmino; -} -/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -export interface MsgAcknowledgementResponseSDKType {} -function createBaseMsgChannelOpenInit(): MsgChannelOpenInit { - return { - portId: "", - channel: Channel.fromPartial({}), - signer: "" - }; -} -export const MsgChannelOpenInit = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - aminoType: "cosmos-sdk/MsgChannelOpenInit", - encode(message: MsgChannelOpenInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenInit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenInit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChannelOpenInit { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgChannelOpenInit): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channel !== undefined && (obj.channel = message.channel ? Channel.toJSON(message.channel) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgChannelOpenInit { - const message = createBaseMsgChannelOpenInit(); - message.portId = object.portId ?? ""; - message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgChannelOpenInitSDKType): MsgChannelOpenInit { - return { - portId: object?.port_id, - channel: object.channel ? Channel.fromSDK(object.channel) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgChannelOpenInit): MsgChannelOpenInitSDKType { - const obj: any = {}; - obj.port_id = message.portId; - message.channel !== undefined && (obj.channel = message.channel ? Channel.toSDK(message.channel) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgChannelOpenInitAmino): MsgChannelOpenInit { - return { - portId: object.port_id, - channel: object?.channel ? Channel.fromAmino(object.channel) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgChannelOpenInit): MsgChannelOpenInitAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenInitAminoMsg): MsgChannelOpenInit { - return MsgChannelOpenInit.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenInit): MsgChannelOpenInitAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenInit", - value: MsgChannelOpenInit.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenInitProtoMsg): MsgChannelOpenInit { - return MsgChannelOpenInit.decode(message.value); - }, - toProto(message: MsgChannelOpenInit): Uint8Array { - return MsgChannelOpenInit.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenInit): MsgChannelOpenInitProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", - value: MsgChannelOpenInit.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { - return {}; -} -export const MsgChannelOpenInitResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", - aminoType: "cosmos-sdk/MsgChannelOpenInitResponse", - encode(_: MsgChannelOpenInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenInitResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenInitResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChannelOpenInitResponse { - return {}; - }, - toJSON(_: MsgChannelOpenInitResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChannelOpenInitResponse { - const message = createBaseMsgChannelOpenInitResponse(); - return message; - }, - fromSDK(_: MsgChannelOpenInitResponseSDKType): MsgChannelOpenInitResponse { - return {}; - }, - toSDK(_: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChannelOpenInitResponseAmino): MsgChannelOpenInitResponse { - return {}; - }, - toAmino(_: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenInitResponseAminoMsg): MsgChannelOpenInitResponse { - return MsgChannelOpenInitResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenInitResponse", - value: MsgChannelOpenInitResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenInitResponseProtoMsg): MsgChannelOpenInitResponse { - return MsgChannelOpenInitResponse.decode(message.value); - }, - toProto(message: MsgChannelOpenInitResponse): Uint8Array { - return MsgChannelOpenInitResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", - value: MsgChannelOpenInitResponse.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { - return { - portId: "", - previousChannelId: "", - channel: Channel.fromPartial({}), - counterpartyVersion: "", - proofInit: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgChannelOpenTry = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - aminoType: "cosmos-sdk/MsgChannelOpenTry", - encode(message: MsgChannelOpenTry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.previousChannelId !== "") { - writer.uint32(18).string(message.previousChannelId); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(26).fork()).ldelim(); - } - if (message.counterpartyVersion !== "") { - writer.uint32(34).string(message.counterpartyVersion); - } - if (message.proofInit.length !== 0) { - writer.uint32(42).bytes(message.proofInit); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenTry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenTry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.previousChannelId = reader.string(); - break; - case 3: - message.channel = Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofInit = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChannelOpenTry { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - previousChannelId: isSet(object.previousChannelId) ? String(object.previousChannelId) : "", - channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined, - counterpartyVersion: isSet(object.counterpartyVersion) ? String(object.counterpartyVersion) : "", - proofInit: isSet(object.proofInit) ? bytesFromBase64(object.proofInit) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgChannelOpenTry): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.previousChannelId !== undefined && (obj.previousChannelId = message.previousChannelId); - message.channel !== undefined && (obj.channel = message.channel ? Channel.toJSON(message.channel) : undefined); - message.counterpartyVersion !== undefined && (obj.counterpartyVersion = message.counterpartyVersion); - message.proofInit !== undefined && (obj.proofInit = base64FromBytes(message.proofInit !== undefined ? message.proofInit : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgChannelOpenTry { - const message = createBaseMsgChannelOpenTry(); - message.portId = object.portId ?? ""; - message.previousChannelId = object.previousChannelId ?? ""; - message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - message.counterpartyVersion = object.counterpartyVersion ?? ""; - message.proofInit = object.proofInit ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgChannelOpenTrySDKType): MsgChannelOpenTry { - return { - portId: object?.port_id, - previousChannelId: object?.previous_channel_id, - channel: object.channel ? Channel.fromSDK(object.channel) : undefined, - counterpartyVersion: object?.counterparty_version, - proofInit: object?.proof_init, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgChannelOpenTry): MsgChannelOpenTrySDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.previous_channel_id = message.previousChannelId; - message.channel !== undefined && (obj.channel = message.channel ? Channel.toSDK(message.channel) : undefined); - obj.counterparty_version = message.counterpartyVersion; - obj.proof_init = message.proofInit; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgChannelOpenTryAmino): MsgChannelOpenTry { - return { - portId: object.port_id, - previousChannelId: object.previous_channel_id, - channel: object?.channel ? Channel.fromAmino(object.channel) : undefined, - counterpartyVersion: object.counterparty_version, - proofInit: object.proof_init, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgChannelOpenTry): MsgChannelOpenTryAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.previous_channel_id = message.previousChannelId; - obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - obj.counterparty_version = message.counterpartyVersion; - obj.proof_init = message.proofInit; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenTryAminoMsg): MsgChannelOpenTry { - return MsgChannelOpenTry.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenTry): MsgChannelOpenTryAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenTry", - value: MsgChannelOpenTry.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenTryProtoMsg): MsgChannelOpenTry { - return MsgChannelOpenTry.decode(message.value); - }, - toProto(message: MsgChannelOpenTry): Uint8Array { - return MsgChannelOpenTry.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenTry): MsgChannelOpenTryProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", - value: MsgChannelOpenTry.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { - return {}; -} -export const MsgChannelOpenTryResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", - aminoType: "cosmos-sdk/MsgChannelOpenTryResponse", - encode(_: MsgChannelOpenTryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenTryResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenTryResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChannelOpenTryResponse { - return {}; - }, - toJSON(_: MsgChannelOpenTryResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChannelOpenTryResponse { - const message = createBaseMsgChannelOpenTryResponse(); - return message; - }, - fromSDK(_: MsgChannelOpenTryResponseSDKType): MsgChannelOpenTryResponse { - return {}; - }, - toSDK(_: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChannelOpenTryResponseAmino): MsgChannelOpenTryResponse { - return {}; - }, - toAmino(_: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenTryResponseAminoMsg): MsgChannelOpenTryResponse { - return MsgChannelOpenTryResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenTryResponse", - value: MsgChannelOpenTryResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenTryResponseProtoMsg): MsgChannelOpenTryResponse { - return MsgChannelOpenTryResponse.decode(message.value); - }, - toProto(message: MsgChannelOpenTryResponse): Uint8Array { - return MsgChannelOpenTryResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", - value: MsgChannelOpenTryResponse.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { - return { - portId: "", - channelId: "", - counterpartyChannelId: "", - counterpartyVersion: "", - proofTry: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgChannelOpenAck = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - aminoType: "cosmos-sdk/MsgChannelOpenAck", - encode(message: MsgChannelOpenAck, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.counterpartyChannelId !== "") { - writer.uint32(26).string(message.counterpartyChannelId); - } - if (message.counterpartyVersion !== "") { - writer.uint32(34).string(message.counterpartyVersion); - } - if (message.proofTry.length !== 0) { - writer.uint32(42).bytes(message.proofTry); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(58).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenAck { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenAck(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.counterpartyChannelId = reader.string(); - break; - case 4: - message.counterpartyVersion = reader.string(); - break; - case 5: - message.proofTry = reader.bytes(); - break; - case 6: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChannelOpenAck { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - counterpartyChannelId: isSet(object.counterpartyChannelId) ? String(object.counterpartyChannelId) : "", - counterpartyVersion: isSet(object.counterpartyVersion) ? String(object.counterpartyVersion) : "", - proofTry: isSet(object.proofTry) ? bytesFromBase64(object.proofTry) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgChannelOpenAck): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.counterpartyChannelId !== undefined && (obj.counterpartyChannelId = message.counterpartyChannelId); - message.counterpartyVersion !== undefined && (obj.counterpartyVersion = message.counterpartyVersion); - message.proofTry !== undefined && (obj.proofTry = base64FromBytes(message.proofTry !== undefined ? message.proofTry : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgChannelOpenAck { - const message = createBaseMsgChannelOpenAck(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.counterpartyChannelId = object.counterpartyChannelId ?? ""; - message.counterpartyVersion = object.counterpartyVersion ?? ""; - message.proofTry = object.proofTry ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgChannelOpenAckSDKType): MsgChannelOpenAck { - return { - portId: object?.port_id, - channelId: object?.channel_id, - counterpartyChannelId: object?.counterparty_channel_id, - counterpartyVersion: object?.counterparty_version, - proofTry: object?.proof_try, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgChannelOpenAck): MsgChannelOpenAckSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.counterparty_channel_id = message.counterpartyChannelId; - obj.counterparty_version = message.counterpartyVersion; - obj.proof_try = message.proofTry; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgChannelOpenAckAmino): MsgChannelOpenAck { - return { - portId: object.port_id, - channelId: object.channel_id, - counterpartyChannelId: object.counterparty_channel_id, - counterpartyVersion: object.counterparty_version, - proofTry: object.proof_try, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgChannelOpenAck): MsgChannelOpenAckAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.counterparty_channel_id = message.counterpartyChannelId; - obj.counterparty_version = message.counterpartyVersion; - obj.proof_try = message.proofTry; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenAckAminoMsg): MsgChannelOpenAck { - return MsgChannelOpenAck.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenAck): MsgChannelOpenAckAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenAck", - value: MsgChannelOpenAck.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenAckProtoMsg): MsgChannelOpenAck { - return MsgChannelOpenAck.decode(message.value); - }, - toProto(message: MsgChannelOpenAck): Uint8Array { - return MsgChannelOpenAck.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenAck): MsgChannelOpenAckProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", - value: MsgChannelOpenAck.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { - return {}; -} -export const MsgChannelOpenAckResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", - aminoType: "cosmos-sdk/MsgChannelOpenAckResponse", - encode(_: MsgChannelOpenAckResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenAckResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenAckResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChannelOpenAckResponse { - return {}; - }, - toJSON(_: MsgChannelOpenAckResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChannelOpenAckResponse { - const message = createBaseMsgChannelOpenAckResponse(); - return message; - }, - fromSDK(_: MsgChannelOpenAckResponseSDKType): MsgChannelOpenAckResponse { - return {}; - }, - toSDK(_: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChannelOpenAckResponseAmino): MsgChannelOpenAckResponse { - return {}; - }, - toAmino(_: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenAckResponseAminoMsg): MsgChannelOpenAckResponse { - return MsgChannelOpenAckResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenAckResponse", - value: MsgChannelOpenAckResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenAckResponseProtoMsg): MsgChannelOpenAckResponse { - return MsgChannelOpenAckResponse.decode(message.value); - }, - toProto(message: MsgChannelOpenAckResponse): Uint8Array { - return MsgChannelOpenAckResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", - value: MsgChannelOpenAckResponse.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { - return { - portId: "", - channelId: "", - proofAck: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgChannelOpenConfirm = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - aminoType: "cosmos-sdk/MsgChannelOpenConfirm", - encode(message: MsgChannelOpenConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.proofAck.length !== 0) { - writer.uint32(26).bytes(message.proofAck); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenConfirm { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenConfirm(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofAck = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChannelOpenConfirm { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - proofAck: isSet(object.proofAck) ? bytesFromBase64(object.proofAck) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgChannelOpenConfirm): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.proofAck !== undefined && (obj.proofAck = base64FromBytes(message.proofAck !== undefined ? message.proofAck : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgChannelOpenConfirm { - const message = createBaseMsgChannelOpenConfirm(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.proofAck = object.proofAck ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgChannelOpenConfirmSDKType): MsgChannelOpenConfirm { - return { - portId: object?.port_id, - channelId: object?.channel_id, - proofAck: object?.proof_ack, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.proof_ack = message.proofAck; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgChannelOpenConfirmAmino): MsgChannelOpenConfirm { - return { - portId: object.port_id, - channelId: object.channel_id, - proofAck: object.proof_ack, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.proof_ack = message.proofAck; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenConfirmAminoMsg): MsgChannelOpenConfirm { - return MsgChannelOpenConfirm.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenConfirm", - value: MsgChannelOpenConfirm.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenConfirmProtoMsg): MsgChannelOpenConfirm { - return MsgChannelOpenConfirm.decode(message.value); - }, - toProto(message: MsgChannelOpenConfirm): Uint8Array { - return MsgChannelOpenConfirm.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", - value: MsgChannelOpenConfirm.encode(message).finish() - }; - } -}; -function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { - return {}; -} -export const MsgChannelOpenConfirmResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", - aminoType: "cosmos-sdk/MsgChannelOpenConfirmResponse", - encode(_: MsgChannelOpenConfirmResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenConfirmResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelOpenConfirmResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChannelOpenConfirmResponse { - return {}; - }, - toJSON(_: MsgChannelOpenConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChannelOpenConfirmResponse { - const message = createBaseMsgChannelOpenConfirmResponse(); - return message; - }, - fromSDK(_: MsgChannelOpenConfirmResponseSDKType): MsgChannelOpenConfirmResponse { - return {}; - }, - toSDK(_: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChannelOpenConfirmResponseAmino): MsgChannelOpenConfirmResponse { - return {}; - }, - toAmino(_: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChannelOpenConfirmResponseAminoMsg): MsgChannelOpenConfirmResponse { - return MsgChannelOpenConfirmResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseAminoMsg { - return { - type: "cosmos-sdk/MsgChannelOpenConfirmResponse", - value: MsgChannelOpenConfirmResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelOpenConfirmResponseProtoMsg): MsgChannelOpenConfirmResponse { - return MsgChannelOpenConfirmResponse.decode(message.value); - }, - toProto(message: MsgChannelOpenConfirmResponse): Uint8Array { - return MsgChannelOpenConfirmResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", - value: MsgChannelOpenConfirmResponse.encode(message).finish() - }; - } -}; -function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { - return { - portId: "", - channelId: "", - signer: "" - }; -} -export const MsgChannelCloseInit = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - aminoType: "cosmos-sdk/MsgChannelCloseInit", - encode(message: MsgChannelCloseInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseInit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelCloseInit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChannelCloseInit { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgChannelCloseInit): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgChannelCloseInit { - const message = createBaseMsgChannelCloseInit(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgChannelCloseInitSDKType): MsgChannelCloseInit { - return { - portId: object?.port_id, - channelId: object?.channel_id, - signer: object?.signer - }; - }, - toSDK(message: MsgChannelCloseInit): MsgChannelCloseInitSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgChannelCloseInitAmino): MsgChannelCloseInit { - return { - portId: object.port_id, - channelId: object.channel_id, - signer: object.signer - }; - }, - toAmino(message: MsgChannelCloseInit): MsgChannelCloseInitAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgChannelCloseInitAminoMsg): MsgChannelCloseInit { - return MsgChannelCloseInit.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelCloseInit): MsgChannelCloseInitAminoMsg { - return { - type: "cosmos-sdk/MsgChannelCloseInit", - value: MsgChannelCloseInit.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelCloseInitProtoMsg): MsgChannelCloseInit { - return MsgChannelCloseInit.decode(message.value); - }, - toProto(message: MsgChannelCloseInit): Uint8Array { - return MsgChannelCloseInit.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelCloseInit): MsgChannelCloseInitProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", - value: MsgChannelCloseInit.encode(message).finish() - }; - } -}; -function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { - return {}; -} -export const MsgChannelCloseInitResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", - aminoType: "cosmos-sdk/MsgChannelCloseInitResponse", - encode(_: MsgChannelCloseInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseInitResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelCloseInitResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChannelCloseInitResponse { - return {}; - }, - toJSON(_: MsgChannelCloseInitResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChannelCloseInitResponse { - const message = createBaseMsgChannelCloseInitResponse(); - return message; - }, - fromSDK(_: MsgChannelCloseInitResponseSDKType): MsgChannelCloseInitResponse { - return {}; - }, - toSDK(_: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChannelCloseInitResponseAmino): MsgChannelCloseInitResponse { - return {}; - }, - toAmino(_: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChannelCloseInitResponseAminoMsg): MsgChannelCloseInitResponse { - return MsgChannelCloseInitResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseAminoMsg { - return { - type: "cosmos-sdk/MsgChannelCloseInitResponse", - value: MsgChannelCloseInitResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelCloseInitResponseProtoMsg): MsgChannelCloseInitResponse { - return MsgChannelCloseInitResponse.decode(message.value); - }, - toProto(message: MsgChannelCloseInitResponse): Uint8Array { - return MsgChannelCloseInitResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", - value: MsgChannelCloseInitResponse.encode(message).finish() - }; - } -}; -function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { - return { - portId: "", - channelId: "", - proofInit: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgChannelCloseConfirm = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - aminoType: "cosmos-sdk/MsgChannelCloseConfirm", - encode(message: MsgChannelCloseConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.channelId !== "") { - writer.uint32(18).string(message.channelId); - } - if (message.proofInit.length !== 0) { - writer.uint32(26).bytes(message.proofInit); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseConfirm { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelCloseConfirm(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.channelId = reader.string(); - break; - case 3: - message.proofInit = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChannelCloseConfirm { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - channelId: isSet(object.channelId) ? String(object.channelId) : "", - proofInit: isSet(object.proofInit) ? bytesFromBase64(object.proofInit) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgChannelCloseConfirm): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.channelId !== undefined && (obj.channelId = message.channelId); - message.proofInit !== undefined && (obj.proofInit = base64FromBytes(message.proofInit !== undefined ? message.proofInit : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgChannelCloseConfirm { - const message = createBaseMsgChannelCloseConfirm(); - message.portId = object.portId ?? ""; - message.channelId = object.channelId ?? ""; - message.proofInit = object.proofInit ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgChannelCloseConfirmSDKType): MsgChannelCloseConfirm { - return { - portId: object?.port_id, - channelId: object?.channel_id, - proofInit: object?.proof_init, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.proof_init = message.proofInit; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgChannelCloseConfirmAmino): MsgChannelCloseConfirm { - return { - portId: object.port_id, - channelId: object.channel_id, - proofInit: object.proof_init, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.channel_id = message.channelId; - obj.proof_init = message.proofInit; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgChannelCloseConfirmAminoMsg): MsgChannelCloseConfirm { - return MsgChannelCloseConfirm.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmAminoMsg { - return { - type: "cosmos-sdk/MsgChannelCloseConfirm", - value: MsgChannelCloseConfirm.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelCloseConfirmProtoMsg): MsgChannelCloseConfirm { - return MsgChannelCloseConfirm.decode(message.value); - }, - toProto(message: MsgChannelCloseConfirm): Uint8Array { - return MsgChannelCloseConfirm.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", - value: MsgChannelCloseConfirm.encode(message).finish() - }; - } -}; -function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { - return {}; -} -export const MsgChannelCloseConfirmResponse = { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", - aminoType: "cosmos-sdk/MsgChannelCloseConfirmResponse", - encode(_: MsgChannelCloseConfirmResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseConfirmResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChannelCloseConfirmResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChannelCloseConfirmResponse { - return {}; - }, - toJSON(_: MsgChannelCloseConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChannelCloseConfirmResponse { - const message = createBaseMsgChannelCloseConfirmResponse(); - return message; - }, - fromSDK(_: MsgChannelCloseConfirmResponseSDKType): MsgChannelCloseConfirmResponse { - return {}; - }, - toSDK(_: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChannelCloseConfirmResponseAmino): MsgChannelCloseConfirmResponse { - return {}; - }, - toAmino(_: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChannelCloseConfirmResponseAminoMsg): MsgChannelCloseConfirmResponse { - return MsgChannelCloseConfirmResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseAminoMsg { - return { - type: "cosmos-sdk/MsgChannelCloseConfirmResponse", - value: MsgChannelCloseConfirmResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChannelCloseConfirmResponseProtoMsg): MsgChannelCloseConfirmResponse { - return MsgChannelCloseConfirmResponse.decode(message.value); - }, - toProto(message: MsgChannelCloseConfirmResponse): Uint8Array { - return MsgChannelCloseConfirmResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", - value: MsgChannelCloseConfirmResponse.encode(message).finish() - }; - } -}; -function createBaseMsgRecvPacket(): MsgRecvPacket { - return { - packet: Packet.fromPartial({}), - proofCommitment: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgRecvPacket = { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - aminoType: "cosmos-sdk/MsgRecvPacket", - encode(message: MsgRecvPacket, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofCommitment.length !== 0) { - writer.uint32(18).bytes(message.proofCommitment); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgRecvPacket { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRecvPacket(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofCommitment = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgRecvPacket { - return { - packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined, - proofCommitment: isSet(object.proofCommitment) ? bytesFromBase64(object.proofCommitment) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgRecvPacket): unknown { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofCommitment !== undefined && (obj.proofCommitment = base64FromBytes(message.proofCommitment !== undefined ? message.proofCommitment : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgRecvPacket { - const message = createBaseMsgRecvPacket(); - message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; - message.proofCommitment = object.proofCommitment ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgRecvPacketSDKType): MsgRecvPacket { - return { - packet: object.packet ? Packet.fromSDK(object.packet) : undefined, - proofCommitment: object?.proof_commitment, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgRecvPacket): MsgRecvPacketSDKType { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toSDK(message.packet) : undefined); - obj.proof_commitment = message.proofCommitment; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgRecvPacketAmino): MsgRecvPacket { - return { - packet: object?.packet ? Packet.fromAmino(object.packet) : undefined, - proofCommitment: object.proof_commitment, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgRecvPacket): MsgRecvPacketAmino { - const obj: any = {}; - obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; - obj.proof_commitment = message.proofCommitment; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgRecvPacketAminoMsg): MsgRecvPacket { - return MsgRecvPacket.fromAmino(object.value); - }, - toAminoMsg(message: MsgRecvPacket): MsgRecvPacketAminoMsg { - return { - type: "cosmos-sdk/MsgRecvPacket", - value: MsgRecvPacket.toAmino(message) - }; - }, - fromProtoMsg(message: MsgRecvPacketProtoMsg): MsgRecvPacket { - return MsgRecvPacket.decode(message.value); - }, - toProto(message: MsgRecvPacket): Uint8Array { - return MsgRecvPacket.encode(message).finish(); - }, - toProtoMsg(message: MsgRecvPacket): MsgRecvPacketProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", - value: MsgRecvPacket.encode(message).finish() - }; - } -}; -function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { - return {}; -} -export const MsgRecvPacketResponse = { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", - aminoType: "cosmos-sdk/MsgRecvPacketResponse", - encode(_: MsgRecvPacketResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgRecvPacketResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRecvPacketResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgRecvPacketResponse { - return {}; - }, - toJSON(_: MsgRecvPacketResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgRecvPacketResponse { - const message = createBaseMsgRecvPacketResponse(); - return message; - }, - fromSDK(_: MsgRecvPacketResponseSDKType): MsgRecvPacketResponse { - return {}; - }, - toSDK(_: MsgRecvPacketResponse): MsgRecvPacketResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgRecvPacketResponseAmino): MsgRecvPacketResponse { - return {}; - }, - toAmino(_: MsgRecvPacketResponse): MsgRecvPacketResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgRecvPacketResponseAminoMsg): MsgRecvPacketResponse { - return MsgRecvPacketResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgRecvPacketResponse): MsgRecvPacketResponseAminoMsg { - return { - type: "cosmos-sdk/MsgRecvPacketResponse", - value: MsgRecvPacketResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgRecvPacketResponseProtoMsg): MsgRecvPacketResponse { - return MsgRecvPacketResponse.decode(message.value); - }, - toProto(message: MsgRecvPacketResponse): Uint8Array { - return MsgRecvPacketResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgRecvPacketResponse): MsgRecvPacketResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", - value: MsgRecvPacketResponse.encode(message).finish() - }; - } -}; -function createBaseMsgTimeout(): MsgTimeout { - return { - packet: Packet.fromPartial({}), - proofUnreceived: new Uint8Array(), - proofHeight: Height.fromPartial({}), - nextSequenceRecv: BigInt(0), - signer: "" - }; -} -export const MsgTimeout = { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - aminoType: "cosmos-sdk/MsgTimeout", - encode(message: MsgTimeout, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofUnreceived.length !== 0) { - writer.uint32(18).bytes(message.proofUnreceived); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.nextSequenceRecv !== BigInt(0)) { - writer.uint32(32).uint64(message.nextSequenceRecv); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeout { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTimeout(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.nextSequenceRecv = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgTimeout { - return { - packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined, - proofUnreceived: isSet(object.proofUnreceived) ? bytesFromBase64(object.proofUnreceived) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - nextSequenceRecv: isSet(object.nextSequenceRecv) ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0), - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgTimeout): unknown { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofUnreceived !== undefined && (obj.proofUnreceived = base64FromBytes(message.proofUnreceived !== undefined ? message.proofUnreceived : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.nextSequenceRecv !== undefined && (obj.nextSequenceRecv = (message.nextSequenceRecv || BigInt(0)).toString()); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgTimeout { - const message = createBaseMsgTimeout(); - message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; - message.proofUnreceived = object.proofUnreceived ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.nextSequenceRecv = object.nextSequenceRecv !== undefined && object.nextSequenceRecv !== null ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0); - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgTimeoutSDKType): MsgTimeout { - return { - packet: object.packet ? Packet.fromSDK(object.packet) : undefined, - proofUnreceived: object?.proof_unreceived, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - nextSequenceRecv: object?.next_sequence_recv, - signer: object?.signer - }; - }, - toSDK(message: MsgTimeout): MsgTimeoutSDKType { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toSDK(message.packet) : undefined); - obj.proof_unreceived = message.proofUnreceived; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.next_sequence_recv = message.nextSequenceRecv; - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgTimeoutAmino): MsgTimeout { - return { - packet: object?.packet ? Packet.fromAmino(object.packet) : undefined, - proofUnreceived: object.proof_unreceived, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - nextSequenceRecv: BigInt(object.next_sequence_recv), - signer: object.signer - }; - }, - toAmino(message: MsgTimeout): MsgTimeoutAmino { - const obj: any = {}; - obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; - obj.proof_unreceived = message.proofUnreceived; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.next_sequence_recv = message.nextSequenceRecv ? message.nextSequenceRecv.toString() : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgTimeoutAminoMsg): MsgTimeout { - return MsgTimeout.fromAmino(object.value); - }, - toAminoMsg(message: MsgTimeout): MsgTimeoutAminoMsg { - return { - type: "cosmos-sdk/MsgTimeout", - value: MsgTimeout.toAmino(message) - }; - }, - fromProtoMsg(message: MsgTimeoutProtoMsg): MsgTimeout { - return MsgTimeout.decode(message.value); - }, - toProto(message: MsgTimeout): Uint8Array { - return MsgTimeout.encode(message).finish(); - }, - toProtoMsg(message: MsgTimeout): MsgTimeoutProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeout", - value: MsgTimeout.encode(message).finish() - }; - } -}; -function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { - return {}; -} -export const MsgTimeoutResponse = { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", - aminoType: "cosmos-sdk/MsgTimeoutResponse", - encode(_: MsgTimeoutResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeoutResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTimeoutResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgTimeoutResponse { - return {}; - }, - toJSON(_: MsgTimeoutResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgTimeoutResponse { - const message = createBaseMsgTimeoutResponse(); - return message; - }, - fromSDK(_: MsgTimeoutResponseSDKType): MsgTimeoutResponse { - return {}; - }, - toSDK(_: MsgTimeoutResponse): MsgTimeoutResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgTimeoutResponseAmino): MsgTimeoutResponse { - return {}; - }, - toAmino(_: MsgTimeoutResponse): MsgTimeoutResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgTimeoutResponseAminoMsg): MsgTimeoutResponse { - return MsgTimeoutResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgTimeoutResponse): MsgTimeoutResponseAminoMsg { - return { - type: "cosmos-sdk/MsgTimeoutResponse", - value: MsgTimeoutResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgTimeoutResponseProtoMsg): MsgTimeoutResponse { - return MsgTimeoutResponse.decode(message.value); - }, - toProto(message: MsgTimeoutResponse): Uint8Array { - return MsgTimeoutResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgTimeoutResponse): MsgTimeoutResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", - value: MsgTimeoutResponse.encode(message).finish() - }; - } -}; -function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { - return { - packet: Packet.fromPartial({}), - proofUnreceived: new Uint8Array(), - proofClose: new Uint8Array(), - proofHeight: Height.fromPartial({}), - nextSequenceRecv: BigInt(0), - signer: "" - }; -} -export const MsgTimeoutOnClose = { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - aminoType: "cosmos-sdk/MsgTimeoutOnClose", - encode(message: MsgTimeoutOnClose, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.proofUnreceived.length !== 0) { - writer.uint32(18).bytes(message.proofUnreceived); - } - if (message.proofClose.length !== 0) { - writer.uint32(26).bytes(message.proofClose); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.nextSequenceRecv !== BigInt(0)) { - writer.uint32(40).uint64(message.nextSequenceRecv); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeoutOnClose { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTimeoutOnClose(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proofUnreceived = reader.bytes(); - break; - case 3: - message.proofClose = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.nextSequenceRecv = reader.uint64(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgTimeoutOnClose { - return { - packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined, - proofUnreceived: isSet(object.proofUnreceived) ? bytesFromBase64(object.proofUnreceived) : new Uint8Array(), - proofClose: isSet(object.proofClose) ? bytesFromBase64(object.proofClose) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - nextSequenceRecv: isSet(object.nextSequenceRecv) ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0), - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgTimeoutOnClose): unknown { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.proofUnreceived !== undefined && (obj.proofUnreceived = base64FromBytes(message.proofUnreceived !== undefined ? message.proofUnreceived : new Uint8Array())); - message.proofClose !== undefined && (obj.proofClose = base64FromBytes(message.proofClose !== undefined ? message.proofClose : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.nextSequenceRecv !== undefined && (obj.nextSequenceRecv = (message.nextSequenceRecv || BigInt(0)).toString()); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgTimeoutOnClose { - const message = createBaseMsgTimeoutOnClose(); - message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; - message.proofUnreceived = object.proofUnreceived ?? new Uint8Array(); - message.proofClose = object.proofClose ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.nextSequenceRecv = object.nextSequenceRecv !== undefined && object.nextSequenceRecv !== null ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0); - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgTimeoutOnCloseSDKType): MsgTimeoutOnClose { - return { - packet: object.packet ? Packet.fromSDK(object.packet) : undefined, - proofUnreceived: object?.proof_unreceived, - proofClose: object?.proof_close, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - nextSequenceRecv: object?.next_sequence_recv, - signer: object?.signer - }; - }, - toSDK(message: MsgTimeoutOnClose): MsgTimeoutOnCloseSDKType { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toSDK(message.packet) : undefined); - obj.proof_unreceived = message.proofUnreceived; - obj.proof_close = message.proofClose; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.next_sequence_recv = message.nextSequenceRecv; - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgTimeoutOnCloseAmino): MsgTimeoutOnClose { - return { - packet: object?.packet ? Packet.fromAmino(object.packet) : undefined, - proofUnreceived: object.proof_unreceived, - proofClose: object.proof_close, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - nextSequenceRecv: BigInt(object.next_sequence_recv), - signer: object.signer - }; - }, - toAmino(message: MsgTimeoutOnClose): MsgTimeoutOnCloseAmino { - const obj: any = {}; - obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; - obj.proof_unreceived = message.proofUnreceived; - obj.proof_close = message.proofClose; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.next_sequence_recv = message.nextSequenceRecv ? message.nextSequenceRecv.toString() : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgTimeoutOnCloseAminoMsg): MsgTimeoutOnClose { - return MsgTimeoutOnClose.fromAmino(object.value); - }, - toAminoMsg(message: MsgTimeoutOnClose): MsgTimeoutOnCloseAminoMsg { - return { - type: "cosmos-sdk/MsgTimeoutOnClose", - value: MsgTimeoutOnClose.toAmino(message) - }; - }, - fromProtoMsg(message: MsgTimeoutOnCloseProtoMsg): MsgTimeoutOnClose { - return MsgTimeoutOnClose.decode(message.value); - }, - toProto(message: MsgTimeoutOnClose): Uint8Array { - return MsgTimeoutOnClose.encode(message).finish(); - }, - toProtoMsg(message: MsgTimeoutOnClose): MsgTimeoutOnCloseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", - value: MsgTimeoutOnClose.encode(message).finish() - }; - } -}; -function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { - return {}; -} -export const MsgTimeoutOnCloseResponse = { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", - aminoType: "cosmos-sdk/MsgTimeoutOnCloseResponse", - encode(_: MsgTimeoutOnCloseResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeoutOnCloseResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTimeoutOnCloseResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgTimeoutOnCloseResponse { - return {}; - }, - toJSON(_: MsgTimeoutOnCloseResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgTimeoutOnCloseResponse { - const message = createBaseMsgTimeoutOnCloseResponse(); - return message; - }, - fromSDK(_: MsgTimeoutOnCloseResponseSDKType): MsgTimeoutOnCloseResponse { - return {}; - }, - toSDK(_: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgTimeoutOnCloseResponseAmino): MsgTimeoutOnCloseResponse { - return {}; - }, - toAmino(_: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgTimeoutOnCloseResponseAminoMsg): MsgTimeoutOnCloseResponse { - return MsgTimeoutOnCloseResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseAminoMsg { - return { - type: "cosmos-sdk/MsgTimeoutOnCloseResponse", - value: MsgTimeoutOnCloseResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgTimeoutOnCloseResponseProtoMsg): MsgTimeoutOnCloseResponse { - return MsgTimeoutOnCloseResponse.decode(message.value); - }, - toProto(message: MsgTimeoutOnCloseResponse): Uint8Array { - return MsgTimeoutOnCloseResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", - value: MsgTimeoutOnCloseResponse.encode(message).finish() - }; - } -}; -function createBaseMsgAcknowledgement(): MsgAcknowledgement { - return { - packet: Packet.fromPartial({}), - acknowledgement: new Uint8Array(), - proofAcked: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgAcknowledgement = { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - aminoType: "cosmos-sdk/MsgAcknowledgement", - encode(message: MsgAcknowledgement, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.packet !== undefined) { - Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); - } - if (message.acknowledgement.length !== 0) { - writer.uint32(18).bytes(message.acknowledgement); - } - if (message.proofAcked.length !== 0) { - writer.uint32(26).bytes(message.proofAcked); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgAcknowledgement { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgAcknowledgement(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proofAcked = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgAcknowledgement { - return { - packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined, - acknowledgement: isSet(object.acknowledgement) ? bytesFromBase64(object.acknowledgement) : new Uint8Array(), - proofAcked: isSet(object.proofAcked) ? bytesFromBase64(object.proofAcked) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgAcknowledgement): unknown { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined); - message.acknowledgement !== undefined && (obj.acknowledgement = base64FromBytes(message.acknowledgement !== undefined ? message.acknowledgement : new Uint8Array())); - message.proofAcked !== undefined && (obj.proofAcked = base64FromBytes(message.proofAcked !== undefined ? message.proofAcked : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgAcknowledgement { - const message = createBaseMsgAcknowledgement(); - message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; - message.acknowledgement = object.acknowledgement ?? new Uint8Array(); - message.proofAcked = object.proofAcked ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgAcknowledgementSDKType): MsgAcknowledgement { - return { - packet: object.packet ? Packet.fromSDK(object.packet) : undefined, - acknowledgement: object?.acknowledgement, - proofAcked: object?.proof_acked, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgAcknowledgement): MsgAcknowledgementSDKType { - const obj: any = {}; - message.packet !== undefined && (obj.packet = message.packet ? Packet.toSDK(message.packet) : undefined); - obj.acknowledgement = message.acknowledgement; - obj.proof_acked = message.proofAcked; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgAcknowledgementAmino): MsgAcknowledgement { - return { - packet: object?.packet ? Packet.fromAmino(object.packet) : undefined, - acknowledgement: object.acknowledgement, - proofAcked: object.proof_acked, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgAcknowledgement): MsgAcknowledgementAmino { - const obj: any = {}; - obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; - obj.acknowledgement = message.acknowledgement; - obj.proof_acked = message.proofAcked; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgAcknowledgementAminoMsg): MsgAcknowledgement { - return MsgAcknowledgement.fromAmino(object.value); - }, - toAminoMsg(message: MsgAcknowledgement): MsgAcknowledgementAminoMsg { - return { - type: "cosmos-sdk/MsgAcknowledgement", - value: MsgAcknowledgement.toAmino(message) - }; - }, - fromProtoMsg(message: MsgAcknowledgementProtoMsg): MsgAcknowledgement { - return MsgAcknowledgement.decode(message.value); - }, - toProto(message: MsgAcknowledgement): Uint8Array { - return MsgAcknowledgement.encode(message).finish(); - }, - toProtoMsg(message: MsgAcknowledgement): MsgAcknowledgementProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", - value: MsgAcknowledgement.encode(message).finish() - }; - } -}; -function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { - return {}; -} -export const MsgAcknowledgementResponse = { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", - aminoType: "cosmos-sdk/MsgAcknowledgementResponse", - encode(_: MsgAcknowledgementResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgAcknowledgementResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgAcknowledgementResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgAcknowledgementResponse { - return {}; - }, - toJSON(_: MsgAcknowledgementResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgAcknowledgementResponse { - const message = createBaseMsgAcknowledgementResponse(); - return message; - }, - fromSDK(_: MsgAcknowledgementResponseSDKType): MsgAcknowledgementResponse { - return {}; - }, - toSDK(_: MsgAcknowledgementResponse): MsgAcknowledgementResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgAcknowledgementResponseAmino): MsgAcknowledgementResponse { - return {}; - }, - toAmino(_: MsgAcknowledgementResponse): MsgAcknowledgementResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgAcknowledgementResponseAminoMsg): MsgAcknowledgementResponse { - return MsgAcknowledgementResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgAcknowledgementResponse): MsgAcknowledgementResponseAminoMsg { - return { - type: "cosmos-sdk/MsgAcknowledgementResponse", - value: MsgAcknowledgementResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgAcknowledgementResponseProtoMsg): MsgAcknowledgementResponse { - return MsgAcknowledgementResponse.decode(message.value); - }, - toProto(message: MsgAcknowledgementResponse): Uint8Array { - return MsgAcknowledgementResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgAcknowledgementResponse): MsgAcknowledgementResponseProtoMsg { - return { - typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", - value: MsgAcknowledgementResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/client.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/client.ts deleted file mode 100644 index 959ab539..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/client.ts +++ /dev/null @@ -1,1086 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { Plan, PlanAmino, PlanSDKType } from "../../../../cosmos/upgrade/v1beta1/upgrade"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientState { - /** client identifier */ - clientId: string; - /** client state */ - clientState: Any | undefined; -} -export interface IdentifiedClientStateProtoMsg { - typeUrl: "/ibc.core.client.v1.IdentifiedClientState"; - value: Uint8Array; -} -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientStateAmino { - /** client identifier */ - client_id: string; - /** client state */ - client_state?: AnyAmino | undefined; -} -export interface IdentifiedClientStateAminoMsg { - type: "cosmos-sdk/IdentifiedClientState"; - value: IdentifiedClientStateAmino; -} -/** - * IdentifiedClientState defines a client state with an additional client - * identifier field. - */ -export interface IdentifiedClientStateSDKType { - client_id: string; - client_state: AnySDKType | undefined; -} -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeight { - /** consensus state height */ - height: Height | undefined; - /** consensus state */ - consensusState: Any | undefined; -} -export interface ConsensusStateWithHeightProtoMsg { - typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight"; - value: Uint8Array; -} -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeightAmino { - /** consensus state height */ - height?: HeightAmino | undefined; - /** consensus state */ - consensus_state?: AnyAmino | undefined; -} -export interface ConsensusStateWithHeightAminoMsg { - type: "cosmos-sdk/ConsensusStateWithHeight"; - value: ConsensusStateWithHeightAmino; -} -/** - * ConsensusStateWithHeight defines a consensus state with an additional height - * field. - */ -export interface ConsensusStateWithHeightSDKType { - height: HeightSDKType | undefined; - consensus_state: AnySDKType | undefined; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStates { - /** client identifier */ - clientId: string; - /** consensus states and their heights associated with the client */ - consensusStates: ConsensusStateWithHeight[]; -} -export interface ClientConsensusStatesProtoMsg { - typeUrl: "/ibc.core.client.v1.ClientConsensusStates"; - value: Uint8Array; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStatesAmino { - /** client identifier */ - client_id: string; - /** consensus states and their heights associated with the client */ - consensus_states: ConsensusStateWithHeightAmino[]; -} -export interface ClientConsensusStatesAminoMsg { - type: "cosmos-sdk/ClientConsensusStates"; - value: ClientConsensusStatesAmino; -} -/** - * ClientConsensusStates defines all the stored consensus states for a given - * client. - */ -export interface ClientConsensusStatesSDKType { - client_id: string; - consensus_states: ConsensusStateWithHeightSDKType[]; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposal { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subjectClientId: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substituteClientId: string; -} -export interface ClientUpdateProposalProtoMsg { - typeUrl: "/ibc.core.client.v1.ClientUpdateProposal"; - value: Uint8Array; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposalAmino { - /** the title of the update proposal */ - title: string; - /** the description of the proposal */ - description: string; - /** the client identifier for the client to be updated if the proposal passes */ - subject_client_id: string; - /** - * the substitute client identifier for the client standing in for the subject - * client - */ - substitute_client_id: string; -} -export interface ClientUpdateProposalAminoMsg { - type: "cosmos-sdk/ClientUpdateProposal"; - value: ClientUpdateProposalAmino; -} -/** - * ClientUpdateProposal is a governance proposal. If it passes, the substitute - * client's latest consensus state is copied over to the subject client. The proposal - * handler may fail if the subject and the substitute do not match in client and - * chain parameters (with exception to latest height, frozen height, and chain-id). - */ -export interface ClientUpdateProposalSDKType { - title: string; - description: string; - subject_client_id: string; - substitute_client_id: string; -} -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposal { - title: string; - description: string; - plan: Plan | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgradedClientState: Any | undefined; -} -export interface UpgradeProposalProtoMsg { - typeUrl: "/ibc.core.client.v1.UpgradeProposal"; - value: Uint8Array; -} -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposalAmino { - title: string; - description: string; - plan?: PlanAmino | undefined; - /** - * An UpgradedClientState must be provided to perform an IBC breaking upgrade. - * This will make the chain commit to the correct upgraded (self) client state - * before the upgrade occurs, so that connecting chains can verify that the - * new upgraded client is valid by verifying a proof on the previous version - * of the chain. This will allow IBC connections to persist smoothly across - * planned chain upgrades - */ - upgraded_client_state?: AnyAmino | undefined; -} -export interface UpgradeProposalAminoMsg { - type: "cosmos-sdk/UpgradeProposal"; - value: UpgradeProposalAmino; -} -/** - * UpgradeProposal is a gov Content type for initiating an IBC breaking - * upgrade. - */ -export interface UpgradeProposalSDKType { - title: string; - description: string; - plan: PlanSDKType | undefined; - upgraded_client_state: AnySDKType | undefined; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping - * RevisionNumber the same. However some consensus algorithms may choose to - * reset the height in certain conditions e.g. hard forks, state-machine - * breaking changes In these cases, the RevisionNumber is incremented so that - * height continues to be monitonically increasing even as the RevisionHeight - * gets reset - */ -export interface Height { - /** the revision that the client is currently on */ - revisionNumber: bigint; - /** the height within the given revision */ - revisionHeight: bigint; -} -export interface HeightProtoMsg { - typeUrl: "/ibc.core.client.v1.Height"; - value: Uint8Array; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping - * RevisionNumber the same. However some consensus algorithms may choose to - * reset the height in certain conditions e.g. hard forks, state-machine - * breaking changes In these cases, the RevisionNumber is incremented so that - * height continues to be monitonically increasing even as the RevisionHeight - * gets reset - */ -export interface HeightAmino { - /** the revision that the client is currently on */ - revision_number: string; - /** the height within the given revision */ - revision_height: string; -} -export interface HeightAminoMsg { - type: "cosmos-sdk/Height"; - value: HeightAmino; -} -/** - * Height is a monotonically increasing data type - * that can be compared against another Height for the purposes of updating and - * freezing clients - * - * Normally the RevisionHeight is incremented at each height while keeping - * RevisionNumber the same. However some consensus algorithms may choose to - * reset the height in certain conditions e.g. hard forks, state-machine - * breaking changes In these cases, the RevisionNumber is incremented so that - * height continues to be monitonically increasing even as the RevisionHeight - * gets reset - */ -export interface HeightSDKType { - revision_number: bigint; - revision_height: bigint; -} -/** Params defines the set of IBC light client parameters. */ -export interface Params { - /** allowed_clients defines the list of allowed client state types. */ - allowedClients: string[]; -} -export interface ParamsProtoMsg { - typeUrl: "/ibc.core.client.v1.Params"; - value: Uint8Array; -} -/** Params defines the set of IBC light client parameters. */ -export interface ParamsAmino { - /** allowed_clients defines the list of allowed client state types. */ - allowed_clients: string[]; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params defines the set of IBC light client parameters. */ -export interface ParamsSDKType { - allowed_clients: string[]; -} -function createBaseIdentifiedClientState(): IdentifiedClientState { - return { - clientId: "", - clientState: Any.fromPartial({}) - }; -} -export const IdentifiedClientState = { - typeUrl: "/ibc.core.client.v1.IdentifiedClientState", - aminoType: "cosmos-sdk/IdentifiedClientState", - encode(message: IdentifiedClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IdentifiedClientState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIdentifiedClientState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): IdentifiedClientState { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined - }; - }, - toJSON(message: IdentifiedClientState): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): IdentifiedClientState { - const message = createBaseIdentifiedClientState(); - message.clientId = object.clientId ?? ""; - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - return message; - }, - fromSDK(object: IdentifiedClientStateSDKType): IdentifiedClientState { - return { - clientId: object?.client_id, - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined - }; - }, - toSDK(message: IdentifiedClientState): IdentifiedClientStateSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - return obj; - }, - fromAmino(object: IdentifiedClientStateAmino): IdentifiedClientState { - return { - clientId: object.client_id, - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined - }; - }, - toAmino(message: IdentifiedClientState): IdentifiedClientStateAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - return obj; - }, - fromAminoMsg(object: IdentifiedClientStateAminoMsg): IdentifiedClientState { - return IdentifiedClientState.fromAmino(object.value); - }, - toAminoMsg(message: IdentifiedClientState): IdentifiedClientStateAminoMsg { - return { - type: "cosmos-sdk/IdentifiedClientState", - value: IdentifiedClientState.toAmino(message) - }; - }, - fromProtoMsg(message: IdentifiedClientStateProtoMsg): IdentifiedClientState { - return IdentifiedClientState.decode(message.value); - }, - toProto(message: IdentifiedClientState): Uint8Array { - return IdentifiedClientState.encode(message).finish(); - }, - toProtoMsg(message: IdentifiedClientState): IdentifiedClientStateProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.IdentifiedClientState", - value: IdentifiedClientState.encode(message).finish() - }; - } -}; -function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { - return { - height: Height.fromPartial({}), - consensusState: Any.fromPartial({}) - }; -} -export const ConsensusStateWithHeight = { - typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", - aminoType: "cosmos-sdk/ConsensusStateWithHeight", - encode(message: ConsensusStateWithHeight, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusStateWithHeight { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusStateWithHeight(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusStateWithHeight { - return { - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined, - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined - }; - }, - toJSON(message: ConsensusStateWithHeight): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusStateWithHeight { - const message = createBaseConsensusStateWithHeight(); - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - return message; - }, - fromSDK(object: ConsensusStateWithHeightSDKType): ConsensusStateWithHeight { - return { - height: object.height ? Height.fromSDK(object.height) : undefined, - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined - }; - }, - toSDK(message: ConsensusStateWithHeight): ConsensusStateWithHeightSDKType { - const obj: any = {}; - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - return obj; - }, - fromAmino(object: ConsensusStateWithHeightAmino): ConsensusStateWithHeight { - return { - height: object?.height ? Height.fromAmino(object.height) : undefined, - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined - }; - }, - toAmino(message: ConsensusStateWithHeight): ConsensusStateWithHeightAmino { - const obj: any = {}; - obj.height = message.height ? Height.toAmino(message.height) : undefined; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusStateWithHeightAminoMsg): ConsensusStateWithHeight { - return ConsensusStateWithHeight.fromAmino(object.value); - }, - toAminoMsg(message: ConsensusStateWithHeight): ConsensusStateWithHeightAminoMsg { - return { - type: "cosmos-sdk/ConsensusStateWithHeight", - value: ConsensusStateWithHeight.toAmino(message) - }; - }, - fromProtoMsg(message: ConsensusStateWithHeightProtoMsg): ConsensusStateWithHeight { - return ConsensusStateWithHeight.decode(message.value); - }, - toProto(message: ConsensusStateWithHeight): Uint8Array { - return ConsensusStateWithHeight.encode(message).finish(); - }, - toProtoMsg(message: ConsensusStateWithHeight): ConsensusStateWithHeightProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight", - value: ConsensusStateWithHeight.encode(message).finish() - }; - } -}; -function createBaseClientConsensusStates(): ClientConsensusStates { - return { - clientId: "", - consensusStates: [] - }; -} -export const ClientConsensusStates = { - typeUrl: "/ibc.core.client.v1.ClientConsensusStates", - aminoType: "cosmos-sdk/ClientConsensusStates", - encode(message: ClientConsensusStates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientConsensusStates { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientConsensusStates(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientConsensusStates { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - consensusStates: Array.isArray(object?.consensusStates) ? object.consensusStates.map((e: any) => ConsensusStateWithHeight.fromJSON(e)) : [] - }; - }, - toJSON(message: ClientConsensusStates): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } else { - obj.consensusStates = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ClientConsensusStates { - const message = createBaseClientConsensusStates(); - message.clientId = object.clientId ?? ""; - message.consensusStates = object.consensusStates?.map(e => ConsensusStateWithHeight.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ClientConsensusStatesSDKType): ClientConsensusStates { - return { - clientId: object?.client_id, - consensusStates: Array.isArray(object?.consensus_states) ? object.consensus_states.map((e: any) => ConsensusStateWithHeight.fromSDK(e)) : [] - }; - }, - toSDK(message: ClientConsensusStates): ClientConsensusStatesSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.consensusStates) { - obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toSDK(e) : undefined); - } else { - obj.consensus_states = []; - } - return obj; - }, - fromAmino(object: ClientConsensusStatesAmino): ClientConsensusStates { - return { - clientId: object.client_id, - consensusStates: Array.isArray(object?.consensus_states) ? object.consensus_states.map((e: any) => ConsensusStateWithHeight.fromAmino(e)) : [] - }; - }, - toAmino(message: ClientConsensusStates): ClientConsensusStatesAmino { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.consensusStates) { - obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toAmino(e) : undefined); - } else { - obj.consensus_states = []; - } - return obj; - }, - fromAminoMsg(object: ClientConsensusStatesAminoMsg): ClientConsensusStates { - return ClientConsensusStates.fromAmino(object.value); - }, - toAminoMsg(message: ClientConsensusStates): ClientConsensusStatesAminoMsg { - return { - type: "cosmos-sdk/ClientConsensusStates", - value: ClientConsensusStates.toAmino(message) - }; - }, - fromProtoMsg(message: ClientConsensusStatesProtoMsg): ClientConsensusStates { - return ClientConsensusStates.decode(message.value); - }, - toProto(message: ClientConsensusStates): Uint8Array { - return ClientConsensusStates.encode(message).finish(); - }, - toProtoMsg(message: ClientConsensusStates): ClientConsensusStatesProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.ClientConsensusStates", - value: ClientConsensusStates.encode(message).finish() - }; - } -}; -function createBaseClientUpdateProposal(): ClientUpdateProposal { - return { - title: "", - description: "", - subjectClientId: "", - substituteClientId: "" - }; -} -export const ClientUpdateProposal = { - typeUrl: "/ibc.core.client.v1.ClientUpdateProposal", - aminoType: "cosmos-sdk/ClientUpdateProposal", - encode(message: ClientUpdateProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.subjectClientId !== "") { - writer.uint32(26).string(message.subjectClientId); - } - if (message.substituteClientId !== "") { - writer.uint32(34).string(message.substituteClientId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientUpdateProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientUpdateProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subjectClientId = reader.string(); - break; - case 4: - message.substituteClientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientUpdateProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - subjectClientId: isSet(object.subjectClientId) ? String(object.subjectClientId) : "", - substituteClientId: isSet(object.substituteClientId) ? String(object.substituteClientId) : "" - }; - }, - toJSON(message: ClientUpdateProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.subjectClientId !== undefined && (obj.subjectClientId = message.subjectClientId); - message.substituteClientId !== undefined && (obj.substituteClientId = message.substituteClientId); - return obj; - }, - fromPartial(object: DeepPartial): ClientUpdateProposal { - const message = createBaseClientUpdateProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.subjectClientId = object.subjectClientId ?? ""; - message.substituteClientId = object.substituteClientId ?? ""; - return message; - }, - fromSDK(object: ClientUpdateProposalSDKType): ClientUpdateProposal { - return { - title: object?.title, - description: object?.description, - subjectClientId: object?.subject_client_id, - substituteClientId: object?.substitute_client_id - }; - }, - toSDK(message: ClientUpdateProposal): ClientUpdateProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.subject_client_id = message.subjectClientId; - obj.substitute_client_id = message.substituteClientId; - return obj; - }, - fromAmino(object: ClientUpdateProposalAmino): ClientUpdateProposal { - return { - title: object.title, - description: object.description, - subjectClientId: object.subject_client_id, - substituteClientId: object.substitute_client_id - }; - }, - toAmino(message: ClientUpdateProposal): ClientUpdateProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.subject_client_id = message.subjectClientId; - obj.substitute_client_id = message.substituteClientId; - return obj; - }, - fromAminoMsg(object: ClientUpdateProposalAminoMsg): ClientUpdateProposal { - return ClientUpdateProposal.fromAmino(object.value); - }, - toAminoMsg(message: ClientUpdateProposal): ClientUpdateProposalAminoMsg { - return { - type: "cosmos-sdk/ClientUpdateProposal", - value: ClientUpdateProposal.toAmino(message) - }; - }, - fromProtoMsg(message: ClientUpdateProposalProtoMsg): ClientUpdateProposal { - return ClientUpdateProposal.decode(message.value); - }, - toProto(message: ClientUpdateProposal): Uint8Array { - return ClientUpdateProposal.encode(message).finish(); - }, - toProtoMsg(message: ClientUpdateProposal): ClientUpdateProposalProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.ClientUpdateProposal", - value: ClientUpdateProposal.encode(message).finish() - }; - } -}; -function createBaseUpgradeProposal(): UpgradeProposal { - return { - title: "", - description: "", - plan: Plan.fromPartial({}), - upgradedClientState: Any.fromPartial({}) - }; -} -export const UpgradeProposal = { - typeUrl: "/ibc.core.client.v1.UpgradeProposal", - aminoType: "cosmos-sdk/UpgradeProposal", - encode(message: UpgradeProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.plan !== undefined) { - Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); - } - if (message.upgradedClientState !== undefined) { - Any.encode(message.upgradedClientState, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpgradeProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpgradeProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.plan = Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpgradeProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined, - upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) : undefined - }; - }, - toJSON(message: UpgradeProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined); - message.upgradedClientState !== undefined && (obj.upgradedClientState = message.upgradedClientState ? Any.toJSON(message.upgradedClientState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): UpgradeProposal { - const message = createBaseUpgradeProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; - message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; - return message; - }, - fromSDK(object: UpgradeProposalSDKType): UpgradeProposal { - return { - title: object?.title, - description: object?.description, - plan: object.plan ? Plan.fromSDK(object.plan) : undefined, - upgradedClientState: object.upgraded_client_state ? Any.fromSDK(object.upgraded_client_state) : undefined - }; - }, - toSDK(message: UpgradeProposal): UpgradeProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - message.plan !== undefined && (obj.plan = message.plan ? Plan.toSDK(message.plan) : undefined); - message.upgradedClientState !== undefined && (obj.upgraded_client_state = message.upgradedClientState ? Any.toSDK(message.upgradedClientState) : undefined); - return obj; - }, - fromAmino(object: UpgradeProposalAmino): UpgradeProposal { - return { - title: object.title, - description: object.description, - plan: object?.plan ? Plan.fromAmino(object.plan) : undefined, - upgradedClientState: object?.upgraded_client_state ? Any.fromAmino(object.upgraded_client_state) : undefined - }; - }, - toAmino(message: UpgradeProposal): UpgradeProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.plan = message.plan ? Plan.toAmino(message.plan) : undefined; - obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState) : undefined; - return obj; - }, - fromAminoMsg(object: UpgradeProposalAminoMsg): UpgradeProposal { - return UpgradeProposal.fromAmino(object.value); - }, - toAminoMsg(message: UpgradeProposal): UpgradeProposalAminoMsg { - return { - type: "cosmos-sdk/UpgradeProposal", - value: UpgradeProposal.toAmino(message) - }; - }, - fromProtoMsg(message: UpgradeProposalProtoMsg): UpgradeProposal { - return UpgradeProposal.decode(message.value); - }, - toProto(message: UpgradeProposal): Uint8Array { - return UpgradeProposal.encode(message).finish(); - }, - toProtoMsg(message: UpgradeProposal): UpgradeProposalProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.UpgradeProposal", - value: UpgradeProposal.encode(message).finish() - }; - } -}; -function createBaseHeight(): Height { - return { - revisionNumber: BigInt(0), - revisionHeight: BigInt(0) - }; -} -export const Height = { - typeUrl: "/ibc.core.client.v1.Height", - aminoType: "cosmos-sdk/Height", - encode(message: Height, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.revisionNumber !== BigInt(0)) { - writer.uint32(8).uint64(message.revisionNumber); - } - if (message.revisionHeight !== BigInt(0)) { - writer.uint32(16).uint64(message.revisionHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Height { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeight(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revisionNumber = reader.uint64(); - break; - case 2: - message.revisionHeight = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Height { - return { - revisionNumber: isSet(object.revisionNumber) ? BigInt(object.revisionNumber.toString()) : BigInt(0), - revisionHeight: isSet(object.revisionHeight) ? BigInt(object.revisionHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: Height): unknown { - const obj: any = {}; - message.revisionNumber !== undefined && (obj.revisionNumber = (message.revisionNumber || BigInt(0)).toString()); - message.revisionHeight !== undefined && (obj.revisionHeight = (message.revisionHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Height { - const message = createBaseHeight(); - message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null ? BigInt(object.revisionNumber.toString()) : BigInt(0); - message.revisionHeight = object.revisionHeight !== undefined && object.revisionHeight !== null ? BigInt(object.revisionHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: HeightSDKType): Height { - return { - revisionNumber: object?.revision_number, - revisionHeight: object?.revision_height - }; - }, - toSDK(message: Height): HeightSDKType { - const obj: any = {}; - obj.revision_number = message.revisionNumber; - obj.revision_height = message.revisionHeight; - return obj; - }, - fromAmino(object: HeightAmino): Height { - return { - revisionNumber: BigInt(object.revision_number || "0"), - revisionHeight: BigInt(object.revision_height || "0") - }; - }, - toAmino(message: Height): HeightAmino { - const obj: any = {}; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: HeightAminoMsg): Height { - return Height.fromAmino(object.value); - }, - toAminoMsg(message: Height): HeightAminoMsg { - return { - type: "cosmos-sdk/Height", - value: Height.toAmino(message) - }; - }, - fromProtoMsg(message: HeightProtoMsg): Height { - return Height.decode(message.value); - }, - toProto(message: Height): Uint8Array { - return Height.encode(message).finish(); - }, - toProtoMsg(message: Height): HeightProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.Height", - value: Height.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - allowedClients: [] - }; -} -export const Params = { - typeUrl: "/ibc.core.client.v1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.allowedClients) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowedClients.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - allowedClients: Array.isArray(object?.allowedClients) ? object.allowedClients.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.allowedClients) { - obj.allowedClients = message.allowedClients.map(e => e); - } else { - obj.allowedClients = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.allowedClients = object.allowedClients?.map(e => e) || []; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - allowedClients: Array.isArray(object?.allowed_clients) ? object.allowed_clients.map((e: any) => e) : [] - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - if (message.allowedClients) { - obj.allowed_clients = message.allowedClients.map(e => e); - } else { - obj.allowed_clients = []; - } - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - allowedClients: Array.isArray(object?.allowed_clients) ? object.allowed_clients.map((e: any) => e) : [] - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - if (message.allowedClients) { - obj.allowed_clients = message.allowedClients.map(e => e); - } else { - obj.allowed_clients = []; - } - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/genesis.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/genesis.ts deleted file mode 100644 index 3a4ffed5..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/genesis.ts +++ /dev/null @@ -1,526 +0,0 @@ -import { IdentifiedClientState, IdentifiedClientStateAmino, IdentifiedClientStateSDKType, ClientConsensusStates, ClientConsensusStatesAmino, ClientConsensusStatesSDKType, Params, ParamsAmino, ParamsSDKType } from "./client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** GenesisState defines the ibc client submodule's genesis state. */ -export interface GenesisState { - /** client states with their corresponding identifiers */ - clients: IdentifiedClientState[]; - /** consensus states from each client */ - clientsConsensus: ClientConsensusStates[]; - /** metadata from each client */ - clientsMetadata: IdentifiedGenesisMetadata[]; - params: Params | undefined; - /** create localhost on initialization */ - createLocalhost: boolean; - /** the sequence for the next generated client identifier */ - nextClientSequence: bigint; -} -export interface GenesisStateProtoMsg { - typeUrl: "/ibc.core.client.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the ibc client submodule's genesis state. */ -export interface GenesisStateAmino { - /** client states with their corresponding identifiers */ - clients: IdentifiedClientStateAmino[]; - /** consensus states from each client */ - clients_consensus: ClientConsensusStatesAmino[]; - /** metadata from each client */ - clients_metadata: IdentifiedGenesisMetadataAmino[]; - params?: ParamsAmino | undefined; - /** create localhost on initialization */ - create_localhost: boolean; - /** the sequence for the next generated client identifier */ - next_client_sequence: string; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the ibc client submodule's genesis state. */ -export interface GenesisStateSDKType { - clients: IdentifiedClientStateSDKType[]; - clients_consensus: ClientConsensusStatesSDKType[]; - clients_metadata: IdentifiedGenesisMetadataSDKType[]; - params: ParamsSDKType | undefined; - create_localhost: boolean; - next_client_sequence: bigint; -} -/** - * GenesisMetadata defines the genesis type for metadata that clients may return - * with ExportMetadata - */ -export interface GenesisMetadata { - /** store key of metadata without clientID-prefix */ - key: Uint8Array; - /** metadata value */ - value: Uint8Array; -} -export interface GenesisMetadataProtoMsg { - typeUrl: "/ibc.core.client.v1.GenesisMetadata"; - value: Uint8Array; -} -/** - * GenesisMetadata defines the genesis type for metadata that clients may return - * with ExportMetadata - */ -export interface GenesisMetadataAmino { - /** store key of metadata without clientID-prefix */ - key: Uint8Array; - /** metadata value */ - value: Uint8Array; -} -export interface GenesisMetadataAminoMsg { - type: "cosmos-sdk/GenesisMetadata"; - value: GenesisMetadataAmino; -} -/** - * GenesisMetadata defines the genesis type for metadata that clients may return - * with ExportMetadata - */ -export interface GenesisMetadataSDKType { - key: Uint8Array; - value: Uint8Array; -} -/** - * IdentifiedGenesisMetadata has the client metadata with the corresponding - * client id. - */ -export interface IdentifiedGenesisMetadata { - clientId: string; - clientMetadata: GenesisMetadata[]; -} -export interface IdentifiedGenesisMetadataProtoMsg { - typeUrl: "/ibc.core.client.v1.IdentifiedGenesisMetadata"; - value: Uint8Array; -} -/** - * IdentifiedGenesisMetadata has the client metadata with the corresponding - * client id. - */ -export interface IdentifiedGenesisMetadataAmino { - client_id: string; - client_metadata: GenesisMetadataAmino[]; -} -export interface IdentifiedGenesisMetadataAminoMsg { - type: "cosmos-sdk/IdentifiedGenesisMetadata"; - value: IdentifiedGenesisMetadataAmino; -} -/** - * IdentifiedGenesisMetadata has the client metadata with the corresponding - * client id. - */ -export interface IdentifiedGenesisMetadataSDKType { - client_id: string; - client_metadata: GenesisMetadataSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - clients: [], - clientsConsensus: [], - clientsMetadata: [], - params: Params.fromPartial({}), - createLocalhost: false, - nextClientSequence: BigInt(0) - }; -} -export const GenesisState = { - typeUrl: "/ibc.core.client.v1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.clients) { - IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clientsConsensus) { - ClientConsensusStates.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.clientsMetadata) { - IdentifiedGenesisMetadata.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); - } - if (message.createLocalhost === true) { - writer.uint32(40).bool(message.createLocalhost); - } - if (message.nextClientSequence !== BigInt(0)) { - writer.uint32(48).uint64(message.nextClientSequence); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clients.push(IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - message.clientsConsensus.push(ClientConsensusStates.decode(reader, reader.uint32())); - break; - case 3: - message.clientsMetadata.push(IdentifiedGenesisMetadata.decode(reader, reader.uint32())); - break; - case 4: - message.params = Params.decode(reader, reader.uint32()); - break; - case 5: - message.createLocalhost = reader.bool(); - break; - case 6: - message.nextClientSequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - clients: Array.isArray(object?.clients) ? object.clients.map((e: any) => IdentifiedClientState.fromJSON(e)) : [], - clientsConsensus: Array.isArray(object?.clientsConsensus) ? object.clientsConsensus.map((e: any) => ClientConsensusStates.fromJSON(e)) : [], - clientsMetadata: Array.isArray(object?.clientsMetadata) ? object.clientsMetadata.map((e: any) => IdentifiedGenesisMetadata.fromJSON(e)) : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - createLocalhost: isSet(object.createLocalhost) ? Boolean(object.createLocalhost) : false, - nextClientSequence: isSet(object.nextClientSequence) ? BigInt(object.nextClientSequence.toString()) : BigInt(0) - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.clients) { - obj.clients = message.clients.map(e => e ? IdentifiedClientState.toJSON(e) : undefined); - } else { - obj.clients = []; - } - if (message.clientsConsensus) { - obj.clientsConsensus = message.clientsConsensus.map(e => e ? ClientConsensusStates.toJSON(e) : undefined); - } else { - obj.clientsConsensus = []; - } - if (message.clientsMetadata) { - obj.clientsMetadata = message.clientsMetadata.map(e => e ? IdentifiedGenesisMetadata.toJSON(e) : undefined); - } else { - obj.clientsMetadata = []; - } - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.createLocalhost !== undefined && (obj.createLocalhost = message.createLocalhost); - message.nextClientSequence !== undefined && (obj.nextClientSequence = (message.nextClientSequence || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.clients = object.clients?.map(e => IdentifiedClientState.fromPartial(e)) || []; - message.clientsConsensus = object.clientsConsensus?.map(e => ClientConsensusStates.fromPartial(e)) || []; - message.clientsMetadata = object.clientsMetadata?.map(e => IdentifiedGenesisMetadata.fromPartial(e)) || []; - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.createLocalhost = object.createLocalhost ?? false; - message.nextClientSequence = object.nextClientSequence !== undefined && object.nextClientSequence !== null ? BigInt(object.nextClientSequence.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - clients: Array.isArray(object?.clients) ? object.clients.map((e: any) => IdentifiedClientState.fromSDK(e)) : [], - clientsConsensus: Array.isArray(object?.clients_consensus) ? object.clients_consensus.map((e: any) => ClientConsensusStates.fromSDK(e)) : [], - clientsMetadata: Array.isArray(object?.clients_metadata) ? object.clients_metadata.map((e: any) => IdentifiedGenesisMetadata.fromSDK(e)) : [], - params: object.params ? Params.fromSDK(object.params) : undefined, - createLocalhost: object?.create_localhost, - nextClientSequence: object?.next_client_sequence - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.clients) { - obj.clients = message.clients.map(e => e ? IdentifiedClientState.toSDK(e) : undefined); - } else { - obj.clients = []; - } - if (message.clientsConsensus) { - obj.clients_consensus = message.clientsConsensus.map(e => e ? ClientConsensusStates.toSDK(e) : undefined); - } else { - obj.clients_consensus = []; - } - if (message.clientsMetadata) { - obj.clients_metadata = message.clientsMetadata.map(e => e ? IdentifiedGenesisMetadata.toSDK(e) : undefined); - } else { - obj.clients_metadata = []; - } - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - obj.create_localhost = message.createLocalhost; - obj.next_client_sequence = message.nextClientSequence; - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - clients: Array.isArray(object?.clients) ? object.clients.map((e: any) => IdentifiedClientState.fromAmino(e)) : [], - clientsConsensus: Array.isArray(object?.clients_consensus) ? object.clients_consensus.map((e: any) => ClientConsensusStates.fromAmino(e)) : [], - clientsMetadata: Array.isArray(object?.clients_metadata) ? object.clients_metadata.map((e: any) => IdentifiedGenesisMetadata.fromAmino(e)) : [], - params: object?.params ? Params.fromAmino(object.params) : undefined, - createLocalhost: object.create_localhost, - nextClientSequence: BigInt(object.next_client_sequence) - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.clients) { - obj.clients = message.clients.map(e => e ? IdentifiedClientState.toAmino(e) : undefined); - } else { - obj.clients = []; - } - if (message.clientsConsensus) { - obj.clients_consensus = message.clientsConsensus.map(e => e ? ClientConsensusStates.toAmino(e) : undefined); - } else { - obj.clients_consensus = []; - } - if (message.clientsMetadata) { - obj.clients_metadata = message.clientsMetadata.map(e => e ? IdentifiedGenesisMetadata.toAmino(e) : undefined); - } else { - obj.clients_metadata = []; - } - obj.params = message.params ? Params.toAmino(message.params) : undefined; - obj.create_localhost = message.createLocalhost; - obj.next_client_sequence = message.nextClientSequence ? message.nextClientSequence.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseGenesisMetadata(): GenesisMetadata { - return { - key: new Uint8Array(), - value: new Uint8Array() - }; -} -export const GenesisMetadata = { - typeUrl: "/ibc.core.client.v1.GenesisMetadata", - aminoType: "cosmos-sdk/GenesisMetadata", - encode(message: GenesisMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisMetadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisMetadata { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() - }; - }, - toJSON(message: GenesisMetadata): unknown { - 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())); - return obj; - }, - fromPartial(object: DeepPartial): GenesisMetadata { - const message = createBaseGenesisMetadata(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - return message; - }, - fromSDK(object: GenesisMetadataSDKType): GenesisMetadata { - return { - key: object?.key, - value: object?.value - }; - }, - toSDK(message: GenesisMetadata): GenesisMetadataSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: GenesisMetadataAmino): GenesisMetadata { - return { - key: object.key, - value: object.value - }; - }, - toAmino(message: GenesisMetadata): GenesisMetadataAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: GenesisMetadataAminoMsg): GenesisMetadata { - return GenesisMetadata.fromAmino(object.value); - }, - toAminoMsg(message: GenesisMetadata): GenesisMetadataAminoMsg { - return { - type: "cosmos-sdk/GenesisMetadata", - value: GenesisMetadata.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisMetadataProtoMsg): GenesisMetadata { - return GenesisMetadata.decode(message.value); - }, - toProto(message: GenesisMetadata): Uint8Array { - return GenesisMetadata.encode(message).finish(); - }, - toProtoMsg(message: GenesisMetadata): GenesisMetadataProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.GenesisMetadata", - value: GenesisMetadata.encode(message).finish() - }; - } -}; -function createBaseIdentifiedGenesisMetadata(): IdentifiedGenesisMetadata { - return { - clientId: "", - clientMetadata: [] - }; -} -export const IdentifiedGenesisMetadata = { - typeUrl: "/ibc.core.client.v1.IdentifiedGenesisMetadata", - aminoType: "cosmos-sdk/IdentifiedGenesisMetadata", - encode(message: IdentifiedGenesisMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.clientMetadata) { - GenesisMetadata.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IdentifiedGenesisMetadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIdentifiedGenesisMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientMetadata.push(GenesisMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): IdentifiedGenesisMetadata { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - clientMetadata: Array.isArray(object?.clientMetadata) ? object.clientMetadata.map((e: any) => GenesisMetadata.fromJSON(e)) : [] - }; - }, - toJSON(message: IdentifiedGenesisMetadata): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.clientMetadata) { - obj.clientMetadata = message.clientMetadata.map(e => e ? GenesisMetadata.toJSON(e) : undefined); - } else { - obj.clientMetadata = []; - } - return obj; - }, - fromPartial(object: DeepPartial): IdentifiedGenesisMetadata { - const message = createBaseIdentifiedGenesisMetadata(); - message.clientId = object.clientId ?? ""; - message.clientMetadata = object.clientMetadata?.map(e => GenesisMetadata.fromPartial(e)) || []; - return message; - }, - fromSDK(object: IdentifiedGenesisMetadataSDKType): IdentifiedGenesisMetadata { - return { - clientId: object?.client_id, - clientMetadata: Array.isArray(object?.client_metadata) ? object.client_metadata.map((e: any) => GenesisMetadata.fromSDK(e)) : [] - }; - }, - toSDK(message: IdentifiedGenesisMetadata): IdentifiedGenesisMetadataSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.clientMetadata) { - obj.client_metadata = message.clientMetadata.map(e => e ? GenesisMetadata.toSDK(e) : undefined); - } else { - obj.client_metadata = []; - } - return obj; - }, - fromAmino(object: IdentifiedGenesisMetadataAmino): IdentifiedGenesisMetadata { - return { - clientId: object.client_id, - clientMetadata: Array.isArray(object?.client_metadata) ? object.client_metadata.map((e: any) => GenesisMetadata.fromAmino(e)) : [] - }; - }, - toAmino(message: IdentifiedGenesisMetadata): IdentifiedGenesisMetadataAmino { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.clientMetadata) { - obj.client_metadata = message.clientMetadata.map(e => e ? GenesisMetadata.toAmino(e) : undefined); - } else { - obj.client_metadata = []; - } - return obj; - }, - fromAminoMsg(object: IdentifiedGenesisMetadataAminoMsg): IdentifiedGenesisMetadata { - return IdentifiedGenesisMetadata.fromAmino(object.value); - }, - toAminoMsg(message: IdentifiedGenesisMetadata): IdentifiedGenesisMetadataAminoMsg { - return { - type: "cosmos-sdk/IdentifiedGenesisMetadata", - value: IdentifiedGenesisMetadata.toAmino(message) - }; - }, - fromProtoMsg(message: IdentifiedGenesisMetadataProtoMsg): IdentifiedGenesisMetadata { - return IdentifiedGenesisMetadata.decode(message.value); - }, - toProto(message: IdentifiedGenesisMetadata): Uint8Array { - return IdentifiedGenesisMetadata.encode(message).finish(); - }, - toProtoMsg(message: IdentifiedGenesisMetadata): IdentifiedGenesisMetadataProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.IdentifiedGenesisMetadata", - value: IdentifiedGenesisMetadata.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/query.rpc.Query.ts deleted file mode 100644 index edd297f8..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/query.rpc.Query.ts +++ /dev/null @@ -1,314 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../../mobx"; -import { QueryClientStateRequest, QueryClientStateResponse, QueryClientStatesRequest, QueryClientStatesResponse, QueryConsensusStateRequest, QueryConsensusStateResponse, QueryConsensusStatesRequest, QueryConsensusStatesResponse, QueryClientStatusRequest, QueryClientStatusResponse, QueryClientParamsRequest, QueryClientParamsResponse, QueryUpgradedClientStateRequest, QueryUpgradedClientStateResponse, QueryUpgradedConsensusStateRequest, QueryUpgradedConsensusStateResponse } from "./query"; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ClientState queries an IBC light client. */ - clientState(request: QueryClientStateRequest): Promise; - /** ClientStates queries all the IBC light clients of a chain. */ - clientStates(request?: QueryClientStatesRequest): Promise; - /** - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - consensusState(request: QueryConsensusStateRequest): Promise; - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - consensusStates(request: QueryConsensusStatesRequest): Promise; - /** Status queries the status of an IBC client. */ - clientStatus(request: QueryClientStatusRequest): Promise; - /** ClientParams queries all parameters of the ibc client. */ - clientParams(request?: QueryClientParamsRequest): Promise; - /** UpgradedClientState queries an Upgraded IBC light client. */ - upgradedClientState(request?: QueryUpgradedClientStateRequest): Promise; - /** UpgradedConsensusState queries an Upgraded IBC consensus state. */ - upgradedConsensusState(request?: QueryUpgradedConsensusStateRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.clientState = this.clientState.bind(this); - this.clientStates = this.clientStates.bind(this); - this.consensusState = this.consensusState.bind(this); - this.consensusStates = this.consensusStates.bind(this); - this.clientStatus = this.clientStatus.bind(this); - this.clientParams = this.clientParams.bind(this); - this.upgradedClientState = this.upgradedClientState.bind(this); - this.upgradedConsensusState = this.upgradedConsensusState.bind(this); - } - clientState(request: QueryClientStateRequest): Promise { - const data = QueryClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientState", data); - return promise.then(data => QueryClientStateResponse.decode(new BinaryReader(data))); - } - clientStates(request: QueryClientStatesRequest = { - pagination: undefined - }): Promise { - const data = QueryClientStatesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientStates", data); - return promise.then(data => QueryClientStatesResponse.decode(new BinaryReader(data))); - } - consensusState(request: QueryConsensusStateRequest): Promise { - const data = QueryConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusState", data); - return promise.then(data => QueryConsensusStateResponse.decode(new BinaryReader(data))); - } - consensusStates(request: QueryConsensusStatesRequest): Promise { - const data = QueryConsensusStatesRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusStates", data); - return promise.then(data => QueryConsensusStatesResponse.decode(new BinaryReader(data))); - } - clientStatus(request: QueryClientStatusRequest): Promise { - const data = QueryClientStatusRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientStatus", data); - return promise.then(data => QueryClientStatusResponse.decode(new BinaryReader(data))); - } - clientParams(request: QueryClientParamsRequest = {}): Promise { - const data = QueryClientParamsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "ClientParams", data); - return promise.then(data => QueryClientParamsResponse.decode(new BinaryReader(data))); - } - upgradedClientState(request: QueryUpgradedClientStateRequest = {}): Promise { - const data = QueryUpgradedClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "UpgradedClientState", data); - return promise.then(data => QueryUpgradedClientStateResponse.decode(new BinaryReader(data))); - } - upgradedConsensusState(request: QueryUpgradedConsensusStateRequest = {}): Promise { - const data = QueryUpgradedConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Query", "UpgradedConsensusState", data); - return promise.then(data => QueryUpgradedConsensusStateResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - clientState(request: QueryClientStateRequest): Promise { - return queryService.clientState(request); - }, - clientStates(request?: QueryClientStatesRequest): Promise { - return queryService.clientStates(request); - }, - consensusState(request: QueryConsensusStateRequest): Promise { - return queryService.consensusState(request); - }, - consensusStates(request: QueryConsensusStatesRequest): Promise { - return queryService.consensusStates(request); - }, - clientStatus(request: QueryClientStatusRequest): Promise { - return queryService.clientStatus(request); - }, - clientParams(request?: QueryClientParamsRequest): Promise { - return queryService.clientParams(request); - }, - upgradedClientState(request?: QueryUpgradedClientStateRequest): Promise { - return queryService.upgradedClientState(request); - }, - upgradedConsensusState(request?: QueryUpgradedConsensusStateRequest): Promise { - return queryService.upgradedConsensusState(request); - } - }; -}; -export interface UseClientStateQuery extends ReactQueryParams { - request: QueryClientStateRequest; -} -export interface UseClientStatesQuery extends ReactQueryParams { - request?: QueryClientStatesRequest; -} -export interface UseConsensusStateQuery extends ReactQueryParams { - request: QueryConsensusStateRequest; -} -export interface UseConsensusStatesQuery extends ReactQueryParams { - request: QueryConsensusStatesRequest; -} -export interface UseClientStatusQuery extends ReactQueryParams { - request: QueryClientStatusRequest; -} -export interface UseClientParamsQuery extends ReactQueryParams { - request?: QueryClientParamsRequest; -} -export interface UseUpgradedClientStateQuery extends ReactQueryParams { - request?: QueryUpgradedClientStateRequest; -} -export interface UseUpgradedConsensusStateQuery extends ReactQueryParams { - request?: QueryUpgradedConsensusStateRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useClientState = ({ - request, - options - }: UseClientStateQuery) => { - return useQuery(["clientStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.clientState(request); - }, options); - }; - const useClientStates = ({ - request, - options - }: UseClientStatesQuery) => { - return useQuery(["clientStatesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.clientStates(request); - }, options); - }; - const useConsensusState = ({ - request, - options - }: UseConsensusStateQuery) => { - return useQuery(["consensusStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.consensusState(request); - }, options); - }; - const useConsensusStates = ({ - request, - options - }: UseConsensusStatesQuery) => { - return useQuery(["consensusStatesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.consensusStates(request); - }, options); - }; - const useClientStatus = ({ - request, - options - }: UseClientStatusQuery) => { - return useQuery(["clientStatusQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.clientStatus(request); - }, options); - }; - const useClientParams = ({ - request, - options - }: UseClientParamsQuery) => { - return useQuery(["clientParamsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.clientParams(request); - }, options); - }; - const useUpgradedClientState = ({ - request, - options - }: UseUpgradedClientStateQuery) => { - return useQuery(["upgradedClientStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.upgradedClientState(request); - }, options); - }; - const useUpgradedConsensusState = ({ - request, - options - }: UseUpgradedConsensusStateQuery) => { - return useQuery(["upgradedConsensusStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.upgradedConsensusState(request); - }, options); - }; - return { - /** ClientState queries an IBC light client. */useClientState, - /** ClientStates queries all the IBC light clients of a chain. */useClientStates, - /** - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - useConsensusState, - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - useConsensusStates, - /** Status queries the status of an IBC client. */useClientStatus, - /** ClientParams queries all parameters of the ibc client. */useClientParams, - /** UpgradedClientState queries an Upgraded IBC light client. */useUpgradedClientState, - /** UpgradedConsensusState queries an Upgraded IBC consensus state. */useUpgradedConsensusState - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryClientStateStore { - store = new QueryStore(queryService?.clientState); - clientState(request: QueryClientStateRequest) { - return this.store.getData(request); - } - } - class QueryClientStatesStore { - store = new QueryStore(queryService?.clientStates); - clientStates(request: QueryClientStatesRequest) { - return this.store.getData(request); - } - } - class QueryConsensusStateStore { - store = new QueryStore(queryService?.consensusState); - consensusState(request: QueryConsensusStateRequest) { - return this.store.getData(request); - } - } - class QueryConsensusStatesStore { - store = new QueryStore(queryService?.consensusStates); - consensusStates(request: QueryConsensusStatesRequest) { - return this.store.getData(request); - } - } - class QueryClientStatusStore { - store = new QueryStore(queryService?.clientStatus); - clientStatus(request: QueryClientStatusRequest) { - return this.store.getData(request); - } - } - class QueryClientParamsStore { - store = new QueryStore(queryService?.clientParams); - clientParams(request: QueryClientParamsRequest) { - return this.store.getData(request); - } - } - class QueryUpgradedClientStateStore { - store = new QueryStore(queryService?.upgradedClientState); - upgradedClientState(request: QueryUpgradedClientStateRequest) { - return this.store.getData(request); - } - } - class QueryUpgradedConsensusStateStore { - store = new QueryStore(queryService?.upgradedConsensusState); - upgradedConsensusState(request: QueryUpgradedConsensusStateRequest) { - return this.store.getData(request); - } - } - return { - /** ClientState queries an IBC light client. */QueryClientStateStore, - /** ClientStates queries all the IBC light clients of a chain. */QueryClientStatesStore, - /** - * ConsensusState queries a consensus state associated with a client state at - * a given height. - */ - QueryConsensusStateStore, - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ - QueryConsensusStatesStore, - /** Status queries the status of an IBC client. */QueryClientStatusStore, - /** ClientParams queries all parameters of the ibc client. */QueryClientParamsStore, - /** UpgradedClientState queries an Upgraded IBC light client. */QueryUpgradedClientStateStore, - /** UpgradedConsensusState queries an Upgraded IBC consensus state. */QueryUpgradedConsensusStateStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/query.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/query.ts deleted file mode 100644 index 63c8ab91..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/query.ts +++ /dev/null @@ -1,2055 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { Height, HeightAmino, HeightSDKType, IdentifiedClientState, IdentifiedClientStateAmino, IdentifiedClientStateSDKType, ConsensusStateWithHeight, ConsensusStateWithHeightAmino, ConsensusStateWithHeightSDKType, Params, ParamsAmino, ParamsSDKType } from "./client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * QueryClientStateRequest is the request type for the Query/ClientState RPC - * method - */ -export interface QueryClientStateRequest { - /** client state unique identifier */ - clientId: string; -} -export interface QueryClientStateRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientStateRequest"; - value: Uint8Array; -} -/** - * QueryClientStateRequest is the request type for the Query/ClientState RPC - * method - */ -export interface QueryClientStateRequestAmino { - /** client state unique identifier */ - client_id: string; -} -export interface QueryClientStateRequestAminoMsg { - type: "cosmos-sdk/QueryClientStateRequest"; - value: QueryClientStateRequestAmino; -} -/** - * QueryClientStateRequest is the request type for the Query/ClientState RPC - * method - */ -export interface QueryClientStateRequestSDKType { - client_id: string; -} -/** - * QueryClientStateResponse is the response type for the Query/ClientState RPC - * method. Besides the client state, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryClientStateResponse { - /** client state associated with the request identifier */ - clientState: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryClientStateResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientStateResponse"; - value: Uint8Array; -} -/** - * QueryClientStateResponse is the response type for the Query/ClientState RPC - * method. Besides the client state, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryClientStateResponseAmino { - /** client state associated with the request identifier */ - client_state?: AnyAmino | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryClientStateResponseAminoMsg { - type: "cosmos-sdk/QueryClientStateResponse"; - value: QueryClientStateResponseAmino; -} -/** - * QueryClientStateResponse is the response type for the Query/ClientState RPC - * method. Besides the client state, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryClientStateResponseSDKType { - client_state: AnySDKType | undefined; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryClientStatesRequest is the request type for the Query/ClientStates RPC - * method - */ -export interface QueryClientStatesRequest { - /** pagination request */ - pagination: PageRequest | undefined; -} -export interface QueryClientStatesRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientStatesRequest"; - value: Uint8Array; -} -/** - * QueryClientStatesRequest is the request type for the Query/ClientStates RPC - * method - */ -export interface QueryClientStatesRequestAmino { - /** pagination request */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryClientStatesRequestAminoMsg { - type: "cosmos-sdk/QueryClientStatesRequest"; - value: QueryClientStatesRequestAmino; -} -/** - * QueryClientStatesRequest is the request type for the Query/ClientStates RPC - * method - */ -export interface QueryClientStatesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryClientStatesResponse is the response type for the Query/ClientStates RPC - * method. - */ -export interface QueryClientStatesResponse { - /** list of stored ClientStates of the chain. */ - clientStates: IdentifiedClientState[]; - /** pagination response */ - pagination: PageResponse | undefined; -} -export interface QueryClientStatesResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientStatesResponse"; - value: Uint8Array; -} -/** - * QueryClientStatesResponse is the response type for the Query/ClientStates RPC - * method. - */ -export interface QueryClientStatesResponseAmino { - /** list of stored ClientStates of the chain. */ - client_states: IdentifiedClientStateAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryClientStatesResponseAminoMsg { - type: "cosmos-sdk/QueryClientStatesResponse"; - value: QueryClientStatesResponseAmino; -} -/** - * QueryClientStatesResponse is the response type for the Query/ClientStates RPC - * method. - */ -export interface QueryClientStatesResponseSDKType { - client_states: IdentifiedClientStateSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryConsensusStateRequest is the request type for the Query/ConsensusState - * RPC method. Besides the consensus state, it includes a proof and the height - * from which the proof was retrieved. - */ -export interface QueryConsensusStateRequest { - /** client identifier */ - clientId: string; - /** consensus state revision number */ - revisionNumber: bigint; - /** consensus state revision height */ - revisionHeight: bigint; - /** - * latest_height overrrides the height field and queries the latest stored - * ConsensusState - */ - latestHeight: boolean; -} -export interface QueryConsensusStateRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryConsensusStateRequest"; - value: Uint8Array; -} -/** - * QueryConsensusStateRequest is the request type for the Query/ConsensusState - * RPC method. Besides the consensus state, it includes a proof and the height - * from which the proof was retrieved. - */ -export interface QueryConsensusStateRequestAmino { - /** client identifier */ - client_id: string; - /** consensus state revision number */ - revision_number: string; - /** consensus state revision height */ - revision_height: string; - /** - * latest_height overrrides the height field and queries the latest stored - * ConsensusState - */ - latest_height: boolean; -} -export interface QueryConsensusStateRequestAminoMsg { - type: "cosmos-sdk/QueryConsensusStateRequest"; - value: QueryConsensusStateRequestAmino; -} -/** - * QueryConsensusStateRequest is the request type for the Query/ConsensusState - * RPC method. Besides the consensus state, it includes a proof and the height - * from which the proof was retrieved. - */ -export interface QueryConsensusStateRequestSDKType { - client_id: string; - revision_number: bigint; - revision_height: bigint; - latest_height: boolean; -} -/** - * QueryConsensusStateResponse is the response type for the Query/ConsensusState - * RPC method - */ -export interface QueryConsensusStateResponse { - /** consensus state associated with the client identifier at the given height */ - consensusState: Any | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryConsensusStateResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryConsensusStateResponse"; - value: Uint8Array; -} -/** - * QueryConsensusStateResponse is the response type for the Query/ConsensusState - * RPC method - */ -export interface QueryConsensusStateResponseAmino { - /** consensus state associated with the client identifier at the given height */ - consensus_state?: AnyAmino | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryConsensusStateResponseAminoMsg { - type: "cosmos-sdk/QueryConsensusStateResponse"; - value: QueryConsensusStateResponseAmino; -} -/** - * QueryConsensusStateResponse is the response type for the Query/ConsensusState - * RPC method - */ -export interface QueryConsensusStateResponseSDKType { - consensus_state: AnySDKType | undefined; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates - * RPC method. - */ -export interface QueryConsensusStatesRequest { - /** client identifier */ - clientId: string; - /** pagination request */ - pagination: PageRequest | undefined; -} -export interface QueryConsensusStatesRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryConsensusStatesRequest"; - value: Uint8Array; -} -/** - * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates - * RPC method. - */ -export interface QueryConsensusStatesRequestAmino { - /** client identifier */ - client_id: string; - /** pagination request */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryConsensusStatesRequestAminoMsg { - type: "cosmos-sdk/QueryConsensusStatesRequest"; - value: QueryConsensusStatesRequestAmino; -} -/** - * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates - * RPC method. - */ -export interface QueryConsensusStatesRequestSDKType { - client_id: string; - pagination: PageRequestSDKType | undefined; -} -/** - * QueryConsensusStatesResponse is the response type for the - * Query/ConsensusStates RPC method - */ -export interface QueryConsensusStatesResponse { - /** consensus states associated with the identifier */ - consensusStates: ConsensusStateWithHeight[]; - /** pagination response */ - pagination: PageResponse | undefined; -} -export interface QueryConsensusStatesResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryConsensusStatesResponse"; - value: Uint8Array; -} -/** - * QueryConsensusStatesResponse is the response type for the - * Query/ConsensusStates RPC method - */ -export interface QueryConsensusStatesResponseAmino { - /** consensus states associated with the identifier */ - consensus_states: ConsensusStateWithHeightAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryConsensusStatesResponseAminoMsg { - type: "cosmos-sdk/QueryConsensusStatesResponse"; - value: QueryConsensusStatesResponseAmino; -} -/** - * QueryConsensusStatesResponse is the response type for the - * Query/ConsensusStates RPC method - */ -export interface QueryConsensusStatesResponseSDKType { - consensus_states: ConsensusStateWithHeightSDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QueryClientStatusRequest is the request type for the Query/ClientStatus RPC - * method - */ -export interface QueryClientStatusRequest { - /** client unique identifier */ - clientId: string; -} -export interface QueryClientStatusRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientStatusRequest"; - value: Uint8Array; -} -/** - * QueryClientStatusRequest is the request type for the Query/ClientStatus RPC - * method - */ -export interface QueryClientStatusRequestAmino { - /** client unique identifier */ - client_id: string; -} -export interface QueryClientStatusRequestAminoMsg { - type: "cosmos-sdk/QueryClientStatusRequest"; - value: QueryClientStatusRequestAmino; -} -/** - * QueryClientStatusRequest is the request type for the Query/ClientStatus RPC - * method - */ -export interface QueryClientStatusRequestSDKType { - client_id: string; -} -/** - * QueryClientStatusResponse is the response type for the Query/ClientStatus RPC - * method. It returns the current status of the IBC client. - */ -export interface QueryClientStatusResponse { - status: string; -} -export interface QueryClientStatusResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientStatusResponse"; - value: Uint8Array; -} -/** - * QueryClientStatusResponse is the response type for the Query/ClientStatus RPC - * method. It returns the current status of the IBC client. - */ -export interface QueryClientStatusResponseAmino { - status: string; -} -export interface QueryClientStatusResponseAminoMsg { - type: "cosmos-sdk/QueryClientStatusResponse"; - value: QueryClientStatusResponseAmino; -} -/** - * QueryClientStatusResponse is the response type for the Query/ClientStatus RPC - * method. It returns the current status of the IBC client. - */ -export interface QueryClientStatusResponseSDKType { - status: string; -} -/** - * QueryClientParamsRequest is the request type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsRequest {} -export interface QueryClientParamsRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientParamsRequest"; - value: Uint8Array; -} -/** - * QueryClientParamsRequest is the request type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsRequestAmino {} -export interface QueryClientParamsRequestAminoMsg { - type: "cosmos-sdk/QueryClientParamsRequest"; - value: QueryClientParamsRequestAmino; -} -/** - * QueryClientParamsRequest is the request type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsRequestSDKType {} -/** - * QueryClientParamsResponse is the response type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryClientParamsResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryClientParamsResponse"; - value: Uint8Array; -} -/** - * QueryClientParamsResponse is the response type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryClientParamsResponseAminoMsg { - type: "cosmos-sdk/QueryClientParamsResponse"; - value: QueryClientParamsResponseAmino; -} -/** - * QueryClientParamsResponse is the response type for the Query/ClientParams RPC - * method. - */ -export interface QueryClientParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** - * QueryUpgradedClientStateRequest is the request type for the - * Query/UpgradedClientState RPC method - */ -export interface QueryUpgradedClientStateRequest {} -export interface QueryUpgradedClientStateRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryUpgradedClientStateRequest"; - value: Uint8Array; -} -/** - * QueryUpgradedClientStateRequest is the request type for the - * Query/UpgradedClientState RPC method - */ -export interface QueryUpgradedClientStateRequestAmino {} -export interface QueryUpgradedClientStateRequestAminoMsg { - type: "cosmos-sdk/QueryUpgradedClientStateRequest"; - value: QueryUpgradedClientStateRequestAmino; -} -/** - * QueryUpgradedClientStateRequest is the request type for the - * Query/UpgradedClientState RPC method - */ -export interface QueryUpgradedClientStateRequestSDKType {} -/** - * QueryUpgradedClientStateResponse is the response type for the - * Query/UpgradedClientState RPC method. - */ -export interface QueryUpgradedClientStateResponse { - /** client state associated with the request identifier */ - upgradedClientState: Any | undefined; -} -export interface QueryUpgradedClientStateResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryUpgradedClientStateResponse"; - value: Uint8Array; -} -/** - * QueryUpgradedClientStateResponse is the response type for the - * Query/UpgradedClientState RPC method. - */ -export interface QueryUpgradedClientStateResponseAmino { - /** client state associated with the request identifier */ - upgraded_client_state?: AnyAmino | undefined; -} -export interface QueryUpgradedClientStateResponseAminoMsg { - type: "cosmos-sdk/QueryUpgradedClientStateResponse"; - value: QueryUpgradedClientStateResponseAmino; -} -/** - * QueryUpgradedClientStateResponse is the response type for the - * Query/UpgradedClientState RPC method. - */ -export interface QueryUpgradedClientStateResponseSDKType { - upgraded_client_state: AnySDKType | undefined; -} -/** - * QueryUpgradedConsensusStateRequest is the request type for the - * Query/UpgradedConsensusState RPC method - */ -export interface QueryUpgradedConsensusStateRequest {} -export interface QueryUpgradedConsensusStateRequestProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryUpgradedConsensusStateRequest"; - value: Uint8Array; -} -/** - * QueryUpgradedConsensusStateRequest is the request type for the - * Query/UpgradedConsensusState RPC method - */ -export interface QueryUpgradedConsensusStateRequestAmino {} -export interface QueryUpgradedConsensusStateRequestAminoMsg { - type: "cosmos-sdk/QueryUpgradedConsensusStateRequest"; - value: QueryUpgradedConsensusStateRequestAmino; -} -/** - * QueryUpgradedConsensusStateRequest is the request type for the - * Query/UpgradedConsensusState RPC method - */ -export interface QueryUpgradedConsensusStateRequestSDKType {} -/** - * QueryUpgradedConsensusStateResponse is the response type for the - * Query/UpgradedConsensusState RPC method. - */ -export interface QueryUpgradedConsensusStateResponse { - /** Consensus state associated with the request identifier */ - upgradedConsensusState: Any | undefined; -} -export interface QueryUpgradedConsensusStateResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.QueryUpgradedConsensusStateResponse"; - value: Uint8Array; -} -/** - * QueryUpgradedConsensusStateResponse is the response type for the - * Query/UpgradedConsensusState RPC method. - */ -export interface QueryUpgradedConsensusStateResponseAmino { - /** Consensus state associated with the request identifier */ - upgraded_consensus_state?: AnyAmino | undefined; -} -export interface QueryUpgradedConsensusStateResponseAminoMsg { - type: "cosmos-sdk/QueryUpgradedConsensusStateResponse"; - value: QueryUpgradedConsensusStateResponseAmino; -} -/** - * QueryUpgradedConsensusStateResponse is the response type for the - * Query/UpgradedConsensusState RPC method. - */ -export interface QueryUpgradedConsensusStateResponseSDKType { - upgraded_consensus_state: AnySDKType | undefined; -} -function createBaseQueryClientStateRequest(): QueryClientStateRequest { - return { - clientId: "" - }; -} -export const QueryClientStateRequest = { - typeUrl: "/ibc.core.client.v1.QueryClientStateRequest", - aminoType: "cosmos-sdk/QueryClientStateRequest", - encode(message: QueryClientStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientStateRequest { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "" - }; - }, - toJSON(message: QueryClientStateRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientStateRequest { - const message = createBaseQueryClientStateRequest(); - message.clientId = object.clientId ?? ""; - return message; - }, - fromSDK(object: QueryClientStateRequestSDKType): QueryClientStateRequest { - return { - clientId: object?.client_id - }; - }, - toSDK(message: QueryClientStateRequest): QueryClientStateRequestSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - return obj; - }, - fromAmino(object: QueryClientStateRequestAmino): QueryClientStateRequest { - return { - clientId: object.client_id - }; - }, - toAmino(message: QueryClientStateRequest): QueryClientStateRequestAmino { - const obj: any = {}; - obj.client_id = message.clientId; - return obj; - }, - fromAminoMsg(object: QueryClientStateRequestAminoMsg): QueryClientStateRequest { - return QueryClientStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientStateRequest): QueryClientStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClientStateRequest", - value: QueryClientStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientStateRequestProtoMsg): QueryClientStateRequest { - return QueryClientStateRequest.decode(message.value); - }, - toProto(message: QueryClientStateRequest): Uint8Array { - return QueryClientStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClientStateRequest): QueryClientStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientStateRequest", - value: QueryClientStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClientStateResponse(): QueryClientStateResponse { - return { - clientState: Any.fromPartial({}), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryClientStateResponse = { - typeUrl: "/ibc.core.client.v1.QueryClientStateResponse", - aminoType: "cosmos-sdk/QueryClientStateResponse", - encode(message: QueryClientStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientStateResponse { - return { - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryClientStateResponse): unknown { - const obj: any = {}; - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientStateResponse { - const message = createBaseQueryClientStateResponse(); - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryClientStateResponseSDKType): QueryClientStateResponse { - return { - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryClientStateResponse): QueryClientStateResponseSDKType { - const obj: any = {}; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryClientStateResponseAmino): QueryClientStateResponse { - return { - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryClientStateResponse): QueryClientStateResponseAmino { - const obj: any = {}; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryClientStateResponseAminoMsg): QueryClientStateResponse { - return QueryClientStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientStateResponse): QueryClientStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClientStateResponse", - value: QueryClientStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientStateResponseProtoMsg): QueryClientStateResponse { - return QueryClientStateResponse.decode(message.value); - }, - toProto(message: QueryClientStateResponse): Uint8Array { - return QueryClientStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClientStateResponse): QueryClientStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientStateResponse", - value: QueryClientStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClientStatesRequest(): QueryClientStatesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryClientStatesRequest = { - typeUrl: "/ibc.core.client.v1.QueryClientStatesRequest", - aminoType: "cosmos-sdk/QueryClientStatesRequest", - encode(message: QueryClientStatesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientStatesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientStatesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientStatesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryClientStatesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientStatesRequest { - const message = createBaseQueryClientStatesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryClientStatesRequestSDKType): QueryClientStatesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryClientStatesRequest): QueryClientStatesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryClientStatesRequestAmino): QueryClientStatesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryClientStatesRequest): QueryClientStatesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClientStatesRequestAminoMsg): QueryClientStatesRequest { - return QueryClientStatesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientStatesRequest): QueryClientStatesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClientStatesRequest", - value: QueryClientStatesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientStatesRequestProtoMsg): QueryClientStatesRequest { - return QueryClientStatesRequest.decode(message.value); - }, - toProto(message: QueryClientStatesRequest): Uint8Array { - return QueryClientStatesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClientStatesRequest): QueryClientStatesRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientStatesRequest", - value: QueryClientStatesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClientStatesResponse(): QueryClientStatesResponse { - return { - clientStates: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryClientStatesResponse = { - typeUrl: "/ibc.core.client.v1.QueryClientStatesResponse", - aminoType: "cosmos-sdk/QueryClientStatesResponse", - encode(message: QueryClientStatesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.clientStates) { - IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientStatesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientStatesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientStates.push(IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientStatesResponse { - return { - clientStates: Array.isArray(object?.clientStates) ? object.clientStates.map((e: any) => IdentifiedClientState.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryClientStatesResponse): unknown { - const obj: any = {}; - if (message.clientStates) { - obj.clientStates = message.clientStates.map(e => e ? IdentifiedClientState.toJSON(e) : undefined); - } else { - obj.clientStates = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientStatesResponse { - const message = createBaseQueryClientStatesResponse(); - message.clientStates = object.clientStates?.map(e => IdentifiedClientState.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryClientStatesResponseSDKType): QueryClientStatesResponse { - return { - clientStates: Array.isArray(object?.client_states) ? object.client_states.map((e: any) => IdentifiedClientState.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryClientStatesResponse): QueryClientStatesResponseSDKType { - const obj: any = {}; - if (message.clientStates) { - obj.client_states = message.clientStates.map(e => e ? IdentifiedClientState.toSDK(e) : undefined); - } else { - obj.client_states = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryClientStatesResponseAmino): QueryClientStatesResponse { - return { - clientStates: Array.isArray(object?.client_states) ? object.client_states.map((e: any) => IdentifiedClientState.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryClientStatesResponse): QueryClientStatesResponseAmino { - const obj: any = {}; - if (message.clientStates) { - obj.client_states = message.clientStates.map(e => e ? IdentifiedClientState.toAmino(e) : undefined); - } else { - obj.client_states = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClientStatesResponseAminoMsg): QueryClientStatesResponse { - return QueryClientStatesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientStatesResponse): QueryClientStatesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClientStatesResponse", - value: QueryClientStatesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientStatesResponseProtoMsg): QueryClientStatesResponse { - return QueryClientStatesResponse.decode(message.value); - }, - toProto(message: QueryClientStatesResponse): Uint8Array { - return QueryClientStatesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClientStatesResponse): QueryClientStatesResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientStatesResponse", - value: QueryClientStatesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryConsensusStateRequest(): QueryConsensusStateRequest { - return { - clientId: "", - revisionNumber: BigInt(0), - revisionHeight: BigInt(0), - latestHeight: false - }; -} -export const QueryConsensusStateRequest = { - typeUrl: "/ibc.core.client.v1.QueryConsensusStateRequest", - aminoType: "cosmos-sdk/QueryConsensusStateRequest", - encode(message: QueryConsensusStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.revisionNumber !== BigInt(0)) { - writer.uint32(16).uint64(message.revisionNumber); - } - if (message.revisionHeight !== BigInt(0)) { - writer.uint32(24).uint64(message.revisionHeight); - } - if (message.latestHeight === true) { - writer.uint32(32).bool(message.latestHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConsensusStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConsensusStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.revisionNumber = reader.uint64(); - break; - case 3: - message.revisionHeight = reader.uint64(); - break; - case 4: - message.latestHeight = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConsensusStateRequest { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - revisionNumber: isSet(object.revisionNumber) ? BigInt(object.revisionNumber.toString()) : BigInt(0), - revisionHeight: isSet(object.revisionHeight) ? BigInt(object.revisionHeight.toString()) : BigInt(0), - latestHeight: isSet(object.latestHeight) ? Boolean(object.latestHeight) : false - }; - }, - toJSON(message: QueryConsensusStateRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.revisionNumber !== undefined && (obj.revisionNumber = (message.revisionNumber || BigInt(0)).toString()); - message.revisionHeight !== undefined && (obj.revisionHeight = (message.revisionHeight || BigInt(0)).toString()); - message.latestHeight !== undefined && (obj.latestHeight = message.latestHeight); - return obj; - }, - fromPartial(object: DeepPartial): QueryConsensusStateRequest { - const message = createBaseQueryConsensusStateRequest(); - message.clientId = object.clientId ?? ""; - message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null ? BigInt(object.revisionNumber.toString()) : BigInt(0); - message.revisionHeight = object.revisionHeight !== undefined && object.revisionHeight !== null ? BigInt(object.revisionHeight.toString()) : BigInt(0); - message.latestHeight = object.latestHeight ?? false; - return message; - }, - fromSDK(object: QueryConsensusStateRequestSDKType): QueryConsensusStateRequest { - return { - clientId: object?.client_id, - revisionNumber: object?.revision_number, - revisionHeight: object?.revision_height, - latestHeight: object?.latest_height - }; - }, - toSDK(message: QueryConsensusStateRequest): QueryConsensusStateRequestSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - obj.revision_number = message.revisionNumber; - obj.revision_height = message.revisionHeight; - obj.latest_height = message.latestHeight; - return obj; - }, - fromAmino(object: QueryConsensusStateRequestAmino): QueryConsensusStateRequest { - return { - clientId: object.client_id, - revisionNumber: BigInt(object.revision_number), - revisionHeight: BigInt(object.revision_height), - latestHeight: object.latest_height - }; - }, - toAmino(message: QueryConsensusStateRequest): QueryConsensusStateRequestAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; - obj.latest_height = message.latestHeight; - return obj; - }, - fromAminoMsg(object: QueryConsensusStateRequestAminoMsg): QueryConsensusStateRequest { - return QueryConsensusStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConsensusStateRequest): QueryConsensusStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConsensusStateRequest", - value: QueryConsensusStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConsensusStateRequestProtoMsg): QueryConsensusStateRequest { - return QueryConsensusStateRequest.decode(message.value); - }, - toProto(message: QueryConsensusStateRequest): Uint8Array { - return QueryConsensusStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConsensusStateRequest): QueryConsensusStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryConsensusStateRequest", - value: QueryConsensusStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConsensusStateResponse(): QueryConsensusStateResponse { - return { - consensusState: Any.fromPartial({}), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryConsensusStateResponse = { - typeUrl: "/ibc.core.client.v1.QueryConsensusStateResponse", - aminoType: "cosmos-sdk/QueryConsensusStateResponse", - encode(message: QueryConsensusStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConsensusStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConsensusStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConsensusStateResponse { - return { - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryConsensusStateResponse): unknown { - const obj: any = {}; - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConsensusStateResponse { - const message = createBaseQueryConsensusStateResponse(); - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryConsensusStateResponseSDKType): QueryConsensusStateResponse { - return { - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryConsensusStateResponse): QueryConsensusStateResponseSDKType { - const obj: any = {}; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryConsensusStateResponseAmino): QueryConsensusStateResponse { - return { - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryConsensusStateResponse): QueryConsensusStateResponseAmino { - const obj: any = {}; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryConsensusStateResponseAminoMsg): QueryConsensusStateResponse { - return QueryConsensusStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConsensusStateResponse): QueryConsensusStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConsensusStateResponse", - value: QueryConsensusStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConsensusStateResponseProtoMsg): QueryConsensusStateResponse { - return QueryConsensusStateResponse.decode(message.value); - }, - toProto(message: QueryConsensusStateResponse): Uint8Array { - return QueryConsensusStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConsensusStateResponse): QueryConsensusStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryConsensusStateResponse", - value: QueryConsensusStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryConsensusStatesRequest(): QueryConsensusStatesRequest { - return { - clientId: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryConsensusStatesRequest = { - typeUrl: "/ibc.core.client.v1.QueryConsensusStatesRequest", - aminoType: "cosmos-sdk/QueryConsensusStatesRequest", - encode(message: QueryConsensusStatesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConsensusStatesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConsensusStatesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConsensusStatesRequest { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryConsensusStatesRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConsensusStatesRequest { - const message = createBaseQueryConsensusStatesRequest(); - message.clientId = object.clientId ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryConsensusStatesRequestSDKType): QueryConsensusStatesRequest { - return { - clientId: object?.client_id, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryConsensusStatesRequest): QueryConsensusStatesRequestSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryConsensusStatesRequestAmino): QueryConsensusStatesRequest { - return { - clientId: object.client_id, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryConsensusStatesRequest): QueryConsensusStatesRequestAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryConsensusStatesRequestAminoMsg): QueryConsensusStatesRequest { - return QueryConsensusStatesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConsensusStatesRequest): QueryConsensusStatesRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConsensusStatesRequest", - value: QueryConsensusStatesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConsensusStatesRequestProtoMsg): QueryConsensusStatesRequest { - return QueryConsensusStatesRequest.decode(message.value); - }, - toProto(message: QueryConsensusStatesRequest): Uint8Array { - return QueryConsensusStatesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConsensusStatesRequest): QueryConsensusStatesRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryConsensusStatesRequest", - value: QueryConsensusStatesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConsensusStatesResponse(): QueryConsensusStatesResponse { - return { - consensusStates: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryConsensusStatesResponse = { - typeUrl: "/ibc.core.client.v1.QueryConsensusStatesResponse", - aminoType: "cosmos-sdk/QueryConsensusStatesResponse", - encode(message: QueryConsensusStatesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.consensusStates) { - ConsensusStateWithHeight.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConsensusStatesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConsensusStatesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConsensusStatesResponse { - return { - consensusStates: Array.isArray(object?.consensusStates) ? object.consensusStates.map((e: any) => ConsensusStateWithHeight.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryConsensusStatesResponse): unknown { - const obj: any = {}; - if (message.consensusStates) { - obj.consensusStates = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toJSON(e) : undefined); - } else { - obj.consensusStates = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConsensusStatesResponse { - const message = createBaseQueryConsensusStatesResponse(); - message.consensusStates = object.consensusStates?.map(e => ConsensusStateWithHeight.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryConsensusStatesResponseSDKType): QueryConsensusStatesResponse { - return { - consensusStates: Array.isArray(object?.consensus_states) ? object.consensus_states.map((e: any) => ConsensusStateWithHeight.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryConsensusStatesResponse): QueryConsensusStatesResponseSDKType { - const obj: any = {}; - if (message.consensusStates) { - obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toSDK(e) : undefined); - } else { - obj.consensus_states = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryConsensusStatesResponseAmino): QueryConsensusStatesResponse { - return { - consensusStates: Array.isArray(object?.consensus_states) ? object.consensus_states.map((e: any) => ConsensusStateWithHeight.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryConsensusStatesResponse): QueryConsensusStatesResponseAmino { - const obj: any = {}; - if (message.consensusStates) { - obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toAmino(e) : undefined); - } else { - obj.consensus_states = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryConsensusStatesResponseAminoMsg): QueryConsensusStatesResponse { - return QueryConsensusStatesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConsensusStatesResponse): QueryConsensusStatesResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConsensusStatesResponse", - value: QueryConsensusStatesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConsensusStatesResponseProtoMsg): QueryConsensusStatesResponse { - return QueryConsensusStatesResponse.decode(message.value); - }, - toProto(message: QueryConsensusStatesResponse): Uint8Array { - return QueryConsensusStatesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConsensusStatesResponse): QueryConsensusStatesResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryConsensusStatesResponse", - value: QueryConsensusStatesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClientStatusRequest(): QueryClientStatusRequest { - return { - clientId: "" - }; -} -export const QueryClientStatusRequest = { - typeUrl: "/ibc.core.client.v1.QueryClientStatusRequest", - aminoType: "cosmos-sdk/QueryClientStatusRequest", - encode(message: QueryClientStatusRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientStatusRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientStatusRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientStatusRequest { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "" - }; - }, - toJSON(message: QueryClientStatusRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientStatusRequest { - const message = createBaseQueryClientStatusRequest(); - message.clientId = object.clientId ?? ""; - return message; - }, - fromSDK(object: QueryClientStatusRequestSDKType): QueryClientStatusRequest { - return { - clientId: object?.client_id - }; - }, - toSDK(message: QueryClientStatusRequest): QueryClientStatusRequestSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - return obj; - }, - fromAmino(object: QueryClientStatusRequestAmino): QueryClientStatusRequest { - return { - clientId: object.client_id - }; - }, - toAmino(message: QueryClientStatusRequest): QueryClientStatusRequestAmino { - const obj: any = {}; - obj.client_id = message.clientId; - return obj; - }, - fromAminoMsg(object: QueryClientStatusRequestAminoMsg): QueryClientStatusRequest { - return QueryClientStatusRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientStatusRequest): QueryClientStatusRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClientStatusRequest", - value: QueryClientStatusRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientStatusRequestProtoMsg): QueryClientStatusRequest { - return QueryClientStatusRequest.decode(message.value); - }, - toProto(message: QueryClientStatusRequest): Uint8Array { - return QueryClientStatusRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClientStatusRequest): QueryClientStatusRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientStatusRequest", - value: QueryClientStatusRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClientStatusResponse(): QueryClientStatusResponse { - return { - status: "" - }; -} -export const QueryClientStatusResponse = { - typeUrl: "/ibc.core.client.v1.QueryClientStatusResponse", - aminoType: "cosmos-sdk/QueryClientStatusResponse", - encode(message: QueryClientStatusResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.status !== "") { - writer.uint32(10).string(message.status); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientStatusResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientStatusResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientStatusResponse { - return { - status: isSet(object.status) ? String(object.status) : "" - }; - }, - toJSON(message: QueryClientStatusResponse): unknown { - const obj: any = {}; - message.status !== undefined && (obj.status = message.status); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientStatusResponse { - const message = createBaseQueryClientStatusResponse(); - message.status = object.status ?? ""; - return message; - }, - fromSDK(object: QueryClientStatusResponseSDKType): QueryClientStatusResponse { - return { - status: object?.status - }; - }, - toSDK(message: QueryClientStatusResponse): QueryClientStatusResponseSDKType { - const obj: any = {}; - obj.status = message.status; - return obj; - }, - fromAmino(object: QueryClientStatusResponseAmino): QueryClientStatusResponse { - return { - status: object.status - }; - }, - toAmino(message: QueryClientStatusResponse): QueryClientStatusResponseAmino { - const obj: any = {}; - obj.status = message.status; - return obj; - }, - fromAminoMsg(object: QueryClientStatusResponseAminoMsg): QueryClientStatusResponse { - return QueryClientStatusResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientStatusResponse): QueryClientStatusResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClientStatusResponse", - value: QueryClientStatusResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientStatusResponseProtoMsg): QueryClientStatusResponse { - return QueryClientStatusResponse.decode(message.value); - }, - toProto(message: QueryClientStatusResponse): Uint8Array { - return QueryClientStatusResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClientStatusResponse): QueryClientStatusResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientStatusResponse", - value: QueryClientStatusResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClientParamsRequest(): QueryClientParamsRequest { - return {}; -} -export const QueryClientParamsRequest = { - typeUrl: "/ibc.core.client.v1.QueryClientParamsRequest", - aminoType: "cosmos-sdk/QueryClientParamsRequest", - encode(_: QueryClientParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryClientParamsRequest { - return {}; - }, - toJSON(_: QueryClientParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryClientParamsRequest { - const message = createBaseQueryClientParamsRequest(); - return message; - }, - fromSDK(_: QueryClientParamsRequestSDKType): QueryClientParamsRequest { - return {}; - }, - toSDK(_: QueryClientParamsRequest): QueryClientParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryClientParamsRequestAmino): QueryClientParamsRequest { - return {}; - }, - toAmino(_: QueryClientParamsRequest): QueryClientParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryClientParamsRequestAminoMsg): QueryClientParamsRequest { - return QueryClientParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientParamsRequest): QueryClientParamsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClientParamsRequest", - value: QueryClientParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientParamsRequestProtoMsg): QueryClientParamsRequest { - return QueryClientParamsRequest.decode(message.value); - }, - toProto(message: QueryClientParamsRequest): Uint8Array { - return QueryClientParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClientParamsRequest): QueryClientParamsRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientParamsRequest", - value: QueryClientParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClientParamsResponse(): QueryClientParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryClientParamsResponse = { - typeUrl: "/ibc.core.client.v1.QueryClientParamsResponse", - aminoType: "cosmos-sdk/QueryClientParamsResponse", - encode(message: QueryClientParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryClientParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientParamsResponse { - const message = createBaseQueryClientParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryClientParamsResponseSDKType): QueryClientParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryClientParamsResponse): QueryClientParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryClientParamsResponseAmino): QueryClientParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryClientParamsResponse): QueryClientParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClientParamsResponseAminoMsg): QueryClientParamsResponse { - return QueryClientParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientParamsResponse): QueryClientParamsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClientParamsResponse", - value: QueryClientParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientParamsResponseProtoMsg): QueryClientParamsResponse { - return QueryClientParamsResponse.decode(message.value); - }, - toProto(message: QueryClientParamsResponse): Uint8Array { - return QueryClientParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClientParamsResponse): QueryClientParamsResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryClientParamsResponse", - value: QueryClientParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUpgradedClientStateRequest(): QueryUpgradedClientStateRequest { - return {}; -} -export const QueryUpgradedClientStateRequest = { - typeUrl: "/ibc.core.client.v1.QueryUpgradedClientStateRequest", - aminoType: "cosmos-sdk/QueryUpgradedClientStateRequest", - encode(_: QueryUpgradedClientStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUpgradedClientStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUpgradedClientStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryUpgradedClientStateRequest { - return {}; - }, - toJSON(_: QueryUpgradedClientStateRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryUpgradedClientStateRequest { - const message = createBaseQueryUpgradedClientStateRequest(); - return message; - }, - fromSDK(_: QueryUpgradedClientStateRequestSDKType): QueryUpgradedClientStateRequest { - return {}; - }, - toSDK(_: QueryUpgradedClientStateRequest): QueryUpgradedClientStateRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryUpgradedClientStateRequestAmino): QueryUpgradedClientStateRequest { - return {}; - }, - toAmino(_: QueryUpgradedClientStateRequest): QueryUpgradedClientStateRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryUpgradedClientStateRequestAminoMsg): QueryUpgradedClientStateRequest { - return QueryUpgradedClientStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUpgradedClientStateRequest): QueryUpgradedClientStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryUpgradedClientStateRequest", - value: QueryUpgradedClientStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUpgradedClientStateRequestProtoMsg): QueryUpgradedClientStateRequest { - return QueryUpgradedClientStateRequest.decode(message.value); - }, - toProto(message: QueryUpgradedClientStateRequest): Uint8Array { - return QueryUpgradedClientStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUpgradedClientStateRequest): QueryUpgradedClientStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryUpgradedClientStateRequest", - value: QueryUpgradedClientStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUpgradedClientStateResponse(): QueryUpgradedClientStateResponse { - return { - upgradedClientState: Any.fromPartial({}) - }; -} -export const QueryUpgradedClientStateResponse = { - typeUrl: "/ibc.core.client.v1.QueryUpgradedClientStateResponse", - aminoType: "cosmos-sdk/QueryUpgradedClientStateResponse", - encode(message: QueryUpgradedClientStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.upgradedClientState !== undefined) { - Any.encode(message.upgradedClientState, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUpgradedClientStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUpgradedClientStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgradedClientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUpgradedClientStateResponse { - return { - upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) : undefined - }; - }, - toJSON(message: QueryUpgradedClientStateResponse): unknown { - const obj: any = {}; - message.upgradedClientState !== undefined && (obj.upgradedClientState = message.upgradedClientState ? Any.toJSON(message.upgradedClientState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryUpgradedClientStateResponse { - const message = createBaseQueryUpgradedClientStateResponse(); - message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; - return message; - }, - fromSDK(object: QueryUpgradedClientStateResponseSDKType): QueryUpgradedClientStateResponse { - return { - upgradedClientState: object.upgraded_client_state ? Any.fromSDK(object.upgraded_client_state) : undefined - }; - }, - toSDK(message: QueryUpgradedClientStateResponse): QueryUpgradedClientStateResponseSDKType { - const obj: any = {}; - message.upgradedClientState !== undefined && (obj.upgraded_client_state = message.upgradedClientState ? Any.toSDK(message.upgradedClientState) : undefined); - return obj; - }, - fromAmino(object: QueryUpgradedClientStateResponseAmino): QueryUpgradedClientStateResponse { - return { - upgradedClientState: object?.upgraded_client_state ? Any.fromAmino(object.upgraded_client_state) : undefined - }; - }, - toAmino(message: QueryUpgradedClientStateResponse): QueryUpgradedClientStateResponseAmino { - const obj: any = {}; - obj.upgraded_client_state = message.upgradedClientState ? Any.toAmino(message.upgradedClientState) : undefined; - return obj; - }, - fromAminoMsg(object: QueryUpgradedClientStateResponseAminoMsg): QueryUpgradedClientStateResponse { - return QueryUpgradedClientStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUpgradedClientStateResponse): QueryUpgradedClientStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryUpgradedClientStateResponse", - value: QueryUpgradedClientStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUpgradedClientStateResponseProtoMsg): QueryUpgradedClientStateResponse { - return QueryUpgradedClientStateResponse.decode(message.value); - }, - toProto(message: QueryUpgradedClientStateResponse): Uint8Array { - return QueryUpgradedClientStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUpgradedClientStateResponse): QueryUpgradedClientStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryUpgradedClientStateResponse", - value: QueryUpgradedClientStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUpgradedConsensusStateRequest(): QueryUpgradedConsensusStateRequest { - return {}; -} -export const QueryUpgradedConsensusStateRequest = { - typeUrl: "/ibc.core.client.v1.QueryUpgradedConsensusStateRequest", - aminoType: "cosmos-sdk/QueryUpgradedConsensusStateRequest", - encode(_: QueryUpgradedConsensusStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUpgradedConsensusStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUpgradedConsensusStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryUpgradedConsensusStateRequest { - return {}; - }, - toJSON(_: QueryUpgradedConsensusStateRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryUpgradedConsensusStateRequest { - const message = createBaseQueryUpgradedConsensusStateRequest(); - return message; - }, - fromSDK(_: QueryUpgradedConsensusStateRequestSDKType): QueryUpgradedConsensusStateRequest { - return {}; - }, - toSDK(_: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryUpgradedConsensusStateRequestAmino): QueryUpgradedConsensusStateRequest { - return {}; - }, - toAmino(_: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryUpgradedConsensusStateRequestAminoMsg): QueryUpgradedConsensusStateRequest { - return QueryUpgradedConsensusStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryUpgradedConsensusStateRequest", - value: QueryUpgradedConsensusStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUpgradedConsensusStateRequestProtoMsg): QueryUpgradedConsensusStateRequest { - return QueryUpgradedConsensusStateRequest.decode(message.value); - }, - toProto(message: QueryUpgradedConsensusStateRequest): Uint8Array { - return QueryUpgradedConsensusStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUpgradedConsensusStateRequest): QueryUpgradedConsensusStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryUpgradedConsensusStateRequest", - value: QueryUpgradedConsensusStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUpgradedConsensusStateResponse(): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: Any.fromPartial({}) - }; -} -export const QueryUpgradedConsensusStateResponse = { - typeUrl: "/ibc.core.client.v1.QueryUpgradedConsensusStateResponse", - aminoType: "cosmos-sdk/QueryUpgradedConsensusStateResponse", - encode(message: QueryUpgradedConsensusStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.upgradedConsensusState !== undefined) { - Any.encode(message.upgradedConsensusState, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUpgradedConsensusStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUpgradedConsensusStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgradedConsensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: isSet(object.upgradedConsensusState) ? Any.fromJSON(object.upgradedConsensusState) : undefined - }; - }, - toJSON(message: QueryUpgradedConsensusStateResponse): unknown { - const obj: any = {}; - message.upgradedConsensusState !== undefined && (obj.upgradedConsensusState = message.upgradedConsensusState ? Any.toJSON(message.upgradedConsensusState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryUpgradedConsensusStateResponse { - const message = createBaseQueryUpgradedConsensusStateResponse(); - message.upgradedConsensusState = object.upgradedConsensusState !== undefined && object.upgradedConsensusState !== null ? Any.fromPartial(object.upgradedConsensusState) : undefined; - return message; - }, - fromSDK(object: QueryUpgradedConsensusStateResponseSDKType): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: object.upgraded_consensus_state ? Any.fromSDK(object.upgraded_consensus_state) : undefined - }; - }, - toSDK(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseSDKType { - const obj: any = {}; - message.upgradedConsensusState !== undefined && (obj.upgraded_consensus_state = message.upgradedConsensusState ? Any.toSDK(message.upgradedConsensusState) : undefined); - return obj; - }, - fromAmino(object: QueryUpgradedConsensusStateResponseAmino): QueryUpgradedConsensusStateResponse { - return { - upgradedConsensusState: object?.upgraded_consensus_state ? Any.fromAmino(object.upgraded_consensus_state) : undefined - }; - }, - toAmino(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseAmino { - const obj: any = {}; - obj.upgraded_consensus_state = message.upgradedConsensusState ? Any.toAmino(message.upgradedConsensusState) : undefined; - return obj; - }, - fromAminoMsg(object: QueryUpgradedConsensusStateResponseAminoMsg): QueryUpgradedConsensusStateResponse { - return QueryUpgradedConsensusStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryUpgradedConsensusStateResponse", - value: QueryUpgradedConsensusStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUpgradedConsensusStateResponseProtoMsg): QueryUpgradedConsensusStateResponse { - return QueryUpgradedConsensusStateResponse.decode(message.value); - }, - toProto(message: QueryUpgradedConsensusStateResponse): Uint8Array { - return QueryUpgradedConsensusStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUpgradedConsensusStateResponse): QueryUpgradedConsensusStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.QueryUpgradedConsensusStateResponse", - value: QueryUpgradedConsensusStateResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.amino.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.amino.ts deleted file mode 100644 index a3cd3860..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.amino.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour } from "./tx"; -export const AminoConverter = { - "/ibc.core.client.v1.MsgCreateClient": { - aminoType: "cosmos-sdk/MsgCreateClient", - toAmino: MsgCreateClient.toAmino, - fromAmino: MsgCreateClient.fromAmino - }, - "/ibc.core.client.v1.MsgUpdateClient": { - aminoType: "cosmos-sdk/MsgUpdateClient", - toAmino: MsgUpdateClient.toAmino, - fromAmino: MsgUpdateClient.fromAmino - }, - "/ibc.core.client.v1.MsgUpgradeClient": { - aminoType: "cosmos-sdk/MsgUpgradeClient", - toAmino: MsgUpgradeClient.toAmino, - fromAmino: MsgUpgradeClient.fromAmino - }, - "/ibc.core.client.v1.MsgSubmitMisbehaviour": { - aminoType: "cosmos-sdk/MsgSubmitMisbehaviour", - toAmino: MsgSubmitMisbehaviour.toAmino, - fromAmino: MsgSubmitMisbehaviour.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.registry.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.registry.ts deleted file mode 100644 index ae7f9dd2..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.registry.ts +++ /dev/null @@ -1,141 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/ibc.core.client.v1.MsgCreateClient", MsgCreateClient], ["/ibc.core.client.v1.MsgUpdateClient", MsgUpdateClient], ["/ibc.core.client.v1.MsgUpgradeClient", MsgUpgradeClient], ["/ibc.core.client.v1.MsgSubmitMisbehaviour", MsgSubmitMisbehaviour]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createClient(value: MsgCreateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - value: MsgCreateClient.encode(value).finish() - }; - }, - updateClient(value: MsgUpdateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - value: MsgUpdateClient.encode(value).finish() - }; - }, - upgradeClient(value: MsgUpgradeClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - value: MsgUpgradeClient.encode(value).finish() - }; - }, - submitMisbehaviour(value: MsgSubmitMisbehaviour) { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - value: MsgSubmitMisbehaviour.encode(value).finish() - }; - } - }, - withTypeUrl: { - createClient(value: MsgCreateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - value - }; - }, - updateClient(value: MsgUpdateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - value - }; - }, - upgradeClient(value: MsgUpgradeClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - value - }; - }, - submitMisbehaviour(value: MsgSubmitMisbehaviour) { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - value - }; - } - }, - toJSON: { - createClient(value: MsgCreateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - value: MsgCreateClient.toJSON(value) - }; - }, - updateClient(value: MsgUpdateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - value: MsgUpdateClient.toJSON(value) - }; - }, - upgradeClient(value: MsgUpgradeClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - value: MsgUpgradeClient.toJSON(value) - }; - }, - submitMisbehaviour(value: MsgSubmitMisbehaviour) { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - value: MsgSubmitMisbehaviour.toJSON(value) - }; - } - }, - fromJSON: { - createClient(value: any) { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - value: MsgCreateClient.fromJSON(value) - }; - }, - updateClient(value: any) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - value: MsgUpdateClient.fromJSON(value) - }; - }, - upgradeClient(value: any) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - value: MsgUpgradeClient.fromJSON(value) - }; - }, - submitMisbehaviour(value: any) { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - value: MsgSubmitMisbehaviour.fromJSON(value) - }; - } - }, - fromPartial: { - createClient(value: MsgCreateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - value: MsgCreateClient.fromPartial(value) - }; - }, - updateClient(value: MsgUpdateClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - value: MsgUpdateClient.fromPartial(value) - }; - }, - upgradeClient(value: MsgUpgradeClient) { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - value: MsgUpgradeClient.fromPartial(value) - }; - }, - submitMisbehaviour(value: MsgSubmitMisbehaviour) { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - value: MsgSubmitMisbehaviour.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts deleted file mode 100644 index 29890ac8..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { MsgCreateClient, MsgCreateClientResponse, MsgUpdateClient, MsgUpdateClientResponse, MsgUpgradeClient, MsgUpgradeClientResponse, MsgSubmitMisbehaviour, MsgSubmitMisbehaviourResponse } from "./tx"; -/** Msg defines the ibc/client Msg service. */ -export interface Msg { - /** CreateClient defines a rpc handler method for MsgCreateClient. */ - createClient(request: MsgCreateClient): Promise; - /** UpdateClient defines a rpc handler method for MsgUpdateClient. */ - updateClient(request: MsgUpdateClient): Promise; - /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ - upgradeClient(request: MsgUpgradeClient): Promise; - /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ - submitMisbehaviour(request: MsgSubmitMisbehaviour): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createClient = this.createClient.bind(this); - this.updateClient = this.updateClient.bind(this); - this.upgradeClient = this.upgradeClient.bind(this); - this.submitMisbehaviour = this.submitMisbehaviour.bind(this); - } - createClient(request: MsgCreateClient): Promise { - const data = MsgCreateClient.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "CreateClient", data); - return promise.then(data => MsgCreateClientResponse.decode(new BinaryReader(data))); - } - updateClient(request: MsgUpdateClient): Promise { - const data = MsgUpdateClient.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "UpdateClient", data); - return promise.then(data => MsgUpdateClientResponse.decode(new BinaryReader(data))); - } - upgradeClient(request: MsgUpgradeClient): Promise { - const data = MsgUpgradeClient.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "UpgradeClient", data); - return promise.then(data => MsgUpgradeClientResponse.decode(new BinaryReader(data))); - } - submitMisbehaviour(request: MsgSubmitMisbehaviour): Promise { - const data = MsgSubmitMisbehaviour.encode(request).finish(); - const promise = this.rpc.request("ibc.core.client.v1.Msg", "SubmitMisbehaviour", data); - return promise.then(data => MsgSubmitMisbehaviourResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.ts b/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.ts deleted file mode 100644 index 2b7bb6ac..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/client/v1/tx.ts +++ /dev/null @@ -1,1036 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** MsgCreateClient defines a message to create an IBC client */ -export interface MsgCreateClient { - /** light client state */ - clientState: Any | undefined; - /** - * consensus state associated with the client that corresponds to a given - * height. - */ - consensusState: Any | undefined; - /** signer address */ - signer: string; -} -export interface MsgCreateClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgCreateClient"; - value: Uint8Array; -} -/** MsgCreateClient defines a message to create an IBC client */ -export interface MsgCreateClientAmino { - /** light client state */ - client_state?: AnyAmino | undefined; - /** - * consensus state associated with the client that corresponds to a given - * height. - */ - consensus_state?: AnyAmino | undefined; - /** signer address */ - signer: string; -} -export interface MsgCreateClientAminoMsg { - type: "cosmos-sdk/MsgCreateClient"; - value: MsgCreateClientAmino; -} -/** MsgCreateClient defines a message to create an IBC client */ -export interface MsgCreateClientSDKType { - client_state: AnySDKType | undefined; - consensus_state: AnySDKType | undefined; - signer: string; -} -/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponse {} -export interface MsgCreateClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse"; - value: Uint8Array; -} -/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponseAmino {} -export interface MsgCreateClientResponseAminoMsg { - type: "cosmos-sdk/MsgCreateClientResponse"; - value: MsgCreateClientResponseAmino; -} -/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponseSDKType {} -/** - * MsgUpdateClient defines an sdk.Msg to update a IBC client state using - * the given header. - */ -export interface MsgUpdateClient { - /** client unique identifier */ - clientId: string; - /** header to update the light client */ - header: Any | undefined; - /** signer address */ - signer: string; -} -export interface MsgUpdateClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient"; - value: Uint8Array; -} -/** - * MsgUpdateClient defines an sdk.Msg to update a IBC client state using - * the given header. - */ -export interface MsgUpdateClientAmino { - /** client unique identifier */ - client_id: string; - /** header to update the light client */ - header?: AnyAmino | undefined; - /** signer address */ - signer: string; -} -export interface MsgUpdateClientAminoMsg { - type: "cosmos-sdk/MsgUpdateClient"; - value: MsgUpdateClientAmino; -} -/** - * MsgUpdateClient defines an sdk.Msg to update a IBC client state using - * the given header. - */ -export interface MsgUpdateClientSDKType { - client_id: string; - header: AnySDKType | undefined; - signer: string; -} -/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponse {} -export interface MsgUpdateClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse"; - value: Uint8Array; -} -/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponseAmino {} -export interface MsgUpdateClientResponseAminoMsg { - type: "cosmos-sdk/MsgUpdateClientResponse"; - value: MsgUpdateClientResponseAmino; -} -/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponseSDKType {} -/** - * MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client - * state - */ -export interface MsgUpgradeClient { - /** client unique identifier */ - clientId: string; - /** upgraded client state */ - clientState: Any | undefined; - /** - * upgraded consensus state, only contains enough information to serve as a - * basis of trust in update logic - */ - consensusState: Any | undefined; - /** proof that old chain committed to new client */ - proofUpgradeClient: Uint8Array; - /** proof that old chain committed to new consensus state */ - proofUpgradeConsensusState: Uint8Array; - /** signer address */ - signer: string; -} -export interface MsgUpgradeClientProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient"; - value: Uint8Array; -} -/** - * MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client - * state - */ -export interface MsgUpgradeClientAmino { - /** client unique identifier */ - client_id: string; - /** upgraded client state */ - client_state?: AnyAmino | undefined; - /** - * upgraded consensus state, only contains enough information to serve as a - * basis of trust in update logic - */ - consensus_state?: AnyAmino | undefined; - /** proof that old chain committed to new client */ - proof_upgrade_client: Uint8Array; - /** proof that old chain committed to new consensus state */ - proof_upgrade_consensus_state: Uint8Array; - /** signer address */ - signer: string; -} -export interface MsgUpgradeClientAminoMsg { - type: "cosmos-sdk/MsgUpgradeClient"; - value: MsgUpgradeClientAmino; -} -/** - * MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client - * state - */ -export interface MsgUpgradeClientSDKType { - client_id: string; - client_state: AnySDKType | undefined; - consensus_state: AnySDKType | undefined; - proof_upgrade_client: Uint8Array; - proof_upgrade_consensus_state: Uint8Array; - signer: string; -} -/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ -export interface MsgUpgradeClientResponse {} -export interface MsgUpgradeClientResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse"; - value: Uint8Array; -} -/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ -export interface MsgUpgradeClientResponseAmino {} -export interface MsgUpgradeClientResponseAminoMsg { - type: "cosmos-sdk/MsgUpgradeClientResponse"; - value: MsgUpgradeClientResponseAmino; -} -/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ -export interface MsgUpgradeClientResponseSDKType {} -/** - * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for - * light client misbehaviour. - */ -export interface MsgSubmitMisbehaviour { - /** client unique identifier */ - clientId: string; - /** misbehaviour used for freezing the light client */ - misbehaviour: Any | undefined; - /** signer address */ - signer: string; -} -export interface MsgSubmitMisbehaviourProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour"; - value: Uint8Array; -} -/** - * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for - * light client misbehaviour. - */ -export interface MsgSubmitMisbehaviourAmino { - /** client unique identifier */ - client_id: string; - /** misbehaviour used for freezing the light client */ - misbehaviour?: AnyAmino | undefined; - /** signer address */ - signer: string; -} -export interface MsgSubmitMisbehaviourAminoMsg { - type: "cosmos-sdk/MsgSubmitMisbehaviour"; - value: MsgSubmitMisbehaviourAmino; -} -/** - * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for - * light client misbehaviour. - */ -export interface MsgSubmitMisbehaviourSDKType { - client_id: string; - misbehaviour: AnySDKType | undefined; - signer: string; -} -/** - * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response - * type. - */ -export interface MsgSubmitMisbehaviourResponse {} -export interface MsgSubmitMisbehaviourResponseProtoMsg { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse"; - value: Uint8Array; -} -/** - * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response - * type. - */ -export interface MsgSubmitMisbehaviourResponseAmino {} -export interface MsgSubmitMisbehaviourResponseAminoMsg { - type: "cosmos-sdk/MsgSubmitMisbehaviourResponse"; - value: MsgSubmitMisbehaviourResponseAmino; -} -/** - * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response - * type. - */ -export interface MsgSubmitMisbehaviourResponseSDKType {} -function createBaseMsgCreateClient(): MsgCreateClient { - return { - clientState: Any.fromPartial({}), - consensusState: Any.fromPartial({}), - signer: "" - }; -} -export const MsgCreateClient = { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - aminoType: "cosmos-sdk/MsgCreateClient", - encode(message: MsgCreateClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateClient { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateClient(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateClient { - return { - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgCreateClient): unknown { - const obj: any = {}; - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateClient { - const message = createBaseMsgCreateClient(); - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgCreateClientSDKType): MsgCreateClient { - return { - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined, - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgCreateClient): MsgCreateClientSDKType { - const obj: any = {}; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgCreateClientAmino): MsgCreateClient { - return { - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined, - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgCreateClient): MsgCreateClientAmino { - const obj: any = {}; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgCreateClientAminoMsg): MsgCreateClient { - return MsgCreateClient.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateClient): MsgCreateClientAminoMsg { - return { - type: "cosmos-sdk/MsgCreateClient", - value: MsgCreateClient.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateClientProtoMsg): MsgCreateClient { - return MsgCreateClient.decode(message.value); - }, - toProto(message: MsgCreateClient): Uint8Array { - return MsgCreateClient.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateClient): MsgCreateClientProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClient", - value: MsgCreateClient.encode(message).finish() - }; - } -}; -function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { - return {}; -} -export const MsgCreateClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", - aminoType: "cosmos-sdk/MsgCreateClientResponse", - encode(_: MsgCreateClientResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateClientResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateClientResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCreateClientResponse { - return {}; - }, - toJSON(_: MsgCreateClientResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCreateClientResponse { - const message = createBaseMsgCreateClientResponse(); - return message; - }, - fromSDK(_: MsgCreateClientResponseSDKType): MsgCreateClientResponse { - return {}; - }, - toSDK(_: MsgCreateClientResponse): MsgCreateClientResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCreateClientResponseAmino): MsgCreateClientResponse { - return {}; - }, - toAmino(_: MsgCreateClientResponse): MsgCreateClientResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCreateClientResponseAminoMsg): MsgCreateClientResponse { - return MsgCreateClientResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateClientResponse): MsgCreateClientResponseAminoMsg { - return { - type: "cosmos-sdk/MsgCreateClientResponse", - value: MsgCreateClientResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateClientResponseProtoMsg): MsgCreateClientResponse { - return MsgCreateClientResponse.decode(message.value); - }, - toProto(message: MsgCreateClientResponse): Uint8Array { - return MsgCreateClientResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateClientResponse): MsgCreateClientResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgCreateClientResponse", - value: MsgCreateClientResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateClient(): MsgUpdateClient { - return { - clientId: "", - header: Any.fromPartial({}), - signer: "" - }; -} -export const MsgUpdateClient = { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - aminoType: "cosmos-sdk/MsgUpdateClient", - encode(message: MsgUpdateClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.header !== undefined) { - Any.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateClient { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateClient(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.header = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpdateClient { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - header: isSet(object.header) ? Any.fromJSON(object.header) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgUpdateClient): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header !== undefined && (obj.header = message.header ? Any.toJSON(message.header) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpdateClient { - const message = createBaseMsgUpdateClient(); - message.clientId = object.clientId ?? ""; - message.header = object.header !== undefined && object.header !== null ? Any.fromPartial(object.header) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgUpdateClientSDKType): MsgUpdateClient { - return { - clientId: object?.client_id, - header: object.header ? Any.fromSDK(object.header) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgUpdateClient): MsgUpdateClientSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.header !== undefined && (obj.header = message.header ? Any.toSDK(message.header) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgUpdateClientAmino): MsgUpdateClient { - return { - clientId: object.client_id, - header: object?.header ? Any.fromAmino(object.header) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgUpdateClient): MsgUpdateClientAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.header = message.header ? Any.toAmino(message.header) : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgUpdateClientAminoMsg): MsgUpdateClient { - return MsgUpdateClient.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateClient): MsgUpdateClientAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateClient", - value: MsgUpdateClient.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateClientProtoMsg): MsgUpdateClient { - return MsgUpdateClient.decode(message.value); - }, - toProto(message: MsgUpdateClient): Uint8Array { - return MsgUpdateClient.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateClient): MsgUpdateClientProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClient", - value: MsgUpdateClient.encode(message).finish() - }; - } -}; -function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { - return {}; -} -export const MsgUpdateClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", - aminoType: "cosmos-sdk/MsgUpdateClientResponse", - encode(_: MsgUpdateClientResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateClientResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateClientResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpdateClientResponse { - return {}; - }, - toJSON(_: MsgUpdateClientResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpdateClientResponse { - const message = createBaseMsgUpdateClientResponse(); - return message; - }, - fromSDK(_: MsgUpdateClientResponseSDKType): MsgUpdateClientResponse { - return {}; - }, - toSDK(_: MsgUpdateClientResponse): MsgUpdateClientResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpdateClientResponseAmino): MsgUpdateClientResponse { - return {}; - }, - toAmino(_: MsgUpdateClientResponse): MsgUpdateClientResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpdateClientResponseAminoMsg): MsgUpdateClientResponse { - return MsgUpdateClientResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpdateClientResponse): MsgUpdateClientResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpdateClientResponse", - value: MsgUpdateClientResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpdateClientResponseProtoMsg): MsgUpdateClientResponse { - return MsgUpdateClientResponse.decode(message.value); - }, - toProto(message: MsgUpdateClientResponse): Uint8Array { - return MsgUpdateClientResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpdateClientResponse): MsgUpdateClientResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgUpdateClientResponse", - value: MsgUpdateClientResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUpgradeClient(): MsgUpgradeClient { - return { - clientId: "", - clientState: Any.fromPartial({}), - consensusState: Any.fromPartial({}), - proofUpgradeClient: new Uint8Array(), - proofUpgradeConsensusState: new Uint8Array(), - signer: "" - }; -} -export const MsgUpgradeClient = { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - aminoType: "cosmos-sdk/MsgUpgradeClient", - encode(message: MsgUpgradeClient, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); - } - if (message.proofUpgradeClient.length !== 0) { - writer.uint32(34).bytes(message.proofUpgradeClient); - } - if (message.proofUpgradeConsensusState.length !== 0) { - writer.uint32(42).bytes(message.proofUpgradeConsensusState); - } - if (message.signer !== "") { - writer.uint32(50).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpgradeClient { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpgradeClient(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.proofUpgradeClient = reader.bytes(); - break; - case 5: - message.proofUpgradeConsensusState = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUpgradeClient { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined, - proofUpgradeClient: isSet(object.proofUpgradeClient) ? bytesFromBase64(object.proofUpgradeClient) : new Uint8Array(), - proofUpgradeConsensusState: isSet(object.proofUpgradeConsensusState) ? bytesFromBase64(object.proofUpgradeConsensusState) : new Uint8Array(), - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgUpgradeClient): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - message.proofUpgradeClient !== undefined && (obj.proofUpgradeClient = base64FromBytes(message.proofUpgradeClient !== undefined ? message.proofUpgradeClient : new Uint8Array())); - message.proofUpgradeConsensusState !== undefined && (obj.proofUpgradeConsensusState = base64FromBytes(message.proofUpgradeConsensusState !== undefined ? message.proofUpgradeConsensusState : new Uint8Array())); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgUpgradeClient { - const message = createBaseMsgUpgradeClient(); - message.clientId = object.clientId ?? ""; - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - message.proofUpgradeClient = object.proofUpgradeClient ?? new Uint8Array(); - message.proofUpgradeConsensusState = object.proofUpgradeConsensusState ?? new Uint8Array(); - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgUpgradeClientSDKType): MsgUpgradeClient { - return { - clientId: object?.client_id, - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined, - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined, - proofUpgradeClient: object?.proof_upgrade_client, - proofUpgradeConsensusState: object?.proof_upgrade_consensus_state, - signer: object?.signer - }; - }, - toSDK(message: MsgUpgradeClient): MsgUpgradeClientSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - obj.proof_upgrade_client = message.proofUpgradeClient; - obj.proof_upgrade_consensus_state = message.proofUpgradeConsensusState; - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgUpgradeClientAmino): MsgUpgradeClient { - return { - clientId: object.client_id, - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined, - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined, - proofUpgradeClient: object.proof_upgrade_client, - proofUpgradeConsensusState: object.proof_upgrade_consensus_state, - signer: object.signer - }; - }, - toAmino(message: MsgUpgradeClient): MsgUpgradeClientAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - obj.proof_upgrade_client = message.proofUpgradeClient; - obj.proof_upgrade_consensus_state = message.proofUpgradeConsensusState; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgUpgradeClientAminoMsg): MsgUpgradeClient { - return MsgUpgradeClient.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpgradeClient): MsgUpgradeClientAminoMsg { - return { - type: "cosmos-sdk/MsgUpgradeClient", - value: MsgUpgradeClient.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpgradeClientProtoMsg): MsgUpgradeClient { - return MsgUpgradeClient.decode(message.value); - }, - toProto(message: MsgUpgradeClient): Uint8Array { - return MsgUpgradeClient.encode(message).finish(); - }, - toProtoMsg(message: MsgUpgradeClient): MsgUpgradeClientProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClient", - value: MsgUpgradeClient.encode(message).finish() - }; - } -}; -function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { - return {}; -} -export const MsgUpgradeClientResponse = { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", - aminoType: "cosmos-sdk/MsgUpgradeClientResponse", - encode(_: MsgUpgradeClientResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUpgradeClientResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpgradeClientResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgUpgradeClientResponse { - return {}; - }, - toJSON(_: MsgUpgradeClientResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgUpgradeClientResponse { - const message = createBaseMsgUpgradeClientResponse(); - return message; - }, - fromSDK(_: MsgUpgradeClientResponseSDKType): MsgUpgradeClientResponse { - return {}; - }, - toSDK(_: MsgUpgradeClientResponse): MsgUpgradeClientResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgUpgradeClientResponseAmino): MsgUpgradeClientResponse { - return {}; - }, - toAmino(_: MsgUpgradeClientResponse): MsgUpgradeClientResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgUpgradeClientResponseAminoMsg): MsgUpgradeClientResponse { - return MsgUpgradeClientResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUpgradeClientResponse): MsgUpgradeClientResponseAminoMsg { - return { - type: "cosmos-sdk/MsgUpgradeClientResponse", - value: MsgUpgradeClientResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUpgradeClientResponseProtoMsg): MsgUpgradeClientResponse { - return MsgUpgradeClientResponse.decode(message.value); - }, - toProto(message: MsgUpgradeClientResponse): Uint8Array { - return MsgUpgradeClientResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUpgradeClientResponse): MsgUpgradeClientResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgUpgradeClientResponse", - value: MsgUpgradeClientResponse.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { - return { - clientId: "", - misbehaviour: Any.fromPartial({}), - signer: "" - }; -} -export const MsgSubmitMisbehaviour = { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - aminoType: "cosmos-sdk/MsgSubmitMisbehaviour", - encode(message: MsgSubmitMisbehaviour, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.misbehaviour !== undefined) { - Any.encode(message.misbehaviour, writer.uint32(18).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(26).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitMisbehaviour { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitMisbehaviour(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.misbehaviour = Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSubmitMisbehaviour { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - misbehaviour: isSet(object.misbehaviour) ? Any.fromJSON(object.misbehaviour) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgSubmitMisbehaviour): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.misbehaviour !== undefined && (obj.misbehaviour = message.misbehaviour ? Any.toJSON(message.misbehaviour) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgSubmitMisbehaviour { - const message = createBaseMsgSubmitMisbehaviour(); - message.clientId = object.clientId ?? ""; - message.misbehaviour = object.misbehaviour !== undefined && object.misbehaviour !== null ? Any.fromPartial(object.misbehaviour) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgSubmitMisbehaviourSDKType): MsgSubmitMisbehaviour { - return { - clientId: object?.client_id, - misbehaviour: object.misbehaviour ? Any.fromSDK(object.misbehaviour) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.misbehaviour !== undefined && (obj.misbehaviour = message.misbehaviour ? Any.toSDK(message.misbehaviour) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgSubmitMisbehaviourAmino): MsgSubmitMisbehaviour { - return { - clientId: object.client_id, - misbehaviour: object?.misbehaviour ? Any.fromAmino(object.misbehaviour) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.misbehaviour = message.misbehaviour ? Any.toAmino(message.misbehaviour) : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgSubmitMisbehaviourAminoMsg): MsgSubmitMisbehaviour { - return MsgSubmitMisbehaviour.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitMisbehaviour", - value: MsgSubmitMisbehaviour.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitMisbehaviourProtoMsg): MsgSubmitMisbehaviour { - return MsgSubmitMisbehaviour.decode(message.value); - }, - toProto(message: MsgSubmitMisbehaviour): Uint8Array { - return MsgSubmitMisbehaviour.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviour", - value: MsgSubmitMisbehaviour.encode(message).finish() - }; - } -}; -function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse { - return {}; -} -export const MsgSubmitMisbehaviourResponse = { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", - aminoType: "cosmos-sdk/MsgSubmitMisbehaviourResponse", - encode(_: MsgSubmitMisbehaviourResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitMisbehaviourResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitMisbehaviourResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSubmitMisbehaviourResponse { - return {}; - }, - toJSON(_: MsgSubmitMisbehaviourResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSubmitMisbehaviourResponse { - const message = createBaseMsgSubmitMisbehaviourResponse(); - return message; - }, - fromSDK(_: MsgSubmitMisbehaviourResponseSDKType): MsgSubmitMisbehaviourResponse { - return {}; - }, - toSDK(_: MsgSubmitMisbehaviourResponse): MsgSubmitMisbehaviourResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSubmitMisbehaviourResponseAmino): MsgSubmitMisbehaviourResponse { - return {}; - }, - toAmino(_: MsgSubmitMisbehaviourResponse): MsgSubmitMisbehaviourResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSubmitMisbehaviourResponseAminoMsg): MsgSubmitMisbehaviourResponse { - return MsgSubmitMisbehaviourResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSubmitMisbehaviourResponse): MsgSubmitMisbehaviourResponseAminoMsg { - return { - type: "cosmos-sdk/MsgSubmitMisbehaviourResponse", - value: MsgSubmitMisbehaviourResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSubmitMisbehaviourResponseProtoMsg): MsgSubmitMisbehaviourResponse { - return MsgSubmitMisbehaviourResponse.decode(message.value); - }, - toProto(message: MsgSubmitMisbehaviourResponse): Uint8Array { - return MsgSubmitMisbehaviourResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSubmitMisbehaviourResponse): MsgSubmitMisbehaviourResponseProtoMsg { - return { - typeUrl: "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse", - value: MsgSubmitMisbehaviourResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/commitment/v1/commitment.ts b/examples/interchainjs/src/codegen/ibc/core/commitment/v1/commitment.ts deleted file mode 100644 index 5f1c2158..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/commitment/v1/commitment.ts +++ /dev/null @@ -1,510 +0,0 @@ -import { CommitmentProof, CommitmentProofAmino, CommitmentProofSDKType } from "../../../../confio/proofs"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; -/** - * MerkleRoot defines a merkle root hash. - * In the Cosmos SDK, the AppHash of a block header becomes the root. - */ -export interface MerkleRoot { - hash: Uint8Array; -} -export interface MerkleRootProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerkleRoot"; - value: Uint8Array; -} -/** - * MerkleRoot defines a merkle root hash. - * In the Cosmos SDK, the AppHash of a block header becomes the root. - */ -export interface MerkleRootAmino { - hash: Uint8Array; -} -export interface MerkleRootAminoMsg { - type: "cosmos-sdk/MerkleRoot"; - value: MerkleRootAmino; -} -/** - * MerkleRoot defines a merkle root hash. - * In the Cosmos SDK, the AppHash of a block header becomes the root. - */ -export interface MerkleRootSDKType { - hash: Uint8Array; -} -/** - * MerklePrefix is merkle path prefixed to the key. - * The constructed key from the Path and the key will be append(Path.KeyPath, - * append(Path.KeyPrefix, key...)) - */ -export interface MerklePrefix { - keyPrefix: Uint8Array; -} -export interface MerklePrefixProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerklePrefix"; - value: Uint8Array; -} -/** - * MerklePrefix is merkle path prefixed to the key. - * The constructed key from the Path and the key will be append(Path.KeyPath, - * append(Path.KeyPrefix, key...)) - */ -export interface MerklePrefixAmino { - key_prefix: Uint8Array; -} -export interface MerklePrefixAminoMsg { - type: "cosmos-sdk/MerklePrefix"; - value: MerklePrefixAmino; -} -/** - * MerklePrefix is merkle path prefixed to the key. - * The constructed key from the Path and the key will be append(Path.KeyPath, - * append(Path.KeyPrefix, key...)) - */ -export interface MerklePrefixSDKType { - key_prefix: Uint8Array; -} -/** - * MerklePath is the path used to verify commitment proofs, which can be an - * arbitrary structured object (defined by a commitment type). - * MerklePath is represented from root-to-leaf - */ -export interface MerklePath { - keyPath: string[]; -} -export interface MerklePathProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerklePath"; - value: Uint8Array; -} -/** - * MerklePath is the path used to verify commitment proofs, which can be an - * arbitrary structured object (defined by a commitment type). - * MerklePath is represented from root-to-leaf - */ -export interface MerklePathAmino { - key_path: string[]; -} -export interface MerklePathAminoMsg { - type: "cosmos-sdk/MerklePath"; - value: MerklePathAmino; -} -/** - * MerklePath is the path used to verify commitment proofs, which can be an - * arbitrary structured object (defined by a commitment type). - * MerklePath is represented from root-to-leaf - */ -export interface MerklePathSDKType { - key_path: string[]; -} -/** - * MerkleProof is a wrapper type over a chain of CommitmentProofs. - * It demonstrates membership or non-membership for an element or set of - * elements, verifiable in conjunction with a known commitment root. Proofs - * should be succinct. - * MerkleProofs are ordered from leaf-to-root - */ -export interface MerkleProof { - proofs: CommitmentProof[]; -} -export interface MerkleProofProtoMsg { - typeUrl: "/ibc.core.commitment.v1.MerkleProof"; - value: Uint8Array; -} -/** - * MerkleProof is a wrapper type over a chain of CommitmentProofs. - * It demonstrates membership or non-membership for an element or set of - * elements, verifiable in conjunction with a known commitment root. Proofs - * should be succinct. - * MerkleProofs are ordered from leaf-to-root - */ -export interface MerkleProofAmino { - proofs: CommitmentProofAmino[]; -} -export interface MerkleProofAminoMsg { - type: "cosmos-sdk/MerkleProof"; - value: MerkleProofAmino; -} -/** - * MerkleProof is a wrapper type over a chain of CommitmentProofs. - * It demonstrates membership or non-membership for an element or set of - * elements, verifiable in conjunction with a known commitment root. Proofs - * should be succinct. - * MerkleProofs are ordered from leaf-to-root - */ -export interface MerkleProofSDKType { - proofs: CommitmentProofSDKType[]; -} -function createBaseMerkleRoot(): MerkleRoot { - return { - hash: new Uint8Array() - }; -} -export const MerkleRoot = { - typeUrl: "/ibc.core.commitment.v1.MerkleRoot", - aminoType: "cosmos-sdk/MerkleRoot", - encode(message: MerkleRoot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MerkleRoot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMerkleRoot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MerkleRoot { - return { - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array() - }; - }, - toJSON(message: MerkleRoot): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MerkleRoot { - const message = createBaseMerkleRoot(); - message.hash = object.hash ?? new Uint8Array(); - return message; - }, - fromSDK(object: MerkleRootSDKType): MerkleRoot { - return { - hash: object?.hash - }; - }, - toSDK(message: MerkleRoot): MerkleRootSDKType { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAmino(object: MerkleRootAmino): MerkleRoot { - return { - hash: object.hash - }; - }, - toAmino(message: MerkleRoot): MerkleRootAmino { - const obj: any = {}; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: MerkleRootAminoMsg): MerkleRoot { - return MerkleRoot.fromAmino(object.value); - }, - toAminoMsg(message: MerkleRoot): MerkleRootAminoMsg { - return { - type: "cosmos-sdk/MerkleRoot", - value: MerkleRoot.toAmino(message) - }; - }, - fromProtoMsg(message: MerkleRootProtoMsg): MerkleRoot { - return MerkleRoot.decode(message.value); - }, - toProto(message: MerkleRoot): Uint8Array { - return MerkleRoot.encode(message).finish(); - }, - toProtoMsg(message: MerkleRoot): MerkleRootProtoMsg { - return { - typeUrl: "/ibc.core.commitment.v1.MerkleRoot", - value: MerkleRoot.encode(message).finish() - }; - } -}; -function createBaseMerklePrefix(): MerklePrefix { - return { - keyPrefix: new Uint8Array() - }; -} -export const MerklePrefix = { - typeUrl: "/ibc.core.commitment.v1.MerklePrefix", - aminoType: "cosmos-sdk/MerklePrefix", - encode(message: MerklePrefix, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.keyPrefix.length !== 0) { - writer.uint32(10).bytes(message.keyPrefix); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MerklePrefix { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMerklePrefix(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyPrefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MerklePrefix { - return { - keyPrefix: isSet(object.keyPrefix) ? bytesFromBase64(object.keyPrefix) : new Uint8Array() - }; - }, - toJSON(message: MerklePrefix): unknown { - const obj: any = {}; - message.keyPrefix !== undefined && (obj.keyPrefix = base64FromBytes(message.keyPrefix !== undefined ? message.keyPrefix : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): MerklePrefix { - const message = createBaseMerklePrefix(); - message.keyPrefix = object.keyPrefix ?? new Uint8Array(); - return message; - }, - fromSDK(object: MerklePrefixSDKType): MerklePrefix { - return { - keyPrefix: object?.key_prefix - }; - }, - toSDK(message: MerklePrefix): MerklePrefixSDKType { - const obj: any = {}; - obj.key_prefix = message.keyPrefix; - return obj; - }, - fromAmino(object: MerklePrefixAmino): MerklePrefix { - return { - keyPrefix: object.key_prefix - }; - }, - toAmino(message: MerklePrefix): MerklePrefixAmino { - const obj: any = {}; - obj.key_prefix = message.keyPrefix; - return obj; - }, - fromAminoMsg(object: MerklePrefixAminoMsg): MerklePrefix { - return MerklePrefix.fromAmino(object.value); - }, - toAminoMsg(message: MerklePrefix): MerklePrefixAminoMsg { - return { - type: "cosmos-sdk/MerklePrefix", - value: MerklePrefix.toAmino(message) - }; - }, - fromProtoMsg(message: MerklePrefixProtoMsg): MerklePrefix { - return MerklePrefix.decode(message.value); - }, - toProto(message: MerklePrefix): Uint8Array { - return MerklePrefix.encode(message).finish(); - }, - toProtoMsg(message: MerklePrefix): MerklePrefixProtoMsg { - return { - typeUrl: "/ibc.core.commitment.v1.MerklePrefix", - value: MerklePrefix.encode(message).finish() - }; - } -}; -function createBaseMerklePath(): MerklePath { - return { - keyPath: [] - }; -} -export const MerklePath = { - typeUrl: "/ibc.core.commitment.v1.MerklePath", - aminoType: "cosmos-sdk/MerklePath", - encode(message: MerklePath, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.keyPath) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MerklePath { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMerklePath(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyPath.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MerklePath { - return { - keyPath: Array.isArray(object?.keyPath) ? object.keyPath.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: MerklePath): unknown { - const obj: any = {}; - if (message.keyPath) { - obj.keyPath = message.keyPath.map(e => e); - } else { - obj.keyPath = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MerklePath { - const message = createBaseMerklePath(); - message.keyPath = object.keyPath?.map(e => e) || []; - return message; - }, - fromSDK(object: MerklePathSDKType): MerklePath { - return { - keyPath: Array.isArray(object?.key_path) ? object.key_path.map((e: any) => e) : [] - }; - }, - toSDK(message: MerklePath): MerklePathSDKType { - const obj: any = {}; - if (message.keyPath) { - obj.key_path = message.keyPath.map(e => e); - } else { - obj.key_path = []; - } - return obj; - }, - fromAmino(object: MerklePathAmino): MerklePath { - return { - keyPath: Array.isArray(object?.key_path) ? object.key_path.map((e: any) => e) : [] - }; - }, - toAmino(message: MerklePath): MerklePathAmino { - const obj: any = {}; - if (message.keyPath) { - obj.key_path = message.keyPath.map(e => e); - } else { - obj.key_path = []; - } - return obj; - }, - fromAminoMsg(object: MerklePathAminoMsg): MerklePath { - return MerklePath.fromAmino(object.value); - }, - toAminoMsg(message: MerklePath): MerklePathAminoMsg { - return { - type: "cosmos-sdk/MerklePath", - value: MerklePath.toAmino(message) - }; - }, - fromProtoMsg(message: MerklePathProtoMsg): MerklePath { - return MerklePath.decode(message.value); - }, - toProto(message: MerklePath): Uint8Array { - return MerklePath.encode(message).finish(); - }, - toProtoMsg(message: MerklePath): MerklePathProtoMsg { - return { - typeUrl: "/ibc.core.commitment.v1.MerklePath", - value: MerklePath.encode(message).finish() - }; - } -}; -function createBaseMerkleProof(): MerkleProof { - return { - proofs: [] - }; -} -export const MerkleProof = { - typeUrl: "/ibc.core.commitment.v1.MerkleProof", - aminoType: "cosmos-sdk/MerkleProof", - encode(message: MerkleProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.proofs) { - CommitmentProof.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MerkleProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMerkleProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proofs.push(CommitmentProof.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MerkleProof { - return { - proofs: Array.isArray(object?.proofs) ? object.proofs.map((e: any) => CommitmentProof.fromJSON(e)) : [] - }; - }, - toJSON(message: MerkleProof): unknown { - const obj: any = {}; - if (message.proofs) { - obj.proofs = message.proofs.map(e => e ? CommitmentProof.toJSON(e) : undefined); - } else { - obj.proofs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MerkleProof { - const message = createBaseMerkleProof(); - message.proofs = object.proofs?.map(e => CommitmentProof.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MerkleProofSDKType): MerkleProof { - return { - proofs: Array.isArray(object?.proofs) ? object.proofs.map((e: any) => CommitmentProof.fromSDK(e)) : [] - }; - }, - toSDK(message: MerkleProof): MerkleProofSDKType { - const obj: any = {}; - if (message.proofs) { - obj.proofs = message.proofs.map(e => e ? CommitmentProof.toSDK(e) : undefined); - } else { - obj.proofs = []; - } - return obj; - }, - fromAmino(object: MerkleProofAmino): MerkleProof { - return { - proofs: Array.isArray(object?.proofs) ? object.proofs.map((e: any) => CommitmentProof.fromAmino(e)) : [] - }; - }, - toAmino(message: MerkleProof): MerkleProofAmino { - const obj: any = {}; - if (message.proofs) { - obj.proofs = message.proofs.map(e => e ? CommitmentProof.toAmino(e) : undefined); - } else { - obj.proofs = []; - } - return obj; - }, - fromAminoMsg(object: MerkleProofAminoMsg): MerkleProof { - return MerkleProof.fromAmino(object.value); - }, - toAminoMsg(message: MerkleProof): MerkleProofAminoMsg { - return { - type: "cosmos-sdk/MerkleProof", - value: MerkleProof.toAmino(message) - }; - }, - fromProtoMsg(message: MerkleProofProtoMsg): MerkleProof { - return MerkleProof.decode(message.value); - }, - toProto(message: MerkleProof): Uint8Array { - return MerkleProof.encode(message).finish(); - }, - toProtoMsg(message: MerkleProof): MerkleProofProtoMsg { - return { - typeUrl: "/ibc.core.commitment.v1.MerkleProof", - value: MerkleProof.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/connection.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/connection.ts deleted file mode 100644 index 036b1457..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/connection.ts +++ /dev/null @@ -1,1208 +0,0 @@ -import { MerklePrefix, MerklePrefixAmino, MerklePrefixSDKType } from "../../commitment/v1/commitment"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * State defines if a connection is in one of the following states: - * INIT, TRYOPEN, OPEN or UNINITIALIZED. - */ -export enum State { - /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */ - STATE_UNINITIALIZED_UNSPECIFIED = 0, - /** STATE_INIT - A connection end has just started the opening handshake. */ - STATE_INIT = 1, - /** - * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty - * chain. - */ - STATE_TRYOPEN = 2, - /** STATE_OPEN - A connection end has completed the handshake. */ - STATE_OPEN = 3, - UNRECOGNIZED = -1, -} -export const StateSDKType = State; -export const StateAmino = State; -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "STATE_UNINITIALIZED_UNSPECIFIED": - return State.STATE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "STATE_INIT": - return State.STATE_INIT; - case 2: - case "STATE_TRYOPEN": - return State.STATE_TRYOPEN; - case 3: - case "STATE_OPEN": - return State.STATE_OPEN; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} -export function stateToJSON(object: State): string { - switch (object) { - case State.STATE_UNINITIALIZED_UNSPECIFIED: - return "STATE_UNINITIALIZED_UNSPECIFIED"; - case State.STATE_INIT: - return "STATE_INIT"; - case State.STATE_TRYOPEN: - return "STATE_TRYOPEN"; - case State.STATE_OPEN: - return "STATE_OPEN"; - case State.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ -export interface ConnectionEnd { - /** client associated with this connection. */ - clientId: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** - * delay period that must pass before a consensus state can be used for - * packet-verification NOTE: delay period logic is only implemented by some - * clients. - */ - delayPeriod: bigint; -} -export interface ConnectionEndProtoMsg { - typeUrl: "/ibc.core.connection.v1.ConnectionEnd"; - value: Uint8Array; -} -/** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ -export interface ConnectionEndAmino { - /** client associated with this connection. */ - client_id: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection. - */ - versions: VersionAmino[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty?: CounterpartyAmino | undefined; - /** - * delay period that must pass before a consensus state can be used for - * packet-verification NOTE: delay period logic is only implemented by some - * clients. - */ - delay_period: string; -} -export interface ConnectionEndAminoMsg { - type: "cosmos-sdk/ConnectionEnd"; - value: ConnectionEndAmino; -} -/** - * ConnectionEnd defines a stateful object on a chain connected to another - * separate one. - * NOTE: there must only be 2 defined ConnectionEnds to establish - * a connection between two chains. - */ -export interface ConnectionEndSDKType { - client_id: string; - versions: VersionSDKType[]; - state: State; - counterparty: CounterpartySDKType | undefined; - delay_period: bigint; -} -/** - * IdentifiedConnection defines a connection with additional connection - * identifier field. - */ -export interface IdentifiedConnection { - /** connection identifier. */ - id: string; - /** client associated with this connection. */ - clientId: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection - */ - versions: Version[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty: Counterparty | undefined; - /** delay period associated with this connection. */ - delayPeriod: bigint; -} -export interface IdentifiedConnectionProtoMsg { - typeUrl: "/ibc.core.connection.v1.IdentifiedConnection"; - value: Uint8Array; -} -/** - * IdentifiedConnection defines a connection with additional connection - * identifier field. - */ -export interface IdentifiedConnectionAmino { - /** connection identifier. */ - id: string; - /** client associated with this connection. */ - client_id: string; - /** - * IBC version which can be utilised to determine encodings or protocols for - * channels or packets utilising this connection - */ - versions: VersionAmino[]; - /** current state of the connection end. */ - state: State; - /** counterparty chain associated with this connection. */ - counterparty?: CounterpartyAmino | undefined; - /** delay period associated with this connection. */ - delay_period: string; -} -export interface IdentifiedConnectionAminoMsg { - type: "cosmos-sdk/IdentifiedConnection"; - value: IdentifiedConnectionAmino; -} -/** - * IdentifiedConnection defines a connection with additional connection - * identifier field. - */ -export interface IdentifiedConnectionSDKType { - id: string; - client_id: string; - versions: VersionSDKType[]; - state: State; - counterparty: CounterpartySDKType | undefined; - delay_period: bigint; -} -/** Counterparty defines the counterparty chain associated with a connection end. */ -export interface Counterparty { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - clientId: string; - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connectionId: string; - /** commitment merkle prefix of the counterparty chain. */ - prefix: MerklePrefix | undefined; -} -export interface CounterpartyProtoMsg { - typeUrl: "/ibc.core.connection.v1.Counterparty"; - value: Uint8Array; -} -/** Counterparty defines the counterparty chain associated with a connection end. */ -export interface CounterpartyAmino { - /** - * identifies the client on the counterparty chain associated with a given - * connection. - */ - client_id: string; - /** - * identifies the connection end on the counterparty chain associated with a - * given connection. - */ - connection_id: string; - /** commitment merkle prefix of the counterparty chain. */ - prefix?: MerklePrefixAmino | undefined; -} -export interface CounterpartyAminoMsg { - type: "cosmos-sdk/Counterparty"; - value: CounterpartyAmino; -} -/** Counterparty defines the counterparty chain associated with a connection end. */ -export interface CounterpartySDKType { - client_id: string; - connection_id: string; - prefix: MerklePrefixSDKType | undefined; -} -/** ClientPaths define all the connection paths for a client state. */ -export interface ClientPaths { - /** list of connection paths */ - paths: string[]; -} -export interface ClientPathsProtoMsg { - typeUrl: "/ibc.core.connection.v1.ClientPaths"; - value: Uint8Array; -} -/** ClientPaths define all the connection paths for a client state. */ -export interface ClientPathsAmino { - /** list of connection paths */ - paths: string[]; -} -export interface ClientPathsAminoMsg { - type: "cosmos-sdk/ClientPaths"; - value: ClientPathsAmino; -} -/** ClientPaths define all the connection paths for a client state. */ -export interface ClientPathsSDKType { - paths: string[]; -} -/** ConnectionPaths define all the connection paths for a given client state. */ -export interface ConnectionPaths { - /** client state unique identifier */ - clientId: string; - /** list of connection paths */ - paths: string[]; -} -export interface ConnectionPathsProtoMsg { - typeUrl: "/ibc.core.connection.v1.ConnectionPaths"; - value: Uint8Array; -} -/** ConnectionPaths define all the connection paths for a given client state. */ -export interface ConnectionPathsAmino { - /** client state unique identifier */ - client_id: string; - /** list of connection paths */ - paths: string[]; -} -export interface ConnectionPathsAminoMsg { - type: "cosmos-sdk/ConnectionPaths"; - value: ConnectionPathsAmino; -} -/** ConnectionPaths define all the connection paths for a given client state. */ -export interface ConnectionPathsSDKType { - client_id: string; - paths: string[]; -} -/** - * Version defines the versioning scheme used to negotiate the IBC verison in - * the connection handshake. - */ -export interface Version { - /** unique version identifier */ - identifier: string; - /** list of features compatible with the specified identifier */ - features: string[]; -} -export interface VersionProtoMsg { - typeUrl: "/ibc.core.connection.v1.Version"; - value: Uint8Array; -} -/** - * Version defines the versioning scheme used to negotiate the IBC verison in - * the connection handshake. - */ -export interface VersionAmino { - /** unique version identifier */ - identifier: string; - /** list of features compatible with the specified identifier */ - features: string[]; -} -export interface VersionAminoMsg { - type: "cosmos-sdk/Version"; - value: VersionAmino; -} -/** - * Version defines the versioning scheme used to negotiate the IBC verison in - * the connection handshake. - */ -export interface VersionSDKType { - identifier: string; - features: string[]; -} -/** Params defines the set of Connection parameters. */ -export interface Params { - /** - * maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - * largest amount of time that the chain might reasonably take to produce the next block under normal operating - * conditions. A safe choice is 3-5x the expected time per block. - */ - maxExpectedTimePerBlock: bigint; -} -export interface ParamsProtoMsg { - typeUrl: "/ibc.core.connection.v1.Params"; - value: Uint8Array; -} -/** Params defines the set of Connection parameters. */ -export interface ParamsAmino { - /** - * maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - * largest amount of time that the chain might reasonably take to produce the next block under normal operating - * conditions. A safe choice is 3-5x the expected time per block. - */ - max_expected_time_per_block: string; -} -export interface ParamsAminoMsg { - type: "cosmos-sdk/Params"; - value: ParamsAmino; -} -/** Params defines the set of Connection parameters. */ -export interface ParamsSDKType { - max_expected_time_per_block: bigint; -} -function createBaseConnectionEnd(): ConnectionEnd { - return { - clientId: "", - versions: [], - state: 0, - counterparty: Counterparty.fromPartial({}), - delayPeriod: BigInt(0) - }; -} -export const ConnectionEnd = { - typeUrl: "/ibc.core.connection.v1.ConnectionEnd", - aminoType: "cosmos-sdk/ConnectionEnd", - encode(message: ConnectionEnd, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.versions) { - Version.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(24).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(34).fork()).ldelim(); - } - if (message.delayPeriod !== BigInt(0)) { - writer.uint32(40).uint64(message.delayPeriod); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConnectionEnd { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConnectionEnd(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = (reader.int32() as any); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConnectionEnd { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromJSON(e)) : [], - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? BigInt(object.delayPeriod.toString()) : BigInt(0) - }; - }, - toJSON(message: ConnectionEnd): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.versions) { - obj.versions = message.versions.map(e => e ? Version.toJSON(e) : undefined); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ConnectionEnd { - const message = createBaseConnectionEnd(); - message.clientId = object.clientId ?? ""; - message.versions = object.versions?.map(e => Version.fromPartial(e)) || []; - message.state = object.state ?? 0; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.delayPeriod = object.delayPeriod !== undefined && object.delayPeriod !== null ? BigInt(object.delayPeriod.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ConnectionEndSDKType): ConnectionEnd { - return { - clientId: object?.client_id, - versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromSDK(e)) : [], - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - delayPeriod: object?.delay_period - }; - }, - toSDK(message: ConnectionEnd): ConnectionEndSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.versions) { - obj.versions = message.versions.map(e => e ? Version.toSDK(e) : undefined); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - obj.delay_period = message.delayPeriod; - return obj; - }, - fromAmino(object: ConnectionEndAmino): ConnectionEnd { - return { - clientId: object.client_id, - versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromAmino(e)) : [], - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - delayPeriod: BigInt(object.delay_period) - }; - }, - toAmino(message: ConnectionEnd): ConnectionEndAmino { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.versions) { - obj.versions = message.versions.map(e => e ? Version.toAmino(e) : undefined); - } else { - obj.versions = []; - } - obj.state = message.state; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ConnectionEndAminoMsg): ConnectionEnd { - return ConnectionEnd.fromAmino(object.value); - }, - toAminoMsg(message: ConnectionEnd): ConnectionEndAminoMsg { - return { - type: "cosmos-sdk/ConnectionEnd", - value: ConnectionEnd.toAmino(message) - }; - }, - fromProtoMsg(message: ConnectionEndProtoMsg): ConnectionEnd { - return ConnectionEnd.decode(message.value); - }, - toProto(message: ConnectionEnd): Uint8Array { - return ConnectionEnd.encode(message).finish(); - }, - toProtoMsg(message: ConnectionEnd): ConnectionEndProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.ConnectionEnd", - value: ConnectionEnd.encode(message).finish() - }; - } -}; -function createBaseIdentifiedConnection(): IdentifiedConnection { - return { - id: "", - clientId: "", - versions: [], - state: 0, - counterparty: Counterparty.fromPartial({}), - delayPeriod: BigInt(0) - }; -} -export const IdentifiedConnection = { - typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", - aminoType: "cosmos-sdk/IdentifiedConnection", - encode(message: IdentifiedConnection, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - for (const v of message.versions) { - Version.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.state !== 0) { - writer.uint32(32).int32(message.state); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(42).fork()).ldelim(); - } - if (message.delayPeriod !== BigInt(0)) { - writer.uint32(48).uint64(message.delayPeriod); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IdentifiedConnection { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIdentifiedConnection(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.versions.push(Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = (reader.int32() as any); - break; - case 5: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delayPeriod = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): IdentifiedConnection { - return { - id: isSet(object.id) ? String(object.id) : "", - clientId: isSet(object.clientId) ? String(object.clientId) : "", - versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromJSON(e)) : [], - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? BigInt(object.delayPeriod.toString()) : BigInt(0) - }; - }, - toJSON(message: IdentifiedConnection): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.versions) { - obj.versions = message.versions.map(e => e ? Version.toJSON(e) : undefined); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): IdentifiedConnection { - const message = createBaseIdentifiedConnection(); - message.id = object.id ?? ""; - message.clientId = object.clientId ?? ""; - message.versions = object.versions?.map(e => Version.fromPartial(e)) || []; - message.state = object.state ?? 0; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.delayPeriod = object.delayPeriod !== undefined && object.delayPeriod !== null ? BigInt(object.delayPeriod.toString()) : BigInt(0); - return message; - }, - fromSDK(object: IdentifiedConnectionSDKType): IdentifiedConnection { - return { - id: object?.id, - clientId: object?.client_id, - versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromSDK(e)) : [], - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - delayPeriod: object?.delay_period - }; - }, - toSDK(message: IdentifiedConnection): IdentifiedConnectionSDKType { - const obj: any = {}; - obj.id = message.id; - obj.client_id = message.clientId; - if (message.versions) { - obj.versions = message.versions.map(e => e ? Version.toSDK(e) : undefined); - } else { - obj.versions = []; - } - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - obj.delay_period = message.delayPeriod; - return obj; - }, - fromAmino(object: IdentifiedConnectionAmino): IdentifiedConnection { - return { - id: object.id, - clientId: object.client_id, - versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromAmino(e)) : [], - state: isSet(object.state) ? stateFromJSON(object.state) : -1, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - delayPeriod: BigInt(object.delay_period) - }; - }, - toAmino(message: IdentifiedConnection): IdentifiedConnectionAmino { - const obj: any = {}; - obj.id = message.id; - obj.client_id = message.clientId; - if (message.versions) { - obj.versions = message.versions.map(e => e ? Version.toAmino(e) : undefined); - } else { - obj.versions = []; - } - obj.state = message.state; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; - return obj; - }, - fromAminoMsg(object: IdentifiedConnectionAminoMsg): IdentifiedConnection { - return IdentifiedConnection.fromAmino(object.value); - }, - toAminoMsg(message: IdentifiedConnection): IdentifiedConnectionAminoMsg { - return { - type: "cosmos-sdk/IdentifiedConnection", - value: IdentifiedConnection.toAmino(message) - }; - }, - fromProtoMsg(message: IdentifiedConnectionProtoMsg): IdentifiedConnection { - return IdentifiedConnection.decode(message.value); - }, - toProto(message: IdentifiedConnection): Uint8Array { - return IdentifiedConnection.encode(message).finish(); - }, - toProtoMsg(message: IdentifiedConnection): IdentifiedConnectionProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.IdentifiedConnection", - value: IdentifiedConnection.encode(message).finish() - }; - } -}; -function createBaseCounterparty(): Counterparty { - return { - clientId: "", - connectionId: "", - prefix: MerklePrefix.fromPartial({}) - }; -} -export const Counterparty = { - typeUrl: "/ibc.core.connection.v1.Counterparty", - aminoType: "cosmos-sdk/Counterparty", - encode(message: Counterparty, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.connectionId !== "") { - writer.uint32(18).string(message.connectionId); - } - if (message.prefix !== undefined) { - MerklePrefix.encode(message.prefix, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Counterparty { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCounterparty(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.connectionId = reader.string(); - break; - case 3: - message.prefix = MerklePrefix.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Counterparty { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - prefix: isSet(object.prefix) ? MerklePrefix.fromJSON(object.prefix) : undefined - }; - }, - toJSON(message: Counterparty): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - message.prefix !== undefined && (obj.prefix = message.prefix ? MerklePrefix.toJSON(message.prefix) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Counterparty { - const message = createBaseCounterparty(); - message.clientId = object.clientId ?? ""; - message.connectionId = object.connectionId ?? ""; - message.prefix = object.prefix !== undefined && object.prefix !== null ? MerklePrefix.fromPartial(object.prefix) : undefined; - return message; - }, - fromSDK(object: CounterpartySDKType): Counterparty { - return { - clientId: object?.client_id, - connectionId: object?.connection_id, - prefix: object.prefix ? MerklePrefix.fromSDK(object.prefix) : undefined - }; - }, - toSDK(message: Counterparty): CounterpartySDKType { - const obj: any = {}; - obj.client_id = message.clientId; - obj.connection_id = message.connectionId; - message.prefix !== undefined && (obj.prefix = message.prefix ? MerklePrefix.toSDK(message.prefix) : undefined); - return obj; - }, - fromAmino(object: CounterpartyAmino): Counterparty { - return { - clientId: object.client_id, - connectionId: object.connection_id, - prefix: object?.prefix ? MerklePrefix.fromAmino(object.prefix) : undefined - }; - }, - toAmino(message: Counterparty): CounterpartyAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.connection_id = message.connectionId; - obj.prefix = message.prefix ? MerklePrefix.toAmino(message.prefix) : undefined; - return obj; - }, - fromAminoMsg(object: CounterpartyAminoMsg): Counterparty { - return Counterparty.fromAmino(object.value); - }, - toAminoMsg(message: Counterparty): CounterpartyAminoMsg { - return { - type: "cosmos-sdk/Counterparty", - value: Counterparty.toAmino(message) - }; - }, - fromProtoMsg(message: CounterpartyProtoMsg): Counterparty { - return Counterparty.decode(message.value); - }, - toProto(message: Counterparty): Uint8Array { - return Counterparty.encode(message).finish(); - }, - toProtoMsg(message: Counterparty): CounterpartyProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.Counterparty", - value: Counterparty.encode(message).finish() - }; - } -}; -function createBaseClientPaths(): ClientPaths { - return { - paths: [] - }; -} -export const ClientPaths = { - typeUrl: "/ibc.core.connection.v1.ClientPaths", - aminoType: "cosmos-sdk/ClientPaths", - encode(message: ClientPaths, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.paths) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientPaths { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientPaths(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientPaths { - return { - paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ClientPaths): unknown { - const obj: any = {}; - if (message.paths) { - obj.paths = message.paths.map(e => e); - } else { - obj.paths = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ClientPaths { - const message = createBaseClientPaths(); - message.paths = object.paths?.map(e => e) || []; - return message; - }, - fromSDK(object: ClientPathsSDKType): ClientPaths { - return { - paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => e) : [] - }; - }, - toSDK(message: ClientPaths): ClientPathsSDKType { - const obj: any = {}; - if (message.paths) { - obj.paths = message.paths.map(e => e); - } else { - obj.paths = []; - } - return obj; - }, - fromAmino(object: ClientPathsAmino): ClientPaths { - return { - paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => e) : [] - }; - }, - toAmino(message: ClientPaths): ClientPathsAmino { - const obj: any = {}; - if (message.paths) { - obj.paths = message.paths.map(e => e); - } else { - obj.paths = []; - } - return obj; - }, - fromAminoMsg(object: ClientPathsAminoMsg): ClientPaths { - return ClientPaths.fromAmino(object.value); - }, - toAminoMsg(message: ClientPaths): ClientPathsAminoMsg { - return { - type: "cosmos-sdk/ClientPaths", - value: ClientPaths.toAmino(message) - }; - }, - fromProtoMsg(message: ClientPathsProtoMsg): ClientPaths { - return ClientPaths.decode(message.value); - }, - toProto(message: ClientPaths): Uint8Array { - return ClientPaths.encode(message).finish(); - }, - toProtoMsg(message: ClientPaths): ClientPathsProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.ClientPaths", - value: ClientPaths.encode(message).finish() - }; - } -}; -function createBaseConnectionPaths(): ConnectionPaths { - return { - clientId: "", - paths: [] - }; -} -export const ConnectionPaths = { - typeUrl: "/ibc.core.connection.v1.ConnectionPaths", - aminoType: "cosmos-sdk/ConnectionPaths", - encode(message: ConnectionPaths, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - for (const v of message.paths) { - writer.uint32(18).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConnectionPaths { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConnectionPaths(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConnectionPaths { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ConnectionPaths): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - if (message.paths) { - obj.paths = message.paths.map(e => e); - } else { - obj.paths = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ConnectionPaths { - const message = createBaseConnectionPaths(); - message.clientId = object.clientId ?? ""; - message.paths = object.paths?.map(e => e) || []; - return message; - }, - fromSDK(object: ConnectionPathsSDKType): ConnectionPaths { - return { - clientId: object?.client_id, - paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => e) : [] - }; - }, - toSDK(message: ConnectionPaths): ConnectionPathsSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.paths) { - obj.paths = message.paths.map(e => e); - } else { - obj.paths = []; - } - return obj; - }, - fromAmino(object: ConnectionPathsAmino): ConnectionPaths { - return { - clientId: object.client_id, - paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => e) : [] - }; - }, - toAmino(message: ConnectionPaths): ConnectionPathsAmino { - const obj: any = {}; - obj.client_id = message.clientId; - if (message.paths) { - obj.paths = message.paths.map(e => e); - } else { - obj.paths = []; - } - return obj; - }, - fromAminoMsg(object: ConnectionPathsAminoMsg): ConnectionPaths { - return ConnectionPaths.fromAmino(object.value); - }, - toAminoMsg(message: ConnectionPaths): ConnectionPathsAminoMsg { - return { - type: "cosmos-sdk/ConnectionPaths", - value: ConnectionPaths.toAmino(message) - }; - }, - fromProtoMsg(message: ConnectionPathsProtoMsg): ConnectionPaths { - return ConnectionPaths.decode(message.value); - }, - toProto(message: ConnectionPaths): Uint8Array { - return ConnectionPaths.encode(message).finish(); - }, - toProtoMsg(message: ConnectionPaths): ConnectionPathsProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.ConnectionPaths", - value: ConnectionPaths.encode(message).finish() - }; - } -}; -function createBaseVersion(): Version { - return { - identifier: "", - features: [] - }; -} -export const Version = { - typeUrl: "/ibc.core.connection.v1.Version", - aminoType: "cosmos-sdk/Version", - encode(message: Version, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.identifier !== "") { - writer.uint32(10).string(message.identifier); - } - for (const v of message.features) { - writer.uint32(18).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Version { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVersion(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Version { - return { - identifier: isSet(object.identifier) ? String(object.identifier) : "", - features: Array.isArray(object?.features) ? object.features.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: Version): unknown { - const obj: any = {}; - message.identifier !== undefined && (obj.identifier = message.identifier); - if (message.features) { - obj.features = message.features.map(e => e); - } else { - obj.features = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Version { - const message = createBaseVersion(); - message.identifier = object.identifier ?? ""; - message.features = object.features?.map(e => e) || []; - return message; - }, - fromSDK(object: VersionSDKType): Version { - return { - identifier: object?.identifier, - features: Array.isArray(object?.features) ? object.features.map((e: any) => e) : [] - }; - }, - toSDK(message: Version): VersionSDKType { - const obj: any = {}; - obj.identifier = message.identifier; - if (message.features) { - obj.features = message.features.map(e => e); - } else { - obj.features = []; - } - return obj; - }, - fromAmino(object: VersionAmino): Version { - return { - identifier: object.identifier, - features: Array.isArray(object?.features) ? object.features.map((e: any) => e) : [] - }; - }, - toAmino(message: Version): VersionAmino { - const obj: any = {}; - obj.identifier = message.identifier; - if (message.features) { - obj.features = message.features.map(e => e); - } else { - obj.features = []; - } - return obj; - }, - fromAminoMsg(object: VersionAminoMsg): Version { - return Version.fromAmino(object.value); - }, - toAminoMsg(message: Version): VersionAminoMsg { - return { - type: "cosmos-sdk/Version", - value: Version.toAmino(message) - }; - }, - fromProtoMsg(message: VersionProtoMsg): Version { - return Version.decode(message.value); - }, - toProto(message: Version): Uint8Array { - return Version.encode(message).finish(); - }, - toProtoMsg(message: Version): VersionProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.Version", - value: Version.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - maxExpectedTimePerBlock: BigInt(0) - }; -} -export const Params = { - typeUrl: "/ibc.core.connection.v1.Params", - aminoType: "cosmos-sdk/Params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxExpectedTimePerBlock !== BigInt(0)) { - writer.uint32(8).uint64(message.maxExpectedTimePerBlock); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxExpectedTimePerBlock = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - maxExpectedTimePerBlock: isSet(object.maxExpectedTimePerBlock) ? BigInt(object.maxExpectedTimePerBlock.toString()) : BigInt(0) - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.maxExpectedTimePerBlock !== undefined && (obj.maxExpectedTimePerBlock = (message.maxExpectedTimePerBlock || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.maxExpectedTimePerBlock = object.maxExpectedTimePerBlock !== undefined && object.maxExpectedTimePerBlock !== null ? BigInt(object.maxExpectedTimePerBlock.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - maxExpectedTimePerBlock: object?.max_expected_time_per_block - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.max_expected_time_per_block = message.maxExpectedTimePerBlock; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - maxExpectedTimePerBlock: BigInt(object.max_expected_time_per_block) - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.max_expected_time_per_block = message.maxExpectedTimePerBlock ? message.maxExpectedTimePerBlock.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "cosmos-sdk/Params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/genesis.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/genesis.ts deleted file mode 100644 index d7d4c564..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/genesis.ts +++ /dev/null @@ -1,188 +0,0 @@ -import { IdentifiedConnection, IdentifiedConnectionAmino, IdentifiedConnectionSDKType, ConnectionPaths, ConnectionPathsAmino, ConnectionPathsSDKType, Params, ParamsAmino, ParamsSDKType } from "./connection"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** GenesisState defines the ibc connection submodule's genesis state. */ -export interface GenesisState { - connections: IdentifiedConnection[]; - clientConnectionPaths: ConnectionPaths[]; - /** the sequence for the next generated connection identifier */ - nextConnectionSequence: bigint; - params: Params | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/ibc.core.connection.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the ibc connection submodule's genesis state. */ -export interface GenesisStateAmino { - connections: IdentifiedConnectionAmino[]; - client_connection_paths: ConnectionPathsAmino[]; - /** the sequence for the next generated connection identifier */ - next_connection_sequence: string; - params?: ParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the ibc connection submodule's genesis state. */ -export interface GenesisStateSDKType { - connections: IdentifiedConnectionSDKType[]; - client_connection_paths: ConnectionPathsSDKType[]; - next_connection_sequence: bigint; - params: ParamsSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - connections: [], - clientConnectionPaths: [], - nextConnectionSequence: BigInt(0), - params: Params.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/ibc.core.connection.v1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.connections) { - IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.clientConnectionPaths) { - ConnectionPaths.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.nextConnectionSequence !== BigInt(0)) { - writer.uint32(24).uint64(message.nextConnectionSequence); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push(IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - message.clientConnectionPaths.push(ConnectionPaths.decode(reader, reader.uint32())); - break; - case 3: - message.nextConnectionSequence = reader.uint64(); - break; - case 4: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - connections: Array.isArray(object?.connections) ? object.connections.map((e: any) => IdentifiedConnection.fromJSON(e)) : [], - clientConnectionPaths: Array.isArray(object?.clientConnectionPaths) ? object.clientConnectionPaths.map((e: any) => ConnectionPaths.fromJSON(e)) : [], - nextConnectionSequence: isSet(object.nextConnectionSequence) ? BigInt(object.nextConnectionSequence.toString()) : BigInt(0), - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map(e => e ? IdentifiedConnection.toJSON(e) : undefined); - } else { - obj.connections = []; - } - if (message.clientConnectionPaths) { - obj.clientConnectionPaths = message.clientConnectionPaths.map(e => e ? ConnectionPaths.toJSON(e) : undefined); - } else { - obj.clientConnectionPaths = []; - } - message.nextConnectionSequence !== undefined && (obj.nextConnectionSequence = (message.nextConnectionSequence || BigInt(0)).toString()); - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.connections = object.connections?.map(e => IdentifiedConnection.fromPartial(e)) || []; - message.clientConnectionPaths = object.clientConnectionPaths?.map(e => ConnectionPaths.fromPartial(e)) || []; - message.nextConnectionSequence = object.nextConnectionSequence !== undefined && object.nextConnectionSequence !== null ? BigInt(object.nextConnectionSequence.toString()) : BigInt(0); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - connections: Array.isArray(object?.connections) ? object.connections.map((e: any) => IdentifiedConnection.fromSDK(e)) : [], - clientConnectionPaths: Array.isArray(object?.client_connection_paths) ? object.client_connection_paths.map((e: any) => ConnectionPaths.fromSDK(e)) : [], - nextConnectionSequence: object?.next_connection_sequence, - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map(e => e ? IdentifiedConnection.toSDK(e) : undefined); - } else { - obj.connections = []; - } - if (message.clientConnectionPaths) { - obj.client_connection_paths = message.clientConnectionPaths.map(e => e ? ConnectionPaths.toSDK(e) : undefined); - } else { - obj.client_connection_paths = []; - } - obj.next_connection_sequence = message.nextConnectionSequence; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - connections: Array.isArray(object?.connections) ? object.connections.map((e: any) => IdentifiedConnection.fromAmino(e)) : [], - clientConnectionPaths: Array.isArray(object?.client_connection_paths) ? object.client_connection_paths.map((e: any) => ConnectionPaths.fromAmino(e)) : [], - nextConnectionSequence: BigInt(object.next_connection_sequence), - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map(e => e ? IdentifiedConnection.toAmino(e) : undefined); - } else { - obj.connections = []; - } - if (message.clientConnectionPaths) { - obj.client_connection_paths = message.clientConnectionPaths.map(e => e ? ConnectionPaths.toAmino(e) : undefined); - } else { - obj.client_connection_paths = []; - } - obj.next_connection_sequence = message.nextConnectionSequence ? message.nextConnectionSequence.toString() : undefined; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/query.rpc.Query.ts deleted file mode 100644 index b5537ac0..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/query.rpc.Query.ts +++ /dev/null @@ -1,232 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../../mobx"; -import { QueryConnectionRequest, QueryConnectionResponse, QueryConnectionsRequest, QueryConnectionsResponse, QueryClientConnectionsRequest, QueryClientConnectionsResponse, QueryConnectionClientStateRequest, QueryConnectionClientStateResponse, QueryConnectionConsensusStateRequest, QueryConnectionConsensusStateResponse } from "./query"; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** Connection queries an IBC connection end. */ - connection(request: QueryConnectionRequest): Promise; - /** Connections queries all the IBC connections of a chain. */ - connections(request?: QueryConnectionsRequest): Promise; - /** - * ClientConnections queries the connection paths associated with a client - * state. - */ - clientConnections(request: QueryClientConnectionsRequest): Promise; - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ - connectionClientState(request: QueryConnectionClientStateRequest): Promise; - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - connectionConsensusState(request: QueryConnectionConsensusStateRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.connection = this.connection.bind(this); - this.connections = this.connections.bind(this); - this.clientConnections = this.clientConnections.bind(this); - this.connectionClientState = this.connectionClientState.bind(this); - this.connectionConsensusState = this.connectionConsensusState.bind(this); - } - connection(request: QueryConnectionRequest): Promise { - const data = QueryConnectionRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "Connection", data); - return promise.then(data => QueryConnectionResponse.decode(new BinaryReader(data))); - } - connections(request: QueryConnectionsRequest = { - pagination: undefined - }): Promise { - const data = QueryConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "Connections", data); - return promise.then(data => QueryConnectionsResponse.decode(new BinaryReader(data))); - } - clientConnections(request: QueryClientConnectionsRequest): Promise { - const data = QueryClientConnectionsRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "ClientConnections", data); - return promise.then(data => QueryClientConnectionsResponse.decode(new BinaryReader(data))); - } - connectionClientState(request: QueryConnectionClientStateRequest): Promise { - const data = QueryConnectionClientStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "ConnectionClientState", data); - return promise.then(data => QueryConnectionClientStateResponse.decode(new BinaryReader(data))); - } - connectionConsensusState(request: QueryConnectionConsensusStateRequest): Promise { - const data = QueryConnectionConsensusStateRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Query", "ConnectionConsensusState", data); - return promise.then(data => QueryConnectionConsensusStateResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - connection(request: QueryConnectionRequest): Promise { - return queryService.connection(request); - }, - connections(request?: QueryConnectionsRequest): Promise { - return queryService.connections(request); - }, - clientConnections(request: QueryClientConnectionsRequest): Promise { - return queryService.clientConnections(request); - }, - connectionClientState(request: QueryConnectionClientStateRequest): Promise { - return queryService.connectionClientState(request); - }, - connectionConsensusState(request: QueryConnectionConsensusStateRequest): Promise { - return queryService.connectionConsensusState(request); - } - }; -}; -export interface UseConnectionQuery extends ReactQueryParams { - request: QueryConnectionRequest; -} -export interface UseConnectionsQuery extends ReactQueryParams { - request?: QueryConnectionsRequest; -} -export interface UseClientConnectionsQuery extends ReactQueryParams { - request: QueryClientConnectionsRequest; -} -export interface UseConnectionClientStateQuery extends ReactQueryParams { - request: QueryConnectionClientStateRequest; -} -export interface UseConnectionConsensusStateQuery extends ReactQueryParams { - request: QueryConnectionConsensusStateRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useConnection = ({ - request, - options - }: UseConnectionQuery) => { - return useQuery(["connectionQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.connection(request); - }, options); - }; - const useConnections = ({ - request, - options - }: UseConnectionsQuery) => { - return useQuery(["connectionsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.connections(request); - }, options); - }; - const useClientConnections = ({ - request, - options - }: UseClientConnectionsQuery) => { - return useQuery(["clientConnectionsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.clientConnections(request); - }, options); - }; - const useConnectionClientState = ({ - request, - options - }: UseConnectionClientStateQuery) => { - return useQuery(["connectionClientStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.connectionClientState(request); - }, options); - }; - const useConnectionConsensusState = ({ - request, - options - }: UseConnectionConsensusStateQuery) => { - return useQuery(["connectionConsensusStateQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.connectionConsensusState(request); - }, options); - }; - return { - /** Connection queries an IBC connection end. */useConnection, - /** Connections queries all the IBC connections of a chain. */useConnections, - /** - * ClientConnections queries the connection paths associated with a client - * state. - */ - useClientConnections, - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ - useConnectionClientState, - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - useConnectionConsensusState - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryConnectionStore { - store = new QueryStore(queryService?.connection); - connection(request: QueryConnectionRequest) { - return this.store.getData(request); - } - } - class QueryConnectionsStore { - store = new QueryStore(queryService?.connections); - connections(request: QueryConnectionsRequest) { - return this.store.getData(request); - } - } - class QueryClientConnectionsStore { - store = new QueryStore(queryService?.clientConnections); - clientConnections(request: QueryClientConnectionsRequest) { - return this.store.getData(request); - } - } - class QueryConnectionClientStateStore { - store = new QueryStore(queryService?.connectionClientState); - connectionClientState(request: QueryConnectionClientStateRequest) { - return this.store.getData(request); - } - } - class QueryConnectionConsensusStateStore { - store = new QueryStore(queryService?.connectionConsensusState); - connectionConsensusState(request: QueryConnectionConsensusStateRequest) { - return this.store.getData(request); - } - } - return { - /** Connection queries an IBC connection end. */QueryConnectionStore, - /** Connections queries all the IBC connections of a chain. */QueryConnectionsStore, - /** - * ClientConnections queries the connection paths associated with a client - * state. - */ - QueryClientConnectionsStore, - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ - QueryConnectionClientStateStore, - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ - QueryConnectionConsensusStateStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/query.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/query.ts deleted file mode 100644 index 69883342..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/query.ts +++ /dev/null @@ -1,1464 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { ConnectionEnd, ConnectionEndAmino, ConnectionEndSDKType, IdentifiedConnection, IdentifiedConnectionAmino, IdentifiedConnectionSDKType } from "./connection"; -import { Height, HeightAmino, HeightSDKType, IdentifiedClientState, IdentifiedClientStateAmino, IdentifiedClientStateSDKType } from "../../client/v1/client"; -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * QueryConnectionRequest is the request type for the Query/Connection RPC - * method - */ -export interface QueryConnectionRequest { - /** connection unique identifier */ - connectionId: string; -} -export interface QueryConnectionRequestProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionRequest"; - value: Uint8Array; -} -/** - * QueryConnectionRequest is the request type for the Query/Connection RPC - * method - */ -export interface QueryConnectionRequestAmino { - /** connection unique identifier */ - connection_id: string; -} -export interface QueryConnectionRequestAminoMsg { - type: "cosmos-sdk/QueryConnectionRequest"; - value: QueryConnectionRequestAmino; -} -/** - * QueryConnectionRequest is the request type for the Query/Connection RPC - * method - */ -export interface QueryConnectionRequestSDKType { - connection_id: string; -} -/** - * QueryConnectionResponse is the response type for the Query/Connection RPC - * method. Besides the connection end, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryConnectionResponse { - /** connection associated with the request identifier */ - connection: ConnectionEnd | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryConnectionResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionResponse"; - value: Uint8Array; -} -/** - * QueryConnectionResponse is the response type for the Query/Connection RPC - * method. Besides the connection end, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryConnectionResponseAmino { - /** connection associated with the request identifier */ - connection?: ConnectionEndAmino | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryConnectionResponseAminoMsg { - type: "cosmos-sdk/QueryConnectionResponse"; - value: QueryConnectionResponseAmino; -} -/** - * QueryConnectionResponse is the response type for the Query/Connection RPC - * method. Besides the connection end, it includes a proof and the height from - * which the proof was retrieved. - */ -export interface QueryConnectionResponseSDKType { - connection: ConnectionEndSDKType | undefined; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryConnectionsRequest is the request type for the Query/Connections RPC - * method - */ -export interface QueryConnectionsRequest { - pagination: PageRequest | undefined; -} -export interface QueryConnectionsRequestProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionsRequest"; - value: Uint8Array; -} -/** - * QueryConnectionsRequest is the request type for the Query/Connections RPC - * method - */ -export interface QueryConnectionsRequestAmino { - pagination?: PageRequestAmino | undefined; -} -export interface QueryConnectionsRequestAminoMsg { - type: "cosmos-sdk/QueryConnectionsRequest"; - value: QueryConnectionsRequestAmino; -} -/** - * QueryConnectionsRequest is the request type for the Query/Connections RPC - * method - */ -export interface QueryConnectionsRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -/** - * QueryConnectionsResponse is the response type for the Query/Connections RPC - * method. - */ -export interface QueryConnectionsResponse { - /** list of stored connections of the chain. */ - connections: IdentifiedConnection[]; - /** pagination response */ - pagination: PageResponse | undefined; - /** query block height */ - height: Height | undefined; -} -export interface QueryConnectionsResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionsResponse"; - value: Uint8Array; -} -/** - * QueryConnectionsResponse is the response type for the Query/Connections RPC - * method. - */ -export interface QueryConnectionsResponseAmino { - /** list of stored connections of the chain. */ - connections: IdentifiedConnectionAmino[]; - /** pagination response */ - pagination?: PageResponseAmino | undefined; - /** query block height */ - height?: HeightAmino | undefined; -} -export interface QueryConnectionsResponseAminoMsg { - type: "cosmos-sdk/QueryConnectionsResponse"; - value: QueryConnectionsResponseAmino; -} -/** - * QueryConnectionsResponse is the response type for the Query/Connections RPC - * method. - */ -export interface QueryConnectionsResponseSDKType { - connections: IdentifiedConnectionSDKType[]; - pagination: PageResponseSDKType | undefined; - height: HeightSDKType | undefined; -} -/** - * QueryClientConnectionsRequest is the request type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsRequest { - /** client identifier associated with a connection */ - clientId: string; -} -export interface QueryClientConnectionsRequestProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryClientConnectionsRequest"; - value: Uint8Array; -} -/** - * QueryClientConnectionsRequest is the request type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsRequestAmino { - /** client identifier associated with a connection */ - client_id: string; -} -export interface QueryClientConnectionsRequestAminoMsg { - type: "cosmos-sdk/QueryClientConnectionsRequest"; - value: QueryClientConnectionsRequestAmino; -} -/** - * QueryClientConnectionsRequest is the request type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsRequestSDKType { - client_id: string; -} -/** - * QueryClientConnectionsResponse is the response type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsResponse { - /** slice of all the connection paths associated with a client. */ - connectionPaths: string[]; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was generated */ - proofHeight: Height | undefined; -} -export interface QueryClientConnectionsResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryClientConnectionsResponse"; - value: Uint8Array; -} -/** - * QueryClientConnectionsResponse is the response type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsResponseAmino { - /** slice of all the connection paths associated with a client. */ - connection_paths: string[]; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was generated */ - proof_height?: HeightAmino | undefined; -} -export interface QueryClientConnectionsResponseAminoMsg { - type: "cosmos-sdk/QueryClientConnectionsResponse"; - value: QueryClientConnectionsResponseAmino; -} -/** - * QueryClientConnectionsResponse is the response type for the - * Query/ClientConnections RPC method - */ -export interface QueryClientConnectionsResponseSDKType { - connection_paths: string[]; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryConnectionClientStateRequest is the request type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateRequest { - /** connection identifier */ - connectionId: string; -} -export interface QueryConnectionClientStateRequestProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionClientStateRequest"; - value: Uint8Array; -} -/** - * QueryConnectionClientStateRequest is the request type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateRequestAmino { - /** connection identifier */ - connection_id: string; -} -export interface QueryConnectionClientStateRequestAminoMsg { - type: "cosmos-sdk/QueryConnectionClientStateRequest"; - value: QueryConnectionClientStateRequestAmino; -} -/** - * QueryConnectionClientStateRequest is the request type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateRequestSDKType { - connection_id: string; -} -/** - * QueryConnectionClientStateResponse is the response type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateResponse { - /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryConnectionClientStateResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionClientStateResponse"; - value: Uint8Array; -} -/** - * QueryConnectionClientStateResponse is the response type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateResponseAmino { - /** client state associated with the channel */ - identified_client_state?: IdentifiedClientStateAmino | undefined; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryConnectionClientStateResponseAminoMsg { - type: "cosmos-sdk/QueryConnectionClientStateResponse"; - value: QueryConnectionClientStateResponseAmino; -} -/** - * QueryConnectionClientStateResponse is the response type for the - * Query/ConnectionClientState RPC method - */ -export interface QueryConnectionClientStateResponseSDKType { - identified_client_state: IdentifiedClientStateSDKType | undefined; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -/** - * QueryConnectionConsensusStateRequest is the request type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateRequest { - /** connection identifier */ - connectionId: string; - revisionNumber: bigint; - revisionHeight: bigint; -} -export interface QueryConnectionConsensusStateRequestProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionConsensusStateRequest"; - value: Uint8Array; -} -/** - * QueryConnectionConsensusStateRequest is the request type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateRequestAmino { - /** connection identifier */ - connection_id: string; - revision_number: string; - revision_height: string; -} -export interface QueryConnectionConsensusStateRequestAminoMsg { - type: "cosmos-sdk/QueryConnectionConsensusStateRequest"; - value: QueryConnectionConsensusStateRequestAmino; -} -/** - * QueryConnectionConsensusStateRequest is the request type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateRequestSDKType { - connection_id: string; - revision_number: bigint; - revision_height: bigint; -} -/** - * QueryConnectionConsensusStateResponse is the response type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateResponse { - /** consensus state associated with the channel */ - consensusState: Any | undefined; - /** client ID associated with the consensus state */ - clientId: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proofHeight: Height | undefined; -} -export interface QueryConnectionConsensusStateResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.QueryConnectionConsensusStateResponse"; - value: Uint8Array; -} -/** - * QueryConnectionConsensusStateResponse is the response type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateResponseAmino { - /** consensus state associated with the channel */ - consensus_state?: AnyAmino | undefined; - /** client ID associated with the consensus state */ - client_id: string; - /** merkle proof of existence */ - proof: Uint8Array; - /** height at which the proof was retrieved */ - proof_height?: HeightAmino | undefined; -} -export interface QueryConnectionConsensusStateResponseAminoMsg { - type: "cosmos-sdk/QueryConnectionConsensusStateResponse"; - value: QueryConnectionConsensusStateResponseAmino; -} -/** - * QueryConnectionConsensusStateResponse is the response type for the - * Query/ConnectionConsensusState RPC method - */ -export interface QueryConnectionConsensusStateResponseSDKType { - consensus_state: AnySDKType | undefined; - client_id: string; - proof: Uint8Array; - proof_height: HeightSDKType | undefined; -} -function createBaseQueryConnectionRequest(): QueryConnectionRequest { - return { - connectionId: "" - }; -} -export const QueryConnectionRequest = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionRequest", - aminoType: "cosmos-sdk/QueryConnectionRequest", - encode(message: QueryConnectionRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionRequest { - return { - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" - }; - }, - toJSON(message: QueryConnectionRequest): unknown { - const obj: any = {}; - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionRequest { - const message = createBaseQueryConnectionRequest(); - message.connectionId = object.connectionId ?? ""; - return message; - }, - fromSDK(object: QueryConnectionRequestSDKType): QueryConnectionRequest { - return { - connectionId: object?.connection_id - }; - }, - toSDK(message: QueryConnectionRequest): QueryConnectionRequestSDKType { - const obj: any = {}; - obj.connection_id = message.connectionId; - return obj; - }, - fromAmino(object: QueryConnectionRequestAmino): QueryConnectionRequest { - return { - connectionId: object.connection_id - }; - }, - toAmino(message: QueryConnectionRequest): QueryConnectionRequestAmino { - const obj: any = {}; - obj.connection_id = message.connectionId; - return obj; - }, - fromAminoMsg(object: QueryConnectionRequestAminoMsg): QueryConnectionRequest { - return QueryConnectionRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionRequest): QueryConnectionRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionRequest", - value: QueryConnectionRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionRequestProtoMsg): QueryConnectionRequest { - return QueryConnectionRequest.decode(message.value); - }, - toProto(message: QueryConnectionRequest): Uint8Array { - return QueryConnectionRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionRequest): QueryConnectionRequestProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionRequest", - value: QueryConnectionRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionResponse(): QueryConnectionResponse { - return { - connection: ConnectionEnd.fromPartial({}), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryConnectionResponse = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionResponse", - aminoType: "cosmos-sdk/QueryConnectionResponse", - encode(message: QueryConnectionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connection !== undefined) { - ConnectionEnd.encode(message.connection, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = ConnectionEnd.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionResponse { - return { - connection: isSet(object.connection) ? ConnectionEnd.fromJSON(object.connection) : undefined, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryConnectionResponse): unknown { - const obj: any = {}; - message.connection !== undefined && (obj.connection = message.connection ? ConnectionEnd.toJSON(message.connection) : undefined); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionResponse { - const message = createBaseQueryConnectionResponse(); - message.connection = object.connection !== undefined && object.connection !== null ? ConnectionEnd.fromPartial(object.connection) : undefined; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryConnectionResponseSDKType): QueryConnectionResponse { - return { - connection: object.connection ? ConnectionEnd.fromSDK(object.connection) : undefined, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryConnectionResponse): QueryConnectionResponseSDKType { - const obj: any = {}; - message.connection !== undefined && (obj.connection = message.connection ? ConnectionEnd.toSDK(message.connection) : undefined); - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionResponseAmino): QueryConnectionResponse { - return { - connection: object?.connection ? ConnectionEnd.fromAmino(object.connection) : undefined, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryConnectionResponse): QueryConnectionResponseAmino { - const obj: any = {}; - obj.connection = message.connection ? ConnectionEnd.toAmino(message.connection) : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryConnectionResponseAminoMsg): QueryConnectionResponse { - return QueryConnectionResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionResponse): QueryConnectionResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionResponse", - value: QueryConnectionResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionResponseProtoMsg): QueryConnectionResponse { - return QueryConnectionResponse.decode(message.value); - }, - toProto(message: QueryConnectionResponse): Uint8Array { - return QueryConnectionResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionResponse): QueryConnectionResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionResponse", - value: QueryConnectionResponse.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionsRequest(): QueryConnectionsRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryConnectionsRequest = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionsRequest", - aminoType: "cosmos-sdk/QueryConnectionsRequest", - encode(message: QueryConnectionsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionsRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryConnectionsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionsRequest { - const message = createBaseQueryConnectionsRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryConnectionsRequestSDKType): QueryConnectionsRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryConnectionsRequest): QueryConnectionsRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionsRequestAmino): QueryConnectionsRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryConnectionsRequest): QueryConnectionsRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryConnectionsRequestAminoMsg): QueryConnectionsRequest { - return QueryConnectionsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionsRequest): QueryConnectionsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionsRequest", - value: QueryConnectionsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionsRequestProtoMsg): QueryConnectionsRequest { - return QueryConnectionsRequest.decode(message.value); - }, - toProto(message: QueryConnectionsRequest): Uint8Array { - return QueryConnectionsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionsRequest): QueryConnectionsRequestProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionsRequest", - value: QueryConnectionsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionsResponse(): QueryConnectionsResponse { - return { - connections: [], - pagination: PageResponse.fromPartial({}), - height: Height.fromPartial({}) - }; -} -export const QueryConnectionsResponse = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionsResponse", - aminoType: "cosmos-sdk/QueryConnectionsResponse", - encode(message: QueryConnectionsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.connections) { - IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connections.push(IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionsResponse { - return { - connections: Array.isArray(object?.connections) ? object.connections.map((e: any) => IdentifiedConnection.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: QueryConnectionsResponse): unknown { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map(e => e ? IdentifiedConnection.toJSON(e) : undefined); - } else { - obj.connections = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionsResponse { - const message = createBaseQueryConnectionsResponse(); - message.connections = object.connections?.map(e => IdentifiedConnection.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: QueryConnectionsResponseSDKType): QueryConnectionsResponse { - return { - connections: Array.isArray(object?.connections) ? object.connections.map((e: any) => IdentifiedConnection.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined, - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: QueryConnectionsResponse): QueryConnectionsResponseSDKType { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map(e => e ? IdentifiedConnection.toSDK(e) : undefined); - } else { - obj.connections = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionsResponseAmino): QueryConnectionsResponse { - return { - connections: Array.isArray(object?.connections) ? object.connections.map((e: any) => IdentifiedConnection.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined, - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: QueryConnectionsResponse): QueryConnectionsResponseAmino { - const obj: any = {}; - if (message.connections) { - obj.connections = message.connections.map(e => e ? IdentifiedConnection.toAmino(e) : undefined); - } else { - obj.connections = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: QueryConnectionsResponseAminoMsg): QueryConnectionsResponse { - return QueryConnectionsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionsResponse): QueryConnectionsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionsResponse", - value: QueryConnectionsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionsResponseProtoMsg): QueryConnectionsResponse { - return QueryConnectionsResponse.decode(message.value); - }, - toProto(message: QueryConnectionsResponse): Uint8Array { - return QueryConnectionsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionsResponse): QueryConnectionsResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionsResponse", - value: QueryConnectionsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClientConnectionsRequest(): QueryClientConnectionsRequest { - return { - clientId: "" - }; -} -export const QueryClientConnectionsRequest = { - typeUrl: "/ibc.core.connection.v1.QueryClientConnectionsRequest", - aminoType: "cosmos-sdk/QueryClientConnectionsRequest", - encode(message: QueryClientConnectionsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientConnectionsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientConnectionsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientConnectionsRequest { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "" - }; - }, - toJSON(message: QueryClientConnectionsRequest): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientConnectionsRequest { - const message = createBaseQueryClientConnectionsRequest(); - message.clientId = object.clientId ?? ""; - return message; - }, - fromSDK(object: QueryClientConnectionsRequestSDKType): QueryClientConnectionsRequest { - return { - clientId: object?.client_id - }; - }, - toSDK(message: QueryClientConnectionsRequest): QueryClientConnectionsRequestSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - return obj; - }, - fromAmino(object: QueryClientConnectionsRequestAmino): QueryClientConnectionsRequest { - return { - clientId: object.client_id - }; - }, - toAmino(message: QueryClientConnectionsRequest): QueryClientConnectionsRequestAmino { - const obj: any = {}; - obj.client_id = message.clientId; - return obj; - }, - fromAminoMsg(object: QueryClientConnectionsRequestAminoMsg): QueryClientConnectionsRequest { - return QueryClientConnectionsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientConnectionsRequest): QueryClientConnectionsRequestAminoMsg { - return { - type: "cosmos-sdk/QueryClientConnectionsRequest", - value: QueryClientConnectionsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientConnectionsRequestProtoMsg): QueryClientConnectionsRequest { - return QueryClientConnectionsRequest.decode(message.value); - }, - toProto(message: QueryClientConnectionsRequest): Uint8Array { - return QueryClientConnectionsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClientConnectionsRequest): QueryClientConnectionsRequestProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryClientConnectionsRequest", - value: QueryClientConnectionsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClientConnectionsResponse(): QueryClientConnectionsResponse { - return { - connectionPaths: [], - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryClientConnectionsResponse = { - typeUrl: "/ibc.core.connection.v1.QueryClientConnectionsResponse", - aminoType: "cosmos-sdk/QueryClientConnectionsResponse", - encode(message: QueryClientConnectionsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.connectionPaths) { - writer.uint32(10).string(v!); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClientConnectionsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClientConnectionsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionPaths.push(reader.string()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClientConnectionsResponse { - return { - connectionPaths: Array.isArray(object?.connectionPaths) ? object.connectionPaths.map((e: any) => String(e)) : [], - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryClientConnectionsResponse): unknown { - const obj: any = {}; - if (message.connectionPaths) { - obj.connectionPaths = message.connectionPaths.map(e => e); - } else { - obj.connectionPaths = []; - } - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClientConnectionsResponse { - const message = createBaseQueryClientConnectionsResponse(); - message.connectionPaths = object.connectionPaths?.map(e => e) || []; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryClientConnectionsResponseSDKType): QueryClientConnectionsResponse { - return { - connectionPaths: Array.isArray(object?.connection_paths) ? object.connection_paths.map((e: any) => e) : [], - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryClientConnectionsResponse): QueryClientConnectionsResponseSDKType { - const obj: any = {}; - if (message.connectionPaths) { - obj.connection_paths = message.connectionPaths.map(e => e); - } else { - obj.connection_paths = []; - } - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryClientConnectionsResponseAmino): QueryClientConnectionsResponse { - return { - connectionPaths: Array.isArray(object?.connection_paths) ? object.connection_paths.map((e: any) => e) : [], - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryClientConnectionsResponse): QueryClientConnectionsResponseAmino { - const obj: any = {}; - if (message.connectionPaths) { - obj.connection_paths = message.connectionPaths.map(e => e); - } else { - obj.connection_paths = []; - } - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryClientConnectionsResponseAminoMsg): QueryClientConnectionsResponse { - return QueryClientConnectionsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClientConnectionsResponse): QueryClientConnectionsResponseAminoMsg { - return { - type: "cosmos-sdk/QueryClientConnectionsResponse", - value: QueryClientConnectionsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClientConnectionsResponseProtoMsg): QueryClientConnectionsResponse { - return QueryClientConnectionsResponse.decode(message.value); - }, - toProto(message: QueryClientConnectionsResponse): Uint8Array { - return QueryClientConnectionsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClientConnectionsResponse): QueryClientConnectionsResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryClientConnectionsResponse", - value: QueryClientConnectionsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionClientStateRequest(): QueryConnectionClientStateRequest { - return { - connectionId: "" - }; -} -export const QueryConnectionClientStateRequest = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionClientStateRequest", - aminoType: "cosmos-sdk/QueryConnectionClientStateRequest", - encode(message: QueryConnectionClientStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionClientStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionClientStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionClientStateRequest { - return { - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" - }; - }, - toJSON(message: QueryConnectionClientStateRequest): unknown { - const obj: any = {}; - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionClientStateRequest { - const message = createBaseQueryConnectionClientStateRequest(); - message.connectionId = object.connectionId ?? ""; - return message; - }, - fromSDK(object: QueryConnectionClientStateRequestSDKType): QueryConnectionClientStateRequest { - return { - connectionId: object?.connection_id - }; - }, - toSDK(message: QueryConnectionClientStateRequest): QueryConnectionClientStateRequestSDKType { - const obj: any = {}; - obj.connection_id = message.connectionId; - return obj; - }, - fromAmino(object: QueryConnectionClientStateRequestAmino): QueryConnectionClientStateRequest { - return { - connectionId: object.connection_id - }; - }, - toAmino(message: QueryConnectionClientStateRequest): QueryConnectionClientStateRequestAmino { - const obj: any = {}; - obj.connection_id = message.connectionId; - return obj; - }, - fromAminoMsg(object: QueryConnectionClientStateRequestAminoMsg): QueryConnectionClientStateRequest { - return QueryConnectionClientStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionClientStateRequest): QueryConnectionClientStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionClientStateRequest", - value: QueryConnectionClientStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionClientStateRequestProtoMsg): QueryConnectionClientStateRequest { - return QueryConnectionClientStateRequest.decode(message.value); - }, - toProto(message: QueryConnectionClientStateRequest): Uint8Array { - return QueryConnectionClientStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionClientStateRequest): QueryConnectionClientStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionClientStateRequest", - value: QueryConnectionClientStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionClientStateResponse(): QueryConnectionClientStateResponse { - return { - identifiedClientState: IdentifiedClientState.fromPartial({}), - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryConnectionClientStateResponse = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionClientStateResponse", - aminoType: "cosmos-sdk/QueryConnectionClientStateResponse", - encode(message: QueryConnectionClientStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.identifiedClientState !== undefined) { - IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(10).fork()).ldelim(); - } - if (message.proof.length !== 0) { - writer.uint32(18).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionClientStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionClientStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifiedClientState = IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionClientStateResponse { - return { - identifiedClientState: isSet(object.identifiedClientState) ? IdentifiedClientState.fromJSON(object.identifiedClientState) : undefined, - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryConnectionClientStateResponse): unknown { - const obj: any = {}; - message.identifiedClientState !== undefined && (obj.identifiedClientState = message.identifiedClientState ? IdentifiedClientState.toJSON(message.identifiedClientState) : undefined); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionClientStateResponse { - const message = createBaseQueryConnectionClientStateResponse(); - message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null ? IdentifiedClientState.fromPartial(object.identifiedClientState) : undefined; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryConnectionClientStateResponseSDKType): QueryConnectionClientStateResponse { - return { - identifiedClientState: object.identified_client_state ? IdentifiedClientState.fromSDK(object.identified_client_state) : undefined, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryConnectionClientStateResponse): QueryConnectionClientStateResponseSDKType { - const obj: any = {}; - message.identifiedClientState !== undefined && (obj.identified_client_state = message.identifiedClientState ? IdentifiedClientState.toSDK(message.identifiedClientState) : undefined); - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionClientStateResponseAmino): QueryConnectionClientStateResponse { - return { - identifiedClientState: object?.identified_client_state ? IdentifiedClientState.fromAmino(object.identified_client_state) : undefined, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryConnectionClientStateResponse): QueryConnectionClientStateResponseAmino { - const obj: any = {}; - obj.identified_client_state = message.identifiedClientState ? IdentifiedClientState.toAmino(message.identifiedClientState) : undefined; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryConnectionClientStateResponseAminoMsg): QueryConnectionClientStateResponse { - return QueryConnectionClientStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionClientStateResponse): QueryConnectionClientStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionClientStateResponse", - value: QueryConnectionClientStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionClientStateResponseProtoMsg): QueryConnectionClientStateResponse { - return QueryConnectionClientStateResponse.decode(message.value); - }, - toProto(message: QueryConnectionClientStateResponse): Uint8Array { - return QueryConnectionClientStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionClientStateResponse): QueryConnectionClientStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionClientStateResponse", - value: QueryConnectionClientStateResponse.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionConsensusStateRequest(): QueryConnectionConsensusStateRequest { - return { - connectionId: "", - revisionNumber: BigInt(0), - revisionHeight: BigInt(0) - }; -} -export const QueryConnectionConsensusStateRequest = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionConsensusStateRequest", - aminoType: "cosmos-sdk/QueryConnectionConsensusStateRequest", - encode(message: QueryConnectionConsensusStateRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.revisionNumber !== BigInt(0)) { - writer.uint32(16).uint64(message.revisionNumber); - } - if (message.revisionHeight !== BigInt(0)) { - writer.uint32(24).uint64(message.revisionHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionConsensusStateRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionConsensusStateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.revisionNumber = reader.uint64(); - break; - case 3: - message.revisionHeight = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionConsensusStateRequest { - return { - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - revisionNumber: isSet(object.revisionNumber) ? BigInt(object.revisionNumber.toString()) : BigInt(0), - revisionHeight: isSet(object.revisionHeight) ? BigInt(object.revisionHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryConnectionConsensusStateRequest): unknown { - const obj: any = {}; - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - message.revisionNumber !== undefined && (obj.revisionNumber = (message.revisionNumber || BigInt(0)).toString()); - message.revisionHeight !== undefined && (obj.revisionHeight = (message.revisionHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionConsensusStateRequest { - const message = createBaseQueryConnectionConsensusStateRequest(); - message.connectionId = object.connectionId ?? ""; - message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null ? BigInt(object.revisionNumber.toString()) : BigInt(0); - message.revisionHeight = object.revisionHeight !== undefined && object.revisionHeight !== null ? BigInt(object.revisionHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryConnectionConsensusStateRequestSDKType): QueryConnectionConsensusStateRequest { - return { - connectionId: object?.connection_id, - revisionNumber: object?.revision_number, - revisionHeight: object?.revision_height - }; - }, - toSDK(message: QueryConnectionConsensusStateRequest): QueryConnectionConsensusStateRequestSDKType { - const obj: any = {}; - obj.connection_id = message.connectionId; - obj.revision_number = message.revisionNumber; - obj.revision_height = message.revisionHeight; - return obj; - }, - fromAmino(object: QueryConnectionConsensusStateRequestAmino): QueryConnectionConsensusStateRequest { - return { - connectionId: object.connection_id, - revisionNumber: BigInt(object.revision_number), - revisionHeight: BigInt(object.revision_height) - }; - }, - toAmino(message: QueryConnectionConsensusStateRequest): QueryConnectionConsensusStateRequestAmino { - const obj: any = {}; - obj.connection_id = message.connectionId; - obj.revision_number = message.revisionNumber ? message.revisionNumber.toString() : undefined; - obj.revision_height = message.revisionHeight ? message.revisionHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryConnectionConsensusStateRequestAminoMsg): QueryConnectionConsensusStateRequest { - return QueryConnectionConsensusStateRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionConsensusStateRequest): QueryConnectionConsensusStateRequestAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionConsensusStateRequest", - value: QueryConnectionConsensusStateRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionConsensusStateRequestProtoMsg): QueryConnectionConsensusStateRequest { - return QueryConnectionConsensusStateRequest.decode(message.value); - }, - toProto(message: QueryConnectionConsensusStateRequest): Uint8Array { - return QueryConnectionConsensusStateRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionConsensusStateRequest): QueryConnectionConsensusStateRequestProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionConsensusStateRequest", - value: QueryConnectionConsensusStateRequest.encode(message).finish() - }; - } -}; -function createBaseQueryConnectionConsensusStateResponse(): QueryConnectionConsensusStateResponse { - return { - consensusState: Any.fromPartial({}), - clientId: "", - proof: new Uint8Array(), - proofHeight: Height.fromPartial({}) - }; -} -export const QueryConnectionConsensusStateResponse = { - typeUrl: "/ibc.core.connection.v1.QueryConnectionConsensusStateResponse", - aminoType: "cosmos-sdk/QueryConnectionConsensusStateResponse", - encode(message: QueryConnectionConsensusStateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim(); - } - if (message.clientId !== "") { - writer.uint32(18).string(message.clientId); - } - if (message.proof.length !== 0) { - writer.uint32(26).bytes(message.proof); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryConnectionConsensusStateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryConnectionConsensusStateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - case 2: - message.clientId = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryConnectionConsensusStateResponse { - return { - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined, - clientId: isSet(object.clientId) ? String(object.clientId) : "", - proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined - }; - }, - toJSON(message: QueryConnectionConsensusStateResponse): unknown { - const obj: any = {}; - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - message.clientId !== undefined && (obj.clientId = message.clientId); - message.proof !== undefined && (obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryConnectionConsensusStateResponse { - const message = createBaseQueryConnectionConsensusStateResponse(); - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - message.clientId = object.clientId ?? ""; - message.proof = object.proof ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - return message; - }, - fromSDK(object: QueryConnectionConsensusStateResponseSDKType): QueryConnectionConsensusStateResponse { - return { - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined, - clientId: object?.client_id, - proof: object?.proof, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined - }; - }, - toSDK(message: QueryConnectionConsensusStateResponse): QueryConnectionConsensusStateResponseSDKType { - const obj: any = {}; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - obj.client_id = message.clientId; - obj.proof = message.proof; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - return obj; - }, - fromAmino(object: QueryConnectionConsensusStateResponseAmino): QueryConnectionConsensusStateResponse { - return { - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined, - clientId: object.client_id, - proof: object.proof, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined - }; - }, - toAmino(message: QueryConnectionConsensusStateResponse): QueryConnectionConsensusStateResponseAmino { - const obj: any = {}; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - obj.client_id = message.clientId; - obj.proof = message.proof; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - return obj; - }, - fromAminoMsg(object: QueryConnectionConsensusStateResponseAminoMsg): QueryConnectionConsensusStateResponse { - return QueryConnectionConsensusStateResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryConnectionConsensusStateResponse): QueryConnectionConsensusStateResponseAminoMsg { - return { - type: "cosmos-sdk/QueryConnectionConsensusStateResponse", - value: QueryConnectionConsensusStateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConnectionConsensusStateResponseProtoMsg): QueryConnectionConsensusStateResponse { - return QueryConnectionConsensusStateResponse.decode(message.value); - }, - toProto(message: QueryConnectionConsensusStateResponse): Uint8Array { - return QueryConnectionConsensusStateResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryConnectionConsensusStateResponse): QueryConnectionConsensusStateResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.QueryConnectionConsensusStateResponse", - value: QueryConnectionConsensusStateResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.amino.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.amino.ts deleted file mode 100644 index 1ad57704..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.amino.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm } from "./tx"; -export const AminoConverter = { - "/ibc.core.connection.v1.MsgConnectionOpenInit": { - aminoType: "cosmos-sdk/MsgConnectionOpenInit", - toAmino: MsgConnectionOpenInit.toAmino, - fromAmino: MsgConnectionOpenInit.fromAmino - }, - "/ibc.core.connection.v1.MsgConnectionOpenTry": { - aminoType: "cosmos-sdk/MsgConnectionOpenTry", - toAmino: MsgConnectionOpenTry.toAmino, - fromAmino: MsgConnectionOpenTry.fromAmino - }, - "/ibc.core.connection.v1.MsgConnectionOpenAck": { - aminoType: "cosmos-sdk/MsgConnectionOpenAck", - toAmino: MsgConnectionOpenAck.toAmino, - fromAmino: MsgConnectionOpenAck.fromAmino - }, - "/ibc.core.connection.v1.MsgConnectionOpenConfirm": { - aminoType: "cosmos-sdk/MsgConnectionOpenConfirm", - toAmino: MsgConnectionOpenConfirm.toAmino, - fromAmino: MsgConnectionOpenConfirm.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.registry.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.registry.ts deleted file mode 100644 index ba0d4890..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.registry.ts +++ /dev/null @@ -1,141 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/ibc.core.connection.v1.MsgConnectionOpenInit", MsgConnectionOpenInit], ["/ibc.core.connection.v1.MsgConnectionOpenTry", MsgConnectionOpenTry], ["/ibc.core.connection.v1.MsgConnectionOpenAck", MsgConnectionOpenAck], ["/ibc.core.connection.v1.MsgConnectionOpenConfirm", MsgConnectionOpenConfirm]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - connectionOpenInit(value: MsgConnectionOpenInit) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - value: MsgConnectionOpenInit.encode(value).finish() - }; - }, - connectionOpenTry(value: MsgConnectionOpenTry) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - value: MsgConnectionOpenTry.encode(value).finish() - }; - }, - connectionOpenAck(value: MsgConnectionOpenAck) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - value: MsgConnectionOpenAck.encode(value).finish() - }; - }, - connectionOpenConfirm(value: MsgConnectionOpenConfirm) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - value: MsgConnectionOpenConfirm.encode(value).finish() - }; - } - }, - withTypeUrl: { - connectionOpenInit(value: MsgConnectionOpenInit) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - value - }; - }, - connectionOpenTry(value: MsgConnectionOpenTry) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - value - }; - }, - connectionOpenAck(value: MsgConnectionOpenAck) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - value - }; - }, - connectionOpenConfirm(value: MsgConnectionOpenConfirm) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - value - }; - } - }, - toJSON: { - connectionOpenInit(value: MsgConnectionOpenInit) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - value: MsgConnectionOpenInit.toJSON(value) - }; - }, - connectionOpenTry(value: MsgConnectionOpenTry) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - value: MsgConnectionOpenTry.toJSON(value) - }; - }, - connectionOpenAck(value: MsgConnectionOpenAck) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - value: MsgConnectionOpenAck.toJSON(value) - }; - }, - connectionOpenConfirm(value: MsgConnectionOpenConfirm) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - value: MsgConnectionOpenConfirm.toJSON(value) - }; - } - }, - fromJSON: { - connectionOpenInit(value: any) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - value: MsgConnectionOpenInit.fromJSON(value) - }; - }, - connectionOpenTry(value: any) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - value: MsgConnectionOpenTry.fromJSON(value) - }; - }, - connectionOpenAck(value: any) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - value: MsgConnectionOpenAck.fromJSON(value) - }; - }, - connectionOpenConfirm(value: any) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - value: MsgConnectionOpenConfirm.fromJSON(value) - }; - } - }, - fromPartial: { - connectionOpenInit(value: MsgConnectionOpenInit) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - value: MsgConnectionOpenInit.fromPartial(value) - }; - }, - connectionOpenTry(value: MsgConnectionOpenTry) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - value: MsgConnectionOpenTry.fromPartial(value) - }; - }, - connectionOpenAck(value: MsgConnectionOpenAck) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - value: MsgConnectionOpenAck.fromPartial(value) - }; - }, - connectionOpenConfirm(value: MsgConnectionOpenConfirm) { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - value: MsgConnectionOpenConfirm.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts deleted file mode 100644 index d5a21279..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { MsgConnectionOpenInit, MsgConnectionOpenInitResponse, MsgConnectionOpenTry, MsgConnectionOpenTryResponse, MsgConnectionOpenAck, MsgConnectionOpenAckResponse, MsgConnectionOpenConfirm, MsgConnectionOpenConfirmResponse } from "./tx"; -/** Msg defines the ibc/connection Msg service. */ -export interface Msg { - /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ - connectionOpenInit(request: MsgConnectionOpenInit): Promise; - /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ - connectionOpenTry(request: MsgConnectionOpenTry): Promise; - /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ - connectionOpenAck(request: MsgConnectionOpenAck): Promise; - /** - * ConnectionOpenConfirm defines a rpc handler method for - * MsgConnectionOpenConfirm. - */ - connectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.connectionOpenInit = this.connectionOpenInit.bind(this); - this.connectionOpenTry = this.connectionOpenTry.bind(this); - this.connectionOpenAck = this.connectionOpenAck.bind(this); - this.connectionOpenConfirm = this.connectionOpenConfirm.bind(this); - } - connectionOpenInit(request: MsgConnectionOpenInit): Promise { - const data = MsgConnectionOpenInit.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenInit", data); - return promise.then(data => MsgConnectionOpenInitResponse.decode(new BinaryReader(data))); - } - connectionOpenTry(request: MsgConnectionOpenTry): Promise { - const data = MsgConnectionOpenTry.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenTry", data); - return promise.then(data => MsgConnectionOpenTryResponse.decode(new BinaryReader(data))); - } - connectionOpenAck(request: MsgConnectionOpenAck): Promise { - const data = MsgConnectionOpenAck.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenAck", data); - return promise.then(data => MsgConnectionOpenAckResponse.decode(new BinaryReader(data))); - } - connectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise { - const data = MsgConnectionOpenConfirm.encode(request).finish(); - const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenConfirm", data); - return promise.then(data => MsgConnectionOpenConfirmResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.ts b/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.ts deleted file mode 100644 index e1927ddf..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/connection/v1/tx.ts +++ /dev/null @@ -1,1332 +0,0 @@ -import { Counterparty, CounterpartyAmino, CounterpartySDKType, Version, VersionAmino, VersionSDKType } from "./connection"; -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { Height, HeightAmino, HeightSDKType } from "../../client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * MsgConnectionOpenInit defines the msg sent by an account on Chain A to - * initialize a connection with Chain B. - */ -export interface MsgConnectionOpenInit { - clientId: string; - counterparty: Counterparty | undefined; - version: Version | undefined; - delayPeriod: bigint; - signer: string; -} -export interface MsgConnectionOpenInitProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit"; - value: Uint8Array; -} -/** - * MsgConnectionOpenInit defines the msg sent by an account on Chain A to - * initialize a connection with Chain B. - */ -export interface MsgConnectionOpenInitAmino { - client_id: string; - counterparty?: CounterpartyAmino | undefined; - version?: VersionAmino | undefined; - delay_period: string; - signer: string; -} -export interface MsgConnectionOpenInitAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenInit"; - value: MsgConnectionOpenInitAmino; -} -/** - * MsgConnectionOpenInit defines the msg sent by an account on Chain A to - * initialize a connection with Chain B. - */ -export interface MsgConnectionOpenInitSDKType { - client_id: string; - counterparty: CounterpartySDKType | undefined; - version: VersionSDKType | undefined; - delay_period: bigint; - signer: string; -} -/** - * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response - * type. - */ -export interface MsgConnectionOpenInitResponse {} -export interface MsgConnectionOpenInitResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse"; - value: Uint8Array; -} -/** - * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response - * type. - */ -export interface MsgConnectionOpenInitResponseAmino {} -export interface MsgConnectionOpenInitResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenInitResponse"; - value: MsgConnectionOpenInitResponseAmino; -} -/** - * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response - * type. - */ -export interface MsgConnectionOpenInitResponseSDKType {} -/** - * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a - * connection on Chain B. - */ -export interface MsgConnectionOpenTry { - clientId: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need - * the connection identifier of the previous connection in state INIT - */ - previousConnectionId: string; - clientState: Any | undefined; - counterparty: Counterparty | undefined; - delayPeriod: bigint; - counterpartyVersions: Version[]; - proofHeight: Height | undefined; - /** - * proof of the initialization the connection on Chain A: `UNITIALIZED -> - * INIT` - */ - proofInit: Uint8Array; - /** proof of client state included in message */ - proofClient: Uint8Array; - /** proof of client consensus state */ - proofConsensus: Uint8Array; - consensusHeight: Height | undefined; - signer: string; -} -export interface MsgConnectionOpenTryProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry"; - value: Uint8Array; -} -/** - * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a - * connection on Chain B. - */ -export interface MsgConnectionOpenTryAmino { - client_id: string; - /** - * in the case of crossing hello's, when both chains call OpenInit, we need - * the connection identifier of the previous connection in state INIT - */ - previous_connection_id: string; - client_state?: AnyAmino | undefined; - counterparty?: CounterpartyAmino | undefined; - delay_period: string; - counterparty_versions: VersionAmino[]; - proof_height?: HeightAmino | undefined; - /** - * proof of the initialization the connection on Chain A: `UNITIALIZED -> - * INIT` - */ - proof_init: Uint8Array; - /** proof of client state included in message */ - proof_client: Uint8Array; - /** proof of client consensus state */ - proof_consensus: Uint8Array; - consensus_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgConnectionOpenTryAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenTry"; - value: MsgConnectionOpenTryAmino; -} -/** - * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a - * connection on Chain B. - */ -export interface MsgConnectionOpenTrySDKType { - client_id: string; - previous_connection_id: string; - client_state: AnySDKType | undefined; - counterparty: CounterpartySDKType | undefined; - delay_period: bigint; - counterparty_versions: VersionSDKType[]; - proof_height: HeightSDKType | undefined; - proof_init: Uint8Array; - proof_client: Uint8Array; - proof_consensus: Uint8Array; - consensus_height: HeightSDKType | undefined; - signer: string; -} -/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponse {} -export interface MsgConnectionOpenTryResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse"; - value: Uint8Array; -} -/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponseAmino {} -export interface MsgConnectionOpenTryResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenTryResponse"; - value: MsgConnectionOpenTryResponseAmino; -} -/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponseSDKType {} -/** - * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to - * acknowledge the change of connection state to TRYOPEN on Chain B. - */ -export interface MsgConnectionOpenAck { - connectionId: string; - counterpartyConnectionId: string; - version: Version | undefined; - clientState: Any | undefined; - proofHeight: Height | undefined; - /** - * proof of the initialization the connection on Chain B: `UNITIALIZED -> - * TRYOPEN` - */ - proofTry: Uint8Array; - /** proof of client state included in message */ - proofClient: Uint8Array; - /** proof of client consensus state */ - proofConsensus: Uint8Array; - consensusHeight: Height | undefined; - signer: string; -} -export interface MsgConnectionOpenAckProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck"; - value: Uint8Array; -} -/** - * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to - * acknowledge the change of connection state to TRYOPEN on Chain B. - */ -export interface MsgConnectionOpenAckAmino { - connection_id: string; - counterparty_connection_id: string; - version?: VersionAmino | undefined; - client_state?: AnyAmino | undefined; - proof_height?: HeightAmino | undefined; - /** - * proof of the initialization the connection on Chain B: `UNITIALIZED -> - * TRYOPEN` - */ - proof_try: Uint8Array; - /** proof of client state included in message */ - proof_client: Uint8Array; - /** proof of client consensus state */ - proof_consensus: Uint8Array; - consensus_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgConnectionOpenAckAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenAck"; - value: MsgConnectionOpenAckAmino; -} -/** - * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to - * acknowledge the change of connection state to TRYOPEN on Chain B. - */ -export interface MsgConnectionOpenAckSDKType { - connection_id: string; - counterparty_connection_id: string; - version: VersionSDKType | undefined; - client_state: AnySDKType | undefined; - proof_height: HeightSDKType | undefined; - proof_try: Uint8Array; - proof_client: Uint8Array; - proof_consensus: Uint8Array; - consensus_height: HeightSDKType | undefined; - signer: string; -} -/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponse {} -export interface MsgConnectionOpenAckResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse"; - value: Uint8Array; -} -/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponseAmino {} -export interface MsgConnectionOpenAckResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenAckResponse"; - value: MsgConnectionOpenAckResponseAmino; -} -/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponseSDKType {} -/** - * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of connection state to OPEN on Chain A. - */ -export interface MsgConnectionOpenConfirm { - connectionId: string; - /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */ - proofAck: Uint8Array; - proofHeight: Height | undefined; - signer: string; -} -export interface MsgConnectionOpenConfirmProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm"; - value: Uint8Array; -} -/** - * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of connection state to OPEN on Chain A. - */ -export interface MsgConnectionOpenConfirmAmino { - connection_id: string; - /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */ - proof_ack: Uint8Array; - proof_height?: HeightAmino | undefined; - signer: string; -} -export interface MsgConnectionOpenConfirmAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenConfirm"; - value: MsgConnectionOpenConfirmAmino; -} -/** - * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to - * acknowledge the change of connection state to OPEN on Chain A. - */ -export interface MsgConnectionOpenConfirmSDKType { - connection_id: string; - proof_ack: Uint8Array; - proof_height: HeightSDKType | undefined; - signer: string; -} -/** - * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm - * response type. - */ -export interface MsgConnectionOpenConfirmResponse {} -export interface MsgConnectionOpenConfirmResponseProtoMsg { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse"; - value: Uint8Array; -} -/** - * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm - * response type. - */ -export interface MsgConnectionOpenConfirmResponseAmino {} -export interface MsgConnectionOpenConfirmResponseAminoMsg { - type: "cosmos-sdk/MsgConnectionOpenConfirmResponse"; - value: MsgConnectionOpenConfirmResponseAmino; -} -/** - * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm - * response type. - */ -export interface MsgConnectionOpenConfirmResponseSDKType {} -function createBaseMsgConnectionOpenInit(): MsgConnectionOpenInit { - return { - clientId: "", - counterparty: Counterparty.fromPartial({}), - version: Version.fromPartial({}), - delayPeriod: BigInt(0), - signer: "" - }; -} -export const MsgConnectionOpenInit = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - aminoType: "cosmos-sdk/MsgConnectionOpenInit", - encode(message: MsgConnectionOpenInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(18).fork()).ldelim(); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.delayPeriod !== BigInt(0)) { - writer.uint32(32).uint64(message.delayPeriod); - } - if (message.signer !== "") { - writer.uint32(42).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenInit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenInit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.delayPeriod = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgConnectionOpenInit { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - version: isSet(object.version) ? Version.fromJSON(object.version) : undefined, - delayPeriod: isSet(object.delayPeriod) ? BigInt(object.delayPeriod.toString()) : BigInt(0), - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgConnectionOpenInit): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - message.version !== undefined && (obj.version = message.version ? Version.toJSON(message.version) : undefined); - message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || BigInt(0)).toString()); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgConnectionOpenInit { - const message = createBaseMsgConnectionOpenInit(); - message.clientId = object.clientId ?? ""; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.version = object.version !== undefined && object.version !== null ? Version.fromPartial(object.version) : undefined; - message.delayPeriod = object.delayPeriod !== undefined && object.delayPeriod !== null ? BigInt(object.delayPeriod.toString()) : BigInt(0); - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgConnectionOpenInitSDKType): MsgConnectionOpenInit { - return { - clientId: object?.client_id, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - version: object.version ? Version.fromSDK(object.version) : undefined, - delayPeriod: object?.delay_period, - signer: object?.signer - }; - }, - toSDK(message: MsgConnectionOpenInit): MsgConnectionOpenInitSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - message.version !== undefined && (obj.version = message.version ? Version.toSDK(message.version) : undefined); - obj.delay_period = message.delayPeriod; - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgConnectionOpenInitAmino): MsgConnectionOpenInit { - return { - clientId: object.client_id, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - version: object?.version ? Version.fromAmino(object.version) : undefined, - delayPeriod: BigInt(object.delay_period), - signer: object.signer - }; - }, - toAmino(message: MsgConnectionOpenInit): MsgConnectionOpenInitAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - obj.version = message.version ? Version.toAmino(message.version) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenInitAminoMsg): MsgConnectionOpenInit { - return MsgConnectionOpenInit.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenInit): MsgConnectionOpenInitAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenInit", - value: MsgConnectionOpenInit.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenInitProtoMsg): MsgConnectionOpenInit { - return MsgConnectionOpenInit.decode(message.value); - }, - toProto(message: MsgConnectionOpenInit): Uint8Array { - return MsgConnectionOpenInit.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenInit): MsgConnectionOpenInitProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInit", - value: MsgConnectionOpenInit.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse { - return {}; -} -export const MsgConnectionOpenInitResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenInitResponse", - encode(_: MsgConnectionOpenInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenInitResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenInitResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgConnectionOpenInitResponse { - return {}; - }, - toJSON(_: MsgConnectionOpenInitResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgConnectionOpenInitResponse { - const message = createBaseMsgConnectionOpenInitResponse(); - return message; - }, - fromSDK(_: MsgConnectionOpenInitResponseSDKType): MsgConnectionOpenInitResponse { - return {}; - }, - toSDK(_: MsgConnectionOpenInitResponse): MsgConnectionOpenInitResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgConnectionOpenInitResponseAmino): MsgConnectionOpenInitResponse { - return {}; - }, - toAmino(_: MsgConnectionOpenInitResponse): MsgConnectionOpenInitResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenInitResponseAminoMsg): MsgConnectionOpenInitResponse { - return MsgConnectionOpenInitResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenInitResponse): MsgConnectionOpenInitResponseAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenInitResponse", - value: MsgConnectionOpenInitResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenInitResponseProtoMsg): MsgConnectionOpenInitResponse { - return MsgConnectionOpenInitResponse.decode(message.value); - }, - toProto(message: MsgConnectionOpenInitResponse): Uint8Array { - return MsgConnectionOpenInitResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenInitResponse): MsgConnectionOpenInitResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenInitResponse", - value: MsgConnectionOpenInitResponse.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { - return { - clientId: "", - previousConnectionId: "", - clientState: Any.fromPartial({}), - counterparty: Counterparty.fromPartial({}), - delayPeriod: BigInt(0), - counterpartyVersions: [], - proofHeight: Height.fromPartial({}), - proofInit: new Uint8Array(), - proofClient: new Uint8Array(), - proofConsensus: new Uint8Array(), - consensusHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgConnectionOpenTry = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - aminoType: "cosmos-sdk/MsgConnectionOpenTry", - encode(message: MsgConnectionOpenTry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.previousConnectionId !== "") { - writer.uint32(18).string(message.previousConnectionId); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(26).fork()).ldelim(); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(34).fork()).ldelim(); - } - if (message.delayPeriod !== BigInt(0)) { - writer.uint32(40).uint64(message.delayPeriod); - } - for (const v of message.counterpartyVersions) { - Version.encode(v!, writer.uint32(50).fork()).ldelim(); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(58).fork()).ldelim(); - } - if (message.proofInit.length !== 0) { - writer.uint32(66).bytes(message.proofInit); - } - if (message.proofClient.length !== 0) { - writer.uint32(74).bytes(message.proofClient); - } - if (message.proofConsensus.length !== 0) { - writer.uint32(82).bytes(message.proofConsensus); - } - if (message.consensusHeight !== undefined) { - Height.encode(message.consensusHeight, writer.uint32(90).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(98).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenTry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenTry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.previousConnectionId = reader.string(); - break; - case 3: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delayPeriod = reader.uint64(); - break; - case 6: - message.counterpartyVersions.push(Version.decode(reader, reader.uint32())); - break; - case 7: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.proofInit = reader.bytes(); - break; - case 9: - message.proofClient = reader.bytes(); - break; - case 10: - message.proofConsensus = reader.bytes(); - break; - case 11: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgConnectionOpenTry { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - previousConnectionId: isSet(object.previousConnectionId) ? String(object.previousConnectionId) : "", - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? BigInt(object.delayPeriod.toString()) : BigInt(0), - counterpartyVersions: Array.isArray(object?.counterpartyVersions) ? object.counterpartyVersions.map((e: any) => Version.fromJSON(e)) : [], - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - proofInit: isSet(object.proofInit) ? bytesFromBase64(object.proofInit) : new Uint8Array(), - proofClient: isSet(object.proofClient) ? bytesFromBase64(object.proofClient) : new Uint8Array(), - proofConsensus: isSet(object.proofConsensus) ? bytesFromBase64(object.proofConsensus) : new Uint8Array(), - consensusHeight: isSet(object.consensusHeight) ? Height.fromJSON(object.consensusHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgConnectionOpenTry): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.previousConnectionId !== undefined && (obj.previousConnectionId = message.previousConnectionId); - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || BigInt(0)).toString()); - if (message.counterpartyVersions) { - obj.counterpartyVersions = message.counterpartyVersions.map(e => e ? Version.toJSON(e) : undefined); - } else { - obj.counterpartyVersions = []; - } - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.proofInit !== undefined && (obj.proofInit = base64FromBytes(message.proofInit !== undefined ? message.proofInit : new Uint8Array())); - message.proofClient !== undefined && (obj.proofClient = base64FromBytes(message.proofClient !== undefined ? message.proofClient : new Uint8Array())); - message.proofConsensus !== undefined && (obj.proofConsensus = base64FromBytes(message.proofConsensus !== undefined ? message.proofConsensus : new Uint8Array())); - message.consensusHeight !== undefined && (obj.consensusHeight = message.consensusHeight ? Height.toJSON(message.consensusHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgConnectionOpenTry { - const message = createBaseMsgConnectionOpenTry(); - message.clientId = object.clientId ?? ""; - message.previousConnectionId = object.previousConnectionId ?? ""; - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.delayPeriod = object.delayPeriod !== undefined && object.delayPeriod !== null ? BigInt(object.delayPeriod.toString()) : BigInt(0); - message.counterpartyVersions = object.counterpartyVersions?.map(e => Version.fromPartial(e)) || []; - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.proofInit = object.proofInit ?? new Uint8Array(); - message.proofClient = object.proofClient ?? new Uint8Array(); - message.proofConsensus = object.proofConsensus ?? new Uint8Array(); - message.consensusHeight = object.consensusHeight !== undefined && object.consensusHeight !== null ? Height.fromPartial(object.consensusHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgConnectionOpenTrySDKType): MsgConnectionOpenTry { - return { - clientId: object?.client_id, - previousConnectionId: object?.previous_connection_id, - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - delayPeriod: object?.delay_period, - counterpartyVersions: Array.isArray(object?.counterparty_versions) ? object.counterparty_versions.map((e: any) => Version.fromSDK(e)) : [], - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - proofInit: object?.proof_init, - proofClient: object?.proof_client, - proofConsensus: object?.proof_consensus, - consensusHeight: object.consensus_height ? Height.fromSDK(object.consensus_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgConnectionOpenTry): MsgConnectionOpenTrySDKType { - const obj: any = {}; - obj.client_id = message.clientId; - obj.previous_connection_id = message.previousConnectionId; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - obj.delay_period = message.delayPeriod; - if (message.counterpartyVersions) { - obj.counterparty_versions = message.counterpartyVersions.map(e => e ? Version.toSDK(e) : undefined); - } else { - obj.counterparty_versions = []; - } - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.proof_init = message.proofInit; - obj.proof_client = message.proofClient; - obj.proof_consensus = message.proofConsensus; - message.consensusHeight !== undefined && (obj.consensus_height = message.consensusHeight ? Height.toSDK(message.consensusHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgConnectionOpenTryAmino): MsgConnectionOpenTry { - return { - clientId: object.client_id, - previousConnectionId: object.previous_connection_id, - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - delayPeriod: BigInt(object.delay_period), - counterpartyVersions: Array.isArray(object?.counterparty_versions) ? object.counterparty_versions.map((e: any) => Version.fromAmino(e)) : [], - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - proofInit: object.proof_init, - proofClient: object.proof_client, - proofConsensus: object.proof_consensus, - consensusHeight: object?.consensus_height ? Height.fromAmino(object.consensus_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgConnectionOpenTry): MsgConnectionOpenTryAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.previous_connection_id = message.previousConnectionId; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - obj.delay_period = message.delayPeriod ? message.delayPeriod.toString() : undefined; - if (message.counterpartyVersions) { - obj.counterparty_versions = message.counterpartyVersions.map(e => e ? Version.toAmino(e) : undefined); - } else { - obj.counterparty_versions = []; - } - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.proof_init = message.proofInit; - obj.proof_client = message.proofClient; - obj.proof_consensus = message.proofConsensus; - obj.consensus_height = message.consensusHeight ? Height.toAmino(message.consensusHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenTryAminoMsg): MsgConnectionOpenTry { - return MsgConnectionOpenTry.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenTry): MsgConnectionOpenTryAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenTry", - value: MsgConnectionOpenTry.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenTryProtoMsg): MsgConnectionOpenTry { - return MsgConnectionOpenTry.decode(message.value); - }, - toProto(message: MsgConnectionOpenTry): Uint8Array { - return MsgConnectionOpenTry.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenTry): MsgConnectionOpenTryProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTry", - value: MsgConnectionOpenTry.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse { - return {}; -} -export const MsgConnectionOpenTryResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenTryResponse", - encode(_: MsgConnectionOpenTryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenTryResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenTryResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgConnectionOpenTryResponse { - return {}; - }, - toJSON(_: MsgConnectionOpenTryResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgConnectionOpenTryResponse { - const message = createBaseMsgConnectionOpenTryResponse(); - return message; - }, - fromSDK(_: MsgConnectionOpenTryResponseSDKType): MsgConnectionOpenTryResponse { - return {}; - }, - toSDK(_: MsgConnectionOpenTryResponse): MsgConnectionOpenTryResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgConnectionOpenTryResponseAmino): MsgConnectionOpenTryResponse { - return {}; - }, - toAmino(_: MsgConnectionOpenTryResponse): MsgConnectionOpenTryResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenTryResponseAminoMsg): MsgConnectionOpenTryResponse { - return MsgConnectionOpenTryResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenTryResponse): MsgConnectionOpenTryResponseAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenTryResponse", - value: MsgConnectionOpenTryResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenTryResponseProtoMsg): MsgConnectionOpenTryResponse { - return MsgConnectionOpenTryResponse.decode(message.value); - }, - toProto(message: MsgConnectionOpenTryResponse): Uint8Array { - return MsgConnectionOpenTryResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenTryResponse): MsgConnectionOpenTryResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenTryResponse", - value: MsgConnectionOpenTryResponse.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { - return { - connectionId: "", - counterpartyConnectionId: "", - version: Version.fromPartial({}), - clientState: Any.fromPartial({}), - proofHeight: Height.fromPartial({}), - proofTry: new Uint8Array(), - proofClient: new Uint8Array(), - proofConsensus: new Uint8Array(), - consensusHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgConnectionOpenAck = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - aminoType: "cosmos-sdk/MsgConnectionOpenAck", - encode(message: MsgConnectionOpenAck, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.counterpartyConnectionId !== "") { - writer.uint32(18).string(message.counterpartyConnectionId); - } - if (message.version !== undefined) { - Version.encode(message.version, writer.uint32(26).fork()).ldelim(); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(34).fork()).ldelim(); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(42).fork()).ldelim(); - } - if (message.proofTry.length !== 0) { - writer.uint32(50).bytes(message.proofTry); - } - if (message.proofClient.length !== 0) { - writer.uint32(58).bytes(message.proofClient); - } - if (message.proofConsensus.length !== 0) { - writer.uint32(66).bytes(message.proofConsensus); - } - if (message.consensusHeight !== undefined) { - Height.encode(message.consensusHeight, writer.uint32(74).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(82).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenAck { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenAck(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.counterpartyConnectionId = reader.string(); - break; - case 3: - message.version = Version.decode(reader, reader.uint32()); - break; - case 4: - message.clientState = Any.decode(reader, reader.uint32()); - break; - case 5: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 6: - message.proofTry = reader.bytes(); - break; - case 7: - message.proofClient = reader.bytes(); - break; - case 8: - message.proofConsensus = reader.bytes(); - break; - case 9: - message.consensusHeight = Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgConnectionOpenAck { - return { - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - counterpartyConnectionId: isSet(object.counterpartyConnectionId) ? String(object.counterpartyConnectionId) : "", - version: isSet(object.version) ? Version.fromJSON(object.version) : undefined, - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - proofTry: isSet(object.proofTry) ? bytesFromBase64(object.proofTry) : new Uint8Array(), - proofClient: isSet(object.proofClient) ? bytesFromBase64(object.proofClient) : new Uint8Array(), - proofConsensus: isSet(object.proofConsensus) ? bytesFromBase64(object.proofConsensus) : new Uint8Array(), - consensusHeight: isSet(object.consensusHeight) ? Height.fromJSON(object.consensusHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgConnectionOpenAck): unknown { - const obj: any = {}; - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - message.counterpartyConnectionId !== undefined && (obj.counterpartyConnectionId = message.counterpartyConnectionId); - message.version !== undefined && (obj.version = message.version ? Version.toJSON(message.version) : undefined); - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.proofTry !== undefined && (obj.proofTry = base64FromBytes(message.proofTry !== undefined ? message.proofTry : new Uint8Array())); - message.proofClient !== undefined && (obj.proofClient = base64FromBytes(message.proofClient !== undefined ? message.proofClient : new Uint8Array())); - message.proofConsensus !== undefined && (obj.proofConsensus = base64FromBytes(message.proofConsensus !== undefined ? message.proofConsensus : new Uint8Array())); - message.consensusHeight !== undefined && (obj.consensusHeight = message.consensusHeight ? Height.toJSON(message.consensusHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgConnectionOpenAck { - const message = createBaseMsgConnectionOpenAck(); - message.connectionId = object.connectionId ?? ""; - message.counterpartyConnectionId = object.counterpartyConnectionId ?? ""; - message.version = object.version !== undefined && object.version !== null ? Version.fromPartial(object.version) : undefined; - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.proofTry = object.proofTry ?? new Uint8Array(); - message.proofClient = object.proofClient ?? new Uint8Array(); - message.proofConsensus = object.proofConsensus ?? new Uint8Array(); - message.consensusHeight = object.consensusHeight !== undefined && object.consensusHeight !== null ? Height.fromPartial(object.consensusHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgConnectionOpenAckSDKType): MsgConnectionOpenAck { - return { - connectionId: object?.connection_id, - counterpartyConnectionId: object?.counterparty_connection_id, - version: object.version ? Version.fromSDK(object.version) : undefined, - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - proofTry: object?.proof_try, - proofClient: object?.proof_client, - proofConsensus: object?.proof_consensus, - consensusHeight: object.consensus_height ? Height.fromSDK(object.consensus_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgConnectionOpenAck): MsgConnectionOpenAckSDKType { - const obj: any = {}; - obj.connection_id = message.connectionId; - obj.counterparty_connection_id = message.counterpartyConnectionId; - message.version !== undefined && (obj.version = message.version ? Version.toSDK(message.version) : undefined); - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.proof_try = message.proofTry; - obj.proof_client = message.proofClient; - obj.proof_consensus = message.proofConsensus; - message.consensusHeight !== undefined && (obj.consensus_height = message.consensusHeight ? Height.toSDK(message.consensusHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgConnectionOpenAckAmino): MsgConnectionOpenAck { - return { - connectionId: object.connection_id, - counterpartyConnectionId: object.counterparty_connection_id, - version: object?.version ? Version.fromAmino(object.version) : undefined, - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - proofTry: object.proof_try, - proofClient: object.proof_client, - proofConsensus: object.proof_consensus, - consensusHeight: object?.consensus_height ? Height.fromAmino(object.consensus_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgConnectionOpenAck): MsgConnectionOpenAckAmino { - const obj: any = {}; - obj.connection_id = message.connectionId; - obj.counterparty_connection_id = message.counterpartyConnectionId; - obj.version = message.version ? Version.toAmino(message.version) : undefined; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.proof_try = message.proofTry; - obj.proof_client = message.proofClient; - obj.proof_consensus = message.proofConsensus; - obj.consensus_height = message.consensusHeight ? Height.toAmino(message.consensusHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenAckAminoMsg): MsgConnectionOpenAck { - return MsgConnectionOpenAck.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenAck): MsgConnectionOpenAckAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenAck", - value: MsgConnectionOpenAck.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenAckProtoMsg): MsgConnectionOpenAck { - return MsgConnectionOpenAck.decode(message.value); - }, - toProto(message: MsgConnectionOpenAck): Uint8Array { - return MsgConnectionOpenAck.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenAck): MsgConnectionOpenAckProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAck", - value: MsgConnectionOpenAck.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse { - return {}; -} -export const MsgConnectionOpenAckResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenAckResponse", - encode(_: MsgConnectionOpenAckResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenAckResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenAckResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgConnectionOpenAckResponse { - return {}; - }, - toJSON(_: MsgConnectionOpenAckResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgConnectionOpenAckResponse { - const message = createBaseMsgConnectionOpenAckResponse(); - return message; - }, - fromSDK(_: MsgConnectionOpenAckResponseSDKType): MsgConnectionOpenAckResponse { - return {}; - }, - toSDK(_: MsgConnectionOpenAckResponse): MsgConnectionOpenAckResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgConnectionOpenAckResponseAmino): MsgConnectionOpenAckResponse { - return {}; - }, - toAmino(_: MsgConnectionOpenAckResponse): MsgConnectionOpenAckResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenAckResponseAminoMsg): MsgConnectionOpenAckResponse { - return MsgConnectionOpenAckResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenAckResponse): MsgConnectionOpenAckResponseAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenAckResponse", - value: MsgConnectionOpenAckResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenAckResponseProtoMsg): MsgConnectionOpenAckResponse { - return MsgConnectionOpenAckResponse.decode(message.value); - }, - toProto(message: MsgConnectionOpenAckResponse): Uint8Array { - return MsgConnectionOpenAckResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenAckResponse): MsgConnectionOpenAckResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenAckResponse", - value: MsgConnectionOpenAckResponse.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { - return { - connectionId: "", - proofAck: new Uint8Array(), - proofHeight: Height.fromPartial({}), - signer: "" - }; -} -export const MsgConnectionOpenConfirm = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - aminoType: "cosmos-sdk/MsgConnectionOpenConfirm", - encode(message: MsgConnectionOpenConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.connectionId !== "") { - writer.uint32(10).string(message.connectionId); - } - if (message.proofAck.length !== 0) { - writer.uint32(18).bytes(message.proofAck); - } - if (message.proofHeight !== undefined) { - Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.signer !== "") { - writer.uint32(34).string(message.signer); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenConfirm { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenConfirm(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connectionId = reader.string(); - break; - case 2: - message.proofAck = reader.bytes(); - break; - case 3: - message.proofHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgConnectionOpenConfirm { - return { - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - proofAck: isSet(object.proofAck) ? bytesFromBase64(object.proofAck) : new Uint8Array(), - proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - signer: isSet(object.signer) ? String(object.signer) : "" - }; - }, - toJSON(message: MsgConnectionOpenConfirm): unknown { - const obj: any = {}; - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - message.proofAck !== undefined && (obj.proofAck = base64FromBytes(message.proofAck !== undefined ? message.proofAck : new Uint8Array())); - message.proofHeight !== undefined && (obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined); - message.signer !== undefined && (obj.signer = message.signer); - return obj; - }, - fromPartial(object: DeepPartial): MsgConnectionOpenConfirm { - const message = createBaseMsgConnectionOpenConfirm(); - message.connectionId = object.connectionId ?? ""; - message.proofAck = object.proofAck ?? new Uint8Array(); - message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; - message.signer = object.signer ?? ""; - return message; - }, - fromSDK(object: MsgConnectionOpenConfirmSDKType): MsgConnectionOpenConfirm { - return { - connectionId: object?.connection_id, - proofAck: object?.proof_ack, - proofHeight: object.proof_height ? Height.fromSDK(object.proof_height) : undefined, - signer: object?.signer - }; - }, - toSDK(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmSDKType { - const obj: any = {}; - obj.connection_id = message.connectionId; - obj.proof_ack = message.proofAck; - message.proofHeight !== undefined && (obj.proof_height = message.proofHeight ? Height.toSDK(message.proofHeight) : undefined); - obj.signer = message.signer; - return obj; - }, - fromAmino(object: MsgConnectionOpenConfirmAmino): MsgConnectionOpenConfirm { - return { - connectionId: object.connection_id, - proofAck: object.proof_ack, - proofHeight: object?.proof_height ? Height.fromAmino(object.proof_height) : undefined, - signer: object.signer - }; - }, - toAmino(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmAmino { - const obj: any = {}; - obj.connection_id = message.connectionId; - obj.proof_ack = message.proofAck; - obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; - obj.signer = message.signer; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenConfirmAminoMsg): MsgConnectionOpenConfirm { - return MsgConnectionOpenConfirm.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenConfirm", - value: MsgConnectionOpenConfirm.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenConfirmProtoMsg): MsgConnectionOpenConfirm { - return MsgConnectionOpenConfirm.decode(message.value); - }, - toProto(message: MsgConnectionOpenConfirm): Uint8Array { - return MsgConnectionOpenConfirm.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirm", - value: MsgConnectionOpenConfirm.encode(message).finish() - }; - } -}; -function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse { - return {}; -} -export const MsgConnectionOpenConfirmResponse = { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", - aminoType: "cosmos-sdk/MsgConnectionOpenConfirmResponse", - encode(_: MsgConnectionOpenConfirmResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgConnectionOpenConfirmResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgConnectionOpenConfirmResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgConnectionOpenConfirmResponse { - return {}; - }, - toJSON(_: MsgConnectionOpenConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgConnectionOpenConfirmResponse { - const message = createBaseMsgConnectionOpenConfirmResponse(); - return message; - }, - fromSDK(_: MsgConnectionOpenConfirmResponseSDKType): MsgConnectionOpenConfirmResponse { - return {}; - }, - toSDK(_: MsgConnectionOpenConfirmResponse): MsgConnectionOpenConfirmResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgConnectionOpenConfirmResponseAmino): MsgConnectionOpenConfirmResponse { - return {}; - }, - toAmino(_: MsgConnectionOpenConfirmResponse): MsgConnectionOpenConfirmResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgConnectionOpenConfirmResponseAminoMsg): MsgConnectionOpenConfirmResponse { - return MsgConnectionOpenConfirmResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgConnectionOpenConfirmResponse): MsgConnectionOpenConfirmResponseAminoMsg { - return { - type: "cosmos-sdk/MsgConnectionOpenConfirmResponse", - value: MsgConnectionOpenConfirmResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgConnectionOpenConfirmResponseProtoMsg): MsgConnectionOpenConfirmResponse { - return MsgConnectionOpenConfirmResponse.decode(message.value); - }, - toProto(message: MsgConnectionOpenConfirmResponse): Uint8Array { - return MsgConnectionOpenConfirmResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgConnectionOpenConfirmResponse): MsgConnectionOpenConfirmResponseProtoMsg { - return { - typeUrl: "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse", - value: MsgConnectionOpenConfirmResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/port/v1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/ibc/core/port/v1/query.rpc.Query.ts deleted file mode 100644 index 5b149c43..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/port/v1/query.rpc.Query.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../../mobx"; -import { QueryAppVersionRequest, QueryAppVersionResponse } from "./query"; -/** Query defines the gRPC querier service */ -export interface Query { - /** AppVersion queries an IBC Port and determines the appropriate application version to be used */ - appVersion(request: QueryAppVersionRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.appVersion = this.appVersion.bind(this); - } - appVersion(request: QueryAppVersionRequest): Promise { - const data = QueryAppVersionRequest.encode(request).finish(); - const promise = this.rpc.request("ibc.core.port.v1.Query", "AppVersion", data); - return promise.then(data => QueryAppVersionResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - appVersion(request: QueryAppVersionRequest): Promise { - return queryService.appVersion(request); - } - }; -}; -export interface UseAppVersionQuery extends ReactQueryParams { - request: QueryAppVersionRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useAppVersion = ({ - request, - options - }: UseAppVersionQuery) => { - return useQuery(["appVersionQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.appVersion(request); - }, options); - }; - return { - /** AppVersion queries an IBC Port and determines the appropriate application version to be used */useAppVersion - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryAppVersionStore { - store = new QueryStore(queryService?.appVersion); - appVersion(request: QueryAppVersionRequest) { - return this.store.getData(request); - } - } - return { - /** AppVersion queries an IBC Port and determines the appropriate application version to be used */QueryAppVersionStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/port/v1/query.ts b/examples/interchainjs/src/codegen/ibc/core/port/v1/query.ts deleted file mode 100644 index 07d660b9..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/port/v1/query.ts +++ /dev/null @@ -1,318 +0,0 @@ -import { Order, Counterparty, CounterpartyAmino, CounterpartySDKType, orderFromJSON, orderToJSON } from "../../channel/v1/channel"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** QueryAppVersionRequest is the request type for the Query/AppVersion RPC method */ -export interface QueryAppVersionRequest { - /** port unique identifier */ - portId: string; - /** connection unique identifier */ - connectionId: string; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty: Counterparty | undefined; - /** proposed version */ - proposedVersion: string; -} -export interface QueryAppVersionRequestProtoMsg { - typeUrl: "/ibc.core.port.v1.QueryAppVersionRequest"; - value: Uint8Array; -} -/** QueryAppVersionRequest is the request type for the Query/AppVersion RPC method */ -export interface QueryAppVersionRequestAmino { - /** port unique identifier */ - port_id: string; - /** connection unique identifier */ - connection_id: string; - /** whether the channel is ordered or unordered */ - ordering: Order; - /** counterparty channel end */ - counterparty?: CounterpartyAmino | undefined; - /** proposed version */ - proposed_version: string; -} -export interface QueryAppVersionRequestAminoMsg { - type: "cosmos-sdk/QueryAppVersionRequest"; - value: QueryAppVersionRequestAmino; -} -/** QueryAppVersionRequest is the request type for the Query/AppVersion RPC method */ -export interface QueryAppVersionRequestSDKType { - port_id: string; - connection_id: string; - ordering: Order; - counterparty: CounterpartySDKType | undefined; - proposed_version: string; -} -/** QueryAppVersionResponse is the response type for the Query/AppVersion RPC method. */ -export interface QueryAppVersionResponse { - /** port id associated with the request identifiers */ - portId: string; - /** supported app version */ - version: string; -} -export interface QueryAppVersionResponseProtoMsg { - typeUrl: "/ibc.core.port.v1.QueryAppVersionResponse"; - value: Uint8Array; -} -/** QueryAppVersionResponse is the response type for the Query/AppVersion RPC method. */ -export interface QueryAppVersionResponseAmino { - /** port id associated with the request identifiers */ - port_id: string; - /** supported app version */ - version: string; -} -export interface QueryAppVersionResponseAminoMsg { - type: "cosmos-sdk/QueryAppVersionResponse"; - value: QueryAppVersionResponseAmino; -} -/** QueryAppVersionResponse is the response type for the Query/AppVersion RPC method. */ -export interface QueryAppVersionResponseSDKType { - port_id: string; - version: string; -} -function createBaseQueryAppVersionRequest(): QueryAppVersionRequest { - return { - portId: "", - connectionId: "", - ordering: 0, - counterparty: Counterparty.fromPartial({}), - proposedVersion: "" - }; -} -export const QueryAppVersionRequest = { - typeUrl: "/ibc.core.port.v1.QueryAppVersionRequest", - aminoType: "cosmos-sdk/QueryAppVersionRequest", - encode(message: QueryAppVersionRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.connectionId !== "") { - writer.uint32(18).string(message.connectionId); - } - if (message.ordering !== 0) { - writer.uint32(24).int32(message.ordering); - } - if (message.counterparty !== undefined) { - Counterparty.encode(message.counterparty, writer.uint32(34).fork()).ldelim(); - } - if (message.proposedVersion !== "") { - writer.uint32(42).string(message.proposedVersion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAppVersionRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAppVersionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.connectionId = reader.string(); - break; - case 3: - message.ordering = (reader.int32() as any); - break; - case 4: - message.counterparty = Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.proposedVersion = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAppVersionRequest { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - proposedVersion: isSet(object.proposedVersion) ? String(object.proposedVersion) : "" - }; - }, - toJSON(message: QueryAppVersionRequest): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.connectionId !== undefined && (obj.connectionId = message.connectionId); - message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); - message.proposedVersion !== undefined && (obj.proposedVersion = message.proposedVersion); - return obj; - }, - fromPartial(object: DeepPartial): QueryAppVersionRequest { - const message = createBaseQueryAppVersionRequest(); - message.portId = object.portId ?? ""; - message.connectionId = object.connectionId ?? ""; - message.ordering = object.ordering ?? 0; - message.counterparty = object.counterparty !== undefined && object.counterparty !== null ? Counterparty.fromPartial(object.counterparty) : undefined; - message.proposedVersion = object.proposedVersion ?? ""; - return message; - }, - fromSDK(object: QueryAppVersionRequestSDKType): QueryAppVersionRequest { - return { - portId: object?.port_id, - connectionId: object?.connection_id, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: object.counterparty ? Counterparty.fromSDK(object.counterparty) : undefined, - proposedVersion: object?.proposed_version - }; - }, - toSDK(message: QueryAppVersionRequest): QueryAppVersionRequestSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.connection_id = message.connectionId; - message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering)); - message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toSDK(message.counterparty) : undefined); - obj.proposed_version = message.proposedVersion; - return obj; - }, - fromAmino(object: QueryAppVersionRequestAmino): QueryAppVersionRequest { - return { - portId: object.port_id, - connectionId: object.connection_id, - ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1, - counterparty: object?.counterparty ? Counterparty.fromAmino(object.counterparty) : undefined, - proposedVersion: object.proposed_version - }; - }, - toAmino(message: QueryAppVersionRequest): QueryAppVersionRequestAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.connection_id = message.connectionId; - obj.ordering = message.ordering; - obj.counterparty = message.counterparty ? Counterparty.toAmino(message.counterparty) : undefined; - obj.proposed_version = message.proposedVersion; - return obj; - }, - fromAminoMsg(object: QueryAppVersionRequestAminoMsg): QueryAppVersionRequest { - return QueryAppVersionRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryAppVersionRequest): QueryAppVersionRequestAminoMsg { - return { - type: "cosmos-sdk/QueryAppVersionRequest", - value: QueryAppVersionRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAppVersionRequestProtoMsg): QueryAppVersionRequest { - return QueryAppVersionRequest.decode(message.value); - }, - toProto(message: QueryAppVersionRequest): Uint8Array { - return QueryAppVersionRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryAppVersionRequest): QueryAppVersionRequestProtoMsg { - return { - typeUrl: "/ibc.core.port.v1.QueryAppVersionRequest", - value: QueryAppVersionRequest.encode(message).finish() - }; - } -}; -function createBaseQueryAppVersionResponse(): QueryAppVersionResponse { - return { - portId: "", - version: "" - }; -} -export const QueryAppVersionResponse = { - typeUrl: "/ibc.core.port.v1.QueryAppVersionResponse", - aminoType: "cosmos-sdk/QueryAppVersionResponse", - encode(message: QueryAppVersionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.portId !== "") { - writer.uint32(10).string(message.portId); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryAppVersionResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAppVersionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.portId = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryAppVersionResponse { - return { - portId: isSet(object.portId) ? String(object.portId) : "", - version: isSet(object.version) ? String(object.version) : "" - }; - }, - toJSON(message: QueryAppVersionResponse): unknown { - const obj: any = {}; - message.portId !== undefined && (obj.portId = message.portId); - message.version !== undefined && (obj.version = message.version); - return obj; - }, - fromPartial(object: DeepPartial): QueryAppVersionResponse { - const message = createBaseQueryAppVersionResponse(); - message.portId = object.portId ?? ""; - message.version = object.version ?? ""; - return message; - }, - fromSDK(object: QueryAppVersionResponseSDKType): QueryAppVersionResponse { - return { - portId: object?.port_id, - version: object?.version - }; - }, - toSDK(message: QueryAppVersionResponse): QueryAppVersionResponseSDKType { - const obj: any = {}; - obj.port_id = message.portId; - obj.version = message.version; - return obj; - }, - fromAmino(object: QueryAppVersionResponseAmino): QueryAppVersionResponse { - return { - portId: object.port_id, - version: object.version - }; - }, - toAmino(message: QueryAppVersionResponse): QueryAppVersionResponseAmino { - const obj: any = {}; - obj.port_id = message.portId; - obj.version = message.version; - return obj; - }, - fromAminoMsg(object: QueryAppVersionResponseAminoMsg): QueryAppVersionResponse { - return QueryAppVersionResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryAppVersionResponse): QueryAppVersionResponseAminoMsg { - return { - type: "cosmos-sdk/QueryAppVersionResponse", - value: QueryAppVersionResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryAppVersionResponseProtoMsg): QueryAppVersionResponse { - return QueryAppVersionResponse.decode(message.value); - }, - toProto(message: QueryAppVersionResponse): Uint8Array { - return QueryAppVersionResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryAppVersionResponse): QueryAppVersionResponseProtoMsg { - return { - typeUrl: "/ibc.core.port.v1.QueryAppVersionResponse", - value: QueryAppVersionResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/core/types/v1/genesis.ts b/examples/interchainjs/src/codegen/ibc/core/types/v1/genesis.ts deleted file mode 100644 index 7d84bc65..00000000 --- a/examples/interchainjs/src/codegen/ibc/core/types/v1/genesis.ts +++ /dev/null @@ -1,160 +0,0 @@ -//@ts-nocheck -import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; -import { GenesisStateAmino as GenesisState1Amino } from "../../client/v1/genesis"; -import { GenesisStateSDKType as GenesisState1SDKType } from "../../client/v1/genesis"; -import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; -import { GenesisStateAmino as GenesisState2Amino } from "../../connection/v1/genesis"; -import { GenesisStateSDKType as GenesisState2SDKType } from "../../connection/v1/genesis"; -import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; -import { GenesisStateAmino as GenesisState3Amino } from "../../channel/v1/genesis"; -import { GenesisStateSDKType as GenesisState3SDKType } from "../../channel/v1/genesis"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** GenesisState defines the ibc module's genesis state. */ -export interface GenesisState { - /** ICS002 - Clients genesis state */ - clientGenesis: GenesisState1 | undefined; - /** ICS003 - Connections genesis state */ - connectionGenesis: GenesisState2 | undefined; - /** ICS004 - Channel genesis state */ - channelGenesis: GenesisState3 | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/ibc.core.types.v1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the ibc module's genesis state. */ -export interface GenesisStateAmino { - /** ICS002 - Clients genesis state */ - client_genesis?: GenesisState1Amino | undefined; - /** ICS003 - Connections genesis state */ - connection_genesis?: GenesisState2Amino | undefined; - /** ICS004 - Channel genesis state */ - channel_genesis?: GenesisState3Amino | undefined; -} -export interface GenesisStateAminoMsg { - type: "cosmos-sdk/GenesisState"; - value: GenesisStateAmino; -} -/** GenesisState defines the ibc module's genesis state. */ -export interface GenesisStateSDKType { - client_genesis: GenesisState1SDKType | undefined; - connection_genesis: GenesisState2SDKType | undefined; - channel_genesis: GenesisState3SDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - clientGenesis: GenesisState1.fromPartial({}), - connectionGenesis: GenesisState2.fromPartial({}), - channelGenesis: GenesisState3.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/ibc.core.types.v1.GenesisState", - aminoType: "cosmos-sdk/GenesisState", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientGenesis !== undefined) { - GenesisState1.encode(message.clientGenesis, writer.uint32(10).fork()).ldelim(); - } - if (message.connectionGenesis !== undefined) { - GenesisState2.encode(message.connectionGenesis, writer.uint32(18).fork()).ldelim(); - } - if (message.channelGenesis !== undefined) { - GenesisState3.encode(message.channelGenesis, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientGenesis = GenesisState1.decode(reader, reader.uint32()); - break; - case 2: - message.connectionGenesis = GenesisState2.decode(reader, reader.uint32()); - break; - case 3: - message.channelGenesis = GenesisState3.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - clientGenesis: isSet(object.clientGenesis) ? GenesisState1.fromJSON(object.clientGenesis) : undefined, - connectionGenesis: isSet(object.connectionGenesis) ? GenesisState2.fromJSON(object.connectionGenesis) : undefined, - channelGenesis: isSet(object.channelGenesis) ? GenesisState3.fromJSON(object.channelGenesis) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.clientGenesis !== undefined && (obj.clientGenesis = message.clientGenesis ? GenesisState1.toJSON(message.clientGenesis) : undefined); - message.connectionGenesis !== undefined && (obj.connectionGenesis = message.connectionGenesis ? GenesisState2.toJSON(message.connectionGenesis) : undefined); - message.channelGenesis !== undefined && (obj.channelGenesis = message.channelGenesis ? GenesisState3.toJSON(message.channelGenesis) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.clientGenesis = object.clientGenesis !== undefined && object.clientGenesis !== null ? GenesisState1.fromPartial(object.clientGenesis) : undefined; - message.connectionGenesis = object.connectionGenesis !== undefined && object.connectionGenesis !== null ? GenesisState2.fromPartial(object.connectionGenesis) : undefined; - message.channelGenesis = object.channelGenesis !== undefined && object.channelGenesis !== null ? GenesisState3.fromPartial(object.channelGenesis) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - clientGenesis: object.client_genesis ? GenesisState1.fromSDK(object.client_genesis) : undefined, - connectionGenesis: object.connection_genesis ? GenesisState2.fromSDK(object.connection_genesis) : undefined, - channelGenesis: object.channel_genesis ? GenesisState3.fromSDK(object.channel_genesis) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.clientGenesis !== undefined && (obj.client_genesis = message.clientGenesis ? GenesisState1.toSDK(message.clientGenesis) : undefined); - message.connectionGenesis !== undefined && (obj.connection_genesis = message.connectionGenesis ? GenesisState2.toSDK(message.connectionGenesis) : undefined); - message.channelGenesis !== undefined && (obj.channel_genesis = message.channelGenesis ? GenesisState3.toSDK(message.channelGenesis) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - clientGenesis: object?.client_genesis ? GenesisState1.fromAmino(object.client_genesis) : undefined, - connectionGenesis: object?.connection_genesis ? GenesisState2.fromAmino(object.connection_genesis) : undefined, - channelGenesis: object?.channel_genesis ? GenesisState3.fromAmino(object.channel_genesis) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.client_genesis = message.clientGenesis ? GenesisState1.toAmino(message.clientGenesis) : undefined; - obj.connection_genesis = message.connectionGenesis ? GenesisState2.toAmino(message.connectionGenesis) : undefined; - obj.channel_genesis = message.channelGenesis ? GenesisState3.toAmino(message.channelGenesis) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "cosmos-sdk/GenesisState", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/ibc.core.types.v1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/lightclients/localhost/v1/localhost.ts b/examples/interchainjs/src/codegen/ibc/lightclients/localhost/v1/localhost.ts deleted file mode 100644 index 475d76a3..00000000 --- a/examples/interchainjs/src/codegen/ibc/lightclients/localhost/v1/localhost.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Height, HeightAmino, HeightSDKType } from "../../../core/client/v1/client"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * ClientState defines a loopback (localhost) client. It requires (read-only) - * access to keys outside the client prefix. - */ -export interface ClientState { - /** self chain ID */ - chainId: string; - /** self latest block height */ - height: Height | undefined; -} -export interface ClientStateProtoMsg { - typeUrl: "/ibc.lightclients.localhost.v1.ClientState"; - value: Uint8Array; -} -/** - * ClientState defines a loopback (localhost) client. It requires (read-only) - * access to keys outside the client prefix. - */ -export interface ClientStateAmino { - /** self chain ID */ - chain_id: string; - /** self latest block height */ - height?: HeightAmino | undefined; -} -export interface ClientStateAminoMsg { - type: "cosmos-sdk/ClientState"; - value: ClientStateAmino; -} -/** - * ClientState defines a loopback (localhost) client. It requires (read-only) - * access to keys outside the client prefix. - */ -export interface ClientStateSDKType { - chain_id: string; - height: HeightSDKType | undefined; -} -function createBaseClientState(): ClientState { - return { - chainId: "", - height: Height.fromPartial({}) - }; -} -export const ClientState = { - typeUrl: "/ibc.lightclients.localhost.v1.ClientState", - aminoType: "cosmos-sdk/ClientState", - encode(message: ClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.chainId !== "") { - writer.uint32(10).string(message.chainId); - } - if (message.height !== undefined) { - Height.encode(message.height, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chainId = reader.string(); - break; - case 2: - message.height = Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientState { - return { - chainId: isSet(object.chainId) ? String(object.chainId) : "", - height: isSet(object.height) ? Height.fromJSON(object.height) : undefined - }; - }, - toJSON(message: ClientState): unknown { - const obj: any = {}; - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ClientState { - const message = createBaseClientState(); - message.chainId = object.chainId ?? ""; - message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; - return message; - }, - fromSDK(object: ClientStateSDKType): ClientState { - return { - chainId: object?.chain_id, - height: object.height ? Height.fromSDK(object.height) : undefined - }; - }, - toSDK(message: ClientState): ClientStateSDKType { - const obj: any = {}; - obj.chain_id = message.chainId; - message.height !== undefined && (obj.height = message.height ? Height.toSDK(message.height) : undefined); - return obj; - }, - fromAmino(object: ClientStateAmino): ClientState { - return { - chainId: object.chain_id, - height: object?.height ? Height.fromAmino(object.height) : undefined - }; - }, - toAmino(message: ClientState): ClientStateAmino { - const obj: any = {}; - obj.chain_id = message.chainId; - obj.height = message.height ? Height.toAmino(message.height) : {}; - return obj; - }, - fromAminoMsg(object: ClientStateAminoMsg): ClientState { - return ClientState.fromAmino(object.value); - }, - toAminoMsg(message: ClientState): ClientStateAminoMsg { - return { - type: "cosmos-sdk/ClientState", - value: ClientState.toAmino(message) - }; - }, - fromProtoMsg(message: ClientStateProtoMsg): ClientState { - return ClientState.decode(message.value); - }, - toProto(message: ClientState): Uint8Array { - return ClientState.encode(message).finish(); - }, - toProtoMsg(message: ClientState): ClientStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.localhost.v1.ClientState", - value: ClientState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/lightclients/solomachine/v1/solomachine.ts b/examples/interchainjs/src/codegen/ibc/lightclients/solomachine/v1/solomachine.ts deleted file mode 100644 index d1cb09b3..00000000 --- a/examples/interchainjs/src/codegen/ibc/lightclients/solomachine/v1/solomachine.ts +++ /dev/null @@ -1,2448 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { ConnectionEnd, ConnectionEndAmino, ConnectionEndSDKType } from "../../../core/connection/v1/connection"; -import { Channel, ChannelAmino, ChannelSDKType } from "../../../core/channel/v1/channel"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * DataType defines the type of solo machine proof being created. This is done - * to preserve uniqueness of different data sign byte encodings. - */ -export enum DataType { - /** DATA_TYPE_UNINITIALIZED_UNSPECIFIED - Default State */ - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0, - /** DATA_TYPE_CLIENT_STATE - Data type for client state verification */ - DATA_TYPE_CLIENT_STATE = 1, - /** DATA_TYPE_CONSENSUS_STATE - Data type for consensus state verification */ - DATA_TYPE_CONSENSUS_STATE = 2, - /** DATA_TYPE_CONNECTION_STATE - Data type for connection state verification */ - DATA_TYPE_CONNECTION_STATE = 3, - /** DATA_TYPE_CHANNEL_STATE - Data type for channel state verification */ - DATA_TYPE_CHANNEL_STATE = 4, - /** DATA_TYPE_PACKET_COMMITMENT - Data type for packet commitment verification */ - DATA_TYPE_PACKET_COMMITMENT = 5, - /** DATA_TYPE_PACKET_ACKNOWLEDGEMENT - Data type for packet acknowledgement verification */ - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6, - /** DATA_TYPE_PACKET_RECEIPT_ABSENCE - Data type for packet receipt absence verification */ - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7, - /** DATA_TYPE_NEXT_SEQUENCE_RECV - Data type for next sequence recv verification */ - DATA_TYPE_NEXT_SEQUENCE_RECV = 8, - /** DATA_TYPE_HEADER - Data type for header verification */ - DATA_TYPE_HEADER = 9, - UNRECOGNIZED = -1, -} -export const DataTypeSDKType = DataType; -export const DataTypeAmino = DataType; -export function dataTypeFromJSON(object: any): DataType { - switch (object) { - case 0: - case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": - return DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "DATA_TYPE_CLIENT_STATE": - return DataType.DATA_TYPE_CLIENT_STATE; - case 2: - case "DATA_TYPE_CONSENSUS_STATE": - return DataType.DATA_TYPE_CONSENSUS_STATE; - case 3: - case "DATA_TYPE_CONNECTION_STATE": - return DataType.DATA_TYPE_CONNECTION_STATE; - case 4: - case "DATA_TYPE_CHANNEL_STATE": - return DataType.DATA_TYPE_CHANNEL_STATE; - case 5: - case "DATA_TYPE_PACKET_COMMITMENT": - return DataType.DATA_TYPE_PACKET_COMMITMENT; - case 6: - case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": - return DataType.DATA_TYPE_PACKET_ACKNOWLEDGEMENT; - case 7: - case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": - return DataType.DATA_TYPE_PACKET_RECEIPT_ABSENCE; - case 8: - case "DATA_TYPE_NEXT_SEQUENCE_RECV": - return DataType.DATA_TYPE_NEXT_SEQUENCE_RECV; - case 9: - case "DATA_TYPE_HEADER": - return DataType.DATA_TYPE_HEADER; - case -1: - case "UNRECOGNIZED": - default: - return DataType.UNRECOGNIZED; - } -} -export function dataTypeToJSON(object: DataType): string { - switch (object) { - case DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED: - return "DATA_TYPE_UNINITIALIZED_UNSPECIFIED"; - case DataType.DATA_TYPE_CLIENT_STATE: - return "DATA_TYPE_CLIENT_STATE"; - case DataType.DATA_TYPE_CONSENSUS_STATE: - return "DATA_TYPE_CONSENSUS_STATE"; - case DataType.DATA_TYPE_CONNECTION_STATE: - return "DATA_TYPE_CONNECTION_STATE"; - case DataType.DATA_TYPE_CHANNEL_STATE: - return "DATA_TYPE_CHANNEL_STATE"; - case DataType.DATA_TYPE_PACKET_COMMITMENT: - return "DATA_TYPE_PACKET_COMMITMENT"; - case DataType.DATA_TYPE_PACKET_ACKNOWLEDGEMENT: - return "DATA_TYPE_PACKET_ACKNOWLEDGEMENT"; - case DataType.DATA_TYPE_PACKET_RECEIPT_ABSENCE: - return "DATA_TYPE_PACKET_RECEIPT_ABSENCE"; - case DataType.DATA_TYPE_NEXT_SEQUENCE_RECV: - return "DATA_TYPE_NEXT_SEQUENCE_RECV"; - case DataType.DATA_TYPE_HEADER: - return "DATA_TYPE_HEADER"; - case DataType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * ClientState defines a solo machine client that tracks the current consensus - * state and if the client is frozen. - */ -export interface ClientState { - /** latest sequence of the client state */ - sequence: bigint; - /** frozen sequence of the solo machine */ - frozenSequence: bigint; - consensusState: ConsensusState | undefined; - /** - * when set to true, will allow governance to update a solo machine client. - * The client will be unfrozen if it is frozen. - */ - allowUpdateAfterProposal: boolean; -} -export interface ClientStateProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.ClientState"; - value: Uint8Array; -} -/** - * ClientState defines a solo machine client that tracks the current consensus - * state and if the client is frozen. - */ -export interface ClientStateAmino { - /** latest sequence of the client state */ - sequence: string; - /** frozen sequence of the solo machine */ - frozen_sequence: string; - consensus_state?: ConsensusStateAmino | undefined; - /** - * when set to true, will allow governance to update a solo machine client. - * The client will be unfrozen if it is frozen. - */ - allow_update_after_proposal: boolean; -} -export interface ClientStateAminoMsg { - type: "cosmos-sdk/ClientState"; - value: ClientStateAmino; -} -/** - * ClientState defines a solo machine client that tracks the current consensus - * state and if the client is frozen. - */ -export interface ClientStateSDKType { - sequence: bigint; - frozen_sequence: bigint; - consensus_state: ConsensusStateSDKType | undefined; - allow_update_after_proposal: boolean; -} -/** - * ConsensusState defines a solo machine consensus state. The sequence of a - * consensus state is contained in the "height" key used in storing the - * consensus state. - */ -export interface ConsensusState { - /** public key of the solo machine */ - publicKey: Any | undefined; - /** - * diversifier allows the same public key to be re-used across different solo - * machine clients (potentially on different chains) without being considered - * misbehaviour. - */ - diversifier: string; - timestamp: bigint; -} -export interface ConsensusStateProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.ConsensusState"; - value: Uint8Array; -} -/** - * ConsensusState defines a solo machine consensus state. The sequence of a - * consensus state is contained in the "height" key used in storing the - * consensus state. - */ -export interface ConsensusStateAmino { - /** public key of the solo machine */ - public_key?: AnyAmino | undefined; - /** - * diversifier allows the same public key to be re-used across different solo - * machine clients (potentially on different chains) without being considered - * misbehaviour. - */ - diversifier: string; - timestamp: string; -} -export interface ConsensusStateAminoMsg { - type: "cosmos-sdk/ConsensusState"; - value: ConsensusStateAmino; -} -/** - * ConsensusState defines a solo machine consensus state. The sequence of a - * consensus state is contained in the "height" key used in storing the - * consensus state. - */ -export interface ConsensusStateSDKType { - public_key: AnySDKType | undefined; - diversifier: string; - timestamp: bigint; -} -/** Header defines a solo machine consensus header */ -export interface Header { - /** sequence to update solo machine public key at */ - sequence: bigint; - timestamp: bigint; - signature: Uint8Array; - newPublicKey: Any | undefined; - newDiversifier: string; -} -export interface HeaderProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.Header"; - value: Uint8Array; -} -/** Header defines a solo machine consensus header */ -export interface HeaderAmino { - /** sequence to update solo machine public key at */ - sequence: string; - timestamp: string; - signature: Uint8Array; - new_public_key?: AnyAmino | undefined; - new_diversifier: string; -} -export interface HeaderAminoMsg { - type: "cosmos-sdk/Header"; - value: HeaderAmino; -} -/** Header defines a solo machine consensus header */ -export interface HeaderSDKType { - sequence: bigint; - timestamp: bigint; - signature: Uint8Array; - new_public_key: AnySDKType | undefined; - new_diversifier: string; -} -/** - * Misbehaviour defines misbehaviour for a solo machine which consists - * of a sequence and two signatures over different messages at that sequence. - */ -export interface Misbehaviour { - clientId: string; - sequence: bigint; - signatureOne: SignatureAndData | undefined; - signatureTwo: SignatureAndData | undefined; -} -export interface MisbehaviourProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.Misbehaviour"; - value: Uint8Array; -} -/** - * Misbehaviour defines misbehaviour for a solo machine which consists - * of a sequence and two signatures over different messages at that sequence. - */ -export interface MisbehaviourAmino { - client_id: string; - sequence: string; - signature_one?: SignatureAndDataAmino | undefined; - signature_two?: SignatureAndDataAmino | undefined; -} -export interface MisbehaviourAminoMsg { - type: "cosmos-sdk/Misbehaviour"; - value: MisbehaviourAmino; -} -/** - * Misbehaviour defines misbehaviour for a solo machine which consists - * of a sequence and two signatures over different messages at that sequence. - */ -export interface MisbehaviourSDKType { - client_id: string; - sequence: bigint; - signature_one: SignatureAndDataSDKType | undefined; - signature_two: SignatureAndDataSDKType | undefined; -} -/** - * SignatureAndData contains a signature and the data signed over to create that - * signature. - */ -export interface SignatureAndData { - signature: Uint8Array; - dataType: DataType; - data: Uint8Array; - timestamp: bigint; -} -export interface SignatureAndDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.SignatureAndData"; - value: Uint8Array; -} -/** - * SignatureAndData contains a signature and the data signed over to create that - * signature. - */ -export interface SignatureAndDataAmino { - signature: Uint8Array; - data_type: DataType; - data: Uint8Array; - timestamp: string; -} -export interface SignatureAndDataAminoMsg { - type: "cosmos-sdk/SignatureAndData"; - value: SignatureAndDataAmino; -} -/** - * SignatureAndData contains a signature and the data signed over to create that - * signature. - */ -export interface SignatureAndDataSDKType { - signature: Uint8Array; - data_type: DataType; - data: Uint8Array; - timestamp: bigint; -} -/** - * TimestampedSignatureData contains the signature data and the timestamp of the - * signature. - */ -export interface TimestampedSignatureData { - signatureData: Uint8Array; - timestamp: bigint; -} -export interface TimestampedSignatureDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.TimestampedSignatureData"; - value: Uint8Array; -} -/** - * TimestampedSignatureData contains the signature data and the timestamp of the - * signature. - */ -export interface TimestampedSignatureDataAmino { - signature_data: Uint8Array; - timestamp: string; -} -export interface TimestampedSignatureDataAminoMsg { - type: "cosmos-sdk/TimestampedSignatureData"; - value: TimestampedSignatureDataAmino; -} -/** - * TimestampedSignatureData contains the signature data and the timestamp of the - * signature. - */ -export interface TimestampedSignatureDataSDKType { - signature_data: Uint8Array; - timestamp: bigint; -} -/** SignBytes defines the signed bytes used for signature verification. */ -export interface SignBytes { - sequence: bigint; - timestamp: bigint; - diversifier: string; - /** type of the data used */ - dataType: DataType; - /** marshaled data */ - data: Uint8Array; -} -export interface SignBytesProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.SignBytes"; - value: Uint8Array; -} -/** SignBytes defines the signed bytes used for signature verification. */ -export interface SignBytesAmino { - sequence: string; - timestamp: string; - diversifier: string; - /** type of the data used */ - data_type: DataType; - /** marshaled data */ - data: Uint8Array; -} -export interface SignBytesAminoMsg { - type: "cosmos-sdk/SignBytes"; - value: SignBytesAmino; -} -/** SignBytes defines the signed bytes used for signature verification. */ -export interface SignBytesSDKType { - sequence: bigint; - timestamp: bigint; - diversifier: string; - data_type: DataType; - data: Uint8Array; -} -/** HeaderData returns the SignBytes data for update verification. */ -export interface HeaderData { - /** header public key */ - newPubKey: Any | undefined; - /** header diversifier */ - newDiversifier: string; -} -export interface HeaderDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.HeaderData"; - value: Uint8Array; -} -/** HeaderData returns the SignBytes data for update verification. */ -export interface HeaderDataAmino { - /** header public key */ - new_pub_key?: AnyAmino | undefined; - /** header diversifier */ - new_diversifier: string; -} -export interface HeaderDataAminoMsg { - type: "cosmos-sdk/HeaderData"; - value: HeaderDataAmino; -} -/** HeaderData returns the SignBytes data for update verification. */ -export interface HeaderDataSDKType { - new_pub_key: AnySDKType | undefined; - new_diversifier: string; -} -/** ClientStateData returns the SignBytes data for client state verification. */ -export interface ClientStateData { - path: Uint8Array; - clientState: Any | undefined; -} -export interface ClientStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.ClientStateData"; - value: Uint8Array; -} -/** ClientStateData returns the SignBytes data for client state verification. */ -export interface ClientStateDataAmino { - path: Uint8Array; - client_state?: AnyAmino | undefined; -} -export interface ClientStateDataAminoMsg { - type: "cosmos-sdk/ClientStateData"; - value: ClientStateDataAmino; -} -/** ClientStateData returns the SignBytes data for client state verification. */ -export interface ClientStateDataSDKType { - path: Uint8Array; - client_state: AnySDKType | undefined; -} -/** - * ConsensusStateData returns the SignBytes data for consensus state - * verification. - */ -export interface ConsensusStateData { - path: Uint8Array; - consensusState: Any | undefined; -} -export interface ConsensusStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.ConsensusStateData"; - value: Uint8Array; -} -/** - * ConsensusStateData returns the SignBytes data for consensus state - * verification. - */ -export interface ConsensusStateDataAmino { - path: Uint8Array; - consensus_state?: AnyAmino | undefined; -} -export interface ConsensusStateDataAminoMsg { - type: "cosmos-sdk/ConsensusStateData"; - value: ConsensusStateDataAmino; -} -/** - * ConsensusStateData returns the SignBytes data for consensus state - * verification. - */ -export interface ConsensusStateDataSDKType { - path: Uint8Array; - consensus_state: AnySDKType | undefined; -} -/** - * ConnectionStateData returns the SignBytes data for connection state - * verification. - */ -export interface ConnectionStateData { - path: Uint8Array; - connection: ConnectionEnd | undefined; -} -export interface ConnectionStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.ConnectionStateData"; - value: Uint8Array; -} -/** - * ConnectionStateData returns the SignBytes data for connection state - * verification. - */ -export interface ConnectionStateDataAmino { - path: Uint8Array; - connection?: ConnectionEndAmino | undefined; -} -export interface ConnectionStateDataAminoMsg { - type: "cosmos-sdk/ConnectionStateData"; - value: ConnectionStateDataAmino; -} -/** - * ConnectionStateData returns the SignBytes data for connection state - * verification. - */ -export interface ConnectionStateDataSDKType { - path: Uint8Array; - connection: ConnectionEndSDKType | undefined; -} -/** - * ChannelStateData returns the SignBytes data for channel state - * verification. - */ -export interface ChannelStateData { - path: Uint8Array; - channel: Channel | undefined; -} -export interface ChannelStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.ChannelStateData"; - value: Uint8Array; -} -/** - * ChannelStateData returns the SignBytes data for channel state - * verification. - */ -export interface ChannelStateDataAmino { - path: Uint8Array; - channel?: ChannelAmino | undefined; -} -export interface ChannelStateDataAminoMsg { - type: "cosmos-sdk/ChannelStateData"; - value: ChannelStateDataAmino; -} -/** - * ChannelStateData returns the SignBytes data for channel state - * verification. - */ -export interface ChannelStateDataSDKType { - path: Uint8Array; - channel: ChannelSDKType | undefined; -} -/** - * PacketCommitmentData returns the SignBytes data for packet commitment - * verification. - */ -export interface PacketCommitmentData { - path: Uint8Array; - commitment: Uint8Array; -} -export interface PacketCommitmentDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketCommitmentData"; - value: Uint8Array; -} -/** - * PacketCommitmentData returns the SignBytes data for packet commitment - * verification. - */ -export interface PacketCommitmentDataAmino { - path: Uint8Array; - commitment: Uint8Array; -} -export interface PacketCommitmentDataAminoMsg { - type: "cosmos-sdk/PacketCommitmentData"; - value: PacketCommitmentDataAmino; -} -/** - * PacketCommitmentData returns the SignBytes data for packet commitment - * verification. - */ -export interface PacketCommitmentDataSDKType { - path: Uint8Array; - commitment: Uint8Array; -} -/** - * PacketAcknowledgementData returns the SignBytes data for acknowledgement - * verification. - */ -export interface PacketAcknowledgementData { - path: Uint8Array; - acknowledgement: Uint8Array; -} -export interface PacketAcknowledgementDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketAcknowledgementData"; - value: Uint8Array; -} -/** - * PacketAcknowledgementData returns the SignBytes data for acknowledgement - * verification. - */ -export interface PacketAcknowledgementDataAmino { - path: Uint8Array; - acknowledgement: Uint8Array; -} -export interface PacketAcknowledgementDataAminoMsg { - type: "cosmos-sdk/PacketAcknowledgementData"; - value: PacketAcknowledgementDataAmino; -} -/** - * PacketAcknowledgementData returns the SignBytes data for acknowledgement - * verification. - */ -export interface PacketAcknowledgementDataSDKType { - path: Uint8Array; - acknowledgement: Uint8Array; -} -/** - * PacketReceiptAbsenceData returns the SignBytes data for - * packet receipt absence verification. - */ -export interface PacketReceiptAbsenceData { - path: Uint8Array; -} -export interface PacketReceiptAbsenceDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData"; - value: Uint8Array; -} -/** - * PacketReceiptAbsenceData returns the SignBytes data for - * packet receipt absence verification. - */ -export interface PacketReceiptAbsenceDataAmino { - path: Uint8Array; -} -export interface PacketReceiptAbsenceDataAminoMsg { - type: "cosmos-sdk/PacketReceiptAbsenceData"; - value: PacketReceiptAbsenceDataAmino; -} -/** - * PacketReceiptAbsenceData returns the SignBytes data for - * packet receipt absence verification. - */ -export interface PacketReceiptAbsenceDataSDKType { - path: Uint8Array; -} -/** - * NextSequenceRecvData returns the SignBytes data for verification of the next - * sequence to be received. - */ -export interface NextSequenceRecvData { - path: Uint8Array; - nextSeqRecv: bigint; -} -export interface NextSequenceRecvDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v1.NextSequenceRecvData"; - value: Uint8Array; -} -/** - * NextSequenceRecvData returns the SignBytes data for verification of the next - * sequence to be received. - */ -export interface NextSequenceRecvDataAmino { - path: Uint8Array; - next_seq_recv: string; -} -export interface NextSequenceRecvDataAminoMsg { - type: "cosmos-sdk/NextSequenceRecvData"; - value: NextSequenceRecvDataAmino; -} -/** - * NextSequenceRecvData returns the SignBytes data for verification of the next - * sequence to be received. - */ -export interface NextSequenceRecvDataSDKType { - path: Uint8Array; - next_seq_recv: bigint; -} -function createBaseClientState(): ClientState { - return { - sequence: BigInt(0), - frozenSequence: BigInt(0), - consensusState: ConsensusState.fromPartial({}), - allowUpdateAfterProposal: false - }; -} -export const ClientState = { - typeUrl: "/ibc.lightclients.solomachine.v1.ClientState", - aminoType: "cosmos-sdk/ClientState", - encode(message: ClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.frozenSequence !== BigInt(0)) { - writer.uint32(16).uint64(message.frozenSequence); - } - if (message.consensusState !== undefined) { - ConsensusState.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); - } - if (message.allowUpdateAfterProposal === true) { - writer.uint32(32).bool(message.allowUpdateAfterProposal); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.frozenSequence = reader.uint64(); - break; - case 3: - message.consensusState = ConsensusState.decode(reader, reader.uint32()); - break; - case 4: - message.allowUpdateAfterProposal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientState { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - frozenSequence: isSet(object.frozenSequence) ? BigInt(object.frozenSequence.toString()) : BigInt(0), - consensusState: isSet(object.consensusState) ? ConsensusState.fromJSON(object.consensusState) : undefined, - allowUpdateAfterProposal: isSet(object.allowUpdateAfterProposal) ? Boolean(object.allowUpdateAfterProposal) : false - }; - }, - toJSON(message: ClientState): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.frozenSequence !== undefined && (obj.frozenSequence = (message.frozenSequence || BigInt(0)).toString()); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? ConsensusState.toJSON(message.consensusState) : undefined); - message.allowUpdateAfterProposal !== undefined && (obj.allowUpdateAfterProposal = message.allowUpdateAfterProposal); - return obj; - }, - fromPartial(object: DeepPartial): ClientState { - const message = createBaseClientState(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.frozenSequence = object.frozenSequence !== undefined && object.frozenSequence !== null ? BigInt(object.frozenSequence.toString()) : BigInt(0); - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? ConsensusState.fromPartial(object.consensusState) : undefined; - message.allowUpdateAfterProposal = object.allowUpdateAfterProposal ?? false; - return message; - }, - fromSDK(object: ClientStateSDKType): ClientState { - return { - sequence: object?.sequence, - frozenSequence: object?.frozen_sequence, - consensusState: object.consensus_state ? ConsensusState.fromSDK(object.consensus_state) : undefined, - allowUpdateAfterProposal: object?.allow_update_after_proposal - }; - }, - toSDK(message: ClientState): ClientStateSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.frozen_sequence = message.frozenSequence; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? ConsensusState.toSDK(message.consensusState) : undefined); - obj.allow_update_after_proposal = message.allowUpdateAfterProposal; - return obj; - }, - fromAmino(object: ClientStateAmino): ClientState { - return { - sequence: BigInt(object.sequence), - frozenSequence: BigInt(object.frozen_sequence), - consensusState: object?.consensus_state ? ConsensusState.fromAmino(object.consensus_state) : undefined, - allowUpdateAfterProposal: object.allow_update_after_proposal - }; - }, - toAmino(message: ClientState): ClientStateAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.frozen_sequence = message.frozenSequence ? message.frozenSequence.toString() : undefined; - obj.consensus_state = message.consensusState ? ConsensusState.toAmino(message.consensusState) : undefined; - obj.allow_update_after_proposal = message.allowUpdateAfterProposal; - return obj; - }, - fromAminoMsg(object: ClientStateAminoMsg): ClientState { - return ClientState.fromAmino(object.value); - }, - toAminoMsg(message: ClientState): ClientStateAminoMsg { - return { - type: "cosmos-sdk/ClientState", - value: ClientState.toAmino(message) - }; - }, - fromProtoMsg(message: ClientStateProtoMsg): ClientState { - return ClientState.decode(message.value); - }, - toProto(message: ClientState): Uint8Array { - return ClientState.encode(message).finish(); - }, - toProtoMsg(message: ClientState): ClientStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.ClientState", - value: ClientState.encode(message).finish() - }; - } -}; -function createBaseConsensusState(): ConsensusState { - return { - publicKey: Any.fromPartial({}), - diversifier: "", - timestamp: BigInt(0) - }; -} -export const ConsensusState = { - typeUrl: "/ibc.lightclients.solomachine.v1.ConsensusState", - aminoType: "cosmos-sdk/ConsensusState", - encode(message: ConsensusState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); - } - if (message.diversifier !== "") { - writer.uint32(18).string(message.diversifier); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(24).uint64(message.timestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.diversifier = reader.string(); - break; - case 3: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusState { - return { - publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, - diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: ConsensusState): unknown { - const obj: any = {}; - message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined); - message.diversifier !== undefined && (obj.diversifier = message.diversifier); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusState { - const message = createBaseConsensusState(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.diversifier = object.diversifier ?? ""; - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ConsensusStateSDKType): ConsensusState { - return { - publicKey: object.public_key ? Any.fromSDK(object.public_key) : undefined, - diversifier: object?.diversifier, - timestamp: object?.timestamp - }; - }, - toSDK(message: ConsensusState): ConsensusStateSDKType { - const obj: any = {}; - message.publicKey !== undefined && (obj.public_key = message.publicKey ? Any.toSDK(message.publicKey) : undefined); - obj.diversifier = message.diversifier; - obj.timestamp = message.timestamp; - return obj; - }, - fromAmino(object: ConsensusStateAmino): ConsensusState { - return { - publicKey: object?.public_key ? Any.fromAmino(object.public_key) : undefined, - diversifier: object.diversifier, - timestamp: BigInt(object.timestamp) - }; - }, - toAmino(message: ConsensusState): ConsensusStateAmino { - const obj: any = {}; - obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; - obj.diversifier = message.diversifier; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusStateAminoMsg): ConsensusState { - return ConsensusState.fromAmino(object.value); - }, - toAminoMsg(message: ConsensusState): ConsensusStateAminoMsg { - return { - type: "cosmos-sdk/ConsensusState", - value: ConsensusState.toAmino(message) - }; - }, - fromProtoMsg(message: ConsensusStateProtoMsg): ConsensusState { - return ConsensusState.decode(message.value); - }, - toProto(message: ConsensusState): Uint8Array { - return ConsensusState.encode(message).finish(); - }, - toProtoMsg(message: ConsensusState): ConsensusStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.ConsensusState", - value: ConsensusState.encode(message).finish() - }; - } -}; -function createBaseHeader(): Header { - return { - sequence: BigInt(0), - timestamp: BigInt(0), - signature: new Uint8Array(), - newPublicKey: Any.fromPartial({}), - newDiversifier: "" - }; -} -export const Header = { - typeUrl: "/ibc.lightclients.solomachine.v1.Header", - aminoType: "cosmos-sdk/Header", - encode(message: Header, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(16).uint64(message.timestamp); - } - if (message.signature.length !== 0) { - writer.uint32(26).bytes(message.signature); - } - if (message.newPublicKey !== undefined) { - Any.encode(message.newPublicKey, writer.uint32(34).fork()).ldelim(); - } - if (message.newDiversifier !== "") { - writer.uint32(42).string(message.newDiversifier); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Header { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.signature = reader.bytes(); - break; - case 4: - message.newPublicKey = Any.decode(reader, reader.uint32()); - break; - case 5: - message.newDiversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Header { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0), - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), - newPublicKey: isSet(object.newPublicKey) ? Any.fromJSON(object.newPublicKey) : undefined, - newDiversifier: isSet(object.newDiversifier) ? String(object.newDiversifier) : "" - }; - }, - toJSON(message: Header): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - message.newPublicKey !== undefined && (obj.newPublicKey = message.newPublicKey ? Any.toJSON(message.newPublicKey) : undefined); - message.newDiversifier !== undefined && (obj.newDiversifier = message.newDiversifier); - return obj; - }, - fromPartial(object: DeepPartial
): Header { - const message = createBaseHeader(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - message.signature = object.signature ?? new Uint8Array(); - message.newPublicKey = object.newPublicKey !== undefined && object.newPublicKey !== null ? Any.fromPartial(object.newPublicKey) : undefined; - message.newDiversifier = object.newDiversifier ?? ""; - return message; - }, - fromSDK(object: HeaderSDKType): Header { - return { - sequence: object?.sequence, - timestamp: object?.timestamp, - signature: object?.signature, - newPublicKey: object.new_public_key ? Any.fromSDK(object.new_public_key) : undefined, - newDiversifier: object?.new_diversifier - }; - }, - toSDK(message: Header): HeaderSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.timestamp = message.timestamp; - obj.signature = message.signature; - message.newPublicKey !== undefined && (obj.new_public_key = message.newPublicKey ? Any.toSDK(message.newPublicKey) : undefined); - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAmino(object: HeaderAmino): Header { - return { - sequence: BigInt(object.sequence), - timestamp: BigInt(object.timestamp), - signature: object.signature, - newPublicKey: object?.new_public_key ? Any.fromAmino(object.new_public_key) : undefined, - newDiversifier: object.new_diversifier - }; - }, - toAmino(message: Header): HeaderAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - obj.signature = message.signature; - obj.new_public_key = message.newPublicKey ? Any.toAmino(message.newPublicKey) : undefined; - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAminoMsg(object: HeaderAminoMsg): Header { - return Header.fromAmino(object.value); - }, - toAminoMsg(message: Header): HeaderAminoMsg { - return { - type: "cosmos-sdk/Header", - value: Header.toAmino(message) - }; - }, - fromProtoMsg(message: HeaderProtoMsg): Header { - return Header.decode(message.value); - }, - toProto(message: Header): Uint8Array { - return Header.encode(message).finish(); - }, - toProtoMsg(message: Header): HeaderProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.Header", - value: Header.encode(message).finish() - }; - } -}; -function createBaseMisbehaviour(): Misbehaviour { - return { - clientId: "", - sequence: BigInt(0), - signatureOne: SignatureAndData.fromPartial({}), - signatureTwo: SignatureAndData.fromPartial({}) - }; -} -export const Misbehaviour = { - typeUrl: "/ibc.lightclients.solomachine.v1.Misbehaviour", - aminoType: "cosmos-sdk/Misbehaviour", - encode(message: Misbehaviour, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(16).uint64(message.sequence); - } - if (message.signatureOne !== undefined) { - SignatureAndData.encode(message.signatureOne, writer.uint32(26).fork()).ldelim(); - } - if (message.signatureTwo !== undefined) { - SignatureAndData.encode(message.signatureTwo, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Misbehaviour { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMisbehaviour(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.sequence = reader.uint64(); - break; - case 3: - message.signatureOne = SignatureAndData.decode(reader, reader.uint32()); - break; - case 4: - message.signatureTwo = SignatureAndData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Misbehaviour { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - signatureOne: isSet(object.signatureOne) ? SignatureAndData.fromJSON(object.signatureOne) : undefined, - signatureTwo: isSet(object.signatureTwo) ? SignatureAndData.fromJSON(object.signatureTwo) : undefined - }; - }, - toJSON(message: Misbehaviour): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.signatureOne !== undefined && (obj.signatureOne = message.signatureOne ? SignatureAndData.toJSON(message.signatureOne) : undefined); - message.signatureTwo !== undefined && (obj.signatureTwo = message.signatureTwo ? SignatureAndData.toJSON(message.signatureTwo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Misbehaviour { - const message = createBaseMisbehaviour(); - message.clientId = object.clientId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.signatureOne = object.signatureOne !== undefined && object.signatureOne !== null ? SignatureAndData.fromPartial(object.signatureOne) : undefined; - message.signatureTwo = object.signatureTwo !== undefined && object.signatureTwo !== null ? SignatureAndData.fromPartial(object.signatureTwo) : undefined; - return message; - }, - fromSDK(object: MisbehaviourSDKType): Misbehaviour { - return { - clientId: object?.client_id, - sequence: object?.sequence, - signatureOne: object.signature_one ? SignatureAndData.fromSDK(object.signature_one) : undefined, - signatureTwo: object.signature_two ? SignatureAndData.fromSDK(object.signature_two) : undefined - }; - }, - toSDK(message: Misbehaviour): MisbehaviourSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - obj.sequence = message.sequence; - message.signatureOne !== undefined && (obj.signature_one = message.signatureOne ? SignatureAndData.toSDK(message.signatureOne) : undefined); - message.signatureTwo !== undefined && (obj.signature_two = message.signatureTwo ? SignatureAndData.toSDK(message.signatureTwo) : undefined); - return obj; - }, - fromAmino(object: MisbehaviourAmino): Misbehaviour { - return { - clientId: object.client_id, - sequence: BigInt(object.sequence), - signatureOne: object?.signature_one ? SignatureAndData.fromAmino(object.signature_one) : undefined, - signatureTwo: object?.signature_two ? SignatureAndData.fromAmino(object.signature_two) : undefined - }; - }, - toAmino(message: Misbehaviour): MisbehaviourAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.signature_one = message.signatureOne ? SignatureAndData.toAmino(message.signatureOne) : undefined; - obj.signature_two = message.signatureTwo ? SignatureAndData.toAmino(message.signatureTwo) : undefined; - return obj; - }, - fromAminoMsg(object: MisbehaviourAminoMsg): Misbehaviour { - return Misbehaviour.fromAmino(object.value); - }, - toAminoMsg(message: Misbehaviour): MisbehaviourAminoMsg { - return { - type: "cosmos-sdk/Misbehaviour", - value: Misbehaviour.toAmino(message) - }; - }, - fromProtoMsg(message: MisbehaviourProtoMsg): Misbehaviour { - return Misbehaviour.decode(message.value); - }, - toProto(message: Misbehaviour): Uint8Array { - return Misbehaviour.encode(message).finish(); - }, - toProtoMsg(message: Misbehaviour): MisbehaviourProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.Misbehaviour", - value: Misbehaviour.encode(message).finish() - }; - } -}; -function createBaseSignatureAndData(): SignatureAndData { - return { - signature: new Uint8Array(), - dataType: 0, - data: new Uint8Array(), - timestamp: BigInt(0) - }; -} -export const SignatureAndData = { - typeUrl: "/ibc.lightclients.solomachine.v1.SignatureAndData", - aminoType: "cosmos-sdk/SignatureAndData", - encode(message: SignatureAndData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signature.length !== 0) { - writer.uint32(10).bytes(message.signature); - } - if (message.dataType !== 0) { - writer.uint32(16).int32(message.dataType); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(32).uint64(message.timestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureAndData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureAndData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature = reader.bytes(); - break; - case 2: - message.dataType = (reader.int32() as any); - break; - case 3: - message.data = reader.bytes(); - break; - case 4: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureAndData { - return { - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), - dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : -1, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: SignatureAndData): unknown { - const obj: any = {}; - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - message.dataType !== undefined && (obj.dataType = dataTypeToJSON(message.dataType)); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SignatureAndData { - const message = createBaseSignatureAndData(); - message.signature = object.signature ?? new Uint8Array(); - message.dataType = object.dataType ?? 0; - message.data = object.data ?? new Uint8Array(); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SignatureAndDataSDKType): SignatureAndData { - return { - signature: object?.signature, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object?.data, - timestamp: object?.timestamp - }; - }, - toSDK(message: SignatureAndData): SignatureAndDataSDKType { - const obj: any = {}; - obj.signature = message.signature; - message.dataType !== undefined && (obj.data_type = dataTypeToJSON(message.dataType)); - obj.data = message.data; - obj.timestamp = message.timestamp; - return obj; - }, - fromAmino(object: SignatureAndDataAmino): SignatureAndData { - return { - signature: object.signature, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object.data, - timestamp: BigInt(object.timestamp) - }; - }, - toAmino(message: SignatureAndData): SignatureAndDataAmino { - const obj: any = {}; - obj.signature = message.signature; - obj.data_type = message.dataType; - obj.data = message.data; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SignatureAndDataAminoMsg): SignatureAndData { - return SignatureAndData.fromAmino(object.value); - }, - toAminoMsg(message: SignatureAndData): SignatureAndDataAminoMsg { - return { - type: "cosmos-sdk/SignatureAndData", - value: SignatureAndData.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureAndDataProtoMsg): SignatureAndData { - return SignatureAndData.decode(message.value); - }, - toProto(message: SignatureAndData): Uint8Array { - return SignatureAndData.encode(message).finish(); - }, - toProtoMsg(message: SignatureAndData): SignatureAndDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.SignatureAndData", - value: SignatureAndData.encode(message).finish() - }; - } -}; -function createBaseTimestampedSignatureData(): TimestampedSignatureData { - return { - signatureData: new Uint8Array(), - timestamp: BigInt(0) - }; -} -export const TimestampedSignatureData = { - typeUrl: "/ibc.lightclients.solomachine.v1.TimestampedSignatureData", - aminoType: "cosmos-sdk/TimestampedSignatureData", - encode(message: TimestampedSignatureData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signatureData.length !== 0) { - writer.uint32(10).bytes(message.signatureData); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(16).uint64(message.timestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TimestampedSignatureData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimestampedSignatureData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatureData = reader.bytes(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TimestampedSignatureData { - return { - signatureData: isSet(object.signatureData) ? bytesFromBase64(object.signatureData) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: TimestampedSignatureData): unknown { - const obj: any = {}; - message.signatureData !== undefined && (obj.signatureData = base64FromBytes(message.signatureData !== undefined ? message.signatureData : new Uint8Array())); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): TimestampedSignatureData { - const message = createBaseTimestampedSignatureData(); - message.signatureData = object.signatureData ?? new Uint8Array(); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: TimestampedSignatureDataSDKType): TimestampedSignatureData { - return { - signatureData: object?.signature_data, - timestamp: object?.timestamp - }; - }, - toSDK(message: TimestampedSignatureData): TimestampedSignatureDataSDKType { - const obj: any = {}; - obj.signature_data = message.signatureData; - obj.timestamp = message.timestamp; - return obj; - }, - fromAmino(object: TimestampedSignatureDataAmino): TimestampedSignatureData { - return { - signatureData: object.signature_data, - timestamp: BigInt(object.timestamp) - }; - }, - toAmino(message: TimestampedSignatureData): TimestampedSignatureDataAmino { - const obj: any = {}; - obj.signature_data = message.signatureData; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: TimestampedSignatureDataAminoMsg): TimestampedSignatureData { - return TimestampedSignatureData.fromAmino(object.value); - }, - toAminoMsg(message: TimestampedSignatureData): TimestampedSignatureDataAminoMsg { - return { - type: "cosmos-sdk/TimestampedSignatureData", - value: TimestampedSignatureData.toAmino(message) - }; - }, - fromProtoMsg(message: TimestampedSignatureDataProtoMsg): TimestampedSignatureData { - return TimestampedSignatureData.decode(message.value); - }, - toProto(message: TimestampedSignatureData): Uint8Array { - return TimestampedSignatureData.encode(message).finish(); - }, - toProtoMsg(message: TimestampedSignatureData): TimestampedSignatureDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.TimestampedSignatureData", - value: TimestampedSignatureData.encode(message).finish() - }; - } -}; -function createBaseSignBytes(): SignBytes { - return { - sequence: BigInt(0), - timestamp: BigInt(0), - diversifier: "", - dataType: 0, - data: new Uint8Array() - }; -} -export const SignBytes = { - typeUrl: "/ibc.lightclients.solomachine.v1.SignBytes", - aminoType: "cosmos-sdk/SignBytes", - encode(message: SignBytes, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(16).uint64(message.timestamp); - } - if (message.diversifier !== "") { - writer.uint32(26).string(message.diversifier); - } - if (message.dataType !== 0) { - writer.uint32(32).int32(message.dataType); - } - if (message.data.length !== 0) { - writer.uint32(42).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignBytes { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignBytes(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.diversifier = reader.string(); - break; - case 4: - message.dataType = (reader.int32() as any); - break; - case 5: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignBytes { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0), - diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", - dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : -1, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: SignBytes): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - message.diversifier !== undefined && (obj.diversifier = message.diversifier); - message.dataType !== undefined && (obj.dataType = dataTypeToJSON(message.dataType)); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): SignBytes { - const message = createBaseSignBytes(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - message.diversifier = object.diversifier ?? ""; - message.dataType = object.dataType ?? 0; - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: SignBytesSDKType): SignBytes { - return { - sequence: object?.sequence, - timestamp: object?.timestamp, - diversifier: object?.diversifier, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object?.data - }; - }, - toSDK(message: SignBytes): SignBytesSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.timestamp = message.timestamp; - obj.diversifier = message.diversifier; - message.dataType !== undefined && (obj.data_type = dataTypeToJSON(message.dataType)); - obj.data = message.data; - return obj; - }, - fromAmino(object: SignBytesAmino): SignBytes { - return { - sequence: BigInt(object.sequence), - timestamp: BigInt(object.timestamp), - diversifier: object.diversifier, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object.data - }; - }, - toAmino(message: SignBytes): SignBytesAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - obj.diversifier = message.diversifier; - obj.data_type = message.dataType; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: SignBytesAminoMsg): SignBytes { - return SignBytes.fromAmino(object.value); - }, - toAminoMsg(message: SignBytes): SignBytesAminoMsg { - return { - type: "cosmos-sdk/SignBytes", - value: SignBytes.toAmino(message) - }; - }, - fromProtoMsg(message: SignBytesProtoMsg): SignBytes { - return SignBytes.decode(message.value); - }, - toProto(message: SignBytes): Uint8Array { - return SignBytes.encode(message).finish(); - }, - toProtoMsg(message: SignBytes): SignBytesProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.SignBytes", - value: SignBytes.encode(message).finish() - }; - } -}; -function createBaseHeaderData(): HeaderData { - return { - newPubKey: Any.fromPartial({}), - newDiversifier: "" - }; -} -export const HeaderData = { - typeUrl: "/ibc.lightclients.solomachine.v1.HeaderData", - aminoType: "cosmos-sdk/HeaderData", - encode(message: HeaderData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.newPubKey !== undefined) { - Any.encode(message.newPubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.newDiversifier !== "") { - writer.uint32(18).string(message.newDiversifier); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HeaderData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeaderData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.newPubKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.newDiversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): HeaderData { - return { - newPubKey: isSet(object.newPubKey) ? Any.fromJSON(object.newPubKey) : undefined, - newDiversifier: isSet(object.newDiversifier) ? String(object.newDiversifier) : "" - }; - }, - toJSON(message: HeaderData): unknown { - const obj: any = {}; - message.newPubKey !== undefined && (obj.newPubKey = message.newPubKey ? Any.toJSON(message.newPubKey) : undefined); - message.newDiversifier !== undefined && (obj.newDiversifier = message.newDiversifier); - return obj; - }, - fromPartial(object: DeepPartial): HeaderData { - const message = createBaseHeaderData(); - message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null ? Any.fromPartial(object.newPubKey) : undefined; - message.newDiversifier = object.newDiversifier ?? ""; - return message; - }, - fromSDK(object: HeaderDataSDKType): HeaderData { - return { - newPubKey: object.new_pub_key ? Any.fromSDK(object.new_pub_key) : undefined, - newDiversifier: object?.new_diversifier - }; - }, - toSDK(message: HeaderData): HeaderDataSDKType { - const obj: any = {}; - message.newPubKey !== undefined && (obj.new_pub_key = message.newPubKey ? Any.toSDK(message.newPubKey) : undefined); - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAmino(object: HeaderDataAmino): HeaderData { - return { - newPubKey: object?.new_pub_key ? Any.fromAmino(object.new_pub_key) : undefined, - newDiversifier: object.new_diversifier - }; - }, - toAmino(message: HeaderData): HeaderDataAmino { - const obj: any = {}; - obj.new_pub_key = message.newPubKey ? Any.toAmino(message.newPubKey) : undefined; - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAminoMsg(object: HeaderDataAminoMsg): HeaderData { - return HeaderData.fromAmino(object.value); - }, - toAminoMsg(message: HeaderData): HeaderDataAminoMsg { - return { - type: "cosmos-sdk/HeaderData", - value: HeaderData.toAmino(message) - }; - }, - fromProtoMsg(message: HeaderDataProtoMsg): HeaderData { - return HeaderData.decode(message.value); - }, - toProto(message: HeaderData): Uint8Array { - return HeaderData.encode(message).finish(); - }, - toProtoMsg(message: HeaderData): HeaderDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.HeaderData", - value: HeaderData.encode(message).finish() - }; - } -}; -function createBaseClientStateData(): ClientStateData { - return { - path: new Uint8Array(), - clientState: Any.fromPartial({}) - }; -} -export const ClientStateData = { - typeUrl: "/ibc.lightclients.solomachine.v1.ClientStateData", - aminoType: "cosmos-sdk/ClientStateData", - encode(message: ClientStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined - }; - }, - toJSON(message: ClientStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ClientStateData { - const message = createBaseClientStateData(); - message.path = object.path ?? new Uint8Array(); - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - return message; - }, - fromSDK(object: ClientStateDataSDKType): ClientStateData { - return { - path: object?.path, - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined - }; - }, - toSDK(message: ClientStateData): ClientStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - return obj; - }, - fromAmino(object: ClientStateDataAmino): ClientStateData { - return { - path: object.path, - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined - }; - }, - toAmino(message: ClientStateData): ClientStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - return obj; - }, - fromAminoMsg(object: ClientStateDataAminoMsg): ClientStateData { - return ClientStateData.fromAmino(object.value); - }, - toAminoMsg(message: ClientStateData): ClientStateDataAminoMsg { - return { - type: "cosmos-sdk/ClientStateData", - value: ClientStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ClientStateDataProtoMsg): ClientStateData { - return ClientStateData.decode(message.value); - }, - toProto(message: ClientStateData): Uint8Array { - return ClientStateData.encode(message).finish(); - }, - toProtoMsg(message: ClientStateData): ClientStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.ClientStateData", - value: ClientStateData.encode(message).finish() - }; - } -}; -function createBaseConsensusStateData(): ConsensusStateData { - return { - path: new Uint8Array(), - consensusState: Any.fromPartial({}) - }; -} -export const ConsensusStateData = { - typeUrl: "/ibc.lightclients.solomachine.v1.ConsensusStateData", - aminoType: "cosmos-sdk/ConsensusStateData", - encode(message: ConsensusStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined - }; - }, - toJSON(message: ConsensusStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusStateData { - const message = createBaseConsensusStateData(); - message.path = object.path ?? new Uint8Array(); - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - return message; - }, - fromSDK(object: ConsensusStateDataSDKType): ConsensusStateData { - return { - path: object?.path, - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined - }; - }, - toSDK(message: ConsensusStateData): ConsensusStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - return obj; - }, - fromAmino(object: ConsensusStateDataAmino): ConsensusStateData { - return { - path: object.path, - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined - }; - }, - toAmino(message: ConsensusStateData): ConsensusStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusStateDataAminoMsg): ConsensusStateData { - return ConsensusStateData.fromAmino(object.value); - }, - toAminoMsg(message: ConsensusStateData): ConsensusStateDataAminoMsg { - return { - type: "cosmos-sdk/ConsensusStateData", - value: ConsensusStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ConsensusStateDataProtoMsg): ConsensusStateData { - return ConsensusStateData.decode(message.value); - }, - toProto(message: ConsensusStateData): Uint8Array { - return ConsensusStateData.encode(message).finish(); - }, - toProtoMsg(message: ConsensusStateData): ConsensusStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.ConsensusStateData", - value: ConsensusStateData.encode(message).finish() - }; - } -}; -function createBaseConnectionStateData(): ConnectionStateData { - return { - path: new Uint8Array(), - connection: ConnectionEnd.fromPartial({}) - }; -} -export const ConnectionStateData = { - typeUrl: "/ibc.lightclients.solomachine.v1.ConnectionStateData", - aminoType: "cosmos-sdk/ConnectionStateData", - encode(message: ConnectionStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.connection !== undefined) { - ConnectionEnd.encode(message.connection, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConnectionStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConnectionStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.connection = ConnectionEnd.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConnectionStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - connection: isSet(object.connection) ? ConnectionEnd.fromJSON(object.connection) : undefined - }; - }, - toJSON(message: ConnectionStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.connection !== undefined && (obj.connection = message.connection ? ConnectionEnd.toJSON(message.connection) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConnectionStateData { - const message = createBaseConnectionStateData(); - message.path = object.path ?? new Uint8Array(); - message.connection = object.connection !== undefined && object.connection !== null ? ConnectionEnd.fromPartial(object.connection) : undefined; - return message; - }, - fromSDK(object: ConnectionStateDataSDKType): ConnectionStateData { - return { - path: object?.path, - connection: object.connection ? ConnectionEnd.fromSDK(object.connection) : undefined - }; - }, - toSDK(message: ConnectionStateData): ConnectionStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.connection !== undefined && (obj.connection = message.connection ? ConnectionEnd.toSDK(message.connection) : undefined); - return obj; - }, - fromAmino(object: ConnectionStateDataAmino): ConnectionStateData { - return { - path: object.path, - connection: object?.connection ? ConnectionEnd.fromAmino(object.connection) : undefined - }; - }, - toAmino(message: ConnectionStateData): ConnectionStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.connection = message.connection ? ConnectionEnd.toAmino(message.connection) : undefined; - return obj; - }, - fromAminoMsg(object: ConnectionStateDataAminoMsg): ConnectionStateData { - return ConnectionStateData.fromAmino(object.value); - }, - toAminoMsg(message: ConnectionStateData): ConnectionStateDataAminoMsg { - return { - type: "cosmos-sdk/ConnectionStateData", - value: ConnectionStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ConnectionStateDataProtoMsg): ConnectionStateData { - return ConnectionStateData.decode(message.value); - }, - toProto(message: ConnectionStateData): Uint8Array { - return ConnectionStateData.encode(message).finish(); - }, - toProtoMsg(message: ConnectionStateData): ConnectionStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.ConnectionStateData", - value: ConnectionStateData.encode(message).finish() - }; - } -}; -function createBaseChannelStateData(): ChannelStateData { - return { - path: new Uint8Array(), - channel: Channel.fromPartial({}) - }; -} -export const ChannelStateData = { - typeUrl: "/ibc.lightclients.solomachine.v1.ChannelStateData", - aminoType: "cosmos-sdk/ChannelStateData", - encode(message: ChannelStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ChannelStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChannelStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ChannelStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined - }; - }, - toJSON(message: ChannelStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.channel !== undefined && (obj.channel = message.channel ? Channel.toJSON(message.channel) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ChannelStateData { - const message = createBaseChannelStateData(); - message.path = object.path ?? new Uint8Array(); - message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - return message; - }, - fromSDK(object: ChannelStateDataSDKType): ChannelStateData { - return { - path: object?.path, - channel: object.channel ? Channel.fromSDK(object.channel) : undefined - }; - }, - toSDK(message: ChannelStateData): ChannelStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.channel !== undefined && (obj.channel = message.channel ? Channel.toSDK(message.channel) : undefined); - return obj; - }, - fromAmino(object: ChannelStateDataAmino): ChannelStateData { - return { - path: object.path, - channel: object?.channel ? Channel.fromAmino(object.channel) : undefined - }; - }, - toAmino(message: ChannelStateData): ChannelStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - return obj; - }, - fromAminoMsg(object: ChannelStateDataAminoMsg): ChannelStateData { - return ChannelStateData.fromAmino(object.value); - }, - toAminoMsg(message: ChannelStateData): ChannelStateDataAminoMsg { - return { - type: "cosmos-sdk/ChannelStateData", - value: ChannelStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ChannelStateDataProtoMsg): ChannelStateData { - return ChannelStateData.decode(message.value); - }, - toProto(message: ChannelStateData): Uint8Array { - return ChannelStateData.encode(message).finish(); - }, - toProtoMsg(message: ChannelStateData): ChannelStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.ChannelStateData", - value: ChannelStateData.encode(message).finish() - }; - } -}; -function createBasePacketCommitmentData(): PacketCommitmentData { - return { - path: new Uint8Array(), - commitment: new Uint8Array() - }; -} -export const PacketCommitmentData = { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketCommitmentData", - aminoType: "cosmos-sdk/PacketCommitmentData", - encode(message: PacketCommitmentData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.commitment.length !== 0) { - writer.uint32(18).bytes(message.commitment); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketCommitmentData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketCommitmentData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.commitment = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketCommitmentData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - commitment: isSet(object.commitment) ? bytesFromBase64(object.commitment) : new Uint8Array() - }; - }, - toJSON(message: PacketCommitmentData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.commitment !== undefined && (obj.commitment = base64FromBytes(message.commitment !== undefined ? message.commitment : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketCommitmentData { - const message = createBasePacketCommitmentData(); - message.path = object.path ?? new Uint8Array(); - message.commitment = object.commitment ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketCommitmentDataSDKType): PacketCommitmentData { - return { - path: object?.path, - commitment: object?.commitment - }; - }, - toSDK(message: PacketCommitmentData): PacketCommitmentDataSDKType { - const obj: any = {}; - obj.path = message.path; - obj.commitment = message.commitment; - return obj; - }, - fromAmino(object: PacketCommitmentDataAmino): PacketCommitmentData { - return { - path: object.path, - commitment: object.commitment - }; - }, - toAmino(message: PacketCommitmentData): PacketCommitmentDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.commitment = message.commitment; - return obj; - }, - fromAminoMsg(object: PacketCommitmentDataAminoMsg): PacketCommitmentData { - return PacketCommitmentData.fromAmino(object.value); - }, - toAminoMsg(message: PacketCommitmentData): PacketCommitmentDataAminoMsg { - return { - type: "cosmos-sdk/PacketCommitmentData", - value: PacketCommitmentData.toAmino(message) - }; - }, - fromProtoMsg(message: PacketCommitmentDataProtoMsg): PacketCommitmentData { - return PacketCommitmentData.decode(message.value); - }, - toProto(message: PacketCommitmentData): Uint8Array { - return PacketCommitmentData.encode(message).finish(); - }, - toProtoMsg(message: PacketCommitmentData): PacketCommitmentDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketCommitmentData", - value: PacketCommitmentData.encode(message).finish() - }; - } -}; -function createBasePacketAcknowledgementData(): PacketAcknowledgementData { - return { - path: new Uint8Array(), - acknowledgement: new Uint8Array() - }; -} -export const PacketAcknowledgementData = { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketAcknowledgementData", - aminoType: "cosmos-sdk/PacketAcknowledgementData", - encode(message: PacketAcknowledgementData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.acknowledgement.length !== 0) { - writer.uint32(18).bytes(message.acknowledgement); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketAcknowledgementData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketAcknowledgementData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketAcknowledgementData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - acknowledgement: isSet(object.acknowledgement) ? bytesFromBase64(object.acknowledgement) : new Uint8Array() - }; - }, - toJSON(message: PacketAcknowledgementData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.acknowledgement !== undefined && (obj.acknowledgement = base64FromBytes(message.acknowledgement !== undefined ? message.acknowledgement : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketAcknowledgementData { - const message = createBasePacketAcknowledgementData(); - message.path = object.path ?? new Uint8Array(); - message.acknowledgement = object.acknowledgement ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketAcknowledgementDataSDKType): PacketAcknowledgementData { - return { - path: object?.path, - acknowledgement: object?.acknowledgement - }; - }, - toSDK(message: PacketAcknowledgementData): PacketAcknowledgementDataSDKType { - const obj: any = {}; - obj.path = message.path; - obj.acknowledgement = message.acknowledgement; - return obj; - }, - fromAmino(object: PacketAcknowledgementDataAmino): PacketAcknowledgementData { - return { - path: object.path, - acknowledgement: object.acknowledgement - }; - }, - toAmino(message: PacketAcknowledgementData): PacketAcknowledgementDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.acknowledgement = message.acknowledgement; - return obj; - }, - fromAminoMsg(object: PacketAcknowledgementDataAminoMsg): PacketAcknowledgementData { - return PacketAcknowledgementData.fromAmino(object.value); - }, - toAminoMsg(message: PacketAcknowledgementData): PacketAcknowledgementDataAminoMsg { - return { - type: "cosmos-sdk/PacketAcknowledgementData", - value: PacketAcknowledgementData.toAmino(message) - }; - }, - fromProtoMsg(message: PacketAcknowledgementDataProtoMsg): PacketAcknowledgementData { - return PacketAcknowledgementData.decode(message.value); - }, - toProto(message: PacketAcknowledgementData): Uint8Array { - return PacketAcknowledgementData.encode(message).finish(); - }, - toProtoMsg(message: PacketAcknowledgementData): PacketAcknowledgementDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketAcknowledgementData", - value: PacketAcknowledgementData.encode(message).finish() - }; - } -}; -function createBasePacketReceiptAbsenceData(): PacketReceiptAbsenceData { - return { - path: new Uint8Array() - }; -} -export const PacketReceiptAbsenceData = { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData", - aminoType: "cosmos-sdk/PacketReceiptAbsenceData", - encode(message: PacketReceiptAbsenceData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketReceiptAbsenceData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketReceiptAbsenceData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketReceiptAbsenceData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array() - }; - }, - toJSON(message: PacketReceiptAbsenceData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketReceiptAbsenceData { - const message = createBasePacketReceiptAbsenceData(); - message.path = object.path ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketReceiptAbsenceDataSDKType): PacketReceiptAbsenceData { - return { - path: object?.path - }; - }, - toSDK(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataSDKType { - const obj: any = {}; - obj.path = message.path; - return obj; - }, - fromAmino(object: PacketReceiptAbsenceDataAmino): PacketReceiptAbsenceData { - return { - path: object.path - }; - }, - toAmino(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataAmino { - const obj: any = {}; - obj.path = message.path; - return obj; - }, - fromAminoMsg(object: PacketReceiptAbsenceDataAminoMsg): PacketReceiptAbsenceData { - return PacketReceiptAbsenceData.fromAmino(object.value); - }, - toAminoMsg(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataAminoMsg { - return { - type: "cosmos-sdk/PacketReceiptAbsenceData", - value: PacketReceiptAbsenceData.toAmino(message) - }; - }, - fromProtoMsg(message: PacketReceiptAbsenceDataProtoMsg): PacketReceiptAbsenceData { - return PacketReceiptAbsenceData.decode(message.value); - }, - toProto(message: PacketReceiptAbsenceData): Uint8Array { - return PacketReceiptAbsenceData.encode(message).finish(); - }, - toProtoMsg(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData", - value: PacketReceiptAbsenceData.encode(message).finish() - }; - } -}; -function createBaseNextSequenceRecvData(): NextSequenceRecvData { - return { - path: new Uint8Array(), - nextSeqRecv: BigInt(0) - }; -} -export const NextSequenceRecvData = { - typeUrl: "/ibc.lightclients.solomachine.v1.NextSequenceRecvData", - aminoType: "cosmos-sdk/NextSequenceRecvData", - encode(message: NextSequenceRecvData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.nextSeqRecv !== BigInt(0)) { - writer.uint32(16).uint64(message.nextSeqRecv); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): NextSequenceRecvData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNextSequenceRecvData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.nextSeqRecv = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): NextSequenceRecvData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - nextSeqRecv: isSet(object.nextSeqRecv) ? BigInt(object.nextSeqRecv.toString()) : BigInt(0) - }; - }, - toJSON(message: NextSequenceRecvData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.nextSeqRecv !== undefined && (obj.nextSeqRecv = (message.nextSeqRecv || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): NextSequenceRecvData { - const message = createBaseNextSequenceRecvData(); - message.path = object.path ?? new Uint8Array(); - message.nextSeqRecv = object.nextSeqRecv !== undefined && object.nextSeqRecv !== null ? BigInt(object.nextSeqRecv.toString()) : BigInt(0); - return message; - }, - fromSDK(object: NextSequenceRecvDataSDKType): NextSequenceRecvData { - return { - path: object?.path, - nextSeqRecv: object?.next_seq_recv - }; - }, - toSDK(message: NextSequenceRecvData): NextSequenceRecvDataSDKType { - const obj: any = {}; - obj.path = message.path; - obj.next_seq_recv = message.nextSeqRecv; - return obj; - }, - fromAmino(object: NextSequenceRecvDataAmino): NextSequenceRecvData { - return { - path: object.path, - nextSeqRecv: BigInt(object.next_seq_recv) - }; - }, - toAmino(message: NextSequenceRecvData): NextSequenceRecvDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.next_seq_recv = message.nextSeqRecv ? message.nextSeqRecv.toString() : undefined; - return obj; - }, - fromAminoMsg(object: NextSequenceRecvDataAminoMsg): NextSequenceRecvData { - return NextSequenceRecvData.fromAmino(object.value); - }, - toAminoMsg(message: NextSequenceRecvData): NextSequenceRecvDataAminoMsg { - return { - type: "cosmos-sdk/NextSequenceRecvData", - value: NextSequenceRecvData.toAmino(message) - }; - }, - fromProtoMsg(message: NextSequenceRecvDataProtoMsg): NextSequenceRecvData { - return NextSequenceRecvData.decode(message.value); - }, - toProto(message: NextSequenceRecvData): Uint8Array { - return NextSequenceRecvData.encode(message).finish(); - }, - toProtoMsg(message: NextSequenceRecvData): NextSequenceRecvDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v1.NextSequenceRecvData", - value: NextSequenceRecvData.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts b/examples/interchainjs/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts deleted file mode 100644 index 38f13431..00000000 --- a/examples/interchainjs/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts +++ /dev/null @@ -1,2448 +0,0 @@ -import { Any, AnyAmino, AnySDKType } from "../../../../google/protobuf/any"; -import { ConnectionEnd, ConnectionEndAmino, ConnectionEndSDKType } from "../../../core/connection/v1/connection"; -import { Channel, ChannelAmino, ChannelSDKType } from "../../../core/channel/v1/channel"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * DataType defines the type of solo machine proof being created. This is done - * to preserve uniqueness of different data sign byte encodings. - */ -export enum DataType { - /** DATA_TYPE_UNINITIALIZED_UNSPECIFIED - Default State */ - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0, - /** DATA_TYPE_CLIENT_STATE - Data type for client state verification */ - DATA_TYPE_CLIENT_STATE = 1, - /** DATA_TYPE_CONSENSUS_STATE - Data type for consensus state verification */ - DATA_TYPE_CONSENSUS_STATE = 2, - /** DATA_TYPE_CONNECTION_STATE - Data type for connection state verification */ - DATA_TYPE_CONNECTION_STATE = 3, - /** DATA_TYPE_CHANNEL_STATE - Data type for channel state verification */ - DATA_TYPE_CHANNEL_STATE = 4, - /** DATA_TYPE_PACKET_COMMITMENT - Data type for packet commitment verification */ - DATA_TYPE_PACKET_COMMITMENT = 5, - /** DATA_TYPE_PACKET_ACKNOWLEDGEMENT - Data type for packet acknowledgement verification */ - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6, - /** DATA_TYPE_PACKET_RECEIPT_ABSENCE - Data type for packet receipt absence verification */ - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7, - /** DATA_TYPE_NEXT_SEQUENCE_RECV - Data type for next sequence recv verification */ - DATA_TYPE_NEXT_SEQUENCE_RECV = 8, - /** DATA_TYPE_HEADER - Data type for header verification */ - DATA_TYPE_HEADER = 9, - UNRECOGNIZED = -1, -} -export const DataTypeSDKType = DataType; -export const DataTypeAmino = DataType; -export function dataTypeFromJSON(object: any): DataType { - switch (object) { - case 0: - case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": - return DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED; - case 1: - case "DATA_TYPE_CLIENT_STATE": - return DataType.DATA_TYPE_CLIENT_STATE; - case 2: - case "DATA_TYPE_CONSENSUS_STATE": - return DataType.DATA_TYPE_CONSENSUS_STATE; - case 3: - case "DATA_TYPE_CONNECTION_STATE": - return DataType.DATA_TYPE_CONNECTION_STATE; - case 4: - case "DATA_TYPE_CHANNEL_STATE": - return DataType.DATA_TYPE_CHANNEL_STATE; - case 5: - case "DATA_TYPE_PACKET_COMMITMENT": - return DataType.DATA_TYPE_PACKET_COMMITMENT; - case 6: - case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": - return DataType.DATA_TYPE_PACKET_ACKNOWLEDGEMENT; - case 7: - case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": - return DataType.DATA_TYPE_PACKET_RECEIPT_ABSENCE; - case 8: - case "DATA_TYPE_NEXT_SEQUENCE_RECV": - return DataType.DATA_TYPE_NEXT_SEQUENCE_RECV; - case 9: - case "DATA_TYPE_HEADER": - return DataType.DATA_TYPE_HEADER; - case -1: - case "UNRECOGNIZED": - default: - return DataType.UNRECOGNIZED; - } -} -export function dataTypeToJSON(object: DataType): string { - switch (object) { - case DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED: - return "DATA_TYPE_UNINITIALIZED_UNSPECIFIED"; - case DataType.DATA_TYPE_CLIENT_STATE: - return "DATA_TYPE_CLIENT_STATE"; - case DataType.DATA_TYPE_CONSENSUS_STATE: - return "DATA_TYPE_CONSENSUS_STATE"; - case DataType.DATA_TYPE_CONNECTION_STATE: - return "DATA_TYPE_CONNECTION_STATE"; - case DataType.DATA_TYPE_CHANNEL_STATE: - return "DATA_TYPE_CHANNEL_STATE"; - case DataType.DATA_TYPE_PACKET_COMMITMENT: - return "DATA_TYPE_PACKET_COMMITMENT"; - case DataType.DATA_TYPE_PACKET_ACKNOWLEDGEMENT: - return "DATA_TYPE_PACKET_ACKNOWLEDGEMENT"; - case DataType.DATA_TYPE_PACKET_RECEIPT_ABSENCE: - return "DATA_TYPE_PACKET_RECEIPT_ABSENCE"; - case DataType.DATA_TYPE_NEXT_SEQUENCE_RECV: - return "DATA_TYPE_NEXT_SEQUENCE_RECV"; - case DataType.DATA_TYPE_HEADER: - return "DATA_TYPE_HEADER"; - case DataType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * ClientState defines a solo machine client that tracks the current consensus - * state and if the client is frozen. - */ -export interface ClientState { - /** latest sequence of the client state */ - sequence: bigint; - /** frozen sequence of the solo machine */ - isFrozen: boolean; - consensusState: ConsensusState | undefined; - /** - * when set to true, will allow governance to update a solo machine client. - * The client will be unfrozen if it is frozen. - */ - allowUpdateAfterProposal: boolean; -} -export interface ClientStateProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.ClientState"; - value: Uint8Array; -} -/** - * ClientState defines a solo machine client that tracks the current consensus - * state and if the client is frozen. - */ -export interface ClientStateAmino { - /** latest sequence of the client state */ - sequence: string; - /** frozen sequence of the solo machine */ - is_frozen: boolean; - consensus_state?: ConsensusStateAmino | undefined; - /** - * when set to true, will allow governance to update a solo machine client. - * The client will be unfrozen if it is frozen. - */ - allow_update_after_proposal: boolean; -} -export interface ClientStateAminoMsg { - type: "cosmos-sdk/ClientState"; - value: ClientStateAmino; -} -/** - * ClientState defines a solo machine client that tracks the current consensus - * state and if the client is frozen. - */ -export interface ClientStateSDKType { - sequence: bigint; - is_frozen: boolean; - consensus_state: ConsensusStateSDKType | undefined; - allow_update_after_proposal: boolean; -} -/** - * ConsensusState defines a solo machine consensus state. The sequence of a - * consensus state is contained in the "height" key used in storing the - * consensus state. - */ -export interface ConsensusState { - /** public key of the solo machine */ - publicKey: Any | undefined; - /** - * diversifier allows the same public key to be re-used across different solo - * machine clients (potentially on different chains) without being considered - * misbehaviour. - */ - diversifier: string; - timestamp: bigint; -} -export interface ConsensusStateProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.ConsensusState"; - value: Uint8Array; -} -/** - * ConsensusState defines a solo machine consensus state. The sequence of a - * consensus state is contained in the "height" key used in storing the - * consensus state. - */ -export interface ConsensusStateAmino { - /** public key of the solo machine */ - public_key?: AnyAmino | undefined; - /** - * diversifier allows the same public key to be re-used across different solo - * machine clients (potentially on different chains) without being considered - * misbehaviour. - */ - diversifier: string; - timestamp: string; -} -export interface ConsensusStateAminoMsg { - type: "cosmos-sdk/ConsensusState"; - value: ConsensusStateAmino; -} -/** - * ConsensusState defines a solo machine consensus state. The sequence of a - * consensus state is contained in the "height" key used in storing the - * consensus state. - */ -export interface ConsensusStateSDKType { - public_key: AnySDKType | undefined; - diversifier: string; - timestamp: bigint; -} -/** Header defines a solo machine consensus header */ -export interface Header { - /** sequence to update solo machine public key at */ - sequence: bigint; - timestamp: bigint; - signature: Uint8Array; - newPublicKey: Any | undefined; - newDiversifier: string; -} -export interface HeaderProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.Header"; - value: Uint8Array; -} -/** Header defines a solo machine consensus header */ -export interface HeaderAmino { - /** sequence to update solo machine public key at */ - sequence: string; - timestamp: string; - signature: Uint8Array; - new_public_key?: AnyAmino | undefined; - new_diversifier: string; -} -export interface HeaderAminoMsg { - type: "cosmos-sdk/Header"; - value: HeaderAmino; -} -/** Header defines a solo machine consensus header */ -export interface HeaderSDKType { - sequence: bigint; - timestamp: bigint; - signature: Uint8Array; - new_public_key: AnySDKType | undefined; - new_diversifier: string; -} -/** - * Misbehaviour defines misbehaviour for a solo machine which consists - * of a sequence and two signatures over different messages at that sequence. - */ -export interface Misbehaviour { - clientId: string; - sequence: bigint; - signatureOne: SignatureAndData | undefined; - signatureTwo: SignatureAndData | undefined; -} -export interface MisbehaviourProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.Misbehaviour"; - value: Uint8Array; -} -/** - * Misbehaviour defines misbehaviour for a solo machine which consists - * of a sequence and two signatures over different messages at that sequence. - */ -export interface MisbehaviourAmino { - client_id: string; - sequence: string; - signature_one?: SignatureAndDataAmino | undefined; - signature_two?: SignatureAndDataAmino | undefined; -} -export interface MisbehaviourAminoMsg { - type: "cosmos-sdk/Misbehaviour"; - value: MisbehaviourAmino; -} -/** - * Misbehaviour defines misbehaviour for a solo machine which consists - * of a sequence and two signatures over different messages at that sequence. - */ -export interface MisbehaviourSDKType { - client_id: string; - sequence: bigint; - signature_one: SignatureAndDataSDKType | undefined; - signature_two: SignatureAndDataSDKType | undefined; -} -/** - * SignatureAndData contains a signature and the data signed over to create that - * signature. - */ -export interface SignatureAndData { - signature: Uint8Array; - dataType: DataType; - data: Uint8Array; - timestamp: bigint; -} -export interface SignatureAndDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.SignatureAndData"; - value: Uint8Array; -} -/** - * SignatureAndData contains a signature and the data signed over to create that - * signature. - */ -export interface SignatureAndDataAmino { - signature: Uint8Array; - data_type: DataType; - data: Uint8Array; - timestamp: string; -} -export interface SignatureAndDataAminoMsg { - type: "cosmos-sdk/SignatureAndData"; - value: SignatureAndDataAmino; -} -/** - * SignatureAndData contains a signature and the data signed over to create that - * signature. - */ -export interface SignatureAndDataSDKType { - signature: Uint8Array; - data_type: DataType; - data: Uint8Array; - timestamp: bigint; -} -/** - * TimestampedSignatureData contains the signature data and the timestamp of the - * signature. - */ -export interface TimestampedSignatureData { - signatureData: Uint8Array; - timestamp: bigint; -} -export interface TimestampedSignatureDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.TimestampedSignatureData"; - value: Uint8Array; -} -/** - * TimestampedSignatureData contains the signature data and the timestamp of the - * signature. - */ -export interface TimestampedSignatureDataAmino { - signature_data: Uint8Array; - timestamp: string; -} -export interface TimestampedSignatureDataAminoMsg { - type: "cosmos-sdk/TimestampedSignatureData"; - value: TimestampedSignatureDataAmino; -} -/** - * TimestampedSignatureData contains the signature data and the timestamp of the - * signature. - */ -export interface TimestampedSignatureDataSDKType { - signature_data: Uint8Array; - timestamp: bigint; -} -/** SignBytes defines the signed bytes used for signature verification. */ -export interface SignBytes { - sequence: bigint; - timestamp: bigint; - diversifier: string; - /** type of the data used */ - dataType: DataType; - /** marshaled data */ - data: Uint8Array; -} -export interface SignBytesProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.SignBytes"; - value: Uint8Array; -} -/** SignBytes defines the signed bytes used for signature verification. */ -export interface SignBytesAmino { - sequence: string; - timestamp: string; - diversifier: string; - /** type of the data used */ - data_type: DataType; - /** marshaled data */ - data: Uint8Array; -} -export interface SignBytesAminoMsg { - type: "cosmos-sdk/SignBytes"; - value: SignBytesAmino; -} -/** SignBytes defines the signed bytes used for signature verification. */ -export interface SignBytesSDKType { - sequence: bigint; - timestamp: bigint; - diversifier: string; - data_type: DataType; - data: Uint8Array; -} -/** HeaderData returns the SignBytes data for update verification. */ -export interface HeaderData { - /** header public key */ - newPubKey: Any | undefined; - /** header diversifier */ - newDiversifier: string; -} -export interface HeaderDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.HeaderData"; - value: Uint8Array; -} -/** HeaderData returns the SignBytes data for update verification. */ -export interface HeaderDataAmino { - /** header public key */ - new_pub_key?: AnyAmino | undefined; - /** header diversifier */ - new_diversifier: string; -} -export interface HeaderDataAminoMsg { - type: "cosmos-sdk/HeaderData"; - value: HeaderDataAmino; -} -/** HeaderData returns the SignBytes data for update verification. */ -export interface HeaderDataSDKType { - new_pub_key: AnySDKType | undefined; - new_diversifier: string; -} -/** ClientStateData returns the SignBytes data for client state verification. */ -export interface ClientStateData { - path: Uint8Array; - clientState: Any | undefined; -} -export interface ClientStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.ClientStateData"; - value: Uint8Array; -} -/** ClientStateData returns the SignBytes data for client state verification. */ -export interface ClientStateDataAmino { - path: Uint8Array; - client_state?: AnyAmino | undefined; -} -export interface ClientStateDataAminoMsg { - type: "cosmos-sdk/ClientStateData"; - value: ClientStateDataAmino; -} -/** ClientStateData returns the SignBytes data for client state verification. */ -export interface ClientStateDataSDKType { - path: Uint8Array; - client_state: AnySDKType | undefined; -} -/** - * ConsensusStateData returns the SignBytes data for consensus state - * verification. - */ -export interface ConsensusStateData { - path: Uint8Array; - consensusState: Any | undefined; -} -export interface ConsensusStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.ConsensusStateData"; - value: Uint8Array; -} -/** - * ConsensusStateData returns the SignBytes data for consensus state - * verification. - */ -export interface ConsensusStateDataAmino { - path: Uint8Array; - consensus_state?: AnyAmino | undefined; -} -export interface ConsensusStateDataAminoMsg { - type: "cosmos-sdk/ConsensusStateData"; - value: ConsensusStateDataAmino; -} -/** - * ConsensusStateData returns the SignBytes data for consensus state - * verification. - */ -export interface ConsensusStateDataSDKType { - path: Uint8Array; - consensus_state: AnySDKType | undefined; -} -/** - * ConnectionStateData returns the SignBytes data for connection state - * verification. - */ -export interface ConnectionStateData { - path: Uint8Array; - connection: ConnectionEnd | undefined; -} -export interface ConnectionStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.ConnectionStateData"; - value: Uint8Array; -} -/** - * ConnectionStateData returns the SignBytes data for connection state - * verification. - */ -export interface ConnectionStateDataAmino { - path: Uint8Array; - connection?: ConnectionEndAmino | undefined; -} -export interface ConnectionStateDataAminoMsg { - type: "cosmos-sdk/ConnectionStateData"; - value: ConnectionStateDataAmino; -} -/** - * ConnectionStateData returns the SignBytes data for connection state - * verification. - */ -export interface ConnectionStateDataSDKType { - path: Uint8Array; - connection: ConnectionEndSDKType | undefined; -} -/** - * ChannelStateData returns the SignBytes data for channel state - * verification. - */ -export interface ChannelStateData { - path: Uint8Array; - channel: Channel | undefined; -} -export interface ChannelStateDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.ChannelStateData"; - value: Uint8Array; -} -/** - * ChannelStateData returns the SignBytes data for channel state - * verification. - */ -export interface ChannelStateDataAmino { - path: Uint8Array; - channel?: ChannelAmino | undefined; -} -export interface ChannelStateDataAminoMsg { - type: "cosmos-sdk/ChannelStateData"; - value: ChannelStateDataAmino; -} -/** - * ChannelStateData returns the SignBytes data for channel state - * verification. - */ -export interface ChannelStateDataSDKType { - path: Uint8Array; - channel: ChannelSDKType | undefined; -} -/** - * PacketCommitmentData returns the SignBytes data for packet commitment - * verification. - */ -export interface PacketCommitmentData { - path: Uint8Array; - commitment: Uint8Array; -} -export interface PacketCommitmentDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketCommitmentData"; - value: Uint8Array; -} -/** - * PacketCommitmentData returns the SignBytes data for packet commitment - * verification. - */ -export interface PacketCommitmentDataAmino { - path: Uint8Array; - commitment: Uint8Array; -} -export interface PacketCommitmentDataAminoMsg { - type: "cosmos-sdk/PacketCommitmentData"; - value: PacketCommitmentDataAmino; -} -/** - * PacketCommitmentData returns the SignBytes data for packet commitment - * verification. - */ -export interface PacketCommitmentDataSDKType { - path: Uint8Array; - commitment: Uint8Array; -} -/** - * PacketAcknowledgementData returns the SignBytes data for acknowledgement - * verification. - */ -export interface PacketAcknowledgementData { - path: Uint8Array; - acknowledgement: Uint8Array; -} -export interface PacketAcknowledgementDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketAcknowledgementData"; - value: Uint8Array; -} -/** - * PacketAcknowledgementData returns the SignBytes data for acknowledgement - * verification. - */ -export interface PacketAcknowledgementDataAmino { - path: Uint8Array; - acknowledgement: Uint8Array; -} -export interface PacketAcknowledgementDataAminoMsg { - type: "cosmos-sdk/PacketAcknowledgementData"; - value: PacketAcknowledgementDataAmino; -} -/** - * PacketAcknowledgementData returns the SignBytes data for acknowledgement - * verification. - */ -export interface PacketAcknowledgementDataSDKType { - path: Uint8Array; - acknowledgement: Uint8Array; -} -/** - * PacketReceiptAbsenceData returns the SignBytes data for - * packet receipt absence verification. - */ -export interface PacketReceiptAbsenceData { - path: Uint8Array; -} -export interface PacketReceiptAbsenceDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData"; - value: Uint8Array; -} -/** - * PacketReceiptAbsenceData returns the SignBytes data for - * packet receipt absence verification. - */ -export interface PacketReceiptAbsenceDataAmino { - path: Uint8Array; -} -export interface PacketReceiptAbsenceDataAminoMsg { - type: "cosmos-sdk/PacketReceiptAbsenceData"; - value: PacketReceiptAbsenceDataAmino; -} -/** - * PacketReceiptAbsenceData returns the SignBytes data for - * packet receipt absence verification. - */ -export interface PacketReceiptAbsenceDataSDKType { - path: Uint8Array; -} -/** - * NextSequenceRecvData returns the SignBytes data for verification of the next - * sequence to be received. - */ -export interface NextSequenceRecvData { - path: Uint8Array; - nextSeqRecv: bigint; -} -export interface NextSequenceRecvDataProtoMsg { - typeUrl: "/ibc.lightclients.solomachine.v2.NextSequenceRecvData"; - value: Uint8Array; -} -/** - * NextSequenceRecvData returns the SignBytes data for verification of the next - * sequence to be received. - */ -export interface NextSequenceRecvDataAmino { - path: Uint8Array; - next_seq_recv: string; -} -export interface NextSequenceRecvDataAminoMsg { - type: "cosmos-sdk/NextSequenceRecvData"; - value: NextSequenceRecvDataAmino; -} -/** - * NextSequenceRecvData returns the SignBytes data for verification of the next - * sequence to be received. - */ -export interface NextSequenceRecvDataSDKType { - path: Uint8Array; - next_seq_recv: bigint; -} -function createBaseClientState(): ClientState { - return { - sequence: BigInt(0), - isFrozen: false, - consensusState: ConsensusState.fromPartial({}), - allowUpdateAfterProposal: false - }; -} -export const ClientState = { - typeUrl: "/ibc.lightclients.solomachine.v2.ClientState", - aminoType: "cosmos-sdk/ClientState", - encode(message: ClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.isFrozen === true) { - writer.uint32(16).bool(message.isFrozen); - } - if (message.consensusState !== undefined) { - ConsensusState.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); - } - if (message.allowUpdateAfterProposal === true) { - writer.uint32(32).bool(message.allowUpdateAfterProposal); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.isFrozen = reader.bool(); - break; - case 3: - message.consensusState = ConsensusState.decode(reader, reader.uint32()); - break; - case 4: - message.allowUpdateAfterProposal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientState { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - isFrozen: isSet(object.isFrozen) ? Boolean(object.isFrozen) : false, - consensusState: isSet(object.consensusState) ? ConsensusState.fromJSON(object.consensusState) : undefined, - allowUpdateAfterProposal: isSet(object.allowUpdateAfterProposal) ? Boolean(object.allowUpdateAfterProposal) : false - }; - }, - toJSON(message: ClientState): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.isFrozen !== undefined && (obj.isFrozen = message.isFrozen); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? ConsensusState.toJSON(message.consensusState) : undefined); - message.allowUpdateAfterProposal !== undefined && (obj.allowUpdateAfterProposal = message.allowUpdateAfterProposal); - return obj; - }, - fromPartial(object: DeepPartial): ClientState { - const message = createBaseClientState(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.isFrozen = object.isFrozen ?? false; - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? ConsensusState.fromPartial(object.consensusState) : undefined; - message.allowUpdateAfterProposal = object.allowUpdateAfterProposal ?? false; - return message; - }, - fromSDK(object: ClientStateSDKType): ClientState { - return { - sequence: object?.sequence, - isFrozen: object?.is_frozen, - consensusState: object.consensus_state ? ConsensusState.fromSDK(object.consensus_state) : undefined, - allowUpdateAfterProposal: object?.allow_update_after_proposal - }; - }, - toSDK(message: ClientState): ClientStateSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.is_frozen = message.isFrozen; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? ConsensusState.toSDK(message.consensusState) : undefined); - obj.allow_update_after_proposal = message.allowUpdateAfterProposal; - return obj; - }, - fromAmino(object: ClientStateAmino): ClientState { - return { - sequence: BigInt(object.sequence), - isFrozen: object.is_frozen, - consensusState: object?.consensus_state ? ConsensusState.fromAmino(object.consensus_state) : undefined, - allowUpdateAfterProposal: object.allow_update_after_proposal - }; - }, - toAmino(message: ClientState): ClientStateAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.is_frozen = message.isFrozen; - obj.consensus_state = message.consensusState ? ConsensusState.toAmino(message.consensusState) : undefined; - obj.allow_update_after_proposal = message.allowUpdateAfterProposal; - return obj; - }, - fromAminoMsg(object: ClientStateAminoMsg): ClientState { - return ClientState.fromAmino(object.value); - }, - toAminoMsg(message: ClientState): ClientStateAminoMsg { - return { - type: "cosmos-sdk/ClientState", - value: ClientState.toAmino(message) - }; - }, - fromProtoMsg(message: ClientStateProtoMsg): ClientState { - return ClientState.decode(message.value); - }, - toProto(message: ClientState): Uint8Array { - return ClientState.encode(message).finish(); - }, - toProtoMsg(message: ClientState): ClientStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.ClientState", - value: ClientState.encode(message).finish() - }; - } -}; -function createBaseConsensusState(): ConsensusState { - return { - publicKey: Any.fromPartial({}), - diversifier: "", - timestamp: BigInt(0) - }; -} -export const ConsensusState = { - typeUrl: "/ibc.lightclients.solomachine.v2.ConsensusState", - aminoType: "cosmos-sdk/ConsensusState", - encode(message: ConsensusState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.publicKey !== undefined) { - Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); - } - if (message.diversifier !== "") { - writer.uint32(18).string(message.diversifier); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(24).uint64(message.timestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.publicKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.diversifier = reader.string(); - break; - case 3: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusState { - return { - publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, - diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: ConsensusState): unknown { - const obj: any = {}; - message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined); - message.diversifier !== undefined && (obj.diversifier = message.diversifier); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusState { - const message = createBaseConsensusState(); - message.publicKey = object.publicKey !== undefined && object.publicKey !== null ? Any.fromPartial(object.publicKey) : undefined; - message.diversifier = object.diversifier ?? ""; - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ConsensusStateSDKType): ConsensusState { - return { - publicKey: object.public_key ? Any.fromSDK(object.public_key) : undefined, - diversifier: object?.diversifier, - timestamp: object?.timestamp - }; - }, - toSDK(message: ConsensusState): ConsensusStateSDKType { - const obj: any = {}; - message.publicKey !== undefined && (obj.public_key = message.publicKey ? Any.toSDK(message.publicKey) : undefined); - obj.diversifier = message.diversifier; - obj.timestamp = message.timestamp; - return obj; - }, - fromAmino(object: ConsensusStateAmino): ConsensusState { - return { - publicKey: object?.public_key ? Any.fromAmino(object.public_key) : undefined, - diversifier: object.diversifier, - timestamp: BigInt(object.timestamp) - }; - }, - toAmino(message: ConsensusState): ConsensusStateAmino { - const obj: any = {}; - obj.public_key = message.publicKey ? Any.toAmino(message.publicKey) : undefined; - obj.diversifier = message.diversifier; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusStateAminoMsg): ConsensusState { - return ConsensusState.fromAmino(object.value); - }, - toAminoMsg(message: ConsensusState): ConsensusStateAminoMsg { - return { - type: "cosmos-sdk/ConsensusState", - value: ConsensusState.toAmino(message) - }; - }, - fromProtoMsg(message: ConsensusStateProtoMsg): ConsensusState { - return ConsensusState.decode(message.value); - }, - toProto(message: ConsensusState): Uint8Array { - return ConsensusState.encode(message).finish(); - }, - toProtoMsg(message: ConsensusState): ConsensusStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.ConsensusState", - value: ConsensusState.encode(message).finish() - }; - } -}; -function createBaseHeader(): Header { - return { - sequence: BigInt(0), - timestamp: BigInt(0), - signature: new Uint8Array(), - newPublicKey: Any.fromPartial({}), - newDiversifier: "" - }; -} -export const Header = { - typeUrl: "/ibc.lightclients.solomachine.v2.Header", - aminoType: "cosmos-sdk/Header", - encode(message: Header, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(16).uint64(message.timestamp); - } - if (message.signature.length !== 0) { - writer.uint32(26).bytes(message.signature); - } - if (message.newPublicKey !== undefined) { - Any.encode(message.newPublicKey, writer.uint32(34).fork()).ldelim(); - } - if (message.newDiversifier !== "") { - writer.uint32(42).string(message.newDiversifier); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Header { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.signature = reader.bytes(); - break; - case 4: - message.newPublicKey = Any.decode(reader, reader.uint32()); - break; - case 5: - message.newDiversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Header { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0), - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), - newPublicKey: isSet(object.newPublicKey) ? Any.fromJSON(object.newPublicKey) : undefined, - newDiversifier: isSet(object.newDiversifier) ? String(object.newDiversifier) : "" - }; - }, - toJSON(message: Header): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - message.newPublicKey !== undefined && (obj.newPublicKey = message.newPublicKey ? Any.toJSON(message.newPublicKey) : undefined); - message.newDiversifier !== undefined && (obj.newDiversifier = message.newDiversifier); - return obj; - }, - fromPartial(object: DeepPartial
): Header { - const message = createBaseHeader(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - message.signature = object.signature ?? new Uint8Array(); - message.newPublicKey = object.newPublicKey !== undefined && object.newPublicKey !== null ? Any.fromPartial(object.newPublicKey) : undefined; - message.newDiversifier = object.newDiversifier ?? ""; - return message; - }, - fromSDK(object: HeaderSDKType): Header { - return { - sequence: object?.sequence, - timestamp: object?.timestamp, - signature: object?.signature, - newPublicKey: object.new_public_key ? Any.fromSDK(object.new_public_key) : undefined, - newDiversifier: object?.new_diversifier - }; - }, - toSDK(message: Header): HeaderSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.timestamp = message.timestamp; - obj.signature = message.signature; - message.newPublicKey !== undefined && (obj.new_public_key = message.newPublicKey ? Any.toSDK(message.newPublicKey) : undefined); - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAmino(object: HeaderAmino): Header { - return { - sequence: BigInt(object.sequence), - timestamp: BigInt(object.timestamp), - signature: object.signature, - newPublicKey: object?.new_public_key ? Any.fromAmino(object.new_public_key) : undefined, - newDiversifier: object.new_diversifier - }; - }, - toAmino(message: Header): HeaderAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - obj.signature = message.signature; - obj.new_public_key = message.newPublicKey ? Any.toAmino(message.newPublicKey) : undefined; - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAminoMsg(object: HeaderAminoMsg): Header { - return Header.fromAmino(object.value); - }, - toAminoMsg(message: Header): HeaderAminoMsg { - return { - type: "cosmos-sdk/Header", - value: Header.toAmino(message) - }; - }, - fromProtoMsg(message: HeaderProtoMsg): Header { - return Header.decode(message.value); - }, - toProto(message: Header): Uint8Array { - return Header.encode(message).finish(); - }, - toProtoMsg(message: Header): HeaderProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.Header", - value: Header.encode(message).finish() - }; - } -}; -function createBaseMisbehaviour(): Misbehaviour { - return { - clientId: "", - sequence: BigInt(0), - signatureOne: SignatureAndData.fromPartial({}), - signatureTwo: SignatureAndData.fromPartial({}) - }; -} -export const Misbehaviour = { - typeUrl: "/ibc.lightclients.solomachine.v2.Misbehaviour", - aminoType: "cosmos-sdk/Misbehaviour", - encode(message: Misbehaviour, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.sequence !== BigInt(0)) { - writer.uint32(16).uint64(message.sequence); - } - if (message.signatureOne !== undefined) { - SignatureAndData.encode(message.signatureOne, writer.uint32(26).fork()).ldelim(); - } - if (message.signatureTwo !== undefined) { - SignatureAndData.encode(message.signatureTwo, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Misbehaviour { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMisbehaviour(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.sequence = reader.uint64(); - break; - case 3: - message.signatureOne = SignatureAndData.decode(reader, reader.uint32()); - break; - case 4: - message.signatureTwo = SignatureAndData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Misbehaviour { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - signatureOne: isSet(object.signatureOne) ? SignatureAndData.fromJSON(object.signatureOne) : undefined, - signatureTwo: isSet(object.signatureTwo) ? SignatureAndData.fromJSON(object.signatureTwo) : undefined - }; - }, - toJSON(message: Misbehaviour): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.signatureOne !== undefined && (obj.signatureOne = message.signatureOne ? SignatureAndData.toJSON(message.signatureOne) : undefined); - message.signatureTwo !== undefined && (obj.signatureTwo = message.signatureTwo ? SignatureAndData.toJSON(message.signatureTwo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Misbehaviour { - const message = createBaseMisbehaviour(); - message.clientId = object.clientId ?? ""; - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.signatureOne = object.signatureOne !== undefined && object.signatureOne !== null ? SignatureAndData.fromPartial(object.signatureOne) : undefined; - message.signatureTwo = object.signatureTwo !== undefined && object.signatureTwo !== null ? SignatureAndData.fromPartial(object.signatureTwo) : undefined; - return message; - }, - fromSDK(object: MisbehaviourSDKType): Misbehaviour { - return { - clientId: object?.client_id, - sequence: object?.sequence, - signatureOne: object.signature_one ? SignatureAndData.fromSDK(object.signature_one) : undefined, - signatureTwo: object.signature_two ? SignatureAndData.fromSDK(object.signature_two) : undefined - }; - }, - toSDK(message: Misbehaviour): MisbehaviourSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - obj.sequence = message.sequence; - message.signatureOne !== undefined && (obj.signature_one = message.signatureOne ? SignatureAndData.toSDK(message.signatureOne) : undefined); - message.signatureTwo !== undefined && (obj.signature_two = message.signatureTwo ? SignatureAndData.toSDK(message.signatureTwo) : undefined); - return obj; - }, - fromAmino(object: MisbehaviourAmino): Misbehaviour { - return { - clientId: object.client_id, - sequence: BigInt(object.sequence), - signatureOne: object?.signature_one ? SignatureAndData.fromAmino(object.signature_one) : undefined, - signatureTwo: object?.signature_two ? SignatureAndData.fromAmino(object.signature_two) : undefined - }; - }, - toAmino(message: Misbehaviour): MisbehaviourAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.signature_one = message.signatureOne ? SignatureAndData.toAmino(message.signatureOne) : undefined; - obj.signature_two = message.signatureTwo ? SignatureAndData.toAmino(message.signatureTwo) : undefined; - return obj; - }, - fromAminoMsg(object: MisbehaviourAminoMsg): Misbehaviour { - return Misbehaviour.fromAmino(object.value); - }, - toAminoMsg(message: Misbehaviour): MisbehaviourAminoMsg { - return { - type: "cosmos-sdk/Misbehaviour", - value: Misbehaviour.toAmino(message) - }; - }, - fromProtoMsg(message: MisbehaviourProtoMsg): Misbehaviour { - return Misbehaviour.decode(message.value); - }, - toProto(message: Misbehaviour): Uint8Array { - return Misbehaviour.encode(message).finish(); - }, - toProtoMsg(message: Misbehaviour): MisbehaviourProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.Misbehaviour", - value: Misbehaviour.encode(message).finish() - }; - } -}; -function createBaseSignatureAndData(): SignatureAndData { - return { - signature: new Uint8Array(), - dataType: 0, - data: new Uint8Array(), - timestamp: BigInt(0) - }; -} -export const SignatureAndData = { - typeUrl: "/ibc.lightclients.solomachine.v2.SignatureAndData", - aminoType: "cosmos-sdk/SignatureAndData", - encode(message: SignatureAndData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signature.length !== 0) { - writer.uint32(10).bytes(message.signature); - } - if (message.dataType !== 0) { - writer.uint32(16).int32(message.dataType); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(32).uint64(message.timestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignatureAndData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignatureAndData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature = reader.bytes(); - break; - case 2: - message.dataType = (reader.int32() as any); - break; - case 3: - message.data = reader.bytes(); - break; - case 4: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignatureAndData { - return { - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), - dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : -1, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: SignatureAndData): unknown { - const obj: any = {}; - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - message.dataType !== undefined && (obj.dataType = dataTypeToJSON(message.dataType)); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SignatureAndData { - const message = createBaseSignatureAndData(); - message.signature = object.signature ?? new Uint8Array(); - message.dataType = object.dataType ?? 0; - message.data = object.data ?? new Uint8Array(); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SignatureAndDataSDKType): SignatureAndData { - return { - signature: object?.signature, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object?.data, - timestamp: object?.timestamp - }; - }, - toSDK(message: SignatureAndData): SignatureAndDataSDKType { - const obj: any = {}; - obj.signature = message.signature; - message.dataType !== undefined && (obj.data_type = dataTypeToJSON(message.dataType)); - obj.data = message.data; - obj.timestamp = message.timestamp; - return obj; - }, - fromAmino(object: SignatureAndDataAmino): SignatureAndData { - return { - signature: object.signature, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object.data, - timestamp: BigInt(object.timestamp) - }; - }, - toAmino(message: SignatureAndData): SignatureAndDataAmino { - const obj: any = {}; - obj.signature = message.signature; - obj.data_type = message.dataType; - obj.data = message.data; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SignatureAndDataAminoMsg): SignatureAndData { - return SignatureAndData.fromAmino(object.value); - }, - toAminoMsg(message: SignatureAndData): SignatureAndDataAminoMsg { - return { - type: "cosmos-sdk/SignatureAndData", - value: SignatureAndData.toAmino(message) - }; - }, - fromProtoMsg(message: SignatureAndDataProtoMsg): SignatureAndData { - return SignatureAndData.decode(message.value); - }, - toProto(message: SignatureAndData): Uint8Array { - return SignatureAndData.encode(message).finish(); - }, - toProtoMsg(message: SignatureAndData): SignatureAndDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.SignatureAndData", - value: SignatureAndData.encode(message).finish() - }; - } -}; -function createBaseTimestampedSignatureData(): TimestampedSignatureData { - return { - signatureData: new Uint8Array(), - timestamp: BigInt(0) - }; -} -export const TimestampedSignatureData = { - typeUrl: "/ibc.lightclients.solomachine.v2.TimestampedSignatureData", - aminoType: "cosmos-sdk/TimestampedSignatureData", - encode(message: TimestampedSignatureData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signatureData.length !== 0) { - writer.uint32(10).bytes(message.signatureData); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(16).uint64(message.timestamp); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TimestampedSignatureData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimestampedSignatureData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signatureData = reader.bytes(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TimestampedSignatureData { - return { - signatureData: isSet(object.signatureData) ? bytesFromBase64(object.signatureData) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0) - }; - }, - toJSON(message: TimestampedSignatureData): unknown { - const obj: any = {}; - message.signatureData !== undefined && (obj.signatureData = base64FromBytes(message.signatureData !== undefined ? message.signatureData : new Uint8Array())); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): TimestampedSignatureData { - const message = createBaseTimestampedSignatureData(); - message.signatureData = object.signatureData ?? new Uint8Array(); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - return message; - }, - fromSDK(object: TimestampedSignatureDataSDKType): TimestampedSignatureData { - return { - signatureData: object?.signature_data, - timestamp: object?.timestamp - }; - }, - toSDK(message: TimestampedSignatureData): TimestampedSignatureDataSDKType { - const obj: any = {}; - obj.signature_data = message.signatureData; - obj.timestamp = message.timestamp; - return obj; - }, - fromAmino(object: TimestampedSignatureDataAmino): TimestampedSignatureData { - return { - signatureData: object.signature_data, - timestamp: BigInt(object.timestamp) - }; - }, - toAmino(message: TimestampedSignatureData): TimestampedSignatureDataAmino { - const obj: any = {}; - obj.signature_data = message.signatureData; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - return obj; - }, - fromAminoMsg(object: TimestampedSignatureDataAminoMsg): TimestampedSignatureData { - return TimestampedSignatureData.fromAmino(object.value); - }, - toAminoMsg(message: TimestampedSignatureData): TimestampedSignatureDataAminoMsg { - return { - type: "cosmos-sdk/TimestampedSignatureData", - value: TimestampedSignatureData.toAmino(message) - }; - }, - fromProtoMsg(message: TimestampedSignatureDataProtoMsg): TimestampedSignatureData { - return TimestampedSignatureData.decode(message.value); - }, - toProto(message: TimestampedSignatureData): Uint8Array { - return TimestampedSignatureData.encode(message).finish(); - }, - toProtoMsg(message: TimestampedSignatureData): TimestampedSignatureDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.TimestampedSignatureData", - value: TimestampedSignatureData.encode(message).finish() - }; - } -}; -function createBaseSignBytes(): SignBytes { - return { - sequence: BigInt(0), - timestamp: BigInt(0), - diversifier: "", - dataType: 0, - data: new Uint8Array() - }; -} -export const SignBytes = { - typeUrl: "/ibc.lightclients.solomachine.v2.SignBytes", - aminoType: "cosmos-sdk/SignBytes", - encode(message: SignBytes, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sequence !== BigInt(0)) { - writer.uint32(8).uint64(message.sequence); - } - if (message.timestamp !== BigInt(0)) { - writer.uint32(16).uint64(message.timestamp); - } - if (message.diversifier !== "") { - writer.uint32(26).string(message.diversifier); - } - if (message.dataType !== 0) { - writer.uint32(32).int32(message.dataType); - } - if (message.data.length !== 0) { - writer.uint32(42).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignBytes { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignBytes(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.diversifier = reader.string(); - break; - case 4: - message.dataType = (reader.int32() as any); - break; - case 5: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignBytes { - return { - sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt(0), - timestamp: isSet(object.timestamp) ? BigInt(object.timestamp.toString()) : BigInt(0), - diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", - dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : -1, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: SignBytes): unknown { - const obj: any = {}; - message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt(0)).toString()); - message.timestamp !== undefined && (obj.timestamp = (message.timestamp || BigInt(0)).toString()); - message.diversifier !== undefined && (obj.diversifier = message.diversifier); - message.dataType !== undefined && (obj.dataType = dataTypeToJSON(message.dataType)); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): SignBytes { - const message = createBaseSignBytes(); - message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0); - message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt(0); - message.diversifier = object.diversifier ?? ""; - message.dataType = object.dataType ?? 0; - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: SignBytesSDKType): SignBytes { - return { - sequence: object?.sequence, - timestamp: object?.timestamp, - diversifier: object?.diversifier, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object?.data - }; - }, - toSDK(message: SignBytes): SignBytesSDKType { - const obj: any = {}; - obj.sequence = message.sequence; - obj.timestamp = message.timestamp; - obj.diversifier = message.diversifier; - message.dataType !== undefined && (obj.data_type = dataTypeToJSON(message.dataType)); - obj.data = message.data; - return obj; - }, - fromAmino(object: SignBytesAmino): SignBytes { - return { - sequence: BigInt(object.sequence), - timestamp: BigInt(object.timestamp), - diversifier: object.diversifier, - dataType: isSet(object.data_type) ? dataTypeFromJSON(object.data_type) : -1, - data: object.data - }; - }, - toAmino(message: SignBytes): SignBytesAmino { - const obj: any = {}; - obj.sequence = message.sequence ? message.sequence.toString() : undefined; - obj.timestamp = message.timestamp ? message.timestamp.toString() : undefined; - obj.diversifier = message.diversifier; - obj.data_type = message.dataType; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: SignBytesAminoMsg): SignBytes { - return SignBytes.fromAmino(object.value); - }, - toAminoMsg(message: SignBytes): SignBytesAminoMsg { - return { - type: "cosmos-sdk/SignBytes", - value: SignBytes.toAmino(message) - }; - }, - fromProtoMsg(message: SignBytesProtoMsg): SignBytes { - return SignBytes.decode(message.value); - }, - toProto(message: SignBytes): Uint8Array { - return SignBytes.encode(message).finish(); - }, - toProtoMsg(message: SignBytes): SignBytesProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.SignBytes", - value: SignBytes.encode(message).finish() - }; - } -}; -function createBaseHeaderData(): HeaderData { - return { - newPubKey: Any.fromPartial({}), - newDiversifier: "" - }; -} -export const HeaderData = { - typeUrl: "/ibc.lightclients.solomachine.v2.HeaderData", - aminoType: "cosmos-sdk/HeaderData", - encode(message: HeaderData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.newPubKey !== undefined) { - Any.encode(message.newPubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.newDiversifier !== "") { - writer.uint32(18).string(message.newDiversifier); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HeaderData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeaderData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.newPubKey = Any.decode(reader, reader.uint32()); - break; - case 2: - message.newDiversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): HeaderData { - return { - newPubKey: isSet(object.newPubKey) ? Any.fromJSON(object.newPubKey) : undefined, - newDiversifier: isSet(object.newDiversifier) ? String(object.newDiversifier) : "" - }; - }, - toJSON(message: HeaderData): unknown { - const obj: any = {}; - message.newPubKey !== undefined && (obj.newPubKey = message.newPubKey ? Any.toJSON(message.newPubKey) : undefined); - message.newDiversifier !== undefined && (obj.newDiversifier = message.newDiversifier); - return obj; - }, - fromPartial(object: DeepPartial): HeaderData { - const message = createBaseHeaderData(); - message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null ? Any.fromPartial(object.newPubKey) : undefined; - message.newDiversifier = object.newDiversifier ?? ""; - return message; - }, - fromSDK(object: HeaderDataSDKType): HeaderData { - return { - newPubKey: object.new_pub_key ? Any.fromSDK(object.new_pub_key) : undefined, - newDiversifier: object?.new_diversifier - }; - }, - toSDK(message: HeaderData): HeaderDataSDKType { - const obj: any = {}; - message.newPubKey !== undefined && (obj.new_pub_key = message.newPubKey ? Any.toSDK(message.newPubKey) : undefined); - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAmino(object: HeaderDataAmino): HeaderData { - return { - newPubKey: object?.new_pub_key ? Any.fromAmino(object.new_pub_key) : undefined, - newDiversifier: object.new_diversifier - }; - }, - toAmino(message: HeaderData): HeaderDataAmino { - const obj: any = {}; - obj.new_pub_key = message.newPubKey ? Any.toAmino(message.newPubKey) : undefined; - obj.new_diversifier = message.newDiversifier; - return obj; - }, - fromAminoMsg(object: HeaderDataAminoMsg): HeaderData { - return HeaderData.fromAmino(object.value); - }, - toAminoMsg(message: HeaderData): HeaderDataAminoMsg { - return { - type: "cosmos-sdk/HeaderData", - value: HeaderData.toAmino(message) - }; - }, - fromProtoMsg(message: HeaderDataProtoMsg): HeaderData { - return HeaderData.decode(message.value); - }, - toProto(message: HeaderData): Uint8Array { - return HeaderData.encode(message).finish(); - }, - toProtoMsg(message: HeaderData): HeaderDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.HeaderData", - value: HeaderData.encode(message).finish() - }; - } -}; -function createBaseClientStateData(): ClientStateData { - return { - path: new Uint8Array(), - clientState: Any.fromPartial({}) - }; -} -export const ClientStateData = { - typeUrl: "/ibc.lightclients.solomachine.v2.ClientStateData", - aminoType: "cosmos-sdk/ClientStateData", - encode(message: ClientStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.clientState !== undefined) { - Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.clientState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined - }; - }, - toJSON(message: ClientStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ClientStateData { - const message = createBaseClientStateData(); - message.path = object.path ?? new Uint8Array(); - message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; - return message; - }, - fromSDK(object: ClientStateDataSDKType): ClientStateData { - return { - path: object?.path, - clientState: object.client_state ? Any.fromSDK(object.client_state) : undefined - }; - }, - toSDK(message: ClientStateData): ClientStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.clientState !== undefined && (obj.client_state = message.clientState ? Any.toSDK(message.clientState) : undefined); - return obj; - }, - fromAmino(object: ClientStateDataAmino): ClientStateData { - return { - path: object.path, - clientState: object?.client_state ? Any.fromAmino(object.client_state) : undefined - }; - }, - toAmino(message: ClientStateData): ClientStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined; - return obj; - }, - fromAminoMsg(object: ClientStateDataAminoMsg): ClientStateData { - return ClientStateData.fromAmino(object.value); - }, - toAminoMsg(message: ClientStateData): ClientStateDataAminoMsg { - return { - type: "cosmos-sdk/ClientStateData", - value: ClientStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ClientStateDataProtoMsg): ClientStateData { - return ClientStateData.decode(message.value); - }, - toProto(message: ClientStateData): Uint8Array { - return ClientStateData.encode(message).finish(); - }, - toProtoMsg(message: ClientStateData): ClientStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.ClientStateData", - value: ClientStateData.encode(message).finish() - }; - } -}; -function createBaseConsensusStateData(): ConsensusStateData { - return { - path: new Uint8Array(), - consensusState: Any.fromPartial({}) - }; -} -export const ConsensusStateData = { - typeUrl: "/ibc.lightclients.solomachine.v2.ConsensusStateData", - aminoType: "cosmos-sdk/ConsensusStateData", - encode(message: ConsensusStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.consensusState !== undefined) { - Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.consensusState = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined - }; - }, - toJSON(message: ConsensusStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusStateData { - const message = createBaseConsensusStateData(); - message.path = object.path ?? new Uint8Array(); - message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined; - return message; - }, - fromSDK(object: ConsensusStateDataSDKType): ConsensusStateData { - return { - path: object?.path, - consensusState: object.consensus_state ? Any.fromSDK(object.consensus_state) : undefined - }; - }, - toSDK(message: ConsensusStateData): ConsensusStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.consensusState !== undefined && (obj.consensus_state = message.consensusState ? Any.toSDK(message.consensusState) : undefined); - return obj; - }, - fromAmino(object: ConsensusStateDataAmino): ConsensusStateData { - return { - path: object.path, - consensusState: object?.consensus_state ? Any.fromAmino(object.consensus_state) : undefined - }; - }, - toAmino(message: ConsensusStateData): ConsensusStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusStateDataAminoMsg): ConsensusStateData { - return ConsensusStateData.fromAmino(object.value); - }, - toAminoMsg(message: ConsensusStateData): ConsensusStateDataAminoMsg { - return { - type: "cosmos-sdk/ConsensusStateData", - value: ConsensusStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ConsensusStateDataProtoMsg): ConsensusStateData { - return ConsensusStateData.decode(message.value); - }, - toProto(message: ConsensusStateData): Uint8Array { - return ConsensusStateData.encode(message).finish(); - }, - toProtoMsg(message: ConsensusStateData): ConsensusStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.ConsensusStateData", - value: ConsensusStateData.encode(message).finish() - }; - } -}; -function createBaseConnectionStateData(): ConnectionStateData { - return { - path: new Uint8Array(), - connection: ConnectionEnd.fromPartial({}) - }; -} -export const ConnectionStateData = { - typeUrl: "/ibc.lightclients.solomachine.v2.ConnectionStateData", - aminoType: "cosmos-sdk/ConnectionStateData", - encode(message: ConnectionStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.connection !== undefined) { - ConnectionEnd.encode(message.connection, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConnectionStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConnectionStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.connection = ConnectionEnd.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConnectionStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - connection: isSet(object.connection) ? ConnectionEnd.fromJSON(object.connection) : undefined - }; - }, - toJSON(message: ConnectionStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.connection !== undefined && (obj.connection = message.connection ? ConnectionEnd.toJSON(message.connection) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConnectionStateData { - const message = createBaseConnectionStateData(); - message.path = object.path ?? new Uint8Array(); - message.connection = object.connection !== undefined && object.connection !== null ? ConnectionEnd.fromPartial(object.connection) : undefined; - return message; - }, - fromSDK(object: ConnectionStateDataSDKType): ConnectionStateData { - return { - path: object?.path, - connection: object.connection ? ConnectionEnd.fromSDK(object.connection) : undefined - }; - }, - toSDK(message: ConnectionStateData): ConnectionStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.connection !== undefined && (obj.connection = message.connection ? ConnectionEnd.toSDK(message.connection) : undefined); - return obj; - }, - fromAmino(object: ConnectionStateDataAmino): ConnectionStateData { - return { - path: object.path, - connection: object?.connection ? ConnectionEnd.fromAmino(object.connection) : undefined - }; - }, - toAmino(message: ConnectionStateData): ConnectionStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.connection = message.connection ? ConnectionEnd.toAmino(message.connection) : undefined; - return obj; - }, - fromAminoMsg(object: ConnectionStateDataAminoMsg): ConnectionStateData { - return ConnectionStateData.fromAmino(object.value); - }, - toAminoMsg(message: ConnectionStateData): ConnectionStateDataAminoMsg { - return { - type: "cosmos-sdk/ConnectionStateData", - value: ConnectionStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ConnectionStateDataProtoMsg): ConnectionStateData { - return ConnectionStateData.decode(message.value); - }, - toProto(message: ConnectionStateData): Uint8Array { - return ConnectionStateData.encode(message).finish(); - }, - toProtoMsg(message: ConnectionStateData): ConnectionStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.ConnectionStateData", - value: ConnectionStateData.encode(message).finish() - }; - } -}; -function createBaseChannelStateData(): ChannelStateData { - return { - path: new Uint8Array(), - channel: Channel.fromPartial({}) - }; -} -export const ChannelStateData = { - typeUrl: "/ibc.lightclients.solomachine.v2.ChannelStateData", - aminoType: "cosmos-sdk/ChannelStateData", - encode(message: ChannelStateData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.channel !== undefined) { - Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ChannelStateData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChannelStateData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.channel = Channel.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ChannelStateData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined - }; - }, - toJSON(message: ChannelStateData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.channel !== undefined && (obj.channel = message.channel ? Channel.toJSON(message.channel) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ChannelStateData { - const message = createBaseChannelStateData(); - message.path = object.path ?? new Uint8Array(); - message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; - return message; - }, - fromSDK(object: ChannelStateDataSDKType): ChannelStateData { - return { - path: object?.path, - channel: object.channel ? Channel.fromSDK(object.channel) : undefined - }; - }, - toSDK(message: ChannelStateData): ChannelStateDataSDKType { - const obj: any = {}; - obj.path = message.path; - message.channel !== undefined && (obj.channel = message.channel ? Channel.toSDK(message.channel) : undefined); - return obj; - }, - fromAmino(object: ChannelStateDataAmino): ChannelStateData { - return { - path: object.path, - channel: object?.channel ? Channel.fromAmino(object.channel) : undefined - }; - }, - toAmino(message: ChannelStateData): ChannelStateDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; - return obj; - }, - fromAminoMsg(object: ChannelStateDataAminoMsg): ChannelStateData { - return ChannelStateData.fromAmino(object.value); - }, - toAminoMsg(message: ChannelStateData): ChannelStateDataAminoMsg { - return { - type: "cosmos-sdk/ChannelStateData", - value: ChannelStateData.toAmino(message) - }; - }, - fromProtoMsg(message: ChannelStateDataProtoMsg): ChannelStateData { - return ChannelStateData.decode(message.value); - }, - toProto(message: ChannelStateData): Uint8Array { - return ChannelStateData.encode(message).finish(); - }, - toProtoMsg(message: ChannelStateData): ChannelStateDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.ChannelStateData", - value: ChannelStateData.encode(message).finish() - }; - } -}; -function createBasePacketCommitmentData(): PacketCommitmentData { - return { - path: new Uint8Array(), - commitment: new Uint8Array() - }; -} -export const PacketCommitmentData = { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketCommitmentData", - aminoType: "cosmos-sdk/PacketCommitmentData", - encode(message: PacketCommitmentData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.commitment.length !== 0) { - writer.uint32(18).bytes(message.commitment); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketCommitmentData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketCommitmentData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.commitment = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketCommitmentData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - commitment: isSet(object.commitment) ? bytesFromBase64(object.commitment) : new Uint8Array() - }; - }, - toJSON(message: PacketCommitmentData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.commitment !== undefined && (obj.commitment = base64FromBytes(message.commitment !== undefined ? message.commitment : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketCommitmentData { - const message = createBasePacketCommitmentData(); - message.path = object.path ?? new Uint8Array(); - message.commitment = object.commitment ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketCommitmentDataSDKType): PacketCommitmentData { - return { - path: object?.path, - commitment: object?.commitment - }; - }, - toSDK(message: PacketCommitmentData): PacketCommitmentDataSDKType { - const obj: any = {}; - obj.path = message.path; - obj.commitment = message.commitment; - return obj; - }, - fromAmino(object: PacketCommitmentDataAmino): PacketCommitmentData { - return { - path: object.path, - commitment: object.commitment - }; - }, - toAmino(message: PacketCommitmentData): PacketCommitmentDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.commitment = message.commitment; - return obj; - }, - fromAminoMsg(object: PacketCommitmentDataAminoMsg): PacketCommitmentData { - return PacketCommitmentData.fromAmino(object.value); - }, - toAminoMsg(message: PacketCommitmentData): PacketCommitmentDataAminoMsg { - return { - type: "cosmos-sdk/PacketCommitmentData", - value: PacketCommitmentData.toAmino(message) - }; - }, - fromProtoMsg(message: PacketCommitmentDataProtoMsg): PacketCommitmentData { - return PacketCommitmentData.decode(message.value); - }, - toProto(message: PacketCommitmentData): Uint8Array { - return PacketCommitmentData.encode(message).finish(); - }, - toProtoMsg(message: PacketCommitmentData): PacketCommitmentDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketCommitmentData", - value: PacketCommitmentData.encode(message).finish() - }; - } -}; -function createBasePacketAcknowledgementData(): PacketAcknowledgementData { - return { - path: new Uint8Array(), - acknowledgement: new Uint8Array() - }; -} -export const PacketAcknowledgementData = { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketAcknowledgementData", - aminoType: "cosmos-sdk/PacketAcknowledgementData", - encode(message: PacketAcknowledgementData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.acknowledgement.length !== 0) { - writer.uint32(18).bytes(message.acknowledgement); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketAcknowledgementData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketAcknowledgementData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketAcknowledgementData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - acknowledgement: isSet(object.acknowledgement) ? bytesFromBase64(object.acknowledgement) : new Uint8Array() - }; - }, - toJSON(message: PacketAcknowledgementData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.acknowledgement !== undefined && (obj.acknowledgement = base64FromBytes(message.acknowledgement !== undefined ? message.acknowledgement : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketAcknowledgementData { - const message = createBasePacketAcknowledgementData(); - message.path = object.path ?? new Uint8Array(); - message.acknowledgement = object.acknowledgement ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketAcknowledgementDataSDKType): PacketAcknowledgementData { - return { - path: object?.path, - acknowledgement: object?.acknowledgement - }; - }, - toSDK(message: PacketAcknowledgementData): PacketAcknowledgementDataSDKType { - const obj: any = {}; - obj.path = message.path; - obj.acknowledgement = message.acknowledgement; - return obj; - }, - fromAmino(object: PacketAcknowledgementDataAmino): PacketAcknowledgementData { - return { - path: object.path, - acknowledgement: object.acknowledgement - }; - }, - toAmino(message: PacketAcknowledgementData): PacketAcknowledgementDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.acknowledgement = message.acknowledgement; - return obj; - }, - fromAminoMsg(object: PacketAcknowledgementDataAminoMsg): PacketAcknowledgementData { - return PacketAcknowledgementData.fromAmino(object.value); - }, - toAminoMsg(message: PacketAcknowledgementData): PacketAcknowledgementDataAminoMsg { - return { - type: "cosmos-sdk/PacketAcknowledgementData", - value: PacketAcknowledgementData.toAmino(message) - }; - }, - fromProtoMsg(message: PacketAcknowledgementDataProtoMsg): PacketAcknowledgementData { - return PacketAcknowledgementData.decode(message.value); - }, - toProto(message: PacketAcknowledgementData): Uint8Array { - return PacketAcknowledgementData.encode(message).finish(); - }, - toProtoMsg(message: PacketAcknowledgementData): PacketAcknowledgementDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketAcknowledgementData", - value: PacketAcknowledgementData.encode(message).finish() - }; - } -}; -function createBasePacketReceiptAbsenceData(): PacketReceiptAbsenceData { - return { - path: new Uint8Array() - }; -} -export const PacketReceiptAbsenceData = { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData", - aminoType: "cosmos-sdk/PacketReceiptAbsenceData", - encode(message: PacketReceiptAbsenceData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PacketReceiptAbsenceData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePacketReceiptAbsenceData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PacketReceiptAbsenceData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array() - }; - }, - toJSON(message: PacketReceiptAbsenceData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PacketReceiptAbsenceData { - const message = createBasePacketReceiptAbsenceData(); - message.path = object.path ?? new Uint8Array(); - return message; - }, - fromSDK(object: PacketReceiptAbsenceDataSDKType): PacketReceiptAbsenceData { - return { - path: object?.path - }; - }, - toSDK(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataSDKType { - const obj: any = {}; - obj.path = message.path; - return obj; - }, - fromAmino(object: PacketReceiptAbsenceDataAmino): PacketReceiptAbsenceData { - return { - path: object.path - }; - }, - toAmino(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataAmino { - const obj: any = {}; - obj.path = message.path; - return obj; - }, - fromAminoMsg(object: PacketReceiptAbsenceDataAminoMsg): PacketReceiptAbsenceData { - return PacketReceiptAbsenceData.fromAmino(object.value); - }, - toAminoMsg(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataAminoMsg { - return { - type: "cosmos-sdk/PacketReceiptAbsenceData", - value: PacketReceiptAbsenceData.toAmino(message) - }; - }, - fromProtoMsg(message: PacketReceiptAbsenceDataProtoMsg): PacketReceiptAbsenceData { - return PacketReceiptAbsenceData.decode(message.value); - }, - toProto(message: PacketReceiptAbsenceData): Uint8Array { - return PacketReceiptAbsenceData.encode(message).finish(); - }, - toProtoMsg(message: PacketReceiptAbsenceData): PacketReceiptAbsenceDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData", - value: PacketReceiptAbsenceData.encode(message).finish() - }; - } -}; -function createBaseNextSequenceRecvData(): NextSequenceRecvData { - return { - path: new Uint8Array(), - nextSeqRecv: BigInt(0) - }; -} -export const NextSequenceRecvData = { - typeUrl: "/ibc.lightclients.solomachine.v2.NextSequenceRecvData", - aminoType: "cosmos-sdk/NextSequenceRecvData", - encode(message: NextSequenceRecvData, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.path.length !== 0) { - writer.uint32(10).bytes(message.path); - } - if (message.nextSeqRecv !== BigInt(0)) { - writer.uint32(16).uint64(message.nextSeqRecv); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): NextSequenceRecvData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNextSequenceRecvData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.nextSeqRecv = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): NextSequenceRecvData { - return { - path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - nextSeqRecv: isSet(object.nextSeqRecv) ? BigInt(object.nextSeqRecv.toString()) : BigInt(0) - }; - }, - toJSON(message: NextSequenceRecvData): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); - message.nextSeqRecv !== undefined && (obj.nextSeqRecv = (message.nextSeqRecv || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): NextSequenceRecvData { - const message = createBaseNextSequenceRecvData(); - message.path = object.path ?? new Uint8Array(); - message.nextSeqRecv = object.nextSeqRecv !== undefined && object.nextSeqRecv !== null ? BigInt(object.nextSeqRecv.toString()) : BigInt(0); - return message; - }, - fromSDK(object: NextSequenceRecvDataSDKType): NextSequenceRecvData { - return { - path: object?.path, - nextSeqRecv: object?.next_seq_recv - }; - }, - toSDK(message: NextSequenceRecvData): NextSequenceRecvDataSDKType { - const obj: any = {}; - obj.path = message.path; - obj.next_seq_recv = message.nextSeqRecv; - return obj; - }, - fromAmino(object: NextSequenceRecvDataAmino): NextSequenceRecvData { - return { - path: object.path, - nextSeqRecv: BigInt(object.next_seq_recv) - }; - }, - toAmino(message: NextSequenceRecvData): NextSequenceRecvDataAmino { - const obj: any = {}; - obj.path = message.path; - obj.next_seq_recv = message.nextSeqRecv ? message.nextSeqRecv.toString() : undefined; - return obj; - }, - fromAminoMsg(object: NextSequenceRecvDataAminoMsg): NextSequenceRecvData { - return NextSequenceRecvData.fromAmino(object.value); - }, - toAminoMsg(message: NextSequenceRecvData): NextSequenceRecvDataAminoMsg { - return { - type: "cosmos-sdk/NextSequenceRecvData", - value: NextSequenceRecvData.toAmino(message) - }; - }, - fromProtoMsg(message: NextSequenceRecvDataProtoMsg): NextSequenceRecvData { - return NextSequenceRecvData.decode(message.value); - }, - toProto(message: NextSequenceRecvData): Uint8Array { - return NextSequenceRecvData.encode(message).finish(); - }, - toProtoMsg(message: NextSequenceRecvData): NextSequenceRecvDataProtoMsg { - return { - typeUrl: "/ibc.lightclients.solomachine.v2.NextSequenceRecvData", - value: NextSequenceRecvData.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts b/examples/interchainjs/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts deleted file mode 100644 index dd9ba925..00000000 --- a/examples/interchainjs/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts +++ /dev/null @@ -1,1007 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../../../google/protobuf/duration"; -import { Height, HeightAmino, HeightSDKType } from "../../../core/client/v1/client"; -import { ProofSpec, ProofSpecAmino, ProofSpecSDKType } from "../../../../confio/proofs"; -import { Timestamp } from "../../../../google/protobuf/timestamp"; -import { MerkleRoot, MerkleRootAmino, MerkleRootSDKType } from "../../../core/commitment/v1/commitment"; -import { SignedHeader, SignedHeaderAmino, SignedHeaderSDKType } from "../../../../tendermint/types/types"; -import { ValidatorSet, ValidatorSetAmino, ValidatorSetSDKType } from "../../../../tendermint/types/validator"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../../../helpers"; -/** - * ClientState from Tendermint tracks the current validator set, latest height, - * and a possible frozen height. - */ -export interface ClientState { - chainId: string; - trustLevel: Fraction | undefined; - /** - * duration of the period since the LastestTimestamp during which the - * submitted headers are valid for upgrade - */ - trustingPeriod: Duration | undefined; - /** duration of the staking unbonding period */ - unbondingPeriod: Duration | undefined; - /** defines how much new (untrusted) header's Time can drift into the future. */ - maxClockDrift: Duration | undefined; - /** Block height when the client was frozen due to a misbehaviour */ - frozenHeight: Height | undefined; - /** Latest height the client was updated to */ - latestHeight: Height | undefined; - /** Proof specifications used in verifying counterparty state */ - proofSpecs: ProofSpec[]; - /** - * Path at which next upgraded client will be committed. - * Each element corresponds to the key for a single CommitmentProof in the - * chained proof. NOTE: ClientState must stored under - * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - * the default upgrade module, upgrade_path should be []string{"upgrade", - * "upgradedIBCState"}` - */ - upgradePath: string[]; - /** - * This flag, when set to true, will allow governance to recover a client - * which has expired - */ - allowUpdateAfterExpiry: boolean; - /** - * This flag, when set to true, will allow governance to unfreeze a client - * whose chain has experienced a misbehaviour event - */ - allowUpdateAfterMisbehaviour: boolean; -} -export interface ClientStateProtoMsg { - typeUrl: "/ibc.lightclients.tendermint.v1.ClientState"; - value: Uint8Array; -} -/** - * ClientState from Tendermint tracks the current validator set, latest height, - * and a possible frozen height. - */ -export interface ClientStateAmino { - chain_id: string; - trust_level?: FractionAmino | undefined; - /** - * duration of the period since the LastestTimestamp during which the - * submitted headers are valid for upgrade - */ - trusting_period?: DurationAmino | undefined; - /** duration of the staking unbonding period */ - unbonding_period?: DurationAmino | undefined; - /** defines how much new (untrusted) header's Time can drift into the future. */ - max_clock_drift?: DurationAmino | undefined; - /** Block height when the client was frozen due to a misbehaviour */ - frozen_height?: HeightAmino | undefined; - /** Latest height the client was updated to */ - latest_height?: HeightAmino | undefined; - /** Proof specifications used in verifying counterparty state */ - proof_specs: ProofSpecAmino[]; - /** - * Path at which next upgraded client will be committed. - * Each element corresponds to the key for a single CommitmentProof in the - * chained proof. NOTE: ClientState must stored under - * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - * the default upgrade module, upgrade_path should be []string{"upgrade", - * "upgradedIBCState"}` - */ - upgrade_path: string[]; - /** - * This flag, when set to true, will allow governance to recover a client - * which has expired - */ - allow_update_after_expiry: boolean; - /** - * This flag, when set to true, will allow governance to unfreeze a client - * whose chain has experienced a misbehaviour event - */ - allow_update_after_misbehaviour: boolean; -} -export interface ClientStateAminoMsg { - type: "cosmos-sdk/ClientState"; - value: ClientStateAmino; -} -/** - * ClientState from Tendermint tracks the current validator set, latest height, - * and a possible frozen height. - */ -export interface ClientStateSDKType { - chain_id: string; - trust_level: FractionSDKType | undefined; - trusting_period: DurationSDKType | undefined; - unbonding_period: DurationSDKType | undefined; - max_clock_drift: DurationSDKType | undefined; - frozen_height: HeightSDKType | undefined; - latest_height: HeightSDKType | undefined; - proof_specs: ProofSpecSDKType[]; - upgrade_path: string[]; - allow_update_after_expiry: boolean; - allow_update_after_misbehaviour: boolean; -} -/** ConsensusState defines the consensus state from Tendermint. */ -export interface ConsensusState { - /** - * timestamp that corresponds to the block height in which the ConsensusState - * was stored. - */ - timestamp: Date | undefined; - /** commitment root (i.e app hash) */ - root: MerkleRoot | undefined; - nextValidatorsHash: Uint8Array; -} -export interface ConsensusStateProtoMsg { - typeUrl: "/ibc.lightclients.tendermint.v1.ConsensusState"; - value: Uint8Array; -} -/** ConsensusState defines the consensus state from Tendermint. */ -export interface ConsensusStateAmino { - /** - * timestamp that corresponds to the block height in which the ConsensusState - * was stored. - */ - timestamp?: Date | undefined; - /** commitment root (i.e app hash) */ - root?: MerkleRootAmino | undefined; - next_validators_hash: Uint8Array; -} -export interface ConsensusStateAminoMsg { - type: "cosmos-sdk/ConsensusState"; - value: ConsensusStateAmino; -} -/** ConsensusState defines the consensus state from Tendermint. */ -export interface ConsensusStateSDKType { - timestamp: Date | undefined; - root: MerkleRootSDKType | undefined; - next_validators_hash: Uint8Array; -} -/** - * Misbehaviour is a wrapper over two conflicting Headers - * that implements Misbehaviour interface expected by ICS-02 - */ -export interface Misbehaviour { - clientId: string; - header1: Header | undefined; - header2: Header | undefined; -} -export interface MisbehaviourProtoMsg { - typeUrl: "/ibc.lightclients.tendermint.v1.Misbehaviour"; - value: Uint8Array; -} -/** - * Misbehaviour is a wrapper over two conflicting Headers - * that implements Misbehaviour interface expected by ICS-02 - */ -export interface MisbehaviourAmino { - client_id: string; - header_1?: HeaderAmino | undefined; - header_2?: HeaderAmino | undefined; -} -export interface MisbehaviourAminoMsg { - type: "cosmos-sdk/Misbehaviour"; - value: MisbehaviourAmino; -} -/** - * Misbehaviour is a wrapper over two conflicting Headers - * that implements Misbehaviour interface expected by ICS-02 - */ -export interface MisbehaviourSDKType { - client_id: string; - header_1: HeaderSDKType | undefined; - header_2: HeaderSDKType | undefined; -} -/** - * Header defines the Tendermint client consensus Header. - * It encapsulates all the information necessary to update from a trusted - * Tendermint ConsensusState. The inclusion of TrustedHeight and - * TrustedValidators allows this update to process correctly, so long as the - * ConsensusState for the TrustedHeight exists, this removes race conditions - * among relayers The SignedHeader and ValidatorSet are the new untrusted update - * fields for the client. The TrustedHeight is the height of a stored - * ConsensusState on the client that will be used to verify the new untrusted - * header. The Trusted ConsensusState must be within the unbonding period of - * current time in order to correctly verify, and the TrustedValidators must - * hash to TrustedConsensusState.NextValidatorsHash since that is the last - * trusted validator set at the TrustedHeight. - */ -export interface Header { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; - trustedHeight: Height | undefined; - trustedValidators: ValidatorSet | undefined; -} -export interface HeaderProtoMsg { - typeUrl: "/ibc.lightclients.tendermint.v1.Header"; - value: Uint8Array; -} -/** - * Header defines the Tendermint client consensus Header. - * It encapsulates all the information necessary to update from a trusted - * Tendermint ConsensusState. The inclusion of TrustedHeight and - * TrustedValidators allows this update to process correctly, so long as the - * ConsensusState for the TrustedHeight exists, this removes race conditions - * among relayers The SignedHeader and ValidatorSet are the new untrusted update - * fields for the client. The TrustedHeight is the height of a stored - * ConsensusState on the client that will be used to verify the new untrusted - * header. The Trusted ConsensusState must be within the unbonding period of - * current time in order to correctly verify, and the TrustedValidators must - * hash to TrustedConsensusState.NextValidatorsHash since that is the last - * trusted validator set at the TrustedHeight. - */ -export interface HeaderAmino { - signed_header?: SignedHeaderAmino | undefined; - validator_set?: ValidatorSetAmino | undefined; - trusted_height?: HeightAmino | undefined; - trusted_validators?: ValidatorSetAmino | undefined; -} -export interface HeaderAminoMsg { - type: "cosmos-sdk/Header"; - value: HeaderAmino; -} -/** - * Header defines the Tendermint client consensus Header. - * It encapsulates all the information necessary to update from a trusted - * Tendermint ConsensusState. The inclusion of TrustedHeight and - * TrustedValidators allows this update to process correctly, so long as the - * ConsensusState for the TrustedHeight exists, this removes race conditions - * among relayers The SignedHeader and ValidatorSet are the new untrusted update - * fields for the client. The TrustedHeight is the height of a stored - * ConsensusState on the client that will be used to verify the new untrusted - * header. The Trusted ConsensusState must be within the unbonding period of - * current time in order to correctly verify, and the TrustedValidators must - * hash to TrustedConsensusState.NextValidatorsHash since that is the last - * trusted validator set at the TrustedHeight. - */ -export interface HeaderSDKType { - signed_header: SignedHeaderSDKType | undefined; - validator_set: ValidatorSetSDKType | undefined; - trusted_height: HeightSDKType | undefined; - trusted_validators: ValidatorSetSDKType | undefined; -} -/** - * Fraction defines the protobuf message type for tmmath.Fraction that only - * supports positive values. - */ -export interface Fraction { - numerator: bigint; - denominator: bigint; -} -export interface FractionProtoMsg { - typeUrl: "/ibc.lightclients.tendermint.v1.Fraction"; - value: Uint8Array; -} -/** - * Fraction defines the protobuf message type for tmmath.Fraction that only - * supports positive values. - */ -export interface FractionAmino { - numerator: string; - denominator: string; -} -export interface FractionAminoMsg { - type: "cosmos-sdk/Fraction"; - value: FractionAmino; -} -/** - * Fraction defines the protobuf message type for tmmath.Fraction that only - * supports positive values. - */ -export interface FractionSDKType { - numerator: bigint; - denominator: bigint; -} -function createBaseClientState(): ClientState { - return { - chainId: "", - trustLevel: Fraction.fromPartial({}), - trustingPeriod: Duration.fromPartial({}), - unbondingPeriod: Duration.fromPartial({}), - maxClockDrift: Duration.fromPartial({}), - frozenHeight: Height.fromPartial({}), - latestHeight: Height.fromPartial({}), - proofSpecs: [], - upgradePath: [], - allowUpdateAfterExpiry: false, - allowUpdateAfterMisbehaviour: false - }; -} -export const ClientState = { - typeUrl: "/ibc.lightclients.tendermint.v1.ClientState", - aminoType: "cosmos-sdk/ClientState", - encode(message: ClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.chainId !== "") { - writer.uint32(10).string(message.chainId); - } - if (message.trustLevel !== undefined) { - Fraction.encode(message.trustLevel, writer.uint32(18).fork()).ldelim(); - } - if (message.trustingPeriod !== undefined) { - Duration.encode(message.trustingPeriod, writer.uint32(26).fork()).ldelim(); - } - if (message.unbondingPeriod !== undefined) { - Duration.encode(message.unbondingPeriod, writer.uint32(34).fork()).ldelim(); - } - if (message.maxClockDrift !== undefined) { - Duration.encode(message.maxClockDrift, writer.uint32(42).fork()).ldelim(); - } - if (message.frozenHeight !== undefined) { - Height.encode(message.frozenHeight, writer.uint32(50).fork()).ldelim(); - } - if (message.latestHeight !== undefined) { - Height.encode(message.latestHeight, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.proofSpecs) { - ProofSpec.encode(v!, writer.uint32(66).fork()).ldelim(); - } - for (const v of message.upgradePath) { - writer.uint32(74).string(v!); - } - if (message.allowUpdateAfterExpiry === true) { - writer.uint32(80).bool(message.allowUpdateAfterExpiry); - } - if (message.allowUpdateAfterMisbehaviour === true) { - writer.uint32(88).bool(message.allowUpdateAfterMisbehaviour); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClientState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chainId = reader.string(); - break; - case 2: - message.trustLevel = Fraction.decode(reader, reader.uint32()); - break; - case 3: - message.trustingPeriod = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.unbondingPeriod = Duration.decode(reader, reader.uint32()); - break; - case 5: - message.maxClockDrift = Duration.decode(reader, reader.uint32()); - break; - case 6: - message.frozenHeight = Height.decode(reader, reader.uint32()); - break; - case 7: - message.latestHeight = Height.decode(reader, reader.uint32()); - break; - case 8: - message.proofSpecs.push(ProofSpec.decode(reader, reader.uint32())); - break; - case 9: - message.upgradePath.push(reader.string()); - break; - case 10: - message.allowUpdateAfterExpiry = reader.bool(); - break; - case 11: - message.allowUpdateAfterMisbehaviour = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClientState { - return { - chainId: isSet(object.chainId) ? String(object.chainId) : "", - trustLevel: isSet(object.trustLevel) ? Fraction.fromJSON(object.trustLevel) : undefined, - trustingPeriod: isSet(object.trustingPeriod) ? Duration.fromJSON(object.trustingPeriod) : undefined, - unbondingPeriod: isSet(object.unbondingPeriod) ? Duration.fromJSON(object.unbondingPeriod) : undefined, - maxClockDrift: isSet(object.maxClockDrift) ? Duration.fromJSON(object.maxClockDrift) : undefined, - frozenHeight: isSet(object.frozenHeight) ? Height.fromJSON(object.frozenHeight) : undefined, - latestHeight: isSet(object.latestHeight) ? Height.fromJSON(object.latestHeight) : undefined, - proofSpecs: Array.isArray(object?.proofSpecs) ? object.proofSpecs.map((e: any) => ProofSpec.fromJSON(e)) : [], - upgradePath: Array.isArray(object?.upgradePath) ? object.upgradePath.map((e: any) => String(e)) : [], - allowUpdateAfterExpiry: isSet(object.allowUpdateAfterExpiry) ? Boolean(object.allowUpdateAfterExpiry) : false, - allowUpdateAfterMisbehaviour: isSet(object.allowUpdateAfterMisbehaviour) ? Boolean(object.allowUpdateAfterMisbehaviour) : false - }; - }, - toJSON(message: ClientState): unknown { - const obj: any = {}; - message.chainId !== undefined && (obj.chainId = message.chainId); - message.trustLevel !== undefined && (obj.trustLevel = message.trustLevel ? Fraction.toJSON(message.trustLevel) : undefined); - message.trustingPeriod !== undefined && (obj.trustingPeriod = message.trustingPeriod ? Duration.toJSON(message.trustingPeriod) : undefined); - message.unbondingPeriod !== undefined && (obj.unbondingPeriod = message.unbondingPeriod ? Duration.toJSON(message.unbondingPeriod) : undefined); - message.maxClockDrift !== undefined && (obj.maxClockDrift = message.maxClockDrift ? Duration.toJSON(message.maxClockDrift) : undefined); - message.frozenHeight !== undefined && (obj.frozenHeight = message.frozenHeight ? Height.toJSON(message.frozenHeight) : undefined); - message.latestHeight !== undefined && (obj.latestHeight = message.latestHeight ? Height.toJSON(message.latestHeight) : undefined); - if (message.proofSpecs) { - obj.proofSpecs = message.proofSpecs.map(e => e ? ProofSpec.toJSON(e) : undefined); - } else { - obj.proofSpecs = []; - } - if (message.upgradePath) { - obj.upgradePath = message.upgradePath.map(e => e); - } else { - obj.upgradePath = []; - } - message.allowUpdateAfterExpiry !== undefined && (obj.allowUpdateAfterExpiry = message.allowUpdateAfterExpiry); - message.allowUpdateAfterMisbehaviour !== undefined && (obj.allowUpdateAfterMisbehaviour = message.allowUpdateAfterMisbehaviour); - return obj; - }, - fromPartial(object: DeepPartial): ClientState { - const message = createBaseClientState(); - message.chainId = object.chainId ?? ""; - message.trustLevel = object.trustLevel !== undefined && object.trustLevel !== null ? Fraction.fromPartial(object.trustLevel) : undefined; - message.trustingPeriod = object.trustingPeriod !== undefined && object.trustingPeriod !== null ? Duration.fromPartial(object.trustingPeriod) : undefined; - message.unbondingPeriod = object.unbondingPeriod !== undefined && object.unbondingPeriod !== null ? Duration.fromPartial(object.unbondingPeriod) : undefined; - message.maxClockDrift = object.maxClockDrift !== undefined && object.maxClockDrift !== null ? Duration.fromPartial(object.maxClockDrift) : undefined; - message.frozenHeight = object.frozenHeight !== undefined && object.frozenHeight !== null ? Height.fromPartial(object.frozenHeight) : undefined; - message.latestHeight = object.latestHeight !== undefined && object.latestHeight !== null ? Height.fromPartial(object.latestHeight) : undefined; - message.proofSpecs = object.proofSpecs?.map(e => ProofSpec.fromPartial(e)) || []; - message.upgradePath = object.upgradePath?.map(e => e) || []; - message.allowUpdateAfterExpiry = object.allowUpdateAfterExpiry ?? false; - message.allowUpdateAfterMisbehaviour = object.allowUpdateAfterMisbehaviour ?? false; - return message; - }, - fromSDK(object: ClientStateSDKType): ClientState { - return { - chainId: object?.chain_id, - trustLevel: object.trust_level ? Fraction.fromSDK(object.trust_level) : undefined, - trustingPeriod: object.trusting_period ? Duration.fromSDK(object.trusting_period) : undefined, - unbondingPeriod: object.unbonding_period ? Duration.fromSDK(object.unbonding_period) : undefined, - maxClockDrift: object.max_clock_drift ? Duration.fromSDK(object.max_clock_drift) : undefined, - frozenHeight: object.frozen_height ? Height.fromSDK(object.frozen_height) : undefined, - latestHeight: object.latest_height ? Height.fromSDK(object.latest_height) : undefined, - proofSpecs: Array.isArray(object?.proof_specs) ? object.proof_specs.map((e: any) => ProofSpec.fromSDK(e)) : [], - upgradePath: Array.isArray(object?.upgrade_path) ? object.upgrade_path.map((e: any) => e) : [], - allowUpdateAfterExpiry: object?.allow_update_after_expiry, - allowUpdateAfterMisbehaviour: object?.allow_update_after_misbehaviour - }; - }, - toSDK(message: ClientState): ClientStateSDKType { - const obj: any = {}; - obj.chain_id = message.chainId; - message.trustLevel !== undefined && (obj.trust_level = message.trustLevel ? Fraction.toSDK(message.trustLevel) : undefined); - message.trustingPeriod !== undefined && (obj.trusting_period = message.trustingPeriod ? Duration.toSDK(message.trustingPeriod) : undefined); - message.unbondingPeriod !== undefined && (obj.unbonding_period = message.unbondingPeriod ? Duration.toSDK(message.unbondingPeriod) : undefined); - message.maxClockDrift !== undefined && (obj.max_clock_drift = message.maxClockDrift ? Duration.toSDK(message.maxClockDrift) : undefined); - message.frozenHeight !== undefined && (obj.frozen_height = message.frozenHeight ? Height.toSDK(message.frozenHeight) : undefined); - message.latestHeight !== undefined && (obj.latest_height = message.latestHeight ? Height.toSDK(message.latestHeight) : undefined); - if (message.proofSpecs) { - obj.proof_specs = message.proofSpecs.map(e => e ? ProofSpec.toSDK(e) : undefined); - } else { - obj.proof_specs = []; - } - if (message.upgradePath) { - obj.upgrade_path = message.upgradePath.map(e => e); - } else { - obj.upgrade_path = []; - } - obj.allow_update_after_expiry = message.allowUpdateAfterExpiry; - obj.allow_update_after_misbehaviour = message.allowUpdateAfterMisbehaviour; - return obj; - }, - fromAmino(object: ClientStateAmino): ClientState { - return { - chainId: object.chain_id, - trustLevel: object?.trust_level ? Fraction.fromAmino(object.trust_level) : undefined, - trustingPeriod: object?.trusting_period ? Duration.fromAmino(object.trusting_period) : undefined, - unbondingPeriod: object?.unbonding_period ? Duration.fromAmino(object.unbonding_period) : undefined, - maxClockDrift: object?.max_clock_drift ? Duration.fromAmino(object.max_clock_drift) : undefined, - frozenHeight: object?.frozen_height ? Height.fromAmino(object.frozen_height) : undefined, - latestHeight: object?.latest_height ? Height.fromAmino(object.latest_height) : undefined, - proofSpecs: Array.isArray(object?.proof_specs) ? object.proof_specs.map((e: any) => ProofSpec.fromAmino(e)) : [], - upgradePath: Array.isArray(object?.upgrade_path) ? object.upgrade_path.map((e: any) => e) : [], - allowUpdateAfterExpiry: object.allow_update_after_expiry, - allowUpdateAfterMisbehaviour: object.allow_update_after_misbehaviour - }; - }, - toAmino(message: ClientState): ClientStateAmino { - const obj: any = {}; - obj.chain_id = message.chainId; - obj.trust_level = message.trustLevel ? Fraction.toAmino(message.trustLevel) : undefined; - obj.trusting_period = message.trustingPeriod ? Duration.toAmino(message.trustingPeriod) : undefined; - obj.unbonding_period = message.unbondingPeriod ? Duration.toAmino(message.unbondingPeriod) : undefined; - obj.max_clock_drift = message.maxClockDrift ? Duration.toAmino(message.maxClockDrift) : undefined; - obj.frozen_height = message.frozenHeight ? Height.toAmino(message.frozenHeight) : {}; - obj.latest_height = message.latestHeight ? Height.toAmino(message.latestHeight) : {}; - if (message.proofSpecs) { - obj.proof_specs = message.proofSpecs.map(e => e ? ProofSpec.toAmino(e) : undefined); - } else { - obj.proof_specs = []; - } - if (message.upgradePath) { - obj.upgrade_path = message.upgradePath.map(e => e); - } else { - obj.upgrade_path = []; - } - obj.allow_update_after_expiry = message.allowUpdateAfterExpiry; - obj.allow_update_after_misbehaviour = message.allowUpdateAfterMisbehaviour; - return obj; - }, - fromAminoMsg(object: ClientStateAminoMsg): ClientState { - return ClientState.fromAmino(object.value); - }, - toAminoMsg(message: ClientState): ClientStateAminoMsg { - return { - type: "cosmos-sdk/ClientState", - value: ClientState.toAmino(message) - }; - }, - fromProtoMsg(message: ClientStateProtoMsg): ClientState { - return ClientState.decode(message.value); - }, - toProto(message: ClientState): Uint8Array { - return ClientState.encode(message).finish(); - }, - toProtoMsg(message: ClientState): ClientStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.tendermint.v1.ClientState", - value: ClientState.encode(message).finish() - }; - } -}; -function createBaseConsensusState(): ConsensusState { - return { - timestamp: new Date(), - root: MerkleRoot.fromPartial({}), - nextValidatorsHash: new Uint8Array() - }; -} -export const ConsensusState = { - typeUrl: "/ibc.lightclients.tendermint.v1.ConsensusState", - aminoType: "cosmos-sdk/ConsensusState", - encode(message: ConsensusState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).ldelim(); - } - if (message.root !== undefined) { - MerkleRoot.encode(message.root, writer.uint32(18).fork()).ldelim(); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(26).bytes(message.nextValidatorsHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.root = MerkleRoot.decode(reader, reader.uint32()); - break; - case 3: - message.nextValidatorsHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusState { - return { - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined, - root: isSet(object.root) ? MerkleRoot.fromJSON(object.root) : undefined, - nextValidatorsHash: isSet(object.nextValidatorsHash) ? bytesFromBase64(object.nextValidatorsHash) : new Uint8Array() - }; - }, - toJSON(message: ConsensusState): unknown { - const obj: any = {}; - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - message.root !== undefined && (obj.root = message.root ? MerkleRoot.toJSON(message.root) : undefined); - message.nextValidatorsHash !== undefined && (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined ? message.nextValidatorsHash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusState { - const message = createBaseConsensusState(); - message.timestamp = object.timestamp ?? undefined; - message.root = object.root !== undefined && object.root !== null ? MerkleRoot.fromPartial(object.root) : undefined; - message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(); - return message; - }, - fromSDK(object: ConsensusStateSDKType): ConsensusState { - return { - timestamp: object.timestamp ?? undefined, - root: object.root ? MerkleRoot.fromSDK(object.root) : undefined, - nextValidatorsHash: object?.next_validators_hash - }; - }, - toSDK(message: ConsensusState): ConsensusStateSDKType { - const obj: any = {}; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - message.root !== undefined && (obj.root = message.root ? MerkleRoot.toSDK(message.root) : undefined); - obj.next_validators_hash = message.nextValidatorsHash; - return obj; - }, - fromAmino(object: ConsensusStateAmino): ConsensusState { - return { - timestamp: object.timestamp, - root: object?.root ? MerkleRoot.fromAmino(object.root) : undefined, - nextValidatorsHash: object.next_validators_hash - }; - }, - toAmino(message: ConsensusState): ConsensusStateAmino { - const obj: any = {}; - obj.timestamp = message.timestamp; - obj.root = message.root ? MerkleRoot.toAmino(message.root) : undefined; - obj.next_validators_hash = message.nextValidatorsHash; - return obj; - }, - fromAminoMsg(object: ConsensusStateAminoMsg): ConsensusState { - return ConsensusState.fromAmino(object.value); - }, - toAminoMsg(message: ConsensusState): ConsensusStateAminoMsg { - return { - type: "cosmos-sdk/ConsensusState", - value: ConsensusState.toAmino(message) - }; - }, - fromProtoMsg(message: ConsensusStateProtoMsg): ConsensusState { - return ConsensusState.decode(message.value); - }, - toProto(message: ConsensusState): Uint8Array { - return ConsensusState.encode(message).finish(); - }, - toProtoMsg(message: ConsensusState): ConsensusStateProtoMsg { - return { - typeUrl: "/ibc.lightclients.tendermint.v1.ConsensusState", - value: ConsensusState.encode(message).finish() - }; - } -}; -function createBaseMisbehaviour(): Misbehaviour { - return { - clientId: "", - header1: Header.fromPartial({}), - header2: Header.fromPartial({}) - }; -} -export const Misbehaviour = { - typeUrl: "/ibc.lightclients.tendermint.v1.Misbehaviour", - aminoType: "cosmos-sdk/Misbehaviour", - encode(message: Misbehaviour, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.clientId !== "") { - writer.uint32(10).string(message.clientId); - } - if (message.header1 !== undefined) { - Header.encode(message.header1, writer.uint32(18).fork()).ldelim(); - } - if (message.header2 !== undefined) { - Header.encode(message.header2, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Misbehaviour { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMisbehaviour(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clientId = reader.string(); - break; - case 2: - message.header1 = Header.decode(reader, reader.uint32()); - break; - case 3: - message.header2 = Header.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Misbehaviour { - return { - clientId: isSet(object.clientId) ? String(object.clientId) : "", - header1: isSet(object.header1) ? Header.fromJSON(object.header1) : undefined, - header2: isSet(object.header2) ? Header.fromJSON(object.header2) : undefined - }; - }, - toJSON(message: Misbehaviour): unknown { - const obj: any = {}; - message.clientId !== undefined && (obj.clientId = message.clientId); - message.header1 !== undefined && (obj.header1 = message.header1 ? Header.toJSON(message.header1) : undefined); - message.header2 !== undefined && (obj.header2 = message.header2 ? Header.toJSON(message.header2) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Misbehaviour { - const message = createBaseMisbehaviour(); - message.clientId = object.clientId ?? ""; - message.header1 = object.header1 !== undefined && object.header1 !== null ? Header.fromPartial(object.header1) : undefined; - message.header2 = object.header2 !== undefined && object.header2 !== null ? Header.fromPartial(object.header2) : undefined; - return message; - }, - fromSDK(object: MisbehaviourSDKType): Misbehaviour { - return { - clientId: object?.client_id, - header1: object.header_1 ? Header.fromSDK(object.header_1) : undefined, - header2: object.header_2 ? Header.fromSDK(object.header_2) : undefined - }; - }, - toSDK(message: Misbehaviour): MisbehaviourSDKType { - const obj: any = {}; - obj.client_id = message.clientId; - message.header1 !== undefined && (obj.header_1 = message.header1 ? Header.toSDK(message.header1) : undefined); - message.header2 !== undefined && (obj.header_2 = message.header2 ? Header.toSDK(message.header2) : undefined); - return obj; - }, - fromAmino(object: MisbehaviourAmino): Misbehaviour { - return { - clientId: object.client_id, - header1: object?.header_1 ? Header.fromAmino(object.header_1) : undefined, - header2: object?.header_2 ? Header.fromAmino(object.header_2) : undefined - }; - }, - toAmino(message: Misbehaviour): MisbehaviourAmino { - const obj: any = {}; - obj.client_id = message.clientId; - obj.header_1 = message.header1 ? Header.toAmino(message.header1) : undefined; - obj.header_2 = message.header2 ? Header.toAmino(message.header2) : undefined; - return obj; - }, - fromAminoMsg(object: MisbehaviourAminoMsg): Misbehaviour { - return Misbehaviour.fromAmino(object.value); - }, - toAminoMsg(message: Misbehaviour): MisbehaviourAminoMsg { - return { - type: "cosmos-sdk/Misbehaviour", - value: Misbehaviour.toAmino(message) - }; - }, - fromProtoMsg(message: MisbehaviourProtoMsg): Misbehaviour { - return Misbehaviour.decode(message.value); - }, - toProto(message: Misbehaviour): Uint8Array { - return Misbehaviour.encode(message).finish(); - }, - toProtoMsg(message: Misbehaviour): MisbehaviourProtoMsg { - return { - typeUrl: "/ibc.lightclients.tendermint.v1.Misbehaviour", - value: Misbehaviour.encode(message).finish() - }; - } -}; -function createBaseHeader(): Header { - return { - signedHeader: SignedHeader.fromPartial({}), - validatorSet: ValidatorSet.fromPartial({}), - trustedHeight: Height.fromPartial({}), - trustedValidators: ValidatorSet.fromPartial({}) - }; -} -export const Header = { - typeUrl: "/ibc.lightclients.tendermint.v1.Header", - aminoType: "cosmos-sdk/Header", - encode(message: Header, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - if (message.trustedHeight !== undefined) { - Height.encode(message.trustedHeight, writer.uint32(26).fork()).ldelim(); - } - if (message.trustedValidators !== undefined) { - ValidatorSet.encode(message.trustedValidators, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Header { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - case 3: - message.trustedHeight = Height.decode(reader, reader.uint32()); - break; - case 4: - message.trustedValidators = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Header { - return { - signedHeader: isSet(object.signedHeader) ? SignedHeader.fromJSON(object.signedHeader) : undefined, - validatorSet: isSet(object.validatorSet) ? ValidatorSet.fromJSON(object.validatorSet) : undefined, - trustedHeight: isSet(object.trustedHeight) ? Height.fromJSON(object.trustedHeight) : undefined, - trustedValidators: isSet(object.trustedValidators) ? ValidatorSet.fromJSON(object.trustedValidators) : undefined - }; - }, - toJSON(message: Header): unknown { - const obj: any = {}; - message.signedHeader !== undefined && (obj.signedHeader = message.signedHeader ? SignedHeader.toJSON(message.signedHeader) : undefined); - message.validatorSet !== undefined && (obj.validatorSet = message.validatorSet ? ValidatorSet.toJSON(message.validatorSet) : undefined); - message.trustedHeight !== undefined && (obj.trustedHeight = message.trustedHeight ? Height.toJSON(message.trustedHeight) : undefined); - message.trustedValidators !== undefined && (obj.trustedValidators = message.trustedValidators ? ValidatorSet.toJSON(message.trustedValidators) : undefined); - return obj; - }, - fromPartial(object: DeepPartial
): Header { - const message = createBaseHeader(); - message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null ? SignedHeader.fromPartial(object.signedHeader) : undefined; - message.validatorSet = object.validatorSet !== undefined && object.validatorSet !== null ? ValidatorSet.fromPartial(object.validatorSet) : undefined; - message.trustedHeight = object.trustedHeight !== undefined && object.trustedHeight !== null ? Height.fromPartial(object.trustedHeight) : undefined; - message.trustedValidators = object.trustedValidators !== undefined && object.trustedValidators !== null ? ValidatorSet.fromPartial(object.trustedValidators) : undefined; - return message; - }, - fromSDK(object: HeaderSDKType): Header { - return { - signedHeader: object.signed_header ? SignedHeader.fromSDK(object.signed_header) : undefined, - validatorSet: object.validator_set ? ValidatorSet.fromSDK(object.validator_set) : undefined, - trustedHeight: object.trusted_height ? Height.fromSDK(object.trusted_height) : undefined, - trustedValidators: object.trusted_validators ? ValidatorSet.fromSDK(object.trusted_validators) : undefined - }; - }, - toSDK(message: Header): HeaderSDKType { - const obj: any = {}; - message.signedHeader !== undefined && (obj.signed_header = message.signedHeader ? SignedHeader.toSDK(message.signedHeader) : undefined); - message.validatorSet !== undefined && (obj.validator_set = message.validatorSet ? ValidatorSet.toSDK(message.validatorSet) : undefined); - message.trustedHeight !== undefined && (obj.trusted_height = message.trustedHeight ? Height.toSDK(message.trustedHeight) : undefined); - message.trustedValidators !== undefined && (obj.trusted_validators = message.trustedValidators ? ValidatorSet.toSDK(message.trustedValidators) : undefined); - return obj; - }, - fromAmino(object: HeaderAmino): Header { - return { - signedHeader: object?.signed_header ? SignedHeader.fromAmino(object.signed_header) : undefined, - validatorSet: object?.validator_set ? ValidatorSet.fromAmino(object.validator_set) : undefined, - trustedHeight: object?.trusted_height ? Height.fromAmino(object.trusted_height) : undefined, - trustedValidators: object?.trusted_validators ? ValidatorSet.fromAmino(object.trusted_validators) : undefined - }; - }, - toAmino(message: Header): HeaderAmino { - const obj: any = {}; - obj.signed_header = message.signedHeader ? SignedHeader.toAmino(message.signedHeader) : undefined; - obj.validator_set = message.validatorSet ? ValidatorSet.toAmino(message.validatorSet) : undefined; - obj.trusted_height = message.trustedHeight ? Height.toAmino(message.trustedHeight) : {}; - obj.trusted_validators = message.trustedValidators ? ValidatorSet.toAmino(message.trustedValidators) : undefined; - return obj; - }, - fromAminoMsg(object: HeaderAminoMsg): Header { - return Header.fromAmino(object.value); - }, - toAminoMsg(message: Header): HeaderAminoMsg { - return { - type: "cosmos-sdk/Header", - value: Header.toAmino(message) - }; - }, - fromProtoMsg(message: HeaderProtoMsg): Header { - return Header.decode(message.value); - }, - toProto(message: Header): Uint8Array { - return Header.encode(message).finish(); - }, - toProtoMsg(message: Header): HeaderProtoMsg { - return { - typeUrl: "/ibc.lightclients.tendermint.v1.Header", - value: Header.encode(message).finish() - }; - } -}; -function createBaseFraction(): Fraction { - return { - numerator: BigInt(0), - denominator: BigInt(0) - }; -} -export const Fraction = { - typeUrl: "/ibc.lightclients.tendermint.v1.Fraction", - aminoType: "cosmos-sdk/Fraction", - encode(message: Fraction, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.numerator !== BigInt(0)) { - writer.uint32(8).uint64(message.numerator); - } - if (message.denominator !== BigInt(0)) { - writer.uint32(16).uint64(message.denominator); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Fraction { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFraction(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numerator = reader.uint64(); - break; - case 2: - message.denominator = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Fraction { - return { - numerator: isSet(object.numerator) ? BigInt(object.numerator.toString()) : BigInt(0), - denominator: isSet(object.denominator) ? BigInt(object.denominator.toString()) : BigInt(0) - }; - }, - toJSON(message: Fraction): unknown { - const obj: any = {}; - message.numerator !== undefined && (obj.numerator = (message.numerator || BigInt(0)).toString()); - message.denominator !== undefined && (obj.denominator = (message.denominator || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Fraction { - const message = createBaseFraction(); - message.numerator = object.numerator !== undefined && object.numerator !== null ? BigInt(object.numerator.toString()) : BigInt(0); - message.denominator = object.denominator !== undefined && object.denominator !== null ? BigInt(object.denominator.toString()) : BigInt(0); - return message; - }, - fromSDK(object: FractionSDKType): Fraction { - return { - numerator: object?.numerator, - denominator: object?.denominator - }; - }, - toSDK(message: Fraction): FractionSDKType { - const obj: any = {}; - obj.numerator = message.numerator; - obj.denominator = message.denominator; - return obj; - }, - fromAmino(object: FractionAmino): Fraction { - return { - numerator: BigInt(object.numerator), - denominator: BigInt(object.denominator) - }; - }, - toAmino(message: Fraction): FractionAmino { - const obj: any = {}; - obj.numerator = message.numerator ? message.numerator.toString() : undefined; - obj.denominator = message.denominator ? message.denominator.toString() : undefined; - return obj; - }, - fromAminoMsg(object: FractionAminoMsg): Fraction { - return Fraction.fromAmino(object.value); - }, - toAminoMsg(message: Fraction): FractionAminoMsg { - return { - type: "cosmos-sdk/Fraction", - value: Fraction.toAmino(message) - }; - }, - fromProtoMsg(message: FractionProtoMsg): Fraction { - return Fraction.decode(message.value); - }, - toProto(message: Fraction): Uint8Array { - return Fraction.encode(message).finish(); - }, - toProtoMsg(message: Fraction): FractionProtoMsg { - return { - typeUrl: "/ibc.lightclients.tendermint.v1.Fraction", - value: Fraction.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/rpc.query.ts b/examples/interchainjs/src/codegen/ibc/rpc.query.ts deleted file mode 100644 index 0d0dbcd9..00000000 --- a/examples/interchainjs/src/codegen/ibc/rpc.query.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import { QueryClient } from "@cosmjs/stargate"; -export const createRPCQueryClient = async ({ - rpcEndpoint -}: { - rpcEndpoint: string | HttpEndpoint; -}) => { - const tmClient = await Tendermint34Client.connect(rpcEndpoint); - const client = new QueryClient(tmClient); - return { - cosmos: { - app: { - v1alpha1: (await import("../cosmos/app/v1alpha1/query.rpc.Query")).createRpcQueryExtension(client) - }, - auth: { - v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - authz: { - v1beta1: (await import("../cosmos/authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - bank: { - v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - base: { - tendermint: { - v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) - } - }, - distribution: { - v1beta1: (await import("../cosmos/distribution/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - evidence: { - v1beta1: (await import("../cosmos/evidence/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - feegrant: { - v1beta1: (await import("../cosmos/feegrant/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - gov: { - v1: (await import("../cosmos/gov/v1/query.rpc.Query")).createRpcQueryExtension(client), - v1beta1: (await import("../cosmos/gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - group: { - v1: (await import("../cosmos/group/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - mint: { - v1beta1: (await import("../cosmos/mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - nft: { - v1beta1: (await import("../cosmos/nft/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - params: { - v1beta1: (await import("../cosmos/params/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - slashing: { - v1beta1: (await import("../cosmos/slashing/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - staking: { - v1beta1: (await import("../cosmos/staking/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - tx: { - v1beta1: (await import("../cosmos/tx/v1beta1/service.rpc.Service")).createRpcQueryExtension(client) - }, - upgrade: { - v1beta1: (await import("../cosmos/upgrade/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - } - }, - ibc: { - applications: { - transfer: { - v1: (await import("./applications/transfer/v1/query.rpc.Query")).createRpcQueryExtension(client) - } - }, - core: { - channel: { - v1: (await import("./core/channel/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - client: { - v1: (await import("./core/client/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - connection: { - v1: (await import("./core/connection/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - port: { - v1: (await import("./core/port/v1/query.rpc.Query")).createRpcQueryExtension(client) - } - } - } - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ibc/rpc.tx.ts b/examples/interchainjs/src/codegen/ibc/rpc.tx.ts deleted file mode 100644 index 62cb610c..00000000 --- a/examples/interchainjs/src/codegen/ibc/rpc.tx.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Rpc } from "../helpers"; -export const createRPCMsgClient = async ({ - rpc -}: { - rpc: Rpc; -}) => ({ - cosmos: { - authz: { - v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - bank: { - v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - crisis: { - v1beta1: new (await import("../cosmos/crisis/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - distribution: { - v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - evidence: { - v1beta1: new (await import("../cosmos/evidence/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - feegrant: { - v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - gov: { - v1: new (await import("../cosmos/gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - group: { - v1: new (await import("../cosmos/group/v1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - nft: { - v1beta1: new (await import("../cosmos/nft/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - slashing: { - v1beta1: new (await import("../cosmos/slashing/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - staking: { - v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - upgrade: { - v1beta1: new (await import("../cosmos/upgrade/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - vesting: { - v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - } - }, - ibc: { - applications: { - transfer: { - v1: new (await import("./applications/transfer/v1/tx.rpc.msg")).MsgClientImpl(rpc) - } - }, - core: { - channel: { - v1: new (await import("./core/channel/v1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - client: { - v1: new (await import("./core/client/v1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - connection: { - v1: new (await import("./core/connection/v1/tx.rpc.msg")).MsgClientImpl(rpc) - } - } - } -}); \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/ics23/bundle.ts b/examples/interchainjs/src/codegen/ics23/bundle.ts deleted file mode 100644 index 30bc1c53..00000000 --- a/examples/interchainjs/src/codegen/ics23/bundle.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as _0 from "../confio/proofs"; -export const ics23 = { - ..._0 -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/index.ts b/examples/interchainjs/src/codegen/index.ts deleted file mode 100644 index 3928fce2..00000000 --- a/examples/interchainjs/src/codegen/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 - * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain - * and run the transpile command or yarn proto command to regenerate this bundle. - */ - -export * from "./ics23/bundle"; -export * from "./cosmos_proto/bundle"; -export * from "./cosmos/bundle"; -export * from "./cosmos/client"; -export * from "./cosmwasm/bundle"; -export * from "./cosmwasm/client"; -export * from "./gogoproto/bundle"; -export * from "./google/bundle"; -export * from "./ibc/bundle"; -export * from "./ibc/client"; -export * from "./osmosis/bundle"; -export * from "./osmosis/client"; -export * from "./tendermint/bundle"; -export * from "./hooks"; -export * from "./mobx.stores"; -export * from "./extern"; -export * from "./react-query"; -export * from "./mobx"; -export * from "./varint"; -export * from "./utf8"; -export * from "./binary"; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/mobx.stores.ts b/examples/interchainjs/src/codegen/mobx.stores.ts deleted file mode 100644 index c5252709..00000000 --- a/examples/interchainjs/src/codegen/mobx.stores.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { ProtobufRpcClient } from "@cosmjs/stargate"; -import * as _CosmosAppV1alpha1Queryrpc from "./cosmos/app/v1alpha1/query.rpc.Query"; -import * as _CosmosAuthV1beta1Queryrpc from "./cosmos/auth/v1beta1/query.rpc.Query"; -import * as _CosmosAuthzV1beta1Queryrpc from "./cosmos/authz/v1beta1/query.rpc.Query"; -import * as _CosmosBankV1beta1Queryrpc from "./cosmos/bank/v1beta1/query.rpc.Query"; -import * as _CosmosBaseTendermintV1beta1Queryrpc from "./cosmos/base/tendermint/v1beta1/query.rpc.Service"; -import * as _CosmosDistributionV1beta1Queryrpc from "./cosmos/distribution/v1beta1/query.rpc.Query"; -import * as _CosmosEvidenceV1beta1Queryrpc from "./cosmos/evidence/v1beta1/query.rpc.Query"; -import * as _CosmosFeegrantV1beta1Queryrpc from "./cosmos/feegrant/v1beta1/query.rpc.Query"; -import * as _CosmosGovV1Queryrpc from "./cosmos/gov/v1/query.rpc.Query"; -import * as _CosmosGovV1beta1Queryrpc from "./cosmos/gov/v1beta1/query.rpc.Query"; -import * as _CosmosGroupV1Queryrpc from "./cosmos/group/v1/query.rpc.Query"; -import * as _CosmosMintV1beta1Queryrpc from "./cosmos/mint/v1beta1/query.rpc.Query"; -import * as _CosmosNftV1beta1Queryrpc from "./cosmos/nft/v1beta1/query.rpc.Query"; -import * as _CosmosParamsV1beta1Queryrpc from "./cosmos/params/v1beta1/query.rpc.Query"; -import * as _CosmosSlashingV1beta1Queryrpc from "./cosmos/slashing/v1beta1/query.rpc.Query"; -import * as _CosmosStakingV1beta1Queryrpc from "./cosmos/staking/v1beta1/query.rpc.Query"; -import * as _CosmosTxV1beta1Servicerpc from "./cosmos/tx/v1beta1/service.rpc.Service"; -import * as _CosmosUpgradeV1beta1Queryrpc from "./cosmos/upgrade/v1beta1/query.rpc.Query"; -import * as _CosmwasmWasmV1Queryrpc from "./cosmwasm/wasm/v1/query.rpc.Query"; -import * as _IbcApplicationsTransferV1Queryrpc from "./ibc/applications/transfer/v1/query.rpc.Query"; -import * as _IbcCoreChannelV1Queryrpc from "./ibc/core/channel/v1/query.rpc.Query"; -import * as _IbcCoreClientV1Queryrpc from "./ibc/core/client/v1/query.rpc.Query"; -import * as _IbcCoreConnectionV1Queryrpc from "./ibc/core/connection/v1/query.rpc.Query"; -import * as _IbcCorePortV1Queryrpc from "./ibc/core/port/v1/query.rpc.Query"; -import * as _OsmosisClaimV1beta1Queryrpc from "./osmosis/claim/v1beta1/query.rpc.Query"; -import * as _OsmosisEpochsQueryrpc from "./osmosis/epochs/query.rpc.Query"; -import * as _OsmosisGammV1beta1Queryrpc from "./osmosis/gamm/v1beta1/query.rpc.Query"; -import * as _OsmosisGammV2Queryrpc from "./osmosis/gamm/v2/query.rpc.Query"; -import * as _OsmosisIbcratelimitV1beta1Queryrpc from "./osmosis/ibc-rate-limit/v1beta1/query.rpc.Query"; -import * as _OsmosisIncentivesQueryrpc from "./osmosis/incentives/query.rpc.Query"; -import * as _OsmosisLockupQueryrpc from "./osmosis/lockup/query.rpc.Query"; -import * as _OsmosisMintV1beta1Queryrpc from "./osmosis/mint/v1beta1/query.rpc.Query"; -import * as _OsmosisPoolincentivesV1beta1Queryrpc from "./osmosis/pool-incentives/v1beta1/query.rpc.Query"; -import * as _OsmosisSuperfluidQueryrpc from "./osmosis/superfluid/query.rpc.Query"; -import * as _OsmosisTokenfactoryV1beta1Queryrpc from "./osmosis/tokenfactory/v1beta1/query.rpc.Query"; -import * as _OsmosisTwapV1beta1Queryrpc from "./osmosis/twap/v1beta1/query.rpc.Query"; -import * as _OsmosisTxfeesV1beta1Queryrpc from "./osmosis/txfees/v1beta1/query.rpc.Query"; -export const createRpcQueryMobxStores = ({ - rpc -}: { - rpc: ProtobufRpcClient | undefined; -}) => { - return { - cosmos: { - app: { - v1alpha1: _CosmosAppV1alpha1Queryrpc.createRpcQueryMobxStores(rpc) - }, - auth: { - v1beta1: _CosmosAuthV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - authz: { - v1beta1: _CosmosAuthzV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - bank: { - v1beta1: _CosmosBankV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - base: { - tendermint: { - v1beta1: _CosmosBaseTendermintV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - } - }, - distribution: { - v1beta1: _CosmosDistributionV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - evidence: { - v1beta1: _CosmosEvidenceV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - feegrant: { - v1beta1: _CosmosFeegrantV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - gov: { - v1: _CosmosGovV1Queryrpc.createRpcQueryMobxStores(rpc), - v1beta1: _CosmosGovV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - group: { - v1: _CosmosGroupV1Queryrpc.createRpcQueryMobxStores(rpc) - }, - mint: { - v1beta1: _CosmosMintV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - nft: { - v1beta1: _CosmosNftV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - params: { - v1beta1: _CosmosParamsV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - slashing: { - v1beta1: _CosmosSlashingV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - staking: { - v1beta1: _CosmosStakingV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - tx: { - v1beta1: _CosmosTxV1beta1Servicerpc.createRpcQueryMobxStores(rpc) - }, - upgrade: { - v1beta1: _CosmosUpgradeV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - } - }, - cosmwasm: { - wasm: { - v1: _CosmwasmWasmV1Queryrpc.createRpcQueryMobxStores(rpc) - } - }, - ibc: { - applications: { - transfer: { - v1: _IbcApplicationsTransferV1Queryrpc.createRpcQueryMobxStores(rpc) - } - }, - core: { - channel: { - v1: _IbcCoreChannelV1Queryrpc.createRpcQueryMobxStores(rpc) - }, - client: { - v1: _IbcCoreClientV1Queryrpc.createRpcQueryMobxStores(rpc) - }, - connection: { - v1: _IbcCoreConnectionV1Queryrpc.createRpcQueryMobxStores(rpc) - }, - port: { - v1: _IbcCorePortV1Queryrpc.createRpcQueryMobxStores(rpc) - } - } - }, - osmosis: { - claim: { - v1beta1: _OsmosisClaimV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - epochs: { - v1beta1: _OsmosisEpochsQueryrpc.createRpcQueryMobxStores(rpc) - }, - gamm: { - v1beta1: _OsmosisGammV1beta1Queryrpc.createRpcQueryMobxStores(rpc), - v2: _OsmosisGammV2Queryrpc.createRpcQueryMobxStores(rpc) - }, - ibcratelimit: { - v1beta1: _OsmosisIbcratelimitV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - incentives: _OsmosisIncentivesQueryrpc.createRpcQueryMobxStores(rpc), - lockup: _OsmosisLockupQueryrpc.createRpcQueryMobxStores(rpc), - mint: { - v1beta1: _OsmosisMintV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - poolincentives: { - v1beta1: _OsmosisPoolincentivesV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - superfluid: _OsmosisSuperfluidQueryrpc.createRpcQueryMobxStores(rpc), - tokenfactory: { - v1beta1: _OsmosisTokenfactoryV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - twap: { - v1beta1: _OsmosisTwapV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - }, - txfees: { - v1beta1: _OsmosisTxfeesV1beta1Queryrpc.createRpcQueryMobxStores(rpc) - } - } - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/mobx.ts b/examples/interchainjs/src/codegen/mobx.ts deleted file mode 100644 index 3203ce55..00000000 --- a/examples/interchainjs/src/codegen/mobx.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -import { - makeAutoObservable, - runInAction -} from 'mobx'; - -import { QueryStatus } from '@tanstack/react-query'; - -export interface MobxResponse { - data: T | undefined; - isSuccess: boolean; - isLoading: boolean; - refetch: () => Promise; -} - -export class QueryStore { - state?: QueryStatus; - request?: Request; - response?: Response; - fetchFunc?: (request: Request) => Promise; - - constructor(fetchFunc?: (request: Request) => Promise) { - this.fetchFunc = fetchFunc; - makeAutoObservable(this) - } - - get isLoading() { - return this.state === 'loading'; - } - - get isSuccess() { - return this.state === 'success'; - } - - refetch = async (): Promise => { - runInAction(() => { - this.response = void 0; - this.state = 'loading'; - }); - try { - if (!this.fetchFunc) - throw new Error( - 'Query Service not initialized or request function not implemented' - ); - if (!this.request) throw new Error('Request not provided'); - const response = await this.fetchFunc(this.request); - runInAction(() => { - this.response = response; - this.state = 'success'; - }); - console.log( - '%cquery.rpc.Query.ts line:572 this.state', - 'color: #007acc;', - this.state, - this.response - ); - } catch (e) { - console.error(e); - runInAction(() => { - this.state = 'error'; - }); - } - } - - getData(request?: Request): MobxResponse { - runInAction(() => { - this.request = request; - }); - return { - data: this.response, - isSuccess: this.isSuccess, - isLoading: this.isLoading, - refetch: this.refetch, - }; - } -} diff --git a/examples/interchainjs/src/codegen/osmosis/bundle.ts b/examples/interchainjs/src/codegen/osmosis/bundle.ts deleted file mode 100644 index 550f65c8..00000000 --- a/examples/interchainjs/src/codegen/osmosis/bundle.ts +++ /dev/null @@ -1,236 +0,0 @@ -import * as _132 from "./claim/v1beta1/claim"; -import * as _133 from "./claim/v1beta1/genesis"; -import * as _134 from "./claim/v1beta1/params"; -import * as _135 from "./claim/v1beta1/query"; -import * as _136 from "./epochs/genesis"; -import * as _137 from "./epochs/query"; -import * as _138 from "./gamm/pool-models/balancer/balancerPool"; -import * as _139 from "./gamm/v1beta1/genesis"; -import * as _140 from "./gamm/v1beta1/query"; -import * as _141 from "./gamm/v1beta1/tx"; -import * as _142 from "./gamm/pool-models/balancer/tx/tx"; -import * as _143 from "./gamm/pool-models/stableswap/stableswap_pool"; -import * as _144 from "./gamm/pool-models/stableswap/tx"; -import * as _145 from "./gamm/v2/query"; -import * as _146 from "./ibc-rate-limit/v1beta1/params"; -import * as _147 from "./ibc-rate-limit/v1beta1/query"; -import * as _148 from "./incentives/gauge"; -import * as _149 from "./incentives/genesis"; -import * as _150 from "./incentives/params"; -import * as _151 from "./incentives/query"; -import * as _152 from "./incentives/tx"; -import * as _153 from "./lockup/genesis"; -import * as _154 from "./lockup/lock"; -import * as _155 from "./lockup/params"; -import * as _156 from "./lockup/query"; -import * as _157 from "./lockup/tx"; -import * as _158 from "./mint/v1beta1/genesis"; -import * as _159 from "./mint/v1beta1/mint"; -import * as _160 from "./mint/v1beta1/query"; -import * as _161 from "./pool-incentives/v1beta1/genesis"; -import * as _162 from "./pool-incentives/v1beta1/gov"; -import * as _163 from "./pool-incentives/v1beta1/incentives"; -import * as _164 from "./pool-incentives/v1beta1/query"; -import * as _165 from "./sumtree/v1beta1/tree"; -import * as _166 from "./superfluid/genesis"; -import * as _167 from "./superfluid/params"; -import * as _168 from "./superfluid/query"; -import * as _169 from "./superfluid/superfluid"; -import * as _170 from "./superfluid/tx"; -import * as _171 from "./tokenfactory/v1beta1/authorityMetadata"; -import * as _172 from "./tokenfactory/v1beta1/genesis"; -import * as _173 from "./tokenfactory/v1beta1/params"; -import * as _174 from "./tokenfactory/v1beta1/query"; -import * as _175 from "./tokenfactory/v1beta1/tx"; -import * as _176 from "./twap/v1beta1/genesis"; -import * as _177 from "./twap/v1beta1/query"; -import * as _178 from "./twap/v1beta1/twap_record"; -import * as _179 from "./txfees/v1beta1/feetoken"; -import * as _180 from "./txfees/v1beta1/genesis"; -import * as _181 from "./txfees/v1beta1/gov"; -import * as _182 from "./txfees/v1beta1/query"; -import * as _275 from "./gamm/pool-models/balancer/tx/tx.amino"; -import * as _276 from "./gamm/pool-models/stableswap/tx.amino"; -import * as _277 from "./gamm/v1beta1/tx.amino"; -import * as _278 from "./incentives/tx.amino"; -import * as _279 from "./lockup/tx.amino"; -import * as _280 from "./superfluid/tx.amino"; -import * as _281 from "./tokenfactory/v1beta1/tx.amino"; -import * as _282 from "./gamm/pool-models/balancer/tx/tx.registry"; -import * as _283 from "./gamm/pool-models/stableswap/tx.registry"; -import * as _284 from "./gamm/v1beta1/tx.registry"; -import * as _285 from "./incentives/tx.registry"; -import * as _286 from "./lockup/tx.registry"; -import * as _287 from "./superfluid/tx.registry"; -import * as _288 from "./tokenfactory/v1beta1/tx.registry"; -import * as _289 from "./claim/v1beta1/query.rpc.Query"; -import * as _290 from "./epochs/query.rpc.Query"; -import * as _291 from "./gamm/v1beta1/query.rpc.Query"; -import * as _292 from "./gamm/v2/query.rpc.Query"; -import * as _293 from "./ibc-rate-limit/v1beta1/query.rpc.Query"; -import * as _294 from "./incentives/query.rpc.Query"; -import * as _295 from "./lockup/query.rpc.Query"; -import * as _296 from "./mint/v1beta1/query.rpc.Query"; -import * as _297 from "./pool-incentives/v1beta1/query.rpc.Query"; -import * as _298 from "./superfluid/query.rpc.Query"; -import * as _299 from "./tokenfactory/v1beta1/query.rpc.Query"; -import * as _300 from "./twap/v1beta1/query.rpc.Query"; -import * as _301 from "./txfees/v1beta1/query.rpc.Query"; -import * as _302 from "./gamm/pool-models/balancer/tx/tx.rpc.msg"; -import * as _303 from "./gamm/pool-models/stableswap/tx.rpc.msg"; -import * as _304 from "./gamm/v1beta1/tx.rpc.msg"; -import * as _305 from "./incentives/tx.rpc.msg"; -import * as _306 from "./lockup/tx.rpc.msg"; -import * as _307 from "./superfluid/tx.rpc.msg"; -import * as _308 from "./tokenfactory/v1beta1/tx.rpc.msg"; -import * as _315 from "./rpc.query"; -import * as _316 from "./rpc.tx"; -export namespace osmosis { - export namespace claim { - export const v1beta1 = { - ..._132, - ..._133, - ..._134, - ..._135, - ..._289 - }; - } - export namespace epochs { - export const v1beta1 = { - ..._136, - ..._137, - ..._290 - }; - } - export namespace gamm { - export const v1beta1 = { - ..._138, - ..._139, - ..._140, - ..._141, - ..._277, - ..._284, - ..._291, - ..._304 - }; - export namespace poolmodels { - export namespace balancer { - export const v1beta1 = { - ..._142, - ..._275, - ..._282, - ..._302 - }; - } - export namespace stableswap { - export const v1beta1 = { - ..._143, - ..._144, - ..._276, - ..._283, - ..._303 - }; - } - } - export const v2 = { - ..._145, - ..._292 - }; - } - export namespace ibcratelimit { - export const v1beta1 = { - ..._146, - ..._147, - ..._293 - }; - } - export const incentives = { - ..._148, - ..._149, - ..._150, - ..._151, - ..._152, - ..._278, - ..._285, - ..._294, - ..._305 - }; - export const lockup = { - ..._153, - ..._154, - ..._155, - ..._156, - ..._157, - ..._279, - ..._286, - ..._295, - ..._306 - }; - export namespace mint { - export const v1beta1 = { - ..._158, - ..._159, - ..._160, - ..._296 - }; - } - export namespace poolincentives { - export const v1beta1 = { - ..._161, - ..._162, - ..._163, - ..._164, - ..._297 - }; - } - export namespace store { - export const v1beta1 = { - ..._165 - }; - } - export const superfluid = { - ..._166, - ..._167, - ..._168, - ..._169, - ..._170, - ..._280, - ..._287, - ..._298, - ..._307 - }; - export namespace tokenfactory { - export const v1beta1 = { - ..._171, - ..._172, - ..._173, - ..._174, - ..._175, - ..._281, - ..._288, - ..._299, - ..._308 - }; - } - export namespace twap { - export const v1beta1 = { - ..._176, - ..._177, - ..._178, - ..._300 - }; - } - export namespace txfees { - export const v1beta1 = { - ..._179, - ..._180, - ..._181, - ..._182, - ..._301 - }; - } - export const ClientFactory = { - ..._315, - ..._316 - }; -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/claim.ts b/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/claim.ts deleted file mode 100644 index dd9113dd..00000000 --- a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/claim.ts +++ /dev/null @@ -1,234 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -export enum Action { - ActionAddLiquidity = 0, - ActionSwap = 1, - ActionVote = 2, - ActionDelegateStake = 3, - UNRECOGNIZED = -1, -} -export const ActionSDKType = Action; -export const ActionAmino = Action; -export function actionFromJSON(object: any): Action { - switch (object) { - case 0: - case "ActionAddLiquidity": - return Action.ActionAddLiquidity; - case 1: - case "ActionSwap": - return Action.ActionSwap; - case 2: - case "ActionVote": - return Action.ActionVote; - case 3: - case "ActionDelegateStake": - return Action.ActionDelegateStake; - case -1: - case "UNRECOGNIZED": - default: - return Action.UNRECOGNIZED; - } -} -export function actionToJSON(object: Action): string { - switch (object) { - case Action.ActionAddLiquidity: - return "ActionAddLiquidity"; - case Action.ActionSwap: - return "ActionSwap"; - case Action.ActionVote: - return "ActionVote"; - case Action.ActionDelegateStake: - return "ActionDelegateStake"; - case Action.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** A Claim Records is the metadata of claim data per address */ -export interface ClaimRecord { - /** address of claim user */ - address: string; - /** total initial claimable amount for the user */ - initialClaimableAmount: Coin[]; - /** - * true if action is completed - * index of bool in array refers to action enum # - */ - actionCompleted: boolean[]; -} -export interface ClaimRecordProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.ClaimRecord"; - value: Uint8Array; -} -/** A Claim Records is the metadata of claim data per address */ -export interface ClaimRecordAmino { - /** address of claim user */ - address: string; - /** total initial claimable amount for the user */ - initial_claimable_amount: CoinAmino[]; - /** - * true if action is completed - * index of bool in array refers to action enum # - */ - action_completed: boolean[]; -} -export interface ClaimRecordAminoMsg { - type: "osmosis/claim/claim-record"; - value: ClaimRecordAmino; -} -/** A Claim Records is the metadata of claim data per address */ -export interface ClaimRecordSDKType { - address: string; - initial_claimable_amount: CoinSDKType[]; - action_completed: boolean[]; -} -function createBaseClaimRecord(): ClaimRecord { - return { - address: "", - initialClaimableAmount: [], - actionCompleted: [] - }; -} -export const ClaimRecord = { - typeUrl: "/osmosis.claim.v1beta1.ClaimRecord", - aminoType: "osmosis/claim/claim-record", - encode(message: ClaimRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - for (const v of message.initialClaimableAmount) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - writer.uint32(26).fork(); - for (const v of message.actionCompleted) { - writer.bool(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ClaimRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClaimRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.initialClaimableAmount.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.actionCompleted.push(reader.bool()); - } - } else { - message.actionCompleted.push(reader.bool()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ClaimRecord { - return { - address: isSet(object.address) ? String(object.address) : "", - initialClaimableAmount: Array.isArray(object?.initialClaimableAmount) ? object.initialClaimableAmount.map((e: any) => Coin.fromJSON(e)) : [], - actionCompleted: Array.isArray(object?.actionCompleted) ? object.actionCompleted.map((e: any) => Boolean(e)) : [] - }; - }, - toJSON(message: ClaimRecord): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - if (message.initialClaimableAmount) { - obj.initialClaimableAmount = message.initialClaimableAmount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.initialClaimableAmount = []; - } - if (message.actionCompleted) { - obj.actionCompleted = message.actionCompleted.map(e => e); - } else { - obj.actionCompleted = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ClaimRecord { - const message = createBaseClaimRecord(); - message.address = object.address ?? ""; - message.initialClaimableAmount = object.initialClaimableAmount?.map(e => Coin.fromPartial(e)) || []; - message.actionCompleted = object.actionCompleted?.map(e => e) || []; - return message; - }, - fromSDK(object: ClaimRecordSDKType): ClaimRecord { - return { - address: object?.address, - initialClaimableAmount: Array.isArray(object?.initial_claimable_amount) ? object.initial_claimable_amount.map((e: any) => Coin.fromSDK(e)) : [], - actionCompleted: Array.isArray(object?.action_completed) ? object.action_completed.map((e: any) => e) : [] - }; - }, - toSDK(message: ClaimRecord): ClaimRecordSDKType { - const obj: any = {}; - obj.address = message.address; - if (message.initialClaimableAmount) { - obj.initial_claimable_amount = message.initialClaimableAmount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.initial_claimable_amount = []; - } - if (message.actionCompleted) { - obj.action_completed = message.actionCompleted.map(e => e); - } else { - obj.action_completed = []; - } - return obj; - }, - fromAmino(object: ClaimRecordAmino): ClaimRecord { - return { - address: object.address, - initialClaimableAmount: Array.isArray(object?.initial_claimable_amount) ? object.initial_claimable_amount.map((e: any) => Coin.fromAmino(e)) : [], - actionCompleted: Array.isArray(object?.action_completed) ? object.action_completed.map((e: any) => e) : [] - }; - }, - toAmino(message: ClaimRecord): ClaimRecordAmino { - const obj: any = {}; - obj.address = message.address; - if (message.initialClaimableAmount) { - obj.initial_claimable_amount = message.initialClaimableAmount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.initial_claimable_amount = []; - } - if (message.actionCompleted) { - obj.action_completed = message.actionCompleted.map(e => e); - } else { - obj.action_completed = []; - } - return obj; - }, - fromAminoMsg(object: ClaimRecordAminoMsg): ClaimRecord { - return ClaimRecord.fromAmino(object.value); - }, - toAminoMsg(message: ClaimRecord): ClaimRecordAminoMsg { - return { - type: "osmosis/claim/claim-record", - value: ClaimRecord.toAmino(message) - }; - }, - fromProtoMsg(message: ClaimRecordProtoMsg): ClaimRecord { - return ClaimRecord.decode(message.value); - }, - toProto(message: ClaimRecord): Uint8Array { - return ClaimRecord.encode(message).finish(); - }, - toProtoMsg(message: ClaimRecord): ClaimRecordProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.ClaimRecord", - value: ClaimRecord.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/genesis.ts deleted file mode 100644 index b7371366..00000000 --- a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/genesis.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { ClaimRecord, ClaimRecordAmino, ClaimRecordSDKType } from "./claim"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the claim module's genesis state. */ -export interface GenesisState { - /** balance of the claim module's account */ - moduleAccountBalance: Coin | undefined; - /** params defines all the parameters of the module. */ - params: Params | undefined; - /** list of claim records, one for every airdrop recipient */ - claimRecords: ClaimRecord[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the claim module's genesis state. */ -export interface GenesisStateAmino { - /** balance of the claim module's account */ - module_account_balance?: CoinAmino | undefined; - /** params defines all the parameters of the module. */ - params?: ParamsAmino | undefined; - /** list of claim records, one for every airdrop recipient */ - claim_records: ClaimRecordAmino[]; -} -export interface GenesisStateAminoMsg { - type: "osmosis/claim/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the claim module's genesis state. */ -export interface GenesisStateSDKType { - module_account_balance: CoinSDKType | undefined; - params: ParamsSDKType | undefined; - claim_records: ClaimRecordSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - moduleAccountBalance: Coin.fromPartial({}), - params: Params.fromPartial({}), - claimRecords: [] - }; -} -export const GenesisState = { - typeUrl: "/osmosis.claim.v1beta1.GenesisState", - aminoType: "osmosis/claim/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.moduleAccountBalance !== undefined) { - Coin.encode(message.moduleAccountBalance, writer.uint32(10).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.claimRecords) { - ClaimRecord.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moduleAccountBalance = Coin.decode(reader, reader.uint32()); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - case 3: - message.claimRecords.push(ClaimRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - moduleAccountBalance: isSet(object.moduleAccountBalance) ? Coin.fromJSON(object.moduleAccountBalance) : undefined, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - claimRecords: Array.isArray(object?.claimRecords) ? object.claimRecords.map((e: any) => ClaimRecord.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.moduleAccountBalance !== undefined && (obj.moduleAccountBalance = message.moduleAccountBalance ? Coin.toJSON(message.moduleAccountBalance) : undefined); - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.claimRecords) { - obj.claimRecords = message.claimRecords.map(e => e ? ClaimRecord.toJSON(e) : undefined); - } else { - obj.claimRecords = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.moduleAccountBalance = object.moduleAccountBalance !== undefined && object.moduleAccountBalance !== null ? Coin.fromPartial(object.moduleAccountBalance) : undefined; - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.claimRecords = object.claimRecords?.map(e => ClaimRecord.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - moduleAccountBalance: object.module_account_balance ? Coin.fromSDK(object.module_account_balance) : undefined, - params: object.params ? Params.fromSDK(object.params) : undefined, - claimRecords: Array.isArray(object?.claim_records) ? object.claim_records.map((e: any) => ClaimRecord.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.moduleAccountBalance !== undefined && (obj.module_account_balance = message.moduleAccountBalance ? Coin.toSDK(message.moduleAccountBalance) : undefined); - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.claimRecords) { - obj.claim_records = message.claimRecords.map(e => e ? ClaimRecord.toSDK(e) : undefined); - } else { - obj.claim_records = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - moduleAccountBalance: object?.module_account_balance ? Coin.fromAmino(object.module_account_balance) : undefined, - params: object?.params ? Params.fromAmino(object.params) : undefined, - claimRecords: Array.isArray(object?.claim_records) ? object.claim_records.map((e: any) => ClaimRecord.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.module_account_balance = message.moduleAccountBalance ? Coin.toAmino(message.moduleAccountBalance) : undefined; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.claimRecords) { - obj.claim_records = message.claimRecords.map(e => e ? ClaimRecord.toAmino(e) : undefined); - } else { - obj.claim_records = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/claim/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/params.ts b/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/params.ts deleted file mode 100644 index 37b10433..00000000 --- a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/params.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -/** Params defines the claim module's parameters. */ -export interface Params { - airdropStartTime: Date | undefined; - durationUntilDecay: Duration | undefined; - durationOfDecay: Duration | undefined; - /** denom of claimable asset */ - claimDenom: string; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the claim module's parameters. */ -export interface ParamsAmino { - airdrop_start_time?: Date | undefined; - duration_until_decay?: DurationAmino | undefined; - duration_of_decay?: DurationAmino | undefined; - /** denom of claimable asset */ - claim_denom: string; -} -export interface ParamsAminoMsg { - type: "osmosis/claim/params"; - value: ParamsAmino; -} -/** Params defines the claim module's parameters. */ -export interface ParamsSDKType { - airdrop_start_time: Date | undefined; - duration_until_decay: DurationSDKType | undefined; - duration_of_decay: DurationSDKType | undefined; - claim_denom: string; -} -function createBaseParams(): Params { - return { - airdropStartTime: new Date(), - durationUntilDecay: Duration.fromPartial({}), - durationOfDecay: Duration.fromPartial({}), - claimDenom: "" - }; -} -export const Params = { - typeUrl: "/osmosis.claim.v1beta1.Params", - aminoType: "osmosis/claim/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.airdropStartTime !== undefined) { - Timestamp.encode(toTimestamp(message.airdropStartTime), writer.uint32(10).fork()).ldelim(); - } - if (message.durationUntilDecay !== undefined) { - Duration.encode(message.durationUntilDecay, writer.uint32(18).fork()).ldelim(); - } - if (message.durationOfDecay !== undefined) { - Duration.encode(message.durationOfDecay, writer.uint32(26).fork()).ldelim(); - } - if (message.claimDenom !== "") { - writer.uint32(34).string(message.claimDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.airdropStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.durationUntilDecay = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.durationOfDecay = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.claimDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - airdropStartTime: isSet(object.airdropStartTime) ? new Date(object.airdropStartTime) : undefined, - durationUntilDecay: isSet(object.durationUntilDecay) ? Duration.fromJSON(object.durationUntilDecay) : undefined, - durationOfDecay: isSet(object.durationOfDecay) ? Duration.fromJSON(object.durationOfDecay) : undefined, - claimDenom: isSet(object.claimDenom) ? String(object.claimDenom) : "" - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.airdropStartTime !== undefined && (obj.airdropStartTime = message.airdropStartTime.toISOString()); - message.durationUntilDecay !== undefined && (obj.durationUntilDecay = message.durationUntilDecay ? Duration.toJSON(message.durationUntilDecay) : undefined); - message.durationOfDecay !== undefined && (obj.durationOfDecay = message.durationOfDecay ? Duration.toJSON(message.durationOfDecay) : undefined); - message.claimDenom !== undefined && (obj.claimDenom = message.claimDenom); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.airdropStartTime = object.airdropStartTime ?? undefined; - message.durationUntilDecay = object.durationUntilDecay !== undefined && object.durationUntilDecay !== null ? Duration.fromPartial(object.durationUntilDecay) : undefined; - message.durationOfDecay = object.durationOfDecay !== undefined && object.durationOfDecay !== null ? Duration.fromPartial(object.durationOfDecay) : undefined; - message.claimDenom = object.claimDenom ?? ""; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - airdropStartTime: object.airdrop_start_time ?? undefined, - durationUntilDecay: object.duration_until_decay ? Duration.fromSDK(object.duration_until_decay) : undefined, - durationOfDecay: object.duration_of_decay ? Duration.fromSDK(object.duration_of_decay) : undefined, - claimDenom: object?.claim_denom - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - message.airdropStartTime !== undefined && (obj.airdrop_start_time = message.airdropStartTime ?? undefined); - message.durationUntilDecay !== undefined && (obj.duration_until_decay = message.durationUntilDecay ? Duration.toSDK(message.durationUntilDecay) : undefined); - message.durationOfDecay !== undefined && (obj.duration_of_decay = message.durationOfDecay ? Duration.toSDK(message.durationOfDecay) : undefined); - obj.claim_denom = message.claimDenom; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - airdropStartTime: object.airdrop_start_time, - durationUntilDecay: object?.duration_until_decay ? Duration.fromAmino(object.duration_until_decay) : undefined, - durationOfDecay: object?.duration_of_decay ? Duration.fromAmino(object.duration_of_decay) : undefined, - claimDenom: object.claim_denom - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.airdrop_start_time = message.airdropStartTime; - obj.duration_until_decay = message.durationUntilDecay ? Duration.toAmino(message.durationUntilDecay) : undefined; - obj.duration_of_decay = message.durationOfDecay ? Duration.toAmino(message.durationOfDecay) : undefined; - obj.claim_denom = message.claimDenom; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/claim/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 90cdd2f3..00000000 --- a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryModuleAccountBalanceRequest, QueryModuleAccountBalanceResponse, QueryParamsRequest, QueryParamsResponse, QueryClaimRecordRequest, QueryClaimRecordResponse, QueryClaimableForActionRequest, QueryClaimableForActionResponse, QueryTotalClaimableRequest, QueryTotalClaimableResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - moduleAccountBalance(request?: QueryModuleAccountBalanceRequest): Promise; - params(request?: QueryParamsRequest): Promise; - claimRecord(request: QueryClaimRecordRequest): Promise; - claimableForAction(request: QueryClaimableForActionRequest): Promise; - totalClaimable(request: QueryTotalClaimableRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.moduleAccountBalance = this.moduleAccountBalance.bind(this); - this.params = this.params.bind(this); - this.claimRecord = this.claimRecord.bind(this); - this.claimableForAction = this.claimableForAction.bind(this); - this.totalClaimable = this.totalClaimable.bind(this); - } - moduleAccountBalance(request: QueryModuleAccountBalanceRequest = {}): Promise { - const data = QueryModuleAccountBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.claim.v1beta1.Query", "ModuleAccountBalance", data); - return promise.then(data => QueryModuleAccountBalanceResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.claim.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - claimRecord(request: QueryClaimRecordRequest): Promise { - const data = QueryClaimRecordRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.claim.v1beta1.Query", "ClaimRecord", data); - return promise.then(data => QueryClaimRecordResponse.decode(new BinaryReader(data))); - } - claimableForAction(request: QueryClaimableForActionRequest): Promise { - const data = QueryClaimableForActionRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.claim.v1beta1.Query", "ClaimableForAction", data); - return promise.then(data => QueryClaimableForActionResponse.decode(new BinaryReader(data))); - } - totalClaimable(request: QueryTotalClaimableRequest): Promise { - const data = QueryTotalClaimableRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.claim.v1beta1.Query", "TotalClaimable", data); - return promise.then(data => QueryTotalClaimableResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - moduleAccountBalance(request?: QueryModuleAccountBalanceRequest): Promise { - return queryService.moduleAccountBalance(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - claimRecord(request: QueryClaimRecordRequest): Promise { - return queryService.claimRecord(request); - }, - claimableForAction(request: QueryClaimableForActionRequest): Promise { - return queryService.claimableForAction(request); - }, - totalClaimable(request: QueryTotalClaimableRequest): Promise { - return queryService.totalClaimable(request); - } - }; -}; -export interface UseModuleAccountBalanceQuery extends ReactQueryParams { - request?: QueryModuleAccountBalanceRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseClaimRecordQuery extends ReactQueryParams { - request: QueryClaimRecordRequest; -} -export interface UseClaimableForActionQuery extends ReactQueryParams { - request: QueryClaimableForActionRequest; -} -export interface UseTotalClaimableQuery extends ReactQueryParams { - request: QueryTotalClaimableRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useModuleAccountBalance = ({ - request, - options - }: UseModuleAccountBalanceQuery) => { - return useQuery(["moduleAccountBalanceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.moduleAccountBalance(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useClaimRecord = ({ - request, - options - }: UseClaimRecordQuery) => { - return useQuery(["claimRecordQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.claimRecord(request); - }, options); - }; - const useClaimableForAction = ({ - request, - options - }: UseClaimableForActionQuery) => { - return useQuery(["claimableForActionQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.claimableForAction(request); - }, options); - }; - const useTotalClaimable = ({ - request, - options - }: UseTotalClaimableQuery) => { - return useQuery(["totalClaimableQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalClaimable(request); - }, options); - }; - return { - useModuleAccountBalance, - useParams, - useClaimRecord, - useClaimableForAction, - useTotalClaimable - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryModuleAccountBalanceStore { - store = new QueryStore(queryService?.moduleAccountBalance); - moduleAccountBalance(request: QueryModuleAccountBalanceRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryClaimRecordStore { - store = new QueryStore(queryService?.claimRecord); - claimRecord(request: QueryClaimRecordRequest) { - return this.store.getData(request); - } - } - class QueryClaimableForActionStore { - store = new QueryStore(queryService?.claimableForAction); - claimableForAction(request: QueryClaimableForActionRequest) { - return this.store.getData(request); - } - } - class QueryTotalClaimableStore { - store = new QueryStore(queryService?.totalClaimable); - totalClaimable(request: QueryTotalClaimableRequest) { - return this.store.getData(request); - } - } - return { - QueryModuleAccountBalanceStore, - QueryParamsStore, - QueryClaimRecordStore, - QueryClaimableForActionStore, - QueryTotalClaimableStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/query.ts deleted file mode 100644 index 80057376..00000000 --- a/examples/interchainjs/src/codegen/osmosis/claim/v1beta1/query.ts +++ /dev/null @@ -1,1076 +0,0 @@ -import { Action, ClaimRecord, ClaimRecordAmino, ClaimRecordSDKType, actionFromJSON, actionToJSON } from "./claim"; -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryModuleAccountBalanceRequest {} -export interface QueryModuleAccountBalanceRequestProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryModuleAccountBalanceRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryModuleAccountBalanceRequestAmino {} -export interface QueryModuleAccountBalanceRequestAminoMsg { - type: "osmosis/claim/query-module-account-balance-request"; - value: QueryModuleAccountBalanceRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryModuleAccountBalanceRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryModuleAccountBalanceResponse { - /** params defines the parameters of the module. */ - moduleAccountBalance: Coin[]; -} -export interface QueryModuleAccountBalanceResponseProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryModuleAccountBalanceResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryModuleAccountBalanceResponseAmino { - /** params defines the parameters of the module. */ - moduleAccountBalance: CoinAmino[]; -} -export interface QueryModuleAccountBalanceResponseAminoMsg { - type: "osmosis/claim/query-module-account-balance-response"; - value: QueryModuleAccountBalanceResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryModuleAccountBalanceResponseSDKType { - moduleAccountBalance: CoinSDKType[]; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/claim/query-params-request"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/claim/query-params-response"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -export interface QueryClaimRecordRequest { - address: string; -} -export interface QueryClaimRecordRequestProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimRecordRequest"; - value: Uint8Array; -} -export interface QueryClaimRecordRequestAmino { - address: string; -} -export interface QueryClaimRecordRequestAminoMsg { - type: "osmosis/claim/query-claim-record-request"; - value: QueryClaimRecordRequestAmino; -} -export interface QueryClaimRecordRequestSDKType { - address: string; -} -export interface QueryClaimRecordResponse { - claimRecord: ClaimRecord | undefined; -} -export interface QueryClaimRecordResponseProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimRecordResponse"; - value: Uint8Array; -} -export interface QueryClaimRecordResponseAmino { - claim_record?: ClaimRecordAmino | undefined; -} -export interface QueryClaimRecordResponseAminoMsg { - type: "osmosis/claim/query-claim-record-response"; - value: QueryClaimRecordResponseAmino; -} -export interface QueryClaimRecordResponseSDKType { - claim_record: ClaimRecordSDKType | undefined; -} -export interface QueryClaimableForActionRequest { - address: string; - action: Action; -} -export interface QueryClaimableForActionRequestProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimableForActionRequest"; - value: Uint8Array; -} -export interface QueryClaimableForActionRequestAmino { - address: string; - action: Action; -} -export interface QueryClaimableForActionRequestAminoMsg { - type: "osmosis/claim/query-claimable-for-action-request"; - value: QueryClaimableForActionRequestAmino; -} -export interface QueryClaimableForActionRequestSDKType { - address: string; - action: Action; -} -export interface QueryClaimableForActionResponse { - coins: Coin[]; -} -export interface QueryClaimableForActionResponseProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimableForActionResponse"; - value: Uint8Array; -} -export interface QueryClaimableForActionResponseAmino { - coins: CoinAmino[]; -} -export interface QueryClaimableForActionResponseAminoMsg { - type: "osmosis/claim/query-claimable-for-action-response"; - value: QueryClaimableForActionResponseAmino; -} -export interface QueryClaimableForActionResponseSDKType { - coins: CoinSDKType[]; -} -export interface QueryTotalClaimableRequest { - address: string; -} -export interface QueryTotalClaimableRequestProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryTotalClaimableRequest"; - value: Uint8Array; -} -export interface QueryTotalClaimableRequestAmino { - address: string; -} -export interface QueryTotalClaimableRequestAminoMsg { - type: "osmosis/claim/query-total-claimable-request"; - value: QueryTotalClaimableRequestAmino; -} -export interface QueryTotalClaimableRequestSDKType { - address: string; -} -export interface QueryTotalClaimableResponse { - coins: Coin[]; -} -export interface QueryTotalClaimableResponseProtoMsg { - typeUrl: "/osmosis.claim.v1beta1.QueryTotalClaimableResponse"; - value: Uint8Array; -} -export interface QueryTotalClaimableResponseAmino { - coins: CoinAmino[]; -} -export interface QueryTotalClaimableResponseAminoMsg { - type: "osmosis/claim/query-total-claimable-response"; - value: QueryTotalClaimableResponseAmino; -} -export interface QueryTotalClaimableResponseSDKType { - coins: CoinSDKType[]; -} -function createBaseQueryModuleAccountBalanceRequest(): QueryModuleAccountBalanceRequest { - return {}; -} -export const QueryModuleAccountBalanceRequest = { - typeUrl: "/osmosis.claim.v1beta1.QueryModuleAccountBalanceRequest", - aminoType: "osmosis/claim/query-module-account-balance-request", - encode(_: QueryModuleAccountBalanceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountBalanceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountBalanceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryModuleAccountBalanceRequest { - return {}; - }, - toJSON(_: QueryModuleAccountBalanceRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryModuleAccountBalanceRequest { - const message = createBaseQueryModuleAccountBalanceRequest(); - return message; - }, - fromSDK(_: QueryModuleAccountBalanceRequestSDKType): QueryModuleAccountBalanceRequest { - return {}; - }, - toSDK(_: QueryModuleAccountBalanceRequest): QueryModuleAccountBalanceRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryModuleAccountBalanceRequestAmino): QueryModuleAccountBalanceRequest { - return {}; - }, - toAmino(_: QueryModuleAccountBalanceRequest): QueryModuleAccountBalanceRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryModuleAccountBalanceRequestAminoMsg): QueryModuleAccountBalanceRequest { - return QueryModuleAccountBalanceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryModuleAccountBalanceRequest): QueryModuleAccountBalanceRequestAminoMsg { - return { - type: "osmosis/claim/query-module-account-balance-request", - value: QueryModuleAccountBalanceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryModuleAccountBalanceRequestProtoMsg): QueryModuleAccountBalanceRequest { - return QueryModuleAccountBalanceRequest.decode(message.value); - }, - toProto(message: QueryModuleAccountBalanceRequest): Uint8Array { - return QueryModuleAccountBalanceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryModuleAccountBalanceRequest): QueryModuleAccountBalanceRequestProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryModuleAccountBalanceRequest", - value: QueryModuleAccountBalanceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryModuleAccountBalanceResponse(): QueryModuleAccountBalanceResponse { - return { - moduleAccountBalance: [] - }; -} -export const QueryModuleAccountBalanceResponse = { - typeUrl: "/osmosis.claim.v1beta1.QueryModuleAccountBalanceResponse", - aminoType: "osmosis/claim/query-module-account-balance-response", - encode(message: QueryModuleAccountBalanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.moduleAccountBalance) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountBalanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryModuleAccountBalanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.moduleAccountBalance.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryModuleAccountBalanceResponse { - return { - moduleAccountBalance: Array.isArray(object?.moduleAccountBalance) ? object.moduleAccountBalance.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryModuleAccountBalanceResponse): unknown { - const obj: any = {}; - if (message.moduleAccountBalance) { - obj.moduleAccountBalance = message.moduleAccountBalance.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.moduleAccountBalance = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryModuleAccountBalanceResponse { - const message = createBaseQueryModuleAccountBalanceResponse(); - message.moduleAccountBalance = object.moduleAccountBalance?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryModuleAccountBalanceResponseSDKType): QueryModuleAccountBalanceResponse { - return { - moduleAccountBalance: Array.isArray(object?.moduleAccountBalance) ? object.moduleAccountBalance.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryModuleAccountBalanceResponse): QueryModuleAccountBalanceResponseSDKType { - const obj: any = {}; - if (message.moduleAccountBalance) { - obj.moduleAccountBalance = message.moduleAccountBalance.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.moduleAccountBalance = []; - } - return obj; - }, - fromAmino(object: QueryModuleAccountBalanceResponseAmino): QueryModuleAccountBalanceResponse { - return { - moduleAccountBalance: Array.isArray(object?.moduleAccountBalance) ? object.moduleAccountBalance.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryModuleAccountBalanceResponse): QueryModuleAccountBalanceResponseAmino { - const obj: any = {}; - if (message.moduleAccountBalance) { - obj.moduleAccountBalance = message.moduleAccountBalance.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.moduleAccountBalance = []; - } - return obj; - }, - fromAminoMsg(object: QueryModuleAccountBalanceResponseAminoMsg): QueryModuleAccountBalanceResponse { - return QueryModuleAccountBalanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryModuleAccountBalanceResponse): QueryModuleAccountBalanceResponseAminoMsg { - return { - type: "osmosis/claim/query-module-account-balance-response", - value: QueryModuleAccountBalanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryModuleAccountBalanceResponseProtoMsg): QueryModuleAccountBalanceResponse { - return QueryModuleAccountBalanceResponse.decode(message.value); - }, - toProto(message: QueryModuleAccountBalanceResponse): Uint8Array { - return QueryModuleAccountBalanceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryModuleAccountBalanceResponse): QueryModuleAccountBalanceResponseProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryModuleAccountBalanceResponse", - value: QueryModuleAccountBalanceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.claim.v1beta1.QueryParamsRequest", - aminoType: "osmosis/claim/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/claim/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.claim.v1beta1.QueryParamsResponse", - aminoType: "osmosis/claim/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/claim/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClaimRecordRequest(): QueryClaimRecordRequest { - return { - address: "" - }; -} -export const QueryClaimRecordRequest = { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimRecordRequest", - aminoType: "osmosis/claim/query-claim-record-request", - encode(message: QueryClaimRecordRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClaimRecordRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClaimRecordRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClaimRecordRequest { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: QueryClaimRecordRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): QueryClaimRecordRequest { - const message = createBaseQueryClaimRecordRequest(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: QueryClaimRecordRequestSDKType): QueryClaimRecordRequest { - return { - address: object?.address - }; - }, - toSDK(message: QueryClaimRecordRequest): QueryClaimRecordRequestSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: QueryClaimRecordRequestAmino): QueryClaimRecordRequest { - return { - address: object.address - }; - }, - toAmino(message: QueryClaimRecordRequest): QueryClaimRecordRequestAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: QueryClaimRecordRequestAminoMsg): QueryClaimRecordRequest { - return QueryClaimRecordRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClaimRecordRequest): QueryClaimRecordRequestAminoMsg { - return { - type: "osmosis/claim/query-claim-record-request", - value: QueryClaimRecordRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClaimRecordRequestProtoMsg): QueryClaimRecordRequest { - return QueryClaimRecordRequest.decode(message.value); - }, - toProto(message: QueryClaimRecordRequest): Uint8Array { - return QueryClaimRecordRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClaimRecordRequest): QueryClaimRecordRequestProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimRecordRequest", - value: QueryClaimRecordRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClaimRecordResponse(): QueryClaimRecordResponse { - return { - claimRecord: ClaimRecord.fromPartial({}) - }; -} -export const QueryClaimRecordResponse = { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimRecordResponse", - aminoType: "osmosis/claim/query-claim-record-response", - encode(message: QueryClaimRecordResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.claimRecord !== undefined) { - ClaimRecord.encode(message.claimRecord, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClaimRecordResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClaimRecordResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.claimRecord = ClaimRecord.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClaimRecordResponse { - return { - claimRecord: isSet(object.claimRecord) ? ClaimRecord.fromJSON(object.claimRecord) : undefined - }; - }, - toJSON(message: QueryClaimRecordResponse): unknown { - const obj: any = {}; - message.claimRecord !== undefined && (obj.claimRecord = message.claimRecord ? ClaimRecord.toJSON(message.claimRecord) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryClaimRecordResponse { - const message = createBaseQueryClaimRecordResponse(); - message.claimRecord = object.claimRecord !== undefined && object.claimRecord !== null ? ClaimRecord.fromPartial(object.claimRecord) : undefined; - return message; - }, - fromSDK(object: QueryClaimRecordResponseSDKType): QueryClaimRecordResponse { - return { - claimRecord: object.claim_record ? ClaimRecord.fromSDK(object.claim_record) : undefined - }; - }, - toSDK(message: QueryClaimRecordResponse): QueryClaimRecordResponseSDKType { - const obj: any = {}; - message.claimRecord !== undefined && (obj.claim_record = message.claimRecord ? ClaimRecord.toSDK(message.claimRecord) : undefined); - return obj; - }, - fromAmino(object: QueryClaimRecordResponseAmino): QueryClaimRecordResponse { - return { - claimRecord: object?.claim_record ? ClaimRecord.fromAmino(object.claim_record) : undefined - }; - }, - toAmino(message: QueryClaimRecordResponse): QueryClaimRecordResponseAmino { - const obj: any = {}; - obj.claim_record = message.claimRecord ? ClaimRecord.toAmino(message.claimRecord) : undefined; - return obj; - }, - fromAminoMsg(object: QueryClaimRecordResponseAminoMsg): QueryClaimRecordResponse { - return QueryClaimRecordResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClaimRecordResponse): QueryClaimRecordResponseAminoMsg { - return { - type: "osmosis/claim/query-claim-record-response", - value: QueryClaimRecordResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClaimRecordResponseProtoMsg): QueryClaimRecordResponse { - return QueryClaimRecordResponse.decode(message.value); - }, - toProto(message: QueryClaimRecordResponse): Uint8Array { - return QueryClaimRecordResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClaimRecordResponse): QueryClaimRecordResponseProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimRecordResponse", - value: QueryClaimRecordResponse.encode(message).finish() - }; - } -}; -function createBaseQueryClaimableForActionRequest(): QueryClaimableForActionRequest { - return { - address: "", - action: 0 - }; -} -export const QueryClaimableForActionRequest = { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimableForActionRequest", - aminoType: "osmosis/claim/query-claimable-for-action-request", - encode(message: QueryClaimableForActionRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.action !== 0) { - writer.uint32(16).int32(message.action); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClaimableForActionRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClaimableForActionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.action = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClaimableForActionRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - action: isSet(object.action) ? actionFromJSON(object.action) : -1 - }; - }, - toJSON(message: QueryClaimableForActionRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.action !== undefined && (obj.action = actionToJSON(message.action)); - return obj; - }, - fromPartial(object: DeepPartial): QueryClaimableForActionRequest { - const message = createBaseQueryClaimableForActionRequest(); - message.address = object.address ?? ""; - message.action = object.action ?? 0; - return message; - }, - fromSDK(object: QueryClaimableForActionRequestSDKType): QueryClaimableForActionRequest { - return { - address: object?.address, - action: isSet(object.action) ? actionFromJSON(object.action) : -1 - }; - }, - toSDK(message: QueryClaimableForActionRequest): QueryClaimableForActionRequestSDKType { - const obj: any = {}; - obj.address = message.address; - message.action !== undefined && (obj.action = actionToJSON(message.action)); - return obj; - }, - fromAmino(object: QueryClaimableForActionRequestAmino): QueryClaimableForActionRequest { - return { - address: object.address, - action: isSet(object.action) ? actionFromJSON(object.action) : -1 - }; - }, - toAmino(message: QueryClaimableForActionRequest): QueryClaimableForActionRequestAmino { - const obj: any = {}; - obj.address = message.address; - obj.action = message.action; - return obj; - }, - fromAminoMsg(object: QueryClaimableForActionRequestAminoMsg): QueryClaimableForActionRequest { - return QueryClaimableForActionRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryClaimableForActionRequest): QueryClaimableForActionRequestAminoMsg { - return { - type: "osmosis/claim/query-claimable-for-action-request", - value: QueryClaimableForActionRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClaimableForActionRequestProtoMsg): QueryClaimableForActionRequest { - return QueryClaimableForActionRequest.decode(message.value); - }, - toProto(message: QueryClaimableForActionRequest): Uint8Array { - return QueryClaimableForActionRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryClaimableForActionRequest): QueryClaimableForActionRequestProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimableForActionRequest", - value: QueryClaimableForActionRequest.encode(message).finish() - }; - } -}; -function createBaseQueryClaimableForActionResponse(): QueryClaimableForActionResponse { - return { - coins: [] - }; -} -export const QueryClaimableForActionResponse = { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimableForActionResponse", - aminoType: "osmosis/claim/query-claimable-for-action-response", - encode(message: QueryClaimableForActionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryClaimableForActionResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClaimableForActionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryClaimableForActionResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryClaimableForActionResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryClaimableForActionResponse { - const message = createBaseQueryClaimableForActionResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryClaimableForActionResponseSDKType): QueryClaimableForActionResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryClaimableForActionResponse): QueryClaimableForActionResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: QueryClaimableForActionResponseAmino): QueryClaimableForActionResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryClaimableForActionResponse): QueryClaimableForActionResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: QueryClaimableForActionResponseAminoMsg): QueryClaimableForActionResponse { - return QueryClaimableForActionResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryClaimableForActionResponse): QueryClaimableForActionResponseAminoMsg { - return { - type: "osmosis/claim/query-claimable-for-action-response", - value: QueryClaimableForActionResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryClaimableForActionResponseProtoMsg): QueryClaimableForActionResponse { - return QueryClaimableForActionResponse.decode(message.value); - }, - toProto(message: QueryClaimableForActionResponse): Uint8Array { - return QueryClaimableForActionResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryClaimableForActionResponse): QueryClaimableForActionResponseProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryClaimableForActionResponse", - value: QueryClaimableForActionResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalClaimableRequest(): QueryTotalClaimableRequest { - return { - address: "" - }; -} -export const QueryTotalClaimableRequest = { - typeUrl: "/osmosis.claim.v1beta1.QueryTotalClaimableRequest", - aminoType: "osmosis/claim/query-total-claimable-request", - encode(message: QueryTotalClaimableRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalClaimableRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalClaimableRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalClaimableRequest { - return { - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: QueryTotalClaimableRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalClaimableRequest { - const message = createBaseQueryTotalClaimableRequest(); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: QueryTotalClaimableRequestSDKType): QueryTotalClaimableRequest { - return { - address: object?.address - }; - }, - toSDK(message: QueryTotalClaimableRequest): QueryTotalClaimableRequestSDKType { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAmino(object: QueryTotalClaimableRequestAmino): QueryTotalClaimableRequest { - return { - address: object.address - }; - }, - toAmino(message: QueryTotalClaimableRequest): QueryTotalClaimableRequestAmino { - const obj: any = {}; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: QueryTotalClaimableRequestAminoMsg): QueryTotalClaimableRequest { - return QueryTotalClaimableRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalClaimableRequest): QueryTotalClaimableRequestAminoMsg { - return { - type: "osmosis/claim/query-total-claimable-request", - value: QueryTotalClaimableRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalClaimableRequestProtoMsg): QueryTotalClaimableRequest { - return QueryTotalClaimableRequest.decode(message.value); - }, - toProto(message: QueryTotalClaimableRequest): Uint8Array { - return QueryTotalClaimableRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalClaimableRequest): QueryTotalClaimableRequestProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryTotalClaimableRequest", - value: QueryTotalClaimableRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalClaimableResponse(): QueryTotalClaimableResponse { - return { - coins: [] - }; -} -export const QueryTotalClaimableResponse = { - typeUrl: "/osmosis.claim.v1beta1.QueryTotalClaimableResponse", - aminoType: "osmosis/claim/query-total-claimable-response", - encode(message: QueryTotalClaimableResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalClaimableResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalClaimableResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalClaimableResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryTotalClaimableResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalClaimableResponse { - const message = createBaseQueryTotalClaimableResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryTotalClaimableResponseSDKType): QueryTotalClaimableResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryTotalClaimableResponse): QueryTotalClaimableResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: QueryTotalClaimableResponseAmino): QueryTotalClaimableResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryTotalClaimableResponse): QueryTotalClaimableResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: QueryTotalClaimableResponseAminoMsg): QueryTotalClaimableResponse { - return QueryTotalClaimableResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalClaimableResponse): QueryTotalClaimableResponseAminoMsg { - return { - type: "osmosis/claim/query-total-claimable-response", - value: QueryTotalClaimableResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalClaimableResponseProtoMsg): QueryTotalClaimableResponse { - return QueryTotalClaimableResponse.decode(message.value); - }, - toProto(message: QueryTotalClaimableResponse): Uint8Array { - return QueryTotalClaimableResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalClaimableResponse): QueryTotalClaimableResponseProtoMsg { - return { - typeUrl: "/osmosis.claim.v1beta1.QueryTotalClaimableResponse", - value: QueryTotalClaimableResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/client.ts b/examples/interchainjs/src/codegen/osmosis/client.ts deleted file mode 100644 index 48df1de1..00000000 --- a/examples/interchainjs/src/codegen/osmosis/client.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as osmosisGammPoolmodelsBalancerTxTxRegistry from "./gamm/pool-models/balancer/tx/tx.registry"; -import * as osmosisGammPoolmodelsStableswapTxRegistry from "./gamm/pool-models/stableswap/tx.registry"; -import * as osmosisGammV1beta1TxRegistry from "./gamm/v1beta1/tx.registry"; -import * as osmosisIncentivesTxRegistry from "./incentives/tx.registry"; -import * as osmosisLockupTxRegistry from "./lockup/tx.registry"; -import * as osmosisSuperfluidTxRegistry from "./superfluid/tx.registry"; -import * as osmosisTokenfactoryV1beta1TxRegistry from "./tokenfactory/v1beta1/tx.registry"; -import * as osmosisGammPoolmodelsBalancerTxTxAmino from "./gamm/pool-models/balancer/tx/tx.amino"; -import * as osmosisGammPoolmodelsStableswapTxAmino from "./gamm/pool-models/stableswap/tx.amino"; -import * as osmosisGammV1beta1TxAmino from "./gamm/v1beta1/tx.amino"; -import * as osmosisIncentivesTxAmino from "./incentives/tx.amino"; -import * as osmosisLockupTxAmino from "./lockup/tx.amino"; -import * as osmosisSuperfluidTxAmino from "./superfluid/tx.amino"; -import * as osmosisTokenfactoryV1beta1TxAmino from "./tokenfactory/v1beta1/tx.amino"; -export const osmosisAminoConverters = { - ...osmosisGammPoolmodelsBalancerTxTxAmino.AminoConverter, - ...osmosisGammPoolmodelsStableswapTxAmino.AminoConverter, - ...osmosisGammV1beta1TxAmino.AminoConverter, - ...osmosisIncentivesTxAmino.AminoConverter, - ...osmosisLockupTxAmino.AminoConverter, - ...osmosisSuperfluidTxAmino.AminoConverter, - ...osmosisTokenfactoryV1beta1TxAmino.AminoConverter -}; -export const osmosisProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...osmosisGammPoolmodelsBalancerTxTxRegistry.registry, ...osmosisGammPoolmodelsStableswapTxRegistry.registry, ...osmosisGammV1beta1TxRegistry.registry, ...osmosisIncentivesTxRegistry.registry, ...osmosisLockupTxRegistry.registry, ...osmosisSuperfluidTxRegistry.registry, ...osmosisTokenfactoryV1beta1TxRegistry.registry]; -export const getSigningOsmosisClientOptions = ({ - defaultTypes = defaultRegistryTypes -}: { - defaultTypes?: ReadonlyArray<[string, GeneratedType]>; -} = {}): { - registry: Registry; - aminoTypes: AminoTypes; -} => { - const registry = new Registry([...defaultTypes, ...osmosisProtoRegistry]); - const aminoTypes = new AminoTypes({ - ...osmosisAminoConverters - }); - return { - registry, - aminoTypes - }; -}; -export const getSigningOsmosisClient = async ({ - rpcEndpoint, - signer, - defaultTypes = defaultRegistryTypes -}: { - rpcEndpoint: string | HttpEndpoint; - signer: OfflineSigner; - defaultTypes?: ReadonlyArray<[string, GeneratedType]>; -}) => { - const { - registry, - aminoTypes - } = getSigningOsmosisClientOptions({ - defaultTypes - }); - const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry: (registry as any), - aminoTypes - }); - return client; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/epochs/genesis.ts b/examples/interchainjs/src/codegen/osmosis/epochs/genesis.ts deleted file mode 100644 index cf7fbccf..00000000 --- a/examples/interchainjs/src/codegen/osmosis/epochs/genesis.ts +++ /dev/null @@ -1,433 +0,0 @@ -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../helpers"; -/** - * EpochInfo is a struct that describes the data going into - * a timer defined by the x/epochs module. - */ -export interface EpochInfo { - /** identifier is a unique reference to this particular timer. */ - identifier: string; - /** - * start_time is the time at which the timer first ever ticks. - * If start_time is in the future, the epoch will not begin until the start - * time. - */ - startTime: Date | undefined; - /** - * duration is the time in between epoch ticks. - * In order for intended behavior to be met, duration should - * be greater than the chains expected block time. - * Duration must be non-zero. - */ - duration: Duration | undefined; - /** - * current_epoch is the current epoch number, or in other words, - * how many times has the timer 'ticked'. - * The first tick (current_epoch=1) is defined as - * the first block whose blocktime is greater than the EpochInfo start_time. - */ - currentEpoch: bigint; - /** - * current_epoch_start_time describes the start time of the current timer - * interval. The interval is (current_epoch_start_time, - * current_epoch_start_time + duration] When the timer ticks, this is set to - * current_epoch_start_time = last_epoch_start_time + duration only one timer - * tick for a given identifier can occur per block. - * - * NOTE! The current_epoch_start_time may diverge significantly from the - * wall-clock time the epoch began at. Wall-clock time of epoch start may be - * >> current_epoch_start_time. Suppose current_epoch_start_time = 10, - * duration = 5. Suppose the chain goes offline at t=14, and comes back online - * at t=30, and produces blocks at every successive time. (t=31, 32, etc.) - * * The t=30 block will start the epoch for (10, 15] - * * The t=31 block will start the epoch for (15, 20] - * * The t=32 block will start the epoch for (20, 25] - * * The t=33 block will start the epoch for (25, 30] - * * The t=34 block will start the epoch for (30, 35] - * * The **t=36** block will start the epoch for (35, 40] - */ - currentEpochStartTime: Date | undefined; - /** - * epoch_counting_started is a boolean, that indicates whether this - * epoch timer has began yet. - */ - epochCountingStarted: boolean; - /** - * current_epoch_start_height is the block height at which the current epoch - * started. (The block height at which the timer last ticked) - */ - currentEpochStartHeight: bigint; -} -export interface EpochInfoProtoMsg { - typeUrl: "/osmosis.epochs.v1beta1.EpochInfo"; - value: Uint8Array; -} -/** - * EpochInfo is a struct that describes the data going into - * a timer defined by the x/epochs module. - */ -export interface EpochInfoAmino { - /** identifier is a unique reference to this particular timer. */ - identifier: string; - /** - * start_time is the time at which the timer first ever ticks. - * If start_time is in the future, the epoch will not begin until the start - * time. - */ - start_time?: Date | undefined; - /** - * duration is the time in between epoch ticks. - * In order for intended behavior to be met, duration should - * be greater than the chains expected block time. - * Duration must be non-zero. - */ - duration?: DurationAmino | undefined; - /** - * current_epoch is the current epoch number, or in other words, - * how many times has the timer 'ticked'. - * The first tick (current_epoch=1) is defined as - * the first block whose blocktime is greater than the EpochInfo start_time. - */ - current_epoch: string; - /** - * current_epoch_start_time describes the start time of the current timer - * interval. The interval is (current_epoch_start_time, - * current_epoch_start_time + duration] When the timer ticks, this is set to - * current_epoch_start_time = last_epoch_start_time + duration only one timer - * tick for a given identifier can occur per block. - * - * NOTE! The current_epoch_start_time may diverge significantly from the - * wall-clock time the epoch began at. Wall-clock time of epoch start may be - * >> current_epoch_start_time. Suppose current_epoch_start_time = 10, - * duration = 5. Suppose the chain goes offline at t=14, and comes back online - * at t=30, and produces blocks at every successive time. (t=31, 32, etc.) - * * The t=30 block will start the epoch for (10, 15] - * * The t=31 block will start the epoch for (15, 20] - * * The t=32 block will start the epoch for (20, 25] - * * The t=33 block will start the epoch for (25, 30] - * * The t=34 block will start the epoch for (30, 35] - * * The **t=36** block will start the epoch for (35, 40] - */ - current_epoch_start_time?: Date | undefined; - /** - * epoch_counting_started is a boolean, that indicates whether this - * epoch timer has began yet. - */ - epoch_counting_started: boolean; - /** - * current_epoch_start_height is the block height at which the current epoch - * started. (The block height at which the timer last ticked) - */ - current_epoch_start_height: string; -} -export interface EpochInfoAminoMsg { - type: "osmosis/epochs/epoch-info"; - value: EpochInfoAmino; -} -/** - * EpochInfo is a struct that describes the data going into - * a timer defined by the x/epochs module. - */ -export interface EpochInfoSDKType { - identifier: string; - start_time: Date | undefined; - duration: DurationSDKType | undefined; - current_epoch: bigint; - current_epoch_start_time: Date | undefined; - epoch_counting_started: boolean; - current_epoch_start_height: bigint; -} -/** GenesisState defines the epochs module's genesis state. */ -export interface GenesisState { - epochs: EpochInfo[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.epochs.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the epochs module's genesis state. */ -export interface GenesisStateAmino { - epochs: EpochInfoAmino[]; -} -export interface GenesisStateAminoMsg { - type: "osmosis/epochs/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the epochs module's genesis state. */ -export interface GenesisStateSDKType { - epochs: EpochInfoSDKType[]; -} -function createBaseEpochInfo(): EpochInfo { - return { - identifier: "", - startTime: new Date(), - duration: Duration.fromPartial({}), - currentEpoch: BigInt(0), - currentEpochStartTime: new Date(), - epochCountingStarted: false, - currentEpochStartHeight: BigInt(0) - }; -} -export const EpochInfo = { - typeUrl: "/osmosis.epochs.v1beta1.EpochInfo", - aminoType: "osmosis/epochs/epoch-info", - encode(message: EpochInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.identifier !== "") { - writer.uint32(10).string(message.identifier); - } - if (message.startTime !== undefined) { - Timestamp.encode(toTimestamp(message.startTime), writer.uint32(18).fork()).ldelim(); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(26).fork()).ldelim(); - } - if (message.currentEpoch !== BigInt(0)) { - writer.uint32(32).int64(message.currentEpoch); - } - if (message.currentEpochStartTime !== undefined) { - Timestamp.encode(toTimestamp(message.currentEpochStartTime), writer.uint32(42).fork()).ldelim(); - } - if (message.epochCountingStarted === true) { - writer.uint32(48).bool(message.epochCountingStarted); - } - if (message.currentEpochStartHeight !== BigInt(0)) { - writer.uint32(64).int64(message.currentEpochStartHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EpochInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEpochInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.currentEpoch = reader.int64(); - break; - case 5: - message.currentEpochStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.epochCountingStarted = reader.bool(); - break; - case 8: - message.currentEpochStartHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EpochInfo { - return { - identifier: isSet(object.identifier) ? String(object.identifier) : "", - startTime: isSet(object.startTime) ? new Date(object.startTime) : undefined, - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - currentEpoch: isSet(object.currentEpoch) ? BigInt(object.currentEpoch.toString()) : BigInt(0), - currentEpochStartTime: isSet(object.currentEpochStartTime) ? new Date(object.currentEpochStartTime) : undefined, - epochCountingStarted: isSet(object.epochCountingStarted) ? Boolean(object.epochCountingStarted) : false, - currentEpochStartHeight: isSet(object.currentEpochStartHeight) ? BigInt(object.currentEpochStartHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: EpochInfo): unknown { - const obj: any = {}; - message.identifier !== undefined && (obj.identifier = message.identifier); - message.startTime !== undefined && (obj.startTime = message.startTime.toISOString()); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - message.currentEpoch !== undefined && (obj.currentEpoch = (message.currentEpoch || BigInt(0)).toString()); - message.currentEpochStartTime !== undefined && (obj.currentEpochStartTime = message.currentEpochStartTime.toISOString()); - message.epochCountingStarted !== undefined && (obj.epochCountingStarted = message.epochCountingStarted); - message.currentEpochStartHeight !== undefined && (obj.currentEpochStartHeight = (message.currentEpochStartHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EpochInfo { - const message = createBaseEpochInfo(); - message.identifier = object.identifier ?? ""; - message.startTime = object.startTime ?? undefined; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.currentEpoch = object.currentEpoch !== undefined && object.currentEpoch !== null ? BigInt(object.currentEpoch.toString()) : BigInt(0); - message.currentEpochStartTime = object.currentEpochStartTime ?? undefined; - message.epochCountingStarted = object.epochCountingStarted ?? false; - message.currentEpochStartHeight = object.currentEpochStartHeight !== undefined && object.currentEpochStartHeight !== null ? BigInt(object.currentEpochStartHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EpochInfoSDKType): EpochInfo { - return { - identifier: object?.identifier, - startTime: object.start_time ?? undefined, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - currentEpoch: object?.current_epoch, - currentEpochStartTime: object.current_epoch_start_time ?? undefined, - epochCountingStarted: object?.epoch_counting_started, - currentEpochStartHeight: object?.current_epoch_start_height - }; - }, - toSDK(message: EpochInfo): EpochInfoSDKType { - const obj: any = {}; - obj.identifier = message.identifier; - message.startTime !== undefined && (obj.start_time = message.startTime ?? undefined); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - obj.current_epoch = message.currentEpoch; - message.currentEpochStartTime !== undefined && (obj.current_epoch_start_time = message.currentEpochStartTime ?? undefined); - obj.epoch_counting_started = message.epochCountingStarted; - obj.current_epoch_start_height = message.currentEpochStartHeight; - return obj; - }, - fromAmino(object: EpochInfoAmino): EpochInfo { - return { - identifier: object.identifier, - startTime: object.start_time, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - currentEpoch: BigInt(object.current_epoch), - currentEpochStartTime: object.current_epoch_start_time, - epochCountingStarted: object.epoch_counting_started, - currentEpochStartHeight: BigInt(object.current_epoch_start_height) - }; - }, - toAmino(message: EpochInfo): EpochInfoAmino { - const obj: any = {}; - obj.identifier = message.identifier; - obj.start_time = message.startTime; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - obj.current_epoch = message.currentEpoch ? message.currentEpoch.toString() : undefined; - obj.current_epoch_start_time = message.currentEpochStartTime; - obj.epoch_counting_started = message.epochCountingStarted; - obj.current_epoch_start_height = message.currentEpochStartHeight ? message.currentEpochStartHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EpochInfoAminoMsg): EpochInfo { - return EpochInfo.fromAmino(object.value); - }, - toAminoMsg(message: EpochInfo): EpochInfoAminoMsg { - return { - type: "osmosis/epochs/epoch-info", - value: EpochInfo.toAmino(message) - }; - }, - fromProtoMsg(message: EpochInfoProtoMsg): EpochInfo { - return EpochInfo.decode(message.value); - }, - toProto(message: EpochInfo): Uint8Array { - return EpochInfo.encode(message).finish(); - }, - toProtoMsg(message: EpochInfo): EpochInfoProtoMsg { - return { - typeUrl: "/osmosis.epochs.v1beta1.EpochInfo", - value: EpochInfo.encode(message).finish() - }; - } -}; -function createBaseGenesisState(): GenesisState { - return { - epochs: [] - }; -} -export const GenesisState = { - typeUrl: "/osmosis.epochs.v1beta1.GenesisState", - aminoType: "osmosis/epochs/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.epochs) { - EpochInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epochs.push(EpochInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - epochs: Array.isArray(object?.epochs) ? object.epochs.map((e: any) => EpochInfo.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.epochs) { - obj.epochs = message.epochs.map(e => e ? EpochInfo.toJSON(e) : undefined); - } else { - obj.epochs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.epochs = object.epochs?.map(e => EpochInfo.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - epochs: Array.isArray(object?.epochs) ? object.epochs.map((e: any) => EpochInfo.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.epochs) { - obj.epochs = message.epochs.map(e => e ? EpochInfo.toSDK(e) : undefined); - } else { - obj.epochs = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - epochs: Array.isArray(object?.epochs) ? object.epochs.map((e: any) => EpochInfo.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.epochs) { - obj.epochs = message.epochs.map(e => e ? EpochInfo.toAmino(e) : undefined); - } else { - obj.epochs = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/epochs/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.epochs.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/epochs/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/epochs/query.rpc.Query.ts deleted file mode 100644 index f9598d98..00000000 --- a/examples/interchainjs/src/codegen/osmosis/epochs/query.rpc.Query.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../mobx"; -import { QueryEpochsInfoRequest, QueryEpochsInfoResponse, QueryCurrentEpochRequest, QueryCurrentEpochResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** EpochInfos provide running epochInfos */ - epochInfos(request?: QueryEpochsInfoRequest): Promise; - /** CurrentEpoch provide current epoch of specified identifier */ - currentEpoch(request: QueryCurrentEpochRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.epochInfos = this.epochInfos.bind(this); - this.currentEpoch = this.currentEpoch.bind(this); - } - epochInfos(request: QueryEpochsInfoRequest = {}): Promise { - const data = QueryEpochsInfoRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.epochs.v1beta1.Query", "EpochInfos", data); - return promise.then(data => QueryEpochsInfoResponse.decode(new BinaryReader(data))); - } - currentEpoch(request: QueryCurrentEpochRequest): Promise { - const data = QueryCurrentEpochRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.epochs.v1beta1.Query", "CurrentEpoch", data); - return promise.then(data => QueryCurrentEpochResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - epochInfos(request?: QueryEpochsInfoRequest): Promise { - return queryService.epochInfos(request); - }, - currentEpoch(request: QueryCurrentEpochRequest): Promise { - return queryService.currentEpoch(request); - } - }; -}; -export interface UseEpochInfosQuery extends ReactQueryParams { - request?: QueryEpochsInfoRequest; -} -export interface UseCurrentEpochQuery extends ReactQueryParams { - request: QueryCurrentEpochRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useEpochInfos = ({ - request, - options - }: UseEpochInfosQuery) => { - return useQuery(["epochInfosQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.epochInfos(request); - }, options); - }; - const useCurrentEpoch = ({ - request, - options - }: UseCurrentEpochQuery) => { - return useQuery(["currentEpochQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.currentEpoch(request); - }, options); - }; - return { - /** EpochInfos provide running epochInfos */useEpochInfos, - /** CurrentEpoch provide current epoch of specified identifier */useCurrentEpoch - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryEpochInfosStore { - store = new QueryStore(queryService?.epochInfos); - epochInfos(request: QueryEpochsInfoRequest) { - return this.store.getData(request); - } - } - class QueryCurrentEpochStore { - store = new QueryStore(queryService?.currentEpoch); - currentEpoch(request: QueryCurrentEpochRequest) { - return this.store.getData(request); - } - } - return { - /** EpochInfos provide running epochInfos */QueryEpochInfosStore, - /** CurrentEpoch provide current epoch of specified identifier */QueryCurrentEpochStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/epochs/query.ts b/examples/interchainjs/src/codegen/osmosis/epochs/query.ts deleted file mode 100644 index 8b1f52e8..00000000 --- a/examples/interchainjs/src/codegen/osmosis/epochs/query.ts +++ /dev/null @@ -1,411 +0,0 @@ -import { EpochInfo, EpochInfoAmino, EpochInfoSDKType } from "./genesis"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, isSet } from "../../helpers"; -export interface QueryEpochsInfoRequest {} -export interface QueryEpochsInfoRequestProtoMsg { - typeUrl: "/osmosis.epochs.v1beta1.QueryEpochsInfoRequest"; - value: Uint8Array; -} -export interface QueryEpochsInfoRequestAmino {} -export interface QueryEpochsInfoRequestAminoMsg { - type: "osmosis/epochs/query-epochs-info-request"; - value: QueryEpochsInfoRequestAmino; -} -export interface QueryEpochsInfoRequestSDKType {} -export interface QueryEpochsInfoResponse { - epochs: EpochInfo[]; -} -export interface QueryEpochsInfoResponseProtoMsg { - typeUrl: "/osmosis.epochs.v1beta1.QueryEpochsInfoResponse"; - value: Uint8Array; -} -export interface QueryEpochsInfoResponseAmino { - epochs: EpochInfoAmino[]; -} -export interface QueryEpochsInfoResponseAminoMsg { - type: "osmosis/epochs/query-epochs-info-response"; - value: QueryEpochsInfoResponseAmino; -} -export interface QueryEpochsInfoResponseSDKType { - epochs: EpochInfoSDKType[]; -} -export interface QueryCurrentEpochRequest { - identifier: string; -} -export interface QueryCurrentEpochRequestProtoMsg { - typeUrl: "/osmosis.epochs.v1beta1.QueryCurrentEpochRequest"; - value: Uint8Array; -} -export interface QueryCurrentEpochRequestAmino { - identifier: string; -} -export interface QueryCurrentEpochRequestAminoMsg { - type: "osmosis/epochs/query-current-epoch-request"; - value: QueryCurrentEpochRequestAmino; -} -export interface QueryCurrentEpochRequestSDKType { - identifier: string; -} -export interface QueryCurrentEpochResponse { - currentEpoch: bigint; -} -export interface QueryCurrentEpochResponseProtoMsg { - typeUrl: "/osmosis.epochs.v1beta1.QueryCurrentEpochResponse"; - value: Uint8Array; -} -export interface QueryCurrentEpochResponseAmino { - current_epoch: string; -} -export interface QueryCurrentEpochResponseAminoMsg { - type: "osmosis/epochs/query-current-epoch-response"; - value: QueryCurrentEpochResponseAmino; -} -export interface QueryCurrentEpochResponseSDKType { - current_epoch: bigint; -} -function createBaseQueryEpochsInfoRequest(): QueryEpochsInfoRequest { - return {}; -} -export const QueryEpochsInfoRequest = { - typeUrl: "/osmosis.epochs.v1beta1.QueryEpochsInfoRequest", - aminoType: "osmosis/epochs/query-epochs-info-request", - encode(_: QueryEpochsInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryEpochsInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryEpochsInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryEpochsInfoRequest { - return {}; - }, - toJSON(_: QueryEpochsInfoRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryEpochsInfoRequest { - const message = createBaseQueryEpochsInfoRequest(); - return message; - }, - fromSDK(_: QueryEpochsInfoRequestSDKType): QueryEpochsInfoRequest { - return {}; - }, - toSDK(_: QueryEpochsInfoRequest): QueryEpochsInfoRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryEpochsInfoRequestAmino): QueryEpochsInfoRequest { - return {}; - }, - toAmino(_: QueryEpochsInfoRequest): QueryEpochsInfoRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryEpochsInfoRequestAminoMsg): QueryEpochsInfoRequest { - return QueryEpochsInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryEpochsInfoRequest): QueryEpochsInfoRequestAminoMsg { - return { - type: "osmosis/epochs/query-epochs-info-request", - value: QueryEpochsInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryEpochsInfoRequestProtoMsg): QueryEpochsInfoRequest { - return QueryEpochsInfoRequest.decode(message.value); - }, - toProto(message: QueryEpochsInfoRequest): Uint8Array { - return QueryEpochsInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryEpochsInfoRequest): QueryEpochsInfoRequestProtoMsg { - return { - typeUrl: "/osmosis.epochs.v1beta1.QueryEpochsInfoRequest", - value: QueryEpochsInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQueryEpochsInfoResponse(): QueryEpochsInfoResponse { - return { - epochs: [] - }; -} -export const QueryEpochsInfoResponse = { - typeUrl: "/osmosis.epochs.v1beta1.QueryEpochsInfoResponse", - aminoType: "osmosis/epochs/query-epochs-info-response", - encode(message: QueryEpochsInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.epochs) { - EpochInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryEpochsInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryEpochsInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epochs.push(EpochInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryEpochsInfoResponse { - return { - epochs: Array.isArray(object?.epochs) ? object.epochs.map((e: any) => EpochInfo.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryEpochsInfoResponse): unknown { - const obj: any = {}; - if (message.epochs) { - obj.epochs = message.epochs.map(e => e ? EpochInfo.toJSON(e) : undefined); - } else { - obj.epochs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryEpochsInfoResponse { - const message = createBaseQueryEpochsInfoResponse(); - message.epochs = object.epochs?.map(e => EpochInfo.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryEpochsInfoResponseSDKType): QueryEpochsInfoResponse { - return { - epochs: Array.isArray(object?.epochs) ? object.epochs.map((e: any) => EpochInfo.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryEpochsInfoResponse): QueryEpochsInfoResponseSDKType { - const obj: any = {}; - if (message.epochs) { - obj.epochs = message.epochs.map(e => e ? EpochInfo.toSDK(e) : undefined); - } else { - obj.epochs = []; - } - return obj; - }, - fromAmino(object: QueryEpochsInfoResponseAmino): QueryEpochsInfoResponse { - return { - epochs: Array.isArray(object?.epochs) ? object.epochs.map((e: any) => EpochInfo.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryEpochsInfoResponse): QueryEpochsInfoResponseAmino { - const obj: any = {}; - if (message.epochs) { - obj.epochs = message.epochs.map(e => e ? EpochInfo.toAmino(e) : undefined); - } else { - obj.epochs = []; - } - return obj; - }, - fromAminoMsg(object: QueryEpochsInfoResponseAminoMsg): QueryEpochsInfoResponse { - return QueryEpochsInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryEpochsInfoResponse): QueryEpochsInfoResponseAminoMsg { - return { - type: "osmosis/epochs/query-epochs-info-response", - value: QueryEpochsInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryEpochsInfoResponseProtoMsg): QueryEpochsInfoResponse { - return QueryEpochsInfoResponse.decode(message.value); - }, - toProto(message: QueryEpochsInfoResponse): Uint8Array { - return QueryEpochsInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryEpochsInfoResponse): QueryEpochsInfoResponseProtoMsg { - return { - typeUrl: "/osmosis.epochs.v1beta1.QueryEpochsInfoResponse", - value: QueryEpochsInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCurrentEpochRequest(): QueryCurrentEpochRequest { - return { - identifier: "" - }; -} -export const QueryCurrentEpochRequest = { - typeUrl: "/osmosis.epochs.v1beta1.QueryCurrentEpochRequest", - aminoType: "osmosis/epochs/query-current-epoch-request", - encode(message: QueryCurrentEpochRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.identifier !== "") { - writer.uint32(10).string(message.identifier); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCurrentEpochRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCurrentEpochRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCurrentEpochRequest { - return { - identifier: isSet(object.identifier) ? String(object.identifier) : "" - }; - }, - toJSON(message: QueryCurrentEpochRequest): unknown { - const obj: any = {}; - message.identifier !== undefined && (obj.identifier = message.identifier); - return obj; - }, - fromPartial(object: DeepPartial): QueryCurrentEpochRequest { - const message = createBaseQueryCurrentEpochRequest(); - message.identifier = object.identifier ?? ""; - return message; - }, - fromSDK(object: QueryCurrentEpochRequestSDKType): QueryCurrentEpochRequest { - return { - identifier: object?.identifier - }; - }, - toSDK(message: QueryCurrentEpochRequest): QueryCurrentEpochRequestSDKType { - const obj: any = {}; - obj.identifier = message.identifier; - return obj; - }, - fromAmino(object: QueryCurrentEpochRequestAmino): QueryCurrentEpochRequest { - return { - identifier: object.identifier - }; - }, - toAmino(message: QueryCurrentEpochRequest): QueryCurrentEpochRequestAmino { - const obj: any = {}; - obj.identifier = message.identifier; - return obj; - }, - fromAminoMsg(object: QueryCurrentEpochRequestAminoMsg): QueryCurrentEpochRequest { - return QueryCurrentEpochRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCurrentEpochRequest): QueryCurrentEpochRequestAminoMsg { - return { - type: "osmosis/epochs/query-current-epoch-request", - value: QueryCurrentEpochRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCurrentEpochRequestProtoMsg): QueryCurrentEpochRequest { - return QueryCurrentEpochRequest.decode(message.value); - }, - toProto(message: QueryCurrentEpochRequest): Uint8Array { - return QueryCurrentEpochRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCurrentEpochRequest): QueryCurrentEpochRequestProtoMsg { - return { - typeUrl: "/osmosis.epochs.v1beta1.QueryCurrentEpochRequest", - value: QueryCurrentEpochRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCurrentEpochResponse(): QueryCurrentEpochResponse { - return { - currentEpoch: BigInt(0) - }; -} -export const QueryCurrentEpochResponse = { - typeUrl: "/osmosis.epochs.v1beta1.QueryCurrentEpochResponse", - aminoType: "osmosis/epochs/query-current-epoch-response", - encode(message: QueryCurrentEpochResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.currentEpoch !== BigInt(0)) { - writer.uint32(8).int64(message.currentEpoch); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCurrentEpochResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCurrentEpochResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.currentEpoch = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCurrentEpochResponse { - return { - currentEpoch: isSet(object.currentEpoch) ? BigInt(object.currentEpoch.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryCurrentEpochResponse): unknown { - const obj: any = {}; - message.currentEpoch !== undefined && (obj.currentEpoch = (message.currentEpoch || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryCurrentEpochResponse { - const message = createBaseQueryCurrentEpochResponse(); - message.currentEpoch = object.currentEpoch !== undefined && object.currentEpoch !== null ? BigInt(object.currentEpoch.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryCurrentEpochResponseSDKType): QueryCurrentEpochResponse { - return { - currentEpoch: object?.current_epoch - }; - }, - toSDK(message: QueryCurrentEpochResponse): QueryCurrentEpochResponseSDKType { - const obj: any = {}; - obj.current_epoch = message.currentEpoch; - return obj; - }, - fromAmino(object: QueryCurrentEpochResponseAmino): QueryCurrentEpochResponse { - return { - currentEpoch: BigInt(object.current_epoch) - }; - }, - toAmino(message: QueryCurrentEpochResponse): QueryCurrentEpochResponseAmino { - const obj: any = {}; - obj.current_epoch = message.currentEpoch ? message.currentEpoch.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryCurrentEpochResponseAminoMsg): QueryCurrentEpochResponse { - return QueryCurrentEpochResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCurrentEpochResponse): QueryCurrentEpochResponseAminoMsg { - return { - type: "osmosis/epochs/query-current-epoch-response", - value: QueryCurrentEpochResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCurrentEpochResponseProtoMsg): QueryCurrentEpochResponse { - return QueryCurrentEpochResponse.decode(message.value); - }, - toProto(message: QueryCurrentEpochResponse): Uint8Array { - return QueryCurrentEpochResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCurrentEpochResponse): QueryCurrentEpochResponseProtoMsg { - return { - typeUrl: "/osmosis.epochs.v1beta1.QueryCurrentEpochResponse", - value: QueryCurrentEpochResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts deleted file mode 100644 index 910a90e2..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/balancerPool.ts +++ /dev/null @@ -1,823 +0,0 @@ -import { Timestamp } from "../../../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../../../google/protobuf/duration"; -import { Coin, CoinAmino, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../../helpers"; -import { Decimal } from "@cosmjs/math"; -/** - * Parameters for changing the weights in a balancer pool smoothly from - * a start weight and end weight over a period of time. - * Currently, the only smooth change supported is linear changing between - * the two weights, but more types may be added in the future. - * When these parameters are set, the weight w(t) for pool time `t` is the - * following: - * t <= start_time: w(t) = initial_pool_weights - * start_time < t <= start_time + duration: - * w(t) = initial_pool_weights + (t - start_time) * - * (target_pool_weights - initial_pool_weights) / (duration) - * t > start_time + duration: w(t) = target_pool_weights - */ -export interface SmoothWeightChangeParams { - /** - * The start time for beginning the weight change. - * If a parameter change / pool instantiation leaves this blank, - * it should be generated by the state_machine as the current time. - */ - startTime: Date | undefined; - /** Duration for the weights to change over */ - duration: Duration | undefined; - /** - * The initial pool weights. These are copied from the pool's settings - * at the time of weight change instantiation. - * The amount PoolAsset.token.amount field is ignored if present, - * future type refactorings should just have a type with the denom & weight - * here. - */ - initialPoolWeights: PoolAsset[]; - /** - * The target pool weights. The pool weights will change linearly with respect - * to time between start_time, and start_time + duration. The amount - * PoolAsset.token.amount field is ignored if present, future type - * refactorings should just have a type with the denom & weight here. - */ - targetPoolWeights: PoolAsset[]; -} -export interface SmoothWeightChangeParamsProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.SmoothWeightChangeParams"; - value: Uint8Array; -} -/** - * Parameters for changing the weights in a balancer pool smoothly from - * a start weight and end weight over a period of time. - * Currently, the only smooth change supported is linear changing between - * the two weights, but more types may be added in the future. - * When these parameters are set, the weight w(t) for pool time `t` is the - * following: - * t <= start_time: w(t) = initial_pool_weights - * start_time < t <= start_time + duration: - * w(t) = initial_pool_weights + (t - start_time) * - * (target_pool_weights - initial_pool_weights) / (duration) - * t > start_time + duration: w(t) = target_pool_weights - */ -export interface SmoothWeightChangeParamsAmino { - /** - * The start time for beginning the weight change. - * If a parameter change / pool instantiation leaves this blank, - * it should be generated by the state_machine as the current time. - */ - start_time?: Date | undefined; - /** Duration for the weights to change over */ - duration?: DurationAmino | undefined; - /** - * The initial pool weights. These are copied from the pool's settings - * at the time of weight change instantiation. - * The amount PoolAsset.token.amount field is ignored if present, - * future type refactorings should just have a type with the denom & weight - * here. - */ - initial_pool_weights: PoolAssetAmino[]; - /** - * The target pool weights. The pool weights will change linearly with respect - * to time between start_time, and start_time + duration. The amount - * PoolAsset.token.amount field is ignored if present, future type - * refactorings should just have a type with the denom & weight here. - */ - target_pool_weights: PoolAssetAmino[]; -} -export interface SmoothWeightChangeParamsAminoMsg { - type: "osmosis/gamm/smooth-weight-change-params"; - value: SmoothWeightChangeParamsAmino; -} -/** - * Parameters for changing the weights in a balancer pool smoothly from - * a start weight and end weight over a period of time. - * Currently, the only smooth change supported is linear changing between - * the two weights, but more types may be added in the future. - * When these parameters are set, the weight w(t) for pool time `t` is the - * following: - * t <= start_time: w(t) = initial_pool_weights - * start_time < t <= start_time + duration: - * w(t) = initial_pool_weights + (t - start_time) * - * (target_pool_weights - initial_pool_weights) / (duration) - * t > start_time + duration: w(t) = target_pool_weights - */ -export interface SmoothWeightChangeParamsSDKType { - start_time: Date | undefined; - duration: DurationSDKType | undefined; - initial_pool_weights: PoolAssetSDKType[]; - target_pool_weights: PoolAssetSDKType[]; -} -/** - * PoolParams defined the parameters that will be managed by the pool - * governance in the future. This params are not managed by the chain - * governance. Instead they will be managed by the token holders of the pool. - * The pool's token holders are specified in future_pool_governor. - */ -export interface PoolParams { - swapFee: string; - exitFee: string; - smoothWeightChangeParams?: SmoothWeightChangeParams | undefined; -} -export interface PoolParamsProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.PoolParams"; - value: Uint8Array; -} -/** - * PoolParams defined the parameters that will be managed by the pool - * governance in the future. This params are not managed by the chain - * governance. Instead they will be managed by the token holders of the pool. - * The pool's token holders are specified in future_pool_governor. - */ -export interface PoolParamsAmino { - swap_fee: string; - exit_fee: string; - smooth_weight_change_params?: SmoothWeightChangeParamsAmino | undefined; -} -export interface PoolParamsAminoMsg { - type: "osmosis/gamm/pool-params"; - value: PoolParamsAmino; -} -/** - * PoolParams defined the parameters that will be managed by the pool - * governance in the future. This params are not managed by the chain - * governance. Instead they will be managed by the token holders of the pool. - * The pool's token holders are specified in future_pool_governor. - */ -export interface PoolParamsSDKType { - swap_fee: string; - exit_fee: string; - smooth_weight_change_params?: SmoothWeightChangeParamsSDKType | undefined; -} -/** - * Pool asset is an internal struct that combines the amount of the - * token in the pool, and its balancer weight. - * This is an awkward packaging of data, - * and should be revisited in a future state migration. - */ -export interface PoolAsset { - /** - * Coins we are talking about, - * the denomination must be unique amongst all PoolAssets for this pool. - */ - token: Coin | undefined; - /** Weight that is not normalized. This weight must be less than 2^50 */ - weight: string; -} -export interface PoolAssetProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.PoolAsset"; - value: Uint8Array; -} -/** - * Pool asset is an internal struct that combines the amount of the - * token in the pool, and its balancer weight. - * This is an awkward packaging of data, - * and should be revisited in a future state migration. - */ -export interface PoolAssetAmino { - /** - * Coins we are talking about, - * the denomination must be unique amongst all PoolAssets for this pool. - */ - token?: CoinAmino | undefined; - /** Weight that is not normalized. This weight must be less than 2^50 */ - weight: string; -} -export interface PoolAssetAminoMsg { - type: "osmosis/gamm/pool-asset"; - value: PoolAssetAmino; -} -/** - * Pool asset is an internal struct that combines the amount of the - * token in the pool, and its balancer weight. - * This is an awkward packaging of data, - * and should be revisited in a future state migration. - */ -export interface PoolAssetSDKType { - token: CoinSDKType | undefined; - weight: string; -} -export interface Pool { - address: string; - id: bigint; - poolParams: PoolParams | undefined; - /** - * This string specifies who will govern the pool in the future. - * Valid forms of this are: - * {token name},{duration} - * {duration} - * where {token name} if specified is the token which determines the - * governor, and if not specified is the LP token for this pool.duration is - * a time specified as 0w,1w,2w, etc. which specifies how long the token - * would need to be locked up to count in governance. 0w means no lockup. - * TODO: Further improve these docs - */ - futurePoolGovernor: string; - /** sum of all LP tokens sent out */ - totalShares: Coin | undefined; - /** - * These are assumed to be sorted by denomiation. - * They contain the pool asset and the information about the weight - */ - poolAssets: PoolAsset[]; - /** sum of all non-normalized pool weights */ - totalWeight: string; -} -export interface PoolProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.Pool"; - value: Uint8Array; -} -export interface PoolAmino { - address: string; - id: string; - pool_params?: PoolParamsAmino | undefined; - /** - * This string specifies who will govern the pool in the future. - * Valid forms of this are: - * {token name},{duration} - * {duration} - * where {token name} if specified is the token which determines the - * governor, and if not specified is the LP token for this pool.duration is - * a time specified as 0w,1w,2w, etc. which specifies how long the token - * would need to be locked up to count in governance. 0w means no lockup. - * TODO: Further improve these docs - */ - future_pool_governor: string; - /** sum of all LP tokens sent out */ - total_shares?: CoinAmino | undefined; - /** - * These are assumed to be sorted by denomiation. - * They contain the pool asset and the information about the weight - */ - pool_assets: PoolAssetAmino[]; - /** sum of all non-normalized pool weights */ - total_weight: string; -} -export interface PoolAminoMsg { - type: "osmosis/gamm/pool"; - value: PoolAmino; -} -export interface PoolSDKType { - address: string; - id: bigint; - pool_params: PoolParamsSDKType | undefined; - future_pool_governor: string; - total_shares: CoinSDKType | undefined; - pool_assets: PoolAssetSDKType[]; - total_weight: string; -} -function createBaseSmoothWeightChangeParams(): SmoothWeightChangeParams { - return { - startTime: new Date(), - duration: Duration.fromPartial({}), - initialPoolWeights: [], - targetPoolWeights: [] - }; -} -export const SmoothWeightChangeParams = { - typeUrl: "/osmosis.gamm.v1beta1.SmoothWeightChangeParams", - aminoType: "osmosis/gamm/smooth-weight-change-params", - encode(message: SmoothWeightChangeParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.startTime !== undefined) { - Timestamp.encode(toTimestamp(message.startTime), writer.uint32(10).fork()).ldelim(); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.initialPoolWeights) { - PoolAsset.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.targetPoolWeights) { - PoolAsset.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SmoothWeightChangeParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSmoothWeightChangeParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.initialPoolWeights.push(PoolAsset.decode(reader, reader.uint32())); - break; - case 4: - message.targetPoolWeights.push(PoolAsset.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SmoothWeightChangeParams { - return { - startTime: isSet(object.startTime) ? new Date(object.startTime) : undefined, - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - initialPoolWeights: Array.isArray(object?.initialPoolWeights) ? object.initialPoolWeights.map((e: any) => PoolAsset.fromJSON(e)) : [], - targetPoolWeights: Array.isArray(object?.targetPoolWeights) ? object.targetPoolWeights.map((e: any) => PoolAsset.fromJSON(e)) : [] - }; - }, - toJSON(message: SmoothWeightChangeParams): unknown { - const obj: any = {}; - message.startTime !== undefined && (obj.startTime = message.startTime.toISOString()); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - if (message.initialPoolWeights) { - obj.initialPoolWeights = message.initialPoolWeights.map(e => e ? PoolAsset.toJSON(e) : undefined); - } else { - obj.initialPoolWeights = []; - } - if (message.targetPoolWeights) { - obj.targetPoolWeights = message.targetPoolWeights.map(e => e ? PoolAsset.toJSON(e) : undefined); - } else { - obj.targetPoolWeights = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SmoothWeightChangeParams { - const message = createBaseSmoothWeightChangeParams(); - message.startTime = object.startTime ?? undefined; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.initialPoolWeights = object.initialPoolWeights?.map(e => PoolAsset.fromPartial(e)) || []; - message.targetPoolWeights = object.targetPoolWeights?.map(e => PoolAsset.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SmoothWeightChangeParamsSDKType): SmoothWeightChangeParams { - return { - startTime: object.start_time ?? undefined, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - initialPoolWeights: Array.isArray(object?.initial_pool_weights) ? object.initial_pool_weights.map((e: any) => PoolAsset.fromSDK(e)) : [], - targetPoolWeights: Array.isArray(object?.target_pool_weights) ? object.target_pool_weights.map((e: any) => PoolAsset.fromSDK(e)) : [] - }; - }, - toSDK(message: SmoothWeightChangeParams): SmoothWeightChangeParamsSDKType { - const obj: any = {}; - message.startTime !== undefined && (obj.start_time = message.startTime ?? undefined); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - if (message.initialPoolWeights) { - obj.initial_pool_weights = message.initialPoolWeights.map(e => e ? PoolAsset.toSDK(e) : undefined); - } else { - obj.initial_pool_weights = []; - } - if (message.targetPoolWeights) { - obj.target_pool_weights = message.targetPoolWeights.map(e => e ? PoolAsset.toSDK(e) : undefined); - } else { - obj.target_pool_weights = []; - } - return obj; - }, - fromAmino(object: SmoothWeightChangeParamsAmino): SmoothWeightChangeParams { - return { - startTime: object.start_time, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - initialPoolWeights: Array.isArray(object?.initial_pool_weights) ? object.initial_pool_weights.map((e: any) => PoolAsset.fromAmino(e)) : [], - targetPoolWeights: Array.isArray(object?.target_pool_weights) ? object.target_pool_weights.map((e: any) => PoolAsset.fromAmino(e)) : [] - }; - }, - toAmino(message: SmoothWeightChangeParams): SmoothWeightChangeParamsAmino { - const obj: any = {}; - obj.start_time = message.startTime; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - if (message.initialPoolWeights) { - obj.initial_pool_weights = message.initialPoolWeights.map(e => e ? PoolAsset.toAmino(e) : undefined); - } else { - obj.initial_pool_weights = []; - } - if (message.targetPoolWeights) { - obj.target_pool_weights = message.targetPoolWeights.map(e => e ? PoolAsset.toAmino(e) : undefined); - } else { - obj.target_pool_weights = []; - } - return obj; - }, - fromAminoMsg(object: SmoothWeightChangeParamsAminoMsg): SmoothWeightChangeParams { - return SmoothWeightChangeParams.fromAmino(object.value); - }, - toAminoMsg(message: SmoothWeightChangeParams): SmoothWeightChangeParamsAminoMsg { - return { - type: "osmosis/gamm/smooth-weight-change-params", - value: SmoothWeightChangeParams.toAmino(message) - }; - }, - fromProtoMsg(message: SmoothWeightChangeParamsProtoMsg): SmoothWeightChangeParams { - return SmoothWeightChangeParams.decode(message.value); - }, - toProto(message: SmoothWeightChangeParams): Uint8Array { - return SmoothWeightChangeParams.encode(message).finish(); - }, - toProtoMsg(message: SmoothWeightChangeParams): SmoothWeightChangeParamsProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.SmoothWeightChangeParams", - value: SmoothWeightChangeParams.encode(message).finish() - }; - } -}; -function createBasePoolParams(): PoolParams { - return { - swapFee: "", - exitFee: "", - smoothWeightChangeParams: undefined - }; -} -export const PoolParams = { - typeUrl: "/osmosis.gamm.v1beta1.PoolParams", - aminoType: "osmosis/gamm/pool-params", - encode(message: PoolParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.swapFee !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.swapFee, 18).atomics); - } - if (message.exitFee !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.exitFee, 18).atomics); - } - if (message.smoothWeightChangeParams !== undefined) { - SmoothWeightChangeParams.encode(message.smoothWeightChangeParams, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PoolParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePoolParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.swapFee = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 2: - message.exitFee = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.smoothWeightChangeParams = SmoothWeightChangeParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PoolParams { - return { - swapFee: isSet(object.swapFee) ? String(object.swapFee) : "", - exitFee: isSet(object.exitFee) ? String(object.exitFee) : "", - smoothWeightChangeParams: isSet(object.smoothWeightChangeParams) ? SmoothWeightChangeParams.fromJSON(object.smoothWeightChangeParams) : undefined - }; - }, - toJSON(message: PoolParams): unknown { - const obj: any = {}; - message.swapFee !== undefined && (obj.swapFee = message.swapFee); - message.exitFee !== undefined && (obj.exitFee = message.exitFee); - message.smoothWeightChangeParams !== undefined && (obj.smoothWeightChangeParams = message.smoothWeightChangeParams ? SmoothWeightChangeParams.toJSON(message.smoothWeightChangeParams) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): PoolParams { - const message = createBasePoolParams(); - message.swapFee = object.swapFee ?? ""; - message.exitFee = object.exitFee ?? ""; - message.smoothWeightChangeParams = object.smoothWeightChangeParams !== undefined && object.smoothWeightChangeParams !== null ? SmoothWeightChangeParams.fromPartial(object.smoothWeightChangeParams) : undefined; - return message; - }, - fromSDK(object: PoolParamsSDKType): PoolParams { - return { - swapFee: object?.swap_fee, - exitFee: object?.exit_fee, - smoothWeightChangeParams: object.smooth_weight_change_params ? SmoothWeightChangeParams.fromSDK(object.smooth_weight_change_params) : undefined - }; - }, - toSDK(message: PoolParams): PoolParamsSDKType { - const obj: any = {}; - obj.swap_fee = message.swapFee; - obj.exit_fee = message.exitFee; - message.smoothWeightChangeParams !== undefined && (obj.smooth_weight_change_params = message.smoothWeightChangeParams ? SmoothWeightChangeParams.toSDK(message.smoothWeightChangeParams) : undefined); - return obj; - }, - fromAmino(object: PoolParamsAmino): PoolParams { - return { - swapFee: object.swap_fee, - exitFee: object.exit_fee, - smoothWeightChangeParams: object?.smooth_weight_change_params ? SmoothWeightChangeParams.fromAmino(object.smooth_weight_change_params) : undefined - }; - }, - toAmino(message: PoolParams): PoolParamsAmino { - const obj: any = {}; - obj.swap_fee = message.swapFee; - obj.exit_fee = message.exitFee; - obj.smooth_weight_change_params = message.smoothWeightChangeParams ? SmoothWeightChangeParams.toAmino(message.smoothWeightChangeParams) : undefined; - return obj; - }, - fromAminoMsg(object: PoolParamsAminoMsg): PoolParams { - return PoolParams.fromAmino(object.value); - }, - toAminoMsg(message: PoolParams): PoolParamsAminoMsg { - return { - type: "osmosis/gamm/pool-params", - value: PoolParams.toAmino(message) - }; - }, - fromProtoMsg(message: PoolParamsProtoMsg): PoolParams { - return PoolParams.decode(message.value); - }, - toProto(message: PoolParams): Uint8Array { - return PoolParams.encode(message).finish(); - }, - toProtoMsg(message: PoolParams): PoolParamsProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.PoolParams", - value: PoolParams.encode(message).finish() - }; - } -}; -function createBasePoolAsset(): PoolAsset { - return { - token: Coin.fromPartial({}), - weight: "" - }; -} -export const PoolAsset = { - typeUrl: "/osmosis.gamm.v1beta1.PoolAsset", - aminoType: "osmosis/gamm/pool-asset", - encode(message: PoolAsset, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.token !== undefined) { - Coin.encode(message.token, writer.uint32(10).fork()).ldelim(); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PoolAsset { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePoolAsset(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.token = Coin.decode(reader, reader.uint32()); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PoolAsset { - return { - token: isSet(object.token) ? Coin.fromJSON(object.token) : undefined, - weight: isSet(object.weight) ? String(object.weight) : "" - }; - }, - toJSON(message: PoolAsset): unknown { - const obj: any = {}; - message.token !== undefined && (obj.token = message.token ? Coin.toJSON(message.token) : undefined); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - fromPartial(object: DeepPartial): PoolAsset { - const message = createBasePoolAsset(); - message.token = object.token !== undefined && object.token !== null ? Coin.fromPartial(object.token) : undefined; - message.weight = object.weight ?? ""; - return message; - }, - fromSDK(object: PoolAssetSDKType): PoolAsset { - return { - token: object.token ? Coin.fromSDK(object.token) : undefined, - weight: object?.weight - }; - }, - toSDK(message: PoolAsset): PoolAssetSDKType { - const obj: any = {}; - message.token !== undefined && (obj.token = message.token ? Coin.toSDK(message.token) : undefined); - obj.weight = message.weight; - return obj; - }, - fromAmino(object: PoolAssetAmino): PoolAsset { - return { - token: object?.token ? Coin.fromAmino(object.token) : undefined, - weight: object.weight - }; - }, - toAmino(message: PoolAsset): PoolAssetAmino { - const obj: any = {}; - obj.token = message.token ? Coin.toAmino(message.token) : undefined; - obj.weight = message.weight; - return obj; - }, - fromAminoMsg(object: PoolAssetAminoMsg): PoolAsset { - return PoolAsset.fromAmino(object.value); - }, - toAminoMsg(message: PoolAsset): PoolAssetAminoMsg { - return { - type: "osmosis/gamm/pool-asset", - value: PoolAsset.toAmino(message) - }; - }, - fromProtoMsg(message: PoolAssetProtoMsg): PoolAsset { - return PoolAsset.decode(message.value); - }, - toProto(message: PoolAsset): Uint8Array { - return PoolAsset.encode(message).finish(); - }, - toProtoMsg(message: PoolAsset): PoolAssetProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.PoolAsset", - value: PoolAsset.encode(message).finish() - }; - } -}; -function createBasePool(): Pool { - return { - address: "", - id: BigInt(0), - poolParams: PoolParams.fromPartial({}), - futurePoolGovernor: "", - totalShares: Coin.fromPartial({}), - poolAssets: [], - totalWeight: "" - }; -} -export const Pool = { - typeUrl: "/osmosis.gamm.v1beta1.Pool", - aminoType: "osmosis/gamm/pool", - encode(message: Pool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.id !== BigInt(0)) { - writer.uint32(16).uint64(message.id); - } - if (message.poolParams !== undefined) { - PoolParams.encode(message.poolParams, writer.uint32(26).fork()).ldelim(); - } - if (message.futurePoolGovernor !== "") { - writer.uint32(34).string(message.futurePoolGovernor); - } - if (message.totalShares !== undefined) { - Coin.encode(message.totalShares, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.poolAssets) { - PoolAsset.encode(v!, writer.uint32(50).fork()).ldelim(); - } - if (message.totalWeight !== "") { - writer.uint32(58).string(message.totalWeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Pool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.id = reader.uint64(); - break; - case 3: - message.poolParams = PoolParams.decode(reader, reader.uint32()); - break; - case 4: - message.futurePoolGovernor = reader.string(); - break; - case 5: - message.totalShares = Coin.decode(reader, reader.uint32()); - break; - case 6: - message.poolAssets.push(PoolAsset.decode(reader, reader.uint32())); - break; - case 7: - message.totalWeight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Pool { - return { - address: isSet(object.address) ? String(object.address) : "", - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0), - poolParams: isSet(object.poolParams) ? PoolParams.fromJSON(object.poolParams) : undefined, - futurePoolGovernor: isSet(object.futurePoolGovernor) ? String(object.futurePoolGovernor) : "", - totalShares: isSet(object.totalShares) ? Coin.fromJSON(object.totalShares) : undefined, - poolAssets: Array.isArray(object?.poolAssets) ? object.poolAssets.map((e: any) => PoolAsset.fromJSON(e)) : [], - totalWeight: isSet(object.totalWeight) ? String(object.totalWeight) : "" - }; - }, - toJSON(message: Pool): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - message.poolParams !== undefined && (obj.poolParams = message.poolParams ? PoolParams.toJSON(message.poolParams) : undefined); - message.futurePoolGovernor !== undefined && (obj.futurePoolGovernor = message.futurePoolGovernor); - message.totalShares !== undefined && (obj.totalShares = message.totalShares ? Coin.toJSON(message.totalShares) : undefined); - if (message.poolAssets) { - obj.poolAssets = message.poolAssets.map(e => e ? PoolAsset.toJSON(e) : undefined); - } else { - obj.poolAssets = []; - } - message.totalWeight !== undefined && (obj.totalWeight = message.totalWeight); - return obj; - }, - fromPartial(object: DeepPartial): Pool { - const message = createBasePool(); - message.address = object.address ?? ""; - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.poolParams = object.poolParams !== undefined && object.poolParams !== null ? PoolParams.fromPartial(object.poolParams) : undefined; - message.futurePoolGovernor = object.futurePoolGovernor ?? ""; - message.totalShares = object.totalShares !== undefined && object.totalShares !== null ? Coin.fromPartial(object.totalShares) : undefined; - message.poolAssets = object.poolAssets?.map(e => PoolAsset.fromPartial(e)) || []; - message.totalWeight = object.totalWeight ?? ""; - return message; - }, - fromSDK(object: PoolSDKType): Pool { - return { - address: object?.address, - id: object?.id, - poolParams: object.pool_params ? PoolParams.fromSDK(object.pool_params) : undefined, - futurePoolGovernor: object?.future_pool_governor, - totalShares: object.total_shares ? Coin.fromSDK(object.total_shares) : undefined, - poolAssets: Array.isArray(object?.pool_assets) ? object.pool_assets.map((e: any) => PoolAsset.fromSDK(e)) : [], - totalWeight: object?.total_weight - }; - }, - toSDK(message: Pool): PoolSDKType { - const obj: any = {}; - obj.address = message.address; - obj.id = message.id; - message.poolParams !== undefined && (obj.pool_params = message.poolParams ? PoolParams.toSDK(message.poolParams) : undefined); - obj.future_pool_governor = message.futurePoolGovernor; - message.totalShares !== undefined && (obj.total_shares = message.totalShares ? Coin.toSDK(message.totalShares) : undefined); - if (message.poolAssets) { - obj.pool_assets = message.poolAssets.map(e => e ? PoolAsset.toSDK(e) : undefined); - } else { - obj.pool_assets = []; - } - obj.total_weight = message.totalWeight; - return obj; - }, - fromAmino(object: PoolAmino): Pool { - return { - address: object.address, - id: BigInt(object.id), - poolParams: object?.pool_params ? PoolParams.fromAmino(object.pool_params) : undefined, - futurePoolGovernor: object.future_pool_governor, - totalShares: object?.total_shares ? Coin.fromAmino(object.total_shares) : undefined, - poolAssets: Array.isArray(object?.pool_assets) ? object.pool_assets.map((e: any) => PoolAsset.fromAmino(e)) : [], - totalWeight: object.total_weight - }; - }, - toAmino(message: Pool): PoolAmino { - const obj: any = {}; - obj.address = message.address; - obj.id = message.id ? message.id.toString() : undefined; - obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams) : undefined; - obj.future_pool_governor = message.futurePoolGovernor; - obj.total_shares = message.totalShares ? Coin.toAmino(message.totalShares) : undefined; - if (message.poolAssets) { - obj.pool_assets = message.poolAssets.map(e => e ? PoolAsset.toAmino(e) : undefined); - } else { - obj.pool_assets = []; - } - obj.total_weight = message.totalWeight; - return obj; - }, - fromAminoMsg(object: PoolAminoMsg): Pool { - return Pool.fromAmino(object.value); - }, - toAminoMsg(message: Pool): PoolAminoMsg { - return { - type: "osmosis/gamm/pool", - value: Pool.toAmino(message) - }; - }, - fromProtoMsg(message: PoolProtoMsg): Pool { - return Pool.decode(message.value); - }, - toProto(message: Pool): Uint8Array { - return Pool.encode(message).finish(); - }, - toProtoMsg(message: Pool): PoolProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.Pool", - value: Pool.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.amino.ts deleted file mode 100644 index cba97bab..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.amino.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MsgCreateBalancerPool } from "./tx"; -export const AminoConverter = { - "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool": { - aminoType: "osmosis/gamm/poolmodels/balancer/create-balancer-pool", - toAmino: MsgCreateBalancerPool.toAmino, - fromAmino: MsgCreateBalancerPool.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.registry.ts deleted file mode 100644 index ec61ee16..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.registry.ts +++ /dev/null @@ -1,51 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateBalancerPool } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", MsgCreateBalancerPool]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createBalancerPool(value: MsgCreateBalancerPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - value: MsgCreateBalancerPool.encode(value).finish() - }; - } - }, - withTypeUrl: { - createBalancerPool(value: MsgCreateBalancerPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - value - }; - } - }, - toJSON: { - createBalancerPool(value: MsgCreateBalancerPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - value: MsgCreateBalancerPool.toJSON(value) - }; - } - }, - fromJSON: { - createBalancerPool(value: any) { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - value: MsgCreateBalancerPool.fromJSON(value) - }; - } - }, - fromPartial: { - createBalancerPool(value: MsgCreateBalancerPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - value: MsgCreateBalancerPool.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.rpc.msg.ts deleted file mode 100644 index 049dae35..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.rpc.msg.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Rpc } from "../../../../../helpers"; -import { BinaryReader } from "../../../../../binary"; -import { MsgCreateBalancerPool, MsgCreateBalancerPoolResponse } from "./tx"; -export interface Msg { - createBalancerPool(request: MsgCreateBalancerPool): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createBalancerPool = this.createBalancerPool.bind(this); - } - createBalancerPool(request: MsgCreateBalancerPool): Promise { - const data = MsgCreateBalancerPool.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.poolmodels.balancer.v1beta1.Msg", "CreateBalancerPool", data); - return promise.then(data => MsgCreateBalancerPoolResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts deleted file mode 100644 index ff427e30..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/balancer/tx/tx.ts +++ /dev/null @@ -1,282 +0,0 @@ -import { PoolParams, PoolParamsAmino, PoolParamsSDKType, PoolAsset, PoolAssetAmino, PoolAssetSDKType } from "../balancerPool"; -import { BinaryReader, BinaryWriter } from "../../../../../binary"; -import { isSet, DeepPartial } from "../../../../../helpers"; -/** ===================== MsgCreatePool */ -export interface MsgCreateBalancerPool { - sender: string; - poolParams: PoolParams | undefined; - poolAssets: PoolAsset[]; - futurePoolGovernor: string; -} -export interface MsgCreateBalancerPoolProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool"; - value: Uint8Array; -} -/** ===================== MsgCreatePool */ -export interface MsgCreateBalancerPoolAmino { - sender: string; - pool_params?: PoolParamsAmino | undefined; - pool_assets: PoolAssetAmino[]; - future_pool_governor: string; -} -export interface MsgCreateBalancerPoolAminoMsg { - type: "osmosis/gamm/poolmodels/balancer/create-balancer-pool"; - value: MsgCreateBalancerPoolAmino; -} -/** ===================== MsgCreatePool */ -export interface MsgCreateBalancerPoolSDKType { - sender: string; - pool_params: PoolParamsSDKType | undefined; - pool_assets: PoolAssetSDKType[]; - future_pool_governor: string; -} -/** Returns the poolID */ -export interface MsgCreateBalancerPoolResponse { - poolId: bigint; -} -export interface MsgCreateBalancerPoolResponseProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPoolResponse"; - value: Uint8Array; -} -/** Returns the poolID */ -export interface MsgCreateBalancerPoolResponseAmino { - pool_id: string; -} -export interface MsgCreateBalancerPoolResponseAminoMsg { - type: "osmosis/gamm/poolmodels/balancer/create-balancer-pool-response"; - value: MsgCreateBalancerPoolResponseAmino; -} -/** Returns the poolID */ -export interface MsgCreateBalancerPoolResponseSDKType { - pool_id: bigint; -} -function createBaseMsgCreateBalancerPool(): MsgCreateBalancerPool { - return { - sender: "", - poolParams: PoolParams.fromPartial({}), - poolAssets: [], - futurePoolGovernor: "" - }; -} -export const MsgCreateBalancerPool = { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - aminoType: "osmosis/gamm/poolmodels/balancer/create-balancer-pool", - encode(message: MsgCreateBalancerPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolParams !== undefined) { - PoolParams.encode(message.poolParams, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.poolAssets) { - PoolAsset.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.futurePoolGovernor !== "") { - writer.uint32(34).string(message.futurePoolGovernor); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateBalancerPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateBalancerPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolParams = PoolParams.decode(reader, reader.uint32()); - break; - case 3: - message.poolAssets.push(PoolAsset.decode(reader, reader.uint32())); - break; - case 4: - message.futurePoolGovernor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateBalancerPool { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolParams: isSet(object.poolParams) ? PoolParams.fromJSON(object.poolParams) : undefined, - poolAssets: Array.isArray(object?.poolAssets) ? object.poolAssets.map((e: any) => PoolAsset.fromJSON(e)) : [], - futurePoolGovernor: isSet(object.futurePoolGovernor) ? String(object.futurePoolGovernor) : "" - }; - }, - toJSON(message: MsgCreateBalancerPool): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolParams !== undefined && (obj.poolParams = message.poolParams ? PoolParams.toJSON(message.poolParams) : undefined); - if (message.poolAssets) { - obj.poolAssets = message.poolAssets.map(e => e ? PoolAsset.toJSON(e) : undefined); - } else { - obj.poolAssets = []; - } - message.futurePoolGovernor !== undefined && (obj.futurePoolGovernor = message.futurePoolGovernor); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateBalancerPool { - const message = createBaseMsgCreateBalancerPool(); - message.sender = object.sender ?? ""; - message.poolParams = object.poolParams !== undefined && object.poolParams !== null ? PoolParams.fromPartial(object.poolParams) : undefined; - message.poolAssets = object.poolAssets?.map(e => PoolAsset.fromPartial(e)) || []; - message.futurePoolGovernor = object.futurePoolGovernor ?? ""; - return message; - }, - fromSDK(object: MsgCreateBalancerPoolSDKType): MsgCreateBalancerPool { - return { - sender: object?.sender, - poolParams: object.pool_params ? PoolParams.fromSDK(object.pool_params) : undefined, - poolAssets: Array.isArray(object?.pool_assets) ? object.pool_assets.map((e: any) => PoolAsset.fromSDK(e)) : [], - futurePoolGovernor: object?.future_pool_governor - }; - }, - toSDK(message: MsgCreateBalancerPool): MsgCreateBalancerPoolSDKType { - const obj: any = {}; - obj.sender = message.sender; - message.poolParams !== undefined && (obj.pool_params = message.poolParams ? PoolParams.toSDK(message.poolParams) : undefined); - if (message.poolAssets) { - obj.pool_assets = message.poolAssets.map(e => e ? PoolAsset.toSDK(e) : undefined); - } else { - obj.pool_assets = []; - } - obj.future_pool_governor = message.futurePoolGovernor; - return obj; - }, - fromAmino(object: MsgCreateBalancerPoolAmino): MsgCreateBalancerPool { - return { - sender: object.sender, - poolParams: object?.pool_params ? PoolParams.fromAmino(object.pool_params) : undefined, - poolAssets: Array.isArray(object?.pool_assets) ? object.pool_assets.map((e: any) => PoolAsset.fromAmino(e)) : [], - futurePoolGovernor: object.future_pool_governor - }; - }, - toAmino(message: MsgCreateBalancerPool): MsgCreateBalancerPoolAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams) : undefined; - if (message.poolAssets) { - obj.pool_assets = message.poolAssets.map(e => e ? PoolAsset.toAmino(e) : undefined); - } else { - obj.pool_assets = []; - } - obj.future_pool_governor = message.futurePoolGovernor; - return obj; - }, - fromAminoMsg(object: MsgCreateBalancerPoolAminoMsg): MsgCreateBalancerPool { - return MsgCreateBalancerPool.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateBalancerPool): MsgCreateBalancerPoolAminoMsg { - return { - type: "osmosis/gamm/poolmodels/balancer/create-balancer-pool", - value: MsgCreateBalancerPool.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateBalancerPoolProtoMsg): MsgCreateBalancerPool { - return MsgCreateBalancerPool.decode(message.value); - }, - toProto(message: MsgCreateBalancerPool): Uint8Array { - return MsgCreateBalancerPool.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateBalancerPool): MsgCreateBalancerPoolProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool", - value: MsgCreateBalancerPool.encode(message).finish() - }; - } -}; -function createBaseMsgCreateBalancerPoolResponse(): MsgCreateBalancerPoolResponse { - return { - poolId: BigInt(0) - }; -} -export const MsgCreateBalancerPoolResponse = { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPoolResponse", - aminoType: "osmosis/gamm/poolmodels/balancer/create-balancer-pool-response", - encode(message: MsgCreateBalancerPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateBalancerPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateBalancerPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateBalancerPoolResponse { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgCreateBalancerPoolResponse): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateBalancerPoolResponse { - const message = createBaseMsgCreateBalancerPoolResponse(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgCreateBalancerPoolResponseSDKType): MsgCreateBalancerPoolResponse { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: MsgCreateBalancerPoolResponse): MsgCreateBalancerPoolResponseSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: MsgCreateBalancerPoolResponseAmino): MsgCreateBalancerPoolResponse { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: MsgCreateBalancerPoolResponse): MsgCreateBalancerPoolResponseAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateBalancerPoolResponseAminoMsg): MsgCreateBalancerPoolResponse { - return MsgCreateBalancerPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateBalancerPoolResponse): MsgCreateBalancerPoolResponseAminoMsg { - return { - type: "osmosis/gamm/poolmodels/balancer/create-balancer-pool-response", - value: MsgCreateBalancerPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateBalancerPoolResponseProtoMsg): MsgCreateBalancerPoolResponse { - return MsgCreateBalancerPoolResponse.decode(message.value); - }, - toProto(message: MsgCreateBalancerPoolResponse): Uint8Array { - return MsgCreateBalancerPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateBalancerPoolResponse): MsgCreateBalancerPoolResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPoolResponse", - value: MsgCreateBalancerPoolResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts deleted file mode 100644 index 4a393523..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.ts +++ /dev/null @@ -1,432 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { Decimal } from "@cosmjs/math"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** - * PoolParams defined the parameters that will be managed by the pool - * governance in the future. This params are not managed by the chain - * governance. Instead they will be managed by the token holders of the pool. - * The pool's token holders are specified in future_pool_governor. - */ -export interface PoolParams { - swapFee: string; - exitFee: string; -} -export interface PoolParamsProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.PoolParams"; - value: Uint8Array; -} -/** - * PoolParams defined the parameters that will be managed by the pool - * governance in the future. This params are not managed by the chain - * governance. Instead they will be managed by the token holders of the pool. - * The pool's token holders are specified in future_pool_governor. - */ -export interface PoolParamsAmino { - swap_fee: string; - exit_fee: string; -} -export interface PoolParamsAminoMsg { - type: "osmosis/gamm/pool-params"; - value: PoolParamsAmino; -} -/** - * PoolParams defined the parameters that will be managed by the pool - * governance in the future. This params are not managed by the chain - * governance. Instead they will be managed by the token holders of the pool. - * The pool's token holders are specified in future_pool_governor. - */ -export interface PoolParamsSDKType { - swap_fee: string; - exit_fee: string; -} -/** Pool is the stableswap Pool struct */ -export interface Pool { - address: string; - id: bigint; - poolParams: PoolParams | undefined; - /** - * This string specifies who will govern the pool in the future. - * Valid forms of this are: - * {token name},{duration} - * {duration} - * where {token name} if specified is the token which determines the - * governor, and if not specified is the LP token for this pool.duration is - * a time specified as 0w,1w,2w, etc. which specifies how long the token - * would need to be locked up to count in governance. 0w means no lockup. - */ - futurePoolGovernor: string; - /** sum of all LP shares */ - totalShares: Coin | undefined; - /** assets in the pool */ - poolLiquidity: Coin[]; - /** for calculation amognst assets with different precisions */ - scalingFactors: bigint[]; - /** scaling_factor_controller is the address can adjust pool scaling factors */ - scalingFactorController: string; -} -export interface PoolProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.Pool"; - value: Uint8Array; -} -/** Pool is the stableswap Pool struct */ -export interface PoolAmino { - address: string; - id: string; - pool_params?: PoolParamsAmino | undefined; - /** - * This string specifies who will govern the pool in the future. - * Valid forms of this are: - * {token name},{duration} - * {duration} - * where {token name} if specified is the token which determines the - * governor, and if not specified is the LP token for this pool.duration is - * a time specified as 0w,1w,2w, etc. which specifies how long the token - * would need to be locked up to count in governance. 0w means no lockup. - */ - future_pool_governor: string; - /** sum of all LP shares */ - total_shares?: CoinAmino | undefined; - /** assets in the pool */ - pool_liquidity: CoinAmino[]; - /** for calculation amognst assets with different precisions */ - scaling_factors: string[]; - /** scaling_factor_controller is the address can adjust pool scaling factors */ - scaling_factor_controller: string; -} -export interface PoolAminoMsg { - type: "osmosis/gamm/pool"; - value: PoolAmino; -} -/** Pool is the stableswap Pool struct */ -export interface PoolSDKType { - address: string; - id: bigint; - pool_params: PoolParamsSDKType | undefined; - future_pool_governor: string; - total_shares: CoinSDKType | undefined; - pool_liquidity: CoinSDKType[]; - scaling_factors: bigint[]; - scaling_factor_controller: string; -} -function createBasePoolParams(): PoolParams { - return { - swapFee: "", - exitFee: "" - }; -} -export const PoolParams = { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.PoolParams", - aminoType: "osmosis/gamm/pool-params", - encode(message: PoolParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.swapFee !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.swapFee, 18).atomics); - } - if (message.exitFee !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.exitFee, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PoolParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePoolParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.swapFee = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 2: - message.exitFee = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PoolParams { - return { - swapFee: isSet(object.swapFee) ? String(object.swapFee) : "", - exitFee: isSet(object.exitFee) ? String(object.exitFee) : "" - }; - }, - toJSON(message: PoolParams): unknown { - const obj: any = {}; - message.swapFee !== undefined && (obj.swapFee = message.swapFee); - message.exitFee !== undefined && (obj.exitFee = message.exitFee); - return obj; - }, - fromPartial(object: DeepPartial): PoolParams { - const message = createBasePoolParams(); - message.swapFee = object.swapFee ?? ""; - message.exitFee = object.exitFee ?? ""; - return message; - }, - fromSDK(object: PoolParamsSDKType): PoolParams { - return { - swapFee: object?.swap_fee, - exitFee: object?.exit_fee - }; - }, - toSDK(message: PoolParams): PoolParamsSDKType { - const obj: any = {}; - obj.swap_fee = message.swapFee; - obj.exit_fee = message.exitFee; - return obj; - }, - fromAmino(object: PoolParamsAmino): PoolParams { - return { - swapFee: object.swap_fee, - exitFee: object.exit_fee - }; - }, - toAmino(message: PoolParams): PoolParamsAmino { - const obj: any = {}; - obj.swap_fee = message.swapFee; - obj.exit_fee = message.exitFee; - return obj; - }, - fromAminoMsg(object: PoolParamsAminoMsg): PoolParams { - return PoolParams.fromAmino(object.value); - }, - toAminoMsg(message: PoolParams): PoolParamsAminoMsg { - return { - type: "osmosis/gamm/pool-params", - value: PoolParams.toAmino(message) - }; - }, - fromProtoMsg(message: PoolParamsProtoMsg): PoolParams { - return PoolParams.decode(message.value); - }, - toProto(message: PoolParams): Uint8Array { - return PoolParams.encode(message).finish(); - }, - toProtoMsg(message: PoolParams): PoolParamsProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.PoolParams", - value: PoolParams.encode(message).finish() - }; - } -}; -function createBasePool(): Pool { - return { - address: "", - id: BigInt(0), - poolParams: PoolParams.fromPartial({}), - futurePoolGovernor: "", - totalShares: Coin.fromPartial({}), - poolLiquidity: [], - scalingFactors: [], - scalingFactorController: "" - }; -} -export const Pool = { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.Pool", - aminoType: "osmosis/gamm/pool", - encode(message: Pool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.id !== BigInt(0)) { - writer.uint32(16).uint64(message.id); - } - if (message.poolParams !== undefined) { - PoolParams.encode(message.poolParams, writer.uint32(26).fork()).ldelim(); - } - if (message.futurePoolGovernor !== "") { - writer.uint32(34).string(message.futurePoolGovernor); - } - if (message.totalShares !== undefined) { - Coin.encode(message.totalShares, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.poolLiquidity) { - Coin.encode(v!, writer.uint32(50).fork()).ldelim(); - } - writer.uint32(58).fork(); - for (const v of message.scalingFactors) { - writer.uint64(v); - } - writer.ldelim(); - if (message.scalingFactorController !== "") { - writer.uint32(66).string(message.scalingFactorController); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Pool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.id = reader.uint64(); - break; - case 3: - message.poolParams = PoolParams.decode(reader, reader.uint32()); - break; - case 4: - message.futurePoolGovernor = reader.string(); - break; - case 5: - message.totalShares = Coin.decode(reader, reader.uint32()); - break; - case 6: - message.poolLiquidity.push(Coin.decode(reader, reader.uint32())); - break; - case 7: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.scalingFactors.push(reader.uint64()); - } - } else { - message.scalingFactors.push(reader.uint64()); - } - break; - case 8: - message.scalingFactorController = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Pool { - return { - address: isSet(object.address) ? String(object.address) : "", - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0), - poolParams: isSet(object.poolParams) ? PoolParams.fromJSON(object.poolParams) : undefined, - futurePoolGovernor: isSet(object.futurePoolGovernor) ? String(object.futurePoolGovernor) : "", - totalShares: isSet(object.totalShares) ? Coin.fromJSON(object.totalShares) : undefined, - poolLiquidity: Array.isArray(object?.poolLiquidity) ? object.poolLiquidity.map((e: any) => Coin.fromJSON(e)) : [], - scalingFactors: Array.isArray(object?.scalingFactors) ? object.scalingFactors.map((e: any) => BigInt(e.toString())) : [], - scalingFactorController: isSet(object.scalingFactorController) ? String(object.scalingFactorController) : "" - }; - }, - toJSON(message: Pool): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - message.poolParams !== undefined && (obj.poolParams = message.poolParams ? PoolParams.toJSON(message.poolParams) : undefined); - message.futurePoolGovernor !== undefined && (obj.futurePoolGovernor = message.futurePoolGovernor); - message.totalShares !== undefined && (obj.totalShares = message.totalShares ? Coin.toJSON(message.totalShares) : undefined); - if (message.poolLiquidity) { - obj.poolLiquidity = message.poolLiquidity.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.poolLiquidity = []; - } - if (message.scalingFactors) { - obj.scalingFactors = message.scalingFactors.map(e => (e || BigInt(0)).toString()); - } else { - obj.scalingFactors = []; - } - message.scalingFactorController !== undefined && (obj.scalingFactorController = message.scalingFactorController); - return obj; - }, - fromPartial(object: DeepPartial): Pool { - const message = createBasePool(); - message.address = object.address ?? ""; - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.poolParams = object.poolParams !== undefined && object.poolParams !== null ? PoolParams.fromPartial(object.poolParams) : undefined; - message.futurePoolGovernor = object.futurePoolGovernor ?? ""; - message.totalShares = object.totalShares !== undefined && object.totalShares !== null ? Coin.fromPartial(object.totalShares) : undefined; - message.poolLiquidity = object.poolLiquidity?.map(e => Coin.fromPartial(e)) || []; - message.scalingFactors = object.scalingFactors?.map(e => BigInt(e.toString())) || []; - message.scalingFactorController = object.scalingFactorController ?? ""; - return message; - }, - fromSDK(object: PoolSDKType): Pool { - return { - address: object?.address, - id: object?.id, - poolParams: object.pool_params ? PoolParams.fromSDK(object.pool_params) : undefined, - futurePoolGovernor: object?.future_pool_governor, - totalShares: object.total_shares ? Coin.fromSDK(object.total_shares) : undefined, - poolLiquidity: Array.isArray(object?.pool_liquidity) ? object.pool_liquidity.map((e: any) => Coin.fromSDK(e)) : [], - scalingFactors: Array.isArray(object?.scaling_factors) ? object.scaling_factors.map((e: any) => e) : [], - scalingFactorController: object?.scaling_factor_controller - }; - }, - toSDK(message: Pool): PoolSDKType { - const obj: any = {}; - obj.address = message.address; - obj.id = message.id; - message.poolParams !== undefined && (obj.pool_params = message.poolParams ? PoolParams.toSDK(message.poolParams) : undefined); - obj.future_pool_governor = message.futurePoolGovernor; - message.totalShares !== undefined && (obj.total_shares = message.totalShares ? Coin.toSDK(message.totalShares) : undefined); - if (message.poolLiquidity) { - obj.pool_liquidity = message.poolLiquidity.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.pool_liquidity = []; - } - if (message.scalingFactors) { - obj.scaling_factors = message.scalingFactors.map(e => e); - } else { - obj.scaling_factors = []; - } - obj.scaling_factor_controller = message.scalingFactorController; - return obj; - }, - fromAmino(object: PoolAmino): Pool { - return { - address: object.address, - id: BigInt(object.id), - poolParams: object?.pool_params ? PoolParams.fromAmino(object.pool_params) : undefined, - futurePoolGovernor: object.future_pool_governor, - totalShares: object?.total_shares ? Coin.fromAmino(object.total_shares) : undefined, - poolLiquidity: Array.isArray(object?.pool_liquidity) ? object.pool_liquidity.map((e: any) => Coin.fromAmino(e)) : [], - scalingFactors: Array.isArray(object?.scaling_factors) ? object.scaling_factors.map((e: any) => BigInt(e)) : [], - scalingFactorController: object.scaling_factor_controller - }; - }, - toAmino(message: Pool): PoolAmino { - const obj: any = {}; - obj.address = message.address; - obj.id = message.id ? message.id.toString() : undefined; - obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams) : undefined; - obj.future_pool_governor = message.futurePoolGovernor; - obj.total_shares = message.totalShares ? Coin.toAmino(message.totalShares) : undefined; - if (message.poolLiquidity) { - obj.pool_liquidity = message.poolLiquidity.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.pool_liquidity = []; - } - if (message.scalingFactors) { - obj.scaling_factors = message.scalingFactors.map(e => e.toString()); - } else { - obj.scaling_factors = []; - } - obj.scaling_factor_controller = message.scalingFactorController; - return obj; - }, - fromAminoMsg(object: PoolAminoMsg): Pool { - return Pool.fromAmino(object.value); - }, - toAminoMsg(message: Pool): PoolAminoMsg { - return { - type: "osmosis/gamm/pool", - value: Pool.toAmino(message) - }; - }, - fromProtoMsg(message: PoolProtoMsg): Pool { - return Pool.decode(message.value); - }, - toProto(message: Pool): Uint8Array { - return Pool.encode(message).finish(); - }, - toProtoMsg(message: Pool): PoolProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.Pool", - value: Pool.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.amino.ts deleted file mode 100644 index 01e8c020..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.amino.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MsgCreateStableswapPool, MsgStableSwapAdjustScalingFactors } from "./tx"; -export const AminoConverter = { - "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool": { - aminoType: "osmosis/gamm/create-stableswap-pool", - toAmino: MsgCreateStableswapPool.toAmino, - fromAmino: MsgCreateStableswapPool.fromAmino - }, - "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors": { - aminoType: "osmosis/gamm/stable-swap-adjust-scaling-factors", - toAmino: MsgStableSwapAdjustScalingFactors.toAmino, - fromAmino: MsgStableSwapAdjustScalingFactors.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.registry.ts deleted file mode 100644 index 6389615d..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.registry.ts +++ /dev/null @@ -1,81 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateStableswapPool, MsgStableSwapAdjustScalingFactors } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", MsgCreateStableswapPool], ["/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", MsgStableSwapAdjustScalingFactors]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createStableswapPool(value: MsgCreateStableswapPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - value: MsgCreateStableswapPool.encode(value).finish() - }; - }, - stableSwapAdjustScalingFactors(value: MsgStableSwapAdjustScalingFactors) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - value: MsgStableSwapAdjustScalingFactors.encode(value).finish() - }; - } - }, - withTypeUrl: { - createStableswapPool(value: MsgCreateStableswapPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - value - }; - }, - stableSwapAdjustScalingFactors(value: MsgStableSwapAdjustScalingFactors) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - value - }; - } - }, - toJSON: { - createStableswapPool(value: MsgCreateStableswapPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - value: MsgCreateStableswapPool.toJSON(value) - }; - }, - stableSwapAdjustScalingFactors(value: MsgStableSwapAdjustScalingFactors) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - value: MsgStableSwapAdjustScalingFactors.toJSON(value) - }; - } - }, - fromJSON: { - createStableswapPool(value: any) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - value: MsgCreateStableswapPool.fromJSON(value) - }; - }, - stableSwapAdjustScalingFactors(value: any) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - value: MsgStableSwapAdjustScalingFactors.fromJSON(value) - }; - } - }, - fromPartial: { - createStableswapPool(value: MsgCreateStableswapPool) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - value: MsgCreateStableswapPool.fromPartial(value) - }; - }, - stableSwapAdjustScalingFactors(value: MsgStableSwapAdjustScalingFactors) { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - value: MsgStableSwapAdjustScalingFactors.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.rpc.msg.ts deleted file mode 100644 index 94f40063..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.rpc.msg.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Rpc } from "../../../../helpers"; -import { BinaryReader } from "../../../../binary"; -import { MsgCreateStableswapPool, MsgCreateStableswapPoolResponse, MsgStableSwapAdjustScalingFactors, MsgStableSwapAdjustScalingFactorsResponse } from "./tx"; -export interface Msg { - createStableswapPool(request: MsgCreateStableswapPool): Promise; - stableSwapAdjustScalingFactors(request: MsgStableSwapAdjustScalingFactors): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createStableswapPool = this.createStableswapPool.bind(this); - this.stableSwapAdjustScalingFactors = this.stableSwapAdjustScalingFactors.bind(this); - } - createStableswapPool(request: MsgCreateStableswapPool): Promise { - const data = MsgCreateStableswapPool.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.poolmodels.stableswap.v1beta1.Msg", "CreateStableswapPool", data); - return promise.then(data => MsgCreateStableswapPoolResponse.decode(new BinaryReader(data))); - } - stableSwapAdjustScalingFactors(request: MsgStableSwapAdjustScalingFactors): Promise { - const data = MsgStableSwapAdjustScalingFactors.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.poolmodels.stableswap.v1beta1.Msg", "StableSwapAdjustScalingFactors", data); - return promise.then(data => MsgStableSwapAdjustScalingFactorsResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.ts b/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.ts deleted file mode 100644 index e4af8f58..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/pool-models/stableswap/tx.ts +++ /dev/null @@ -1,591 +0,0 @@ -import { PoolParams, PoolParamsAmino, PoolParamsSDKType } from "./stableswap_pool"; -import { Coin, CoinAmino, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../../binary"; -import { isSet, DeepPartial } from "../../../../helpers"; -/** ===================== MsgCreatePool */ -export interface MsgCreateStableswapPool { - sender: string; - poolParams: PoolParams | undefined; - initialPoolLiquidity: Coin[]; - scalingFactors: bigint[]; - futurePoolGovernor: string; - scalingFactorController: string; -} -export interface MsgCreateStableswapPoolProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool"; - value: Uint8Array; -} -/** ===================== MsgCreatePool */ -export interface MsgCreateStableswapPoolAmino { - sender: string; - pool_params?: PoolParamsAmino | undefined; - initial_pool_liquidity: CoinAmino[]; - scaling_factors: string[]; - future_pool_governor: string; - scaling_factor_controller: string; -} -export interface MsgCreateStableswapPoolAminoMsg { - type: "osmosis/gamm/create-stableswap-pool"; - value: MsgCreateStableswapPoolAmino; -} -/** ===================== MsgCreatePool */ -export interface MsgCreateStableswapPoolSDKType { - sender: string; - pool_params: PoolParamsSDKType | undefined; - initial_pool_liquidity: CoinSDKType[]; - scaling_factors: bigint[]; - future_pool_governor: string; - scaling_factor_controller: string; -} -/** Returns a poolID with custom poolName. */ -export interface MsgCreateStableswapPoolResponse { - poolId: bigint; -} -export interface MsgCreateStableswapPoolResponseProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPoolResponse"; - value: Uint8Array; -} -/** Returns a poolID with custom poolName. */ -export interface MsgCreateStableswapPoolResponseAmino { - pool_id: string; -} -export interface MsgCreateStableswapPoolResponseAminoMsg { - type: "osmosis/gamm/create-stableswap-pool-response"; - value: MsgCreateStableswapPoolResponseAmino; -} -/** Returns a poolID with custom poolName. */ -export interface MsgCreateStableswapPoolResponseSDKType { - pool_id: bigint; -} -/** - * Sender must be the pool's scaling_factor_governor in order for the tx to - * succeed. Adjusts stableswap scaling factors. - */ -export interface MsgStableSwapAdjustScalingFactors { - sender: string; - poolId: bigint; - scalingFactors: bigint[]; -} -export interface MsgStableSwapAdjustScalingFactorsProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors"; - value: Uint8Array; -} -/** - * Sender must be the pool's scaling_factor_governor in order for the tx to - * succeed. Adjusts stableswap scaling factors. - */ -export interface MsgStableSwapAdjustScalingFactorsAmino { - sender: string; - pool_id: string; - scaling_factors: string[]; -} -export interface MsgStableSwapAdjustScalingFactorsAminoMsg { - type: "osmosis/gamm/stable-swap-adjust-scaling-factors"; - value: MsgStableSwapAdjustScalingFactorsAmino; -} -/** - * Sender must be the pool's scaling_factor_governor in order for the tx to - * succeed. Adjusts stableswap scaling factors. - */ -export interface MsgStableSwapAdjustScalingFactorsSDKType { - sender: string; - pool_id: bigint; - scaling_factors: bigint[]; -} -export interface MsgStableSwapAdjustScalingFactorsResponse {} -export interface MsgStableSwapAdjustScalingFactorsResponseProtoMsg { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactorsResponse"; - value: Uint8Array; -} -export interface MsgStableSwapAdjustScalingFactorsResponseAmino {} -export interface MsgStableSwapAdjustScalingFactorsResponseAminoMsg { - type: "osmosis/gamm/stable-swap-adjust-scaling-factors-response"; - value: MsgStableSwapAdjustScalingFactorsResponseAmino; -} -export interface MsgStableSwapAdjustScalingFactorsResponseSDKType {} -function createBaseMsgCreateStableswapPool(): MsgCreateStableswapPool { - return { - sender: "", - poolParams: PoolParams.fromPartial({}), - initialPoolLiquidity: [], - scalingFactors: [], - futurePoolGovernor: "", - scalingFactorController: "" - }; -} -export const MsgCreateStableswapPool = { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - aminoType: "osmosis/gamm/create-stableswap-pool", - encode(message: MsgCreateStableswapPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolParams !== undefined) { - PoolParams.encode(message.poolParams, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.initialPoolLiquidity) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - writer.uint32(34).fork(); - for (const v of message.scalingFactors) { - writer.uint64(v); - } - writer.ldelim(); - if (message.futurePoolGovernor !== "") { - writer.uint32(42).string(message.futurePoolGovernor); - } - if (message.scalingFactorController !== "") { - writer.uint32(50).string(message.scalingFactorController); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateStableswapPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateStableswapPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolParams = PoolParams.decode(reader, reader.uint32()); - break; - case 3: - message.initialPoolLiquidity.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.scalingFactors.push(reader.uint64()); - } - } else { - message.scalingFactors.push(reader.uint64()); - } - break; - case 5: - message.futurePoolGovernor = reader.string(); - break; - case 6: - message.scalingFactorController = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateStableswapPool { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolParams: isSet(object.poolParams) ? PoolParams.fromJSON(object.poolParams) : undefined, - initialPoolLiquidity: Array.isArray(object?.initialPoolLiquidity) ? object.initialPoolLiquidity.map((e: any) => Coin.fromJSON(e)) : [], - scalingFactors: Array.isArray(object?.scalingFactors) ? object.scalingFactors.map((e: any) => BigInt(e.toString())) : [], - futurePoolGovernor: isSet(object.futurePoolGovernor) ? String(object.futurePoolGovernor) : "", - scalingFactorController: isSet(object.scalingFactorController) ? String(object.scalingFactorController) : "" - }; - }, - toJSON(message: MsgCreateStableswapPool): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolParams !== undefined && (obj.poolParams = message.poolParams ? PoolParams.toJSON(message.poolParams) : undefined); - if (message.initialPoolLiquidity) { - obj.initialPoolLiquidity = message.initialPoolLiquidity.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.initialPoolLiquidity = []; - } - if (message.scalingFactors) { - obj.scalingFactors = message.scalingFactors.map(e => (e || BigInt(0)).toString()); - } else { - obj.scalingFactors = []; - } - message.futurePoolGovernor !== undefined && (obj.futurePoolGovernor = message.futurePoolGovernor); - message.scalingFactorController !== undefined && (obj.scalingFactorController = message.scalingFactorController); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateStableswapPool { - const message = createBaseMsgCreateStableswapPool(); - message.sender = object.sender ?? ""; - message.poolParams = object.poolParams !== undefined && object.poolParams !== null ? PoolParams.fromPartial(object.poolParams) : undefined; - message.initialPoolLiquidity = object.initialPoolLiquidity?.map(e => Coin.fromPartial(e)) || []; - message.scalingFactors = object.scalingFactors?.map(e => BigInt(e.toString())) || []; - message.futurePoolGovernor = object.futurePoolGovernor ?? ""; - message.scalingFactorController = object.scalingFactorController ?? ""; - return message; - }, - fromSDK(object: MsgCreateStableswapPoolSDKType): MsgCreateStableswapPool { - return { - sender: object?.sender, - poolParams: object.pool_params ? PoolParams.fromSDK(object.pool_params) : undefined, - initialPoolLiquidity: Array.isArray(object?.initial_pool_liquidity) ? object.initial_pool_liquidity.map((e: any) => Coin.fromSDK(e)) : [], - scalingFactors: Array.isArray(object?.scaling_factors) ? object.scaling_factors.map((e: any) => e) : [], - futurePoolGovernor: object?.future_pool_governor, - scalingFactorController: object?.scaling_factor_controller - }; - }, - toSDK(message: MsgCreateStableswapPool): MsgCreateStableswapPoolSDKType { - const obj: any = {}; - obj.sender = message.sender; - message.poolParams !== undefined && (obj.pool_params = message.poolParams ? PoolParams.toSDK(message.poolParams) : undefined); - if (message.initialPoolLiquidity) { - obj.initial_pool_liquidity = message.initialPoolLiquidity.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.initial_pool_liquidity = []; - } - if (message.scalingFactors) { - obj.scaling_factors = message.scalingFactors.map(e => e); - } else { - obj.scaling_factors = []; - } - obj.future_pool_governor = message.futurePoolGovernor; - obj.scaling_factor_controller = message.scalingFactorController; - return obj; - }, - fromAmino(object: MsgCreateStableswapPoolAmino): MsgCreateStableswapPool { - return { - sender: object.sender, - poolParams: object?.pool_params ? PoolParams.fromAmino(object.pool_params) : undefined, - initialPoolLiquidity: Array.isArray(object?.initial_pool_liquidity) ? object.initial_pool_liquidity.map((e: any) => Coin.fromAmino(e)) : [], - scalingFactors: Array.isArray(object?.scaling_factors) ? object.scaling_factors.map((e: any) => BigInt(e)) : [], - futurePoolGovernor: object.future_pool_governor, - scalingFactorController: object.scaling_factor_controller - }; - }, - toAmino(message: MsgCreateStableswapPool): MsgCreateStableswapPoolAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_params = message.poolParams ? PoolParams.toAmino(message.poolParams) : undefined; - if (message.initialPoolLiquidity) { - obj.initial_pool_liquidity = message.initialPoolLiquidity.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.initial_pool_liquidity = []; - } - if (message.scalingFactors) { - obj.scaling_factors = message.scalingFactors.map(e => e.toString()); - } else { - obj.scaling_factors = []; - } - obj.future_pool_governor = message.futurePoolGovernor; - obj.scaling_factor_controller = message.scalingFactorController; - return obj; - }, - fromAminoMsg(object: MsgCreateStableswapPoolAminoMsg): MsgCreateStableswapPool { - return MsgCreateStableswapPool.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateStableswapPool): MsgCreateStableswapPoolAminoMsg { - return { - type: "osmosis/gamm/create-stableswap-pool", - value: MsgCreateStableswapPool.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateStableswapPoolProtoMsg): MsgCreateStableswapPool { - return MsgCreateStableswapPool.decode(message.value); - }, - toProto(message: MsgCreateStableswapPool): Uint8Array { - return MsgCreateStableswapPool.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateStableswapPool): MsgCreateStableswapPoolProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPool", - value: MsgCreateStableswapPool.encode(message).finish() - }; - } -}; -function createBaseMsgCreateStableswapPoolResponse(): MsgCreateStableswapPoolResponse { - return { - poolId: BigInt(0) - }; -} -export const MsgCreateStableswapPoolResponse = { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPoolResponse", - aminoType: "osmosis/gamm/create-stableswap-pool-response", - encode(message: MsgCreateStableswapPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateStableswapPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateStableswapPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateStableswapPoolResponse { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgCreateStableswapPoolResponse): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateStableswapPoolResponse { - const message = createBaseMsgCreateStableswapPoolResponse(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgCreateStableswapPoolResponseSDKType): MsgCreateStableswapPoolResponse { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: MsgCreateStableswapPoolResponse): MsgCreateStableswapPoolResponseSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: MsgCreateStableswapPoolResponseAmino): MsgCreateStableswapPoolResponse { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: MsgCreateStableswapPoolResponse): MsgCreateStableswapPoolResponseAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateStableswapPoolResponseAminoMsg): MsgCreateStableswapPoolResponse { - return MsgCreateStableswapPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateStableswapPoolResponse): MsgCreateStableswapPoolResponseAminoMsg { - return { - type: "osmosis/gamm/create-stableswap-pool-response", - value: MsgCreateStableswapPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateStableswapPoolResponseProtoMsg): MsgCreateStableswapPoolResponse { - return MsgCreateStableswapPoolResponse.decode(message.value); - }, - toProto(message: MsgCreateStableswapPoolResponse): Uint8Array { - return MsgCreateStableswapPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateStableswapPoolResponse): MsgCreateStableswapPoolResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgCreateStableswapPoolResponse", - value: MsgCreateStableswapPoolResponse.encode(message).finish() - }; - } -}; -function createBaseMsgStableSwapAdjustScalingFactors(): MsgStableSwapAdjustScalingFactors { - return { - sender: "", - poolId: BigInt(0), - scalingFactors: [] - }; -} -export const MsgStableSwapAdjustScalingFactors = { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - aminoType: "osmosis/gamm/stable-swap-adjust-scaling-factors", - encode(message: MsgStableSwapAdjustScalingFactors, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - writer.uint32(26).fork(); - for (const v of message.scalingFactors) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgStableSwapAdjustScalingFactors { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStableSwapAdjustScalingFactors(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.scalingFactors.push(reader.uint64()); - } - } else { - message.scalingFactors.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgStableSwapAdjustScalingFactors { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - scalingFactors: Array.isArray(object?.scalingFactors) ? object.scalingFactors.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: MsgStableSwapAdjustScalingFactors): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - if (message.scalingFactors) { - obj.scalingFactors = message.scalingFactors.map(e => (e || BigInt(0)).toString()); - } else { - obj.scalingFactors = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgStableSwapAdjustScalingFactors { - const message = createBaseMsgStableSwapAdjustScalingFactors(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.scalingFactors = object.scalingFactors?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: MsgStableSwapAdjustScalingFactorsSDKType): MsgStableSwapAdjustScalingFactors { - return { - sender: object?.sender, - poolId: object?.pool_id, - scalingFactors: Array.isArray(object?.scaling_factors) ? object.scaling_factors.map((e: any) => e) : [] - }; - }, - toSDK(message: MsgStableSwapAdjustScalingFactors): MsgStableSwapAdjustScalingFactorsSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - if (message.scalingFactors) { - obj.scaling_factors = message.scalingFactors.map(e => e); - } else { - obj.scaling_factors = []; - } - return obj; - }, - fromAmino(object: MsgStableSwapAdjustScalingFactorsAmino): MsgStableSwapAdjustScalingFactors { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - scalingFactors: Array.isArray(object?.scaling_factors) ? object.scaling_factors.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: MsgStableSwapAdjustScalingFactors): MsgStableSwapAdjustScalingFactorsAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - if (message.scalingFactors) { - obj.scaling_factors = message.scalingFactors.map(e => e.toString()); - } else { - obj.scaling_factors = []; - } - return obj; - }, - fromAminoMsg(object: MsgStableSwapAdjustScalingFactorsAminoMsg): MsgStableSwapAdjustScalingFactors { - return MsgStableSwapAdjustScalingFactors.fromAmino(object.value); - }, - toAminoMsg(message: MsgStableSwapAdjustScalingFactors): MsgStableSwapAdjustScalingFactorsAminoMsg { - return { - type: "osmosis/gamm/stable-swap-adjust-scaling-factors", - value: MsgStableSwapAdjustScalingFactors.toAmino(message) - }; - }, - fromProtoMsg(message: MsgStableSwapAdjustScalingFactorsProtoMsg): MsgStableSwapAdjustScalingFactors { - return MsgStableSwapAdjustScalingFactors.decode(message.value); - }, - toProto(message: MsgStableSwapAdjustScalingFactors): Uint8Array { - return MsgStableSwapAdjustScalingFactors.encode(message).finish(); - }, - toProtoMsg(message: MsgStableSwapAdjustScalingFactors): MsgStableSwapAdjustScalingFactorsProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactors", - value: MsgStableSwapAdjustScalingFactors.encode(message).finish() - }; - } -}; -function createBaseMsgStableSwapAdjustScalingFactorsResponse(): MsgStableSwapAdjustScalingFactorsResponse { - return {}; -} -export const MsgStableSwapAdjustScalingFactorsResponse = { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactorsResponse", - aminoType: "osmosis/gamm/stable-swap-adjust-scaling-factors-response", - encode(_: MsgStableSwapAdjustScalingFactorsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgStableSwapAdjustScalingFactorsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStableSwapAdjustScalingFactorsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgStableSwapAdjustScalingFactorsResponse { - return {}; - }, - toJSON(_: MsgStableSwapAdjustScalingFactorsResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgStableSwapAdjustScalingFactorsResponse { - const message = createBaseMsgStableSwapAdjustScalingFactorsResponse(); - return message; - }, - fromSDK(_: MsgStableSwapAdjustScalingFactorsResponseSDKType): MsgStableSwapAdjustScalingFactorsResponse { - return {}; - }, - toSDK(_: MsgStableSwapAdjustScalingFactorsResponse): MsgStableSwapAdjustScalingFactorsResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgStableSwapAdjustScalingFactorsResponseAmino): MsgStableSwapAdjustScalingFactorsResponse { - return {}; - }, - toAmino(_: MsgStableSwapAdjustScalingFactorsResponse): MsgStableSwapAdjustScalingFactorsResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgStableSwapAdjustScalingFactorsResponseAminoMsg): MsgStableSwapAdjustScalingFactorsResponse { - return MsgStableSwapAdjustScalingFactorsResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgStableSwapAdjustScalingFactorsResponse): MsgStableSwapAdjustScalingFactorsResponseAminoMsg { - return { - type: "osmosis/gamm/stable-swap-adjust-scaling-factors-response", - value: MsgStableSwapAdjustScalingFactorsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgStableSwapAdjustScalingFactorsResponseProtoMsg): MsgStableSwapAdjustScalingFactorsResponse { - return MsgStableSwapAdjustScalingFactorsResponse.decode(message.value); - }, - toProto(message: MsgStableSwapAdjustScalingFactorsResponse): Uint8Array { - return MsgStableSwapAdjustScalingFactorsResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgStableSwapAdjustScalingFactorsResponse): MsgStableSwapAdjustScalingFactorsResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.poolmodels.stableswap.v1beta1.MsgStableSwapAdjustScalingFactorsResponse", - value: MsgStableSwapAdjustScalingFactorsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/genesis.ts deleted file mode 100644 index 11bbce93..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/genesis.ts +++ /dev/null @@ -1,280 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** Params holds parameters for the incentives module */ -export interface Params { - poolCreationFee: Coin[]; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.Params"; - value: Uint8Array; -} -/** Params holds parameters for the incentives module */ -export interface ParamsAmino { - pool_creation_fee: CoinAmino[]; -} -export interface ParamsAminoMsg { - type: "osmosis/gamm/params"; - value: ParamsAmino; -} -/** Params holds parameters for the incentives module */ -export interface ParamsSDKType { - pool_creation_fee: CoinSDKType[]; -} -/** GenesisState defines the gamm module's genesis state. */ -export interface GenesisState { - pools: Any[]; - /** will be renamed to next_pool_id in an upcoming version */ - nextPoolNumber: bigint; - params: Params | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the gamm module's genesis state. */ -export interface GenesisStateAmino { - pools: AnyAmino[]; - /** will be renamed to next_pool_id in an upcoming version */ - next_pool_number: string; - params?: ParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "osmosis/gamm/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the gamm module's genesis state. */ -export interface GenesisStateSDKType { - pools: AnySDKType[]; - next_pool_number: bigint; - params: ParamsSDKType | undefined; -} -function createBaseParams(): Params { - return { - poolCreationFee: [] - }; -} -export const Params = { - typeUrl: "/osmosis.gamm.v1beta1.Params", - aminoType: "osmosis/gamm/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.poolCreationFee) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolCreationFee.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - poolCreationFee: Array.isArray(object?.poolCreationFee) ? object.poolCreationFee.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.poolCreationFee) { - obj.poolCreationFee = message.poolCreationFee.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.poolCreationFee = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.poolCreationFee = object.poolCreationFee?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - poolCreationFee: Array.isArray(object?.pool_creation_fee) ? object.pool_creation_fee.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - if (message.poolCreationFee) { - obj.pool_creation_fee = message.poolCreationFee.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.pool_creation_fee = []; - } - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - poolCreationFee: Array.isArray(object?.pool_creation_fee) ? object.pool_creation_fee.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - if (message.poolCreationFee) { - obj.pool_creation_fee = message.poolCreationFee.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.pool_creation_fee = []; - } - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/gamm/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseGenesisState(): GenesisState { - return { - pools: [], - nextPoolNumber: BigInt(0), - params: Params.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/osmosis.gamm.v1beta1.GenesisState", - aminoType: "osmosis/gamm/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pools) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.nextPoolNumber !== BigInt(0)) { - writer.uint32(16).uint64(message.nextPoolNumber); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pools.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.nextPoolNumber = reader.uint64(); - break; - case 3: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromJSON(e)) : [], - nextPoolNumber: isSet(object.nextPoolNumber) ? BigInt(object.nextPoolNumber.toString()) : BigInt(0), - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.pools = []; - } - message.nextPoolNumber !== undefined && (obj.nextPoolNumber = (message.nextPoolNumber || BigInt(0)).toString()); - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.pools = object.pools?.map(e => Any.fromPartial(e)) || []; - message.nextPoolNumber = object.nextPoolNumber !== undefined && object.nextPoolNumber !== null ? BigInt(object.nextPoolNumber.toString()) : BigInt(0); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromSDK(e)) : [], - nextPoolNumber: object?.next_pool_number, - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.pools = []; - } - obj.next_pool_number = message.nextPoolNumber; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromAmino(e)) : [], - nextPoolNumber: BigInt(object.next_pool_number), - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.pools = []; - } - obj.next_pool_number = message.nextPoolNumber ? message.nextPoolNumber.toString() : undefined; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/gamm/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/query.rpc.Query.ts deleted file mode 100644 index ccaf18f1..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,546 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryPoolsRequest, QueryPoolsResponse, QueryNumPoolsRequest, QueryNumPoolsResponse, QueryTotalLiquidityRequest, QueryTotalLiquidityResponse, QueryPoolsWithFilterRequest, QueryPoolsWithFilterResponse, QueryPoolRequest, QueryPoolResponse, QueryPoolTypeRequest, QueryPoolTypeResponse, QueryCalcJoinPoolNoSwapSharesRequest, QueryCalcJoinPoolNoSwapSharesResponse, QueryCalcJoinPoolSharesRequest, QueryCalcJoinPoolSharesResponse, QueryCalcExitPoolCoinsFromSharesRequest, QueryCalcExitPoolCoinsFromSharesResponse, QueryPoolParamsRequest, QueryPoolParamsResponse, QueryTotalPoolLiquidityRequest, QueryTotalPoolLiquidityResponse, QueryTotalSharesRequest, QueryTotalSharesResponse, QuerySpotPriceRequest, QuerySpotPriceResponse, QuerySwapExactAmountInRequest, QuerySwapExactAmountInResponse, QuerySwapExactAmountOutRequest, QuerySwapExactAmountOutResponse } from "./query"; -export interface Query { - pools(request?: QueryPoolsRequest): Promise; - numPools(request?: QueryNumPoolsRequest): Promise; - totalLiquidity(request?: QueryTotalLiquidityRequest): Promise; - /** - * PoolsWithFilter allows you to query specific pools with requested - * parameters - */ - poolsWithFilter(request: QueryPoolsWithFilterRequest): Promise; - /** Per Pool gRPC Endpoints */ - pool(request: QueryPoolRequest): Promise; - /** - * PoolType returns the type of the pool. - * Returns "Balancer" as a string literal when the pool is a balancer pool. - * Errors if the pool is failed to be type caseted. - */ - poolType(request: QueryPoolTypeRequest): Promise; - /** - * Simulates joining pool without a swap. Returns the amount of shares you'd - * get and tokens needed to provide - */ - calcJoinPoolNoSwapShares(request: QueryCalcJoinPoolNoSwapSharesRequest): Promise; - calcJoinPoolShares(request: QueryCalcJoinPoolSharesRequest): Promise; - calcExitPoolCoinsFromShares(request: QueryCalcExitPoolCoinsFromSharesRequest): Promise; - poolParams(request: QueryPoolParamsRequest): Promise; - totalPoolLiquidity(request: QueryTotalPoolLiquidityRequest): Promise; - totalShares(request: QueryTotalSharesRequest): Promise; - /** - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - spotPrice(request: QuerySpotPriceRequest): Promise; - /** Estimate the swap. */ - estimateSwapExactAmountIn(request: QuerySwapExactAmountInRequest): Promise; - estimateSwapExactAmountOut(request: QuerySwapExactAmountOutRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.pools = this.pools.bind(this); - this.numPools = this.numPools.bind(this); - this.totalLiquidity = this.totalLiquidity.bind(this); - this.poolsWithFilter = this.poolsWithFilter.bind(this); - this.pool = this.pool.bind(this); - this.poolType = this.poolType.bind(this); - this.calcJoinPoolNoSwapShares = this.calcJoinPoolNoSwapShares.bind(this); - this.calcJoinPoolShares = this.calcJoinPoolShares.bind(this); - this.calcExitPoolCoinsFromShares = this.calcExitPoolCoinsFromShares.bind(this); - this.poolParams = this.poolParams.bind(this); - this.totalPoolLiquidity = this.totalPoolLiquidity.bind(this); - this.totalShares = this.totalShares.bind(this); - this.spotPrice = this.spotPrice.bind(this); - this.estimateSwapExactAmountIn = this.estimateSwapExactAmountIn.bind(this); - this.estimateSwapExactAmountOut = this.estimateSwapExactAmountOut.bind(this); - } - pools(request: QueryPoolsRequest = { - pagination: undefined - }): Promise { - const data = QueryPoolsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "Pools", data); - return promise.then(data => QueryPoolsResponse.decode(new BinaryReader(data))); - } - numPools(request: QueryNumPoolsRequest = {}): Promise { - const data = QueryNumPoolsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "NumPools", data); - return promise.then(data => QueryNumPoolsResponse.decode(new BinaryReader(data))); - } - totalLiquidity(request: QueryTotalLiquidityRequest = {}): Promise { - const data = QueryTotalLiquidityRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "TotalLiquidity", data); - return promise.then(data => QueryTotalLiquidityResponse.decode(new BinaryReader(data))); - } - poolsWithFilter(request: QueryPoolsWithFilterRequest): Promise { - const data = QueryPoolsWithFilterRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "PoolsWithFilter", data); - return promise.then(data => QueryPoolsWithFilterResponse.decode(new BinaryReader(data))); - } - pool(request: QueryPoolRequest): Promise { - const data = QueryPoolRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "Pool", data); - return promise.then(data => QueryPoolResponse.decode(new BinaryReader(data))); - } - poolType(request: QueryPoolTypeRequest): Promise { - const data = QueryPoolTypeRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "PoolType", data); - return promise.then(data => QueryPoolTypeResponse.decode(new BinaryReader(data))); - } - calcJoinPoolNoSwapShares(request: QueryCalcJoinPoolNoSwapSharesRequest): Promise { - const data = QueryCalcJoinPoolNoSwapSharesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "CalcJoinPoolNoSwapShares", data); - return promise.then(data => QueryCalcJoinPoolNoSwapSharesResponse.decode(new BinaryReader(data))); - } - calcJoinPoolShares(request: QueryCalcJoinPoolSharesRequest): Promise { - const data = QueryCalcJoinPoolSharesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "CalcJoinPoolShares", data); - return promise.then(data => QueryCalcJoinPoolSharesResponse.decode(new BinaryReader(data))); - } - calcExitPoolCoinsFromShares(request: QueryCalcExitPoolCoinsFromSharesRequest): Promise { - const data = QueryCalcExitPoolCoinsFromSharesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "CalcExitPoolCoinsFromShares", data); - return promise.then(data => QueryCalcExitPoolCoinsFromSharesResponse.decode(new BinaryReader(data))); - } - poolParams(request: QueryPoolParamsRequest): Promise { - const data = QueryPoolParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "PoolParams", data); - return promise.then(data => QueryPoolParamsResponse.decode(new BinaryReader(data))); - } - totalPoolLiquidity(request: QueryTotalPoolLiquidityRequest): Promise { - const data = QueryTotalPoolLiquidityRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "TotalPoolLiquidity", data); - return promise.then(data => QueryTotalPoolLiquidityResponse.decode(new BinaryReader(data))); - } - totalShares(request: QueryTotalSharesRequest): Promise { - const data = QueryTotalSharesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "TotalShares", data); - return promise.then(data => QueryTotalSharesResponse.decode(new BinaryReader(data))); - } - spotPrice(request: QuerySpotPriceRequest): Promise { - const data = QuerySpotPriceRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "SpotPrice", data); - return promise.then(data => QuerySpotPriceResponse.decode(new BinaryReader(data))); - } - estimateSwapExactAmountIn(request: QuerySwapExactAmountInRequest): Promise { - const data = QuerySwapExactAmountInRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "EstimateSwapExactAmountIn", data); - return promise.then(data => QuerySwapExactAmountInResponse.decode(new BinaryReader(data))); - } - estimateSwapExactAmountOut(request: QuerySwapExactAmountOutRequest): Promise { - const data = QuerySwapExactAmountOutRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Query", "EstimateSwapExactAmountOut", data); - return promise.then(data => QuerySwapExactAmountOutResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - pools(request?: QueryPoolsRequest): Promise { - return queryService.pools(request); - }, - numPools(request?: QueryNumPoolsRequest): Promise { - return queryService.numPools(request); - }, - totalLiquidity(request?: QueryTotalLiquidityRequest): Promise { - return queryService.totalLiquidity(request); - }, - poolsWithFilter(request: QueryPoolsWithFilterRequest): Promise { - return queryService.poolsWithFilter(request); - }, - pool(request: QueryPoolRequest): Promise { - return queryService.pool(request); - }, - poolType(request: QueryPoolTypeRequest): Promise { - return queryService.poolType(request); - }, - calcJoinPoolNoSwapShares(request: QueryCalcJoinPoolNoSwapSharesRequest): Promise { - return queryService.calcJoinPoolNoSwapShares(request); - }, - calcJoinPoolShares(request: QueryCalcJoinPoolSharesRequest): Promise { - return queryService.calcJoinPoolShares(request); - }, - calcExitPoolCoinsFromShares(request: QueryCalcExitPoolCoinsFromSharesRequest): Promise { - return queryService.calcExitPoolCoinsFromShares(request); - }, - poolParams(request: QueryPoolParamsRequest): Promise { - return queryService.poolParams(request); - }, - totalPoolLiquidity(request: QueryTotalPoolLiquidityRequest): Promise { - return queryService.totalPoolLiquidity(request); - }, - totalShares(request: QueryTotalSharesRequest): Promise { - return queryService.totalShares(request); - }, - spotPrice(request: QuerySpotPriceRequest): Promise { - return queryService.spotPrice(request); - }, - estimateSwapExactAmountIn(request: QuerySwapExactAmountInRequest): Promise { - return queryService.estimateSwapExactAmountIn(request); - }, - estimateSwapExactAmountOut(request: QuerySwapExactAmountOutRequest): Promise { - return queryService.estimateSwapExactAmountOut(request); - } - }; -}; -export interface UsePoolsQuery extends ReactQueryParams { - request?: QueryPoolsRequest; -} -export interface UseNumPoolsQuery extends ReactQueryParams { - request?: QueryNumPoolsRequest; -} -export interface UseTotalLiquidityQuery extends ReactQueryParams { - request?: QueryTotalLiquidityRequest; -} -export interface UsePoolsWithFilterQuery extends ReactQueryParams { - request: QueryPoolsWithFilterRequest; -} -export interface UsePoolQuery extends ReactQueryParams { - request: QueryPoolRequest; -} -export interface UsePoolTypeQuery extends ReactQueryParams { - request: QueryPoolTypeRequest; -} -export interface UseCalcJoinPoolNoSwapSharesQuery extends ReactQueryParams { - request: QueryCalcJoinPoolNoSwapSharesRequest; -} -export interface UseCalcJoinPoolSharesQuery extends ReactQueryParams { - request: QueryCalcJoinPoolSharesRequest; -} -export interface UseCalcExitPoolCoinsFromSharesQuery extends ReactQueryParams { - request: QueryCalcExitPoolCoinsFromSharesRequest; -} -export interface UsePoolParamsQuery extends ReactQueryParams { - request: QueryPoolParamsRequest; -} -export interface UseTotalPoolLiquidityQuery extends ReactQueryParams { - request: QueryTotalPoolLiquidityRequest; -} -export interface UseTotalSharesQuery extends ReactQueryParams { - request: QueryTotalSharesRequest; -} -export interface UseSpotPriceQuery extends ReactQueryParams { - request: QuerySpotPriceRequest; -} -export interface UseEstimateSwapExactAmountInQuery extends ReactQueryParams { - request: QuerySwapExactAmountInRequest; -} -export interface UseEstimateSwapExactAmountOutQuery extends ReactQueryParams { - request: QuerySwapExactAmountOutRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const usePools = ({ - request, - options - }: UsePoolsQuery) => { - return useQuery(["poolsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.pools(request); - }, options); - }; - const useNumPools = ({ - request, - options - }: UseNumPoolsQuery) => { - return useQuery(["numPoolsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.numPools(request); - }, options); - }; - const useTotalLiquidity = ({ - request, - options - }: UseTotalLiquidityQuery) => { - return useQuery(["totalLiquidityQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalLiquidity(request); - }, options); - }; - const usePoolsWithFilter = ({ - request, - options - }: UsePoolsWithFilterQuery) => { - return useQuery(["poolsWithFilterQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.poolsWithFilter(request); - }, options); - }; - const usePool = ({ - request, - options - }: UsePoolQuery) => { - return useQuery(["poolQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.pool(request); - }, options); - }; - const usePoolType = ({ - request, - options - }: UsePoolTypeQuery) => { - return useQuery(["poolTypeQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.poolType(request); - }, options); - }; - const useCalcJoinPoolNoSwapShares = ({ - request, - options - }: UseCalcJoinPoolNoSwapSharesQuery) => { - return useQuery(["calcJoinPoolNoSwapSharesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.calcJoinPoolNoSwapShares(request); - }, options); - }; - const useCalcJoinPoolShares = ({ - request, - options - }: UseCalcJoinPoolSharesQuery) => { - return useQuery(["calcJoinPoolSharesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.calcJoinPoolShares(request); - }, options); - }; - const useCalcExitPoolCoinsFromShares = ({ - request, - options - }: UseCalcExitPoolCoinsFromSharesQuery) => { - return useQuery(["calcExitPoolCoinsFromSharesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.calcExitPoolCoinsFromShares(request); - }, options); - }; - const usePoolParams = ({ - request, - options - }: UsePoolParamsQuery) => { - return useQuery(["poolParamsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.poolParams(request); - }, options); - }; - const useTotalPoolLiquidity = ({ - request, - options - }: UseTotalPoolLiquidityQuery) => { - return useQuery(["totalPoolLiquidityQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalPoolLiquidity(request); - }, options); - }; - const useTotalShares = ({ - request, - options - }: UseTotalSharesQuery) => { - return useQuery(["totalSharesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalShares(request); - }, options); - }; - const useSpotPrice = ({ - request, - options - }: UseSpotPriceQuery) => { - return useQuery(["spotPriceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.spotPrice(request); - }, options); - }; - const useEstimateSwapExactAmountIn = ({ - request, - options - }: UseEstimateSwapExactAmountInQuery) => { - return useQuery(["estimateSwapExactAmountInQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.estimateSwapExactAmountIn(request); - }, options); - }; - const useEstimateSwapExactAmountOut = ({ - request, - options - }: UseEstimateSwapExactAmountOutQuery) => { - return useQuery(["estimateSwapExactAmountOutQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.estimateSwapExactAmountOut(request); - }, options); - }; - return { - usePools, - useNumPools, - useTotalLiquidity, - /** - * PoolsWithFilter allows you to query specific pools with requested - * parameters - */ - usePoolsWithFilter, - /** Per Pool gRPC Endpoints */usePool, - /** - * PoolType returns the type of the pool. - * Returns "Balancer" as a string literal when the pool is a balancer pool. - * Errors if the pool is failed to be type caseted. - */ - usePoolType, - /** - * Simulates joining pool without a swap. Returns the amount of shares you'd - * get and tokens needed to provide - */ - useCalcJoinPoolNoSwapShares, - useCalcJoinPoolShares, - useCalcExitPoolCoinsFromShares, - usePoolParams, - useTotalPoolLiquidity, - useTotalShares, - /** - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - useSpotPrice, - /** Estimate the swap. */useEstimateSwapExactAmountIn, - useEstimateSwapExactAmountOut - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryPoolsStore { - store = new QueryStore(queryService?.pools); - pools(request: QueryPoolsRequest) { - return this.store.getData(request); - } - } - class QueryNumPoolsStore { - store = new QueryStore(queryService?.numPools); - numPools(request: QueryNumPoolsRequest) { - return this.store.getData(request); - } - } - class QueryTotalLiquidityStore { - store = new QueryStore(queryService?.totalLiquidity); - totalLiquidity(request: QueryTotalLiquidityRequest) { - return this.store.getData(request); - } - } - class QueryPoolsWithFilterStore { - store = new QueryStore(queryService?.poolsWithFilter); - poolsWithFilter(request: QueryPoolsWithFilterRequest) { - return this.store.getData(request); - } - } - class QueryPoolStore { - store = new QueryStore(queryService?.pool); - pool(request: QueryPoolRequest) { - return this.store.getData(request); - } - } - class QueryPoolTypeStore { - store = new QueryStore(queryService?.poolType); - poolType(request: QueryPoolTypeRequest) { - return this.store.getData(request); - } - } - class QueryCalcJoinPoolNoSwapSharesStore { - store = new QueryStore(queryService?.calcJoinPoolNoSwapShares); - calcJoinPoolNoSwapShares(request: QueryCalcJoinPoolNoSwapSharesRequest) { - return this.store.getData(request); - } - } - class QueryCalcJoinPoolSharesStore { - store = new QueryStore(queryService?.calcJoinPoolShares); - calcJoinPoolShares(request: QueryCalcJoinPoolSharesRequest) { - return this.store.getData(request); - } - } - class QueryCalcExitPoolCoinsFromSharesStore { - store = new QueryStore(queryService?.calcExitPoolCoinsFromShares); - calcExitPoolCoinsFromShares(request: QueryCalcExitPoolCoinsFromSharesRequest) { - return this.store.getData(request); - } - } - class QueryPoolParamsStore { - store = new QueryStore(queryService?.poolParams); - poolParams(request: QueryPoolParamsRequest) { - return this.store.getData(request); - } - } - class QueryTotalPoolLiquidityStore { - store = new QueryStore(queryService?.totalPoolLiquidity); - totalPoolLiquidity(request: QueryTotalPoolLiquidityRequest) { - return this.store.getData(request); - } - } - class QueryTotalSharesStore { - store = new QueryStore(queryService?.totalShares); - totalShares(request: QueryTotalSharesRequest) { - return this.store.getData(request); - } - } - class QuerySpotPriceStore { - store = new QueryStore(queryService?.spotPrice); - spotPrice(request: QuerySpotPriceRequest) { - return this.store.getData(request); - } - } - class QueryEstimateSwapExactAmountInStore { - store = new QueryStore(queryService?.estimateSwapExactAmountIn); - estimateSwapExactAmountIn(request: QuerySwapExactAmountInRequest) { - return this.store.getData(request); - } - } - class QueryEstimateSwapExactAmountOutStore { - store = new QueryStore(queryService?.estimateSwapExactAmountOut); - estimateSwapExactAmountOut(request: QuerySwapExactAmountOutRequest) { - return this.store.getData(request); - } - } - return { - QueryPoolsStore, - QueryNumPoolsStore, - QueryTotalLiquidityStore, - /** - * PoolsWithFilter allows you to query specific pools with requested - * parameters - */ - QueryPoolsWithFilterStore, - /** Per Pool gRPC Endpoints */QueryPoolStore, - /** - * PoolType returns the type of the pool. - * Returns "Balancer" as a string literal when the pool is a balancer pool. - * Errors if the pool is failed to be type caseted. - */ - QueryPoolTypeStore, - /** - * Simulates joining pool without a swap. Returns the amount of shares you'd - * get and tokens needed to provide - */ - QueryCalcJoinPoolNoSwapSharesStore, - QueryCalcJoinPoolSharesStore, - QueryCalcExitPoolCoinsFromSharesStore, - QueryPoolParamsStore, - QueryTotalPoolLiquidityStore, - QueryTotalSharesStore, - /** - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - QuerySpotPriceStore, - /** Estimate the swap. */QueryEstimateSwapExactAmountInStore, - QueryEstimateSwapExactAmountOutStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/query.ts deleted file mode 100644 index 86197620..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/query.ts +++ /dev/null @@ -1,3619 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination"; -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { SwapAmountInRoute, SwapAmountInRouteAmino, SwapAmountInRouteSDKType, SwapAmountOutRoute, SwapAmountOutRouteAmino, SwapAmountOutRouteSDKType } from "./tx"; -import { Any, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** =============================== Pool */ -export interface QueryPoolRequest { - poolId: bigint; -} -export interface QueryPoolRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolRequest"; - value: Uint8Array; -} -/** =============================== Pool */ -export interface QueryPoolRequestAmino { - pool_id: string; -} -export interface QueryPoolRequestAminoMsg { - type: "osmosis/gamm/query-pool-request"; - value: QueryPoolRequestAmino; -} -/** =============================== Pool */ -export interface QueryPoolRequestSDKType { - pool_id: bigint; -} -export interface QueryPoolResponse { - pool: Any | undefined; -} -export interface QueryPoolResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolResponse"; - value: Uint8Array; -} -export interface QueryPoolResponseAmino { - pool?: AnyAmino | undefined; -} -export interface QueryPoolResponseAminoMsg { - type: "osmosis/gamm/query-pool-response"; - value: QueryPoolResponseAmino; -} -export interface QueryPoolResponseSDKType { - pool: AnySDKType | undefined; -} -/** =============================== Pools */ -export interface QueryPoolsRequest { - /** pagination defines an optional pagination for the request. */ - pagination: PageRequest | undefined; -} -export interface QueryPoolsRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsRequest"; - value: Uint8Array; -} -/** =============================== Pools */ -export interface QueryPoolsRequestAmino { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequestAmino | undefined; -} -export interface QueryPoolsRequestAminoMsg { - type: "osmosis/gamm/query-pools-request"; - value: QueryPoolsRequestAmino; -} -/** =============================== Pools */ -export interface QueryPoolsRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -export interface QueryPoolsResponse { - pools: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryPoolsResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsResponse"; - value: Uint8Array; -} -export interface QueryPoolsResponseAmino { - pools: AnyAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryPoolsResponseAminoMsg { - type: "osmosis/gamm/query-pools-response"; - value: QueryPoolsResponseAmino; -} -export interface QueryPoolsResponseSDKType { - pools: AnySDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** =============================== NumPools */ -export interface QueryNumPoolsRequest {} -export interface QueryNumPoolsRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryNumPoolsRequest"; - value: Uint8Array; -} -/** =============================== NumPools */ -export interface QueryNumPoolsRequestAmino {} -export interface QueryNumPoolsRequestAminoMsg { - type: "osmosis/gamm/query-num-pools-request"; - value: QueryNumPoolsRequestAmino; -} -/** =============================== NumPools */ -export interface QueryNumPoolsRequestSDKType {} -export interface QueryNumPoolsResponse { - numPools: bigint; -} -export interface QueryNumPoolsResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryNumPoolsResponse"; - value: Uint8Array; -} -export interface QueryNumPoolsResponseAmino { - num_pools: string; -} -export interface QueryNumPoolsResponseAminoMsg { - type: "osmosis/gamm/query-num-pools-response"; - value: QueryNumPoolsResponseAmino; -} -export interface QueryNumPoolsResponseSDKType { - num_pools: bigint; -} -/** =============================== PoolType */ -export interface QueryPoolTypeRequest { - poolId: bigint; -} -export interface QueryPoolTypeRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolTypeRequest"; - value: Uint8Array; -} -/** =============================== PoolType */ -export interface QueryPoolTypeRequestAmino { - pool_id: string; -} -export interface QueryPoolTypeRequestAminoMsg { - type: "osmosis/gamm/query-pool-type-request"; - value: QueryPoolTypeRequestAmino; -} -/** =============================== PoolType */ -export interface QueryPoolTypeRequestSDKType { - pool_id: bigint; -} -export interface QueryPoolTypeResponse { - poolType: string; -} -export interface QueryPoolTypeResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolTypeResponse"; - value: Uint8Array; -} -export interface QueryPoolTypeResponseAmino { - pool_type: string; -} -export interface QueryPoolTypeResponseAminoMsg { - type: "osmosis/gamm/query-pool-type-response"; - value: QueryPoolTypeResponseAmino; -} -export interface QueryPoolTypeResponseSDKType { - pool_type: string; -} -/** =============================== CalcJoinPoolShares */ -export interface QueryCalcJoinPoolSharesRequest { - poolId: bigint; - tokensIn: Coin[]; -} -export interface QueryCalcJoinPoolSharesRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesRequest"; - value: Uint8Array; -} -/** =============================== CalcJoinPoolShares */ -export interface QueryCalcJoinPoolSharesRequestAmino { - pool_id: string; - tokens_in: CoinAmino[]; -} -export interface QueryCalcJoinPoolSharesRequestAminoMsg { - type: "osmosis/gamm/query-calc-join-pool-shares-request"; - value: QueryCalcJoinPoolSharesRequestAmino; -} -/** =============================== CalcJoinPoolShares */ -export interface QueryCalcJoinPoolSharesRequestSDKType { - pool_id: bigint; - tokens_in: CoinSDKType[]; -} -export interface QueryCalcJoinPoolSharesResponse { - shareOutAmount: string; - tokensOut: Coin[]; -} -export interface QueryCalcJoinPoolSharesResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesResponse"; - value: Uint8Array; -} -export interface QueryCalcJoinPoolSharesResponseAmino { - share_out_amount: string; - tokens_out: CoinAmino[]; -} -export interface QueryCalcJoinPoolSharesResponseAminoMsg { - type: "osmosis/gamm/query-calc-join-pool-shares-response"; - value: QueryCalcJoinPoolSharesResponseAmino; -} -export interface QueryCalcJoinPoolSharesResponseSDKType { - share_out_amount: string; - tokens_out: CoinSDKType[]; -} -/** =============================== CalcExitPoolCoinsFromShares */ -export interface QueryCalcExitPoolCoinsFromSharesRequest { - poolId: bigint; - shareInAmount: string; -} -export interface QueryCalcExitPoolCoinsFromSharesRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesRequest"; - value: Uint8Array; -} -/** =============================== CalcExitPoolCoinsFromShares */ -export interface QueryCalcExitPoolCoinsFromSharesRequestAmino { - pool_id: string; - share_in_amount: string; -} -export interface QueryCalcExitPoolCoinsFromSharesRequestAminoMsg { - type: "osmosis/gamm/query-calc-exit-pool-coins-from-shares-request"; - value: QueryCalcExitPoolCoinsFromSharesRequestAmino; -} -/** =============================== CalcExitPoolCoinsFromShares */ -export interface QueryCalcExitPoolCoinsFromSharesRequestSDKType { - pool_id: bigint; - share_in_amount: string; -} -export interface QueryCalcExitPoolCoinsFromSharesResponse { - tokensOut: Coin[]; -} -export interface QueryCalcExitPoolCoinsFromSharesResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesResponse"; - value: Uint8Array; -} -export interface QueryCalcExitPoolCoinsFromSharesResponseAmino { - tokens_out: CoinAmino[]; -} -export interface QueryCalcExitPoolCoinsFromSharesResponseAminoMsg { - type: "osmosis/gamm/query-calc-exit-pool-coins-from-shares-response"; - value: QueryCalcExitPoolCoinsFromSharesResponseAmino; -} -export interface QueryCalcExitPoolCoinsFromSharesResponseSDKType { - tokens_out: CoinSDKType[]; -} -/** =============================== PoolParams */ -export interface QueryPoolParamsRequest { - poolId: bigint; -} -export interface QueryPoolParamsRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolParamsRequest"; - value: Uint8Array; -} -/** =============================== PoolParams */ -export interface QueryPoolParamsRequestAmino { - pool_id: string; -} -export interface QueryPoolParamsRequestAminoMsg { - type: "osmosis/gamm/query-pool-params-request"; - value: QueryPoolParamsRequestAmino; -} -/** =============================== PoolParams */ -export interface QueryPoolParamsRequestSDKType { - pool_id: bigint; -} -export interface QueryPoolParamsResponse { - params: Any | undefined; -} -export interface QueryPoolParamsResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolParamsResponse"; - value: Uint8Array; -} -export interface QueryPoolParamsResponseAmino { - params?: AnyAmino | undefined; -} -export interface QueryPoolParamsResponseAminoMsg { - type: "osmosis/gamm/query-pool-params-response"; - value: QueryPoolParamsResponseAmino; -} -export interface QueryPoolParamsResponseSDKType { - params: AnySDKType | undefined; -} -/** =============================== PoolLiquidity */ -export interface QueryTotalPoolLiquidityRequest { - poolId: bigint; -} -export interface QueryTotalPoolLiquidityRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest"; - value: Uint8Array; -} -/** =============================== PoolLiquidity */ -export interface QueryTotalPoolLiquidityRequestAmino { - pool_id: string; -} -export interface QueryTotalPoolLiquidityRequestAminoMsg { - type: "osmosis/gamm/query-total-pool-liquidity-request"; - value: QueryTotalPoolLiquidityRequestAmino; -} -/** =============================== PoolLiquidity */ -export interface QueryTotalPoolLiquidityRequestSDKType { - pool_id: bigint; -} -export interface QueryTotalPoolLiquidityResponse { - liquidity: Coin[]; -} -export interface QueryTotalPoolLiquidityResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse"; - value: Uint8Array; -} -export interface QueryTotalPoolLiquidityResponseAmino { - liquidity: CoinAmino[]; -} -export interface QueryTotalPoolLiquidityResponseAminoMsg { - type: "osmosis/gamm/query-total-pool-liquidity-response"; - value: QueryTotalPoolLiquidityResponseAmino; -} -export interface QueryTotalPoolLiquidityResponseSDKType { - liquidity: CoinSDKType[]; -} -/** =============================== TotalShares */ -export interface QueryTotalSharesRequest { - poolId: bigint; -} -export interface QueryTotalSharesRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalSharesRequest"; - value: Uint8Array; -} -/** =============================== TotalShares */ -export interface QueryTotalSharesRequestAmino { - pool_id: string; -} -export interface QueryTotalSharesRequestAminoMsg { - type: "osmosis/gamm/query-total-shares-request"; - value: QueryTotalSharesRequestAmino; -} -/** =============================== TotalShares */ -export interface QueryTotalSharesRequestSDKType { - pool_id: bigint; -} -export interface QueryTotalSharesResponse { - totalShares: Coin | undefined; -} -export interface QueryTotalSharesResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalSharesResponse"; - value: Uint8Array; -} -export interface QueryTotalSharesResponseAmino { - total_shares?: CoinAmino | undefined; -} -export interface QueryTotalSharesResponseAminoMsg { - type: "osmosis/gamm/query-total-shares-response"; - value: QueryTotalSharesResponseAmino; -} -export interface QueryTotalSharesResponseSDKType { - total_shares: CoinSDKType | undefined; -} -/** =============================== CalcJoinPoolNoSwapShares */ -export interface QueryCalcJoinPoolNoSwapSharesRequest { - poolId: bigint; - tokensIn: Coin[]; -} -export interface QueryCalcJoinPoolNoSwapSharesRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest"; - value: Uint8Array; -} -/** =============================== CalcJoinPoolNoSwapShares */ -export interface QueryCalcJoinPoolNoSwapSharesRequestAmino { - pool_id: string; - tokens_in: CoinAmino[]; -} -export interface QueryCalcJoinPoolNoSwapSharesRequestAminoMsg { - type: "osmosis/gamm/query-calc-join-pool-no-swap-shares-request"; - value: QueryCalcJoinPoolNoSwapSharesRequestAmino; -} -/** =============================== CalcJoinPoolNoSwapShares */ -export interface QueryCalcJoinPoolNoSwapSharesRequestSDKType { - pool_id: bigint; - tokens_in: CoinSDKType[]; -} -export interface QueryCalcJoinPoolNoSwapSharesResponse { - tokensOut: Coin[]; - sharesOut: string; -} -export interface QueryCalcJoinPoolNoSwapSharesResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse"; - value: Uint8Array; -} -export interface QueryCalcJoinPoolNoSwapSharesResponseAmino { - tokens_out: CoinAmino[]; - shares_out: string; -} -export interface QueryCalcJoinPoolNoSwapSharesResponseAminoMsg { - type: "osmosis/gamm/query-calc-join-pool-no-swap-shares-response"; - value: QueryCalcJoinPoolNoSwapSharesResponseAmino; -} -export interface QueryCalcJoinPoolNoSwapSharesResponseSDKType { - tokens_out: CoinSDKType[]; - shares_out: string; -} -/** - * QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice - * query. - */ -/** @deprecated */ -export interface QuerySpotPriceRequest { - poolId: bigint; - baseAssetDenom: string; - quoteAssetDenom: string; -} -export interface QuerySpotPriceRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QuerySpotPriceRequest"; - value: Uint8Array; -} -/** - * QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice - * query. - */ -/** @deprecated */ -export interface QuerySpotPriceRequestAmino { - pool_id: string; - base_asset_denom: string; - quote_asset_denom: string; -} -export interface QuerySpotPriceRequestAminoMsg { - type: "osmosis/gamm/query-spot-price-request"; - value: QuerySpotPriceRequestAmino; -} -/** - * QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice - * query. - */ -/** @deprecated */ -export interface QuerySpotPriceRequestSDKType { - pool_id: bigint; - base_asset_denom: string; - quote_asset_denom: string; -} -export interface QueryPoolsWithFilterRequest { - minLiquidity: Coin[]; - poolType: string; - pagination: PageRequest | undefined; -} -export interface QueryPoolsWithFilterRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsWithFilterRequest"; - value: Uint8Array; -} -export interface QueryPoolsWithFilterRequestAmino { - min_liquidity: CoinAmino[]; - pool_type: string; - pagination?: PageRequestAmino | undefined; -} -export interface QueryPoolsWithFilterRequestAminoMsg { - type: "osmosis/gamm/query-pools-with-filter-request"; - value: QueryPoolsWithFilterRequestAmino; -} -export interface QueryPoolsWithFilterRequestSDKType { - min_liquidity: CoinSDKType[]; - pool_type: string; - pagination: PageRequestSDKType | undefined; -} -export interface QueryPoolsWithFilterResponse { - pools: Any[]; - /** pagination defines the pagination in the response. */ - pagination: PageResponse | undefined; -} -export interface QueryPoolsWithFilterResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsWithFilterResponse"; - value: Uint8Array; -} -export interface QueryPoolsWithFilterResponseAmino { - pools: AnyAmino[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponseAmino | undefined; -} -export interface QueryPoolsWithFilterResponseAminoMsg { - type: "osmosis/gamm/query-pools-with-filter-response"; - value: QueryPoolsWithFilterResponseAmino; -} -export interface QueryPoolsWithFilterResponseSDKType { - pools: AnySDKType[]; - pagination: PageResponseSDKType | undefined; -} -/** - * QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice - * query. - */ -/** @deprecated */ -export interface QuerySpotPriceResponse { - /** String of the Dec. Ex) 10.203uatom */ - spotPrice: string; -} -export interface QuerySpotPriceResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QuerySpotPriceResponse"; - value: Uint8Array; -} -/** - * QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice - * query. - */ -/** @deprecated */ -export interface QuerySpotPriceResponseAmino { - /** String of the Dec. Ex) 10.203uatom */ - spot_price: string; -} -export interface QuerySpotPriceResponseAminoMsg { - type: "osmosis/gamm/query-spot-price-response"; - value: QuerySpotPriceResponseAmino; -} -/** - * QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice - * query. - */ -/** @deprecated */ -export interface QuerySpotPriceResponseSDKType { - spot_price: string; -} -/** =============================== EstimateSwapExactAmountIn */ -export interface QuerySwapExactAmountInRequest { - /** TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE */ - sender: string; - poolId: bigint; - tokenIn: string; - routes: SwapAmountInRoute[]; -} -export interface QuerySwapExactAmountInRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest"; - value: Uint8Array; -} -/** =============================== EstimateSwapExactAmountIn */ -export interface QuerySwapExactAmountInRequestAmino { - /** TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE */ - sender: string; - pool_id: string; - token_in: string; - routes: SwapAmountInRouteAmino[]; -} -export interface QuerySwapExactAmountInRequestAminoMsg { - type: "osmosis/gamm/query-swap-exact-amount-in-request"; - value: QuerySwapExactAmountInRequestAmino; -} -/** =============================== EstimateSwapExactAmountIn */ -export interface QuerySwapExactAmountInRequestSDKType { - sender: string; - pool_id: bigint; - token_in: string; - routes: SwapAmountInRouteSDKType[]; -} -export interface QuerySwapExactAmountInResponse { - tokenOutAmount: string; -} -export interface QuerySwapExactAmountInResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountInResponse"; - value: Uint8Array; -} -export interface QuerySwapExactAmountInResponseAmino { - token_out_amount: string; -} -export interface QuerySwapExactAmountInResponseAminoMsg { - type: "osmosis/gamm/query-swap-exact-amount-in-response"; - value: QuerySwapExactAmountInResponseAmino; -} -export interface QuerySwapExactAmountInResponseSDKType { - token_out_amount: string; -} -/** =============================== EstimateSwapExactAmountOut */ -export interface QuerySwapExactAmountOutRequest { - /** TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE */ - sender: string; - poolId: bigint; - routes: SwapAmountOutRoute[]; - tokenOut: string; -} -export interface QuerySwapExactAmountOutRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountOutRequest"; - value: Uint8Array; -} -/** =============================== EstimateSwapExactAmountOut */ -export interface QuerySwapExactAmountOutRequestAmino { - /** TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE */ - sender: string; - pool_id: string; - routes: SwapAmountOutRouteAmino[]; - token_out: string; -} -export interface QuerySwapExactAmountOutRequestAminoMsg { - type: "osmosis/gamm/query-swap-exact-amount-out-request"; - value: QuerySwapExactAmountOutRequestAmino; -} -/** =============================== EstimateSwapExactAmountOut */ -export interface QuerySwapExactAmountOutRequestSDKType { - sender: string; - pool_id: bigint; - routes: SwapAmountOutRouteSDKType[]; - token_out: string; -} -export interface QuerySwapExactAmountOutResponse { - tokenInAmount: string; -} -export interface QuerySwapExactAmountOutResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountOutResponse"; - value: Uint8Array; -} -export interface QuerySwapExactAmountOutResponseAmino { - token_in_amount: string; -} -export interface QuerySwapExactAmountOutResponseAminoMsg { - type: "osmosis/gamm/query-swap-exact-amount-out-response"; - value: QuerySwapExactAmountOutResponseAmino; -} -export interface QuerySwapExactAmountOutResponseSDKType { - token_in_amount: string; -} -export interface QueryTotalLiquidityRequest {} -export interface QueryTotalLiquidityRequestProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalLiquidityRequest"; - value: Uint8Array; -} -export interface QueryTotalLiquidityRequestAmino {} -export interface QueryTotalLiquidityRequestAminoMsg { - type: "osmosis/gamm/query-total-liquidity-request"; - value: QueryTotalLiquidityRequestAmino; -} -export interface QueryTotalLiquidityRequestSDKType {} -export interface QueryTotalLiquidityResponse { - liquidity: Coin[]; -} -export interface QueryTotalLiquidityResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalLiquidityResponse"; - value: Uint8Array; -} -export interface QueryTotalLiquidityResponseAmino { - liquidity: CoinAmino[]; -} -export interface QueryTotalLiquidityResponseAminoMsg { - type: "osmosis/gamm/query-total-liquidity-response"; - value: QueryTotalLiquidityResponseAmino; -} -export interface QueryTotalLiquidityResponseSDKType { - liquidity: CoinSDKType[]; -} -function createBaseQueryPoolRequest(): QueryPoolRequest { - return { - poolId: BigInt(0) - }; -} -export const QueryPoolRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolRequest", - aminoType: "osmosis/gamm/query-pool-request", - encode(message: QueryPoolRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryPoolRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolRequest { - const message = createBaseQueryPoolRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryPoolRequestSDKType): QueryPoolRequest { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: QueryPoolRequest): QueryPoolRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: QueryPoolRequestAmino): QueryPoolRequest { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: QueryPoolRequest): QueryPoolRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolRequestAminoMsg): QueryPoolRequest { - return QueryPoolRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolRequest): QueryPoolRequestAminoMsg { - return { - type: "osmosis/gamm/query-pool-request", - value: QueryPoolRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolRequestProtoMsg): QueryPoolRequest { - return QueryPoolRequest.decode(message.value); - }, - toProto(message: QueryPoolRequest): Uint8Array { - return QueryPoolRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolRequest): QueryPoolRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolRequest", - value: QueryPoolRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolResponse(): QueryPoolResponse { - return { - pool: Any.fromPartial({}) - }; -} -export const QueryPoolResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolResponse", - aminoType: "osmosis/gamm/query-pool-response", - encode(message: QueryPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pool !== undefined) { - Any.encode(message.pool, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pool = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolResponse { - return { - pool: isSet(object.pool) ? Any.fromJSON(object.pool) : undefined - }; - }, - toJSON(message: QueryPoolResponse): unknown { - const obj: any = {}; - message.pool !== undefined && (obj.pool = message.pool ? Any.toJSON(message.pool) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolResponse { - const message = createBaseQueryPoolResponse(); - message.pool = object.pool !== undefined && object.pool !== null ? Any.fromPartial(object.pool) : undefined; - return message; - }, - fromSDK(object: QueryPoolResponseSDKType): QueryPoolResponse { - return { - pool: object.pool ? Any.fromSDK(object.pool) : undefined - }; - }, - toSDK(message: QueryPoolResponse): QueryPoolResponseSDKType { - const obj: any = {}; - message.pool !== undefined && (obj.pool = message.pool ? Any.toSDK(message.pool) : undefined); - return obj; - }, - fromAmino(object: QueryPoolResponseAmino): QueryPoolResponse { - return { - pool: object?.pool ? Any.fromAmino(object.pool) : undefined - }; - }, - toAmino(message: QueryPoolResponse): QueryPoolResponseAmino { - const obj: any = {}; - obj.pool = message.pool ? Any.toAmino(message.pool) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolResponseAminoMsg): QueryPoolResponse { - return QueryPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolResponse): QueryPoolResponseAminoMsg { - return { - type: "osmosis/gamm/query-pool-response", - value: QueryPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolResponseProtoMsg): QueryPoolResponse { - return QueryPoolResponse.decode(message.value); - }, - toProto(message: QueryPoolResponse): Uint8Array { - return QueryPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolResponse): QueryPoolResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolResponse", - value: QueryPoolResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPoolsRequest(): QueryPoolsRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryPoolsRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsRequest", - aminoType: "osmosis/gamm/query-pools-request", - encode(message: QueryPoolsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolsRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPoolsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolsRequest { - const message = createBaseQueryPoolsRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPoolsRequestSDKType): QueryPoolsRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPoolsRequest): QueryPoolsRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPoolsRequestAmino): QueryPoolsRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPoolsRequest): QueryPoolsRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolsRequestAminoMsg): QueryPoolsRequest { - return QueryPoolsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolsRequest): QueryPoolsRequestAminoMsg { - return { - type: "osmosis/gamm/query-pools-request", - value: QueryPoolsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolsRequestProtoMsg): QueryPoolsRequest { - return QueryPoolsRequest.decode(message.value); - }, - toProto(message: QueryPoolsRequest): Uint8Array { - return QueryPoolsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolsRequest): QueryPoolsRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsRequest", - value: QueryPoolsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolsResponse(): QueryPoolsResponse { - return { - pools: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryPoolsResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsResponse", - aminoType: "osmosis/gamm/query-pools-response", - encode(message: QueryPoolsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pools) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pools.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolsResponse { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPoolsResponse): unknown { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.pools = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolsResponse { - const message = createBaseQueryPoolsResponse(); - message.pools = object.pools?.map(e => Any.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPoolsResponseSDKType): QueryPoolsResponse { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPoolsResponse): QueryPoolsResponseSDKType { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.pools = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPoolsResponseAmino): QueryPoolsResponse { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPoolsResponse): QueryPoolsResponseAmino { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.pools = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolsResponseAminoMsg): QueryPoolsResponse { - return QueryPoolsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolsResponse): QueryPoolsResponseAminoMsg { - return { - type: "osmosis/gamm/query-pools-response", - value: QueryPoolsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolsResponseProtoMsg): QueryPoolsResponse { - return QueryPoolsResponse.decode(message.value); - }, - toProto(message: QueryPoolsResponse): Uint8Array { - return QueryPoolsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolsResponse): QueryPoolsResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsResponse", - value: QueryPoolsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryNumPoolsRequest(): QueryNumPoolsRequest { - return {}; -} -export const QueryNumPoolsRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryNumPoolsRequest", - aminoType: "osmosis/gamm/query-num-pools-request", - encode(_: QueryNumPoolsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNumPoolsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNumPoolsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryNumPoolsRequest { - return {}; - }, - toJSON(_: QueryNumPoolsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryNumPoolsRequest { - const message = createBaseQueryNumPoolsRequest(); - return message; - }, - fromSDK(_: QueryNumPoolsRequestSDKType): QueryNumPoolsRequest { - return {}; - }, - toSDK(_: QueryNumPoolsRequest): QueryNumPoolsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryNumPoolsRequestAmino): QueryNumPoolsRequest { - return {}; - }, - toAmino(_: QueryNumPoolsRequest): QueryNumPoolsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryNumPoolsRequestAminoMsg): QueryNumPoolsRequest { - return QueryNumPoolsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryNumPoolsRequest): QueryNumPoolsRequestAminoMsg { - return { - type: "osmosis/gamm/query-num-pools-request", - value: QueryNumPoolsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNumPoolsRequestProtoMsg): QueryNumPoolsRequest { - return QueryNumPoolsRequest.decode(message.value); - }, - toProto(message: QueryNumPoolsRequest): Uint8Array { - return QueryNumPoolsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryNumPoolsRequest): QueryNumPoolsRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryNumPoolsRequest", - value: QueryNumPoolsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryNumPoolsResponse(): QueryNumPoolsResponse { - return { - numPools: BigInt(0) - }; -} -export const QueryNumPoolsResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryNumPoolsResponse", - aminoType: "osmosis/gamm/query-num-pools-response", - encode(message: QueryNumPoolsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.numPools !== BigInt(0)) { - writer.uint32(8).uint64(message.numPools); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryNumPoolsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNumPoolsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numPools = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryNumPoolsResponse { - return { - numPools: isSet(object.numPools) ? BigInt(object.numPools.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryNumPoolsResponse): unknown { - const obj: any = {}; - message.numPools !== undefined && (obj.numPools = (message.numPools || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryNumPoolsResponse { - const message = createBaseQueryNumPoolsResponse(); - message.numPools = object.numPools !== undefined && object.numPools !== null ? BigInt(object.numPools.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryNumPoolsResponseSDKType): QueryNumPoolsResponse { - return { - numPools: object?.num_pools - }; - }, - toSDK(message: QueryNumPoolsResponse): QueryNumPoolsResponseSDKType { - const obj: any = {}; - obj.num_pools = message.numPools; - return obj; - }, - fromAmino(object: QueryNumPoolsResponseAmino): QueryNumPoolsResponse { - return { - numPools: BigInt(object.num_pools) - }; - }, - toAmino(message: QueryNumPoolsResponse): QueryNumPoolsResponseAmino { - const obj: any = {}; - obj.num_pools = message.numPools ? message.numPools.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryNumPoolsResponseAminoMsg): QueryNumPoolsResponse { - return QueryNumPoolsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryNumPoolsResponse): QueryNumPoolsResponseAminoMsg { - return { - type: "osmosis/gamm/query-num-pools-response", - value: QueryNumPoolsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryNumPoolsResponseProtoMsg): QueryNumPoolsResponse { - return QueryNumPoolsResponse.decode(message.value); - }, - toProto(message: QueryNumPoolsResponse): Uint8Array { - return QueryNumPoolsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryNumPoolsResponse): QueryNumPoolsResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryNumPoolsResponse", - value: QueryNumPoolsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPoolTypeRequest(): QueryPoolTypeRequest { - return { - poolId: BigInt(0) - }; -} -export const QueryPoolTypeRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolTypeRequest", - aminoType: "osmosis/gamm/query-pool-type-request", - encode(message: QueryPoolTypeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolTypeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolTypeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolTypeRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryPoolTypeRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolTypeRequest { - const message = createBaseQueryPoolTypeRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryPoolTypeRequestSDKType): QueryPoolTypeRequest { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: QueryPoolTypeRequest): QueryPoolTypeRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: QueryPoolTypeRequestAmino): QueryPoolTypeRequest { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: QueryPoolTypeRequest): QueryPoolTypeRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolTypeRequestAminoMsg): QueryPoolTypeRequest { - return QueryPoolTypeRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolTypeRequest): QueryPoolTypeRequestAminoMsg { - return { - type: "osmosis/gamm/query-pool-type-request", - value: QueryPoolTypeRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolTypeRequestProtoMsg): QueryPoolTypeRequest { - return QueryPoolTypeRequest.decode(message.value); - }, - toProto(message: QueryPoolTypeRequest): Uint8Array { - return QueryPoolTypeRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolTypeRequest): QueryPoolTypeRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolTypeRequest", - value: QueryPoolTypeRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolTypeResponse(): QueryPoolTypeResponse { - return { - poolType: "" - }; -} -export const QueryPoolTypeResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolTypeResponse", - aminoType: "osmosis/gamm/query-pool-type-response", - encode(message: QueryPoolTypeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolType !== "") { - writer.uint32(10).string(message.poolType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolTypeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolTypeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolTypeResponse { - return { - poolType: isSet(object.poolType) ? String(object.poolType) : "" - }; - }, - toJSON(message: QueryPoolTypeResponse): unknown { - const obj: any = {}; - message.poolType !== undefined && (obj.poolType = message.poolType); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolTypeResponse { - const message = createBaseQueryPoolTypeResponse(); - message.poolType = object.poolType ?? ""; - return message; - }, - fromSDK(object: QueryPoolTypeResponseSDKType): QueryPoolTypeResponse { - return { - poolType: object?.pool_type - }; - }, - toSDK(message: QueryPoolTypeResponse): QueryPoolTypeResponseSDKType { - const obj: any = {}; - obj.pool_type = message.poolType; - return obj; - }, - fromAmino(object: QueryPoolTypeResponseAmino): QueryPoolTypeResponse { - return { - poolType: object.pool_type - }; - }, - toAmino(message: QueryPoolTypeResponse): QueryPoolTypeResponseAmino { - const obj: any = {}; - obj.pool_type = message.poolType; - return obj; - }, - fromAminoMsg(object: QueryPoolTypeResponseAminoMsg): QueryPoolTypeResponse { - return QueryPoolTypeResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolTypeResponse): QueryPoolTypeResponseAminoMsg { - return { - type: "osmosis/gamm/query-pool-type-response", - value: QueryPoolTypeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolTypeResponseProtoMsg): QueryPoolTypeResponse { - return QueryPoolTypeResponse.decode(message.value); - }, - toProto(message: QueryPoolTypeResponse): Uint8Array { - return QueryPoolTypeResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolTypeResponse): QueryPoolTypeResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolTypeResponse", - value: QueryPoolTypeResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCalcJoinPoolSharesRequest(): QueryCalcJoinPoolSharesRequest { - return { - poolId: BigInt(0), - tokensIn: [] - }; -} -export const QueryCalcJoinPoolSharesRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesRequest", - aminoType: "osmosis/gamm/query-calc-join-pool-shares-request", - encode(message: QueryCalcJoinPoolSharesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - for (const v of message.tokensIn) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCalcJoinPoolSharesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCalcJoinPoolSharesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.tokensIn.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCalcJoinPoolSharesRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokensIn: Array.isArray(object?.tokensIn) ? object.tokensIn.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryCalcJoinPoolSharesRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - if (message.tokensIn) { - obj.tokensIn = message.tokensIn.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokensIn = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryCalcJoinPoolSharesRequest { - const message = createBaseQueryCalcJoinPoolSharesRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokensIn = object.tokensIn?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryCalcJoinPoolSharesRequestSDKType): QueryCalcJoinPoolSharesRequest { - return { - poolId: object?.pool_id, - tokensIn: Array.isArray(object?.tokens_in) ? object.tokens_in.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryCalcJoinPoolSharesRequest): QueryCalcJoinPoolSharesRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - if (message.tokensIn) { - obj.tokens_in = message.tokensIn.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.tokens_in = []; - } - return obj; - }, - fromAmino(object: QueryCalcJoinPoolSharesRequestAmino): QueryCalcJoinPoolSharesRequest { - return { - poolId: BigInt(object.pool_id), - tokensIn: Array.isArray(object?.tokens_in) ? object.tokens_in.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryCalcJoinPoolSharesRequest): QueryCalcJoinPoolSharesRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - if (message.tokensIn) { - obj.tokens_in = message.tokensIn.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.tokens_in = []; - } - return obj; - }, - fromAminoMsg(object: QueryCalcJoinPoolSharesRequestAminoMsg): QueryCalcJoinPoolSharesRequest { - return QueryCalcJoinPoolSharesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCalcJoinPoolSharesRequest): QueryCalcJoinPoolSharesRequestAminoMsg { - return { - type: "osmosis/gamm/query-calc-join-pool-shares-request", - value: QueryCalcJoinPoolSharesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCalcJoinPoolSharesRequestProtoMsg): QueryCalcJoinPoolSharesRequest { - return QueryCalcJoinPoolSharesRequest.decode(message.value); - }, - toProto(message: QueryCalcJoinPoolSharesRequest): Uint8Array { - return QueryCalcJoinPoolSharesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCalcJoinPoolSharesRequest): QueryCalcJoinPoolSharesRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesRequest", - value: QueryCalcJoinPoolSharesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCalcJoinPoolSharesResponse(): QueryCalcJoinPoolSharesResponse { - return { - shareOutAmount: "", - tokensOut: [] - }; -} -export const QueryCalcJoinPoolSharesResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesResponse", - aminoType: "osmosis/gamm/query-calc-join-pool-shares-response", - encode(message: QueryCalcJoinPoolSharesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.shareOutAmount !== "") { - writer.uint32(10).string(message.shareOutAmount); - } - for (const v of message.tokensOut) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCalcJoinPoolSharesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCalcJoinPoolSharesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.shareOutAmount = reader.string(); - break; - case 2: - message.tokensOut.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCalcJoinPoolSharesResponse { - return { - shareOutAmount: isSet(object.shareOutAmount) ? String(object.shareOutAmount) : "", - tokensOut: Array.isArray(object?.tokensOut) ? object.tokensOut.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryCalcJoinPoolSharesResponse): unknown { - const obj: any = {}; - message.shareOutAmount !== undefined && (obj.shareOutAmount = message.shareOutAmount); - if (message.tokensOut) { - obj.tokensOut = message.tokensOut.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokensOut = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryCalcJoinPoolSharesResponse { - const message = createBaseQueryCalcJoinPoolSharesResponse(); - message.shareOutAmount = object.shareOutAmount ?? ""; - message.tokensOut = object.tokensOut?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryCalcJoinPoolSharesResponseSDKType): QueryCalcJoinPoolSharesResponse { - return { - shareOutAmount: object?.share_out_amount, - tokensOut: Array.isArray(object?.tokens_out) ? object.tokens_out.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryCalcJoinPoolSharesResponse): QueryCalcJoinPoolSharesResponseSDKType { - const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; - if (message.tokensOut) { - obj.tokens_out = message.tokensOut.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.tokens_out = []; - } - return obj; - }, - fromAmino(object: QueryCalcJoinPoolSharesResponseAmino): QueryCalcJoinPoolSharesResponse { - return { - shareOutAmount: object.share_out_amount, - tokensOut: Array.isArray(object?.tokens_out) ? object.tokens_out.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryCalcJoinPoolSharesResponse): QueryCalcJoinPoolSharesResponseAmino { - const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; - if (message.tokensOut) { - obj.tokens_out = message.tokensOut.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.tokens_out = []; - } - return obj; - }, - fromAminoMsg(object: QueryCalcJoinPoolSharesResponseAminoMsg): QueryCalcJoinPoolSharesResponse { - return QueryCalcJoinPoolSharesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCalcJoinPoolSharesResponse): QueryCalcJoinPoolSharesResponseAminoMsg { - return { - type: "osmosis/gamm/query-calc-join-pool-shares-response", - value: QueryCalcJoinPoolSharesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCalcJoinPoolSharesResponseProtoMsg): QueryCalcJoinPoolSharesResponse { - return QueryCalcJoinPoolSharesResponse.decode(message.value); - }, - toProto(message: QueryCalcJoinPoolSharesResponse): Uint8Array { - return QueryCalcJoinPoolSharesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCalcJoinPoolSharesResponse): QueryCalcJoinPoolSharesResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesResponse", - value: QueryCalcJoinPoolSharesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCalcExitPoolCoinsFromSharesRequest(): QueryCalcExitPoolCoinsFromSharesRequest { - return { - poolId: BigInt(0), - shareInAmount: "" - }; -} -export const QueryCalcExitPoolCoinsFromSharesRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesRequest", - aminoType: "osmosis/gamm/query-calc-exit-pool-coins-from-shares-request", - encode(message: QueryCalcExitPoolCoinsFromSharesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.shareInAmount !== "") { - writer.uint32(18).string(message.shareInAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCalcExitPoolCoinsFromSharesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCalcExitPoolCoinsFromSharesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.shareInAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCalcExitPoolCoinsFromSharesRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - shareInAmount: isSet(object.shareInAmount) ? String(object.shareInAmount) : "" - }; - }, - toJSON(message: QueryCalcExitPoolCoinsFromSharesRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.shareInAmount !== undefined && (obj.shareInAmount = message.shareInAmount); - return obj; - }, - fromPartial(object: DeepPartial): QueryCalcExitPoolCoinsFromSharesRequest { - const message = createBaseQueryCalcExitPoolCoinsFromSharesRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.shareInAmount = object.shareInAmount ?? ""; - return message; - }, - fromSDK(object: QueryCalcExitPoolCoinsFromSharesRequestSDKType): QueryCalcExitPoolCoinsFromSharesRequest { - return { - poolId: object?.pool_id, - shareInAmount: object?.share_in_amount - }; - }, - toSDK(message: QueryCalcExitPoolCoinsFromSharesRequest): QueryCalcExitPoolCoinsFromSharesRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.share_in_amount = message.shareInAmount; - return obj; - }, - fromAmino(object: QueryCalcExitPoolCoinsFromSharesRequestAmino): QueryCalcExitPoolCoinsFromSharesRequest { - return { - poolId: BigInt(object.pool_id), - shareInAmount: object.share_in_amount - }; - }, - toAmino(message: QueryCalcExitPoolCoinsFromSharesRequest): QueryCalcExitPoolCoinsFromSharesRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.share_in_amount = message.shareInAmount; - return obj; - }, - fromAminoMsg(object: QueryCalcExitPoolCoinsFromSharesRequestAminoMsg): QueryCalcExitPoolCoinsFromSharesRequest { - return QueryCalcExitPoolCoinsFromSharesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCalcExitPoolCoinsFromSharesRequest): QueryCalcExitPoolCoinsFromSharesRequestAminoMsg { - return { - type: "osmosis/gamm/query-calc-exit-pool-coins-from-shares-request", - value: QueryCalcExitPoolCoinsFromSharesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCalcExitPoolCoinsFromSharesRequestProtoMsg): QueryCalcExitPoolCoinsFromSharesRequest { - return QueryCalcExitPoolCoinsFromSharesRequest.decode(message.value); - }, - toProto(message: QueryCalcExitPoolCoinsFromSharesRequest): Uint8Array { - return QueryCalcExitPoolCoinsFromSharesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCalcExitPoolCoinsFromSharesRequest): QueryCalcExitPoolCoinsFromSharesRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesRequest", - value: QueryCalcExitPoolCoinsFromSharesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCalcExitPoolCoinsFromSharesResponse(): QueryCalcExitPoolCoinsFromSharesResponse { - return { - tokensOut: [] - }; -} -export const QueryCalcExitPoolCoinsFromSharesResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesResponse", - aminoType: "osmosis/gamm/query-calc-exit-pool-coins-from-shares-response", - encode(message: QueryCalcExitPoolCoinsFromSharesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.tokensOut) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCalcExitPoolCoinsFromSharesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCalcExitPoolCoinsFromSharesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokensOut.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCalcExitPoolCoinsFromSharesResponse { - return { - tokensOut: Array.isArray(object?.tokensOut) ? object.tokensOut.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryCalcExitPoolCoinsFromSharesResponse): unknown { - const obj: any = {}; - if (message.tokensOut) { - obj.tokensOut = message.tokensOut.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokensOut = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryCalcExitPoolCoinsFromSharesResponse { - const message = createBaseQueryCalcExitPoolCoinsFromSharesResponse(); - message.tokensOut = object.tokensOut?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryCalcExitPoolCoinsFromSharesResponseSDKType): QueryCalcExitPoolCoinsFromSharesResponse { - return { - tokensOut: Array.isArray(object?.tokens_out) ? object.tokens_out.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryCalcExitPoolCoinsFromSharesResponse): QueryCalcExitPoolCoinsFromSharesResponseSDKType { - const obj: any = {}; - if (message.tokensOut) { - obj.tokens_out = message.tokensOut.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.tokens_out = []; - } - return obj; - }, - fromAmino(object: QueryCalcExitPoolCoinsFromSharesResponseAmino): QueryCalcExitPoolCoinsFromSharesResponse { - return { - tokensOut: Array.isArray(object?.tokens_out) ? object.tokens_out.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryCalcExitPoolCoinsFromSharesResponse): QueryCalcExitPoolCoinsFromSharesResponseAmino { - const obj: any = {}; - if (message.tokensOut) { - obj.tokens_out = message.tokensOut.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.tokens_out = []; - } - return obj; - }, - fromAminoMsg(object: QueryCalcExitPoolCoinsFromSharesResponseAminoMsg): QueryCalcExitPoolCoinsFromSharesResponse { - return QueryCalcExitPoolCoinsFromSharesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCalcExitPoolCoinsFromSharesResponse): QueryCalcExitPoolCoinsFromSharesResponseAminoMsg { - return { - type: "osmosis/gamm/query-calc-exit-pool-coins-from-shares-response", - value: QueryCalcExitPoolCoinsFromSharesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCalcExitPoolCoinsFromSharesResponseProtoMsg): QueryCalcExitPoolCoinsFromSharesResponse { - return QueryCalcExitPoolCoinsFromSharesResponse.decode(message.value); - }, - toProto(message: QueryCalcExitPoolCoinsFromSharesResponse): Uint8Array { - return QueryCalcExitPoolCoinsFromSharesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCalcExitPoolCoinsFromSharesResponse): QueryCalcExitPoolCoinsFromSharesResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesResponse", - value: QueryCalcExitPoolCoinsFromSharesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryPoolParamsRequest(): QueryPoolParamsRequest { - return { - poolId: BigInt(0) - }; -} -export const QueryPoolParamsRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolParamsRequest", - aminoType: "osmosis/gamm/query-pool-params-request", - encode(message: QueryPoolParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolParamsRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryPoolParamsRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolParamsRequest { - const message = createBaseQueryPoolParamsRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryPoolParamsRequestSDKType): QueryPoolParamsRequest { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: QueryPoolParamsRequest): QueryPoolParamsRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: QueryPoolParamsRequestAmino): QueryPoolParamsRequest { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: QueryPoolParamsRequest): QueryPoolParamsRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolParamsRequestAminoMsg): QueryPoolParamsRequest { - return QueryPoolParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolParamsRequest): QueryPoolParamsRequestAminoMsg { - return { - type: "osmosis/gamm/query-pool-params-request", - value: QueryPoolParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolParamsRequestProtoMsg): QueryPoolParamsRequest { - return QueryPoolParamsRequest.decode(message.value); - }, - toProto(message: QueryPoolParamsRequest): Uint8Array { - return QueryPoolParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolParamsRequest): QueryPoolParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolParamsRequest", - value: QueryPoolParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolParamsResponse(): QueryPoolParamsResponse { - return { - params: Any.fromPartial({}) - }; -} -export const QueryPoolParamsResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolParamsResponse", - aminoType: "osmosis/gamm/query-pool-params-response", - encode(message: QueryPoolParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Any.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolParamsResponse { - return { - params: isSet(object.params) ? Any.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryPoolParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Any.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolParamsResponse { - const message = createBaseQueryPoolParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Any.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryPoolParamsResponseSDKType): QueryPoolParamsResponse { - return { - params: object.params ? Any.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryPoolParamsResponse): QueryPoolParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Any.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryPoolParamsResponseAmino): QueryPoolParamsResponse { - return { - params: object?.params ? Any.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryPoolParamsResponse): QueryPoolParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Any.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolParamsResponseAminoMsg): QueryPoolParamsResponse { - return QueryPoolParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolParamsResponse): QueryPoolParamsResponseAminoMsg { - return { - type: "osmosis/gamm/query-pool-params-response", - value: QueryPoolParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolParamsResponseProtoMsg): QueryPoolParamsResponse { - return QueryPoolParamsResponse.decode(message.value); - }, - toProto(message: QueryPoolParamsResponse): Uint8Array { - return QueryPoolParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolParamsResponse): QueryPoolParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolParamsResponse", - value: QueryPoolParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalPoolLiquidityRequest(): QueryTotalPoolLiquidityRequest { - return { - poolId: BigInt(0) - }; -} -export const QueryTotalPoolLiquidityRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest", - aminoType: "osmosis/gamm/query-total-pool-liquidity-request", - encode(message: QueryTotalPoolLiquidityRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalPoolLiquidityRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalPoolLiquidityRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalPoolLiquidityRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryTotalPoolLiquidityRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalPoolLiquidityRequest { - const message = createBaseQueryTotalPoolLiquidityRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryTotalPoolLiquidityRequestSDKType): QueryTotalPoolLiquidityRequest { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: QueryTotalPoolLiquidityRequest): QueryTotalPoolLiquidityRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: QueryTotalPoolLiquidityRequestAmino): QueryTotalPoolLiquidityRequest { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: QueryTotalPoolLiquidityRequest): QueryTotalPoolLiquidityRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryTotalPoolLiquidityRequestAminoMsg): QueryTotalPoolLiquidityRequest { - return QueryTotalPoolLiquidityRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalPoolLiquidityRequest): QueryTotalPoolLiquidityRequestAminoMsg { - return { - type: "osmosis/gamm/query-total-pool-liquidity-request", - value: QueryTotalPoolLiquidityRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalPoolLiquidityRequestProtoMsg): QueryTotalPoolLiquidityRequest { - return QueryTotalPoolLiquidityRequest.decode(message.value); - }, - toProto(message: QueryTotalPoolLiquidityRequest): Uint8Array { - return QueryTotalPoolLiquidityRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalPoolLiquidityRequest): QueryTotalPoolLiquidityRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest", - value: QueryTotalPoolLiquidityRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalPoolLiquidityResponse(): QueryTotalPoolLiquidityResponse { - return { - liquidity: [] - }; -} -export const QueryTotalPoolLiquidityResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse", - aminoType: "osmosis/gamm/query-total-pool-liquidity-response", - encode(message: QueryTotalPoolLiquidityResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.liquidity) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalPoolLiquidityResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalPoolLiquidityResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.liquidity.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalPoolLiquidityResponse { - return { - liquidity: Array.isArray(object?.liquidity) ? object.liquidity.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryTotalPoolLiquidityResponse): unknown { - const obj: any = {}; - if (message.liquidity) { - obj.liquidity = message.liquidity.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.liquidity = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalPoolLiquidityResponse { - const message = createBaseQueryTotalPoolLiquidityResponse(); - message.liquidity = object.liquidity?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryTotalPoolLiquidityResponseSDKType): QueryTotalPoolLiquidityResponse { - return { - liquidity: Array.isArray(object?.liquidity) ? object.liquidity.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryTotalPoolLiquidityResponse): QueryTotalPoolLiquidityResponseSDKType { - const obj: any = {}; - if (message.liquidity) { - obj.liquidity = message.liquidity.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.liquidity = []; - } - return obj; - }, - fromAmino(object: QueryTotalPoolLiquidityResponseAmino): QueryTotalPoolLiquidityResponse { - return { - liquidity: Array.isArray(object?.liquidity) ? object.liquidity.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryTotalPoolLiquidityResponse): QueryTotalPoolLiquidityResponseAmino { - const obj: any = {}; - if (message.liquidity) { - obj.liquidity = message.liquidity.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.liquidity = []; - } - return obj; - }, - fromAminoMsg(object: QueryTotalPoolLiquidityResponseAminoMsg): QueryTotalPoolLiquidityResponse { - return QueryTotalPoolLiquidityResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalPoolLiquidityResponse): QueryTotalPoolLiquidityResponseAminoMsg { - return { - type: "osmosis/gamm/query-total-pool-liquidity-response", - value: QueryTotalPoolLiquidityResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalPoolLiquidityResponseProtoMsg): QueryTotalPoolLiquidityResponse { - return QueryTotalPoolLiquidityResponse.decode(message.value); - }, - toProto(message: QueryTotalPoolLiquidityResponse): Uint8Array { - return QueryTotalPoolLiquidityResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalPoolLiquidityResponse): QueryTotalPoolLiquidityResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse", - value: QueryTotalPoolLiquidityResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalSharesRequest(): QueryTotalSharesRequest { - return { - poolId: BigInt(0) - }; -} -export const QueryTotalSharesRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalSharesRequest", - aminoType: "osmosis/gamm/query-total-shares-request", - encode(message: QueryTotalSharesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalSharesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalSharesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalSharesRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryTotalSharesRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalSharesRequest { - const message = createBaseQueryTotalSharesRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryTotalSharesRequestSDKType): QueryTotalSharesRequest { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: QueryTotalSharesRequest): QueryTotalSharesRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: QueryTotalSharesRequestAmino): QueryTotalSharesRequest { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: QueryTotalSharesRequest): QueryTotalSharesRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryTotalSharesRequestAminoMsg): QueryTotalSharesRequest { - return QueryTotalSharesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalSharesRequest): QueryTotalSharesRequestAminoMsg { - return { - type: "osmosis/gamm/query-total-shares-request", - value: QueryTotalSharesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalSharesRequestProtoMsg): QueryTotalSharesRequest { - return QueryTotalSharesRequest.decode(message.value); - }, - toProto(message: QueryTotalSharesRequest): Uint8Array { - return QueryTotalSharesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalSharesRequest): QueryTotalSharesRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalSharesRequest", - value: QueryTotalSharesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalSharesResponse(): QueryTotalSharesResponse { - return { - totalShares: Coin.fromPartial({}) - }; -} -export const QueryTotalSharesResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalSharesResponse", - aminoType: "osmosis/gamm/query-total-shares-response", - encode(message: QueryTotalSharesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.totalShares !== undefined) { - Coin.encode(message.totalShares, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalSharesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalSharesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalShares = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalSharesResponse { - return { - totalShares: isSet(object.totalShares) ? Coin.fromJSON(object.totalShares) : undefined - }; - }, - toJSON(message: QueryTotalSharesResponse): unknown { - const obj: any = {}; - message.totalShares !== undefined && (obj.totalShares = message.totalShares ? Coin.toJSON(message.totalShares) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalSharesResponse { - const message = createBaseQueryTotalSharesResponse(); - message.totalShares = object.totalShares !== undefined && object.totalShares !== null ? Coin.fromPartial(object.totalShares) : undefined; - return message; - }, - fromSDK(object: QueryTotalSharesResponseSDKType): QueryTotalSharesResponse { - return { - totalShares: object.total_shares ? Coin.fromSDK(object.total_shares) : undefined - }; - }, - toSDK(message: QueryTotalSharesResponse): QueryTotalSharesResponseSDKType { - const obj: any = {}; - message.totalShares !== undefined && (obj.total_shares = message.totalShares ? Coin.toSDK(message.totalShares) : undefined); - return obj; - }, - fromAmino(object: QueryTotalSharesResponseAmino): QueryTotalSharesResponse { - return { - totalShares: object?.total_shares ? Coin.fromAmino(object.total_shares) : undefined - }; - }, - toAmino(message: QueryTotalSharesResponse): QueryTotalSharesResponseAmino { - const obj: any = {}; - obj.total_shares = message.totalShares ? Coin.toAmino(message.totalShares) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTotalSharesResponseAminoMsg): QueryTotalSharesResponse { - return QueryTotalSharesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalSharesResponse): QueryTotalSharesResponseAminoMsg { - return { - type: "osmosis/gamm/query-total-shares-response", - value: QueryTotalSharesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalSharesResponseProtoMsg): QueryTotalSharesResponse { - return QueryTotalSharesResponse.decode(message.value); - }, - toProto(message: QueryTotalSharesResponse): Uint8Array { - return QueryTotalSharesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalSharesResponse): QueryTotalSharesResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalSharesResponse", - value: QueryTotalSharesResponse.encode(message).finish() - }; - } -}; -function createBaseQueryCalcJoinPoolNoSwapSharesRequest(): QueryCalcJoinPoolNoSwapSharesRequest { - return { - poolId: BigInt(0), - tokensIn: [] - }; -} -export const QueryCalcJoinPoolNoSwapSharesRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest", - aminoType: "osmosis/gamm/query-calc-join-pool-no-swap-shares-request", - encode(message: QueryCalcJoinPoolNoSwapSharesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - for (const v of message.tokensIn) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCalcJoinPoolNoSwapSharesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCalcJoinPoolNoSwapSharesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.tokensIn.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCalcJoinPoolNoSwapSharesRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokensIn: Array.isArray(object?.tokensIn) ? object.tokensIn.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryCalcJoinPoolNoSwapSharesRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - if (message.tokensIn) { - obj.tokensIn = message.tokensIn.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokensIn = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryCalcJoinPoolNoSwapSharesRequest { - const message = createBaseQueryCalcJoinPoolNoSwapSharesRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokensIn = object.tokensIn?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryCalcJoinPoolNoSwapSharesRequestSDKType): QueryCalcJoinPoolNoSwapSharesRequest { - return { - poolId: object?.pool_id, - tokensIn: Array.isArray(object?.tokens_in) ? object.tokens_in.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryCalcJoinPoolNoSwapSharesRequest): QueryCalcJoinPoolNoSwapSharesRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - if (message.tokensIn) { - obj.tokens_in = message.tokensIn.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.tokens_in = []; - } - return obj; - }, - fromAmino(object: QueryCalcJoinPoolNoSwapSharesRequestAmino): QueryCalcJoinPoolNoSwapSharesRequest { - return { - poolId: BigInt(object.pool_id), - tokensIn: Array.isArray(object?.tokens_in) ? object.tokens_in.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryCalcJoinPoolNoSwapSharesRequest): QueryCalcJoinPoolNoSwapSharesRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - if (message.tokensIn) { - obj.tokens_in = message.tokensIn.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.tokens_in = []; - } - return obj; - }, - fromAminoMsg(object: QueryCalcJoinPoolNoSwapSharesRequestAminoMsg): QueryCalcJoinPoolNoSwapSharesRequest { - return QueryCalcJoinPoolNoSwapSharesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryCalcJoinPoolNoSwapSharesRequest): QueryCalcJoinPoolNoSwapSharesRequestAminoMsg { - return { - type: "osmosis/gamm/query-calc-join-pool-no-swap-shares-request", - value: QueryCalcJoinPoolNoSwapSharesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCalcJoinPoolNoSwapSharesRequestProtoMsg): QueryCalcJoinPoolNoSwapSharesRequest { - return QueryCalcJoinPoolNoSwapSharesRequest.decode(message.value); - }, - toProto(message: QueryCalcJoinPoolNoSwapSharesRequest): Uint8Array { - return QueryCalcJoinPoolNoSwapSharesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryCalcJoinPoolNoSwapSharesRequest): QueryCalcJoinPoolNoSwapSharesRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest", - value: QueryCalcJoinPoolNoSwapSharesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryCalcJoinPoolNoSwapSharesResponse(): QueryCalcJoinPoolNoSwapSharesResponse { - return { - tokensOut: [], - sharesOut: "" - }; -} -export const QueryCalcJoinPoolNoSwapSharesResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse", - aminoType: "osmosis/gamm/query-calc-join-pool-no-swap-shares-response", - encode(message: QueryCalcJoinPoolNoSwapSharesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.tokensOut) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.sharesOut !== "") { - writer.uint32(18).string(message.sharesOut); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCalcJoinPoolNoSwapSharesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCalcJoinPoolNoSwapSharesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokensOut.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.sharesOut = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCalcJoinPoolNoSwapSharesResponse { - return { - tokensOut: Array.isArray(object?.tokensOut) ? object.tokensOut.map((e: any) => Coin.fromJSON(e)) : [], - sharesOut: isSet(object.sharesOut) ? String(object.sharesOut) : "" - }; - }, - toJSON(message: QueryCalcJoinPoolNoSwapSharesResponse): unknown { - const obj: any = {}; - if (message.tokensOut) { - obj.tokensOut = message.tokensOut.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokensOut = []; - } - message.sharesOut !== undefined && (obj.sharesOut = message.sharesOut); - return obj; - }, - fromPartial(object: DeepPartial): QueryCalcJoinPoolNoSwapSharesResponse { - const message = createBaseQueryCalcJoinPoolNoSwapSharesResponse(); - message.tokensOut = object.tokensOut?.map(e => Coin.fromPartial(e)) || []; - message.sharesOut = object.sharesOut ?? ""; - return message; - }, - fromSDK(object: QueryCalcJoinPoolNoSwapSharesResponseSDKType): QueryCalcJoinPoolNoSwapSharesResponse { - return { - tokensOut: Array.isArray(object?.tokens_out) ? object.tokens_out.map((e: any) => Coin.fromSDK(e)) : [], - sharesOut: object?.shares_out - }; - }, - toSDK(message: QueryCalcJoinPoolNoSwapSharesResponse): QueryCalcJoinPoolNoSwapSharesResponseSDKType { - const obj: any = {}; - if (message.tokensOut) { - obj.tokens_out = message.tokensOut.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.tokens_out = []; - } - obj.shares_out = message.sharesOut; - return obj; - }, - fromAmino(object: QueryCalcJoinPoolNoSwapSharesResponseAmino): QueryCalcJoinPoolNoSwapSharesResponse { - return { - tokensOut: Array.isArray(object?.tokens_out) ? object.tokens_out.map((e: any) => Coin.fromAmino(e)) : [], - sharesOut: object.shares_out - }; - }, - toAmino(message: QueryCalcJoinPoolNoSwapSharesResponse): QueryCalcJoinPoolNoSwapSharesResponseAmino { - const obj: any = {}; - if (message.tokensOut) { - obj.tokens_out = message.tokensOut.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.tokens_out = []; - } - obj.shares_out = message.sharesOut; - return obj; - }, - fromAminoMsg(object: QueryCalcJoinPoolNoSwapSharesResponseAminoMsg): QueryCalcJoinPoolNoSwapSharesResponse { - return QueryCalcJoinPoolNoSwapSharesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryCalcJoinPoolNoSwapSharesResponse): QueryCalcJoinPoolNoSwapSharesResponseAminoMsg { - return { - type: "osmosis/gamm/query-calc-join-pool-no-swap-shares-response", - value: QueryCalcJoinPoolNoSwapSharesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryCalcJoinPoolNoSwapSharesResponseProtoMsg): QueryCalcJoinPoolNoSwapSharesResponse { - return QueryCalcJoinPoolNoSwapSharesResponse.decode(message.value); - }, - toProto(message: QueryCalcJoinPoolNoSwapSharesResponse): Uint8Array { - return QueryCalcJoinPoolNoSwapSharesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryCalcJoinPoolNoSwapSharesResponse): QueryCalcJoinPoolNoSwapSharesResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse", - value: QueryCalcJoinPoolNoSwapSharesResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySpotPriceRequest(): QuerySpotPriceRequest { - return { - poolId: BigInt(0), - baseAssetDenom: "", - quoteAssetDenom: "" - }; -} -export const QuerySpotPriceRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QuerySpotPriceRequest", - aminoType: "osmosis/gamm/query-spot-price-request", - encode(message: QuerySpotPriceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.baseAssetDenom !== "") { - writer.uint32(18).string(message.baseAssetDenom); - } - if (message.quoteAssetDenom !== "") { - writer.uint32(26).string(message.quoteAssetDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySpotPriceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpotPriceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.baseAssetDenom = reader.string(); - break; - case 3: - message.quoteAssetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySpotPriceRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - baseAssetDenom: isSet(object.baseAssetDenom) ? String(object.baseAssetDenom) : "", - quoteAssetDenom: isSet(object.quoteAssetDenom) ? String(object.quoteAssetDenom) : "" - }; - }, - toJSON(message: QuerySpotPriceRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.baseAssetDenom !== undefined && (obj.baseAssetDenom = message.baseAssetDenom); - message.quoteAssetDenom !== undefined && (obj.quoteAssetDenom = message.quoteAssetDenom); - return obj; - }, - fromPartial(object: DeepPartial): QuerySpotPriceRequest { - const message = createBaseQuerySpotPriceRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.baseAssetDenom = object.baseAssetDenom ?? ""; - message.quoteAssetDenom = object.quoteAssetDenom ?? ""; - return message; - }, - fromSDK(object: QuerySpotPriceRequestSDKType): QuerySpotPriceRequest { - return { - poolId: object?.pool_id, - baseAssetDenom: object?.base_asset_denom, - quoteAssetDenom: object?.quote_asset_denom - }; - }, - toSDK(message: QuerySpotPriceRequest): QuerySpotPriceRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.base_asset_denom = message.baseAssetDenom; - obj.quote_asset_denom = message.quoteAssetDenom; - return obj; - }, - fromAmino(object: QuerySpotPriceRequestAmino): QuerySpotPriceRequest { - return { - poolId: BigInt(object.pool_id), - baseAssetDenom: object.base_asset_denom, - quoteAssetDenom: object.quote_asset_denom - }; - }, - toAmino(message: QuerySpotPriceRequest): QuerySpotPriceRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.base_asset_denom = message.baseAssetDenom; - obj.quote_asset_denom = message.quoteAssetDenom; - return obj; - }, - fromAminoMsg(object: QuerySpotPriceRequestAminoMsg): QuerySpotPriceRequest { - return QuerySpotPriceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySpotPriceRequest): QuerySpotPriceRequestAminoMsg { - return { - type: "osmosis/gamm/query-spot-price-request", - value: QuerySpotPriceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySpotPriceRequestProtoMsg): QuerySpotPriceRequest { - return QuerySpotPriceRequest.decode(message.value); - }, - toProto(message: QuerySpotPriceRequest): Uint8Array { - return QuerySpotPriceRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySpotPriceRequest): QuerySpotPriceRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QuerySpotPriceRequest", - value: QuerySpotPriceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolsWithFilterRequest(): QueryPoolsWithFilterRequest { - return { - minLiquidity: [], - poolType: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const QueryPoolsWithFilterRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsWithFilterRequest", - aminoType: "osmosis/gamm/query-pools-with-filter-request", - encode(message: QueryPoolsWithFilterRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.minLiquidity) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.poolType !== "") { - writer.uint32(18).string(message.poolType); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolsWithFilterRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolsWithFilterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minLiquidity.push(Coin.decode(reader, reader.uint32())); - break; - case 2: - message.poolType = reader.string(); - break; - case 3: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolsWithFilterRequest { - return { - minLiquidity: Array.isArray(object?.minLiquidity) ? object.minLiquidity.map((e: any) => Coin.fromJSON(e)) : [], - poolType: isSet(object.poolType) ? String(object.poolType) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPoolsWithFilterRequest): unknown { - const obj: any = {}; - if (message.minLiquidity) { - obj.minLiquidity = message.minLiquidity.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.minLiquidity = []; - } - message.poolType !== undefined && (obj.poolType = message.poolType); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolsWithFilterRequest { - const message = createBaseQueryPoolsWithFilterRequest(); - message.minLiquidity = object.minLiquidity?.map(e => Coin.fromPartial(e)) || []; - message.poolType = object.poolType ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPoolsWithFilterRequestSDKType): QueryPoolsWithFilterRequest { - return { - minLiquidity: Array.isArray(object?.min_liquidity) ? object.min_liquidity.map((e: any) => Coin.fromSDK(e)) : [], - poolType: object?.pool_type, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPoolsWithFilterRequest): QueryPoolsWithFilterRequestSDKType { - const obj: any = {}; - if (message.minLiquidity) { - obj.min_liquidity = message.minLiquidity.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.min_liquidity = []; - } - obj.pool_type = message.poolType; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPoolsWithFilterRequestAmino): QueryPoolsWithFilterRequest { - return { - minLiquidity: Array.isArray(object?.min_liquidity) ? object.min_liquidity.map((e: any) => Coin.fromAmino(e)) : [], - poolType: object.pool_type, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPoolsWithFilterRequest): QueryPoolsWithFilterRequestAmino { - const obj: any = {}; - if (message.minLiquidity) { - obj.min_liquidity = message.minLiquidity.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.min_liquidity = []; - } - obj.pool_type = message.poolType; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolsWithFilterRequestAminoMsg): QueryPoolsWithFilterRequest { - return QueryPoolsWithFilterRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolsWithFilterRequest): QueryPoolsWithFilterRequestAminoMsg { - return { - type: "osmosis/gamm/query-pools-with-filter-request", - value: QueryPoolsWithFilterRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolsWithFilterRequestProtoMsg): QueryPoolsWithFilterRequest { - return QueryPoolsWithFilterRequest.decode(message.value); - }, - toProto(message: QueryPoolsWithFilterRequest): Uint8Array { - return QueryPoolsWithFilterRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolsWithFilterRequest): QueryPoolsWithFilterRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsWithFilterRequest", - value: QueryPoolsWithFilterRequest.encode(message).finish() - }; - } -}; -function createBaseQueryPoolsWithFilterResponse(): QueryPoolsWithFilterResponse { - return { - pools: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const QueryPoolsWithFilterResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsWithFilterResponse", - aminoType: "osmosis/gamm/query-pools-with-filter-response", - encode(message: QueryPoolsWithFilterResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pools) { - Any.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryPoolsWithFilterResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryPoolsWithFilterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pools.push(Any.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryPoolsWithFilterResponse { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: QueryPoolsWithFilterResponse): unknown { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toJSON(e) : undefined); - } else { - obj.pools = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryPoolsWithFilterResponse { - const message = createBaseQueryPoolsWithFilterResponse(); - message.pools = object.pools?.map(e => Any.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: QueryPoolsWithFilterResponseSDKType): QueryPoolsWithFilterResponse { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: QueryPoolsWithFilterResponse): QueryPoolsWithFilterResponseSDKType { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toSDK(e) : undefined); - } else { - obj.pools = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: QueryPoolsWithFilterResponseAmino): QueryPoolsWithFilterResponse { - return { - pools: Array.isArray(object?.pools) ? object.pools.map((e: any) => Any.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: QueryPoolsWithFilterResponse): QueryPoolsWithFilterResponseAmino { - const obj: any = {}; - if (message.pools) { - obj.pools = message.pools.map(e => e ? Any.toAmino(e) : undefined); - } else { - obj.pools = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: QueryPoolsWithFilterResponseAminoMsg): QueryPoolsWithFilterResponse { - return QueryPoolsWithFilterResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryPoolsWithFilterResponse): QueryPoolsWithFilterResponseAminoMsg { - return { - type: "osmosis/gamm/query-pools-with-filter-response", - value: QueryPoolsWithFilterResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryPoolsWithFilterResponseProtoMsg): QueryPoolsWithFilterResponse { - return QueryPoolsWithFilterResponse.decode(message.value); - }, - toProto(message: QueryPoolsWithFilterResponse): Uint8Array { - return QueryPoolsWithFilterResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryPoolsWithFilterResponse): QueryPoolsWithFilterResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryPoolsWithFilterResponse", - value: QueryPoolsWithFilterResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySpotPriceResponse(): QuerySpotPriceResponse { - return { - spotPrice: "" - }; -} -export const QuerySpotPriceResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QuerySpotPriceResponse", - aminoType: "osmosis/gamm/query-spot-price-response", - encode(message: QuerySpotPriceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.spotPrice !== "") { - writer.uint32(10).string(message.spotPrice); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySpotPriceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpotPriceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spotPrice = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySpotPriceResponse { - return { - spotPrice: isSet(object.spotPrice) ? String(object.spotPrice) : "" - }; - }, - toJSON(message: QuerySpotPriceResponse): unknown { - const obj: any = {}; - message.spotPrice !== undefined && (obj.spotPrice = message.spotPrice); - return obj; - }, - fromPartial(object: DeepPartial): QuerySpotPriceResponse { - const message = createBaseQuerySpotPriceResponse(); - message.spotPrice = object.spotPrice ?? ""; - return message; - }, - fromSDK(object: QuerySpotPriceResponseSDKType): QuerySpotPriceResponse { - return { - spotPrice: object?.spot_price - }; - }, - toSDK(message: QuerySpotPriceResponse): QuerySpotPriceResponseSDKType { - const obj: any = {}; - obj.spot_price = message.spotPrice; - return obj; - }, - fromAmino(object: QuerySpotPriceResponseAmino): QuerySpotPriceResponse { - return { - spotPrice: object.spot_price - }; - }, - toAmino(message: QuerySpotPriceResponse): QuerySpotPriceResponseAmino { - const obj: any = {}; - obj.spot_price = message.spotPrice; - return obj; - }, - fromAminoMsg(object: QuerySpotPriceResponseAminoMsg): QuerySpotPriceResponse { - return QuerySpotPriceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySpotPriceResponse): QuerySpotPriceResponseAminoMsg { - return { - type: "osmosis/gamm/query-spot-price-response", - value: QuerySpotPriceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySpotPriceResponseProtoMsg): QuerySpotPriceResponse { - return QuerySpotPriceResponse.decode(message.value); - }, - toProto(message: QuerySpotPriceResponse): Uint8Array { - return QuerySpotPriceResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySpotPriceResponse): QuerySpotPriceResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QuerySpotPriceResponse", - value: QuerySpotPriceResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySwapExactAmountInRequest(): QuerySwapExactAmountInRequest { - return { - sender: "", - poolId: BigInt(0), - tokenIn: "", - routes: [] - }; -} -export const QuerySwapExactAmountInRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest", - aminoType: "osmosis/gamm/query-swap-exact-amount-in-request", - encode(message: QuerySwapExactAmountInRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.tokenIn !== "") { - writer.uint32(26).string(message.tokenIn); - } - for (const v of message.routes) { - SwapAmountInRoute.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySwapExactAmountInRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySwapExactAmountInRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.tokenIn = reader.string(); - break; - case 4: - message.routes.push(SwapAmountInRoute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySwapExactAmountInRequest { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenIn: isSet(object.tokenIn) ? String(object.tokenIn) : "", - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountInRoute.fromJSON(e)) : [] - }; - }, - toJSON(message: QuerySwapExactAmountInRequest): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenIn !== undefined && (obj.tokenIn = message.tokenIn); - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toJSON(e) : undefined); - } else { - obj.routes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QuerySwapExactAmountInRequest { - const message = createBaseQuerySwapExactAmountInRequest(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenIn = object.tokenIn ?? ""; - message.routes = object.routes?.map(e => SwapAmountInRoute.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QuerySwapExactAmountInRequestSDKType): QuerySwapExactAmountInRequest { - return { - sender: object?.sender, - poolId: object?.pool_id, - tokenIn: object?.token_in, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountInRoute.fromSDK(e)) : [] - }; - }, - toSDK(message: QuerySwapExactAmountInRequest): QuerySwapExactAmountInRequestSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - obj.token_in = message.tokenIn; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toSDK(e) : undefined); - } else { - obj.routes = []; - } - return obj; - }, - fromAmino(object: QuerySwapExactAmountInRequestAmino): QuerySwapExactAmountInRequest { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - tokenIn: object.token_in, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountInRoute.fromAmino(e)) : [] - }; - }, - toAmino(message: QuerySwapExactAmountInRequest): QuerySwapExactAmountInRequestAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toAmino(e) : undefined); - } else { - obj.routes = []; - } - return obj; - }, - fromAminoMsg(object: QuerySwapExactAmountInRequestAminoMsg): QuerySwapExactAmountInRequest { - return QuerySwapExactAmountInRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySwapExactAmountInRequest): QuerySwapExactAmountInRequestAminoMsg { - return { - type: "osmosis/gamm/query-swap-exact-amount-in-request", - value: QuerySwapExactAmountInRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySwapExactAmountInRequestProtoMsg): QuerySwapExactAmountInRequest { - return QuerySwapExactAmountInRequest.decode(message.value); - }, - toProto(message: QuerySwapExactAmountInRequest): Uint8Array { - return QuerySwapExactAmountInRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySwapExactAmountInRequest): QuerySwapExactAmountInRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest", - value: QuerySwapExactAmountInRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySwapExactAmountInResponse(): QuerySwapExactAmountInResponse { - return { - tokenOutAmount: "" - }; -} -export const QuerySwapExactAmountInResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountInResponse", - aminoType: "osmosis/gamm/query-swap-exact-amount-in-response", - encode(message: QuerySwapExactAmountInResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tokenOutAmount !== "") { - writer.uint32(10).string(message.tokenOutAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySwapExactAmountInResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySwapExactAmountInResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenOutAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySwapExactAmountInResponse { - return { - tokenOutAmount: isSet(object.tokenOutAmount) ? String(object.tokenOutAmount) : "" - }; - }, - toJSON(message: QuerySwapExactAmountInResponse): unknown { - const obj: any = {}; - message.tokenOutAmount !== undefined && (obj.tokenOutAmount = message.tokenOutAmount); - return obj; - }, - fromPartial(object: DeepPartial): QuerySwapExactAmountInResponse { - const message = createBaseQuerySwapExactAmountInResponse(); - message.tokenOutAmount = object.tokenOutAmount ?? ""; - return message; - }, - fromSDK(object: QuerySwapExactAmountInResponseSDKType): QuerySwapExactAmountInResponse { - return { - tokenOutAmount: object?.token_out_amount - }; - }, - toSDK(message: QuerySwapExactAmountInResponse): QuerySwapExactAmountInResponseSDKType { - const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; - return obj; - }, - fromAmino(object: QuerySwapExactAmountInResponseAmino): QuerySwapExactAmountInResponse { - return { - tokenOutAmount: object.token_out_amount - }; - }, - toAmino(message: QuerySwapExactAmountInResponse): QuerySwapExactAmountInResponseAmino { - const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; - return obj; - }, - fromAminoMsg(object: QuerySwapExactAmountInResponseAminoMsg): QuerySwapExactAmountInResponse { - return QuerySwapExactAmountInResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySwapExactAmountInResponse): QuerySwapExactAmountInResponseAminoMsg { - return { - type: "osmosis/gamm/query-swap-exact-amount-in-response", - value: QuerySwapExactAmountInResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySwapExactAmountInResponseProtoMsg): QuerySwapExactAmountInResponse { - return QuerySwapExactAmountInResponse.decode(message.value); - }, - toProto(message: QuerySwapExactAmountInResponse): Uint8Array { - return QuerySwapExactAmountInResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySwapExactAmountInResponse): QuerySwapExactAmountInResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountInResponse", - value: QuerySwapExactAmountInResponse.encode(message).finish() - }; - } -}; -function createBaseQuerySwapExactAmountOutRequest(): QuerySwapExactAmountOutRequest { - return { - sender: "", - poolId: BigInt(0), - routes: [], - tokenOut: "" - }; -} -export const QuerySwapExactAmountOutRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountOutRequest", - aminoType: "osmosis/gamm/query-swap-exact-amount-out-request", - encode(message: QuerySwapExactAmountOutRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - for (const v of message.routes) { - SwapAmountOutRoute.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.tokenOut !== "") { - writer.uint32(34).string(message.tokenOut); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySwapExactAmountOutRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySwapExactAmountOutRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.routes.push(SwapAmountOutRoute.decode(reader, reader.uint32())); - break; - case 4: - message.tokenOut = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySwapExactAmountOutRequest { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountOutRoute.fromJSON(e)) : [], - tokenOut: isSet(object.tokenOut) ? String(object.tokenOut) : "" - }; - }, - toJSON(message: QuerySwapExactAmountOutRequest): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toJSON(e) : undefined); - } else { - obj.routes = []; - } - message.tokenOut !== undefined && (obj.tokenOut = message.tokenOut); - return obj; - }, - fromPartial(object: DeepPartial): QuerySwapExactAmountOutRequest { - const message = createBaseQuerySwapExactAmountOutRequest(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.routes = object.routes?.map(e => SwapAmountOutRoute.fromPartial(e)) || []; - message.tokenOut = object.tokenOut ?? ""; - return message; - }, - fromSDK(object: QuerySwapExactAmountOutRequestSDKType): QuerySwapExactAmountOutRequest { - return { - sender: object?.sender, - poolId: object?.pool_id, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountOutRoute.fromSDK(e)) : [], - tokenOut: object?.token_out - }; - }, - toSDK(message: QuerySwapExactAmountOutRequest): QuerySwapExactAmountOutRequestSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toSDK(e) : undefined); - } else { - obj.routes = []; - } - obj.token_out = message.tokenOut; - return obj; - }, - fromAmino(object: QuerySwapExactAmountOutRequestAmino): QuerySwapExactAmountOutRequest { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountOutRoute.fromAmino(e)) : [], - tokenOut: object.token_out - }; - }, - toAmino(message: QuerySwapExactAmountOutRequest): QuerySwapExactAmountOutRequestAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toAmino(e) : undefined); - } else { - obj.routes = []; - } - obj.token_out = message.tokenOut; - return obj; - }, - fromAminoMsg(object: QuerySwapExactAmountOutRequestAminoMsg): QuerySwapExactAmountOutRequest { - return QuerySwapExactAmountOutRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySwapExactAmountOutRequest): QuerySwapExactAmountOutRequestAminoMsg { - return { - type: "osmosis/gamm/query-swap-exact-amount-out-request", - value: QuerySwapExactAmountOutRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySwapExactAmountOutRequestProtoMsg): QuerySwapExactAmountOutRequest { - return QuerySwapExactAmountOutRequest.decode(message.value); - }, - toProto(message: QuerySwapExactAmountOutRequest): Uint8Array { - return QuerySwapExactAmountOutRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySwapExactAmountOutRequest): QuerySwapExactAmountOutRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountOutRequest", - value: QuerySwapExactAmountOutRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySwapExactAmountOutResponse(): QuerySwapExactAmountOutResponse { - return { - tokenInAmount: "" - }; -} -export const QuerySwapExactAmountOutResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountOutResponse", - aminoType: "osmosis/gamm/query-swap-exact-amount-out-response", - encode(message: QuerySwapExactAmountOutResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tokenInAmount !== "") { - writer.uint32(10).string(message.tokenInAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySwapExactAmountOutResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySwapExactAmountOutResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenInAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySwapExactAmountOutResponse { - return { - tokenInAmount: isSet(object.tokenInAmount) ? String(object.tokenInAmount) : "" - }; - }, - toJSON(message: QuerySwapExactAmountOutResponse): unknown { - const obj: any = {}; - message.tokenInAmount !== undefined && (obj.tokenInAmount = message.tokenInAmount); - return obj; - }, - fromPartial(object: DeepPartial): QuerySwapExactAmountOutResponse { - const message = createBaseQuerySwapExactAmountOutResponse(); - message.tokenInAmount = object.tokenInAmount ?? ""; - return message; - }, - fromSDK(object: QuerySwapExactAmountOutResponseSDKType): QuerySwapExactAmountOutResponse { - return { - tokenInAmount: object?.token_in_amount - }; - }, - toSDK(message: QuerySwapExactAmountOutResponse): QuerySwapExactAmountOutResponseSDKType { - const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; - return obj; - }, - fromAmino(object: QuerySwapExactAmountOutResponseAmino): QuerySwapExactAmountOutResponse { - return { - tokenInAmount: object.token_in_amount - }; - }, - toAmino(message: QuerySwapExactAmountOutResponse): QuerySwapExactAmountOutResponseAmino { - const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; - return obj; - }, - fromAminoMsg(object: QuerySwapExactAmountOutResponseAminoMsg): QuerySwapExactAmountOutResponse { - return QuerySwapExactAmountOutResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySwapExactAmountOutResponse): QuerySwapExactAmountOutResponseAminoMsg { - return { - type: "osmosis/gamm/query-swap-exact-amount-out-response", - value: QuerySwapExactAmountOutResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySwapExactAmountOutResponseProtoMsg): QuerySwapExactAmountOutResponse { - return QuerySwapExactAmountOutResponse.decode(message.value); - }, - toProto(message: QuerySwapExactAmountOutResponse): Uint8Array { - return QuerySwapExactAmountOutResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySwapExactAmountOutResponse): QuerySwapExactAmountOutResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QuerySwapExactAmountOutResponse", - value: QuerySwapExactAmountOutResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalLiquidityRequest(): QueryTotalLiquidityRequest { - return {}; -} -export const QueryTotalLiquidityRequest = { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalLiquidityRequest", - aminoType: "osmosis/gamm/query-total-liquidity-request", - encode(_: QueryTotalLiquidityRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalLiquidityRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalLiquidityRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryTotalLiquidityRequest { - return {}; - }, - toJSON(_: QueryTotalLiquidityRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryTotalLiquidityRequest { - const message = createBaseQueryTotalLiquidityRequest(); - return message; - }, - fromSDK(_: QueryTotalLiquidityRequestSDKType): QueryTotalLiquidityRequest { - return {}; - }, - toSDK(_: QueryTotalLiquidityRequest): QueryTotalLiquidityRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryTotalLiquidityRequestAmino): QueryTotalLiquidityRequest { - return {}; - }, - toAmino(_: QueryTotalLiquidityRequest): QueryTotalLiquidityRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryTotalLiquidityRequestAminoMsg): QueryTotalLiquidityRequest { - return QueryTotalLiquidityRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalLiquidityRequest): QueryTotalLiquidityRequestAminoMsg { - return { - type: "osmosis/gamm/query-total-liquidity-request", - value: QueryTotalLiquidityRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalLiquidityRequestProtoMsg): QueryTotalLiquidityRequest { - return QueryTotalLiquidityRequest.decode(message.value); - }, - toProto(message: QueryTotalLiquidityRequest): Uint8Array { - return QueryTotalLiquidityRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalLiquidityRequest): QueryTotalLiquidityRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalLiquidityRequest", - value: QueryTotalLiquidityRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalLiquidityResponse(): QueryTotalLiquidityResponse { - return { - liquidity: [] - }; -} -export const QueryTotalLiquidityResponse = { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalLiquidityResponse", - aminoType: "osmosis/gamm/query-total-liquidity-response", - encode(message: QueryTotalLiquidityResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.liquidity) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalLiquidityResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalLiquidityResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.liquidity.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalLiquidityResponse { - return { - liquidity: Array.isArray(object?.liquidity) ? object.liquidity.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryTotalLiquidityResponse): unknown { - const obj: any = {}; - if (message.liquidity) { - obj.liquidity = message.liquidity.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.liquidity = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalLiquidityResponse { - const message = createBaseQueryTotalLiquidityResponse(); - message.liquidity = object.liquidity?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryTotalLiquidityResponseSDKType): QueryTotalLiquidityResponse { - return { - liquidity: Array.isArray(object?.liquidity) ? object.liquidity.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryTotalLiquidityResponse): QueryTotalLiquidityResponseSDKType { - const obj: any = {}; - if (message.liquidity) { - obj.liquidity = message.liquidity.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.liquidity = []; - } - return obj; - }, - fromAmino(object: QueryTotalLiquidityResponseAmino): QueryTotalLiquidityResponse { - return { - liquidity: Array.isArray(object?.liquidity) ? object.liquidity.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryTotalLiquidityResponse): QueryTotalLiquidityResponseAmino { - const obj: any = {}; - if (message.liquidity) { - obj.liquidity = message.liquidity.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.liquidity = []; - } - return obj; - }, - fromAminoMsg(object: QueryTotalLiquidityResponseAminoMsg): QueryTotalLiquidityResponse { - return QueryTotalLiquidityResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalLiquidityResponse): QueryTotalLiquidityResponseAminoMsg { - return { - type: "osmosis/gamm/query-total-liquidity-response", - value: QueryTotalLiquidityResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalLiquidityResponseProtoMsg): QueryTotalLiquidityResponse { - return QueryTotalLiquidityResponse.decode(message.value); - }, - toProto(message: QueryTotalLiquidityResponse): Uint8Array { - return QueryTotalLiquidityResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalLiquidityResponse): QueryTotalLiquidityResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.QueryTotalLiquidityResponse", - value: QueryTotalLiquidityResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.amino.ts deleted file mode 100644 index 79662b17..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.amino.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { MsgJoinPool, MsgExitPool, MsgSwapExactAmountIn, MsgSwapExactAmountOut, MsgJoinSwapExternAmountIn, MsgJoinSwapShareAmountOut, MsgExitSwapExternAmountOut, MsgExitSwapShareAmountIn } from "./tx"; -export const AminoConverter = { - "/osmosis.gamm.v1beta1.MsgJoinPool": { - aminoType: "osmosis/gamm/join-pool", - toAmino: MsgJoinPool.toAmino, - fromAmino: MsgJoinPool.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgExitPool": { - aminoType: "osmosis/gamm/exit-pool", - toAmino: MsgExitPool.toAmino, - fromAmino: MsgExitPool.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn": { - aminoType: "osmosis/gamm/swap-exact-amount-in", - toAmino: MsgSwapExactAmountIn.toAmino, - fromAmino: MsgSwapExactAmountIn.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut": { - aminoType: "osmosis/gamm/swap-exact-amount-out", - toAmino: MsgSwapExactAmountOut.toAmino, - fromAmino: MsgSwapExactAmountOut.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn": { - aminoType: "osmosis/gamm/join-swap-extern-amount-in", - toAmino: MsgJoinSwapExternAmountIn.toAmino, - fromAmino: MsgJoinSwapExternAmountIn.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut": { - aminoType: "osmosis/gamm/join-swap-share-amount-out", - toAmino: MsgJoinSwapShareAmountOut.toAmino, - fromAmino: MsgJoinSwapShareAmountOut.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut": { - aminoType: "osmosis/gamm/exit-swap-extern-amount-out", - toAmino: MsgExitSwapExternAmountOut.toAmino, - fromAmino: MsgExitSwapExternAmountOut.fromAmino - }, - "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn": { - aminoType: "osmosis/gamm/exit-swap-share-amount-in", - toAmino: MsgExitSwapShareAmountIn.toAmino, - fromAmino: MsgExitSwapShareAmountIn.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.registry.ts deleted file mode 100644 index e5919b85..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.registry.ts +++ /dev/null @@ -1,261 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgJoinPool, MsgExitPool, MsgSwapExactAmountIn, MsgSwapExactAmountOut, MsgJoinSwapExternAmountIn, MsgJoinSwapShareAmountOut, MsgExitSwapExternAmountOut, MsgExitSwapShareAmountIn } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.gamm.v1beta1.MsgJoinPool", MsgJoinPool], ["/osmosis.gamm.v1beta1.MsgExitPool", MsgExitPool], ["/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", MsgSwapExactAmountIn], ["/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", MsgSwapExactAmountOut], ["/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", MsgJoinSwapExternAmountIn], ["/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", MsgJoinSwapShareAmountOut], ["/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", MsgExitSwapExternAmountOut], ["/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", MsgExitSwapShareAmountIn]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - joinPool(value: MsgJoinPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - value: MsgJoinPool.encode(value).finish() - }; - }, - exitPool(value: MsgExitPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - value: MsgExitPool.encode(value).finish() - }; - }, - swapExactAmountIn(value: MsgSwapExactAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - value: MsgSwapExactAmountIn.encode(value).finish() - }; - }, - swapExactAmountOut(value: MsgSwapExactAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - value: MsgSwapExactAmountOut.encode(value).finish() - }; - }, - joinSwapExternAmountIn(value: MsgJoinSwapExternAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - value: MsgJoinSwapExternAmountIn.encode(value).finish() - }; - }, - joinSwapShareAmountOut(value: MsgJoinSwapShareAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - value: MsgJoinSwapShareAmountOut.encode(value).finish() - }; - }, - exitSwapExternAmountOut(value: MsgExitSwapExternAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - value: MsgExitSwapExternAmountOut.encode(value).finish() - }; - }, - exitSwapShareAmountIn(value: MsgExitSwapShareAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - value: MsgExitSwapShareAmountIn.encode(value).finish() - }; - } - }, - withTypeUrl: { - joinPool(value: MsgJoinPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - value - }; - }, - exitPool(value: MsgExitPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - value - }; - }, - swapExactAmountIn(value: MsgSwapExactAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - value - }; - }, - swapExactAmountOut(value: MsgSwapExactAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - value - }; - }, - joinSwapExternAmountIn(value: MsgJoinSwapExternAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - value - }; - }, - joinSwapShareAmountOut(value: MsgJoinSwapShareAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - value - }; - }, - exitSwapExternAmountOut(value: MsgExitSwapExternAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - value - }; - }, - exitSwapShareAmountIn(value: MsgExitSwapShareAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - value - }; - } - }, - toJSON: { - joinPool(value: MsgJoinPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - value: MsgJoinPool.toJSON(value) - }; - }, - exitPool(value: MsgExitPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - value: MsgExitPool.toJSON(value) - }; - }, - swapExactAmountIn(value: MsgSwapExactAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - value: MsgSwapExactAmountIn.toJSON(value) - }; - }, - swapExactAmountOut(value: MsgSwapExactAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - value: MsgSwapExactAmountOut.toJSON(value) - }; - }, - joinSwapExternAmountIn(value: MsgJoinSwapExternAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - value: MsgJoinSwapExternAmountIn.toJSON(value) - }; - }, - joinSwapShareAmountOut(value: MsgJoinSwapShareAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - value: MsgJoinSwapShareAmountOut.toJSON(value) - }; - }, - exitSwapExternAmountOut(value: MsgExitSwapExternAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - value: MsgExitSwapExternAmountOut.toJSON(value) - }; - }, - exitSwapShareAmountIn(value: MsgExitSwapShareAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - value: MsgExitSwapShareAmountIn.toJSON(value) - }; - } - }, - fromJSON: { - joinPool(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - value: MsgJoinPool.fromJSON(value) - }; - }, - exitPool(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - value: MsgExitPool.fromJSON(value) - }; - }, - swapExactAmountIn(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - value: MsgSwapExactAmountIn.fromJSON(value) - }; - }, - swapExactAmountOut(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - value: MsgSwapExactAmountOut.fromJSON(value) - }; - }, - joinSwapExternAmountIn(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - value: MsgJoinSwapExternAmountIn.fromJSON(value) - }; - }, - joinSwapShareAmountOut(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - value: MsgJoinSwapShareAmountOut.fromJSON(value) - }; - }, - exitSwapExternAmountOut(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - value: MsgExitSwapExternAmountOut.fromJSON(value) - }; - }, - exitSwapShareAmountIn(value: any) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - value: MsgExitSwapShareAmountIn.fromJSON(value) - }; - } - }, - fromPartial: { - joinPool(value: MsgJoinPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - value: MsgJoinPool.fromPartial(value) - }; - }, - exitPool(value: MsgExitPool) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - value: MsgExitPool.fromPartial(value) - }; - }, - swapExactAmountIn(value: MsgSwapExactAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - value: MsgSwapExactAmountIn.fromPartial(value) - }; - }, - swapExactAmountOut(value: MsgSwapExactAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - value: MsgSwapExactAmountOut.fromPartial(value) - }; - }, - joinSwapExternAmountIn(value: MsgJoinSwapExternAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - value: MsgJoinSwapExternAmountIn.fromPartial(value) - }; - }, - joinSwapShareAmountOut(value: MsgJoinSwapShareAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - value: MsgJoinSwapShareAmountOut.fromPartial(value) - }; - }, - exitSwapExternAmountOut(value: MsgExitSwapExternAmountOut) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - value: MsgExitSwapExternAmountOut.fromPartial(value) - }; - }, - exitSwapShareAmountIn(value: MsgExitSwapShareAmountIn) { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - value: MsgExitSwapShareAmountIn.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index f4dc977b..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgJoinPool, MsgJoinPoolResponse, MsgExitPool, MsgExitPoolResponse, MsgSwapExactAmountIn, MsgSwapExactAmountInResponse, MsgSwapExactAmountOut, MsgSwapExactAmountOutResponse, MsgJoinSwapExternAmountIn, MsgJoinSwapExternAmountInResponse, MsgJoinSwapShareAmountOut, MsgJoinSwapShareAmountOutResponse, MsgExitSwapExternAmountOut, MsgExitSwapExternAmountOutResponse, MsgExitSwapShareAmountIn, MsgExitSwapShareAmountInResponse } from "./tx"; -export interface Msg { - joinPool(request: MsgJoinPool): Promise; - exitPool(request: MsgExitPool): Promise; - swapExactAmountIn(request: MsgSwapExactAmountIn): Promise; - swapExactAmountOut(request: MsgSwapExactAmountOut): Promise; - joinSwapExternAmountIn(request: MsgJoinSwapExternAmountIn): Promise; - joinSwapShareAmountOut(request: MsgJoinSwapShareAmountOut): Promise; - exitSwapExternAmountOut(request: MsgExitSwapExternAmountOut): Promise; - exitSwapShareAmountIn(request: MsgExitSwapShareAmountIn): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.joinPool = this.joinPool.bind(this); - this.exitPool = this.exitPool.bind(this); - this.swapExactAmountIn = this.swapExactAmountIn.bind(this); - this.swapExactAmountOut = this.swapExactAmountOut.bind(this); - this.joinSwapExternAmountIn = this.joinSwapExternAmountIn.bind(this); - this.joinSwapShareAmountOut = this.joinSwapShareAmountOut.bind(this); - this.exitSwapExternAmountOut = this.exitSwapExternAmountOut.bind(this); - this.exitSwapShareAmountIn = this.exitSwapShareAmountIn.bind(this); - } - joinPool(request: MsgJoinPool): Promise { - const data = MsgJoinPool.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "JoinPool", data); - return promise.then(data => MsgJoinPoolResponse.decode(new BinaryReader(data))); - } - exitPool(request: MsgExitPool): Promise { - const data = MsgExitPool.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "ExitPool", data); - return promise.then(data => MsgExitPoolResponse.decode(new BinaryReader(data))); - } - swapExactAmountIn(request: MsgSwapExactAmountIn): Promise { - const data = MsgSwapExactAmountIn.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "SwapExactAmountIn", data); - return promise.then(data => MsgSwapExactAmountInResponse.decode(new BinaryReader(data))); - } - swapExactAmountOut(request: MsgSwapExactAmountOut): Promise { - const data = MsgSwapExactAmountOut.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "SwapExactAmountOut", data); - return promise.then(data => MsgSwapExactAmountOutResponse.decode(new BinaryReader(data))); - } - joinSwapExternAmountIn(request: MsgJoinSwapExternAmountIn): Promise { - const data = MsgJoinSwapExternAmountIn.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "JoinSwapExternAmountIn", data); - return promise.then(data => MsgJoinSwapExternAmountInResponse.decode(new BinaryReader(data))); - } - joinSwapShareAmountOut(request: MsgJoinSwapShareAmountOut): Promise { - const data = MsgJoinSwapShareAmountOut.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "JoinSwapShareAmountOut", data); - return promise.then(data => MsgJoinSwapShareAmountOutResponse.decode(new BinaryReader(data))); - } - exitSwapExternAmountOut(request: MsgExitSwapExternAmountOut): Promise { - const data = MsgExitSwapExternAmountOut.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "ExitSwapExternAmountOut", data); - return promise.then(data => MsgExitSwapExternAmountOutResponse.decode(new BinaryReader(data))); - } - exitSwapShareAmountIn(request: MsgExitSwapShareAmountIn): Promise { - const data = MsgExitSwapShareAmountIn.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v1beta1.Msg", "ExitSwapShareAmountIn", data); - return promise.then(data => MsgExitSwapShareAmountInResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.ts deleted file mode 100644 index 3158a17c..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v1beta1/tx.ts +++ /dev/null @@ -1,2500 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * ===================== MsgJoinPool - * This is really MsgJoinPoolNoSwap - */ -export interface MsgJoinPool { - sender: string; - poolId: bigint; - shareOutAmount: string; - tokenInMaxs: Coin[]; -} -export interface MsgJoinPoolProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool"; - value: Uint8Array; -} -/** - * ===================== MsgJoinPool - * This is really MsgJoinPoolNoSwap - */ -export interface MsgJoinPoolAmino { - sender: string; - pool_id: string; - share_out_amount: string; - token_in_maxs: CoinAmino[]; -} -export interface MsgJoinPoolAminoMsg { - type: "osmosis/gamm/join-pool"; - value: MsgJoinPoolAmino; -} -/** - * ===================== MsgJoinPool - * This is really MsgJoinPoolNoSwap - */ -export interface MsgJoinPoolSDKType { - sender: string; - pool_id: bigint; - share_out_amount: string; - token_in_maxs: CoinSDKType[]; -} -export interface MsgJoinPoolResponse { - shareOutAmount: string; - tokenIn: Coin[]; -} -export interface MsgJoinPoolResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPoolResponse"; - value: Uint8Array; -} -export interface MsgJoinPoolResponseAmino { - share_out_amount: string; - token_in: CoinAmino[]; -} -export interface MsgJoinPoolResponseAminoMsg { - type: "osmosis/gamm/join-pool-response"; - value: MsgJoinPoolResponseAmino; -} -export interface MsgJoinPoolResponseSDKType { - share_out_amount: string; - token_in: CoinSDKType[]; -} -/** ===================== MsgExitPool */ -export interface MsgExitPool { - sender: string; - poolId: bigint; - shareInAmount: string; - tokenOutMins: Coin[]; -} -export interface MsgExitPoolProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool"; - value: Uint8Array; -} -/** ===================== MsgExitPool */ -export interface MsgExitPoolAmino { - sender: string; - pool_id: string; - share_in_amount: string; - token_out_mins: CoinAmino[]; -} -export interface MsgExitPoolAminoMsg { - type: "osmosis/gamm/exit-pool"; - value: MsgExitPoolAmino; -} -/** ===================== MsgExitPool */ -export interface MsgExitPoolSDKType { - sender: string; - pool_id: bigint; - share_in_amount: string; - token_out_mins: CoinSDKType[]; -} -export interface MsgExitPoolResponse { - tokenOut: Coin[]; -} -export interface MsgExitPoolResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPoolResponse"; - value: Uint8Array; -} -export interface MsgExitPoolResponseAmino { - token_out: CoinAmino[]; -} -export interface MsgExitPoolResponseAminoMsg { - type: "osmosis/gamm/exit-pool-response"; - value: MsgExitPoolResponseAmino; -} -export interface MsgExitPoolResponseSDKType { - token_out: CoinSDKType[]; -} -/** ===================== MsgSwapExactAmountIn */ -export interface SwapAmountInRoute { - poolId: bigint; - tokenOutDenom: string; -} -export interface SwapAmountInRouteProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.SwapAmountInRoute"; - value: Uint8Array; -} -/** ===================== MsgSwapExactAmountIn */ -export interface SwapAmountInRouteAmino { - pool_id: string; - token_out_denom: string; -} -export interface SwapAmountInRouteAminoMsg { - type: "osmosis/gamm/swap-amount-in-route"; - value: SwapAmountInRouteAmino; -} -/** ===================== MsgSwapExactAmountIn */ -export interface SwapAmountInRouteSDKType { - pool_id: bigint; - token_out_denom: string; -} -export interface MsgSwapExactAmountIn { - sender: string; - routes: SwapAmountInRoute[]; - tokenIn: Coin | undefined; - tokenOutMinAmount: string; -} -export interface MsgSwapExactAmountInProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn"; - value: Uint8Array; -} -export interface MsgSwapExactAmountInAmino { - sender: string; - routes: SwapAmountInRouteAmino[]; - token_in?: CoinAmino | undefined; - token_out_min_amount: string; -} -export interface MsgSwapExactAmountInAminoMsg { - type: "osmosis/gamm/swap-exact-amount-in"; - value: MsgSwapExactAmountInAmino; -} -export interface MsgSwapExactAmountInSDKType { - sender: string; - routes: SwapAmountInRouteSDKType[]; - token_in: CoinSDKType | undefined; - token_out_min_amount: string; -} -export interface MsgSwapExactAmountInResponse { - tokenOutAmount: string; -} -export interface MsgSwapExactAmountInResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountInResponse"; - value: Uint8Array; -} -export interface MsgSwapExactAmountInResponseAmino { - token_out_amount: string; -} -export interface MsgSwapExactAmountInResponseAminoMsg { - type: "osmosis/gamm/swap-exact-amount-in-response"; - value: MsgSwapExactAmountInResponseAmino; -} -export interface MsgSwapExactAmountInResponseSDKType { - token_out_amount: string; -} -/** ===================== MsgSwapExactAmountOut */ -export interface SwapAmountOutRoute { - poolId: bigint; - tokenInDenom: string; -} -export interface SwapAmountOutRouteProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.SwapAmountOutRoute"; - value: Uint8Array; -} -/** ===================== MsgSwapExactAmountOut */ -export interface SwapAmountOutRouteAmino { - pool_id: string; - token_in_denom: string; -} -export interface SwapAmountOutRouteAminoMsg { - type: "osmosis/gamm/swap-amount-out-route"; - value: SwapAmountOutRouteAmino; -} -/** ===================== MsgSwapExactAmountOut */ -export interface SwapAmountOutRouteSDKType { - pool_id: bigint; - token_in_denom: string; -} -export interface MsgSwapExactAmountOut { - sender: string; - routes: SwapAmountOutRoute[]; - tokenInMaxAmount: string; - tokenOut: Coin | undefined; -} -export interface MsgSwapExactAmountOutProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut"; - value: Uint8Array; -} -export interface MsgSwapExactAmountOutAmino { - sender: string; - routes: SwapAmountOutRouteAmino[]; - token_in_max_amount: string; - token_out?: CoinAmino | undefined; -} -export interface MsgSwapExactAmountOutAminoMsg { - type: "osmosis/gamm/swap-exact-amount-out"; - value: MsgSwapExactAmountOutAmino; -} -export interface MsgSwapExactAmountOutSDKType { - sender: string; - routes: SwapAmountOutRouteSDKType[]; - token_in_max_amount: string; - token_out: CoinSDKType | undefined; -} -export interface MsgSwapExactAmountOutResponse { - tokenInAmount: string; -} -export interface MsgSwapExactAmountOutResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOutResponse"; - value: Uint8Array; -} -export interface MsgSwapExactAmountOutResponseAmino { - token_in_amount: string; -} -export interface MsgSwapExactAmountOutResponseAminoMsg { - type: "osmosis/gamm/swap-exact-amount-out-response"; - value: MsgSwapExactAmountOutResponseAmino; -} -export interface MsgSwapExactAmountOutResponseSDKType { - token_in_amount: string; -} -/** - * ===================== MsgJoinSwapExternAmountIn - * TODO: Rename to MsgJoinSwapExactAmountIn - */ -export interface MsgJoinSwapExternAmountIn { - sender: string; - poolId: bigint; - tokenIn: Coin | undefined; - shareOutMinAmount: string; -} -export interface MsgJoinSwapExternAmountInProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn"; - value: Uint8Array; -} -/** - * ===================== MsgJoinSwapExternAmountIn - * TODO: Rename to MsgJoinSwapExactAmountIn - */ -export interface MsgJoinSwapExternAmountInAmino { - sender: string; - pool_id: string; - token_in?: CoinAmino | undefined; - share_out_min_amount: string; -} -export interface MsgJoinSwapExternAmountInAminoMsg { - type: "osmosis/gamm/join-swap-extern-amount-in"; - value: MsgJoinSwapExternAmountInAmino; -} -/** - * ===================== MsgJoinSwapExternAmountIn - * TODO: Rename to MsgJoinSwapExactAmountIn - */ -export interface MsgJoinSwapExternAmountInSDKType { - sender: string; - pool_id: bigint; - token_in: CoinSDKType | undefined; - share_out_min_amount: string; -} -export interface MsgJoinSwapExternAmountInResponse { - shareOutAmount: string; -} -export interface MsgJoinSwapExternAmountInResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountInResponse"; - value: Uint8Array; -} -export interface MsgJoinSwapExternAmountInResponseAmino { - share_out_amount: string; -} -export interface MsgJoinSwapExternAmountInResponseAminoMsg { - type: "osmosis/gamm/join-swap-extern-amount-in-response"; - value: MsgJoinSwapExternAmountInResponseAmino; -} -export interface MsgJoinSwapExternAmountInResponseSDKType { - share_out_amount: string; -} -/** ===================== MsgJoinSwapShareAmountOut */ -export interface MsgJoinSwapShareAmountOut { - sender: string; - poolId: bigint; - tokenInDenom: string; - shareOutAmount: string; - tokenInMaxAmount: string; -} -export interface MsgJoinSwapShareAmountOutProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut"; - value: Uint8Array; -} -/** ===================== MsgJoinSwapShareAmountOut */ -export interface MsgJoinSwapShareAmountOutAmino { - sender: string; - pool_id: string; - token_in_denom: string; - share_out_amount: string; - token_in_max_amount: string; -} -export interface MsgJoinSwapShareAmountOutAminoMsg { - type: "osmosis/gamm/join-swap-share-amount-out"; - value: MsgJoinSwapShareAmountOutAmino; -} -/** ===================== MsgJoinSwapShareAmountOut */ -export interface MsgJoinSwapShareAmountOutSDKType { - sender: string; - pool_id: bigint; - token_in_denom: string; - share_out_amount: string; - token_in_max_amount: string; -} -export interface MsgJoinSwapShareAmountOutResponse { - tokenInAmount: string; -} -export interface MsgJoinSwapShareAmountOutResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOutResponse"; - value: Uint8Array; -} -export interface MsgJoinSwapShareAmountOutResponseAmino { - token_in_amount: string; -} -export interface MsgJoinSwapShareAmountOutResponseAminoMsg { - type: "osmosis/gamm/join-swap-share-amount-out-response"; - value: MsgJoinSwapShareAmountOutResponseAmino; -} -export interface MsgJoinSwapShareAmountOutResponseSDKType { - token_in_amount: string; -} -/** ===================== MsgExitSwapShareAmountIn */ -export interface MsgExitSwapShareAmountIn { - sender: string; - poolId: bigint; - tokenOutDenom: string; - shareInAmount: string; - tokenOutMinAmount: string; -} -export interface MsgExitSwapShareAmountInProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn"; - value: Uint8Array; -} -/** ===================== MsgExitSwapShareAmountIn */ -export interface MsgExitSwapShareAmountInAmino { - sender: string; - pool_id: string; - token_out_denom: string; - share_in_amount: string; - token_out_min_amount: string; -} -export interface MsgExitSwapShareAmountInAminoMsg { - type: "osmosis/gamm/exit-swap-share-amount-in"; - value: MsgExitSwapShareAmountInAmino; -} -/** ===================== MsgExitSwapShareAmountIn */ -export interface MsgExitSwapShareAmountInSDKType { - sender: string; - pool_id: bigint; - token_out_denom: string; - share_in_amount: string; - token_out_min_amount: string; -} -export interface MsgExitSwapShareAmountInResponse { - tokenOutAmount: string; -} -export interface MsgExitSwapShareAmountInResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountInResponse"; - value: Uint8Array; -} -export interface MsgExitSwapShareAmountInResponseAmino { - token_out_amount: string; -} -export interface MsgExitSwapShareAmountInResponseAminoMsg { - type: "osmosis/gamm/exit-swap-share-amount-in-response"; - value: MsgExitSwapShareAmountInResponseAmino; -} -export interface MsgExitSwapShareAmountInResponseSDKType { - token_out_amount: string; -} -/** ===================== MsgExitSwapExternAmountOut */ -export interface MsgExitSwapExternAmountOut { - sender: string; - poolId: bigint; - tokenOut: Coin | undefined; - shareInMaxAmount: string; -} -export interface MsgExitSwapExternAmountOutProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut"; - value: Uint8Array; -} -/** ===================== MsgExitSwapExternAmountOut */ -export interface MsgExitSwapExternAmountOutAmino { - sender: string; - pool_id: string; - token_out?: CoinAmino | undefined; - share_in_max_amount: string; -} -export interface MsgExitSwapExternAmountOutAminoMsg { - type: "osmosis/gamm/exit-swap-extern-amount-out"; - value: MsgExitSwapExternAmountOutAmino; -} -/** ===================== MsgExitSwapExternAmountOut */ -export interface MsgExitSwapExternAmountOutSDKType { - sender: string; - pool_id: bigint; - token_out: CoinSDKType | undefined; - share_in_max_amount: string; -} -export interface MsgExitSwapExternAmountOutResponse { - shareInAmount: string; -} -export interface MsgExitSwapExternAmountOutResponseProtoMsg { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOutResponse"; - value: Uint8Array; -} -export interface MsgExitSwapExternAmountOutResponseAmino { - share_in_amount: string; -} -export interface MsgExitSwapExternAmountOutResponseAminoMsg { - type: "osmosis/gamm/exit-swap-extern-amount-out-response"; - value: MsgExitSwapExternAmountOutResponseAmino; -} -export interface MsgExitSwapExternAmountOutResponseSDKType { - share_in_amount: string; -} -function createBaseMsgJoinPool(): MsgJoinPool { - return { - sender: "", - poolId: BigInt(0), - shareOutAmount: "", - tokenInMaxs: [] - }; -} -export const MsgJoinPool = { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - aminoType: "osmosis/gamm/join-pool", - encode(message: MsgJoinPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.shareOutAmount !== "") { - writer.uint32(26).string(message.shareOutAmount); - } - for (const v of message.tokenInMaxs) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgJoinPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgJoinPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.shareOutAmount = reader.string(); - break; - case 4: - message.tokenInMaxs.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgJoinPool { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - shareOutAmount: isSet(object.shareOutAmount) ? String(object.shareOutAmount) : "", - tokenInMaxs: Array.isArray(object?.tokenInMaxs) ? object.tokenInMaxs.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgJoinPool): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.shareOutAmount !== undefined && (obj.shareOutAmount = message.shareOutAmount); - if (message.tokenInMaxs) { - obj.tokenInMaxs = message.tokenInMaxs.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokenInMaxs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgJoinPool { - const message = createBaseMsgJoinPool(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.shareOutAmount = object.shareOutAmount ?? ""; - message.tokenInMaxs = object.tokenInMaxs?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgJoinPoolSDKType): MsgJoinPool { - return { - sender: object?.sender, - poolId: object?.pool_id, - shareOutAmount: object?.share_out_amount, - tokenInMaxs: Array.isArray(object?.token_in_maxs) ? object.token_in_maxs.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgJoinPool): MsgJoinPoolSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - obj.share_out_amount = message.shareOutAmount; - if (message.tokenInMaxs) { - obj.token_in_maxs = message.tokenInMaxs.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.token_in_maxs = []; - } - return obj; - }, - fromAmino(object: MsgJoinPoolAmino): MsgJoinPool { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - shareOutAmount: object.share_out_amount, - tokenInMaxs: Array.isArray(object?.token_in_maxs) ? object.token_in_maxs.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgJoinPool): MsgJoinPoolAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.share_out_amount = message.shareOutAmount; - if (message.tokenInMaxs) { - obj.token_in_maxs = message.tokenInMaxs.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.token_in_maxs = []; - } - return obj; - }, - fromAminoMsg(object: MsgJoinPoolAminoMsg): MsgJoinPool { - return MsgJoinPool.fromAmino(object.value); - }, - toAminoMsg(message: MsgJoinPool): MsgJoinPoolAminoMsg { - return { - type: "osmosis/gamm/join-pool", - value: MsgJoinPool.toAmino(message) - }; - }, - fromProtoMsg(message: MsgJoinPoolProtoMsg): MsgJoinPool { - return MsgJoinPool.decode(message.value); - }, - toProto(message: MsgJoinPool): Uint8Array { - return MsgJoinPool.encode(message).finish(); - }, - toProtoMsg(message: MsgJoinPool): MsgJoinPoolProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPool", - value: MsgJoinPool.encode(message).finish() - }; - } -}; -function createBaseMsgJoinPoolResponse(): MsgJoinPoolResponse { - return { - shareOutAmount: "", - tokenIn: [] - }; -} -export const MsgJoinPoolResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPoolResponse", - aminoType: "osmosis/gamm/join-pool-response", - encode(message: MsgJoinPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.shareOutAmount !== "") { - writer.uint32(10).string(message.shareOutAmount); - } - for (const v of message.tokenIn) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgJoinPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgJoinPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.shareOutAmount = reader.string(); - break; - case 2: - message.tokenIn.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgJoinPoolResponse { - return { - shareOutAmount: isSet(object.shareOutAmount) ? String(object.shareOutAmount) : "", - tokenIn: Array.isArray(object?.tokenIn) ? object.tokenIn.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgJoinPoolResponse): unknown { - const obj: any = {}; - message.shareOutAmount !== undefined && (obj.shareOutAmount = message.shareOutAmount); - if (message.tokenIn) { - obj.tokenIn = message.tokenIn.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokenIn = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgJoinPoolResponse { - const message = createBaseMsgJoinPoolResponse(); - message.shareOutAmount = object.shareOutAmount ?? ""; - message.tokenIn = object.tokenIn?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgJoinPoolResponseSDKType): MsgJoinPoolResponse { - return { - shareOutAmount: object?.share_out_amount, - tokenIn: Array.isArray(object?.token_in) ? object.token_in.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgJoinPoolResponse): MsgJoinPoolResponseSDKType { - const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; - if (message.tokenIn) { - obj.token_in = message.tokenIn.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.token_in = []; - } - return obj; - }, - fromAmino(object: MsgJoinPoolResponseAmino): MsgJoinPoolResponse { - return { - shareOutAmount: object.share_out_amount, - tokenIn: Array.isArray(object?.token_in) ? object.token_in.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgJoinPoolResponse): MsgJoinPoolResponseAmino { - const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; - if (message.tokenIn) { - obj.token_in = message.tokenIn.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.token_in = []; - } - return obj; - }, - fromAminoMsg(object: MsgJoinPoolResponseAminoMsg): MsgJoinPoolResponse { - return MsgJoinPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgJoinPoolResponse): MsgJoinPoolResponseAminoMsg { - return { - type: "osmosis/gamm/join-pool-response", - value: MsgJoinPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgJoinPoolResponseProtoMsg): MsgJoinPoolResponse { - return MsgJoinPoolResponse.decode(message.value); - }, - toProto(message: MsgJoinPoolResponse): Uint8Array { - return MsgJoinPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgJoinPoolResponse): MsgJoinPoolResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinPoolResponse", - value: MsgJoinPoolResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExitPool(): MsgExitPool { - return { - sender: "", - poolId: BigInt(0), - shareInAmount: "", - tokenOutMins: [] - }; -} -export const MsgExitPool = { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - aminoType: "osmosis/gamm/exit-pool", - encode(message: MsgExitPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.shareInAmount !== "") { - writer.uint32(26).string(message.shareInAmount); - } - for (const v of message.tokenOutMins) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExitPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExitPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.shareInAmount = reader.string(); - break; - case 4: - message.tokenOutMins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExitPool { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - shareInAmount: isSet(object.shareInAmount) ? String(object.shareInAmount) : "", - tokenOutMins: Array.isArray(object?.tokenOutMins) ? object.tokenOutMins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgExitPool): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.shareInAmount !== undefined && (obj.shareInAmount = message.shareInAmount); - if (message.tokenOutMins) { - obj.tokenOutMins = message.tokenOutMins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokenOutMins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgExitPool { - const message = createBaseMsgExitPool(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.shareInAmount = object.shareInAmount ?? ""; - message.tokenOutMins = object.tokenOutMins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgExitPoolSDKType): MsgExitPool { - return { - sender: object?.sender, - poolId: object?.pool_id, - shareInAmount: object?.share_in_amount, - tokenOutMins: Array.isArray(object?.token_out_mins) ? object.token_out_mins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgExitPool): MsgExitPoolSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - obj.share_in_amount = message.shareInAmount; - if (message.tokenOutMins) { - obj.token_out_mins = message.tokenOutMins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.token_out_mins = []; - } - return obj; - }, - fromAmino(object: MsgExitPoolAmino): MsgExitPool { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - shareInAmount: object.share_in_amount, - tokenOutMins: Array.isArray(object?.token_out_mins) ? object.token_out_mins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgExitPool): MsgExitPoolAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.share_in_amount = message.shareInAmount; - if (message.tokenOutMins) { - obj.token_out_mins = message.tokenOutMins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.token_out_mins = []; - } - return obj; - }, - fromAminoMsg(object: MsgExitPoolAminoMsg): MsgExitPool { - return MsgExitPool.fromAmino(object.value); - }, - toAminoMsg(message: MsgExitPool): MsgExitPoolAminoMsg { - return { - type: "osmosis/gamm/exit-pool", - value: MsgExitPool.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExitPoolProtoMsg): MsgExitPool { - return MsgExitPool.decode(message.value); - }, - toProto(message: MsgExitPool): Uint8Array { - return MsgExitPool.encode(message).finish(); - }, - toProtoMsg(message: MsgExitPool): MsgExitPoolProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPool", - value: MsgExitPool.encode(message).finish() - }; - } -}; -function createBaseMsgExitPoolResponse(): MsgExitPoolResponse { - return { - tokenOut: [] - }; -} -export const MsgExitPoolResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPoolResponse", - aminoType: "osmosis/gamm/exit-pool-response", - encode(message: MsgExitPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.tokenOut) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExitPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExitPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenOut.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExitPoolResponse { - return { - tokenOut: Array.isArray(object?.tokenOut) ? object.tokenOut.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgExitPoolResponse): unknown { - const obj: any = {}; - if (message.tokenOut) { - obj.tokenOut = message.tokenOut.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.tokenOut = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgExitPoolResponse { - const message = createBaseMsgExitPoolResponse(); - message.tokenOut = object.tokenOut?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgExitPoolResponseSDKType): MsgExitPoolResponse { - return { - tokenOut: Array.isArray(object?.token_out) ? object.token_out.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgExitPoolResponse): MsgExitPoolResponseSDKType { - const obj: any = {}; - if (message.tokenOut) { - obj.token_out = message.tokenOut.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.token_out = []; - } - return obj; - }, - fromAmino(object: MsgExitPoolResponseAmino): MsgExitPoolResponse { - return { - tokenOut: Array.isArray(object?.token_out) ? object.token_out.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgExitPoolResponse): MsgExitPoolResponseAmino { - const obj: any = {}; - if (message.tokenOut) { - obj.token_out = message.tokenOut.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.token_out = []; - } - return obj; - }, - fromAminoMsg(object: MsgExitPoolResponseAminoMsg): MsgExitPoolResponse { - return MsgExitPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExitPoolResponse): MsgExitPoolResponseAminoMsg { - return { - type: "osmosis/gamm/exit-pool-response", - value: MsgExitPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExitPoolResponseProtoMsg): MsgExitPoolResponse { - return MsgExitPoolResponse.decode(message.value); - }, - toProto(message: MsgExitPoolResponse): Uint8Array { - return MsgExitPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExitPoolResponse): MsgExitPoolResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitPoolResponse", - value: MsgExitPoolResponse.encode(message).finish() - }; - } -}; -function createBaseSwapAmountInRoute(): SwapAmountInRoute { - return { - poolId: BigInt(0), - tokenOutDenom: "" - }; -} -export const SwapAmountInRoute = { - typeUrl: "/osmosis.gamm.v1beta1.SwapAmountInRoute", - aminoType: "osmosis/gamm/swap-amount-in-route", - encode(message: SwapAmountInRoute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.tokenOutDenom !== "") { - writer.uint32(18).string(message.tokenOutDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SwapAmountInRoute { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSwapAmountInRoute(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.tokenOutDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SwapAmountInRoute { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenOutDenom: isSet(object.tokenOutDenom) ? String(object.tokenOutDenom) : "" - }; - }, - toJSON(message: SwapAmountInRoute): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenOutDenom !== undefined && (obj.tokenOutDenom = message.tokenOutDenom); - return obj; - }, - fromPartial(object: DeepPartial): SwapAmountInRoute { - const message = createBaseSwapAmountInRoute(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenOutDenom = object.tokenOutDenom ?? ""; - return message; - }, - fromSDK(object: SwapAmountInRouteSDKType): SwapAmountInRoute { - return { - poolId: object?.pool_id, - tokenOutDenom: object?.token_out_denom - }; - }, - toSDK(message: SwapAmountInRoute): SwapAmountInRouteSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.token_out_denom = message.tokenOutDenom; - return obj; - }, - fromAmino(object: SwapAmountInRouteAmino): SwapAmountInRoute { - return { - poolId: BigInt(object.pool_id), - tokenOutDenom: object.token_out_denom - }; - }, - toAmino(message: SwapAmountInRoute): SwapAmountInRouteAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_out_denom = message.tokenOutDenom; - return obj; - }, - fromAminoMsg(object: SwapAmountInRouteAminoMsg): SwapAmountInRoute { - return SwapAmountInRoute.fromAmino(object.value); - }, - toAminoMsg(message: SwapAmountInRoute): SwapAmountInRouteAminoMsg { - return { - type: "osmosis/gamm/swap-amount-in-route", - value: SwapAmountInRoute.toAmino(message) - }; - }, - fromProtoMsg(message: SwapAmountInRouteProtoMsg): SwapAmountInRoute { - return SwapAmountInRoute.decode(message.value); - }, - toProto(message: SwapAmountInRoute): Uint8Array { - return SwapAmountInRoute.encode(message).finish(); - }, - toProtoMsg(message: SwapAmountInRoute): SwapAmountInRouteProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.SwapAmountInRoute", - value: SwapAmountInRoute.encode(message).finish() - }; - } -}; -function createBaseMsgSwapExactAmountIn(): MsgSwapExactAmountIn { - return { - sender: "", - routes: [], - tokenIn: Coin.fromPartial({}), - tokenOutMinAmount: "" - }; -} -export const MsgSwapExactAmountIn = { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - aminoType: "osmosis/gamm/swap-exact-amount-in", - encode(message: MsgSwapExactAmountIn, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - for (const v of message.routes) { - SwapAmountInRoute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.tokenIn !== undefined) { - Coin.encode(message.tokenIn, writer.uint32(26).fork()).ldelim(); - } - if (message.tokenOutMinAmount !== "") { - writer.uint32(34).string(message.tokenOutMinAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSwapExactAmountIn { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSwapExactAmountIn(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.routes.push(SwapAmountInRoute.decode(reader, reader.uint32())); - break; - case 3: - message.tokenIn = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.tokenOutMinAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSwapExactAmountIn { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountInRoute.fromJSON(e)) : [], - tokenIn: isSet(object.tokenIn) ? Coin.fromJSON(object.tokenIn) : undefined, - tokenOutMinAmount: isSet(object.tokenOutMinAmount) ? String(object.tokenOutMinAmount) : "" - }; - }, - toJSON(message: MsgSwapExactAmountIn): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toJSON(e) : undefined); - } else { - obj.routes = []; - } - message.tokenIn !== undefined && (obj.tokenIn = message.tokenIn ? Coin.toJSON(message.tokenIn) : undefined); - message.tokenOutMinAmount !== undefined && (obj.tokenOutMinAmount = message.tokenOutMinAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgSwapExactAmountIn { - const message = createBaseMsgSwapExactAmountIn(); - message.sender = object.sender ?? ""; - message.routes = object.routes?.map(e => SwapAmountInRoute.fromPartial(e)) || []; - message.tokenIn = object.tokenIn !== undefined && object.tokenIn !== null ? Coin.fromPartial(object.tokenIn) : undefined; - message.tokenOutMinAmount = object.tokenOutMinAmount ?? ""; - return message; - }, - fromSDK(object: MsgSwapExactAmountInSDKType): MsgSwapExactAmountIn { - return { - sender: object?.sender, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountInRoute.fromSDK(e)) : [], - tokenIn: object.token_in ? Coin.fromSDK(object.token_in) : undefined, - tokenOutMinAmount: object?.token_out_min_amount - }; - }, - toSDK(message: MsgSwapExactAmountIn): MsgSwapExactAmountInSDKType { - const obj: any = {}; - obj.sender = message.sender; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toSDK(e) : undefined); - } else { - obj.routes = []; - } - message.tokenIn !== undefined && (obj.token_in = message.tokenIn ? Coin.toSDK(message.tokenIn) : undefined); - obj.token_out_min_amount = message.tokenOutMinAmount; - return obj; - }, - fromAmino(object: MsgSwapExactAmountInAmino): MsgSwapExactAmountIn { - return { - sender: object.sender, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountInRoute.fromAmino(e)) : [], - tokenIn: object?.token_in ? Coin.fromAmino(object.token_in) : undefined, - tokenOutMinAmount: object.token_out_min_amount - }; - }, - toAmino(message: MsgSwapExactAmountIn): MsgSwapExactAmountInAmino { - const obj: any = {}; - obj.sender = message.sender; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountInRoute.toAmino(e) : undefined); - } else { - obj.routes = []; - } - obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn) : undefined; - obj.token_out_min_amount = message.tokenOutMinAmount; - return obj; - }, - fromAminoMsg(object: MsgSwapExactAmountInAminoMsg): MsgSwapExactAmountIn { - return MsgSwapExactAmountIn.fromAmino(object.value); - }, - toAminoMsg(message: MsgSwapExactAmountIn): MsgSwapExactAmountInAminoMsg { - return { - type: "osmosis/gamm/swap-exact-amount-in", - value: MsgSwapExactAmountIn.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSwapExactAmountInProtoMsg): MsgSwapExactAmountIn { - return MsgSwapExactAmountIn.decode(message.value); - }, - toProto(message: MsgSwapExactAmountIn): Uint8Array { - return MsgSwapExactAmountIn.encode(message).finish(); - }, - toProtoMsg(message: MsgSwapExactAmountIn): MsgSwapExactAmountInProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountIn", - value: MsgSwapExactAmountIn.encode(message).finish() - }; - } -}; -function createBaseMsgSwapExactAmountInResponse(): MsgSwapExactAmountInResponse { - return { - tokenOutAmount: "" - }; -} -export const MsgSwapExactAmountInResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountInResponse", - aminoType: "osmosis/gamm/swap-exact-amount-in-response", - encode(message: MsgSwapExactAmountInResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tokenOutAmount !== "") { - writer.uint32(10).string(message.tokenOutAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSwapExactAmountInResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSwapExactAmountInResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenOutAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSwapExactAmountInResponse { - return { - tokenOutAmount: isSet(object.tokenOutAmount) ? String(object.tokenOutAmount) : "" - }; - }, - toJSON(message: MsgSwapExactAmountInResponse): unknown { - const obj: any = {}; - message.tokenOutAmount !== undefined && (obj.tokenOutAmount = message.tokenOutAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgSwapExactAmountInResponse { - const message = createBaseMsgSwapExactAmountInResponse(); - message.tokenOutAmount = object.tokenOutAmount ?? ""; - return message; - }, - fromSDK(object: MsgSwapExactAmountInResponseSDKType): MsgSwapExactAmountInResponse { - return { - tokenOutAmount: object?.token_out_amount - }; - }, - toSDK(message: MsgSwapExactAmountInResponse): MsgSwapExactAmountInResponseSDKType { - const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; - return obj; - }, - fromAmino(object: MsgSwapExactAmountInResponseAmino): MsgSwapExactAmountInResponse { - return { - tokenOutAmount: object.token_out_amount - }; - }, - toAmino(message: MsgSwapExactAmountInResponse): MsgSwapExactAmountInResponseAmino { - const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; - return obj; - }, - fromAminoMsg(object: MsgSwapExactAmountInResponseAminoMsg): MsgSwapExactAmountInResponse { - return MsgSwapExactAmountInResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSwapExactAmountInResponse): MsgSwapExactAmountInResponseAminoMsg { - return { - type: "osmosis/gamm/swap-exact-amount-in-response", - value: MsgSwapExactAmountInResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSwapExactAmountInResponseProtoMsg): MsgSwapExactAmountInResponse { - return MsgSwapExactAmountInResponse.decode(message.value); - }, - toProto(message: MsgSwapExactAmountInResponse): Uint8Array { - return MsgSwapExactAmountInResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSwapExactAmountInResponse): MsgSwapExactAmountInResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountInResponse", - value: MsgSwapExactAmountInResponse.encode(message).finish() - }; - } -}; -function createBaseSwapAmountOutRoute(): SwapAmountOutRoute { - return { - poolId: BigInt(0), - tokenInDenom: "" - }; -} -export const SwapAmountOutRoute = { - typeUrl: "/osmosis.gamm.v1beta1.SwapAmountOutRoute", - aminoType: "osmosis/gamm/swap-amount-out-route", - encode(message: SwapAmountOutRoute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.tokenInDenom !== "") { - writer.uint32(18).string(message.tokenInDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SwapAmountOutRoute { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSwapAmountOutRoute(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.tokenInDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SwapAmountOutRoute { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenInDenom: isSet(object.tokenInDenom) ? String(object.tokenInDenom) : "" - }; - }, - toJSON(message: SwapAmountOutRoute): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenInDenom !== undefined && (obj.tokenInDenom = message.tokenInDenom); - return obj; - }, - fromPartial(object: DeepPartial): SwapAmountOutRoute { - const message = createBaseSwapAmountOutRoute(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenInDenom = object.tokenInDenom ?? ""; - return message; - }, - fromSDK(object: SwapAmountOutRouteSDKType): SwapAmountOutRoute { - return { - poolId: object?.pool_id, - tokenInDenom: object?.token_in_denom - }; - }, - toSDK(message: SwapAmountOutRoute): SwapAmountOutRouteSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.token_in_denom = message.tokenInDenom; - return obj; - }, - fromAmino(object: SwapAmountOutRouteAmino): SwapAmountOutRoute { - return { - poolId: BigInt(object.pool_id), - tokenInDenom: object.token_in_denom - }; - }, - toAmino(message: SwapAmountOutRoute): SwapAmountOutRouteAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in_denom = message.tokenInDenom; - return obj; - }, - fromAminoMsg(object: SwapAmountOutRouteAminoMsg): SwapAmountOutRoute { - return SwapAmountOutRoute.fromAmino(object.value); - }, - toAminoMsg(message: SwapAmountOutRoute): SwapAmountOutRouteAminoMsg { - return { - type: "osmosis/gamm/swap-amount-out-route", - value: SwapAmountOutRoute.toAmino(message) - }; - }, - fromProtoMsg(message: SwapAmountOutRouteProtoMsg): SwapAmountOutRoute { - return SwapAmountOutRoute.decode(message.value); - }, - toProto(message: SwapAmountOutRoute): Uint8Array { - return SwapAmountOutRoute.encode(message).finish(); - }, - toProtoMsg(message: SwapAmountOutRoute): SwapAmountOutRouteProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.SwapAmountOutRoute", - value: SwapAmountOutRoute.encode(message).finish() - }; - } -}; -function createBaseMsgSwapExactAmountOut(): MsgSwapExactAmountOut { - return { - sender: "", - routes: [], - tokenInMaxAmount: "", - tokenOut: Coin.fromPartial({}) - }; -} -export const MsgSwapExactAmountOut = { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - aminoType: "osmosis/gamm/swap-exact-amount-out", - encode(message: MsgSwapExactAmountOut, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - for (const v of message.routes) { - SwapAmountOutRoute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.tokenInMaxAmount !== "") { - writer.uint32(26).string(message.tokenInMaxAmount); - } - if (message.tokenOut !== undefined) { - Coin.encode(message.tokenOut, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSwapExactAmountOut { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSwapExactAmountOut(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.routes.push(SwapAmountOutRoute.decode(reader, reader.uint32())); - break; - case 3: - message.tokenInMaxAmount = reader.string(); - break; - case 4: - message.tokenOut = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSwapExactAmountOut { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountOutRoute.fromJSON(e)) : [], - tokenInMaxAmount: isSet(object.tokenInMaxAmount) ? String(object.tokenInMaxAmount) : "", - tokenOut: isSet(object.tokenOut) ? Coin.fromJSON(object.tokenOut) : undefined - }; - }, - toJSON(message: MsgSwapExactAmountOut): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toJSON(e) : undefined); - } else { - obj.routes = []; - } - message.tokenInMaxAmount !== undefined && (obj.tokenInMaxAmount = message.tokenInMaxAmount); - message.tokenOut !== undefined && (obj.tokenOut = message.tokenOut ? Coin.toJSON(message.tokenOut) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgSwapExactAmountOut { - const message = createBaseMsgSwapExactAmountOut(); - message.sender = object.sender ?? ""; - message.routes = object.routes?.map(e => SwapAmountOutRoute.fromPartial(e)) || []; - message.tokenInMaxAmount = object.tokenInMaxAmount ?? ""; - message.tokenOut = object.tokenOut !== undefined && object.tokenOut !== null ? Coin.fromPartial(object.tokenOut) : undefined; - return message; - }, - fromSDK(object: MsgSwapExactAmountOutSDKType): MsgSwapExactAmountOut { - return { - sender: object?.sender, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountOutRoute.fromSDK(e)) : [], - tokenInMaxAmount: object?.token_in_max_amount, - tokenOut: object.token_out ? Coin.fromSDK(object.token_out) : undefined - }; - }, - toSDK(message: MsgSwapExactAmountOut): MsgSwapExactAmountOutSDKType { - const obj: any = {}; - obj.sender = message.sender; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toSDK(e) : undefined); - } else { - obj.routes = []; - } - obj.token_in_max_amount = message.tokenInMaxAmount; - message.tokenOut !== undefined && (obj.token_out = message.tokenOut ? Coin.toSDK(message.tokenOut) : undefined); - return obj; - }, - fromAmino(object: MsgSwapExactAmountOutAmino): MsgSwapExactAmountOut { - return { - sender: object.sender, - routes: Array.isArray(object?.routes) ? object.routes.map((e: any) => SwapAmountOutRoute.fromAmino(e)) : [], - tokenInMaxAmount: object.token_in_max_amount, - tokenOut: object?.token_out ? Coin.fromAmino(object.token_out) : undefined - }; - }, - toAmino(message: MsgSwapExactAmountOut): MsgSwapExactAmountOutAmino { - const obj: any = {}; - obj.sender = message.sender; - if (message.routes) { - obj.routes = message.routes.map(e => e ? SwapAmountOutRoute.toAmino(e) : undefined); - } else { - obj.routes = []; - } - obj.token_in_max_amount = message.tokenInMaxAmount; - obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut) : undefined; - return obj; - }, - fromAminoMsg(object: MsgSwapExactAmountOutAminoMsg): MsgSwapExactAmountOut { - return MsgSwapExactAmountOut.fromAmino(object.value); - }, - toAminoMsg(message: MsgSwapExactAmountOut): MsgSwapExactAmountOutAminoMsg { - return { - type: "osmosis/gamm/swap-exact-amount-out", - value: MsgSwapExactAmountOut.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSwapExactAmountOutProtoMsg): MsgSwapExactAmountOut { - return MsgSwapExactAmountOut.decode(message.value); - }, - toProto(message: MsgSwapExactAmountOut): Uint8Array { - return MsgSwapExactAmountOut.encode(message).finish(); - }, - toProtoMsg(message: MsgSwapExactAmountOut): MsgSwapExactAmountOutProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOut", - value: MsgSwapExactAmountOut.encode(message).finish() - }; - } -}; -function createBaseMsgSwapExactAmountOutResponse(): MsgSwapExactAmountOutResponse { - return { - tokenInAmount: "" - }; -} -export const MsgSwapExactAmountOutResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOutResponse", - aminoType: "osmosis/gamm/swap-exact-amount-out-response", - encode(message: MsgSwapExactAmountOutResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tokenInAmount !== "") { - writer.uint32(10).string(message.tokenInAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSwapExactAmountOutResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSwapExactAmountOutResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenInAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSwapExactAmountOutResponse { - return { - tokenInAmount: isSet(object.tokenInAmount) ? String(object.tokenInAmount) : "" - }; - }, - toJSON(message: MsgSwapExactAmountOutResponse): unknown { - const obj: any = {}; - message.tokenInAmount !== undefined && (obj.tokenInAmount = message.tokenInAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgSwapExactAmountOutResponse { - const message = createBaseMsgSwapExactAmountOutResponse(); - message.tokenInAmount = object.tokenInAmount ?? ""; - return message; - }, - fromSDK(object: MsgSwapExactAmountOutResponseSDKType): MsgSwapExactAmountOutResponse { - return { - tokenInAmount: object?.token_in_amount - }; - }, - toSDK(message: MsgSwapExactAmountOutResponse): MsgSwapExactAmountOutResponseSDKType { - const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; - return obj; - }, - fromAmino(object: MsgSwapExactAmountOutResponseAmino): MsgSwapExactAmountOutResponse { - return { - tokenInAmount: object.token_in_amount - }; - }, - toAmino(message: MsgSwapExactAmountOutResponse): MsgSwapExactAmountOutResponseAmino { - const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; - return obj; - }, - fromAminoMsg(object: MsgSwapExactAmountOutResponseAminoMsg): MsgSwapExactAmountOutResponse { - return MsgSwapExactAmountOutResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSwapExactAmountOutResponse): MsgSwapExactAmountOutResponseAminoMsg { - return { - type: "osmosis/gamm/swap-exact-amount-out-response", - value: MsgSwapExactAmountOutResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSwapExactAmountOutResponseProtoMsg): MsgSwapExactAmountOutResponse { - return MsgSwapExactAmountOutResponse.decode(message.value); - }, - toProto(message: MsgSwapExactAmountOutResponse): Uint8Array { - return MsgSwapExactAmountOutResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSwapExactAmountOutResponse): MsgSwapExactAmountOutResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgSwapExactAmountOutResponse", - value: MsgSwapExactAmountOutResponse.encode(message).finish() - }; - } -}; -function createBaseMsgJoinSwapExternAmountIn(): MsgJoinSwapExternAmountIn { - return { - sender: "", - poolId: BigInt(0), - tokenIn: Coin.fromPartial({}), - shareOutMinAmount: "" - }; -} -export const MsgJoinSwapExternAmountIn = { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - aminoType: "osmosis/gamm/join-swap-extern-amount-in", - encode(message: MsgJoinSwapExternAmountIn, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.tokenIn !== undefined) { - Coin.encode(message.tokenIn, writer.uint32(26).fork()).ldelim(); - } - if (message.shareOutMinAmount !== "") { - writer.uint32(34).string(message.shareOutMinAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgJoinSwapExternAmountIn { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgJoinSwapExternAmountIn(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.tokenIn = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.shareOutMinAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgJoinSwapExternAmountIn { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenIn: isSet(object.tokenIn) ? Coin.fromJSON(object.tokenIn) : undefined, - shareOutMinAmount: isSet(object.shareOutMinAmount) ? String(object.shareOutMinAmount) : "" - }; - }, - toJSON(message: MsgJoinSwapExternAmountIn): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenIn !== undefined && (obj.tokenIn = message.tokenIn ? Coin.toJSON(message.tokenIn) : undefined); - message.shareOutMinAmount !== undefined && (obj.shareOutMinAmount = message.shareOutMinAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgJoinSwapExternAmountIn { - const message = createBaseMsgJoinSwapExternAmountIn(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenIn = object.tokenIn !== undefined && object.tokenIn !== null ? Coin.fromPartial(object.tokenIn) : undefined; - message.shareOutMinAmount = object.shareOutMinAmount ?? ""; - return message; - }, - fromSDK(object: MsgJoinSwapExternAmountInSDKType): MsgJoinSwapExternAmountIn { - return { - sender: object?.sender, - poolId: object?.pool_id, - tokenIn: object.token_in ? Coin.fromSDK(object.token_in) : undefined, - shareOutMinAmount: object?.share_out_min_amount - }; - }, - toSDK(message: MsgJoinSwapExternAmountIn): MsgJoinSwapExternAmountInSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - message.tokenIn !== undefined && (obj.token_in = message.tokenIn ? Coin.toSDK(message.tokenIn) : undefined); - obj.share_out_min_amount = message.shareOutMinAmount; - return obj; - }, - fromAmino(object: MsgJoinSwapExternAmountInAmino): MsgJoinSwapExternAmountIn { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - tokenIn: object?.token_in ? Coin.fromAmino(object.token_in) : undefined, - shareOutMinAmount: object.share_out_min_amount - }; - }, - toAmino(message: MsgJoinSwapExternAmountIn): MsgJoinSwapExternAmountInAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in = message.tokenIn ? Coin.toAmino(message.tokenIn) : undefined; - obj.share_out_min_amount = message.shareOutMinAmount; - return obj; - }, - fromAminoMsg(object: MsgJoinSwapExternAmountInAminoMsg): MsgJoinSwapExternAmountIn { - return MsgJoinSwapExternAmountIn.fromAmino(object.value); - }, - toAminoMsg(message: MsgJoinSwapExternAmountIn): MsgJoinSwapExternAmountInAminoMsg { - return { - type: "osmosis/gamm/join-swap-extern-amount-in", - value: MsgJoinSwapExternAmountIn.toAmino(message) - }; - }, - fromProtoMsg(message: MsgJoinSwapExternAmountInProtoMsg): MsgJoinSwapExternAmountIn { - return MsgJoinSwapExternAmountIn.decode(message.value); - }, - toProto(message: MsgJoinSwapExternAmountIn): Uint8Array { - return MsgJoinSwapExternAmountIn.encode(message).finish(); - }, - toProtoMsg(message: MsgJoinSwapExternAmountIn): MsgJoinSwapExternAmountInProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn", - value: MsgJoinSwapExternAmountIn.encode(message).finish() - }; - } -}; -function createBaseMsgJoinSwapExternAmountInResponse(): MsgJoinSwapExternAmountInResponse { - return { - shareOutAmount: "" - }; -} -export const MsgJoinSwapExternAmountInResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountInResponse", - aminoType: "osmosis/gamm/join-swap-extern-amount-in-response", - encode(message: MsgJoinSwapExternAmountInResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.shareOutAmount !== "") { - writer.uint32(10).string(message.shareOutAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgJoinSwapExternAmountInResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgJoinSwapExternAmountInResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.shareOutAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgJoinSwapExternAmountInResponse { - return { - shareOutAmount: isSet(object.shareOutAmount) ? String(object.shareOutAmount) : "" - }; - }, - toJSON(message: MsgJoinSwapExternAmountInResponse): unknown { - const obj: any = {}; - message.shareOutAmount !== undefined && (obj.shareOutAmount = message.shareOutAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgJoinSwapExternAmountInResponse { - const message = createBaseMsgJoinSwapExternAmountInResponse(); - message.shareOutAmount = object.shareOutAmount ?? ""; - return message; - }, - fromSDK(object: MsgJoinSwapExternAmountInResponseSDKType): MsgJoinSwapExternAmountInResponse { - return { - shareOutAmount: object?.share_out_amount - }; - }, - toSDK(message: MsgJoinSwapExternAmountInResponse): MsgJoinSwapExternAmountInResponseSDKType { - const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; - return obj; - }, - fromAmino(object: MsgJoinSwapExternAmountInResponseAmino): MsgJoinSwapExternAmountInResponse { - return { - shareOutAmount: object.share_out_amount - }; - }, - toAmino(message: MsgJoinSwapExternAmountInResponse): MsgJoinSwapExternAmountInResponseAmino { - const obj: any = {}; - obj.share_out_amount = message.shareOutAmount; - return obj; - }, - fromAminoMsg(object: MsgJoinSwapExternAmountInResponseAminoMsg): MsgJoinSwapExternAmountInResponse { - return MsgJoinSwapExternAmountInResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgJoinSwapExternAmountInResponse): MsgJoinSwapExternAmountInResponseAminoMsg { - return { - type: "osmosis/gamm/join-swap-extern-amount-in-response", - value: MsgJoinSwapExternAmountInResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgJoinSwapExternAmountInResponseProtoMsg): MsgJoinSwapExternAmountInResponse { - return MsgJoinSwapExternAmountInResponse.decode(message.value); - }, - toProto(message: MsgJoinSwapExternAmountInResponse): Uint8Array { - return MsgJoinSwapExternAmountInResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgJoinSwapExternAmountInResponse): MsgJoinSwapExternAmountInResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountInResponse", - value: MsgJoinSwapExternAmountInResponse.encode(message).finish() - }; - } -}; -function createBaseMsgJoinSwapShareAmountOut(): MsgJoinSwapShareAmountOut { - return { - sender: "", - poolId: BigInt(0), - tokenInDenom: "", - shareOutAmount: "", - tokenInMaxAmount: "" - }; -} -export const MsgJoinSwapShareAmountOut = { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - aminoType: "osmosis/gamm/join-swap-share-amount-out", - encode(message: MsgJoinSwapShareAmountOut, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.tokenInDenom !== "") { - writer.uint32(26).string(message.tokenInDenom); - } - if (message.shareOutAmount !== "") { - writer.uint32(34).string(message.shareOutAmount); - } - if (message.tokenInMaxAmount !== "") { - writer.uint32(42).string(message.tokenInMaxAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgJoinSwapShareAmountOut { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgJoinSwapShareAmountOut(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.tokenInDenom = reader.string(); - break; - case 4: - message.shareOutAmount = reader.string(); - break; - case 5: - message.tokenInMaxAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgJoinSwapShareAmountOut { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenInDenom: isSet(object.tokenInDenom) ? String(object.tokenInDenom) : "", - shareOutAmount: isSet(object.shareOutAmount) ? String(object.shareOutAmount) : "", - tokenInMaxAmount: isSet(object.tokenInMaxAmount) ? String(object.tokenInMaxAmount) : "" - }; - }, - toJSON(message: MsgJoinSwapShareAmountOut): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenInDenom !== undefined && (obj.tokenInDenom = message.tokenInDenom); - message.shareOutAmount !== undefined && (obj.shareOutAmount = message.shareOutAmount); - message.tokenInMaxAmount !== undefined && (obj.tokenInMaxAmount = message.tokenInMaxAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgJoinSwapShareAmountOut { - const message = createBaseMsgJoinSwapShareAmountOut(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenInDenom = object.tokenInDenom ?? ""; - message.shareOutAmount = object.shareOutAmount ?? ""; - message.tokenInMaxAmount = object.tokenInMaxAmount ?? ""; - return message; - }, - fromSDK(object: MsgJoinSwapShareAmountOutSDKType): MsgJoinSwapShareAmountOut { - return { - sender: object?.sender, - poolId: object?.pool_id, - tokenInDenom: object?.token_in_denom, - shareOutAmount: object?.share_out_amount, - tokenInMaxAmount: object?.token_in_max_amount - }; - }, - toSDK(message: MsgJoinSwapShareAmountOut): MsgJoinSwapShareAmountOutSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - obj.token_in_denom = message.tokenInDenom; - obj.share_out_amount = message.shareOutAmount; - obj.token_in_max_amount = message.tokenInMaxAmount; - return obj; - }, - fromAmino(object: MsgJoinSwapShareAmountOutAmino): MsgJoinSwapShareAmountOut { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - tokenInDenom: object.token_in_denom, - shareOutAmount: object.share_out_amount, - tokenInMaxAmount: object.token_in_max_amount - }; - }, - toAmino(message: MsgJoinSwapShareAmountOut): MsgJoinSwapShareAmountOutAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_in_denom = message.tokenInDenom; - obj.share_out_amount = message.shareOutAmount; - obj.token_in_max_amount = message.tokenInMaxAmount; - return obj; - }, - fromAminoMsg(object: MsgJoinSwapShareAmountOutAminoMsg): MsgJoinSwapShareAmountOut { - return MsgJoinSwapShareAmountOut.fromAmino(object.value); - }, - toAminoMsg(message: MsgJoinSwapShareAmountOut): MsgJoinSwapShareAmountOutAminoMsg { - return { - type: "osmosis/gamm/join-swap-share-amount-out", - value: MsgJoinSwapShareAmountOut.toAmino(message) - }; - }, - fromProtoMsg(message: MsgJoinSwapShareAmountOutProtoMsg): MsgJoinSwapShareAmountOut { - return MsgJoinSwapShareAmountOut.decode(message.value); - }, - toProto(message: MsgJoinSwapShareAmountOut): Uint8Array { - return MsgJoinSwapShareAmountOut.encode(message).finish(); - }, - toProtoMsg(message: MsgJoinSwapShareAmountOut): MsgJoinSwapShareAmountOutProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut", - value: MsgJoinSwapShareAmountOut.encode(message).finish() - }; - } -}; -function createBaseMsgJoinSwapShareAmountOutResponse(): MsgJoinSwapShareAmountOutResponse { - return { - tokenInAmount: "" - }; -} -export const MsgJoinSwapShareAmountOutResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOutResponse", - aminoType: "osmosis/gamm/join-swap-share-amount-out-response", - encode(message: MsgJoinSwapShareAmountOutResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tokenInAmount !== "") { - writer.uint32(10).string(message.tokenInAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgJoinSwapShareAmountOutResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgJoinSwapShareAmountOutResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenInAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgJoinSwapShareAmountOutResponse { - return { - tokenInAmount: isSet(object.tokenInAmount) ? String(object.tokenInAmount) : "" - }; - }, - toJSON(message: MsgJoinSwapShareAmountOutResponse): unknown { - const obj: any = {}; - message.tokenInAmount !== undefined && (obj.tokenInAmount = message.tokenInAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgJoinSwapShareAmountOutResponse { - const message = createBaseMsgJoinSwapShareAmountOutResponse(); - message.tokenInAmount = object.tokenInAmount ?? ""; - return message; - }, - fromSDK(object: MsgJoinSwapShareAmountOutResponseSDKType): MsgJoinSwapShareAmountOutResponse { - return { - tokenInAmount: object?.token_in_amount - }; - }, - toSDK(message: MsgJoinSwapShareAmountOutResponse): MsgJoinSwapShareAmountOutResponseSDKType { - const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; - return obj; - }, - fromAmino(object: MsgJoinSwapShareAmountOutResponseAmino): MsgJoinSwapShareAmountOutResponse { - return { - tokenInAmount: object.token_in_amount - }; - }, - toAmino(message: MsgJoinSwapShareAmountOutResponse): MsgJoinSwapShareAmountOutResponseAmino { - const obj: any = {}; - obj.token_in_amount = message.tokenInAmount; - return obj; - }, - fromAminoMsg(object: MsgJoinSwapShareAmountOutResponseAminoMsg): MsgJoinSwapShareAmountOutResponse { - return MsgJoinSwapShareAmountOutResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgJoinSwapShareAmountOutResponse): MsgJoinSwapShareAmountOutResponseAminoMsg { - return { - type: "osmosis/gamm/join-swap-share-amount-out-response", - value: MsgJoinSwapShareAmountOutResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgJoinSwapShareAmountOutResponseProtoMsg): MsgJoinSwapShareAmountOutResponse { - return MsgJoinSwapShareAmountOutResponse.decode(message.value); - }, - toProto(message: MsgJoinSwapShareAmountOutResponse): Uint8Array { - return MsgJoinSwapShareAmountOutResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgJoinSwapShareAmountOutResponse): MsgJoinSwapShareAmountOutResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOutResponse", - value: MsgJoinSwapShareAmountOutResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExitSwapShareAmountIn(): MsgExitSwapShareAmountIn { - return { - sender: "", - poolId: BigInt(0), - tokenOutDenom: "", - shareInAmount: "", - tokenOutMinAmount: "" - }; -} -export const MsgExitSwapShareAmountIn = { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - aminoType: "osmosis/gamm/exit-swap-share-amount-in", - encode(message: MsgExitSwapShareAmountIn, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.tokenOutDenom !== "") { - writer.uint32(26).string(message.tokenOutDenom); - } - if (message.shareInAmount !== "") { - writer.uint32(34).string(message.shareInAmount); - } - if (message.tokenOutMinAmount !== "") { - writer.uint32(42).string(message.tokenOutMinAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExitSwapShareAmountIn { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExitSwapShareAmountIn(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.tokenOutDenom = reader.string(); - break; - case 4: - message.shareInAmount = reader.string(); - break; - case 5: - message.tokenOutMinAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExitSwapShareAmountIn { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenOutDenom: isSet(object.tokenOutDenom) ? String(object.tokenOutDenom) : "", - shareInAmount: isSet(object.shareInAmount) ? String(object.shareInAmount) : "", - tokenOutMinAmount: isSet(object.tokenOutMinAmount) ? String(object.tokenOutMinAmount) : "" - }; - }, - toJSON(message: MsgExitSwapShareAmountIn): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenOutDenom !== undefined && (obj.tokenOutDenom = message.tokenOutDenom); - message.shareInAmount !== undefined && (obj.shareInAmount = message.shareInAmount); - message.tokenOutMinAmount !== undefined && (obj.tokenOutMinAmount = message.tokenOutMinAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgExitSwapShareAmountIn { - const message = createBaseMsgExitSwapShareAmountIn(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenOutDenom = object.tokenOutDenom ?? ""; - message.shareInAmount = object.shareInAmount ?? ""; - message.tokenOutMinAmount = object.tokenOutMinAmount ?? ""; - return message; - }, - fromSDK(object: MsgExitSwapShareAmountInSDKType): MsgExitSwapShareAmountIn { - return { - sender: object?.sender, - poolId: object?.pool_id, - tokenOutDenom: object?.token_out_denom, - shareInAmount: object?.share_in_amount, - tokenOutMinAmount: object?.token_out_min_amount - }; - }, - toSDK(message: MsgExitSwapShareAmountIn): MsgExitSwapShareAmountInSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - obj.token_out_denom = message.tokenOutDenom; - obj.share_in_amount = message.shareInAmount; - obj.token_out_min_amount = message.tokenOutMinAmount; - return obj; - }, - fromAmino(object: MsgExitSwapShareAmountInAmino): MsgExitSwapShareAmountIn { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - tokenOutDenom: object.token_out_denom, - shareInAmount: object.share_in_amount, - tokenOutMinAmount: object.token_out_min_amount - }; - }, - toAmino(message: MsgExitSwapShareAmountIn): MsgExitSwapShareAmountInAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_out_denom = message.tokenOutDenom; - obj.share_in_amount = message.shareInAmount; - obj.token_out_min_amount = message.tokenOutMinAmount; - return obj; - }, - fromAminoMsg(object: MsgExitSwapShareAmountInAminoMsg): MsgExitSwapShareAmountIn { - return MsgExitSwapShareAmountIn.fromAmino(object.value); - }, - toAminoMsg(message: MsgExitSwapShareAmountIn): MsgExitSwapShareAmountInAminoMsg { - return { - type: "osmosis/gamm/exit-swap-share-amount-in", - value: MsgExitSwapShareAmountIn.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExitSwapShareAmountInProtoMsg): MsgExitSwapShareAmountIn { - return MsgExitSwapShareAmountIn.decode(message.value); - }, - toProto(message: MsgExitSwapShareAmountIn): Uint8Array { - return MsgExitSwapShareAmountIn.encode(message).finish(); - }, - toProtoMsg(message: MsgExitSwapShareAmountIn): MsgExitSwapShareAmountInProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn", - value: MsgExitSwapShareAmountIn.encode(message).finish() - }; - } -}; -function createBaseMsgExitSwapShareAmountInResponse(): MsgExitSwapShareAmountInResponse { - return { - tokenOutAmount: "" - }; -} -export const MsgExitSwapShareAmountInResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountInResponse", - aminoType: "osmosis/gamm/exit-swap-share-amount-in-response", - encode(message: MsgExitSwapShareAmountInResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tokenOutAmount !== "") { - writer.uint32(10).string(message.tokenOutAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExitSwapShareAmountInResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExitSwapShareAmountInResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tokenOutAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExitSwapShareAmountInResponse { - return { - tokenOutAmount: isSet(object.tokenOutAmount) ? String(object.tokenOutAmount) : "" - }; - }, - toJSON(message: MsgExitSwapShareAmountInResponse): unknown { - const obj: any = {}; - message.tokenOutAmount !== undefined && (obj.tokenOutAmount = message.tokenOutAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgExitSwapShareAmountInResponse { - const message = createBaseMsgExitSwapShareAmountInResponse(); - message.tokenOutAmount = object.tokenOutAmount ?? ""; - return message; - }, - fromSDK(object: MsgExitSwapShareAmountInResponseSDKType): MsgExitSwapShareAmountInResponse { - return { - tokenOutAmount: object?.token_out_amount - }; - }, - toSDK(message: MsgExitSwapShareAmountInResponse): MsgExitSwapShareAmountInResponseSDKType { - const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; - return obj; - }, - fromAmino(object: MsgExitSwapShareAmountInResponseAmino): MsgExitSwapShareAmountInResponse { - return { - tokenOutAmount: object.token_out_amount - }; - }, - toAmino(message: MsgExitSwapShareAmountInResponse): MsgExitSwapShareAmountInResponseAmino { - const obj: any = {}; - obj.token_out_amount = message.tokenOutAmount; - return obj; - }, - fromAminoMsg(object: MsgExitSwapShareAmountInResponseAminoMsg): MsgExitSwapShareAmountInResponse { - return MsgExitSwapShareAmountInResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExitSwapShareAmountInResponse): MsgExitSwapShareAmountInResponseAminoMsg { - return { - type: "osmosis/gamm/exit-swap-share-amount-in-response", - value: MsgExitSwapShareAmountInResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExitSwapShareAmountInResponseProtoMsg): MsgExitSwapShareAmountInResponse { - return MsgExitSwapShareAmountInResponse.decode(message.value); - }, - toProto(message: MsgExitSwapShareAmountInResponse): Uint8Array { - return MsgExitSwapShareAmountInResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExitSwapShareAmountInResponse): MsgExitSwapShareAmountInResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapShareAmountInResponse", - value: MsgExitSwapShareAmountInResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExitSwapExternAmountOut(): MsgExitSwapExternAmountOut { - return { - sender: "", - poolId: BigInt(0), - tokenOut: Coin.fromPartial({}), - shareInMaxAmount: "" - }; -} -export const MsgExitSwapExternAmountOut = { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - aminoType: "osmosis/gamm/exit-swap-extern-amount-out", - encode(message: MsgExitSwapExternAmountOut, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - if (message.tokenOut !== undefined) { - Coin.encode(message.tokenOut, writer.uint32(26).fork()).ldelim(); - } - if (message.shareInMaxAmount !== "") { - writer.uint32(34).string(message.shareInMaxAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExitSwapExternAmountOut { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExitSwapExternAmountOut(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - case 3: - message.tokenOut = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.shareInMaxAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExitSwapExternAmountOut { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - tokenOut: isSet(object.tokenOut) ? Coin.fromJSON(object.tokenOut) : undefined, - shareInMaxAmount: isSet(object.shareInMaxAmount) ? String(object.shareInMaxAmount) : "" - }; - }, - toJSON(message: MsgExitSwapExternAmountOut): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.tokenOut !== undefined && (obj.tokenOut = message.tokenOut ? Coin.toJSON(message.tokenOut) : undefined); - message.shareInMaxAmount !== undefined && (obj.shareInMaxAmount = message.shareInMaxAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgExitSwapExternAmountOut { - const message = createBaseMsgExitSwapExternAmountOut(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.tokenOut = object.tokenOut !== undefined && object.tokenOut !== null ? Coin.fromPartial(object.tokenOut) : undefined; - message.shareInMaxAmount = object.shareInMaxAmount ?? ""; - return message; - }, - fromSDK(object: MsgExitSwapExternAmountOutSDKType): MsgExitSwapExternAmountOut { - return { - sender: object?.sender, - poolId: object?.pool_id, - tokenOut: object.token_out ? Coin.fromSDK(object.token_out) : undefined, - shareInMaxAmount: object?.share_in_max_amount - }; - }, - toSDK(message: MsgExitSwapExternAmountOut): MsgExitSwapExternAmountOutSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - message.tokenOut !== undefined && (obj.token_out = message.tokenOut ? Coin.toSDK(message.tokenOut) : undefined); - obj.share_in_max_amount = message.shareInMaxAmount; - return obj; - }, - fromAmino(object: MsgExitSwapExternAmountOutAmino): MsgExitSwapExternAmountOut { - return { - sender: object.sender, - poolId: BigInt(object.pool_id), - tokenOut: object?.token_out ? Coin.fromAmino(object.token_out) : undefined, - shareInMaxAmount: object.share_in_max_amount - }; - }, - toAmino(message: MsgExitSwapExternAmountOut): MsgExitSwapExternAmountOutAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.token_out = message.tokenOut ? Coin.toAmino(message.tokenOut) : undefined; - obj.share_in_max_amount = message.shareInMaxAmount; - return obj; - }, - fromAminoMsg(object: MsgExitSwapExternAmountOutAminoMsg): MsgExitSwapExternAmountOut { - return MsgExitSwapExternAmountOut.fromAmino(object.value); - }, - toAminoMsg(message: MsgExitSwapExternAmountOut): MsgExitSwapExternAmountOutAminoMsg { - return { - type: "osmosis/gamm/exit-swap-extern-amount-out", - value: MsgExitSwapExternAmountOut.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExitSwapExternAmountOutProtoMsg): MsgExitSwapExternAmountOut { - return MsgExitSwapExternAmountOut.decode(message.value); - }, - toProto(message: MsgExitSwapExternAmountOut): Uint8Array { - return MsgExitSwapExternAmountOut.encode(message).finish(); - }, - toProtoMsg(message: MsgExitSwapExternAmountOut): MsgExitSwapExternAmountOutProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut", - value: MsgExitSwapExternAmountOut.encode(message).finish() - }; - } -}; -function createBaseMsgExitSwapExternAmountOutResponse(): MsgExitSwapExternAmountOutResponse { - return { - shareInAmount: "" - }; -} -export const MsgExitSwapExternAmountOutResponse = { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOutResponse", - aminoType: "osmosis/gamm/exit-swap-extern-amount-out-response", - encode(message: MsgExitSwapExternAmountOutResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.shareInAmount !== "") { - writer.uint32(10).string(message.shareInAmount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExitSwapExternAmountOutResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExitSwapExternAmountOutResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.shareInAmount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExitSwapExternAmountOutResponse { - return { - shareInAmount: isSet(object.shareInAmount) ? String(object.shareInAmount) : "" - }; - }, - toJSON(message: MsgExitSwapExternAmountOutResponse): unknown { - const obj: any = {}; - message.shareInAmount !== undefined && (obj.shareInAmount = message.shareInAmount); - return obj; - }, - fromPartial(object: DeepPartial): MsgExitSwapExternAmountOutResponse { - const message = createBaseMsgExitSwapExternAmountOutResponse(); - message.shareInAmount = object.shareInAmount ?? ""; - return message; - }, - fromSDK(object: MsgExitSwapExternAmountOutResponseSDKType): MsgExitSwapExternAmountOutResponse { - return { - shareInAmount: object?.share_in_amount - }; - }, - toSDK(message: MsgExitSwapExternAmountOutResponse): MsgExitSwapExternAmountOutResponseSDKType { - const obj: any = {}; - obj.share_in_amount = message.shareInAmount; - return obj; - }, - fromAmino(object: MsgExitSwapExternAmountOutResponseAmino): MsgExitSwapExternAmountOutResponse { - return { - shareInAmount: object.share_in_amount - }; - }, - toAmino(message: MsgExitSwapExternAmountOutResponse): MsgExitSwapExternAmountOutResponseAmino { - const obj: any = {}; - obj.share_in_amount = message.shareInAmount; - return obj; - }, - fromAminoMsg(object: MsgExitSwapExternAmountOutResponseAminoMsg): MsgExitSwapExternAmountOutResponse { - return MsgExitSwapExternAmountOutResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExitSwapExternAmountOutResponse): MsgExitSwapExternAmountOutResponseAminoMsg { - return { - type: "osmosis/gamm/exit-swap-extern-amount-out-response", - value: MsgExitSwapExternAmountOutResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExitSwapExternAmountOutResponseProtoMsg): MsgExitSwapExternAmountOutResponse { - return MsgExitSwapExternAmountOutResponse.decode(message.value); - }, - toProto(message: MsgExitSwapExternAmountOutResponse): Uint8Array { - return MsgExitSwapExternAmountOutResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExitSwapExternAmountOutResponse): MsgExitSwapExternAmountOutResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOutResponse", - value: MsgExitSwapExternAmountOutResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v2/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v2/query.rpc.Query.ts deleted file mode 100644 index bfd99984..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v2/query.rpc.Query.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QuerySpotPriceRequest, QuerySpotPriceResponse } from "./query"; -export interface Query { - /** - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - spotPrice(request: QuerySpotPriceRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.spotPrice = this.spotPrice.bind(this); - } - spotPrice(request: QuerySpotPriceRequest): Promise { - const data = QuerySpotPriceRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.gamm.v2.Query", "SpotPrice", data); - return promise.then(data => QuerySpotPriceResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - spotPrice(request: QuerySpotPriceRequest): Promise { - return queryService.spotPrice(request); - } - }; -}; -export interface UseSpotPriceQuery extends ReactQueryParams { - request: QuerySpotPriceRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useSpotPrice = ({ - request, - options - }: UseSpotPriceQuery) => { - return useQuery(["spotPriceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.spotPrice(request); - }, options); - }; - return { - /** - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - useSpotPrice - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QuerySpotPriceStore { - store = new QueryStore(queryService?.spotPrice); - spotPrice(request: QuerySpotPriceRequest) { - return this.store.getData(request); - } - } - return { - /** - * SpotPrice defines a gRPC query handler that returns the spot price given - * a base denomination and a quote denomination. - */ - QuerySpotPriceStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/gamm/v2/query.ts b/examples/interchainjs/src/codegen/osmosis/gamm/v2/query.ts deleted file mode 100644 index e0ccadf4..00000000 --- a/examples/interchainjs/src/codegen/osmosis/gamm/v2/query.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice - * query. - */ -export interface QuerySpotPriceRequest { - poolId: bigint; - baseAssetDenom: string; - quoteAssetDenom: string; -} -export interface QuerySpotPriceRequestProtoMsg { - typeUrl: "/osmosis.gamm.v2.QuerySpotPriceRequest"; - value: Uint8Array; -} -/** - * QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice - * query. - */ -export interface QuerySpotPriceRequestAmino { - pool_id: string; - base_asset_denom: string; - quote_asset_denom: string; -} -export interface QuerySpotPriceRequestAminoMsg { - type: "osmosis/gamm/v2/query-spot-price-request"; - value: QuerySpotPriceRequestAmino; -} -/** - * QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice - * query. - */ -export interface QuerySpotPriceRequestSDKType { - pool_id: bigint; - base_asset_denom: string; - quote_asset_denom: string; -} -/** - * QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice - * query. - */ -export interface QuerySpotPriceResponse { - /** String of the Dec. Ex) 10.203uatom */ - spotPrice: string; -} -export interface QuerySpotPriceResponseProtoMsg { - typeUrl: "/osmosis.gamm.v2.QuerySpotPriceResponse"; - value: Uint8Array; -} -/** - * QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice - * query. - */ -export interface QuerySpotPriceResponseAmino { - /** String of the Dec. Ex) 10.203uatom */ - spot_price: string; -} -export interface QuerySpotPriceResponseAminoMsg { - type: "osmosis/gamm/v2/query-spot-price-response"; - value: QuerySpotPriceResponseAmino; -} -/** - * QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice - * query. - */ -export interface QuerySpotPriceResponseSDKType { - spot_price: string; -} -function createBaseQuerySpotPriceRequest(): QuerySpotPriceRequest { - return { - poolId: BigInt(0), - baseAssetDenom: "", - quoteAssetDenom: "" - }; -} -export const QuerySpotPriceRequest = { - typeUrl: "/osmosis.gamm.v2.QuerySpotPriceRequest", - aminoType: "osmosis/gamm/v2/query-spot-price-request", - encode(message: QuerySpotPriceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.baseAssetDenom !== "") { - writer.uint32(18).string(message.baseAssetDenom); - } - if (message.quoteAssetDenom !== "") { - writer.uint32(26).string(message.quoteAssetDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySpotPriceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpotPriceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.baseAssetDenom = reader.string(); - break; - case 3: - message.quoteAssetDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySpotPriceRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - baseAssetDenom: isSet(object.baseAssetDenom) ? String(object.baseAssetDenom) : "", - quoteAssetDenom: isSet(object.quoteAssetDenom) ? String(object.quoteAssetDenom) : "" - }; - }, - toJSON(message: QuerySpotPriceRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.baseAssetDenom !== undefined && (obj.baseAssetDenom = message.baseAssetDenom); - message.quoteAssetDenom !== undefined && (obj.quoteAssetDenom = message.quoteAssetDenom); - return obj; - }, - fromPartial(object: DeepPartial): QuerySpotPriceRequest { - const message = createBaseQuerySpotPriceRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.baseAssetDenom = object.baseAssetDenom ?? ""; - message.quoteAssetDenom = object.quoteAssetDenom ?? ""; - return message; - }, - fromSDK(object: QuerySpotPriceRequestSDKType): QuerySpotPriceRequest { - return { - poolId: object?.pool_id, - baseAssetDenom: object?.base_asset_denom, - quoteAssetDenom: object?.quote_asset_denom - }; - }, - toSDK(message: QuerySpotPriceRequest): QuerySpotPriceRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.base_asset_denom = message.baseAssetDenom; - obj.quote_asset_denom = message.quoteAssetDenom; - return obj; - }, - fromAmino(object: QuerySpotPriceRequestAmino): QuerySpotPriceRequest { - return { - poolId: BigInt(object.pool_id), - baseAssetDenom: object.base_asset_denom, - quoteAssetDenom: object.quote_asset_denom - }; - }, - toAmino(message: QuerySpotPriceRequest): QuerySpotPriceRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.base_asset_denom = message.baseAssetDenom; - obj.quote_asset_denom = message.quoteAssetDenom; - return obj; - }, - fromAminoMsg(object: QuerySpotPriceRequestAminoMsg): QuerySpotPriceRequest { - return QuerySpotPriceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QuerySpotPriceRequest): QuerySpotPriceRequestAminoMsg { - return { - type: "osmosis/gamm/v2/query-spot-price-request", - value: QuerySpotPriceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySpotPriceRequestProtoMsg): QuerySpotPriceRequest { - return QuerySpotPriceRequest.decode(message.value); - }, - toProto(message: QuerySpotPriceRequest): Uint8Array { - return QuerySpotPriceRequest.encode(message).finish(); - }, - toProtoMsg(message: QuerySpotPriceRequest): QuerySpotPriceRequestProtoMsg { - return { - typeUrl: "/osmosis.gamm.v2.QuerySpotPriceRequest", - value: QuerySpotPriceRequest.encode(message).finish() - }; - } -}; -function createBaseQuerySpotPriceResponse(): QuerySpotPriceResponse { - return { - spotPrice: "" - }; -} -export const QuerySpotPriceResponse = { - typeUrl: "/osmosis.gamm.v2.QuerySpotPriceResponse", - aminoType: "osmosis/gamm/v2/query-spot-price-response", - encode(message: QuerySpotPriceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.spotPrice !== "") { - writer.uint32(10).string(message.spotPrice); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QuerySpotPriceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpotPriceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.spotPrice = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QuerySpotPriceResponse { - return { - spotPrice: isSet(object.spotPrice) ? String(object.spotPrice) : "" - }; - }, - toJSON(message: QuerySpotPriceResponse): unknown { - const obj: any = {}; - message.spotPrice !== undefined && (obj.spotPrice = message.spotPrice); - return obj; - }, - fromPartial(object: DeepPartial): QuerySpotPriceResponse { - const message = createBaseQuerySpotPriceResponse(); - message.spotPrice = object.spotPrice ?? ""; - return message; - }, - fromSDK(object: QuerySpotPriceResponseSDKType): QuerySpotPriceResponse { - return { - spotPrice: object?.spot_price - }; - }, - toSDK(message: QuerySpotPriceResponse): QuerySpotPriceResponseSDKType { - const obj: any = {}; - obj.spot_price = message.spotPrice; - return obj; - }, - fromAmino(object: QuerySpotPriceResponseAmino): QuerySpotPriceResponse { - return { - spotPrice: object.spot_price - }; - }, - toAmino(message: QuerySpotPriceResponse): QuerySpotPriceResponseAmino { - const obj: any = {}; - obj.spot_price = message.spotPrice; - return obj; - }, - fromAminoMsg(object: QuerySpotPriceResponseAminoMsg): QuerySpotPriceResponse { - return QuerySpotPriceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QuerySpotPriceResponse): QuerySpotPriceResponseAminoMsg { - return { - type: "osmosis/gamm/v2/query-spot-price-response", - value: QuerySpotPriceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QuerySpotPriceResponseProtoMsg): QuerySpotPriceResponse { - return QuerySpotPriceResponse.decode(message.value); - }, - toProto(message: QuerySpotPriceResponse): Uint8Array { - return QuerySpotPriceResponse.encode(message).finish(); - }, - toProtoMsg(message: QuerySpotPriceResponse): QuerySpotPriceResponseProtoMsg { - return { - typeUrl: "/osmosis.gamm.v2.QuerySpotPriceResponse", - value: QuerySpotPriceResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/params.ts b/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/params.ts deleted file mode 100644 index e8843840..00000000 --- a/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/params.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Params defines the parameters for the ibc-rate-limit module. */ -export interface Params { - contractAddress: string; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.ibcratelimit.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the parameters for the ibc-rate-limit module. */ -export interface ParamsAmino { - contract_address: string; -} -export interface ParamsAminoMsg { - type: "osmosis/ibcratelimit/params"; - value: ParamsAmino; -} -/** Params defines the parameters for the ibc-rate-limit module. */ -export interface ParamsSDKType { - contract_address: string; -} -function createBaseParams(): Params { - return { - contractAddress: "" - }; -} -export const Params = { - typeUrl: "/osmosis.ibcratelimit.v1beta1.Params", - aminoType: "osmosis/ibcratelimit/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - contractAddress: isSet(object.contractAddress) ? String(object.contractAddress) : "" - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.contractAddress = object.contractAddress ?? ""; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - contractAddress: object?.contract_address - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.contract_address = message.contractAddress; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - contractAddress: object.contract_address - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.contract_address = message.contractAddress; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/ibcratelimit/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.ibcratelimit.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 6177611a..00000000 --- a/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Params defines a gRPC query method that returns the ibc-rate-limit module's - * parameters. - */ - params(request?: QueryParamsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.ibcratelimit.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - return { - /** - * Params defines a gRPC query method that returns the ibc-rate-limit module's - * parameters. - */ - useParams - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - return { - /** - * Params defines a gRPC query method that returns the ibc-rate-limit module's - * parameters. - */ - QueryParamsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/query.ts deleted file mode 100644 index badc5854..00000000 --- a/examples/interchainjs/src/codegen/osmosis/ibc-rate-limit/v1beta1/query.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.ibcratelimit.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/ibcratelimit/query-params-request"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.ibcratelimit.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/ibcratelimit/query-params-response"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.ibcratelimit.v1beta1.QueryParamsRequest", - aminoType: "osmosis/ibcratelimit/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/ibcratelimit/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.ibcratelimit.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.ibcratelimit.v1beta1.QueryParamsResponse", - aminoType: "osmosis/ibcratelimit/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/ibcratelimit/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.ibcratelimit.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/gauge.ts b/examples/interchainjs/src/codegen/osmosis/incentives/gauge.ts deleted file mode 100644 index d4c36ce4..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/gauge.ts +++ /dev/null @@ -1,440 +0,0 @@ -import { QueryCondition, QueryConditionAmino, QueryConditionSDKType } from "../lockup/lock"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../helpers"; -/** - * Gauge is an object that stores and distributes yields to recipients who - * satisfy certain conditions. Currently gauges support conditions around the - * duration for which a given denom is locked. - */ -export interface Gauge { - /** id is the unique ID of a Gauge */ - id: bigint; - /** - * is_perpetual is a flag to show if it's a perpetual or non-perpetual gauge - * Non-perpetual gauges distribute their tokens equally per epoch while the - * gauge is in the active period. Perpetual gauges distribute all their tokens - * at a single time and only distribute their tokens again once the gauge is - * refilled, Intended for use with incentives that get refilled daily. - */ - isPerpetual: boolean; - /** - * distribute_to is where the gauge rewards are distributed to. - * This is queried via lock duration or by timestamp - */ - distributeTo: QueryCondition | undefined; - /** - * coins is the total amount of coins that have been in the gauge - * Can distribute multiple coin denoms - */ - coins: Coin[]; - /** start_time is the distribution start time */ - startTime: Date | undefined; - /** - * num_epochs_paid_over is the number of total epochs distribution will be - * completed over - */ - numEpochsPaidOver: bigint; - /** - * filled_epochs is the number of epochs distribution has been completed on - * already - */ - filledEpochs: bigint; - /** distributed_coins are coins that have been distributed already */ - distributedCoins: Coin[]; -} -export interface GaugeProtoMsg { - typeUrl: "/osmosis.incentives.Gauge"; - value: Uint8Array; -} -/** - * Gauge is an object that stores and distributes yields to recipients who - * satisfy certain conditions. Currently gauges support conditions around the - * duration for which a given denom is locked. - */ -export interface GaugeAmino { - /** id is the unique ID of a Gauge */ - id: string; - /** - * is_perpetual is a flag to show if it's a perpetual or non-perpetual gauge - * Non-perpetual gauges distribute their tokens equally per epoch while the - * gauge is in the active period. Perpetual gauges distribute all their tokens - * at a single time and only distribute their tokens again once the gauge is - * refilled, Intended for use with incentives that get refilled daily. - */ - is_perpetual: boolean; - /** - * distribute_to is where the gauge rewards are distributed to. - * This is queried via lock duration or by timestamp - */ - distribute_to?: QueryConditionAmino | undefined; - /** - * coins is the total amount of coins that have been in the gauge - * Can distribute multiple coin denoms - */ - coins: CoinAmino[]; - /** start_time is the distribution start time */ - start_time?: Date | undefined; - /** - * num_epochs_paid_over is the number of total epochs distribution will be - * completed over - */ - num_epochs_paid_over: string; - /** - * filled_epochs is the number of epochs distribution has been completed on - * already - */ - filled_epochs: string; - /** distributed_coins are coins that have been distributed already */ - distributed_coins: CoinAmino[]; -} -export interface GaugeAminoMsg { - type: "osmosis/incentives/gauge"; - value: GaugeAmino; -} -/** - * Gauge is an object that stores and distributes yields to recipients who - * satisfy certain conditions. Currently gauges support conditions around the - * duration for which a given denom is locked. - */ -export interface GaugeSDKType { - id: bigint; - is_perpetual: boolean; - distribute_to: QueryConditionSDKType | undefined; - coins: CoinSDKType[]; - start_time: Date | undefined; - num_epochs_paid_over: bigint; - filled_epochs: bigint; - distributed_coins: CoinSDKType[]; -} -export interface LockableDurationsInfo { - /** List of incentivised durations that gauges will pay out to */ - lockableDurations: Duration[]; -} -export interface LockableDurationsInfoProtoMsg { - typeUrl: "/osmosis.incentives.LockableDurationsInfo"; - value: Uint8Array; -} -export interface LockableDurationsInfoAmino { - /** List of incentivised durations that gauges will pay out to */ - lockable_durations: DurationAmino[]; -} -export interface LockableDurationsInfoAminoMsg { - type: "osmosis/incentives/lockable-durations-info"; - value: LockableDurationsInfoAmino; -} -export interface LockableDurationsInfoSDKType { - lockable_durations: DurationSDKType[]; -} -function createBaseGauge(): Gauge { - return { - id: BigInt(0), - isPerpetual: false, - distributeTo: QueryCondition.fromPartial({}), - coins: [], - startTime: new Date(), - numEpochsPaidOver: BigInt(0), - filledEpochs: BigInt(0), - distributedCoins: [] - }; -} -export const Gauge = { - typeUrl: "/osmosis.incentives.Gauge", - aminoType: "osmosis/incentives/gauge", - encode(message: Gauge, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== BigInt(0)) { - writer.uint32(8).uint64(message.id); - } - if (message.isPerpetual === true) { - writer.uint32(16).bool(message.isPerpetual); - } - if (message.distributeTo !== undefined) { - QueryCondition.encode(message.distributeTo, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.startTime !== undefined) { - Timestamp.encode(toTimestamp(message.startTime), writer.uint32(42).fork()).ldelim(); - } - if (message.numEpochsPaidOver !== BigInt(0)) { - writer.uint32(48).uint64(message.numEpochsPaidOver); - } - if (message.filledEpochs !== BigInt(0)) { - writer.uint32(56).uint64(message.filledEpochs); - } - for (const v of message.distributedCoins) { - Coin.encode(v!, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Gauge { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGauge(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.isPerpetual = reader.bool(); - break; - case 3: - message.distributeTo = QueryCondition.decode(reader, reader.uint32()); - break; - case 4: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.numEpochsPaidOver = reader.uint64(); - break; - case 7: - message.filledEpochs = reader.uint64(); - break; - case 8: - message.distributedCoins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Gauge { - return { - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0), - isPerpetual: isSet(object.isPerpetual) ? Boolean(object.isPerpetual) : false, - distributeTo: isSet(object.distributeTo) ? QueryCondition.fromJSON(object.distributeTo) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [], - startTime: isSet(object.startTime) ? new Date(object.startTime) : undefined, - numEpochsPaidOver: isSet(object.numEpochsPaidOver) ? BigInt(object.numEpochsPaidOver.toString()) : BigInt(0), - filledEpochs: isSet(object.filledEpochs) ? BigInt(object.filledEpochs.toString()) : BigInt(0), - distributedCoins: Array.isArray(object?.distributedCoins) ? object.distributedCoins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Gauge): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - message.isPerpetual !== undefined && (obj.isPerpetual = message.isPerpetual); - message.distributeTo !== undefined && (obj.distributeTo = message.distributeTo ? QueryCondition.toJSON(message.distributeTo) : undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - message.startTime !== undefined && (obj.startTime = message.startTime.toISOString()); - message.numEpochsPaidOver !== undefined && (obj.numEpochsPaidOver = (message.numEpochsPaidOver || BigInt(0)).toString()); - message.filledEpochs !== undefined && (obj.filledEpochs = (message.filledEpochs || BigInt(0)).toString()); - if (message.distributedCoins) { - obj.distributedCoins = message.distributedCoins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.distributedCoins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Gauge { - const message = createBaseGauge(); - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - message.isPerpetual = object.isPerpetual ?? false; - message.distributeTo = object.distributeTo !== undefined && object.distributeTo !== null ? QueryCondition.fromPartial(object.distributeTo) : undefined; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - message.startTime = object.startTime ?? undefined; - message.numEpochsPaidOver = object.numEpochsPaidOver !== undefined && object.numEpochsPaidOver !== null ? BigInt(object.numEpochsPaidOver.toString()) : BigInt(0); - message.filledEpochs = object.filledEpochs !== undefined && object.filledEpochs !== null ? BigInt(object.filledEpochs.toString()) : BigInt(0); - message.distributedCoins = object.distributedCoins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GaugeSDKType): Gauge { - return { - id: object?.id, - isPerpetual: object?.is_perpetual, - distributeTo: object.distribute_to ? QueryCondition.fromSDK(object.distribute_to) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [], - startTime: object.start_time ?? undefined, - numEpochsPaidOver: object?.num_epochs_paid_over, - filledEpochs: object?.filled_epochs, - distributedCoins: Array.isArray(object?.distributed_coins) ? object.distributed_coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Gauge): GaugeSDKType { - const obj: any = {}; - obj.id = message.id; - obj.is_perpetual = message.isPerpetual; - message.distributeTo !== undefined && (obj.distribute_to = message.distributeTo ? QueryCondition.toSDK(message.distributeTo) : undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - message.startTime !== undefined && (obj.start_time = message.startTime ?? undefined); - obj.num_epochs_paid_over = message.numEpochsPaidOver; - obj.filled_epochs = message.filledEpochs; - if (message.distributedCoins) { - obj.distributed_coins = message.distributedCoins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.distributed_coins = []; - } - return obj; - }, - fromAmino(object: GaugeAmino): Gauge { - return { - id: BigInt(object.id), - isPerpetual: object.is_perpetual, - distributeTo: object?.distribute_to ? QueryCondition.fromAmino(object.distribute_to) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [], - startTime: object.start_time, - numEpochsPaidOver: BigInt(object.num_epochs_paid_over), - filledEpochs: BigInt(object.filled_epochs), - distributedCoins: Array.isArray(object?.distributed_coins) ? object.distributed_coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Gauge): GaugeAmino { - const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - obj.is_perpetual = message.isPerpetual; - obj.distribute_to = message.distributeTo ? QueryCondition.toAmino(message.distributeTo) : undefined; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - obj.start_time = message.startTime; - obj.num_epochs_paid_over = message.numEpochsPaidOver ? message.numEpochsPaidOver.toString() : undefined; - obj.filled_epochs = message.filledEpochs ? message.filledEpochs.toString() : undefined; - if (message.distributedCoins) { - obj.distributed_coins = message.distributedCoins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.distributed_coins = []; - } - return obj; - }, - fromAminoMsg(object: GaugeAminoMsg): Gauge { - return Gauge.fromAmino(object.value); - }, - toAminoMsg(message: Gauge): GaugeAminoMsg { - return { - type: "osmosis/incentives/gauge", - value: Gauge.toAmino(message) - }; - }, - fromProtoMsg(message: GaugeProtoMsg): Gauge { - return Gauge.decode(message.value); - }, - toProto(message: Gauge): Uint8Array { - return Gauge.encode(message).finish(); - }, - toProtoMsg(message: Gauge): GaugeProtoMsg { - return { - typeUrl: "/osmosis.incentives.Gauge", - value: Gauge.encode(message).finish() - }; - } -}; -function createBaseLockableDurationsInfo(): LockableDurationsInfo { - return { - lockableDurations: [] - }; -} -export const LockableDurationsInfo = { - typeUrl: "/osmosis.incentives.LockableDurationsInfo", - aminoType: "osmosis/incentives/lockable-durations-info", - encode(message: LockableDurationsInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.lockableDurations) { - Duration.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockableDurationsInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockableDurationsInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockableDurations.push(Duration.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockableDurationsInfo { - return { - lockableDurations: Array.isArray(object?.lockableDurations) ? object.lockableDurations.map((e: any) => Duration.fromJSON(e)) : [] - }; - }, - toJSON(message: LockableDurationsInfo): unknown { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockableDurations = message.lockableDurations.map(e => e ? Duration.toJSON(e) : undefined); - } else { - obj.lockableDurations = []; - } - return obj; - }, - fromPartial(object: DeepPartial): LockableDurationsInfo { - const message = createBaseLockableDurationsInfo(); - message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; - return message; - }, - fromSDK(object: LockableDurationsInfoSDKType): LockableDurationsInfo { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromSDK(e)) : [] - }; - }, - toSDK(message: LockableDurationsInfo): LockableDurationsInfoSDKType { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toSDK(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAmino(object: LockableDurationsInfoAmino): LockableDurationsInfo { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromAmino(e)) : [] - }; - }, - toAmino(message: LockableDurationsInfo): LockableDurationsInfoAmino { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAminoMsg(object: LockableDurationsInfoAminoMsg): LockableDurationsInfo { - return LockableDurationsInfo.fromAmino(object.value); - }, - toAminoMsg(message: LockableDurationsInfo): LockableDurationsInfoAminoMsg { - return { - type: "osmosis/incentives/lockable-durations-info", - value: LockableDurationsInfo.toAmino(message) - }; - }, - fromProtoMsg(message: LockableDurationsInfoProtoMsg): LockableDurationsInfo { - return LockableDurationsInfo.decode(message.value); - }, - toProto(message: LockableDurationsInfo): Uint8Array { - return LockableDurationsInfo.encode(message).finish(); - }, - toProtoMsg(message: LockableDurationsInfo): LockableDurationsInfoProtoMsg { - return { - typeUrl: "/osmosis.incentives.LockableDurationsInfo", - value: LockableDurationsInfo.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/genesis.ts b/examples/interchainjs/src/codegen/osmosis/incentives/genesis.ts deleted file mode 100644 index bb888bda..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/genesis.ts +++ /dev/null @@ -1,217 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { Gauge, GaugeAmino, GaugeSDKType } from "./gauge"; -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** - * GenesisState defines the incentives module's various parameters when first - * initialized - */ -export interface GenesisState { - /** params are all the parameters of the module */ - params: Params | undefined; - /** gauges are all gauges that should exist at genesis */ - gauges: Gauge[]; - /** - * lockable_durations are all lockup durations that gauges can be locked for - * in order to recieve incentives - */ - lockableDurations: Duration[]; - /** - * last_gauge_id is what the gauge number will increment from when creating - * the next gauge after genesis - */ - lastGaugeId: bigint; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.incentives.GenesisState"; - value: Uint8Array; -} -/** - * GenesisState defines the incentives module's various parameters when first - * initialized - */ -export interface GenesisStateAmino { - /** params are all the parameters of the module */ - params?: ParamsAmino | undefined; - /** gauges are all gauges that should exist at genesis */ - gauges: GaugeAmino[]; - /** - * lockable_durations are all lockup durations that gauges can be locked for - * in order to recieve incentives - */ - lockable_durations: DurationAmino[]; - /** - * last_gauge_id is what the gauge number will increment from when creating - * the next gauge after genesis - */ - last_gauge_id: string; -} -export interface GenesisStateAminoMsg { - type: "osmosis/incentives/genesis-state"; - value: GenesisStateAmino; -} -/** - * GenesisState defines the incentives module's various parameters when first - * initialized - */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - gauges: GaugeSDKType[]; - lockable_durations: DurationSDKType[]; - last_gauge_id: bigint; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - gauges: [], - lockableDurations: [], - lastGaugeId: BigInt(0) - }; -} -export const GenesisState = { - typeUrl: "/osmosis.incentives.GenesisState", - aminoType: "osmosis/incentives/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.gauges) { - Gauge.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.lockableDurations) { - Duration.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.lastGaugeId !== BigInt(0)) { - writer.uint32(32).uint64(message.lastGaugeId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.gauges.push(Gauge.decode(reader, reader.uint32())); - break; - case 3: - message.lockableDurations.push(Duration.decode(reader, reader.uint32())); - break; - case 4: - message.lastGaugeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - gauges: Array.isArray(object?.gauges) ? object.gauges.map((e: any) => Gauge.fromJSON(e)) : [], - lockableDurations: Array.isArray(object?.lockableDurations) ? object.lockableDurations.map((e: any) => Duration.fromJSON(e)) : [], - lastGaugeId: isSet(object.lastGaugeId) ? BigInt(object.lastGaugeId.toString()) : BigInt(0) - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.gauges) { - obj.gauges = message.gauges.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.gauges = []; - } - if (message.lockableDurations) { - obj.lockableDurations = message.lockableDurations.map(e => e ? Duration.toJSON(e) : undefined); - } else { - obj.lockableDurations = []; - } - message.lastGaugeId !== undefined && (obj.lastGaugeId = (message.lastGaugeId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.gauges = object.gauges?.map(e => Gauge.fromPartial(e)) || []; - message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; - message.lastGaugeId = object.lastGaugeId !== undefined && object.lastGaugeId !== null ? BigInt(object.lastGaugeId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - gauges: Array.isArray(object?.gauges) ? object.gauges.map((e: any) => Gauge.fromSDK(e)) : [], - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromSDK(e)) : [], - lastGaugeId: object?.last_gauge_id - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.gauges) { - obj.gauges = message.gauges.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.gauges = []; - } - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toSDK(e) : undefined); - } else { - obj.lockable_durations = []; - } - obj.last_gauge_id = message.lastGaugeId; - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - gauges: Array.isArray(object?.gauges) ? object.gauges.map((e: any) => Gauge.fromAmino(e)) : [], - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromAmino(e)) : [], - lastGaugeId: BigInt(object.last_gauge_id) - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.gauges) { - obj.gauges = message.gauges.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.gauges = []; - } - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e) : undefined); - } else { - obj.lockable_durations = []; - } - obj.last_gauge_id = message.lastGaugeId ? message.lastGaugeId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/incentives/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.incentives.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/params.ts b/examples/interchainjs/src/codegen/osmosis/incentives/params.ts deleted file mode 100644 index 1164a65f..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/params.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** Params holds parameters for the incentives module */ -export interface Params { - /** - * distr_epoch_identifier is what epoch type distribution will be triggered by - * (day, week, etc.) - */ - distrEpochIdentifier: string; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.incentives.Params"; - value: Uint8Array; -} -/** Params holds parameters for the incentives module */ -export interface ParamsAmino { - /** - * distr_epoch_identifier is what epoch type distribution will be triggered by - * (day, week, etc.) - */ - distr_epoch_identifier: string; -} -export interface ParamsAminoMsg { - type: "osmosis/incentives/params"; - value: ParamsAmino; -} -/** Params holds parameters for the incentives module */ -export interface ParamsSDKType { - distr_epoch_identifier: string; -} -function createBaseParams(): Params { - return { - distrEpochIdentifier: "" - }; -} -export const Params = { - typeUrl: "/osmosis.incentives.Params", - aminoType: "osmosis/incentives/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.distrEpochIdentifier !== "") { - writer.uint32(10).string(message.distrEpochIdentifier); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.distrEpochIdentifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - distrEpochIdentifier: isSet(object.distrEpochIdentifier) ? String(object.distrEpochIdentifier) : "" - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.distrEpochIdentifier !== undefined && (obj.distrEpochIdentifier = message.distrEpochIdentifier); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.distrEpochIdentifier = object.distrEpochIdentifier ?? ""; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - distrEpochIdentifier: object?.distr_epoch_identifier - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.distr_epoch_identifier = message.distrEpochIdentifier; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - distrEpochIdentifier: object.distr_epoch_identifier - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.distr_epoch_identifier = message.distrEpochIdentifier; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/incentives/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.incentives.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/incentives/query.rpc.Query.ts deleted file mode 100644 index 19617a7e..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/query.rpc.Query.ts +++ /dev/null @@ -1,363 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../mobx"; -import { ModuleToDistributeCoinsRequest, ModuleToDistributeCoinsResponse, GaugeByIDRequest, GaugeByIDResponse, GaugesRequest, GaugesResponse, ActiveGaugesRequest, ActiveGaugesResponse, ActiveGaugesPerDenomRequest, ActiveGaugesPerDenomResponse, UpcomingGaugesRequest, UpcomingGaugesResponse, UpcomingGaugesPerDenomRequest, UpcomingGaugesPerDenomResponse, RewardsEstRequest, RewardsEstResponse, QueryLockableDurationsRequest, QueryLockableDurationsResponse } from "./query"; -/** Query defines the gRPC querier service */ -export interface Query { - /** ModuleToDistributeCoins returns coins that are going to be distributed */ - moduleToDistributeCoins(request?: ModuleToDistributeCoinsRequest): Promise; - /** GaugeByID returns gauges by their respective ID */ - gaugeByID(request: GaugeByIDRequest): Promise; - /** Gauges returns both upcoming and active gauges */ - gauges(request?: GaugesRequest): Promise; - /** ActiveGauges returns active gauges */ - activeGauges(request?: ActiveGaugesRequest): Promise; - /** ActiveGaugesPerDenom returns active gauges by denom */ - activeGaugesPerDenom(request: ActiveGaugesPerDenomRequest): Promise; - /** Returns scheduled gauges that have not yet occured */ - upcomingGauges(request?: UpcomingGaugesRequest): Promise; - /** - * UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured - * by denom - */ - upcomingGaugesPerDenom(request: UpcomingGaugesPerDenomRequest): Promise; - /** - * RewardsEst returns an estimate of the rewards from now until a specified - * time in the future The querier either provides an address or a set of locks - * for which they want to find the associated rewards - */ - rewardsEst(request: RewardsEstRequest): Promise; - /** - * LockableDurations returns lockable durations that are valid to distribute - * incentives for - */ - lockableDurations(request?: QueryLockableDurationsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.moduleToDistributeCoins = this.moduleToDistributeCoins.bind(this); - this.gaugeByID = this.gaugeByID.bind(this); - this.gauges = this.gauges.bind(this); - this.activeGauges = this.activeGauges.bind(this); - this.activeGaugesPerDenom = this.activeGaugesPerDenom.bind(this); - this.upcomingGauges = this.upcomingGauges.bind(this); - this.upcomingGaugesPerDenom = this.upcomingGaugesPerDenom.bind(this); - this.rewardsEst = this.rewardsEst.bind(this); - this.lockableDurations = this.lockableDurations.bind(this); - } - moduleToDistributeCoins(request: ModuleToDistributeCoinsRequest = {}): Promise { - const data = ModuleToDistributeCoinsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "ModuleToDistributeCoins", data); - return promise.then(data => ModuleToDistributeCoinsResponse.decode(new BinaryReader(data))); - } - gaugeByID(request: GaugeByIDRequest): Promise { - const data = GaugeByIDRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "GaugeByID", data); - return promise.then(data => GaugeByIDResponse.decode(new BinaryReader(data))); - } - gauges(request: GaugesRequest = { - pagination: undefined - }): Promise { - const data = GaugesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "Gauges", data); - return promise.then(data => GaugesResponse.decode(new BinaryReader(data))); - } - activeGauges(request: ActiveGaugesRequest = { - pagination: undefined - }): Promise { - const data = ActiveGaugesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "ActiveGauges", data); - return promise.then(data => ActiveGaugesResponse.decode(new BinaryReader(data))); - } - activeGaugesPerDenom(request: ActiveGaugesPerDenomRequest): Promise { - const data = ActiveGaugesPerDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "ActiveGaugesPerDenom", data); - return promise.then(data => ActiveGaugesPerDenomResponse.decode(new BinaryReader(data))); - } - upcomingGauges(request: UpcomingGaugesRequest = { - pagination: undefined - }): Promise { - const data = UpcomingGaugesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "UpcomingGauges", data); - return promise.then(data => UpcomingGaugesResponse.decode(new BinaryReader(data))); - } - upcomingGaugesPerDenom(request: UpcomingGaugesPerDenomRequest): Promise { - const data = UpcomingGaugesPerDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "UpcomingGaugesPerDenom", data); - return promise.then(data => UpcomingGaugesPerDenomResponse.decode(new BinaryReader(data))); - } - rewardsEst(request: RewardsEstRequest): Promise { - const data = RewardsEstRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "RewardsEst", data); - return promise.then(data => RewardsEstResponse.decode(new BinaryReader(data))); - } - lockableDurations(request: QueryLockableDurationsRequest = {}): Promise { - const data = QueryLockableDurationsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Query", "LockableDurations", data); - return promise.then(data => QueryLockableDurationsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - moduleToDistributeCoins(request?: ModuleToDistributeCoinsRequest): Promise { - return queryService.moduleToDistributeCoins(request); - }, - gaugeByID(request: GaugeByIDRequest): Promise { - return queryService.gaugeByID(request); - }, - gauges(request?: GaugesRequest): Promise { - return queryService.gauges(request); - }, - activeGauges(request?: ActiveGaugesRequest): Promise { - return queryService.activeGauges(request); - }, - activeGaugesPerDenom(request: ActiveGaugesPerDenomRequest): Promise { - return queryService.activeGaugesPerDenom(request); - }, - upcomingGauges(request?: UpcomingGaugesRequest): Promise { - return queryService.upcomingGauges(request); - }, - upcomingGaugesPerDenom(request: UpcomingGaugesPerDenomRequest): Promise { - return queryService.upcomingGaugesPerDenom(request); - }, - rewardsEst(request: RewardsEstRequest): Promise { - return queryService.rewardsEst(request); - }, - lockableDurations(request?: QueryLockableDurationsRequest): Promise { - return queryService.lockableDurations(request); - } - }; -}; -export interface UseModuleToDistributeCoinsQuery extends ReactQueryParams { - request?: ModuleToDistributeCoinsRequest; -} -export interface UseGaugeByIDQuery extends ReactQueryParams { - request: GaugeByIDRequest; -} -export interface UseGaugesQuery extends ReactQueryParams { - request?: GaugesRequest; -} -export interface UseActiveGaugesQuery extends ReactQueryParams { - request?: ActiveGaugesRequest; -} -export interface UseActiveGaugesPerDenomQuery extends ReactQueryParams { - request: ActiveGaugesPerDenomRequest; -} -export interface UseUpcomingGaugesQuery extends ReactQueryParams { - request?: UpcomingGaugesRequest; -} -export interface UseUpcomingGaugesPerDenomQuery extends ReactQueryParams { - request: UpcomingGaugesPerDenomRequest; -} -export interface UseRewardsEstQuery extends ReactQueryParams { - request: RewardsEstRequest; -} -export interface UseLockableDurationsQuery extends ReactQueryParams { - request?: QueryLockableDurationsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useModuleToDistributeCoins = ({ - request, - options - }: UseModuleToDistributeCoinsQuery) => { - return useQuery(["moduleToDistributeCoinsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.moduleToDistributeCoins(request); - }, options); - }; - const useGaugeByID = ({ - request, - options - }: UseGaugeByIDQuery) => { - return useQuery(["gaugeByIDQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.gaugeByID(request); - }, options); - }; - const useGauges = ({ - request, - options - }: UseGaugesQuery) => { - return useQuery(["gaugesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.gauges(request); - }, options); - }; - const useActiveGauges = ({ - request, - options - }: UseActiveGaugesQuery) => { - return useQuery(["activeGaugesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.activeGauges(request); - }, options); - }; - const useActiveGaugesPerDenom = ({ - request, - options - }: UseActiveGaugesPerDenomQuery) => { - return useQuery(["activeGaugesPerDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.activeGaugesPerDenom(request); - }, options); - }; - const useUpcomingGauges = ({ - request, - options - }: UseUpcomingGaugesQuery) => { - return useQuery(["upcomingGaugesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.upcomingGauges(request); - }, options); - }; - const useUpcomingGaugesPerDenom = ({ - request, - options - }: UseUpcomingGaugesPerDenomQuery) => { - return useQuery(["upcomingGaugesPerDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.upcomingGaugesPerDenom(request); - }, options); - }; - const useRewardsEst = ({ - request, - options - }: UseRewardsEstQuery) => { - return useQuery(["rewardsEstQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.rewardsEst(request); - }, options); - }; - const useLockableDurations = ({ - request, - options - }: UseLockableDurationsQuery) => { - return useQuery(["lockableDurationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.lockableDurations(request); - }, options); - }; - return { - /** ModuleToDistributeCoins returns coins that are going to be distributed */useModuleToDistributeCoins, - /** GaugeByID returns gauges by their respective ID */useGaugeByID, - /** Gauges returns both upcoming and active gauges */useGauges, - /** ActiveGauges returns active gauges */useActiveGauges, - /** ActiveGaugesPerDenom returns active gauges by denom */useActiveGaugesPerDenom, - /** Returns scheduled gauges that have not yet occured */useUpcomingGauges, - /** - * UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured - * by denom - */ - useUpcomingGaugesPerDenom, - /** - * RewardsEst returns an estimate of the rewards from now until a specified - * time in the future The querier either provides an address or a set of locks - * for which they want to find the associated rewards - */ - useRewardsEst, - /** - * LockableDurations returns lockable durations that are valid to distribute - * incentives for - */ - useLockableDurations - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryModuleToDistributeCoinsStore { - store = new QueryStore(queryService?.moduleToDistributeCoins); - moduleToDistributeCoins(request: ModuleToDistributeCoinsRequest) { - return this.store.getData(request); - } - } - class QueryGaugeByIDStore { - store = new QueryStore(queryService?.gaugeByID); - gaugeByID(request: GaugeByIDRequest) { - return this.store.getData(request); - } - } - class QueryGaugesStore { - store = new QueryStore(queryService?.gauges); - gauges(request: GaugesRequest) { - return this.store.getData(request); - } - } - class QueryActiveGaugesStore { - store = new QueryStore(queryService?.activeGauges); - activeGauges(request: ActiveGaugesRequest) { - return this.store.getData(request); - } - } - class QueryActiveGaugesPerDenomStore { - store = new QueryStore(queryService?.activeGaugesPerDenom); - activeGaugesPerDenom(request: ActiveGaugesPerDenomRequest) { - return this.store.getData(request); - } - } - class QueryUpcomingGaugesStore { - store = new QueryStore(queryService?.upcomingGauges); - upcomingGauges(request: UpcomingGaugesRequest) { - return this.store.getData(request); - } - } - class QueryUpcomingGaugesPerDenomStore { - store = new QueryStore(queryService?.upcomingGaugesPerDenom); - upcomingGaugesPerDenom(request: UpcomingGaugesPerDenomRequest) { - return this.store.getData(request); - } - } - class QueryRewardsEstStore { - store = new QueryStore(queryService?.rewardsEst); - rewardsEst(request: RewardsEstRequest) { - return this.store.getData(request); - } - } - class QueryLockableDurationsStore { - store = new QueryStore(queryService?.lockableDurations); - lockableDurations(request: QueryLockableDurationsRequest) { - return this.store.getData(request); - } - } - return { - /** ModuleToDistributeCoins returns coins that are going to be distributed */QueryModuleToDistributeCoinsStore, - /** GaugeByID returns gauges by their respective ID */QueryGaugeByIDStore, - /** Gauges returns both upcoming and active gauges */QueryGaugesStore, - /** ActiveGauges returns active gauges */QueryActiveGaugesStore, - /** ActiveGaugesPerDenom returns active gauges by denom */QueryActiveGaugesPerDenomStore, - /** Returns scheduled gauges that have not yet occured */QueryUpcomingGaugesStore, - /** - * UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured - * by denom - */ - QueryUpcomingGaugesPerDenomStore, - /** - * RewardsEst returns an estimate of the rewards from now until a specified - * time in the future The querier either provides an address or a set of locks - * for which they want to find the associated rewards - */ - QueryRewardsEstStore, - /** - * LockableDurations returns lockable durations that are valid to distribute - * incentives for - */ - QueryLockableDurationsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/query.ts b/examples/interchainjs/src/codegen/osmosis/incentives/query.ts deleted file mode 100644 index 65542b22..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/query.ts +++ /dev/null @@ -1,2180 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { Gauge, GaugeAmino, GaugeSDKType } from "./gauge"; -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, isSet } from "../../helpers"; -export interface ModuleToDistributeCoinsRequest {} -export interface ModuleToDistributeCoinsRequestProtoMsg { - typeUrl: "/osmosis.incentives.ModuleToDistributeCoinsRequest"; - value: Uint8Array; -} -export interface ModuleToDistributeCoinsRequestAmino {} -export interface ModuleToDistributeCoinsRequestAminoMsg { - type: "osmosis/incentives/module-to-distribute-coins-request"; - value: ModuleToDistributeCoinsRequestAmino; -} -export interface ModuleToDistributeCoinsRequestSDKType {} -export interface ModuleToDistributeCoinsResponse { - /** Coins that have yet to be distributed */ - coins: Coin[]; -} -export interface ModuleToDistributeCoinsResponseProtoMsg { - typeUrl: "/osmosis.incentives.ModuleToDistributeCoinsResponse"; - value: Uint8Array; -} -export interface ModuleToDistributeCoinsResponseAmino { - /** Coins that have yet to be distributed */ - coins: CoinAmino[]; -} -export interface ModuleToDistributeCoinsResponseAminoMsg { - type: "osmosis/incentives/module-to-distribute-coins-response"; - value: ModuleToDistributeCoinsResponseAmino; -} -export interface ModuleToDistributeCoinsResponseSDKType { - coins: CoinSDKType[]; -} -export interface GaugeByIDRequest { - /** Gague ID being queried */ - id: bigint; -} -export interface GaugeByIDRequestProtoMsg { - typeUrl: "/osmosis.incentives.GaugeByIDRequest"; - value: Uint8Array; -} -export interface GaugeByIDRequestAmino { - /** Gague ID being queried */ - id: string; -} -export interface GaugeByIDRequestAminoMsg { - type: "osmosis/incentives/gauge-by-id-request"; - value: GaugeByIDRequestAmino; -} -export interface GaugeByIDRequestSDKType { - id: bigint; -} -export interface GaugeByIDResponse { - /** Gauge that corresponds to provided gague ID */ - gauge: Gauge | undefined; -} -export interface GaugeByIDResponseProtoMsg { - typeUrl: "/osmosis.incentives.GaugeByIDResponse"; - value: Uint8Array; -} -export interface GaugeByIDResponseAmino { - /** Gauge that corresponds to provided gague ID */ - gauge?: GaugeAmino | undefined; -} -export interface GaugeByIDResponseAminoMsg { - type: "osmosis/incentives/gauge-by-id-response"; - value: GaugeByIDResponseAmino; -} -export interface GaugeByIDResponseSDKType { - gauge: GaugeSDKType | undefined; -} -export interface GaugesRequest { - /** Pagination defines pagination for the request */ - pagination: PageRequest | undefined; -} -export interface GaugesRequestProtoMsg { - typeUrl: "/osmosis.incentives.GaugesRequest"; - value: Uint8Array; -} -export interface GaugesRequestAmino { - /** Pagination defines pagination for the request */ - pagination?: PageRequestAmino | undefined; -} -export interface GaugesRequestAminoMsg { - type: "osmosis/incentives/gauges-request"; - value: GaugesRequestAmino; -} -export interface GaugesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -export interface GaugesResponse { - /** Upcoming and active gauges */ - data: Gauge[]; - /** Pagination defines pagination for the response */ - pagination: PageResponse | undefined; -} -export interface GaugesResponseProtoMsg { - typeUrl: "/osmosis.incentives.GaugesResponse"; - value: Uint8Array; -} -export interface GaugesResponseAmino { - /** Upcoming and active gauges */ - data: GaugeAmino[]; - /** Pagination defines pagination for the response */ - pagination?: PageResponseAmino | undefined; -} -export interface GaugesResponseAminoMsg { - type: "osmosis/incentives/gauges-response"; - value: GaugesResponseAmino; -} -export interface GaugesResponseSDKType { - data: GaugeSDKType[]; - pagination: PageResponseSDKType | undefined; -} -export interface ActiveGaugesRequest { - /** Pagination defines pagination for the request */ - pagination: PageRequest | undefined; -} -export interface ActiveGaugesRequestProtoMsg { - typeUrl: "/osmosis.incentives.ActiveGaugesRequest"; - value: Uint8Array; -} -export interface ActiveGaugesRequestAmino { - /** Pagination defines pagination for the request */ - pagination?: PageRequestAmino | undefined; -} -export interface ActiveGaugesRequestAminoMsg { - type: "osmosis/incentives/active-gauges-request"; - value: ActiveGaugesRequestAmino; -} -export interface ActiveGaugesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -export interface ActiveGaugesResponse { - /** Active gagues only */ - data: Gauge[]; - /** Pagination defines pagination for the response */ - pagination: PageResponse | undefined; -} -export interface ActiveGaugesResponseProtoMsg { - typeUrl: "/osmosis.incentives.ActiveGaugesResponse"; - value: Uint8Array; -} -export interface ActiveGaugesResponseAmino { - /** Active gagues only */ - data: GaugeAmino[]; - /** Pagination defines pagination for the response */ - pagination?: PageResponseAmino | undefined; -} -export interface ActiveGaugesResponseAminoMsg { - type: "osmosis/incentives/active-gauges-response"; - value: ActiveGaugesResponseAmino; -} -export interface ActiveGaugesResponseSDKType { - data: GaugeSDKType[]; - pagination: PageResponseSDKType | undefined; -} -export interface ActiveGaugesPerDenomRequest { - /** Desired denom when querying active gagues */ - denom: string; - /** Pagination defines pagination for the request */ - pagination: PageRequest | undefined; -} -export interface ActiveGaugesPerDenomRequestProtoMsg { - typeUrl: "/osmosis.incentives.ActiveGaugesPerDenomRequest"; - value: Uint8Array; -} -export interface ActiveGaugesPerDenomRequestAmino { - /** Desired denom when querying active gagues */ - denom: string; - /** Pagination defines pagination for the request */ - pagination?: PageRequestAmino | undefined; -} -export interface ActiveGaugesPerDenomRequestAminoMsg { - type: "osmosis/incentives/active-gauges-per-denom-request"; - value: ActiveGaugesPerDenomRequestAmino; -} -export interface ActiveGaugesPerDenomRequestSDKType { - denom: string; - pagination: PageRequestSDKType | undefined; -} -export interface ActiveGaugesPerDenomResponse { - /** Active gagues that match denom in query */ - data: Gauge[]; - /** Pagination defines pagination for the response */ - pagination: PageResponse | undefined; -} -export interface ActiveGaugesPerDenomResponseProtoMsg { - typeUrl: "/osmosis.incentives.ActiveGaugesPerDenomResponse"; - value: Uint8Array; -} -export interface ActiveGaugesPerDenomResponseAmino { - /** Active gagues that match denom in query */ - data: GaugeAmino[]; - /** Pagination defines pagination for the response */ - pagination?: PageResponseAmino | undefined; -} -export interface ActiveGaugesPerDenomResponseAminoMsg { - type: "osmosis/incentives/active-gauges-per-denom-response"; - value: ActiveGaugesPerDenomResponseAmino; -} -export interface ActiveGaugesPerDenomResponseSDKType { - data: GaugeSDKType[]; - pagination: PageResponseSDKType | undefined; -} -export interface UpcomingGaugesRequest { - /** Pagination defines pagination for the request */ - pagination: PageRequest | undefined; -} -export interface UpcomingGaugesRequestProtoMsg { - typeUrl: "/osmosis.incentives.UpcomingGaugesRequest"; - value: Uint8Array; -} -export interface UpcomingGaugesRequestAmino { - /** Pagination defines pagination for the request */ - pagination?: PageRequestAmino | undefined; -} -export interface UpcomingGaugesRequestAminoMsg { - type: "osmosis/incentives/upcoming-gauges-request"; - value: UpcomingGaugesRequestAmino; -} -export interface UpcomingGaugesRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -export interface UpcomingGaugesResponse { - /** Gauges whose distribution is upcoming */ - data: Gauge[]; - /** Pagination defines pagination for the response */ - pagination: PageResponse | undefined; -} -export interface UpcomingGaugesResponseProtoMsg { - typeUrl: "/osmosis.incentives.UpcomingGaugesResponse"; - value: Uint8Array; -} -export interface UpcomingGaugesResponseAmino { - /** Gauges whose distribution is upcoming */ - data: GaugeAmino[]; - /** Pagination defines pagination for the response */ - pagination?: PageResponseAmino | undefined; -} -export interface UpcomingGaugesResponseAminoMsg { - type: "osmosis/incentives/upcoming-gauges-response"; - value: UpcomingGaugesResponseAmino; -} -export interface UpcomingGaugesResponseSDKType { - data: GaugeSDKType[]; - pagination: PageResponseSDKType | undefined; -} -export interface UpcomingGaugesPerDenomRequest { - /** Filter for upcoming gagues that match specific denom */ - denom: string; - /** Pagination defines pagination for the request */ - pagination: PageRequest | undefined; -} -export interface UpcomingGaugesPerDenomRequestProtoMsg { - typeUrl: "/osmosis.incentives.UpcomingGaugesPerDenomRequest"; - value: Uint8Array; -} -export interface UpcomingGaugesPerDenomRequestAmino { - /** Filter for upcoming gagues that match specific denom */ - denom: string; - /** Pagination defines pagination for the request */ - pagination?: PageRequestAmino | undefined; -} -export interface UpcomingGaugesPerDenomRequestAminoMsg { - type: "osmosis/incentives/upcoming-gauges-per-denom-request"; - value: UpcomingGaugesPerDenomRequestAmino; -} -export interface UpcomingGaugesPerDenomRequestSDKType { - denom: string; - pagination: PageRequestSDKType | undefined; -} -export interface UpcomingGaugesPerDenomResponse { - /** Upcoming gagues that match denom in query */ - upcomingGauges: Gauge[]; - /** Pagination defines pagination for the response */ - pagination: PageResponse | undefined; -} -export interface UpcomingGaugesPerDenomResponseProtoMsg { - typeUrl: "/osmosis.incentives.UpcomingGaugesPerDenomResponse"; - value: Uint8Array; -} -export interface UpcomingGaugesPerDenomResponseAmino { - /** Upcoming gagues that match denom in query */ - upcoming_gauges: GaugeAmino[]; - /** Pagination defines pagination for the response */ - pagination?: PageResponseAmino | undefined; -} -export interface UpcomingGaugesPerDenomResponseAminoMsg { - type: "osmosis/incentives/upcoming-gauges-per-denom-response"; - value: UpcomingGaugesPerDenomResponseAmino; -} -export interface UpcomingGaugesPerDenomResponseSDKType { - upcoming_gauges: GaugeSDKType[]; - pagination: PageResponseSDKType | undefined; -} -export interface RewardsEstRequest { - /** Address that is being queried for future estimated rewards */ - owner: string; - /** Lock IDs included in future reward estimation */ - lockIds: bigint[]; - /** - * Upper time limit of reward estimation - * Lower limit is current epoch - */ - endEpoch: bigint; -} -export interface RewardsEstRequestProtoMsg { - typeUrl: "/osmosis.incentives.RewardsEstRequest"; - value: Uint8Array; -} -export interface RewardsEstRequestAmino { - /** Address that is being queried for future estimated rewards */ - owner: string; - /** Lock IDs included in future reward estimation */ - lock_ids: string[]; - /** - * Upper time limit of reward estimation - * Lower limit is current epoch - */ - end_epoch: string; -} -export interface RewardsEstRequestAminoMsg { - type: "osmosis/incentives/rewards-est-request"; - value: RewardsEstRequestAmino; -} -export interface RewardsEstRequestSDKType { - owner: string; - lock_ids: bigint[]; - end_epoch: bigint; -} -export interface RewardsEstResponse { - /** - * Estimated coin rewards that will be recieved at provided address - * from specified locks between current time and end epoch - */ - coins: Coin[]; -} -export interface RewardsEstResponseProtoMsg { - typeUrl: "/osmosis.incentives.RewardsEstResponse"; - value: Uint8Array; -} -export interface RewardsEstResponseAmino { - /** - * Estimated coin rewards that will be recieved at provided address - * from specified locks between current time and end epoch - */ - coins: CoinAmino[]; -} -export interface RewardsEstResponseAminoMsg { - type: "osmosis/incentives/rewards-est-response"; - value: RewardsEstResponseAmino; -} -export interface RewardsEstResponseSDKType { - coins: CoinSDKType[]; -} -export interface QueryLockableDurationsRequest {} -export interface QueryLockableDurationsRequestProtoMsg { - typeUrl: "/osmosis.incentives.QueryLockableDurationsRequest"; - value: Uint8Array; -} -export interface QueryLockableDurationsRequestAmino {} -export interface QueryLockableDurationsRequestAminoMsg { - type: "osmosis/incentives/query-lockable-durations-request"; - value: QueryLockableDurationsRequestAmino; -} -export interface QueryLockableDurationsRequestSDKType {} -export interface QueryLockableDurationsResponse { - /** Time durations that users can lock coins for in order to recieve rewards */ - lockableDurations: Duration[]; -} -export interface QueryLockableDurationsResponseProtoMsg { - typeUrl: "/osmosis.incentives.QueryLockableDurationsResponse"; - value: Uint8Array; -} -export interface QueryLockableDurationsResponseAmino { - /** Time durations that users can lock coins for in order to recieve rewards */ - lockable_durations: DurationAmino[]; -} -export interface QueryLockableDurationsResponseAminoMsg { - type: "osmosis/incentives/query-lockable-durations-response"; - value: QueryLockableDurationsResponseAmino; -} -export interface QueryLockableDurationsResponseSDKType { - lockable_durations: DurationSDKType[]; -} -function createBaseModuleToDistributeCoinsRequest(): ModuleToDistributeCoinsRequest { - return {}; -} -export const ModuleToDistributeCoinsRequest = { - typeUrl: "/osmosis.incentives.ModuleToDistributeCoinsRequest", - aminoType: "osmosis/incentives/module-to-distribute-coins-request", - encode(_: ModuleToDistributeCoinsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleToDistributeCoinsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleToDistributeCoinsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): ModuleToDistributeCoinsRequest { - return {}; - }, - toJSON(_: ModuleToDistributeCoinsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): ModuleToDistributeCoinsRequest { - const message = createBaseModuleToDistributeCoinsRequest(); - return message; - }, - fromSDK(_: ModuleToDistributeCoinsRequestSDKType): ModuleToDistributeCoinsRequest { - return {}; - }, - toSDK(_: ModuleToDistributeCoinsRequest): ModuleToDistributeCoinsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: ModuleToDistributeCoinsRequestAmino): ModuleToDistributeCoinsRequest { - return {}; - }, - toAmino(_: ModuleToDistributeCoinsRequest): ModuleToDistributeCoinsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: ModuleToDistributeCoinsRequestAminoMsg): ModuleToDistributeCoinsRequest { - return ModuleToDistributeCoinsRequest.fromAmino(object.value); - }, - toAminoMsg(message: ModuleToDistributeCoinsRequest): ModuleToDistributeCoinsRequestAminoMsg { - return { - type: "osmosis/incentives/module-to-distribute-coins-request", - value: ModuleToDistributeCoinsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleToDistributeCoinsRequestProtoMsg): ModuleToDistributeCoinsRequest { - return ModuleToDistributeCoinsRequest.decode(message.value); - }, - toProto(message: ModuleToDistributeCoinsRequest): Uint8Array { - return ModuleToDistributeCoinsRequest.encode(message).finish(); - }, - toProtoMsg(message: ModuleToDistributeCoinsRequest): ModuleToDistributeCoinsRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.ModuleToDistributeCoinsRequest", - value: ModuleToDistributeCoinsRequest.encode(message).finish() - }; - } -}; -function createBaseModuleToDistributeCoinsResponse(): ModuleToDistributeCoinsResponse { - return { - coins: [] - }; -} -export const ModuleToDistributeCoinsResponse = { - typeUrl: "/osmosis.incentives.ModuleToDistributeCoinsResponse", - aminoType: "osmosis/incentives/module-to-distribute-coins-response", - encode(message: ModuleToDistributeCoinsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleToDistributeCoinsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleToDistributeCoinsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleToDistributeCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: ModuleToDistributeCoinsResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ModuleToDistributeCoinsResponse { - const message = createBaseModuleToDistributeCoinsResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ModuleToDistributeCoinsResponseSDKType): ModuleToDistributeCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: ModuleToDistributeCoinsResponse): ModuleToDistributeCoinsResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: ModuleToDistributeCoinsResponseAmino): ModuleToDistributeCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: ModuleToDistributeCoinsResponse): ModuleToDistributeCoinsResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: ModuleToDistributeCoinsResponseAminoMsg): ModuleToDistributeCoinsResponse { - return ModuleToDistributeCoinsResponse.fromAmino(object.value); - }, - toAminoMsg(message: ModuleToDistributeCoinsResponse): ModuleToDistributeCoinsResponseAminoMsg { - return { - type: "osmosis/incentives/module-to-distribute-coins-response", - value: ModuleToDistributeCoinsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleToDistributeCoinsResponseProtoMsg): ModuleToDistributeCoinsResponse { - return ModuleToDistributeCoinsResponse.decode(message.value); - }, - toProto(message: ModuleToDistributeCoinsResponse): Uint8Array { - return ModuleToDistributeCoinsResponse.encode(message).finish(); - }, - toProtoMsg(message: ModuleToDistributeCoinsResponse): ModuleToDistributeCoinsResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.ModuleToDistributeCoinsResponse", - value: ModuleToDistributeCoinsResponse.encode(message).finish() - }; - } -}; -function createBaseGaugeByIDRequest(): GaugeByIDRequest { - return { - id: BigInt(0) - }; -} -export const GaugeByIDRequest = { - typeUrl: "/osmosis.incentives.GaugeByIDRequest", - aminoType: "osmosis/incentives/gauge-by-id-request", - encode(message: GaugeByIDRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== BigInt(0)) { - writer.uint32(8).uint64(message.id); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GaugeByIDRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGaugeByIDRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GaugeByIDRequest { - return { - id: isSet(object.id) ? BigInt(object.id.toString()) : BigInt(0) - }; - }, - toJSON(message: GaugeByIDRequest): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = (message.id || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GaugeByIDRequest { - const message = createBaseGaugeByIDRequest(); - message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GaugeByIDRequestSDKType): GaugeByIDRequest { - return { - id: object?.id - }; - }, - toSDK(message: GaugeByIDRequest): GaugeByIDRequestSDKType { - const obj: any = {}; - obj.id = message.id; - return obj; - }, - fromAmino(object: GaugeByIDRequestAmino): GaugeByIDRequest { - return { - id: BigInt(object.id) - }; - }, - toAmino(message: GaugeByIDRequest): GaugeByIDRequestAmino { - const obj: any = {}; - obj.id = message.id ? message.id.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GaugeByIDRequestAminoMsg): GaugeByIDRequest { - return GaugeByIDRequest.fromAmino(object.value); - }, - toAminoMsg(message: GaugeByIDRequest): GaugeByIDRequestAminoMsg { - return { - type: "osmosis/incentives/gauge-by-id-request", - value: GaugeByIDRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GaugeByIDRequestProtoMsg): GaugeByIDRequest { - return GaugeByIDRequest.decode(message.value); - }, - toProto(message: GaugeByIDRequest): Uint8Array { - return GaugeByIDRequest.encode(message).finish(); - }, - toProtoMsg(message: GaugeByIDRequest): GaugeByIDRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.GaugeByIDRequest", - value: GaugeByIDRequest.encode(message).finish() - }; - } -}; -function createBaseGaugeByIDResponse(): GaugeByIDResponse { - return { - gauge: Gauge.fromPartial({}) - }; -} -export const GaugeByIDResponse = { - typeUrl: "/osmosis.incentives.GaugeByIDResponse", - aminoType: "osmosis/incentives/gauge-by-id-response", - encode(message: GaugeByIDResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gauge !== undefined) { - Gauge.encode(message.gauge, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GaugeByIDResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGaugeByIDResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gauge = Gauge.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GaugeByIDResponse { - return { - gauge: isSet(object.gauge) ? Gauge.fromJSON(object.gauge) : undefined - }; - }, - toJSON(message: GaugeByIDResponse): unknown { - const obj: any = {}; - message.gauge !== undefined && (obj.gauge = message.gauge ? Gauge.toJSON(message.gauge) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GaugeByIDResponse { - const message = createBaseGaugeByIDResponse(); - message.gauge = object.gauge !== undefined && object.gauge !== null ? Gauge.fromPartial(object.gauge) : undefined; - return message; - }, - fromSDK(object: GaugeByIDResponseSDKType): GaugeByIDResponse { - return { - gauge: object.gauge ? Gauge.fromSDK(object.gauge) : undefined - }; - }, - toSDK(message: GaugeByIDResponse): GaugeByIDResponseSDKType { - const obj: any = {}; - message.gauge !== undefined && (obj.gauge = message.gauge ? Gauge.toSDK(message.gauge) : undefined); - return obj; - }, - fromAmino(object: GaugeByIDResponseAmino): GaugeByIDResponse { - return { - gauge: object?.gauge ? Gauge.fromAmino(object.gauge) : undefined - }; - }, - toAmino(message: GaugeByIDResponse): GaugeByIDResponseAmino { - const obj: any = {}; - obj.gauge = message.gauge ? Gauge.toAmino(message.gauge) : undefined; - return obj; - }, - fromAminoMsg(object: GaugeByIDResponseAminoMsg): GaugeByIDResponse { - return GaugeByIDResponse.fromAmino(object.value); - }, - toAminoMsg(message: GaugeByIDResponse): GaugeByIDResponseAminoMsg { - return { - type: "osmosis/incentives/gauge-by-id-response", - value: GaugeByIDResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GaugeByIDResponseProtoMsg): GaugeByIDResponse { - return GaugeByIDResponse.decode(message.value); - }, - toProto(message: GaugeByIDResponse): Uint8Array { - return GaugeByIDResponse.encode(message).finish(); - }, - toProtoMsg(message: GaugeByIDResponse): GaugeByIDResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.GaugeByIDResponse", - value: GaugeByIDResponse.encode(message).finish() - }; - } -}; -function createBaseGaugesRequest(): GaugesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const GaugesRequest = { - typeUrl: "/osmosis.incentives.GaugesRequest", - aminoType: "osmosis/incentives/gauges-request", - encode(message: GaugesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GaugesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGaugesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GaugesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GaugesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GaugesRequest { - const message = createBaseGaugesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GaugesRequestSDKType): GaugesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GaugesRequest): GaugesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GaugesRequestAmino): GaugesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GaugesRequest): GaugesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GaugesRequestAminoMsg): GaugesRequest { - return GaugesRequest.fromAmino(object.value); - }, - toAminoMsg(message: GaugesRequest): GaugesRequestAminoMsg { - return { - type: "osmosis/incentives/gauges-request", - value: GaugesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: GaugesRequestProtoMsg): GaugesRequest { - return GaugesRequest.decode(message.value); - }, - toProto(message: GaugesRequest): Uint8Array { - return GaugesRequest.encode(message).finish(); - }, - toProtoMsg(message: GaugesRequest): GaugesRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.GaugesRequest", - value: GaugesRequest.encode(message).finish() - }; - } -}; -function createBaseGaugesResponse(): GaugesResponse { - return { - data: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const GaugesResponse = { - typeUrl: "/osmosis.incentives.GaugesResponse", - aminoType: "osmosis/incentives/gauges-response", - encode(message: GaugesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GaugesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGaugesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(Gauge.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: GaugesResponse): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GaugesResponse { - const message = createBaseGaugesResponse(); - message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: GaugesResponseSDKType): GaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: GaugesResponse): GaugesResponseSDKType { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: GaugesResponseAmino): GaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: GaugesResponse): GaugesResponseAmino { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.data = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: GaugesResponseAminoMsg): GaugesResponse { - return GaugesResponse.fromAmino(object.value); - }, - toAminoMsg(message: GaugesResponse): GaugesResponseAminoMsg { - return { - type: "osmosis/incentives/gauges-response", - value: GaugesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: GaugesResponseProtoMsg): GaugesResponse { - return GaugesResponse.decode(message.value); - }, - toProto(message: GaugesResponse): Uint8Array { - return GaugesResponse.encode(message).finish(); - }, - toProtoMsg(message: GaugesResponse): GaugesResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.GaugesResponse", - value: GaugesResponse.encode(message).finish() - }; - } -}; -function createBaseActiveGaugesRequest(): ActiveGaugesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const ActiveGaugesRequest = { - typeUrl: "/osmosis.incentives.ActiveGaugesRequest", - aminoType: "osmosis/incentives/active-gauges-request", - encode(message: ActiveGaugesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ActiveGaugesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseActiveGaugesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ActiveGaugesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: ActiveGaugesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ActiveGaugesRequest { - const message = createBaseActiveGaugesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: ActiveGaugesRequestSDKType): ActiveGaugesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: ActiveGaugesRequest): ActiveGaugesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: ActiveGaugesRequestAmino): ActiveGaugesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: ActiveGaugesRequest): ActiveGaugesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: ActiveGaugesRequestAminoMsg): ActiveGaugesRequest { - return ActiveGaugesRequest.fromAmino(object.value); - }, - toAminoMsg(message: ActiveGaugesRequest): ActiveGaugesRequestAminoMsg { - return { - type: "osmosis/incentives/active-gauges-request", - value: ActiveGaugesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ActiveGaugesRequestProtoMsg): ActiveGaugesRequest { - return ActiveGaugesRequest.decode(message.value); - }, - toProto(message: ActiveGaugesRequest): Uint8Array { - return ActiveGaugesRequest.encode(message).finish(); - }, - toProtoMsg(message: ActiveGaugesRequest): ActiveGaugesRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.ActiveGaugesRequest", - value: ActiveGaugesRequest.encode(message).finish() - }; - } -}; -function createBaseActiveGaugesResponse(): ActiveGaugesResponse { - return { - data: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const ActiveGaugesResponse = { - typeUrl: "/osmosis.incentives.ActiveGaugesResponse", - aminoType: "osmosis/incentives/active-gauges-response", - encode(message: ActiveGaugesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ActiveGaugesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseActiveGaugesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(Gauge.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ActiveGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: ActiveGaugesResponse): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ActiveGaugesResponse { - const message = createBaseActiveGaugesResponse(); - message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: ActiveGaugesResponseSDKType): ActiveGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: ActiveGaugesResponse): ActiveGaugesResponseSDKType { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: ActiveGaugesResponseAmino): ActiveGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: ActiveGaugesResponse): ActiveGaugesResponseAmino { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.data = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: ActiveGaugesResponseAminoMsg): ActiveGaugesResponse { - return ActiveGaugesResponse.fromAmino(object.value); - }, - toAminoMsg(message: ActiveGaugesResponse): ActiveGaugesResponseAminoMsg { - return { - type: "osmosis/incentives/active-gauges-response", - value: ActiveGaugesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ActiveGaugesResponseProtoMsg): ActiveGaugesResponse { - return ActiveGaugesResponse.decode(message.value); - }, - toProto(message: ActiveGaugesResponse): Uint8Array { - return ActiveGaugesResponse.encode(message).finish(); - }, - toProtoMsg(message: ActiveGaugesResponse): ActiveGaugesResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.ActiveGaugesResponse", - value: ActiveGaugesResponse.encode(message).finish() - }; - } -}; -function createBaseActiveGaugesPerDenomRequest(): ActiveGaugesPerDenomRequest { - return { - denom: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const ActiveGaugesPerDenomRequest = { - typeUrl: "/osmosis.incentives.ActiveGaugesPerDenomRequest", - aminoType: "osmosis/incentives/active-gauges-per-denom-request", - encode(message: ActiveGaugesPerDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ActiveGaugesPerDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseActiveGaugesPerDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ActiveGaugesPerDenomRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: ActiveGaugesPerDenomRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ActiveGaugesPerDenomRequest { - const message = createBaseActiveGaugesPerDenomRequest(); - message.denom = object.denom ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: ActiveGaugesPerDenomRequestSDKType): ActiveGaugesPerDenomRequest { - return { - denom: object?.denom, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: ActiveGaugesPerDenomRequest): ActiveGaugesPerDenomRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: ActiveGaugesPerDenomRequestAmino): ActiveGaugesPerDenomRequest { - return { - denom: object.denom, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: ActiveGaugesPerDenomRequest): ActiveGaugesPerDenomRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: ActiveGaugesPerDenomRequestAminoMsg): ActiveGaugesPerDenomRequest { - return ActiveGaugesPerDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: ActiveGaugesPerDenomRequest): ActiveGaugesPerDenomRequestAminoMsg { - return { - type: "osmosis/incentives/active-gauges-per-denom-request", - value: ActiveGaugesPerDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ActiveGaugesPerDenomRequestProtoMsg): ActiveGaugesPerDenomRequest { - return ActiveGaugesPerDenomRequest.decode(message.value); - }, - toProto(message: ActiveGaugesPerDenomRequest): Uint8Array { - return ActiveGaugesPerDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: ActiveGaugesPerDenomRequest): ActiveGaugesPerDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.ActiveGaugesPerDenomRequest", - value: ActiveGaugesPerDenomRequest.encode(message).finish() - }; - } -}; -function createBaseActiveGaugesPerDenomResponse(): ActiveGaugesPerDenomResponse { - return { - data: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const ActiveGaugesPerDenomResponse = { - typeUrl: "/osmosis.incentives.ActiveGaugesPerDenomResponse", - aminoType: "osmosis/incentives/active-gauges-per-denom-response", - encode(message: ActiveGaugesPerDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ActiveGaugesPerDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseActiveGaugesPerDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(Gauge.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ActiveGaugesPerDenomResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: ActiveGaugesPerDenomResponse): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ActiveGaugesPerDenomResponse { - const message = createBaseActiveGaugesPerDenomResponse(); - message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: ActiveGaugesPerDenomResponseSDKType): ActiveGaugesPerDenomResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: ActiveGaugesPerDenomResponse): ActiveGaugesPerDenomResponseSDKType { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: ActiveGaugesPerDenomResponseAmino): ActiveGaugesPerDenomResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: ActiveGaugesPerDenomResponse): ActiveGaugesPerDenomResponseAmino { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.data = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: ActiveGaugesPerDenomResponseAminoMsg): ActiveGaugesPerDenomResponse { - return ActiveGaugesPerDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: ActiveGaugesPerDenomResponse): ActiveGaugesPerDenomResponseAminoMsg { - return { - type: "osmosis/incentives/active-gauges-per-denom-response", - value: ActiveGaugesPerDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ActiveGaugesPerDenomResponseProtoMsg): ActiveGaugesPerDenomResponse { - return ActiveGaugesPerDenomResponse.decode(message.value); - }, - toProto(message: ActiveGaugesPerDenomResponse): Uint8Array { - return ActiveGaugesPerDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: ActiveGaugesPerDenomResponse): ActiveGaugesPerDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.ActiveGaugesPerDenomResponse", - value: ActiveGaugesPerDenomResponse.encode(message).finish() - }; - } -}; -function createBaseUpcomingGaugesRequest(): UpcomingGaugesRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const UpcomingGaugesRequest = { - typeUrl: "/osmosis.incentives.UpcomingGaugesRequest", - aminoType: "osmosis/incentives/upcoming-gauges-request", - encode(message: UpcomingGaugesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpcomingGaugesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpcomingGaugesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpcomingGaugesRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: UpcomingGaugesRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): UpcomingGaugesRequest { - const message = createBaseUpcomingGaugesRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: UpcomingGaugesRequestSDKType): UpcomingGaugesRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: UpcomingGaugesRequest): UpcomingGaugesRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: UpcomingGaugesRequestAmino): UpcomingGaugesRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: UpcomingGaugesRequest): UpcomingGaugesRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: UpcomingGaugesRequestAminoMsg): UpcomingGaugesRequest { - return UpcomingGaugesRequest.fromAmino(object.value); - }, - toAminoMsg(message: UpcomingGaugesRequest): UpcomingGaugesRequestAminoMsg { - return { - type: "osmosis/incentives/upcoming-gauges-request", - value: UpcomingGaugesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: UpcomingGaugesRequestProtoMsg): UpcomingGaugesRequest { - return UpcomingGaugesRequest.decode(message.value); - }, - toProto(message: UpcomingGaugesRequest): Uint8Array { - return UpcomingGaugesRequest.encode(message).finish(); - }, - toProtoMsg(message: UpcomingGaugesRequest): UpcomingGaugesRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.UpcomingGaugesRequest", - value: UpcomingGaugesRequest.encode(message).finish() - }; - } -}; -function createBaseUpcomingGaugesResponse(): UpcomingGaugesResponse { - return { - data: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const UpcomingGaugesResponse = { - typeUrl: "/osmosis.incentives.UpcomingGaugesResponse", - aminoType: "osmosis/incentives/upcoming-gauges-response", - encode(message: UpcomingGaugesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpcomingGaugesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpcomingGaugesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(Gauge.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpcomingGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: UpcomingGaugesResponse): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): UpcomingGaugesResponse { - const message = createBaseUpcomingGaugesResponse(); - message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: UpcomingGaugesResponseSDKType): UpcomingGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: UpcomingGaugesResponse): UpcomingGaugesResponseSDKType { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.data = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: UpcomingGaugesResponseAmino): UpcomingGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: UpcomingGaugesResponse): UpcomingGaugesResponseAmino { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.data = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: UpcomingGaugesResponseAminoMsg): UpcomingGaugesResponse { - return UpcomingGaugesResponse.fromAmino(object.value); - }, - toAminoMsg(message: UpcomingGaugesResponse): UpcomingGaugesResponseAminoMsg { - return { - type: "osmosis/incentives/upcoming-gauges-response", - value: UpcomingGaugesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: UpcomingGaugesResponseProtoMsg): UpcomingGaugesResponse { - return UpcomingGaugesResponse.decode(message.value); - }, - toProto(message: UpcomingGaugesResponse): Uint8Array { - return UpcomingGaugesResponse.encode(message).finish(); - }, - toProtoMsg(message: UpcomingGaugesResponse): UpcomingGaugesResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.UpcomingGaugesResponse", - value: UpcomingGaugesResponse.encode(message).finish() - }; - } -}; -function createBaseUpcomingGaugesPerDenomRequest(): UpcomingGaugesPerDenomRequest { - return { - denom: "", - pagination: PageRequest.fromPartial({}) - }; -} -export const UpcomingGaugesPerDenomRequest = { - typeUrl: "/osmosis.incentives.UpcomingGaugesPerDenomRequest", - aminoType: "osmosis/incentives/upcoming-gauges-per-denom-request", - encode(message: UpcomingGaugesPerDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpcomingGaugesPerDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpcomingGaugesPerDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpcomingGaugesPerDenomRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: UpcomingGaugesPerDenomRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): UpcomingGaugesPerDenomRequest { - const message = createBaseUpcomingGaugesPerDenomRequest(); - message.denom = object.denom ?? ""; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: UpcomingGaugesPerDenomRequestSDKType): UpcomingGaugesPerDenomRequest { - return { - denom: object?.denom, - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: UpcomingGaugesPerDenomRequest): UpcomingGaugesPerDenomRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: UpcomingGaugesPerDenomRequestAmino): UpcomingGaugesPerDenomRequest { - return { - denom: object.denom, - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: UpcomingGaugesPerDenomRequest): UpcomingGaugesPerDenomRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: UpcomingGaugesPerDenomRequestAminoMsg): UpcomingGaugesPerDenomRequest { - return UpcomingGaugesPerDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: UpcomingGaugesPerDenomRequest): UpcomingGaugesPerDenomRequestAminoMsg { - return { - type: "osmosis/incentives/upcoming-gauges-per-denom-request", - value: UpcomingGaugesPerDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: UpcomingGaugesPerDenomRequestProtoMsg): UpcomingGaugesPerDenomRequest { - return UpcomingGaugesPerDenomRequest.decode(message.value); - }, - toProto(message: UpcomingGaugesPerDenomRequest): Uint8Array { - return UpcomingGaugesPerDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: UpcomingGaugesPerDenomRequest): UpcomingGaugesPerDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.UpcomingGaugesPerDenomRequest", - value: UpcomingGaugesPerDenomRequest.encode(message).finish() - }; - } -}; -function createBaseUpcomingGaugesPerDenomResponse(): UpcomingGaugesPerDenomResponse { - return { - upcomingGauges: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const UpcomingGaugesPerDenomResponse = { - typeUrl: "/osmosis.incentives.UpcomingGaugesPerDenomResponse", - aminoType: "osmosis/incentives/upcoming-gauges-per-denom-response", - encode(message: UpcomingGaugesPerDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.upcomingGauges) { - Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpcomingGaugesPerDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpcomingGaugesPerDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upcomingGauges.push(Gauge.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpcomingGaugesPerDenomResponse { - return { - upcomingGauges: Array.isArray(object?.upcomingGauges) ? object.upcomingGauges.map((e: any) => Gauge.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: UpcomingGaugesPerDenomResponse): unknown { - const obj: any = {}; - if (message.upcomingGauges) { - obj.upcomingGauges = message.upcomingGauges.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.upcomingGauges = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): UpcomingGaugesPerDenomResponse { - const message = createBaseUpcomingGaugesPerDenomResponse(); - message.upcomingGauges = object.upcomingGauges?.map(e => Gauge.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: UpcomingGaugesPerDenomResponseSDKType): UpcomingGaugesPerDenomResponse { - return { - upcomingGauges: Array.isArray(object?.upcoming_gauges) ? object.upcoming_gauges.map((e: any) => Gauge.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: UpcomingGaugesPerDenomResponse): UpcomingGaugesPerDenomResponseSDKType { - const obj: any = {}; - if (message.upcomingGauges) { - obj.upcoming_gauges = message.upcomingGauges.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.upcoming_gauges = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: UpcomingGaugesPerDenomResponseAmino): UpcomingGaugesPerDenomResponse { - return { - upcomingGauges: Array.isArray(object?.upcoming_gauges) ? object.upcoming_gauges.map((e: any) => Gauge.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: UpcomingGaugesPerDenomResponse): UpcomingGaugesPerDenomResponseAmino { - const obj: any = {}; - if (message.upcomingGauges) { - obj.upcoming_gauges = message.upcomingGauges.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.upcoming_gauges = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: UpcomingGaugesPerDenomResponseAminoMsg): UpcomingGaugesPerDenomResponse { - return UpcomingGaugesPerDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: UpcomingGaugesPerDenomResponse): UpcomingGaugesPerDenomResponseAminoMsg { - return { - type: "osmosis/incentives/upcoming-gauges-per-denom-response", - value: UpcomingGaugesPerDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: UpcomingGaugesPerDenomResponseProtoMsg): UpcomingGaugesPerDenomResponse { - return UpcomingGaugesPerDenomResponse.decode(message.value); - }, - toProto(message: UpcomingGaugesPerDenomResponse): Uint8Array { - return UpcomingGaugesPerDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: UpcomingGaugesPerDenomResponse): UpcomingGaugesPerDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.UpcomingGaugesPerDenomResponse", - value: UpcomingGaugesPerDenomResponse.encode(message).finish() - }; - } -}; -function createBaseRewardsEstRequest(): RewardsEstRequest { - return { - owner: "", - lockIds: [], - endEpoch: BigInt(0) - }; -} -export const RewardsEstRequest = { - typeUrl: "/osmosis.incentives.RewardsEstRequest", - aminoType: "osmosis/incentives/rewards-est-request", - encode(message: RewardsEstRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - writer.uint32(18).fork(); - for (const v of message.lockIds) { - writer.uint64(v); - } - writer.ldelim(); - if (message.endEpoch !== BigInt(0)) { - writer.uint32(24).int64(message.endEpoch); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RewardsEstRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRewardsEstRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.lockIds.push(reader.uint64()); - } - } else { - message.lockIds.push(reader.uint64()); - } - break; - case 3: - message.endEpoch = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RewardsEstRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - lockIds: Array.isArray(object?.lockIds) ? object.lockIds.map((e: any) => BigInt(e.toString())) : [], - endEpoch: isSet(object.endEpoch) ? BigInt(object.endEpoch.toString()) : BigInt(0) - }; - }, - toJSON(message: RewardsEstRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - if (message.lockIds) { - obj.lockIds = message.lockIds.map(e => (e || BigInt(0)).toString()); - } else { - obj.lockIds = []; - } - message.endEpoch !== undefined && (obj.endEpoch = (message.endEpoch || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): RewardsEstRequest { - const message = createBaseRewardsEstRequest(); - message.owner = object.owner ?? ""; - message.lockIds = object.lockIds?.map(e => BigInt(e.toString())) || []; - message.endEpoch = object.endEpoch !== undefined && object.endEpoch !== null ? BigInt(object.endEpoch.toString()) : BigInt(0); - return message; - }, - fromSDK(object: RewardsEstRequestSDKType): RewardsEstRequest { - return { - owner: object?.owner, - lockIds: Array.isArray(object?.lock_ids) ? object.lock_ids.map((e: any) => e) : [], - endEpoch: object?.end_epoch - }; - }, - toSDK(message: RewardsEstRequest): RewardsEstRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - if (message.lockIds) { - obj.lock_ids = message.lockIds.map(e => e); - } else { - obj.lock_ids = []; - } - obj.end_epoch = message.endEpoch; - return obj; - }, - fromAmino(object: RewardsEstRequestAmino): RewardsEstRequest { - return { - owner: object.owner, - lockIds: Array.isArray(object?.lock_ids) ? object.lock_ids.map((e: any) => BigInt(e)) : [], - endEpoch: BigInt(object.end_epoch) - }; - }, - toAmino(message: RewardsEstRequest): RewardsEstRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - if (message.lockIds) { - obj.lock_ids = message.lockIds.map(e => e.toString()); - } else { - obj.lock_ids = []; - } - obj.end_epoch = message.endEpoch ? message.endEpoch.toString() : undefined; - return obj; - }, - fromAminoMsg(object: RewardsEstRequestAminoMsg): RewardsEstRequest { - return RewardsEstRequest.fromAmino(object.value); - }, - toAminoMsg(message: RewardsEstRequest): RewardsEstRequestAminoMsg { - return { - type: "osmosis/incentives/rewards-est-request", - value: RewardsEstRequest.toAmino(message) - }; - }, - fromProtoMsg(message: RewardsEstRequestProtoMsg): RewardsEstRequest { - return RewardsEstRequest.decode(message.value); - }, - toProto(message: RewardsEstRequest): Uint8Array { - return RewardsEstRequest.encode(message).finish(); - }, - toProtoMsg(message: RewardsEstRequest): RewardsEstRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.RewardsEstRequest", - value: RewardsEstRequest.encode(message).finish() - }; - } -}; -function createBaseRewardsEstResponse(): RewardsEstResponse { - return { - coins: [] - }; -} -export const RewardsEstResponse = { - typeUrl: "/osmosis.incentives.RewardsEstResponse", - aminoType: "osmosis/incentives/rewards-est-response", - encode(message: RewardsEstResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RewardsEstResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRewardsEstResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RewardsEstResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: RewardsEstResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): RewardsEstResponse { - const message = createBaseRewardsEstResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: RewardsEstResponseSDKType): RewardsEstResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: RewardsEstResponse): RewardsEstResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: RewardsEstResponseAmino): RewardsEstResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: RewardsEstResponse): RewardsEstResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: RewardsEstResponseAminoMsg): RewardsEstResponse { - return RewardsEstResponse.fromAmino(object.value); - }, - toAminoMsg(message: RewardsEstResponse): RewardsEstResponseAminoMsg { - return { - type: "osmosis/incentives/rewards-est-response", - value: RewardsEstResponse.toAmino(message) - }; - }, - fromProtoMsg(message: RewardsEstResponseProtoMsg): RewardsEstResponse { - return RewardsEstResponse.decode(message.value); - }, - toProto(message: RewardsEstResponse): Uint8Array { - return RewardsEstResponse.encode(message).finish(); - }, - toProtoMsg(message: RewardsEstResponse): RewardsEstResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.RewardsEstResponse", - value: RewardsEstResponse.encode(message).finish() - }; - } -}; -function createBaseQueryLockableDurationsRequest(): QueryLockableDurationsRequest { - return {}; -} -export const QueryLockableDurationsRequest = { - typeUrl: "/osmosis.incentives.QueryLockableDurationsRequest", - aminoType: "osmosis/incentives/query-lockable-durations-request", - encode(_: QueryLockableDurationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryLockableDurationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryLockableDurationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryLockableDurationsRequest { - return {}; - }, - toJSON(_: QueryLockableDurationsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryLockableDurationsRequest { - const message = createBaseQueryLockableDurationsRequest(); - return message; - }, - fromSDK(_: QueryLockableDurationsRequestSDKType): QueryLockableDurationsRequest { - return {}; - }, - toSDK(_: QueryLockableDurationsRequest): QueryLockableDurationsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryLockableDurationsRequestAmino): QueryLockableDurationsRequest { - return {}; - }, - toAmino(_: QueryLockableDurationsRequest): QueryLockableDurationsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryLockableDurationsRequestAminoMsg): QueryLockableDurationsRequest { - return QueryLockableDurationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryLockableDurationsRequest): QueryLockableDurationsRequestAminoMsg { - return { - type: "osmosis/incentives/query-lockable-durations-request", - value: QueryLockableDurationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryLockableDurationsRequestProtoMsg): QueryLockableDurationsRequest { - return QueryLockableDurationsRequest.decode(message.value); - }, - toProto(message: QueryLockableDurationsRequest): Uint8Array { - return QueryLockableDurationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryLockableDurationsRequest): QueryLockableDurationsRequestProtoMsg { - return { - typeUrl: "/osmosis.incentives.QueryLockableDurationsRequest", - value: QueryLockableDurationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryLockableDurationsResponse(): QueryLockableDurationsResponse { - return { - lockableDurations: [] - }; -} -export const QueryLockableDurationsResponse = { - typeUrl: "/osmosis.incentives.QueryLockableDurationsResponse", - aminoType: "osmosis/incentives/query-lockable-durations-response", - encode(message: QueryLockableDurationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.lockableDurations) { - Duration.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryLockableDurationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryLockableDurationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockableDurations.push(Duration.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryLockableDurationsResponse { - return { - lockableDurations: Array.isArray(object?.lockableDurations) ? object.lockableDurations.map((e: any) => Duration.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryLockableDurationsResponse): unknown { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockableDurations = message.lockableDurations.map(e => e ? Duration.toJSON(e) : undefined); - } else { - obj.lockableDurations = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryLockableDurationsResponse { - const message = createBaseQueryLockableDurationsResponse(); - message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryLockableDurationsResponseSDKType): QueryLockableDurationsResponse { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseSDKType { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toSDK(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAmino(object: QueryLockableDurationsResponseAmino): QueryLockableDurationsResponse { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseAmino { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAminoMsg(object: QueryLockableDurationsResponseAminoMsg): QueryLockableDurationsResponse { - return QueryLockableDurationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseAminoMsg { - return { - type: "osmosis/incentives/query-lockable-durations-response", - value: QueryLockableDurationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryLockableDurationsResponseProtoMsg): QueryLockableDurationsResponse { - return QueryLockableDurationsResponse.decode(message.value); - }, - toProto(message: QueryLockableDurationsResponse): Uint8Array { - return QueryLockableDurationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.QueryLockableDurationsResponse", - value: QueryLockableDurationsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/incentives/tx.amino.ts deleted file mode 100644 index 054b416b..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/tx.amino.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MsgCreateGauge, MsgAddToGauge } from "./tx"; -export const AminoConverter = { - "/osmosis.incentives.MsgCreateGauge": { - aminoType: "osmosis/incentives/create-gauge", - toAmino: MsgCreateGauge.toAmino, - fromAmino: MsgCreateGauge.fromAmino - }, - "/osmosis.incentives.MsgAddToGauge": { - aminoType: "osmosis/incentives/add-to-gauge", - toAmino: MsgAddToGauge.toAmino, - fromAmino: MsgAddToGauge.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/incentives/tx.registry.ts deleted file mode 100644 index 2f55e031..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/tx.registry.ts +++ /dev/null @@ -1,81 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateGauge, MsgAddToGauge } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.incentives.MsgCreateGauge", MsgCreateGauge], ["/osmosis.incentives.MsgAddToGauge", MsgAddToGauge]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createGauge(value: MsgCreateGauge) { - return { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - value: MsgCreateGauge.encode(value).finish() - }; - }, - addToGauge(value: MsgAddToGauge) { - return { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - value: MsgAddToGauge.encode(value).finish() - }; - } - }, - withTypeUrl: { - createGauge(value: MsgCreateGauge) { - return { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - value - }; - }, - addToGauge(value: MsgAddToGauge) { - return { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - value - }; - } - }, - toJSON: { - createGauge(value: MsgCreateGauge) { - return { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - value: MsgCreateGauge.toJSON(value) - }; - }, - addToGauge(value: MsgAddToGauge) { - return { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - value: MsgAddToGauge.toJSON(value) - }; - } - }, - fromJSON: { - createGauge(value: any) { - return { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - value: MsgCreateGauge.fromJSON(value) - }; - }, - addToGauge(value: any) { - return { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - value: MsgAddToGauge.fromJSON(value) - }; - } - }, - fromPartial: { - createGauge(value: MsgCreateGauge) { - return { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - value: MsgCreateGauge.fromPartial(value) - }; - }, - addToGauge(value: MsgAddToGauge) { - return { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - value: MsgAddToGauge.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/incentives/tx.rpc.msg.ts deleted file mode 100644 index ccc8532f..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/tx.rpc.msg.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { MsgCreateGauge, MsgCreateGaugeResponse, MsgAddToGauge, MsgAddToGaugeResponse } from "./tx"; -export interface Msg { - createGauge(request: MsgCreateGauge): Promise; - addToGauge(request: MsgAddToGauge): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createGauge = this.createGauge.bind(this); - this.addToGauge = this.addToGauge.bind(this); - } - createGauge(request: MsgCreateGauge): Promise { - const data = MsgCreateGauge.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Msg", "CreateGauge", data); - return promise.then(data => MsgCreateGaugeResponse.decode(new BinaryReader(data))); - } - addToGauge(request: MsgAddToGauge): Promise { - const data = MsgAddToGauge.encode(request).finish(); - const promise = this.rpc.request("osmosis.incentives.Msg", "AddToGauge", data); - return promise.then(data => MsgAddToGaugeResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/incentives/tx.ts b/examples/interchainjs/src/codegen/osmosis/incentives/tx.ts deleted file mode 100644 index 56df6bb0..00000000 --- a/examples/interchainjs/src/codegen/osmosis/incentives/tx.ts +++ /dev/null @@ -1,568 +0,0 @@ -import { QueryCondition, QueryConditionAmino, QueryConditionSDKType } from "../lockup/lock"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../helpers"; -/** MsgCreateGauge creates a gague to distribute rewards to users */ -export interface MsgCreateGauge { - /** - * is_perpetual shows if it's a perpetual or non-perpetual gauge - * Non-perpetual gauges distribute their tokens equally per epoch while the - * gauge is in the active period. Perpetual gauges distribute all their tokens - * at a single time and only distribute their tokens again once the gauge is - * refilled - */ - isPerpetual: boolean; - /** owner is the address of gauge creator */ - owner: string; - /** - * distribute_to show which lock the gauge should distribute to by time - * duration or by timestamp - */ - distributeTo: QueryCondition | undefined; - /** coins are coin(s) to be distributed by the gauge */ - coins: Coin[]; - /** start_time is the distribution start time */ - startTime: Date | undefined; - /** - * num_epochs_paid_over is the number of epochs distribution will be completed - * over - */ - numEpochsPaidOver: bigint; -} -export interface MsgCreateGaugeProtoMsg { - typeUrl: "/osmosis.incentives.MsgCreateGauge"; - value: Uint8Array; -} -/** MsgCreateGauge creates a gague to distribute rewards to users */ -export interface MsgCreateGaugeAmino { - /** - * is_perpetual shows if it's a perpetual or non-perpetual gauge - * Non-perpetual gauges distribute their tokens equally per epoch while the - * gauge is in the active period. Perpetual gauges distribute all their tokens - * at a single time and only distribute their tokens again once the gauge is - * refilled - */ - is_perpetual: boolean; - /** owner is the address of gauge creator */ - owner: string; - /** - * distribute_to show which lock the gauge should distribute to by time - * duration or by timestamp - */ - distribute_to?: QueryConditionAmino | undefined; - /** coins are coin(s) to be distributed by the gauge */ - coins: CoinAmino[]; - /** start_time is the distribution start time */ - start_time?: Date | undefined; - /** - * num_epochs_paid_over is the number of epochs distribution will be completed - * over - */ - num_epochs_paid_over: string; -} -export interface MsgCreateGaugeAminoMsg { - type: "osmosis/incentives/create-gauge"; - value: MsgCreateGaugeAmino; -} -/** MsgCreateGauge creates a gague to distribute rewards to users */ -export interface MsgCreateGaugeSDKType { - is_perpetual: boolean; - owner: string; - distribute_to: QueryConditionSDKType | undefined; - coins: CoinSDKType[]; - start_time: Date | undefined; - num_epochs_paid_over: bigint; -} -export interface MsgCreateGaugeResponse {} -export interface MsgCreateGaugeResponseProtoMsg { - typeUrl: "/osmosis.incentives.MsgCreateGaugeResponse"; - value: Uint8Array; -} -export interface MsgCreateGaugeResponseAmino {} -export interface MsgCreateGaugeResponseAminoMsg { - type: "osmosis/incentives/create-gauge-response"; - value: MsgCreateGaugeResponseAmino; -} -export interface MsgCreateGaugeResponseSDKType {} -/** MsgAddToGauge adds coins to a previously created gauge */ -export interface MsgAddToGauge { - /** owner is the gauge owner's address */ - owner: string; - /** gauge_id is the ID of gauge that rewards are getting added to */ - gaugeId: bigint; - /** rewards are the coin(s) to add to gauge */ - rewards: Coin[]; -} -export interface MsgAddToGaugeProtoMsg { - typeUrl: "/osmosis.incentives.MsgAddToGauge"; - value: Uint8Array; -} -/** MsgAddToGauge adds coins to a previously created gauge */ -export interface MsgAddToGaugeAmino { - /** owner is the gauge owner's address */ - owner: string; - /** gauge_id is the ID of gauge that rewards are getting added to */ - gauge_id: string; - /** rewards are the coin(s) to add to gauge */ - rewards: CoinAmino[]; -} -export interface MsgAddToGaugeAminoMsg { - type: "osmosis/incentives/add-to-gauge"; - value: MsgAddToGaugeAmino; -} -/** MsgAddToGauge adds coins to a previously created gauge */ -export interface MsgAddToGaugeSDKType { - owner: string; - gauge_id: bigint; - rewards: CoinSDKType[]; -} -export interface MsgAddToGaugeResponse {} -export interface MsgAddToGaugeResponseProtoMsg { - typeUrl: "/osmosis.incentives.MsgAddToGaugeResponse"; - value: Uint8Array; -} -export interface MsgAddToGaugeResponseAmino {} -export interface MsgAddToGaugeResponseAminoMsg { - type: "osmosis/incentives/add-to-gauge-response"; - value: MsgAddToGaugeResponseAmino; -} -export interface MsgAddToGaugeResponseSDKType {} -function createBaseMsgCreateGauge(): MsgCreateGauge { - return { - isPerpetual: false, - owner: "", - distributeTo: QueryCondition.fromPartial({}), - coins: [], - startTime: new Date(), - numEpochsPaidOver: BigInt(0) - }; -} -export const MsgCreateGauge = { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - aminoType: "osmosis/incentives/create-gauge", - encode(message: MsgCreateGauge, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.isPerpetual === true) { - writer.uint32(8).bool(message.isPerpetual); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - if (message.distributeTo !== undefined) { - QueryCondition.encode(message.distributeTo, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.startTime !== undefined) { - Timestamp.encode(toTimestamp(message.startTime), writer.uint32(42).fork()).ldelim(); - } - if (message.numEpochsPaidOver !== BigInt(0)) { - writer.uint32(48).uint64(message.numEpochsPaidOver); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGauge { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGauge(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.isPerpetual = reader.bool(); - break; - case 2: - message.owner = reader.string(); - break; - case 3: - message.distributeTo = QueryCondition.decode(reader, reader.uint32()); - break; - case 4: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - case 5: - message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.numEpochsPaidOver = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateGauge { - return { - isPerpetual: isSet(object.isPerpetual) ? Boolean(object.isPerpetual) : false, - owner: isSet(object.owner) ? String(object.owner) : "", - distributeTo: isSet(object.distributeTo) ? QueryCondition.fromJSON(object.distributeTo) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [], - startTime: isSet(object.startTime) ? new Date(object.startTime) : undefined, - numEpochsPaidOver: isSet(object.numEpochsPaidOver) ? BigInt(object.numEpochsPaidOver.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgCreateGauge): unknown { - const obj: any = {}; - message.isPerpetual !== undefined && (obj.isPerpetual = message.isPerpetual); - message.owner !== undefined && (obj.owner = message.owner); - message.distributeTo !== undefined && (obj.distributeTo = message.distributeTo ? QueryCondition.toJSON(message.distributeTo) : undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - message.startTime !== undefined && (obj.startTime = message.startTime.toISOString()); - message.numEpochsPaidOver !== undefined && (obj.numEpochsPaidOver = (message.numEpochsPaidOver || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateGauge { - const message = createBaseMsgCreateGauge(); - message.isPerpetual = object.isPerpetual ?? false; - message.owner = object.owner ?? ""; - message.distributeTo = object.distributeTo !== undefined && object.distributeTo !== null ? QueryCondition.fromPartial(object.distributeTo) : undefined; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - message.startTime = object.startTime ?? undefined; - message.numEpochsPaidOver = object.numEpochsPaidOver !== undefined && object.numEpochsPaidOver !== null ? BigInt(object.numEpochsPaidOver.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgCreateGaugeSDKType): MsgCreateGauge { - return { - isPerpetual: object?.is_perpetual, - owner: object?.owner, - distributeTo: object.distribute_to ? QueryCondition.fromSDK(object.distribute_to) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [], - startTime: object.start_time ?? undefined, - numEpochsPaidOver: object?.num_epochs_paid_over - }; - }, - toSDK(message: MsgCreateGauge): MsgCreateGaugeSDKType { - const obj: any = {}; - obj.is_perpetual = message.isPerpetual; - obj.owner = message.owner; - message.distributeTo !== undefined && (obj.distribute_to = message.distributeTo ? QueryCondition.toSDK(message.distributeTo) : undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - message.startTime !== undefined && (obj.start_time = message.startTime ?? undefined); - obj.num_epochs_paid_over = message.numEpochsPaidOver; - return obj; - }, - fromAmino(object: MsgCreateGaugeAmino): MsgCreateGauge { - return { - isPerpetual: object.is_perpetual, - owner: object.owner, - distributeTo: object?.distribute_to ? QueryCondition.fromAmino(object.distribute_to) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [], - startTime: object.start_time, - numEpochsPaidOver: BigInt(object.num_epochs_paid_over) - }; - }, - toAmino(message: MsgCreateGauge): MsgCreateGaugeAmino { - const obj: any = {}; - obj.is_perpetual = message.isPerpetual; - obj.owner = message.owner; - obj.distribute_to = message.distributeTo ? QueryCondition.toAmino(message.distributeTo) : undefined; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - obj.start_time = message.startTime; - obj.num_epochs_paid_over = message.numEpochsPaidOver ? message.numEpochsPaidOver.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgCreateGaugeAminoMsg): MsgCreateGauge { - return MsgCreateGauge.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGauge): MsgCreateGaugeAminoMsg { - return { - type: "osmosis/incentives/create-gauge", - value: MsgCreateGauge.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGaugeProtoMsg): MsgCreateGauge { - return MsgCreateGauge.decode(message.value); - }, - toProto(message: MsgCreateGauge): Uint8Array { - return MsgCreateGauge.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGauge): MsgCreateGaugeProtoMsg { - return { - typeUrl: "/osmosis.incentives.MsgCreateGauge", - value: MsgCreateGauge.encode(message).finish() - }; - } -}; -function createBaseMsgCreateGaugeResponse(): MsgCreateGaugeResponse { - return {}; -} -export const MsgCreateGaugeResponse = { - typeUrl: "/osmosis.incentives.MsgCreateGaugeResponse", - aminoType: "osmosis/incentives/create-gauge-response", - encode(_: MsgCreateGaugeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateGaugeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGaugeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgCreateGaugeResponse { - return {}; - }, - toJSON(_: MsgCreateGaugeResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgCreateGaugeResponse { - const message = createBaseMsgCreateGaugeResponse(); - return message; - }, - fromSDK(_: MsgCreateGaugeResponseSDKType): MsgCreateGaugeResponse { - return {}; - }, - toSDK(_: MsgCreateGaugeResponse): MsgCreateGaugeResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgCreateGaugeResponseAmino): MsgCreateGaugeResponse { - return {}; - }, - toAmino(_: MsgCreateGaugeResponse): MsgCreateGaugeResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgCreateGaugeResponseAminoMsg): MsgCreateGaugeResponse { - return MsgCreateGaugeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateGaugeResponse): MsgCreateGaugeResponseAminoMsg { - return { - type: "osmosis/incentives/create-gauge-response", - value: MsgCreateGaugeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateGaugeResponseProtoMsg): MsgCreateGaugeResponse { - return MsgCreateGaugeResponse.decode(message.value); - }, - toProto(message: MsgCreateGaugeResponse): Uint8Array { - return MsgCreateGaugeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateGaugeResponse): MsgCreateGaugeResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.MsgCreateGaugeResponse", - value: MsgCreateGaugeResponse.encode(message).finish() - }; - } -}; -function createBaseMsgAddToGauge(): MsgAddToGauge { - return { - owner: "", - gaugeId: BigInt(0), - rewards: [] - }; -} -export const MsgAddToGauge = { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - aminoType: "osmosis/incentives/add-to-gauge", - encode(message: MsgAddToGauge, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.gaugeId !== BigInt(0)) { - writer.uint32(16).uint64(message.gaugeId); - } - for (const v of message.rewards) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgAddToGauge { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgAddToGauge(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.gaugeId = reader.uint64(); - break; - case 3: - message.rewards.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgAddToGauge { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0), - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgAddToGauge): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgAddToGauge { - const message = createBaseMsgAddToGauge(); - message.owner = object.owner ?? ""; - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - message.rewards = object.rewards?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgAddToGaugeSDKType): MsgAddToGauge { - return { - owner: object?.owner, - gaugeId: object?.gauge_id, - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgAddToGauge): MsgAddToGaugeSDKType { - const obj: any = {}; - obj.owner = message.owner; - obj.gauge_id = message.gaugeId; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromAmino(object: MsgAddToGaugeAmino): MsgAddToGauge { - return { - owner: object.owner, - gaugeId: BigInt(object.gauge_id), - rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgAddToGauge): MsgAddToGaugeAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - if (message.rewards) { - obj.rewards = message.rewards.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.rewards = []; - } - return obj; - }, - fromAminoMsg(object: MsgAddToGaugeAminoMsg): MsgAddToGauge { - return MsgAddToGauge.fromAmino(object.value); - }, - toAminoMsg(message: MsgAddToGauge): MsgAddToGaugeAminoMsg { - return { - type: "osmosis/incentives/add-to-gauge", - value: MsgAddToGauge.toAmino(message) - }; - }, - fromProtoMsg(message: MsgAddToGaugeProtoMsg): MsgAddToGauge { - return MsgAddToGauge.decode(message.value); - }, - toProto(message: MsgAddToGauge): Uint8Array { - return MsgAddToGauge.encode(message).finish(); - }, - toProtoMsg(message: MsgAddToGauge): MsgAddToGaugeProtoMsg { - return { - typeUrl: "/osmosis.incentives.MsgAddToGauge", - value: MsgAddToGauge.encode(message).finish() - }; - } -}; -function createBaseMsgAddToGaugeResponse(): MsgAddToGaugeResponse { - return {}; -} -export const MsgAddToGaugeResponse = { - typeUrl: "/osmosis.incentives.MsgAddToGaugeResponse", - aminoType: "osmosis/incentives/add-to-gauge-response", - encode(_: MsgAddToGaugeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgAddToGaugeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgAddToGaugeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgAddToGaugeResponse { - return {}; - }, - toJSON(_: MsgAddToGaugeResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgAddToGaugeResponse { - const message = createBaseMsgAddToGaugeResponse(); - return message; - }, - fromSDK(_: MsgAddToGaugeResponseSDKType): MsgAddToGaugeResponse { - return {}; - }, - toSDK(_: MsgAddToGaugeResponse): MsgAddToGaugeResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgAddToGaugeResponseAmino): MsgAddToGaugeResponse { - return {}; - }, - toAmino(_: MsgAddToGaugeResponse): MsgAddToGaugeResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgAddToGaugeResponseAminoMsg): MsgAddToGaugeResponse { - return MsgAddToGaugeResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgAddToGaugeResponse): MsgAddToGaugeResponseAminoMsg { - return { - type: "osmosis/incentives/add-to-gauge-response", - value: MsgAddToGaugeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgAddToGaugeResponseProtoMsg): MsgAddToGaugeResponse { - return MsgAddToGaugeResponse.decode(message.value); - }, - toProto(message: MsgAddToGaugeResponse): Uint8Array { - return MsgAddToGaugeResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgAddToGaugeResponse): MsgAddToGaugeResponseProtoMsg { - return { - typeUrl: "/osmosis.incentives.MsgAddToGaugeResponse", - value: MsgAddToGaugeResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/genesis.ts b/examples/interchainjs/src/codegen/osmosis/lockup/genesis.ts deleted file mode 100644 index dda21fb5..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/genesis.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { PeriodLock, PeriodLockAmino, PeriodLockSDKType, SyntheticLock, SyntheticLockAmino, SyntheticLockSDKType } from "./lock"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** GenesisState defines the lockup module's genesis state. */ -export interface GenesisState { - lastLockId: bigint; - locks: PeriodLock[]; - syntheticLocks: SyntheticLock[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.lockup.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the lockup module's genesis state. */ -export interface GenesisStateAmino { - last_lock_id: string; - locks: PeriodLockAmino[]; - synthetic_locks: SyntheticLockAmino[]; -} -export interface GenesisStateAminoMsg { - type: "osmosis/lockup/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the lockup module's genesis state. */ -export interface GenesisStateSDKType { - last_lock_id: bigint; - locks: PeriodLockSDKType[]; - synthetic_locks: SyntheticLockSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - lastLockId: BigInt(0), - locks: [], - syntheticLocks: [] - }; -} -export const GenesisState = { - typeUrl: "/osmosis.lockup.GenesisState", - aminoType: "osmosis/lockup/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lastLockId !== BigInt(0)) { - writer.uint32(8).uint64(message.lastLockId); - } - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.syntheticLocks) { - SyntheticLock.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lastLockId = reader.uint64(); - break; - case 2: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - case 3: - message.syntheticLocks.push(SyntheticLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - lastLockId: isSet(object.lastLockId) ? BigInt(object.lastLockId.toString()) : BigInt(0), - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [], - syntheticLocks: Array.isArray(object?.syntheticLocks) ? object.syntheticLocks.map((e: any) => SyntheticLock.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.lastLockId !== undefined && (obj.lastLockId = (message.lastLockId || BigInt(0)).toString()); - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - if (message.syntheticLocks) { - obj.syntheticLocks = message.syntheticLocks.map(e => e ? SyntheticLock.toJSON(e) : undefined); - } else { - obj.syntheticLocks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.lastLockId = object.lastLockId !== undefined && object.lastLockId !== null ? BigInt(object.lastLockId.toString()) : BigInt(0); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - message.syntheticLocks = object.syntheticLocks?.map(e => SyntheticLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - lastLockId: object?.last_lock_id, - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [], - syntheticLocks: Array.isArray(object?.synthetic_locks) ? object.synthetic_locks.map((e: any) => SyntheticLock.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.last_lock_id = message.lastLockId; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - if (message.syntheticLocks) { - obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toSDK(e) : undefined); - } else { - obj.synthetic_locks = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - lastLockId: BigInt(object.last_lock_id), - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [], - syntheticLocks: Array.isArray(object?.synthetic_locks) ? object.synthetic_locks.map((e: any) => SyntheticLock.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.last_lock_id = message.lastLockId ? message.lastLockId.toString() : undefined; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - if (message.syntheticLocks) { - obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toAmino(e) : undefined); - } else { - obj.synthetic_locks = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/lockup/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.lockup.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/lock.ts b/examples/interchainjs/src/codegen/osmosis/lockup/lock.ts deleted file mode 100644 index 939d3d80..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/lock.ts +++ /dev/null @@ -1,686 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../helpers"; -/** - * LockQueryType defines the type of the lock query that can - * either be by duration or start time of the lock. - */ -export enum LockQueryType { - ByDuration = 0, - ByTime = 1, - UNRECOGNIZED = -1, -} -export const LockQueryTypeSDKType = LockQueryType; -export const LockQueryTypeAmino = LockQueryType; -export function lockQueryTypeFromJSON(object: any): LockQueryType { - switch (object) { - case 0: - case "ByDuration": - return LockQueryType.ByDuration; - case 1: - case "ByTime": - return LockQueryType.ByTime; - case -1: - case "UNRECOGNIZED": - default: - return LockQueryType.UNRECOGNIZED; - } -} -export function lockQueryTypeToJSON(object: LockQueryType): string { - switch (object) { - case LockQueryType.ByDuration: - return "ByDuration"; - case LockQueryType.ByTime: - return "ByTime"; - case LockQueryType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** - * PeriodLock is a single lock unit by period defined by the x/lockup module. - * It's a record of a locked coin at a specific time. It stores owner, duration, - * unlock time and the number of coins locked. A state of a period lock is - * created upon lock creation, and deleted once the lock has been matured after - * the `duration` has passed since unbonding started. - */ -export interface PeriodLock { - /** - * ID is the unique id of the lock. - * The ID of the lock is decided upon lock creation, incrementing by 1 for - * every lock. - */ - ID: bigint; - /** - * Owner is the account address of the lock owner. - * Only the owner can modify the state of the lock. - */ - owner: string; - /** - * Duration is the time needed for a lock to mature after unlocking has - * started. - */ - duration: Duration | undefined; - /** - * EndTime refers to the time at which the lock would mature and get deleted. - * This value is first initialized when an unlock has started for the lock, - * end time being block time + duration. - */ - endTime: Date | undefined; - /** Coins are the tokens locked within the lock, kept in the module account. */ - coins: Coin[]; -} -export interface PeriodLockProtoMsg { - typeUrl: "/osmosis.lockup.PeriodLock"; - value: Uint8Array; -} -/** - * PeriodLock is a single lock unit by period defined by the x/lockup module. - * It's a record of a locked coin at a specific time. It stores owner, duration, - * unlock time and the number of coins locked. A state of a period lock is - * created upon lock creation, and deleted once the lock has been matured after - * the `duration` has passed since unbonding started. - */ -export interface PeriodLockAmino { - /** - * ID is the unique id of the lock. - * The ID of the lock is decided upon lock creation, incrementing by 1 for - * every lock. - */ - ID: string; - /** - * Owner is the account address of the lock owner. - * Only the owner can modify the state of the lock. - */ - owner: string; - /** - * Duration is the time needed for a lock to mature after unlocking has - * started. - */ - duration?: DurationAmino | undefined; - /** - * EndTime refers to the time at which the lock would mature and get deleted. - * This value is first initialized when an unlock has started for the lock, - * end time being block time + duration. - */ - end_time?: Date | undefined; - /** Coins are the tokens locked within the lock, kept in the module account. */ - coins: CoinAmino[]; -} -export interface PeriodLockAminoMsg { - type: "osmosis/lockup/period-lock"; - value: PeriodLockAmino; -} -/** - * PeriodLock is a single lock unit by period defined by the x/lockup module. - * It's a record of a locked coin at a specific time. It stores owner, duration, - * unlock time and the number of coins locked. A state of a period lock is - * created upon lock creation, and deleted once the lock has been matured after - * the `duration` has passed since unbonding started. - */ -export interface PeriodLockSDKType { - ID: bigint; - owner: string; - duration: DurationSDKType | undefined; - end_time: Date | undefined; - coins: CoinSDKType[]; -} -/** - * QueryCondition is a struct used for querying locks upon different conditions. - * Duration field and timestamp fields could be optional, depending on the - * LockQueryType. - */ -export interface QueryCondition { - /** LockQueryType is a type of lock query, ByLockDuration | ByLockTime */ - lockQueryType: LockQueryType; - /** Denom represents the token denomination we are looking to lock up */ - denom: string; - /** - * Duration is used to query locks with longer duration than the specified - * duration. Duration field must not be nil when the lock query type is - * `ByLockDuration`. - */ - duration: Duration | undefined; - /** - * Timestamp is used by locks started before the specified duration. - * Timestamp field must not be nil when the lock query type is `ByLockTime`. - * Querying locks with timestamp is currently not implemented. - */ - timestamp: Date | undefined; -} -export interface QueryConditionProtoMsg { - typeUrl: "/osmosis.lockup.QueryCondition"; - value: Uint8Array; -} -/** - * QueryCondition is a struct used for querying locks upon different conditions. - * Duration field and timestamp fields could be optional, depending on the - * LockQueryType. - */ -export interface QueryConditionAmino { - /** LockQueryType is a type of lock query, ByLockDuration | ByLockTime */ - lock_query_type: LockQueryType; - /** Denom represents the token denomination we are looking to lock up */ - denom: string; - /** - * Duration is used to query locks with longer duration than the specified - * duration. Duration field must not be nil when the lock query type is - * `ByLockDuration`. - */ - duration?: DurationAmino | undefined; - /** - * Timestamp is used by locks started before the specified duration. - * Timestamp field must not be nil when the lock query type is `ByLockTime`. - * Querying locks with timestamp is currently not implemented. - */ - timestamp?: Date | undefined; -} -export interface QueryConditionAminoMsg { - type: "osmosis/lockup/query-condition"; - value: QueryConditionAmino; -} -/** - * QueryCondition is a struct used for querying locks upon different conditions. - * Duration field and timestamp fields could be optional, depending on the - * LockQueryType. - */ -export interface QueryConditionSDKType { - lock_query_type: LockQueryType; - denom: string; - duration: DurationSDKType | undefined; - timestamp: Date | undefined; -} -/** - * SyntheticLock is creating virtual lockup where new denom is combination of - * original denom and synthetic suffix. At the time of synthetic lockup creation - * and deletion, accumulation store is also being updated and on querier side, - * they can query as freely as native lockup. - */ -export interface SyntheticLock { - /** - * Underlying Lock ID is the underlying native lock's id for this synthetic - * lockup. A synthetic lock MUST have an underlying lock. - */ - underlyingLockId: bigint; - /** - * SynthDenom is the synthetic denom that is a combination of - * gamm share + bonding status + validator address. - */ - synthDenom: string; - /** - * used for unbonding synthetic lockups, for active synthetic lockups, this - * value is set to uninitialized value - */ - endTime: Date | undefined; - /** - * Duration is the duration for a synthetic lock to mature - * at the point of unbonding has started. - */ - duration: Duration | undefined; -} -export interface SyntheticLockProtoMsg { - typeUrl: "/osmosis.lockup.SyntheticLock"; - value: Uint8Array; -} -/** - * SyntheticLock is creating virtual lockup where new denom is combination of - * original denom and synthetic suffix. At the time of synthetic lockup creation - * and deletion, accumulation store is also being updated and on querier side, - * they can query as freely as native lockup. - */ -export interface SyntheticLockAmino { - /** - * Underlying Lock ID is the underlying native lock's id for this synthetic - * lockup. A synthetic lock MUST have an underlying lock. - */ - underlying_lock_id: string; - /** - * SynthDenom is the synthetic denom that is a combination of - * gamm share + bonding status + validator address. - */ - synth_denom: string; - /** - * used for unbonding synthetic lockups, for active synthetic lockups, this - * value is set to uninitialized value - */ - end_time?: Date | undefined; - /** - * Duration is the duration for a synthetic lock to mature - * at the point of unbonding has started. - */ - duration?: DurationAmino | undefined; -} -export interface SyntheticLockAminoMsg { - type: "osmosis/lockup/synthetic-lock"; - value: SyntheticLockAmino; -} -/** - * SyntheticLock is creating virtual lockup where new denom is combination of - * original denom and synthetic suffix. At the time of synthetic lockup creation - * and deletion, accumulation store is also being updated and on querier side, - * they can query as freely as native lockup. - */ -export interface SyntheticLockSDKType { - underlying_lock_id: bigint; - synth_denom: string; - end_time: Date | undefined; - duration: DurationSDKType | undefined; -} -function createBasePeriodLock(): PeriodLock { - return { - ID: BigInt(0), - owner: "", - duration: Duration.fromPartial({}), - endTime: new Date(), - coins: [] - }; -} -export const PeriodLock = { - typeUrl: "/osmosis.lockup.PeriodLock", - aminoType: "osmosis/lockup/period-lock", - encode(message: PeriodLock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ID !== BigInt(0)) { - writer.uint32(8).uint64(message.ID); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(26).fork()).ldelim(); - } - if (message.endTime !== undefined) { - Timestamp.encode(toTimestamp(message.endTime), writer.uint32(34).fork()).ldelim(); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PeriodLock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeriodLock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ID = reader.uint64(); - break; - case 2: - message.owner = reader.string(); - break; - case 3: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PeriodLock { - return { - ID: isSet(object.ID) ? BigInt(object.ID.toString()) : BigInt(0), - owner: isSet(object.owner) ? String(object.owner) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - endTime: isSet(object.endTime) ? new Date(object.endTime) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: PeriodLock): unknown { - const obj: any = {}; - message.ID !== undefined && (obj.ID = (message.ID || BigInt(0)).toString()); - message.owner !== undefined && (obj.owner = message.owner); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - message.endTime !== undefined && (obj.endTime = message.endTime.toISOString()); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): PeriodLock { - const message = createBasePeriodLock(); - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); - message.owner = object.owner ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.endTime = object.endTime ?? undefined; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: PeriodLockSDKType): PeriodLock { - return { - ID: object?.ID, - owner: object?.owner, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - endTime: object.end_time ?? undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: PeriodLock): PeriodLockSDKType { - const obj: any = {}; - obj.ID = message.ID; - obj.owner = message.owner; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - message.endTime !== undefined && (obj.end_time = message.endTime ?? undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: PeriodLockAmino): PeriodLock { - return { - ID: BigInt(object.ID), - owner: object.owner, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - endTime: object.end_time, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: PeriodLock): PeriodLockAmino { - const obj: any = {}; - obj.ID = message.ID ? message.ID.toString() : undefined; - obj.owner = message.owner; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - obj.end_time = message.endTime; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: PeriodLockAminoMsg): PeriodLock { - return PeriodLock.fromAmino(object.value); - }, - toAminoMsg(message: PeriodLock): PeriodLockAminoMsg { - return { - type: "osmosis/lockup/period-lock", - value: PeriodLock.toAmino(message) - }; - }, - fromProtoMsg(message: PeriodLockProtoMsg): PeriodLock { - return PeriodLock.decode(message.value); - }, - toProto(message: PeriodLock): Uint8Array { - return PeriodLock.encode(message).finish(); - }, - toProtoMsg(message: PeriodLock): PeriodLockProtoMsg { - return { - typeUrl: "/osmosis.lockup.PeriodLock", - value: PeriodLock.encode(message).finish() - }; - } -}; -function createBaseQueryCondition(): QueryCondition { - return { - lockQueryType: 0, - denom: "", - duration: Duration.fromPartial({}), - timestamp: new Date() - }; -} -export const QueryCondition = { - typeUrl: "/osmosis.lockup.QueryCondition", - aminoType: "osmosis/lockup/query-condition", - encode(message: QueryCondition, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lockQueryType !== 0) { - writer.uint32(8).int32(message.lockQueryType); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(26).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockQueryType = (reader.int32() as any); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 4: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryCondition { - return { - lockQueryType: isSet(object.lockQueryType) ? lockQueryTypeFromJSON(object.lockQueryType) : -1, - denom: isSet(object.denom) ? String(object.denom) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined - }; - }, - toJSON(message: QueryCondition): unknown { - const obj: any = {}; - message.lockQueryType !== undefined && (obj.lockQueryType = lockQueryTypeToJSON(message.lockQueryType)); - message.denom !== undefined && (obj.denom = message.denom); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryCondition { - const message = createBaseQueryCondition(); - message.lockQueryType = object.lockQueryType ?? 0; - message.denom = object.denom ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.timestamp = object.timestamp ?? undefined; - return message; - }, - fromSDK(object: QueryConditionSDKType): QueryCondition { - return { - lockQueryType: isSet(object.lock_query_type) ? lockQueryTypeFromJSON(object.lock_query_type) : -1, - denom: object?.denom, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - timestamp: object.timestamp ?? undefined - }; - }, - toSDK(message: QueryCondition): QueryConditionSDKType { - const obj: any = {}; - message.lockQueryType !== undefined && (obj.lock_query_type = lockQueryTypeToJSON(message.lockQueryType)); - obj.denom = message.denom; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - return obj; - }, - fromAmino(object: QueryConditionAmino): QueryCondition { - return { - lockQueryType: isSet(object.lock_query_type) ? lockQueryTypeFromJSON(object.lock_query_type) : -1, - denom: object.denom, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - timestamp: object.timestamp - }; - }, - toAmino(message: QueryCondition): QueryConditionAmino { - const obj: any = {}; - obj.lock_query_type = message.lockQueryType; - obj.denom = message.denom; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - obj.timestamp = message.timestamp; - return obj; - }, - fromAminoMsg(object: QueryConditionAminoMsg): QueryCondition { - return QueryCondition.fromAmino(object.value); - }, - toAminoMsg(message: QueryCondition): QueryConditionAminoMsg { - return { - type: "osmosis/lockup/query-condition", - value: QueryCondition.toAmino(message) - }; - }, - fromProtoMsg(message: QueryConditionProtoMsg): QueryCondition { - return QueryCondition.decode(message.value); - }, - toProto(message: QueryCondition): Uint8Array { - return QueryCondition.encode(message).finish(); - }, - toProtoMsg(message: QueryCondition): QueryConditionProtoMsg { - return { - typeUrl: "/osmosis.lockup.QueryCondition", - value: QueryCondition.encode(message).finish() - }; - } -}; -function createBaseSyntheticLock(): SyntheticLock { - return { - underlyingLockId: BigInt(0), - synthDenom: "", - endTime: new Date(), - duration: Duration.fromPartial({}) - }; -} -export const SyntheticLock = { - typeUrl: "/osmosis.lockup.SyntheticLock", - aminoType: "osmosis/lockup/synthetic-lock", - encode(message: SyntheticLock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.underlyingLockId !== BigInt(0)) { - writer.uint32(8).uint64(message.underlyingLockId); - } - if (message.synthDenom !== "") { - writer.uint32(18).string(message.synthDenom); - } - if (message.endTime !== undefined) { - Timestamp.encode(toTimestamp(message.endTime), writer.uint32(26).fork()).ldelim(); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SyntheticLock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyntheticLock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.underlyingLockId = reader.uint64(); - break; - case 2: - message.synthDenom = reader.string(); - break; - case 3: - message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SyntheticLock { - return { - underlyingLockId: isSet(object.underlyingLockId) ? BigInt(object.underlyingLockId.toString()) : BigInt(0), - synthDenom: isSet(object.synthDenom) ? String(object.synthDenom) : "", - endTime: isSet(object.endTime) ? new Date(object.endTime) : undefined, - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: SyntheticLock): unknown { - const obj: any = {}; - message.underlyingLockId !== undefined && (obj.underlyingLockId = (message.underlyingLockId || BigInt(0)).toString()); - message.synthDenom !== undefined && (obj.synthDenom = message.synthDenom); - message.endTime !== undefined && (obj.endTime = message.endTime.toISOString()); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SyntheticLock { - const message = createBaseSyntheticLock(); - message.underlyingLockId = object.underlyingLockId !== undefined && object.underlyingLockId !== null ? BigInt(object.underlyingLockId.toString()) : BigInt(0); - message.synthDenom = object.synthDenom ?? ""; - message.endTime = object.endTime ?? undefined; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: SyntheticLockSDKType): SyntheticLock { - return { - underlyingLockId: object?.underlying_lock_id, - synthDenom: object?.synth_denom, - endTime: object.end_time ?? undefined, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: SyntheticLock): SyntheticLockSDKType { - const obj: any = {}; - obj.underlying_lock_id = message.underlyingLockId; - obj.synth_denom = message.synthDenom; - message.endTime !== undefined && (obj.end_time = message.endTime ?? undefined); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: SyntheticLockAmino): SyntheticLock { - return { - underlyingLockId: BigInt(object.underlying_lock_id), - synthDenom: object.synth_denom, - endTime: object.end_time, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: SyntheticLock): SyntheticLockAmino { - const obj: any = {}; - obj.underlying_lock_id = message.underlyingLockId ? message.underlyingLockId.toString() : undefined; - obj.synth_denom = message.synthDenom; - obj.end_time = message.endTime; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: SyntheticLockAminoMsg): SyntheticLock { - return SyntheticLock.fromAmino(object.value); - }, - toAminoMsg(message: SyntheticLock): SyntheticLockAminoMsg { - return { - type: "osmosis/lockup/synthetic-lock", - value: SyntheticLock.toAmino(message) - }; - }, - fromProtoMsg(message: SyntheticLockProtoMsg): SyntheticLock { - return SyntheticLock.decode(message.value); - }, - toProto(message: SyntheticLock): Uint8Array { - return SyntheticLock.encode(message).finish(); - }, - toProtoMsg(message: SyntheticLock): SyntheticLockProtoMsg { - return { - typeUrl: "/osmosis.lockup.SyntheticLock", - value: SyntheticLock.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/params.ts b/examples/interchainjs/src/codegen/osmosis/lockup/params.ts deleted file mode 100644 index f7392342..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/params.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial } from "../../helpers"; -export interface Params { - forceUnlockAllowedAddresses: string[]; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.lockup.Params"; - value: Uint8Array; -} -export interface ParamsAmino { - force_unlock_allowed_addresses: string[]; -} -export interface ParamsAminoMsg { - type: "osmosis/lockup/params"; - value: ParamsAmino; -} -export interface ParamsSDKType { - force_unlock_allowed_addresses: string[]; -} -function createBaseParams(): Params { - return { - forceUnlockAllowedAddresses: [] - }; -} -export const Params = { - typeUrl: "/osmosis.lockup.Params", - aminoType: "osmosis/lockup/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.forceUnlockAllowedAddresses) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.forceUnlockAllowedAddresses.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - forceUnlockAllowedAddresses: Array.isArray(object?.forceUnlockAllowedAddresses) ? object.forceUnlockAllowedAddresses.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.forceUnlockAllowedAddresses) { - obj.forceUnlockAllowedAddresses = message.forceUnlockAllowedAddresses.map(e => e); - } else { - obj.forceUnlockAllowedAddresses = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.forceUnlockAllowedAddresses = object.forceUnlockAllowedAddresses?.map(e => e) || []; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - forceUnlockAllowedAddresses: Array.isArray(object?.force_unlock_allowed_addresses) ? object.force_unlock_allowed_addresses.map((e: any) => e) : [] - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - if (message.forceUnlockAllowedAddresses) { - obj.force_unlock_allowed_addresses = message.forceUnlockAllowedAddresses.map(e => e); - } else { - obj.force_unlock_allowed_addresses = []; - } - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - forceUnlockAllowedAddresses: Array.isArray(object?.force_unlock_allowed_addresses) ? object.force_unlock_allowed_addresses.map((e: any) => e) : [] - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - if (message.forceUnlockAllowedAddresses) { - obj.force_unlock_allowed_addresses = message.forceUnlockAllowedAddresses.map(e => e); - } else { - obj.force_unlock_allowed_addresses = []; - } - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/lockup/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.lockup.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/lockup/query.rpc.Query.ts deleted file mode 100644 index ce89fc2c..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/query.rpc.Query.ts +++ /dev/null @@ -1,591 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../mobx"; -import { ModuleBalanceRequest, ModuleBalanceResponse, ModuleLockedAmountRequest, ModuleLockedAmountResponse, AccountUnlockableCoinsRequest, AccountUnlockableCoinsResponse, AccountUnlockingCoinsRequest, AccountUnlockingCoinsResponse, AccountLockedCoinsRequest, AccountLockedCoinsResponse, AccountLockedPastTimeRequest, AccountLockedPastTimeResponse, AccountLockedPastTimeNotUnlockingOnlyRequest, AccountLockedPastTimeNotUnlockingOnlyResponse, AccountUnlockedBeforeTimeRequest, AccountUnlockedBeforeTimeResponse, AccountLockedPastTimeDenomRequest, AccountLockedPastTimeDenomResponse, LockedDenomRequest, LockedDenomResponse, LockedRequest, LockedResponse, SyntheticLockupsByLockupIDRequest, SyntheticLockupsByLockupIDResponse, AccountLockedLongerDurationRequest, AccountLockedLongerDurationResponse, AccountLockedDurationRequest, AccountLockedDurationResponse, AccountLockedLongerDurationNotUnlockingOnlyRequest, AccountLockedLongerDurationNotUnlockingOnlyResponse, AccountLockedLongerDurationDenomRequest, AccountLockedLongerDurationDenomResponse, QueryParamsRequest, QueryParamsResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Return full balance of the module */ - moduleBalance(request?: ModuleBalanceRequest): Promise; - /** Return locked balance of the module */ - moduleLockedAmount(request?: ModuleLockedAmountRequest): Promise; - /** Returns unlockable coins which are not withdrawn yet */ - accountUnlockableCoins(request: AccountUnlockableCoinsRequest): Promise; - /** Returns unlocking coins */ - accountUnlockingCoins(request: AccountUnlockingCoinsRequest): Promise; - /** Return a locked coins that can't be withdrawn */ - accountLockedCoins(request: AccountLockedCoinsRequest): Promise; - /** Returns locked records of an account with unlock time beyond timestamp */ - accountLockedPastTime(request: AccountLockedPastTimeRequest): Promise; - /** - * Returns locked records of an account with unlock time beyond timestamp - * excluding tokens started unlocking - */ - accountLockedPastTimeNotUnlockingOnly(request: AccountLockedPastTimeNotUnlockingOnlyRequest): Promise; - /** Returns unlocked records with unlock time before timestamp */ - accountUnlockedBeforeTime(request: AccountUnlockedBeforeTimeRequest): Promise; - /** Returns lock records by address, timestamp, denom */ - accountLockedPastTimeDenom(request: AccountLockedPastTimeDenomRequest): Promise; - /** Returns total locked per denom with longer past given time */ - lockedDenom(request: LockedDenomRequest): Promise; - /** Returns lock record by id */ - lockedByID(request: LockedRequest): Promise; - /** Returns synthetic lockups by native lockup id */ - syntheticLockupsByLockupID(request: SyntheticLockupsByLockupIDRequest): Promise; - /** Returns account locked records with longer duration */ - accountLockedLongerDuration(request: AccountLockedLongerDurationRequest): Promise; - /** Returns account locked records with a specific duration */ - accountLockedDuration(request: AccountLockedDurationRequest): Promise; - /** - * Returns account locked records with longer duration excluding tokens - * started unlocking - */ - accountLockedLongerDurationNotUnlockingOnly(request: AccountLockedLongerDurationNotUnlockingOnlyRequest): Promise; - /** Returns account's locked records for a denom with longer duration */ - accountLockedLongerDurationDenom(request: AccountLockedLongerDurationDenomRequest): Promise; - /** Params returns lockup params. */ - params(request?: QueryParamsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.moduleBalance = this.moduleBalance.bind(this); - this.moduleLockedAmount = this.moduleLockedAmount.bind(this); - this.accountUnlockableCoins = this.accountUnlockableCoins.bind(this); - this.accountUnlockingCoins = this.accountUnlockingCoins.bind(this); - this.accountLockedCoins = this.accountLockedCoins.bind(this); - this.accountLockedPastTime = this.accountLockedPastTime.bind(this); - this.accountLockedPastTimeNotUnlockingOnly = this.accountLockedPastTimeNotUnlockingOnly.bind(this); - this.accountUnlockedBeforeTime = this.accountUnlockedBeforeTime.bind(this); - this.accountLockedPastTimeDenom = this.accountLockedPastTimeDenom.bind(this); - this.lockedDenom = this.lockedDenom.bind(this); - this.lockedByID = this.lockedByID.bind(this); - this.syntheticLockupsByLockupID = this.syntheticLockupsByLockupID.bind(this); - this.accountLockedLongerDuration = this.accountLockedLongerDuration.bind(this); - this.accountLockedDuration = this.accountLockedDuration.bind(this); - this.accountLockedLongerDurationNotUnlockingOnly = this.accountLockedLongerDurationNotUnlockingOnly.bind(this); - this.accountLockedLongerDurationDenom = this.accountLockedLongerDurationDenom.bind(this); - this.params = this.params.bind(this); - } - moduleBalance(request: ModuleBalanceRequest = {}): Promise { - const data = ModuleBalanceRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "ModuleBalance", data); - return promise.then(data => ModuleBalanceResponse.decode(new BinaryReader(data))); - } - moduleLockedAmount(request: ModuleLockedAmountRequest = {}): Promise { - const data = ModuleLockedAmountRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "ModuleLockedAmount", data); - return promise.then(data => ModuleLockedAmountResponse.decode(new BinaryReader(data))); - } - accountUnlockableCoins(request: AccountUnlockableCoinsRequest): Promise { - const data = AccountUnlockableCoinsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountUnlockableCoins", data); - return promise.then(data => AccountUnlockableCoinsResponse.decode(new BinaryReader(data))); - } - accountUnlockingCoins(request: AccountUnlockingCoinsRequest): Promise { - const data = AccountUnlockingCoinsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountUnlockingCoins", data); - return promise.then(data => AccountUnlockingCoinsResponse.decode(new BinaryReader(data))); - } - accountLockedCoins(request: AccountLockedCoinsRequest): Promise { - const data = AccountLockedCoinsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedCoins", data); - return promise.then(data => AccountLockedCoinsResponse.decode(new BinaryReader(data))); - } - accountLockedPastTime(request: AccountLockedPastTimeRequest): Promise { - const data = AccountLockedPastTimeRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedPastTime", data); - return promise.then(data => AccountLockedPastTimeResponse.decode(new BinaryReader(data))); - } - accountLockedPastTimeNotUnlockingOnly(request: AccountLockedPastTimeNotUnlockingOnlyRequest): Promise { - const data = AccountLockedPastTimeNotUnlockingOnlyRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedPastTimeNotUnlockingOnly", data); - return promise.then(data => AccountLockedPastTimeNotUnlockingOnlyResponse.decode(new BinaryReader(data))); - } - accountUnlockedBeforeTime(request: AccountUnlockedBeforeTimeRequest): Promise { - const data = AccountUnlockedBeforeTimeRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountUnlockedBeforeTime", data); - return promise.then(data => AccountUnlockedBeforeTimeResponse.decode(new BinaryReader(data))); - } - accountLockedPastTimeDenom(request: AccountLockedPastTimeDenomRequest): Promise { - const data = AccountLockedPastTimeDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedPastTimeDenom", data); - return promise.then(data => AccountLockedPastTimeDenomResponse.decode(new BinaryReader(data))); - } - lockedDenom(request: LockedDenomRequest): Promise { - const data = LockedDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "LockedDenom", data); - return promise.then(data => LockedDenomResponse.decode(new BinaryReader(data))); - } - lockedByID(request: LockedRequest): Promise { - const data = LockedRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "LockedByID", data); - return promise.then(data => LockedResponse.decode(new BinaryReader(data))); - } - syntheticLockupsByLockupID(request: SyntheticLockupsByLockupIDRequest): Promise { - const data = SyntheticLockupsByLockupIDRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "SyntheticLockupsByLockupID", data); - return promise.then(data => SyntheticLockupsByLockupIDResponse.decode(new BinaryReader(data))); - } - accountLockedLongerDuration(request: AccountLockedLongerDurationRequest): Promise { - const data = AccountLockedLongerDurationRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedLongerDuration", data); - return promise.then(data => AccountLockedLongerDurationResponse.decode(new BinaryReader(data))); - } - accountLockedDuration(request: AccountLockedDurationRequest): Promise { - const data = AccountLockedDurationRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedDuration", data); - return promise.then(data => AccountLockedDurationResponse.decode(new BinaryReader(data))); - } - accountLockedLongerDurationNotUnlockingOnly(request: AccountLockedLongerDurationNotUnlockingOnlyRequest): Promise { - const data = AccountLockedLongerDurationNotUnlockingOnlyRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedLongerDurationNotUnlockingOnly", data); - return promise.then(data => AccountLockedLongerDurationNotUnlockingOnlyResponse.decode(new BinaryReader(data))); - } - accountLockedLongerDurationDenom(request: AccountLockedLongerDurationDenomRequest): Promise { - const data = AccountLockedLongerDurationDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "AccountLockedLongerDurationDenom", data); - return promise.then(data => AccountLockedLongerDurationDenomResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - moduleBalance(request?: ModuleBalanceRequest): Promise { - return queryService.moduleBalance(request); - }, - moduleLockedAmount(request?: ModuleLockedAmountRequest): Promise { - return queryService.moduleLockedAmount(request); - }, - accountUnlockableCoins(request: AccountUnlockableCoinsRequest): Promise { - return queryService.accountUnlockableCoins(request); - }, - accountUnlockingCoins(request: AccountUnlockingCoinsRequest): Promise { - return queryService.accountUnlockingCoins(request); - }, - accountLockedCoins(request: AccountLockedCoinsRequest): Promise { - return queryService.accountLockedCoins(request); - }, - accountLockedPastTime(request: AccountLockedPastTimeRequest): Promise { - return queryService.accountLockedPastTime(request); - }, - accountLockedPastTimeNotUnlockingOnly(request: AccountLockedPastTimeNotUnlockingOnlyRequest): Promise { - return queryService.accountLockedPastTimeNotUnlockingOnly(request); - }, - accountUnlockedBeforeTime(request: AccountUnlockedBeforeTimeRequest): Promise { - return queryService.accountUnlockedBeforeTime(request); - }, - accountLockedPastTimeDenom(request: AccountLockedPastTimeDenomRequest): Promise { - return queryService.accountLockedPastTimeDenom(request); - }, - lockedDenom(request: LockedDenomRequest): Promise { - return queryService.lockedDenom(request); - }, - lockedByID(request: LockedRequest): Promise { - return queryService.lockedByID(request); - }, - syntheticLockupsByLockupID(request: SyntheticLockupsByLockupIDRequest): Promise { - return queryService.syntheticLockupsByLockupID(request); - }, - accountLockedLongerDuration(request: AccountLockedLongerDurationRequest): Promise { - return queryService.accountLockedLongerDuration(request); - }, - accountLockedDuration(request: AccountLockedDurationRequest): Promise { - return queryService.accountLockedDuration(request); - }, - accountLockedLongerDurationNotUnlockingOnly(request: AccountLockedLongerDurationNotUnlockingOnlyRequest): Promise { - return queryService.accountLockedLongerDurationNotUnlockingOnly(request); - }, - accountLockedLongerDurationDenom(request: AccountLockedLongerDurationDenomRequest): Promise { - return queryService.accountLockedLongerDurationDenom(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - } - }; -}; -export interface UseModuleBalanceQuery extends ReactQueryParams { - request?: ModuleBalanceRequest; -} -export interface UseModuleLockedAmountQuery extends ReactQueryParams { - request?: ModuleLockedAmountRequest; -} -export interface UseAccountUnlockableCoinsQuery extends ReactQueryParams { - request: AccountUnlockableCoinsRequest; -} -export interface UseAccountUnlockingCoinsQuery extends ReactQueryParams { - request: AccountUnlockingCoinsRequest; -} -export interface UseAccountLockedCoinsQuery extends ReactQueryParams { - request: AccountLockedCoinsRequest; -} -export interface UseAccountLockedPastTimeQuery extends ReactQueryParams { - request: AccountLockedPastTimeRequest; -} -export interface UseAccountLockedPastTimeNotUnlockingOnlyQuery extends ReactQueryParams { - request: AccountLockedPastTimeNotUnlockingOnlyRequest; -} -export interface UseAccountUnlockedBeforeTimeQuery extends ReactQueryParams { - request: AccountUnlockedBeforeTimeRequest; -} -export interface UseAccountLockedPastTimeDenomQuery extends ReactQueryParams { - request: AccountLockedPastTimeDenomRequest; -} -export interface UseLockedDenomQuery extends ReactQueryParams { - request: LockedDenomRequest; -} -export interface UseLockedByIDQuery extends ReactQueryParams { - request: LockedRequest; -} -export interface UseSyntheticLockupsByLockupIDQuery extends ReactQueryParams { - request: SyntheticLockupsByLockupIDRequest; -} -export interface UseAccountLockedLongerDurationQuery extends ReactQueryParams { - request: AccountLockedLongerDurationRequest; -} -export interface UseAccountLockedDurationQuery extends ReactQueryParams { - request: AccountLockedDurationRequest; -} -export interface UseAccountLockedLongerDurationNotUnlockingOnlyQuery extends ReactQueryParams { - request: AccountLockedLongerDurationNotUnlockingOnlyRequest; -} -export interface UseAccountLockedLongerDurationDenomQuery extends ReactQueryParams { - request: AccountLockedLongerDurationDenomRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useModuleBalance = ({ - request, - options - }: UseModuleBalanceQuery) => { - return useQuery(["moduleBalanceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.moduleBalance(request); - }, options); - }; - const useModuleLockedAmount = ({ - request, - options - }: UseModuleLockedAmountQuery) => { - return useQuery(["moduleLockedAmountQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.moduleLockedAmount(request); - }, options); - }; - const useAccountUnlockableCoins = ({ - request, - options - }: UseAccountUnlockableCoinsQuery) => { - return useQuery(["accountUnlockableCoinsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountUnlockableCoins(request); - }, options); - }; - const useAccountUnlockingCoins = ({ - request, - options - }: UseAccountUnlockingCoinsQuery) => { - return useQuery(["accountUnlockingCoinsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountUnlockingCoins(request); - }, options); - }; - const useAccountLockedCoins = ({ - request, - options - }: UseAccountLockedCoinsQuery) => { - return useQuery(["accountLockedCoinsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedCoins(request); - }, options); - }; - const useAccountLockedPastTime = ({ - request, - options - }: UseAccountLockedPastTimeQuery) => { - return useQuery(["accountLockedPastTimeQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedPastTime(request); - }, options); - }; - const useAccountLockedPastTimeNotUnlockingOnly = ({ - request, - options - }: UseAccountLockedPastTimeNotUnlockingOnlyQuery) => { - return useQuery(["accountLockedPastTimeNotUnlockingOnlyQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedPastTimeNotUnlockingOnly(request); - }, options); - }; - const useAccountUnlockedBeforeTime = ({ - request, - options - }: UseAccountUnlockedBeforeTimeQuery) => { - return useQuery(["accountUnlockedBeforeTimeQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountUnlockedBeforeTime(request); - }, options); - }; - const useAccountLockedPastTimeDenom = ({ - request, - options - }: UseAccountLockedPastTimeDenomQuery) => { - return useQuery(["accountLockedPastTimeDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedPastTimeDenom(request); - }, options); - }; - const useLockedDenom = ({ - request, - options - }: UseLockedDenomQuery) => { - return useQuery(["lockedDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.lockedDenom(request); - }, options); - }; - const useLockedByID = ({ - request, - options - }: UseLockedByIDQuery) => { - return useQuery(["lockedByIDQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.lockedByID(request); - }, options); - }; - const useSyntheticLockupsByLockupID = ({ - request, - options - }: UseSyntheticLockupsByLockupIDQuery) => { - return useQuery(["syntheticLockupsByLockupIDQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.syntheticLockupsByLockupID(request); - }, options); - }; - const useAccountLockedLongerDuration = ({ - request, - options - }: UseAccountLockedLongerDurationQuery) => { - return useQuery(["accountLockedLongerDurationQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedLongerDuration(request); - }, options); - }; - const useAccountLockedDuration = ({ - request, - options - }: UseAccountLockedDurationQuery) => { - return useQuery(["accountLockedDurationQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedDuration(request); - }, options); - }; - const useAccountLockedLongerDurationNotUnlockingOnly = ({ - request, - options - }: UseAccountLockedLongerDurationNotUnlockingOnlyQuery) => { - return useQuery(["accountLockedLongerDurationNotUnlockingOnlyQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedLongerDurationNotUnlockingOnly(request); - }, options); - }; - const useAccountLockedLongerDurationDenom = ({ - request, - options - }: UseAccountLockedLongerDurationDenomQuery) => { - return useQuery(["accountLockedLongerDurationDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.accountLockedLongerDurationDenom(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - return { - /** Return full balance of the module */useModuleBalance, - /** Return locked balance of the module */useModuleLockedAmount, - /** Returns unlockable coins which are not withdrawn yet */useAccountUnlockableCoins, - /** Returns unlocking coins */useAccountUnlockingCoins, - /** Return a locked coins that can't be withdrawn */useAccountLockedCoins, - /** Returns locked records of an account with unlock time beyond timestamp */useAccountLockedPastTime, - /** - * Returns locked records of an account with unlock time beyond timestamp - * excluding tokens started unlocking - */ - useAccountLockedPastTimeNotUnlockingOnly, - /** Returns unlocked records with unlock time before timestamp */useAccountUnlockedBeforeTime, - /** Returns lock records by address, timestamp, denom */useAccountLockedPastTimeDenom, - /** Returns total locked per denom with longer past given time */useLockedDenom, - /** Returns lock record by id */useLockedByID, - /** Returns synthetic lockups by native lockup id */useSyntheticLockupsByLockupID, - /** Returns account locked records with longer duration */useAccountLockedLongerDuration, - /** Returns account locked records with a specific duration */useAccountLockedDuration, - /** - * Returns account locked records with longer duration excluding tokens - * started unlocking - */ - useAccountLockedLongerDurationNotUnlockingOnly, - /** Returns account's locked records for a denom with longer duration */useAccountLockedLongerDurationDenom, - /** Params returns lockup params. */useParams - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryModuleBalanceStore { - store = new QueryStore(queryService?.moduleBalance); - moduleBalance(request: ModuleBalanceRequest) { - return this.store.getData(request); - } - } - class QueryModuleLockedAmountStore { - store = new QueryStore(queryService?.moduleLockedAmount); - moduleLockedAmount(request: ModuleLockedAmountRequest) { - return this.store.getData(request); - } - } - class QueryAccountUnlockableCoinsStore { - store = new QueryStore(queryService?.accountUnlockableCoins); - accountUnlockableCoins(request: AccountUnlockableCoinsRequest) { - return this.store.getData(request); - } - } - class QueryAccountUnlockingCoinsStore { - store = new QueryStore(queryService?.accountUnlockingCoins); - accountUnlockingCoins(request: AccountUnlockingCoinsRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedCoinsStore { - store = new QueryStore(queryService?.accountLockedCoins); - accountLockedCoins(request: AccountLockedCoinsRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedPastTimeStore { - store = new QueryStore(queryService?.accountLockedPastTime); - accountLockedPastTime(request: AccountLockedPastTimeRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedPastTimeNotUnlockingOnlyStore { - store = new QueryStore(queryService?.accountLockedPastTimeNotUnlockingOnly); - accountLockedPastTimeNotUnlockingOnly(request: AccountLockedPastTimeNotUnlockingOnlyRequest) { - return this.store.getData(request); - } - } - class QueryAccountUnlockedBeforeTimeStore { - store = new QueryStore(queryService?.accountUnlockedBeforeTime); - accountUnlockedBeforeTime(request: AccountUnlockedBeforeTimeRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedPastTimeDenomStore { - store = new QueryStore(queryService?.accountLockedPastTimeDenom); - accountLockedPastTimeDenom(request: AccountLockedPastTimeDenomRequest) { - return this.store.getData(request); - } - } - class QueryLockedDenomStore { - store = new QueryStore(queryService?.lockedDenom); - lockedDenom(request: LockedDenomRequest) { - return this.store.getData(request); - } - } - class QueryLockedByIDStore { - store = new QueryStore(queryService?.lockedByID); - lockedByID(request: LockedRequest) { - return this.store.getData(request); - } - } - class QuerySyntheticLockupsByLockupIDStore { - store = new QueryStore(queryService?.syntheticLockupsByLockupID); - syntheticLockupsByLockupID(request: SyntheticLockupsByLockupIDRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedLongerDurationStore { - store = new QueryStore(queryService?.accountLockedLongerDuration); - accountLockedLongerDuration(request: AccountLockedLongerDurationRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedDurationStore { - store = new QueryStore(queryService?.accountLockedDuration); - accountLockedDuration(request: AccountLockedDurationRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedLongerDurationNotUnlockingOnlyStore { - store = new QueryStore(queryService?.accountLockedLongerDurationNotUnlockingOnly); - accountLockedLongerDurationNotUnlockingOnly(request: AccountLockedLongerDurationNotUnlockingOnlyRequest) { - return this.store.getData(request); - } - } - class QueryAccountLockedLongerDurationDenomStore { - store = new QueryStore(queryService?.accountLockedLongerDurationDenom); - accountLockedLongerDurationDenom(request: AccountLockedLongerDurationDenomRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - return { - /** Return full balance of the module */QueryModuleBalanceStore, - /** Return locked balance of the module */QueryModuleLockedAmountStore, - /** Returns unlockable coins which are not withdrawn yet */QueryAccountUnlockableCoinsStore, - /** Returns unlocking coins */QueryAccountUnlockingCoinsStore, - /** Return a locked coins that can't be withdrawn */QueryAccountLockedCoinsStore, - /** Returns locked records of an account with unlock time beyond timestamp */QueryAccountLockedPastTimeStore, - /** - * Returns locked records of an account with unlock time beyond timestamp - * excluding tokens started unlocking - */ - QueryAccountLockedPastTimeNotUnlockingOnlyStore, - /** Returns unlocked records with unlock time before timestamp */QueryAccountUnlockedBeforeTimeStore, - /** Returns lock records by address, timestamp, denom */QueryAccountLockedPastTimeDenomStore, - /** Returns total locked per denom with longer past given time */QueryLockedDenomStore, - /** Returns lock record by id */QueryLockedByIDStore, - /** Returns synthetic lockups by native lockup id */QuerySyntheticLockupsByLockupIDStore, - /** Returns account locked records with longer duration */QueryAccountLockedLongerDurationStore, - /** Returns account locked records with a specific duration */QueryAccountLockedDurationStore, - /** - * Returns account locked records with longer duration excluding tokens - * started unlocking - */ - QueryAccountLockedLongerDurationNotUnlockingOnlyStore, - /** Returns account's locked records for a denom with longer duration */QueryAccountLockedLongerDurationDenomStore, - /** Params returns lockup params. */QueryParamsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/query.ts b/examples/interchainjs/src/codegen/osmosis/lockup/query.ts deleted file mode 100644 index 78b565e7..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/query.ts +++ /dev/null @@ -1,3860 +0,0 @@ -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { PeriodLock, PeriodLockAmino, PeriodLockSDKType, SyntheticLock, SyntheticLockAmino, SyntheticLockSDKType } from "./lock"; -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, isSet, toTimestamp, fromTimestamp } from "../../helpers"; -export interface ModuleBalanceRequest {} -export interface ModuleBalanceRequestProtoMsg { - typeUrl: "/osmosis.lockup.ModuleBalanceRequest"; - value: Uint8Array; -} -export interface ModuleBalanceRequestAmino {} -export interface ModuleBalanceRequestAminoMsg { - type: "osmosis/lockup/module-balance-request"; - value: ModuleBalanceRequestAmino; -} -export interface ModuleBalanceRequestSDKType {} -export interface ModuleBalanceResponse { - coins: Coin[]; -} -export interface ModuleBalanceResponseProtoMsg { - typeUrl: "/osmosis.lockup.ModuleBalanceResponse"; - value: Uint8Array; -} -export interface ModuleBalanceResponseAmino { - coins: CoinAmino[]; -} -export interface ModuleBalanceResponseAminoMsg { - type: "osmosis/lockup/module-balance-response"; - value: ModuleBalanceResponseAmino; -} -export interface ModuleBalanceResponseSDKType { - coins: CoinSDKType[]; -} -export interface ModuleLockedAmountRequest {} -export interface ModuleLockedAmountRequestProtoMsg { - typeUrl: "/osmosis.lockup.ModuleLockedAmountRequest"; - value: Uint8Array; -} -export interface ModuleLockedAmountRequestAmino {} -export interface ModuleLockedAmountRequestAminoMsg { - type: "osmosis/lockup/module-locked-amount-request"; - value: ModuleLockedAmountRequestAmino; -} -export interface ModuleLockedAmountRequestSDKType {} -export interface ModuleLockedAmountResponse { - coins: Coin[]; -} -export interface ModuleLockedAmountResponseProtoMsg { - typeUrl: "/osmosis.lockup.ModuleLockedAmountResponse"; - value: Uint8Array; -} -export interface ModuleLockedAmountResponseAmino { - coins: CoinAmino[]; -} -export interface ModuleLockedAmountResponseAminoMsg { - type: "osmosis/lockup/module-locked-amount-response"; - value: ModuleLockedAmountResponseAmino; -} -export interface ModuleLockedAmountResponseSDKType { - coins: CoinSDKType[]; -} -export interface AccountUnlockableCoinsRequest { - owner: string; -} -export interface AccountUnlockableCoinsRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountUnlockableCoinsRequest"; - value: Uint8Array; -} -export interface AccountUnlockableCoinsRequestAmino { - owner: string; -} -export interface AccountUnlockableCoinsRequestAminoMsg { - type: "osmosis/lockup/account-unlockable-coins-request"; - value: AccountUnlockableCoinsRequestAmino; -} -export interface AccountUnlockableCoinsRequestSDKType { - owner: string; -} -export interface AccountUnlockableCoinsResponse { - coins: Coin[]; -} -export interface AccountUnlockableCoinsResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountUnlockableCoinsResponse"; - value: Uint8Array; -} -export interface AccountUnlockableCoinsResponseAmino { - coins: CoinAmino[]; -} -export interface AccountUnlockableCoinsResponseAminoMsg { - type: "osmosis/lockup/account-unlockable-coins-response"; - value: AccountUnlockableCoinsResponseAmino; -} -export interface AccountUnlockableCoinsResponseSDKType { - coins: CoinSDKType[]; -} -export interface AccountUnlockingCoinsRequest { - owner: string; -} -export interface AccountUnlockingCoinsRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountUnlockingCoinsRequest"; - value: Uint8Array; -} -export interface AccountUnlockingCoinsRequestAmino { - owner: string; -} -export interface AccountUnlockingCoinsRequestAminoMsg { - type: "osmosis/lockup/account-unlocking-coins-request"; - value: AccountUnlockingCoinsRequestAmino; -} -export interface AccountUnlockingCoinsRequestSDKType { - owner: string; -} -export interface AccountUnlockingCoinsResponse { - coins: Coin[]; -} -export interface AccountUnlockingCoinsResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountUnlockingCoinsResponse"; - value: Uint8Array; -} -export interface AccountUnlockingCoinsResponseAmino { - coins: CoinAmino[]; -} -export interface AccountUnlockingCoinsResponseAminoMsg { - type: "osmosis/lockup/account-unlocking-coins-response"; - value: AccountUnlockingCoinsResponseAmino; -} -export interface AccountUnlockingCoinsResponseSDKType { - coins: CoinSDKType[]; -} -export interface AccountLockedCoinsRequest { - owner: string; -} -export interface AccountLockedCoinsRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedCoinsRequest"; - value: Uint8Array; -} -export interface AccountLockedCoinsRequestAmino { - owner: string; -} -export interface AccountLockedCoinsRequestAminoMsg { - type: "osmosis/lockup/account-locked-coins-request"; - value: AccountLockedCoinsRequestAmino; -} -export interface AccountLockedCoinsRequestSDKType { - owner: string; -} -export interface AccountLockedCoinsResponse { - coins: Coin[]; -} -export interface AccountLockedCoinsResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedCoinsResponse"; - value: Uint8Array; -} -export interface AccountLockedCoinsResponseAmino { - coins: CoinAmino[]; -} -export interface AccountLockedCoinsResponseAminoMsg { - type: "osmosis/lockup/account-locked-coins-response"; - value: AccountLockedCoinsResponseAmino; -} -export interface AccountLockedCoinsResponseSDKType { - coins: CoinSDKType[]; -} -export interface AccountLockedPastTimeRequest { - owner: string; - timestamp: Date | undefined; -} -export interface AccountLockedPastTimeRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeRequest"; - value: Uint8Array; -} -export interface AccountLockedPastTimeRequestAmino { - owner: string; - timestamp?: Date | undefined; -} -export interface AccountLockedPastTimeRequestAminoMsg { - type: "osmosis/lockup/account-locked-past-time-request"; - value: AccountLockedPastTimeRequestAmino; -} -export interface AccountLockedPastTimeRequestSDKType { - owner: string; - timestamp: Date | undefined; -} -export interface AccountLockedPastTimeResponse { - locks: PeriodLock[]; -} -export interface AccountLockedPastTimeResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeResponse"; - value: Uint8Array; -} -export interface AccountLockedPastTimeResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedPastTimeResponseAminoMsg { - type: "osmosis/lockup/account-locked-past-time-response"; - value: AccountLockedPastTimeResponseAmino; -} -export interface AccountLockedPastTimeResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface AccountLockedPastTimeNotUnlockingOnlyRequest { - owner: string; - timestamp: Date | undefined; -} -export interface AccountLockedPastTimeNotUnlockingOnlyRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeNotUnlockingOnlyRequest"; - value: Uint8Array; -} -export interface AccountLockedPastTimeNotUnlockingOnlyRequestAmino { - owner: string; - timestamp?: Date | undefined; -} -export interface AccountLockedPastTimeNotUnlockingOnlyRequestAminoMsg { - type: "osmosis/lockup/account-locked-past-time-not-unlocking-only-request"; - value: AccountLockedPastTimeNotUnlockingOnlyRequestAmino; -} -export interface AccountLockedPastTimeNotUnlockingOnlyRequestSDKType { - owner: string; - timestamp: Date | undefined; -} -export interface AccountLockedPastTimeNotUnlockingOnlyResponse { - locks: PeriodLock[]; -} -export interface AccountLockedPastTimeNotUnlockingOnlyResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeNotUnlockingOnlyResponse"; - value: Uint8Array; -} -export interface AccountLockedPastTimeNotUnlockingOnlyResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedPastTimeNotUnlockingOnlyResponseAminoMsg { - type: "osmosis/lockup/account-locked-past-time-not-unlocking-only-response"; - value: AccountLockedPastTimeNotUnlockingOnlyResponseAmino; -} -export interface AccountLockedPastTimeNotUnlockingOnlyResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface AccountUnlockedBeforeTimeRequest { - owner: string; - timestamp: Date | undefined; -} -export interface AccountUnlockedBeforeTimeRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountUnlockedBeforeTimeRequest"; - value: Uint8Array; -} -export interface AccountUnlockedBeforeTimeRequestAmino { - owner: string; - timestamp?: Date | undefined; -} -export interface AccountUnlockedBeforeTimeRequestAminoMsg { - type: "osmosis/lockup/account-unlocked-before-time-request"; - value: AccountUnlockedBeforeTimeRequestAmino; -} -export interface AccountUnlockedBeforeTimeRequestSDKType { - owner: string; - timestamp: Date | undefined; -} -export interface AccountUnlockedBeforeTimeResponse { - locks: PeriodLock[]; -} -export interface AccountUnlockedBeforeTimeResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountUnlockedBeforeTimeResponse"; - value: Uint8Array; -} -export interface AccountUnlockedBeforeTimeResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountUnlockedBeforeTimeResponseAminoMsg { - type: "osmosis/lockup/account-unlocked-before-time-response"; - value: AccountUnlockedBeforeTimeResponseAmino; -} -export interface AccountUnlockedBeforeTimeResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface AccountLockedPastTimeDenomRequest { - owner: string; - timestamp: Date | undefined; - denom: string; -} -export interface AccountLockedPastTimeDenomRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeDenomRequest"; - value: Uint8Array; -} -export interface AccountLockedPastTimeDenomRequestAmino { - owner: string; - timestamp?: Date | undefined; - denom: string; -} -export interface AccountLockedPastTimeDenomRequestAminoMsg { - type: "osmosis/lockup/account-locked-past-time-denom-request"; - value: AccountLockedPastTimeDenomRequestAmino; -} -export interface AccountLockedPastTimeDenomRequestSDKType { - owner: string; - timestamp: Date | undefined; - denom: string; -} -export interface AccountLockedPastTimeDenomResponse { - locks: PeriodLock[]; -} -export interface AccountLockedPastTimeDenomResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeDenomResponse"; - value: Uint8Array; -} -export interface AccountLockedPastTimeDenomResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedPastTimeDenomResponseAminoMsg { - type: "osmosis/lockup/account-locked-past-time-denom-response"; - value: AccountLockedPastTimeDenomResponseAmino; -} -export interface AccountLockedPastTimeDenomResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface LockedDenomRequest { - denom: string; - duration: Duration | undefined; -} -export interface LockedDenomRequestProtoMsg { - typeUrl: "/osmosis.lockup.LockedDenomRequest"; - value: Uint8Array; -} -export interface LockedDenomRequestAmino { - denom: string; - duration?: DurationAmino | undefined; -} -export interface LockedDenomRequestAminoMsg { - type: "osmosis/lockup/locked-denom-request"; - value: LockedDenomRequestAmino; -} -export interface LockedDenomRequestSDKType { - denom: string; - duration: DurationSDKType | undefined; -} -export interface LockedDenomResponse { - amount: string; -} -export interface LockedDenomResponseProtoMsg { - typeUrl: "/osmosis.lockup.LockedDenomResponse"; - value: Uint8Array; -} -export interface LockedDenomResponseAmino { - amount: string; -} -export interface LockedDenomResponseAminoMsg { - type: "osmosis/lockup/locked-denom-response"; - value: LockedDenomResponseAmino; -} -export interface LockedDenomResponseSDKType { - amount: string; -} -export interface LockedRequest { - lockId: bigint; -} -export interface LockedRequestProtoMsg { - typeUrl: "/osmosis.lockup.LockedRequest"; - value: Uint8Array; -} -export interface LockedRequestAmino { - lock_id: string; -} -export interface LockedRequestAminoMsg { - type: "osmosis/lockup/locked-request"; - value: LockedRequestAmino; -} -export interface LockedRequestSDKType { - lock_id: bigint; -} -export interface LockedResponse { - lock: PeriodLock | undefined; -} -export interface LockedResponseProtoMsg { - typeUrl: "/osmosis.lockup.LockedResponse"; - value: Uint8Array; -} -export interface LockedResponseAmino { - lock?: PeriodLockAmino | undefined; -} -export interface LockedResponseAminoMsg { - type: "osmosis/lockup/locked-response"; - value: LockedResponseAmino; -} -export interface LockedResponseSDKType { - lock: PeriodLockSDKType | undefined; -} -export interface SyntheticLockupsByLockupIDRequest { - lockId: bigint; -} -export interface SyntheticLockupsByLockupIDRequestProtoMsg { - typeUrl: "/osmosis.lockup.SyntheticLockupsByLockupIDRequest"; - value: Uint8Array; -} -export interface SyntheticLockupsByLockupIDRequestAmino { - lock_id: string; -} -export interface SyntheticLockupsByLockupIDRequestAminoMsg { - type: "osmosis/lockup/synthetic-lockups-by-lockup-id-request"; - value: SyntheticLockupsByLockupIDRequestAmino; -} -export interface SyntheticLockupsByLockupIDRequestSDKType { - lock_id: bigint; -} -export interface SyntheticLockupsByLockupIDResponse { - syntheticLocks: SyntheticLock[]; -} -export interface SyntheticLockupsByLockupIDResponseProtoMsg { - typeUrl: "/osmosis.lockup.SyntheticLockupsByLockupIDResponse"; - value: Uint8Array; -} -export interface SyntheticLockupsByLockupIDResponseAmino { - synthetic_locks: SyntheticLockAmino[]; -} -export interface SyntheticLockupsByLockupIDResponseAminoMsg { - type: "osmosis/lockup/synthetic-lockups-by-lockup-id-response"; - value: SyntheticLockupsByLockupIDResponseAmino; -} -export interface SyntheticLockupsByLockupIDResponseSDKType { - synthetic_locks: SyntheticLockSDKType[]; -} -export interface AccountLockedLongerDurationRequest { - owner: string; - duration: Duration | undefined; -} -export interface AccountLockedLongerDurationRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationRequest"; - value: Uint8Array; -} -export interface AccountLockedLongerDurationRequestAmino { - owner: string; - duration?: DurationAmino | undefined; -} -export interface AccountLockedLongerDurationRequestAminoMsg { - type: "osmosis/lockup/account-locked-longer-duration-request"; - value: AccountLockedLongerDurationRequestAmino; -} -export interface AccountLockedLongerDurationRequestSDKType { - owner: string; - duration: DurationSDKType | undefined; -} -export interface AccountLockedLongerDurationResponse { - locks: PeriodLock[]; -} -export interface AccountLockedLongerDurationResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationResponse"; - value: Uint8Array; -} -export interface AccountLockedLongerDurationResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedLongerDurationResponseAminoMsg { - type: "osmosis/lockup/account-locked-longer-duration-response"; - value: AccountLockedLongerDurationResponseAmino; -} -export interface AccountLockedLongerDurationResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface AccountLockedDurationRequest { - owner: string; - duration: Duration | undefined; -} -export interface AccountLockedDurationRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedDurationRequest"; - value: Uint8Array; -} -export interface AccountLockedDurationRequestAmino { - owner: string; - duration?: DurationAmino | undefined; -} -export interface AccountLockedDurationRequestAminoMsg { - type: "osmosis/lockup/account-locked-duration-request"; - value: AccountLockedDurationRequestAmino; -} -export interface AccountLockedDurationRequestSDKType { - owner: string; - duration: DurationSDKType | undefined; -} -export interface AccountLockedDurationResponse { - locks: PeriodLock[]; -} -export interface AccountLockedDurationResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedDurationResponse"; - value: Uint8Array; -} -export interface AccountLockedDurationResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedDurationResponseAminoMsg { - type: "osmosis/lockup/account-locked-duration-response"; - value: AccountLockedDurationResponseAmino; -} -export interface AccountLockedDurationResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyRequest { - owner: string; - duration: Duration | undefined; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationNotUnlockingOnlyRequest"; - value: Uint8Array; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyRequestAmino { - owner: string; - duration?: DurationAmino | undefined; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyRequestAminoMsg { - type: "osmosis/lockup/account-locked-longer-duration-not-unlocking-only-request"; - value: AccountLockedLongerDurationNotUnlockingOnlyRequestAmino; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyRequestSDKType { - owner: string; - duration: DurationSDKType | undefined; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyResponse { - locks: PeriodLock[]; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationNotUnlockingOnlyResponse"; - value: Uint8Array; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyResponseAminoMsg { - type: "osmosis/lockup/account-locked-longer-duration-not-unlocking-only-response"; - value: AccountLockedLongerDurationNotUnlockingOnlyResponseAmino; -} -export interface AccountLockedLongerDurationNotUnlockingOnlyResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface AccountLockedLongerDurationDenomRequest { - owner: string; - duration: Duration | undefined; - denom: string; -} -export interface AccountLockedLongerDurationDenomRequestProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationDenomRequest"; - value: Uint8Array; -} -export interface AccountLockedLongerDurationDenomRequestAmino { - owner: string; - duration?: DurationAmino | undefined; - denom: string; -} -export interface AccountLockedLongerDurationDenomRequestAminoMsg { - type: "osmosis/lockup/account-locked-longer-duration-denom-request"; - value: AccountLockedLongerDurationDenomRequestAmino; -} -export interface AccountLockedLongerDurationDenomRequestSDKType { - owner: string; - duration: DurationSDKType | undefined; - denom: string; -} -export interface AccountLockedLongerDurationDenomResponse { - locks: PeriodLock[]; -} -export interface AccountLockedLongerDurationDenomResponseProtoMsg { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationDenomResponse"; - value: Uint8Array; -} -export interface AccountLockedLongerDurationDenomResponseAmino { - locks: PeriodLockAmino[]; -} -export interface AccountLockedLongerDurationDenomResponseAminoMsg { - type: "osmosis/lockup/account-locked-longer-duration-denom-response"; - value: AccountLockedLongerDurationDenomResponseAmino; -} -export interface AccountLockedLongerDurationDenomResponseSDKType { - locks: PeriodLockSDKType[]; -} -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.lockup.QueryParamsRequest"; - value: Uint8Array; -} -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/lockup/query-params-request"; - value: QueryParamsRequestAmino; -} -export interface QueryParamsRequestSDKType {} -export interface QueryParamsResponse { - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.lockup.QueryParamsResponse"; - value: Uint8Array; -} -export interface QueryParamsResponseAmino { - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/lockup/query-params-response"; - value: QueryParamsResponseAmino; -} -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -function createBaseModuleBalanceRequest(): ModuleBalanceRequest { - return {}; -} -export const ModuleBalanceRequest = { - typeUrl: "/osmosis.lockup.ModuleBalanceRequest", - aminoType: "osmosis/lockup/module-balance-request", - encode(_: ModuleBalanceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleBalanceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleBalanceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): ModuleBalanceRequest { - return {}; - }, - toJSON(_: ModuleBalanceRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): ModuleBalanceRequest { - const message = createBaseModuleBalanceRequest(); - return message; - }, - fromSDK(_: ModuleBalanceRequestSDKType): ModuleBalanceRequest { - return {}; - }, - toSDK(_: ModuleBalanceRequest): ModuleBalanceRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: ModuleBalanceRequestAmino): ModuleBalanceRequest { - return {}; - }, - toAmino(_: ModuleBalanceRequest): ModuleBalanceRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: ModuleBalanceRequestAminoMsg): ModuleBalanceRequest { - return ModuleBalanceRequest.fromAmino(object.value); - }, - toAminoMsg(message: ModuleBalanceRequest): ModuleBalanceRequestAminoMsg { - return { - type: "osmosis/lockup/module-balance-request", - value: ModuleBalanceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleBalanceRequestProtoMsg): ModuleBalanceRequest { - return ModuleBalanceRequest.decode(message.value); - }, - toProto(message: ModuleBalanceRequest): Uint8Array { - return ModuleBalanceRequest.encode(message).finish(); - }, - toProtoMsg(message: ModuleBalanceRequest): ModuleBalanceRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.ModuleBalanceRequest", - value: ModuleBalanceRequest.encode(message).finish() - }; - } -}; -function createBaseModuleBalanceResponse(): ModuleBalanceResponse { - return { - coins: [] - }; -} -export const ModuleBalanceResponse = { - typeUrl: "/osmosis.lockup.ModuleBalanceResponse", - aminoType: "osmosis/lockup/module-balance-response", - encode(message: ModuleBalanceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleBalanceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleBalanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleBalanceResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: ModuleBalanceResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ModuleBalanceResponse { - const message = createBaseModuleBalanceResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ModuleBalanceResponseSDKType): ModuleBalanceResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: ModuleBalanceResponse): ModuleBalanceResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: ModuleBalanceResponseAmino): ModuleBalanceResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: ModuleBalanceResponse): ModuleBalanceResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: ModuleBalanceResponseAminoMsg): ModuleBalanceResponse { - return ModuleBalanceResponse.fromAmino(object.value); - }, - toAminoMsg(message: ModuleBalanceResponse): ModuleBalanceResponseAminoMsg { - return { - type: "osmosis/lockup/module-balance-response", - value: ModuleBalanceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleBalanceResponseProtoMsg): ModuleBalanceResponse { - return ModuleBalanceResponse.decode(message.value); - }, - toProto(message: ModuleBalanceResponse): Uint8Array { - return ModuleBalanceResponse.encode(message).finish(); - }, - toProtoMsg(message: ModuleBalanceResponse): ModuleBalanceResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.ModuleBalanceResponse", - value: ModuleBalanceResponse.encode(message).finish() - }; - } -}; -function createBaseModuleLockedAmountRequest(): ModuleLockedAmountRequest { - return {}; -} -export const ModuleLockedAmountRequest = { - typeUrl: "/osmosis.lockup.ModuleLockedAmountRequest", - aminoType: "osmosis/lockup/module-locked-amount-request", - encode(_: ModuleLockedAmountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleLockedAmountRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleLockedAmountRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): ModuleLockedAmountRequest { - return {}; - }, - toJSON(_: ModuleLockedAmountRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): ModuleLockedAmountRequest { - const message = createBaseModuleLockedAmountRequest(); - return message; - }, - fromSDK(_: ModuleLockedAmountRequestSDKType): ModuleLockedAmountRequest { - return {}; - }, - toSDK(_: ModuleLockedAmountRequest): ModuleLockedAmountRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: ModuleLockedAmountRequestAmino): ModuleLockedAmountRequest { - return {}; - }, - toAmino(_: ModuleLockedAmountRequest): ModuleLockedAmountRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: ModuleLockedAmountRequestAminoMsg): ModuleLockedAmountRequest { - return ModuleLockedAmountRequest.fromAmino(object.value); - }, - toAminoMsg(message: ModuleLockedAmountRequest): ModuleLockedAmountRequestAminoMsg { - return { - type: "osmosis/lockup/module-locked-amount-request", - value: ModuleLockedAmountRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleLockedAmountRequestProtoMsg): ModuleLockedAmountRequest { - return ModuleLockedAmountRequest.decode(message.value); - }, - toProto(message: ModuleLockedAmountRequest): Uint8Array { - return ModuleLockedAmountRequest.encode(message).finish(); - }, - toProtoMsg(message: ModuleLockedAmountRequest): ModuleLockedAmountRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.ModuleLockedAmountRequest", - value: ModuleLockedAmountRequest.encode(message).finish() - }; - } -}; -function createBaseModuleLockedAmountResponse(): ModuleLockedAmountResponse { - return { - coins: [] - }; -} -export const ModuleLockedAmountResponse = { - typeUrl: "/osmosis.lockup.ModuleLockedAmountResponse", - aminoType: "osmosis/lockup/module-locked-amount-response", - encode(message: ModuleLockedAmountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ModuleLockedAmountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleLockedAmountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ModuleLockedAmountResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: ModuleLockedAmountResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ModuleLockedAmountResponse { - const message = createBaseModuleLockedAmountResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ModuleLockedAmountResponseSDKType): ModuleLockedAmountResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: ModuleLockedAmountResponse): ModuleLockedAmountResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: ModuleLockedAmountResponseAmino): ModuleLockedAmountResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: ModuleLockedAmountResponse): ModuleLockedAmountResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: ModuleLockedAmountResponseAminoMsg): ModuleLockedAmountResponse { - return ModuleLockedAmountResponse.fromAmino(object.value); - }, - toAminoMsg(message: ModuleLockedAmountResponse): ModuleLockedAmountResponseAminoMsg { - return { - type: "osmosis/lockup/module-locked-amount-response", - value: ModuleLockedAmountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ModuleLockedAmountResponseProtoMsg): ModuleLockedAmountResponse { - return ModuleLockedAmountResponse.decode(message.value); - }, - toProto(message: ModuleLockedAmountResponse): Uint8Array { - return ModuleLockedAmountResponse.encode(message).finish(); - }, - toProtoMsg(message: ModuleLockedAmountResponse): ModuleLockedAmountResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.ModuleLockedAmountResponse", - value: ModuleLockedAmountResponse.encode(message).finish() - }; - } -}; -function createBaseAccountUnlockableCoinsRequest(): AccountUnlockableCoinsRequest { - return { - owner: "" - }; -} -export const AccountUnlockableCoinsRequest = { - typeUrl: "/osmosis.lockup.AccountUnlockableCoinsRequest", - aminoType: "osmosis/lockup/account-unlockable-coins-request", - encode(message: AccountUnlockableCoinsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountUnlockableCoinsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountUnlockableCoinsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountUnlockableCoinsRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: AccountUnlockableCoinsRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): AccountUnlockableCoinsRequest { - const message = createBaseAccountUnlockableCoinsRequest(); - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: AccountUnlockableCoinsRequestSDKType): AccountUnlockableCoinsRequest { - return { - owner: object?.owner - }; - }, - toSDK(message: AccountUnlockableCoinsRequest): AccountUnlockableCoinsRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: AccountUnlockableCoinsRequestAmino): AccountUnlockableCoinsRequest { - return { - owner: object.owner - }; - }, - toAmino(message: AccountUnlockableCoinsRequest): AccountUnlockableCoinsRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: AccountUnlockableCoinsRequestAminoMsg): AccountUnlockableCoinsRequest { - return AccountUnlockableCoinsRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountUnlockableCoinsRequest): AccountUnlockableCoinsRequestAminoMsg { - return { - type: "osmosis/lockup/account-unlockable-coins-request", - value: AccountUnlockableCoinsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountUnlockableCoinsRequestProtoMsg): AccountUnlockableCoinsRequest { - return AccountUnlockableCoinsRequest.decode(message.value); - }, - toProto(message: AccountUnlockableCoinsRequest): Uint8Array { - return AccountUnlockableCoinsRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountUnlockableCoinsRequest): AccountUnlockableCoinsRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountUnlockableCoinsRequest", - value: AccountUnlockableCoinsRequest.encode(message).finish() - }; - } -}; -function createBaseAccountUnlockableCoinsResponse(): AccountUnlockableCoinsResponse { - return { - coins: [] - }; -} -export const AccountUnlockableCoinsResponse = { - typeUrl: "/osmosis.lockup.AccountUnlockableCoinsResponse", - aminoType: "osmosis/lockup/account-unlockable-coins-response", - encode(message: AccountUnlockableCoinsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountUnlockableCoinsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountUnlockableCoinsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountUnlockableCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountUnlockableCoinsResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountUnlockableCoinsResponse { - const message = createBaseAccountUnlockableCoinsResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountUnlockableCoinsResponseSDKType): AccountUnlockableCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountUnlockableCoinsResponse): AccountUnlockableCoinsResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: AccountUnlockableCoinsResponseAmino): AccountUnlockableCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountUnlockableCoinsResponse): AccountUnlockableCoinsResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: AccountUnlockableCoinsResponseAminoMsg): AccountUnlockableCoinsResponse { - return AccountUnlockableCoinsResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountUnlockableCoinsResponse): AccountUnlockableCoinsResponseAminoMsg { - return { - type: "osmosis/lockup/account-unlockable-coins-response", - value: AccountUnlockableCoinsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountUnlockableCoinsResponseProtoMsg): AccountUnlockableCoinsResponse { - return AccountUnlockableCoinsResponse.decode(message.value); - }, - toProto(message: AccountUnlockableCoinsResponse): Uint8Array { - return AccountUnlockableCoinsResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountUnlockableCoinsResponse): AccountUnlockableCoinsResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountUnlockableCoinsResponse", - value: AccountUnlockableCoinsResponse.encode(message).finish() - }; - } -}; -function createBaseAccountUnlockingCoinsRequest(): AccountUnlockingCoinsRequest { - return { - owner: "" - }; -} -export const AccountUnlockingCoinsRequest = { - typeUrl: "/osmosis.lockup.AccountUnlockingCoinsRequest", - aminoType: "osmosis/lockup/account-unlocking-coins-request", - encode(message: AccountUnlockingCoinsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountUnlockingCoinsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountUnlockingCoinsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountUnlockingCoinsRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: AccountUnlockingCoinsRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): AccountUnlockingCoinsRequest { - const message = createBaseAccountUnlockingCoinsRequest(); - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: AccountUnlockingCoinsRequestSDKType): AccountUnlockingCoinsRequest { - return { - owner: object?.owner - }; - }, - toSDK(message: AccountUnlockingCoinsRequest): AccountUnlockingCoinsRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: AccountUnlockingCoinsRequestAmino): AccountUnlockingCoinsRequest { - return { - owner: object.owner - }; - }, - toAmino(message: AccountUnlockingCoinsRequest): AccountUnlockingCoinsRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: AccountUnlockingCoinsRequestAminoMsg): AccountUnlockingCoinsRequest { - return AccountUnlockingCoinsRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountUnlockingCoinsRequest): AccountUnlockingCoinsRequestAminoMsg { - return { - type: "osmosis/lockup/account-unlocking-coins-request", - value: AccountUnlockingCoinsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountUnlockingCoinsRequestProtoMsg): AccountUnlockingCoinsRequest { - return AccountUnlockingCoinsRequest.decode(message.value); - }, - toProto(message: AccountUnlockingCoinsRequest): Uint8Array { - return AccountUnlockingCoinsRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountUnlockingCoinsRequest): AccountUnlockingCoinsRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountUnlockingCoinsRequest", - value: AccountUnlockingCoinsRequest.encode(message).finish() - }; - } -}; -function createBaseAccountUnlockingCoinsResponse(): AccountUnlockingCoinsResponse { - return { - coins: [] - }; -} -export const AccountUnlockingCoinsResponse = { - typeUrl: "/osmosis.lockup.AccountUnlockingCoinsResponse", - aminoType: "osmosis/lockup/account-unlocking-coins-response", - encode(message: AccountUnlockingCoinsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountUnlockingCoinsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountUnlockingCoinsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountUnlockingCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountUnlockingCoinsResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountUnlockingCoinsResponse { - const message = createBaseAccountUnlockingCoinsResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountUnlockingCoinsResponseSDKType): AccountUnlockingCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountUnlockingCoinsResponse): AccountUnlockingCoinsResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: AccountUnlockingCoinsResponseAmino): AccountUnlockingCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountUnlockingCoinsResponse): AccountUnlockingCoinsResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: AccountUnlockingCoinsResponseAminoMsg): AccountUnlockingCoinsResponse { - return AccountUnlockingCoinsResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountUnlockingCoinsResponse): AccountUnlockingCoinsResponseAminoMsg { - return { - type: "osmosis/lockup/account-unlocking-coins-response", - value: AccountUnlockingCoinsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountUnlockingCoinsResponseProtoMsg): AccountUnlockingCoinsResponse { - return AccountUnlockingCoinsResponse.decode(message.value); - }, - toProto(message: AccountUnlockingCoinsResponse): Uint8Array { - return AccountUnlockingCoinsResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountUnlockingCoinsResponse): AccountUnlockingCoinsResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountUnlockingCoinsResponse", - value: AccountUnlockingCoinsResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedCoinsRequest(): AccountLockedCoinsRequest { - return { - owner: "" - }; -} -export const AccountLockedCoinsRequest = { - typeUrl: "/osmosis.lockup.AccountLockedCoinsRequest", - aminoType: "osmosis/lockup/account-locked-coins-request", - encode(message: AccountLockedCoinsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedCoinsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedCoinsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedCoinsRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: AccountLockedCoinsRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedCoinsRequest { - const message = createBaseAccountLockedCoinsRequest(); - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: AccountLockedCoinsRequestSDKType): AccountLockedCoinsRequest { - return { - owner: object?.owner - }; - }, - toSDK(message: AccountLockedCoinsRequest): AccountLockedCoinsRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: AccountLockedCoinsRequestAmino): AccountLockedCoinsRequest { - return { - owner: object.owner - }; - }, - toAmino(message: AccountLockedCoinsRequest): AccountLockedCoinsRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: AccountLockedCoinsRequestAminoMsg): AccountLockedCoinsRequest { - return AccountLockedCoinsRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedCoinsRequest): AccountLockedCoinsRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-coins-request", - value: AccountLockedCoinsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedCoinsRequestProtoMsg): AccountLockedCoinsRequest { - return AccountLockedCoinsRequest.decode(message.value); - }, - toProto(message: AccountLockedCoinsRequest): Uint8Array { - return AccountLockedCoinsRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedCoinsRequest): AccountLockedCoinsRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedCoinsRequest", - value: AccountLockedCoinsRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedCoinsResponse(): AccountLockedCoinsResponse { - return { - coins: [] - }; -} -export const AccountLockedCoinsResponse = { - typeUrl: "/osmosis.lockup.AccountLockedCoinsResponse", - aminoType: "osmosis/lockup/account-locked-coins-response", - encode(message: AccountLockedCoinsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedCoinsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedCoinsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedCoinsResponse): unknown { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedCoinsResponse { - const message = createBaseAccountLockedCoinsResponse(); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedCoinsResponseSDKType): AccountLockedCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedCoinsResponse): AccountLockedCoinsResponseSDKType { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: AccountLockedCoinsResponseAmino): AccountLockedCoinsResponse { - return { - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedCoinsResponse): AccountLockedCoinsResponseAmino { - const obj: any = {}; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedCoinsResponseAminoMsg): AccountLockedCoinsResponse { - return AccountLockedCoinsResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedCoinsResponse): AccountLockedCoinsResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-coins-response", - value: AccountLockedCoinsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedCoinsResponseProtoMsg): AccountLockedCoinsResponse { - return AccountLockedCoinsResponse.decode(message.value); - }, - toProto(message: AccountLockedCoinsResponse): Uint8Array { - return AccountLockedCoinsResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedCoinsResponse): AccountLockedCoinsResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedCoinsResponse", - value: AccountLockedCoinsResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedPastTimeRequest(): AccountLockedPastTimeRequest { - return { - owner: "", - timestamp: new Date() - }; -} -export const AccountLockedPastTimeRequest = { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeRequest", - aminoType: "osmosis/lockup/account-locked-past-time-request", - encode(message: AccountLockedPastTimeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedPastTimeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedPastTimeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedPastTimeRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined - }; - }, - toJSON(message: AccountLockedPastTimeRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedPastTimeRequest { - const message = createBaseAccountLockedPastTimeRequest(); - message.owner = object.owner ?? ""; - message.timestamp = object.timestamp ?? undefined; - return message; - }, - fromSDK(object: AccountLockedPastTimeRequestSDKType): AccountLockedPastTimeRequest { - return { - owner: object?.owner, - timestamp: object.timestamp ?? undefined - }; - }, - toSDK(message: AccountLockedPastTimeRequest): AccountLockedPastTimeRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - return obj; - }, - fromAmino(object: AccountLockedPastTimeRequestAmino): AccountLockedPastTimeRequest { - return { - owner: object.owner, - timestamp: object.timestamp - }; - }, - toAmino(message: AccountLockedPastTimeRequest): AccountLockedPastTimeRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.timestamp = message.timestamp; - return obj; - }, - fromAminoMsg(object: AccountLockedPastTimeRequestAminoMsg): AccountLockedPastTimeRequest { - return AccountLockedPastTimeRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedPastTimeRequest): AccountLockedPastTimeRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-past-time-request", - value: AccountLockedPastTimeRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedPastTimeRequestProtoMsg): AccountLockedPastTimeRequest { - return AccountLockedPastTimeRequest.decode(message.value); - }, - toProto(message: AccountLockedPastTimeRequest): Uint8Array { - return AccountLockedPastTimeRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedPastTimeRequest): AccountLockedPastTimeRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeRequest", - value: AccountLockedPastTimeRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedPastTimeResponse(): AccountLockedPastTimeResponse { - return { - locks: [] - }; -} -export const AccountLockedPastTimeResponse = { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeResponse", - aminoType: "osmosis/lockup/account-locked-past-time-response", - encode(message: AccountLockedPastTimeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedPastTimeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedPastTimeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedPastTimeResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedPastTimeResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedPastTimeResponse { - const message = createBaseAccountLockedPastTimeResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedPastTimeResponseSDKType): AccountLockedPastTimeResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedPastTimeResponse): AccountLockedPastTimeResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedPastTimeResponseAmino): AccountLockedPastTimeResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedPastTimeResponse): AccountLockedPastTimeResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedPastTimeResponseAminoMsg): AccountLockedPastTimeResponse { - return AccountLockedPastTimeResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedPastTimeResponse): AccountLockedPastTimeResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-past-time-response", - value: AccountLockedPastTimeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedPastTimeResponseProtoMsg): AccountLockedPastTimeResponse { - return AccountLockedPastTimeResponse.decode(message.value); - }, - toProto(message: AccountLockedPastTimeResponse): Uint8Array { - return AccountLockedPastTimeResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedPastTimeResponse): AccountLockedPastTimeResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeResponse", - value: AccountLockedPastTimeResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedPastTimeNotUnlockingOnlyRequest(): AccountLockedPastTimeNotUnlockingOnlyRequest { - return { - owner: "", - timestamp: new Date() - }; -} -export const AccountLockedPastTimeNotUnlockingOnlyRequest = { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeNotUnlockingOnlyRequest", - aminoType: "osmosis/lockup/account-locked-past-time-not-unlocking-only-request", - encode(message: AccountLockedPastTimeNotUnlockingOnlyRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedPastTimeNotUnlockingOnlyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedPastTimeNotUnlockingOnlyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedPastTimeNotUnlockingOnlyRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined - }; - }, - toJSON(message: AccountLockedPastTimeNotUnlockingOnlyRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedPastTimeNotUnlockingOnlyRequest { - const message = createBaseAccountLockedPastTimeNotUnlockingOnlyRequest(); - message.owner = object.owner ?? ""; - message.timestamp = object.timestamp ?? undefined; - return message; - }, - fromSDK(object: AccountLockedPastTimeNotUnlockingOnlyRequestSDKType): AccountLockedPastTimeNotUnlockingOnlyRequest { - return { - owner: object?.owner, - timestamp: object.timestamp ?? undefined - }; - }, - toSDK(message: AccountLockedPastTimeNotUnlockingOnlyRequest): AccountLockedPastTimeNotUnlockingOnlyRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - return obj; - }, - fromAmino(object: AccountLockedPastTimeNotUnlockingOnlyRequestAmino): AccountLockedPastTimeNotUnlockingOnlyRequest { - return { - owner: object.owner, - timestamp: object.timestamp - }; - }, - toAmino(message: AccountLockedPastTimeNotUnlockingOnlyRequest): AccountLockedPastTimeNotUnlockingOnlyRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.timestamp = message.timestamp; - return obj; - }, - fromAminoMsg(object: AccountLockedPastTimeNotUnlockingOnlyRequestAminoMsg): AccountLockedPastTimeNotUnlockingOnlyRequest { - return AccountLockedPastTimeNotUnlockingOnlyRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedPastTimeNotUnlockingOnlyRequest): AccountLockedPastTimeNotUnlockingOnlyRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-past-time-not-unlocking-only-request", - value: AccountLockedPastTimeNotUnlockingOnlyRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedPastTimeNotUnlockingOnlyRequestProtoMsg): AccountLockedPastTimeNotUnlockingOnlyRequest { - return AccountLockedPastTimeNotUnlockingOnlyRequest.decode(message.value); - }, - toProto(message: AccountLockedPastTimeNotUnlockingOnlyRequest): Uint8Array { - return AccountLockedPastTimeNotUnlockingOnlyRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedPastTimeNotUnlockingOnlyRequest): AccountLockedPastTimeNotUnlockingOnlyRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeNotUnlockingOnlyRequest", - value: AccountLockedPastTimeNotUnlockingOnlyRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedPastTimeNotUnlockingOnlyResponse(): AccountLockedPastTimeNotUnlockingOnlyResponse { - return { - locks: [] - }; -} -export const AccountLockedPastTimeNotUnlockingOnlyResponse = { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeNotUnlockingOnlyResponse", - aminoType: "osmosis/lockup/account-locked-past-time-not-unlocking-only-response", - encode(message: AccountLockedPastTimeNotUnlockingOnlyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedPastTimeNotUnlockingOnlyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedPastTimeNotUnlockingOnlyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedPastTimeNotUnlockingOnlyResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedPastTimeNotUnlockingOnlyResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedPastTimeNotUnlockingOnlyResponse { - const message = createBaseAccountLockedPastTimeNotUnlockingOnlyResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedPastTimeNotUnlockingOnlyResponseSDKType): AccountLockedPastTimeNotUnlockingOnlyResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedPastTimeNotUnlockingOnlyResponse): AccountLockedPastTimeNotUnlockingOnlyResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedPastTimeNotUnlockingOnlyResponseAmino): AccountLockedPastTimeNotUnlockingOnlyResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedPastTimeNotUnlockingOnlyResponse): AccountLockedPastTimeNotUnlockingOnlyResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedPastTimeNotUnlockingOnlyResponseAminoMsg): AccountLockedPastTimeNotUnlockingOnlyResponse { - return AccountLockedPastTimeNotUnlockingOnlyResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedPastTimeNotUnlockingOnlyResponse): AccountLockedPastTimeNotUnlockingOnlyResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-past-time-not-unlocking-only-response", - value: AccountLockedPastTimeNotUnlockingOnlyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedPastTimeNotUnlockingOnlyResponseProtoMsg): AccountLockedPastTimeNotUnlockingOnlyResponse { - return AccountLockedPastTimeNotUnlockingOnlyResponse.decode(message.value); - }, - toProto(message: AccountLockedPastTimeNotUnlockingOnlyResponse): Uint8Array { - return AccountLockedPastTimeNotUnlockingOnlyResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedPastTimeNotUnlockingOnlyResponse): AccountLockedPastTimeNotUnlockingOnlyResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeNotUnlockingOnlyResponse", - value: AccountLockedPastTimeNotUnlockingOnlyResponse.encode(message).finish() - }; - } -}; -function createBaseAccountUnlockedBeforeTimeRequest(): AccountUnlockedBeforeTimeRequest { - return { - owner: "", - timestamp: new Date() - }; -} -export const AccountUnlockedBeforeTimeRequest = { - typeUrl: "/osmosis.lockup.AccountUnlockedBeforeTimeRequest", - aminoType: "osmosis/lockup/account-unlocked-before-time-request", - encode(message: AccountUnlockedBeforeTimeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountUnlockedBeforeTimeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountUnlockedBeforeTimeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountUnlockedBeforeTimeRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined - }; - }, - toJSON(message: AccountUnlockedBeforeTimeRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): AccountUnlockedBeforeTimeRequest { - const message = createBaseAccountUnlockedBeforeTimeRequest(); - message.owner = object.owner ?? ""; - message.timestamp = object.timestamp ?? undefined; - return message; - }, - fromSDK(object: AccountUnlockedBeforeTimeRequestSDKType): AccountUnlockedBeforeTimeRequest { - return { - owner: object?.owner, - timestamp: object.timestamp ?? undefined - }; - }, - toSDK(message: AccountUnlockedBeforeTimeRequest): AccountUnlockedBeforeTimeRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - return obj; - }, - fromAmino(object: AccountUnlockedBeforeTimeRequestAmino): AccountUnlockedBeforeTimeRequest { - return { - owner: object.owner, - timestamp: object.timestamp - }; - }, - toAmino(message: AccountUnlockedBeforeTimeRequest): AccountUnlockedBeforeTimeRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.timestamp = message.timestamp; - return obj; - }, - fromAminoMsg(object: AccountUnlockedBeforeTimeRequestAminoMsg): AccountUnlockedBeforeTimeRequest { - return AccountUnlockedBeforeTimeRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountUnlockedBeforeTimeRequest): AccountUnlockedBeforeTimeRequestAminoMsg { - return { - type: "osmosis/lockup/account-unlocked-before-time-request", - value: AccountUnlockedBeforeTimeRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountUnlockedBeforeTimeRequestProtoMsg): AccountUnlockedBeforeTimeRequest { - return AccountUnlockedBeforeTimeRequest.decode(message.value); - }, - toProto(message: AccountUnlockedBeforeTimeRequest): Uint8Array { - return AccountUnlockedBeforeTimeRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountUnlockedBeforeTimeRequest): AccountUnlockedBeforeTimeRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountUnlockedBeforeTimeRequest", - value: AccountUnlockedBeforeTimeRequest.encode(message).finish() - }; - } -}; -function createBaseAccountUnlockedBeforeTimeResponse(): AccountUnlockedBeforeTimeResponse { - return { - locks: [] - }; -} -export const AccountUnlockedBeforeTimeResponse = { - typeUrl: "/osmosis.lockup.AccountUnlockedBeforeTimeResponse", - aminoType: "osmosis/lockup/account-unlocked-before-time-response", - encode(message: AccountUnlockedBeforeTimeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountUnlockedBeforeTimeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountUnlockedBeforeTimeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountUnlockedBeforeTimeResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountUnlockedBeforeTimeResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountUnlockedBeforeTimeResponse { - const message = createBaseAccountUnlockedBeforeTimeResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountUnlockedBeforeTimeResponseSDKType): AccountUnlockedBeforeTimeResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountUnlockedBeforeTimeResponse): AccountUnlockedBeforeTimeResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountUnlockedBeforeTimeResponseAmino): AccountUnlockedBeforeTimeResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountUnlockedBeforeTimeResponse): AccountUnlockedBeforeTimeResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountUnlockedBeforeTimeResponseAminoMsg): AccountUnlockedBeforeTimeResponse { - return AccountUnlockedBeforeTimeResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountUnlockedBeforeTimeResponse): AccountUnlockedBeforeTimeResponseAminoMsg { - return { - type: "osmosis/lockup/account-unlocked-before-time-response", - value: AccountUnlockedBeforeTimeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountUnlockedBeforeTimeResponseProtoMsg): AccountUnlockedBeforeTimeResponse { - return AccountUnlockedBeforeTimeResponse.decode(message.value); - }, - toProto(message: AccountUnlockedBeforeTimeResponse): Uint8Array { - return AccountUnlockedBeforeTimeResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountUnlockedBeforeTimeResponse): AccountUnlockedBeforeTimeResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountUnlockedBeforeTimeResponse", - value: AccountUnlockedBeforeTimeResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedPastTimeDenomRequest(): AccountLockedPastTimeDenomRequest { - return { - owner: "", - timestamp: new Date(), - denom: "" - }; -} -export const AccountLockedPastTimeDenomRequest = { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeDenomRequest", - aminoType: "osmosis/lockup/account-locked-past-time-denom-request", - encode(message: AccountLockedPastTimeDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim(); - } - if (message.denom !== "") { - writer.uint32(26).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedPastTimeDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedPastTimeDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedPastTimeDenomRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined, - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: AccountLockedPastTimeDenomRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedPastTimeDenomRequest { - const message = createBaseAccountLockedPastTimeDenomRequest(); - message.owner = object.owner ?? ""; - message.timestamp = object.timestamp ?? undefined; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: AccountLockedPastTimeDenomRequestSDKType): AccountLockedPastTimeDenomRequest { - return { - owner: object?.owner, - timestamp: object.timestamp ?? undefined, - denom: object?.denom - }; - }, - toSDK(message: AccountLockedPastTimeDenomRequest): AccountLockedPastTimeDenomRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - obj.denom = message.denom; - return obj; - }, - fromAmino(object: AccountLockedPastTimeDenomRequestAmino): AccountLockedPastTimeDenomRequest { - return { - owner: object.owner, - timestamp: object.timestamp, - denom: object.denom - }; - }, - toAmino(message: AccountLockedPastTimeDenomRequest): AccountLockedPastTimeDenomRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.timestamp = message.timestamp; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: AccountLockedPastTimeDenomRequestAminoMsg): AccountLockedPastTimeDenomRequest { - return AccountLockedPastTimeDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedPastTimeDenomRequest): AccountLockedPastTimeDenomRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-past-time-denom-request", - value: AccountLockedPastTimeDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedPastTimeDenomRequestProtoMsg): AccountLockedPastTimeDenomRequest { - return AccountLockedPastTimeDenomRequest.decode(message.value); - }, - toProto(message: AccountLockedPastTimeDenomRequest): Uint8Array { - return AccountLockedPastTimeDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedPastTimeDenomRequest): AccountLockedPastTimeDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeDenomRequest", - value: AccountLockedPastTimeDenomRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedPastTimeDenomResponse(): AccountLockedPastTimeDenomResponse { - return { - locks: [] - }; -} -export const AccountLockedPastTimeDenomResponse = { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeDenomResponse", - aminoType: "osmosis/lockup/account-locked-past-time-denom-response", - encode(message: AccountLockedPastTimeDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedPastTimeDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedPastTimeDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedPastTimeDenomResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedPastTimeDenomResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedPastTimeDenomResponse { - const message = createBaseAccountLockedPastTimeDenomResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedPastTimeDenomResponseSDKType): AccountLockedPastTimeDenomResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedPastTimeDenomResponse): AccountLockedPastTimeDenomResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedPastTimeDenomResponseAmino): AccountLockedPastTimeDenomResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedPastTimeDenomResponse): AccountLockedPastTimeDenomResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedPastTimeDenomResponseAminoMsg): AccountLockedPastTimeDenomResponse { - return AccountLockedPastTimeDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedPastTimeDenomResponse): AccountLockedPastTimeDenomResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-past-time-denom-response", - value: AccountLockedPastTimeDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedPastTimeDenomResponseProtoMsg): AccountLockedPastTimeDenomResponse { - return AccountLockedPastTimeDenomResponse.decode(message.value); - }, - toProto(message: AccountLockedPastTimeDenomResponse): Uint8Array { - return AccountLockedPastTimeDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedPastTimeDenomResponse): AccountLockedPastTimeDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedPastTimeDenomResponse", - value: AccountLockedPastTimeDenomResponse.encode(message).finish() - }; - } -}; -function createBaseLockedDenomRequest(): LockedDenomRequest { - return { - denom: "", - duration: Duration.fromPartial({}) - }; -} -export const LockedDenomRequest = { - typeUrl: "/osmosis.lockup.LockedDenomRequest", - aminoType: "osmosis/lockup/locked-denom-request", - encode(message: LockedDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockedDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockedDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockedDenomRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: LockedDenomRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): LockedDenomRequest { - const message = createBaseLockedDenomRequest(); - message.denom = object.denom ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: LockedDenomRequestSDKType): LockedDenomRequest { - return { - denom: object?.denom, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: LockedDenomRequest): LockedDenomRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: LockedDenomRequestAmino): LockedDenomRequest { - return { - denom: object.denom, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: LockedDenomRequest): LockedDenomRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: LockedDenomRequestAminoMsg): LockedDenomRequest { - return LockedDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: LockedDenomRequest): LockedDenomRequestAminoMsg { - return { - type: "osmosis/lockup/locked-denom-request", - value: LockedDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: LockedDenomRequestProtoMsg): LockedDenomRequest { - return LockedDenomRequest.decode(message.value); - }, - toProto(message: LockedDenomRequest): Uint8Array { - return LockedDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: LockedDenomRequest): LockedDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.LockedDenomRequest", - value: LockedDenomRequest.encode(message).finish() - }; - } -}; -function createBaseLockedDenomResponse(): LockedDenomResponse { - return { - amount: "" - }; -} -export const LockedDenomResponse = { - typeUrl: "/osmosis.lockup.LockedDenomResponse", - aminoType: "osmosis/lockup/locked-denom-response", - encode(message: LockedDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.amount !== "") { - writer.uint32(10).string(message.amount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockedDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockedDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockedDenomResponse { - return { - amount: isSet(object.amount) ? String(object.amount) : "" - }; - }, - toJSON(message: LockedDenomResponse): unknown { - const obj: any = {}; - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - fromPartial(object: DeepPartial): LockedDenomResponse { - const message = createBaseLockedDenomResponse(); - message.amount = object.amount ?? ""; - return message; - }, - fromSDK(object: LockedDenomResponseSDKType): LockedDenomResponse { - return { - amount: object?.amount - }; - }, - toSDK(message: LockedDenomResponse): LockedDenomResponseSDKType { - const obj: any = {}; - obj.amount = message.amount; - return obj; - }, - fromAmino(object: LockedDenomResponseAmino): LockedDenomResponse { - return { - amount: object.amount - }; - }, - toAmino(message: LockedDenomResponse): LockedDenomResponseAmino { - const obj: any = {}; - obj.amount = message.amount; - return obj; - }, - fromAminoMsg(object: LockedDenomResponseAminoMsg): LockedDenomResponse { - return LockedDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: LockedDenomResponse): LockedDenomResponseAminoMsg { - return { - type: "osmosis/lockup/locked-denom-response", - value: LockedDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: LockedDenomResponseProtoMsg): LockedDenomResponse { - return LockedDenomResponse.decode(message.value); - }, - toProto(message: LockedDenomResponse): Uint8Array { - return LockedDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: LockedDenomResponse): LockedDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.LockedDenomResponse", - value: LockedDenomResponse.encode(message).finish() - }; - } -}; -function createBaseLockedRequest(): LockedRequest { - return { - lockId: BigInt(0) - }; -} -export const LockedRequest = { - typeUrl: "/osmosis.lockup.LockedRequest", - aminoType: "osmosis/lockup/locked-request", - encode(message: LockedRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lockId !== BigInt(0)) { - writer.uint32(8).uint64(message.lockId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockedRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockedRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockedRequest { - return { - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0) - }; - }, - toJSON(message: LockedRequest): unknown { - const obj: any = {}; - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): LockedRequest { - const message = createBaseLockedRequest(); - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: LockedRequestSDKType): LockedRequest { - return { - lockId: object?.lock_id - }; - }, - toSDK(message: LockedRequest): LockedRequestSDKType { - const obj: any = {}; - obj.lock_id = message.lockId; - return obj; - }, - fromAmino(object: LockedRequestAmino): LockedRequest { - return { - lockId: BigInt(object.lock_id) - }; - }, - toAmino(message: LockedRequest): LockedRequestAmino { - const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: LockedRequestAminoMsg): LockedRequest { - return LockedRequest.fromAmino(object.value); - }, - toAminoMsg(message: LockedRequest): LockedRequestAminoMsg { - return { - type: "osmosis/lockup/locked-request", - value: LockedRequest.toAmino(message) - }; - }, - fromProtoMsg(message: LockedRequestProtoMsg): LockedRequest { - return LockedRequest.decode(message.value); - }, - toProto(message: LockedRequest): Uint8Array { - return LockedRequest.encode(message).finish(); - }, - toProtoMsg(message: LockedRequest): LockedRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.LockedRequest", - value: LockedRequest.encode(message).finish() - }; - } -}; -function createBaseLockedResponse(): LockedResponse { - return { - lock: PeriodLock.fromPartial({}) - }; -} -export const LockedResponse = { - typeUrl: "/osmosis.lockup.LockedResponse", - aminoType: "osmosis/lockup/locked-response", - encode(message: LockedResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lock !== undefined) { - PeriodLock.encode(message.lock, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockedResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockedResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lock = PeriodLock.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockedResponse { - return { - lock: isSet(object.lock) ? PeriodLock.fromJSON(object.lock) : undefined - }; - }, - toJSON(message: LockedResponse): unknown { - const obj: any = {}; - message.lock !== undefined && (obj.lock = message.lock ? PeriodLock.toJSON(message.lock) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): LockedResponse { - const message = createBaseLockedResponse(); - message.lock = object.lock !== undefined && object.lock !== null ? PeriodLock.fromPartial(object.lock) : undefined; - return message; - }, - fromSDK(object: LockedResponseSDKType): LockedResponse { - return { - lock: object.lock ? PeriodLock.fromSDK(object.lock) : undefined - }; - }, - toSDK(message: LockedResponse): LockedResponseSDKType { - const obj: any = {}; - message.lock !== undefined && (obj.lock = message.lock ? PeriodLock.toSDK(message.lock) : undefined); - return obj; - }, - fromAmino(object: LockedResponseAmino): LockedResponse { - return { - lock: object?.lock ? PeriodLock.fromAmino(object.lock) : undefined - }; - }, - toAmino(message: LockedResponse): LockedResponseAmino { - const obj: any = {}; - obj.lock = message.lock ? PeriodLock.toAmino(message.lock) : undefined; - return obj; - }, - fromAminoMsg(object: LockedResponseAminoMsg): LockedResponse { - return LockedResponse.fromAmino(object.value); - }, - toAminoMsg(message: LockedResponse): LockedResponseAminoMsg { - return { - type: "osmosis/lockup/locked-response", - value: LockedResponse.toAmino(message) - }; - }, - fromProtoMsg(message: LockedResponseProtoMsg): LockedResponse { - return LockedResponse.decode(message.value); - }, - toProto(message: LockedResponse): Uint8Array { - return LockedResponse.encode(message).finish(); - }, - toProtoMsg(message: LockedResponse): LockedResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.LockedResponse", - value: LockedResponse.encode(message).finish() - }; - } -}; -function createBaseSyntheticLockupsByLockupIDRequest(): SyntheticLockupsByLockupIDRequest { - return { - lockId: BigInt(0) - }; -} -export const SyntheticLockupsByLockupIDRequest = { - typeUrl: "/osmosis.lockup.SyntheticLockupsByLockupIDRequest", - aminoType: "osmosis/lockup/synthetic-lockups-by-lockup-id-request", - encode(message: SyntheticLockupsByLockupIDRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lockId !== BigInt(0)) { - writer.uint32(8).uint64(message.lockId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SyntheticLockupsByLockupIDRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyntheticLockupsByLockupIDRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SyntheticLockupsByLockupIDRequest { - return { - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0) - }; - }, - toJSON(message: SyntheticLockupsByLockupIDRequest): unknown { - const obj: any = {}; - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SyntheticLockupsByLockupIDRequest { - const message = createBaseSyntheticLockupsByLockupIDRequest(); - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SyntheticLockupsByLockupIDRequestSDKType): SyntheticLockupsByLockupIDRequest { - return { - lockId: object?.lock_id - }; - }, - toSDK(message: SyntheticLockupsByLockupIDRequest): SyntheticLockupsByLockupIDRequestSDKType { - const obj: any = {}; - obj.lock_id = message.lockId; - return obj; - }, - fromAmino(object: SyntheticLockupsByLockupIDRequestAmino): SyntheticLockupsByLockupIDRequest { - return { - lockId: BigInt(object.lock_id) - }; - }, - toAmino(message: SyntheticLockupsByLockupIDRequest): SyntheticLockupsByLockupIDRequestAmino { - const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SyntheticLockupsByLockupIDRequestAminoMsg): SyntheticLockupsByLockupIDRequest { - return SyntheticLockupsByLockupIDRequest.fromAmino(object.value); - }, - toAminoMsg(message: SyntheticLockupsByLockupIDRequest): SyntheticLockupsByLockupIDRequestAminoMsg { - return { - type: "osmosis/lockup/synthetic-lockups-by-lockup-id-request", - value: SyntheticLockupsByLockupIDRequest.toAmino(message) - }; - }, - fromProtoMsg(message: SyntheticLockupsByLockupIDRequestProtoMsg): SyntheticLockupsByLockupIDRequest { - return SyntheticLockupsByLockupIDRequest.decode(message.value); - }, - toProto(message: SyntheticLockupsByLockupIDRequest): Uint8Array { - return SyntheticLockupsByLockupIDRequest.encode(message).finish(); - }, - toProtoMsg(message: SyntheticLockupsByLockupIDRequest): SyntheticLockupsByLockupIDRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.SyntheticLockupsByLockupIDRequest", - value: SyntheticLockupsByLockupIDRequest.encode(message).finish() - }; - } -}; -function createBaseSyntheticLockupsByLockupIDResponse(): SyntheticLockupsByLockupIDResponse { - return { - syntheticLocks: [] - }; -} -export const SyntheticLockupsByLockupIDResponse = { - typeUrl: "/osmosis.lockup.SyntheticLockupsByLockupIDResponse", - aminoType: "osmosis/lockup/synthetic-lockups-by-lockup-id-response", - encode(message: SyntheticLockupsByLockupIDResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.syntheticLocks) { - SyntheticLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SyntheticLockupsByLockupIDResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyntheticLockupsByLockupIDResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.syntheticLocks.push(SyntheticLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SyntheticLockupsByLockupIDResponse { - return { - syntheticLocks: Array.isArray(object?.syntheticLocks) ? object.syntheticLocks.map((e: any) => SyntheticLock.fromJSON(e)) : [] - }; - }, - toJSON(message: SyntheticLockupsByLockupIDResponse): unknown { - const obj: any = {}; - if (message.syntheticLocks) { - obj.syntheticLocks = message.syntheticLocks.map(e => e ? SyntheticLock.toJSON(e) : undefined); - } else { - obj.syntheticLocks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SyntheticLockupsByLockupIDResponse { - const message = createBaseSyntheticLockupsByLockupIDResponse(); - message.syntheticLocks = object.syntheticLocks?.map(e => SyntheticLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SyntheticLockupsByLockupIDResponseSDKType): SyntheticLockupsByLockupIDResponse { - return { - syntheticLocks: Array.isArray(object?.synthetic_locks) ? object.synthetic_locks.map((e: any) => SyntheticLock.fromSDK(e)) : [] - }; - }, - toSDK(message: SyntheticLockupsByLockupIDResponse): SyntheticLockupsByLockupIDResponseSDKType { - const obj: any = {}; - if (message.syntheticLocks) { - obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toSDK(e) : undefined); - } else { - obj.synthetic_locks = []; - } - return obj; - }, - fromAmino(object: SyntheticLockupsByLockupIDResponseAmino): SyntheticLockupsByLockupIDResponse { - return { - syntheticLocks: Array.isArray(object?.synthetic_locks) ? object.synthetic_locks.map((e: any) => SyntheticLock.fromAmino(e)) : [] - }; - }, - toAmino(message: SyntheticLockupsByLockupIDResponse): SyntheticLockupsByLockupIDResponseAmino { - const obj: any = {}; - if (message.syntheticLocks) { - obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toAmino(e) : undefined); - } else { - obj.synthetic_locks = []; - } - return obj; - }, - fromAminoMsg(object: SyntheticLockupsByLockupIDResponseAminoMsg): SyntheticLockupsByLockupIDResponse { - return SyntheticLockupsByLockupIDResponse.fromAmino(object.value); - }, - toAminoMsg(message: SyntheticLockupsByLockupIDResponse): SyntheticLockupsByLockupIDResponseAminoMsg { - return { - type: "osmosis/lockup/synthetic-lockups-by-lockup-id-response", - value: SyntheticLockupsByLockupIDResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SyntheticLockupsByLockupIDResponseProtoMsg): SyntheticLockupsByLockupIDResponse { - return SyntheticLockupsByLockupIDResponse.decode(message.value); - }, - toProto(message: SyntheticLockupsByLockupIDResponse): Uint8Array { - return SyntheticLockupsByLockupIDResponse.encode(message).finish(); - }, - toProtoMsg(message: SyntheticLockupsByLockupIDResponse): SyntheticLockupsByLockupIDResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.SyntheticLockupsByLockupIDResponse", - value: SyntheticLockupsByLockupIDResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedLongerDurationRequest(): AccountLockedLongerDurationRequest { - return { - owner: "", - duration: Duration.fromPartial({}) - }; -} -export const AccountLockedLongerDurationRequest = { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationRequest", - aminoType: "osmosis/lockup/account-locked-longer-duration-request", - encode(message: AccountLockedLongerDurationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedLongerDurationRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedLongerDurationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedLongerDurationRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: AccountLockedLongerDurationRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedLongerDurationRequest { - const message = createBaseAccountLockedLongerDurationRequest(); - message.owner = object.owner ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: AccountLockedLongerDurationRequestSDKType): AccountLockedLongerDurationRequest { - return { - owner: object?.owner, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: AccountLockedLongerDurationRequest): AccountLockedLongerDurationRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: AccountLockedLongerDurationRequestAmino): AccountLockedLongerDurationRequest { - return { - owner: object.owner, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: AccountLockedLongerDurationRequest): AccountLockedLongerDurationRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: AccountLockedLongerDurationRequestAminoMsg): AccountLockedLongerDurationRequest { - return AccountLockedLongerDurationRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedLongerDurationRequest): AccountLockedLongerDurationRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-longer-duration-request", - value: AccountLockedLongerDurationRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedLongerDurationRequestProtoMsg): AccountLockedLongerDurationRequest { - return AccountLockedLongerDurationRequest.decode(message.value); - }, - toProto(message: AccountLockedLongerDurationRequest): Uint8Array { - return AccountLockedLongerDurationRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedLongerDurationRequest): AccountLockedLongerDurationRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationRequest", - value: AccountLockedLongerDurationRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedLongerDurationResponse(): AccountLockedLongerDurationResponse { - return { - locks: [] - }; -} -export const AccountLockedLongerDurationResponse = { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationResponse", - aminoType: "osmosis/lockup/account-locked-longer-duration-response", - encode(message: AccountLockedLongerDurationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedLongerDurationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedLongerDurationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedLongerDurationResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedLongerDurationResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedLongerDurationResponse { - const message = createBaseAccountLockedLongerDurationResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedLongerDurationResponseSDKType): AccountLockedLongerDurationResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedLongerDurationResponse): AccountLockedLongerDurationResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedLongerDurationResponseAmino): AccountLockedLongerDurationResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedLongerDurationResponse): AccountLockedLongerDurationResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedLongerDurationResponseAminoMsg): AccountLockedLongerDurationResponse { - return AccountLockedLongerDurationResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedLongerDurationResponse): AccountLockedLongerDurationResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-longer-duration-response", - value: AccountLockedLongerDurationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedLongerDurationResponseProtoMsg): AccountLockedLongerDurationResponse { - return AccountLockedLongerDurationResponse.decode(message.value); - }, - toProto(message: AccountLockedLongerDurationResponse): Uint8Array { - return AccountLockedLongerDurationResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedLongerDurationResponse): AccountLockedLongerDurationResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationResponse", - value: AccountLockedLongerDurationResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedDurationRequest(): AccountLockedDurationRequest { - return { - owner: "", - duration: Duration.fromPartial({}) - }; -} -export const AccountLockedDurationRequest = { - typeUrl: "/osmosis.lockup.AccountLockedDurationRequest", - aminoType: "osmosis/lockup/account-locked-duration-request", - encode(message: AccountLockedDurationRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedDurationRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedDurationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedDurationRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: AccountLockedDurationRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedDurationRequest { - const message = createBaseAccountLockedDurationRequest(); - message.owner = object.owner ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: AccountLockedDurationRequestSDKType): AccountLockedDurationRequest { - return { - owner: object?.owner, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: AccountLockedDurationRequest): AccountLockedDurationRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: AccountLockedDurationRequestAmino): AccountLockedDurationRequest { - return { - owner: object.owner, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: AccountLockedDurationRequest): AccountLockedDurationRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: AccountLockedDurationRequestAminoMsg): AccountLockedDurationRequest { - return AccountLockedDurationRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedDurationRequest): AccountLockedDurationRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-duration-request", - value: AccountLockedDurationRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedDurationRequestProtoMsg): AccountLockedDurationRequest { - return AccountLockedDurationRequest.decode(message.value); - }, - toProto(message: AccountLockedDurationRequest): Uint8Array { - return AccountLockedDurationRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedDurationRequest): AccountLockedDurationRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedDurationRequest", - value: AccountLockedDurationRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedDurationResponse(): AccountLockedDurationResponse { - return { - locks: [] - }; -} -export const AccountLockedDurationResponse = { - typeUrl: "/osmosis.lockup.AccountLockedDurationResponse", - aminoType: "osmosis/lockup/account-locked-duration-response", - encode(message: AccountLockedDurationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedDurationResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedDurationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedDurationResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedDurationResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedDurationResponse { - const message = createBaseAccountLockedDurationResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedDurationResponseSDKType): AccountLockedDurationResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedDurationResponse): AccountLockedDurationResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedDurationResponseAmino): AccountLockedDurationResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedDurationResponse): AccountLockedDurationResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedDurationResponseAminoMsg): AccountLockedDurationResponse { - return AccountLockedDurationResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedDurationResponse): AccountLockedDurationResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-duration-response", - value: AccountLockedDurationResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedDurationResponseProtoMsg): AccountLockedDurationResponse { - return AccountLockedDurationResponse.decode(message.value); - }, - toProto(message: AccountLockedDurationResponse): Uint8Array { - return AccountLockedDurationResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedDurationResponse): AccountLockedDurationResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedDurationResponse", - value: AccountLockedDurationResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedLongerDurationNotUnlockingOnlyRequest(): AccountLockedLongerDurationNotUnlockingOnlyRequest { - return { - owner: "", - duration: Duration.fromPartial({}) - }; -} -export const AccountLockedLongerDurationNotUnlockingOnlyRequest = { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationNotUnlockingOnlyRequest", - aminoType: "osmosis/lockup/account-locked-longer-duration-not-unlocking-only-request", - encode(message: AccountLockedLongerDurationNotUnlockingOnlyRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedLongerDurationNotUnlockingOnlyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedLongerDurationNotUnlockingOnlyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedLongerDurationNotUnlockingOnlyRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: AccountLockedLongerDurationNotUnlockingOnlyRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedLongerDurationNotUnlockingOnlyRequest { - const message = createBaseAccountLockedLongerDurationNotUnlockingOnlyRequest(); - message.owner = object.owner ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: AccountLockedLongerDurationNotUnlockingOnlyRequestSDKType): AccountLockedLongerDurationNotUnlockingOnlyRequest { - return { - owner: object?.owner, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: AccountLockedLongerDurationNotUnlockingOnlyRequest): AccountLockedLongerDurationNotUnlockingOnlyRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: AccountLockedLongerDurationNotUnlockingOnlyRequestAmino): AccountLockedLongerDurationNotUnlockingOnlyRequest { - return { - owner: object.owner, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: AccountLockedLongerDurationNotUnlockingOnlyRequest): AccountLockedLongerDurationNotUnlockingOnlyRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: AccountLockedLongerDurationNotUnlockingOnlyRequestAminoMsg): AccountLockedLongerDurationNotUnlockingOnlyRequest { - return AccountLockedLongerDurationNotUnlockingOnlyRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedLongerDurationNotUnlockingOnlyRequest): AccountLockedLongerDurationNotUnlockingOnlyRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-longer-duration-not-unlocking-only-request", - value: AccountLockedLongerDurationNotUnlockingOnlyRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedLongerDurationNotUnlockingOnlyRequestProtoMsg): AccountLockedLongerDurationNotUnlockingOnlyRequest { - return AccountLockedLongerDurationNotUnlockingOnlyRequest.decode(message.value); - }, - toProto(message: AccountLockedLongerDurationNotUnlockingOnlyRequest): Uint8Array { - return AccountLockedLongerDurationNotUnlockingOnlyRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedLongerDurationNotUnlockingOnlyRequest): AccountLockedLongerDurationNotUnlockingOnlyRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationNotUnlockingOnlyRequest", - value: AccountLockedLongerDurationNotUnlockingOnlyRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedLongerDurationNotUnlockingOnlyResponse(): AccountLockedLongerDurationNotUnlockingOnlyResponse { - return { - locks: [] - }; -} -export const AccountLockedLongerDurationNotUnlockingOnlyResponse = { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationNotUnlockingOnlyResponse", - aminoType: "osmosis/lockup/account-locked-longer-duration-not-unlocking-only-response", - encode(message: AccountLockedLongerDurationNotUnlockingOnlyResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedLongerDurationNotUnlockingOnlyResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedLongerDurationNotUnlockingOnlyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedLongerDurationNotUnlockingOnlyResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedLongerDurationNotUnlockingOnlyResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedLongerDurationNotUnlockingOnlyResponse { - const message = createBaseAccountLockedLongerDurationNotUnlockingOnlyResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedLongerDurationNotUnlockingOnlyResponseSDKType): AccountLockedLongerDurationNotUnlockingOnlyResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedLongerDurationNotUnlockingOnlyResponse): AccountLockedLongerDurationNotUnlockingOnlyResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedLongerDurationNotUnlockingOnlyResponseAmino): AccountLockedLongerDurationNotUnlockingOnlyResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedLongerDurationNotUnlockingOnlyResponse): AccountLockedLongerDurationNotUnlockingOnlyResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedLongerDurationNotUnlockingOnlyResponseAminoMsg): AccountLockedLongerDurationNotUnlockingOnlyResponse { - return AccountLockedLongerDurationNotUnlockingOnlyResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedLongerDurationNotUnlockingOnlyResponse): AccountLockedLongerDurationNotUnlockingOnlyResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-longer-duration-not-unlocking-only-response", - value: AccountLockedLongerDurationNotUnlockingOnlyResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedLongerDurationNotUnlockingOnlyResponseProtoMsg): AccountLockedLongerDurationNotUnlockingOnlyResponse { - return AccountLockedLongerDurationNotUnlockingOnlyResponse.decode(message.value); - }, - toProto(message: AccountLockedLongerDurationNotUnlockingOnlyResponse): Uint8Array { - return AccountLockedLongerDurationNotUnlockingOnlyResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedLongerDurationNotUnlockingOnlyResponse): AccountLockedLongerDurationNotUnlockingOnlyResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationNotUnlockingOnlyResponse", - value: AccountLockedLongerDurationNotUnlockingOnlyResponse.encode(message).finish() - }; - } -}; -function createBaseAccountLockedLongerDurationDenomRequest(): AccountLockedLongerDurationDenomRequest { - return { - owner: "", - duration: Duration.fromPartial({}), - denom: "" - }; -} -export const AccountLockedLongerDurationDenomRequest = { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationDenomRequest", - aminoType: "osmosis/lockup/account-locked-longer-duration-denom-request", - encode(message: AccountLockedLongerDurationDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - if (message.denom !== "") { - writer.uint32(26).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedLongerDurationDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedLongerDurationDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedLongerDurationDenomRequest { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: AccountLockedLongerDurationDenomRequest): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedLongerDurationDenomRequest { - const message = createBaseAccountLockedLongerDurationDenomRequest(); - message.owner = object.owner ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: AccountLockedLongerDurationDenomRequestSDKType): AccountLockedLongerDurationDenomRequest { - return { - owner: object?.owner, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - denom: object?.denom - }; - }, - toSDK(message: AccountLockedLongerDurationDenomRequest): AccountLockedLongerDurationDenomRequestSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - obj.denom = message.denom; - return obj; - }, - fromAmino(object: AccountLockedLongerDurationDenomRequestAmino): AccountLockedLongerDurationDenomRequest { - return { - owner: object.owner, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - denom: object.denom - }; - }, - toAmino(message: AccountLockedLongerDurationDenomRequest): AccountLockedLongerDurationDenomRequestAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: AccountLockedLongerDurationDenomRequestAminoMsg): AccountLockedLongerDurationDenomRequest { - return AccountLockedLongerDurationDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedLongerDurationDenomRequest): AccountLockedLongerDurationDenomRequestAminoMsg { - return { - type: "osmosis/lockup/account-locked-longer-duration-denom-request", - value: AccountLockedLongerDurationDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedLongerDurationDenomRequestProtoMsg): AccountLockedLongerDurationDenomRequest { - return AccountLockedLongerDurationDenomRequest.decode(message.value); - }, - toProto(message: AccountLockedLongerDurationDenomRequest): Uint8Array { - return AccountLockedLongerDurationDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedLongerDurationDenomRequest): AccountLockedLongerDurationDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationDenomRequest", - value: AccountLockedLongerDurationDenomRequest.encode(message).finish() - }; - } -}; -function createBaseAccountLockedLongerDurationDenomResponse(): AccountLockedLongerDurationDenomResponse { - return { - locks: [] - }; -} -export const AccountLockedLongerDurationDenomResponse = { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationDenomResponse", - aminoType: "osmosis/lockup/account-locked-longer-duration-denom-response", - encode(message: AccountLockedLongerDurationDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.locks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AccountLockedLongerDurationDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountLockedLongerDurationDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AccountLockedLongerDurationDenomResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: AccountLockedLongerDurationDenomResponse): unknown { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AccountLockedLongerDurationDenomResponse { - const message = createBaseAccountLockedLongerDurationDenomResponse(); - message.locks = object.locks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AccountLockedLongerDurationDenomResponseSDKType): AccountLockedLongerDurationDenomResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: AccountLockedLongerDurationDenomResponse): AccountLockedLongerDurationDenomResponseSDKType { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAmino(object: AccountLockedLongerDurationDenomResponseAmino): AccountLockedLongerDurationDenomResponse { - return { - locks: Array.isArray(object?.locks) ? object.locks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: AccountLockedLongerDurationDenomResponse): AccountLockedLongerDurationDenomResponseAmino { - const obj: any = {}; - if (message.locks) { - obj.locks = message.locks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.locks = []; - } - return obj; - }, - fromAminoMsg(object: AccountLockedLongerDurationDenomResponseAminoMsg): AccountLockedLongerDurationDenomResponse { - return AccountLockedLongerDurationDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: AccountLockedLongerDurationDenomResponse): AccountLockedLongerDurationDenomResponseAminoMsg { - return { - type: "osmosis/lockup/account-locked-longer-duration-denom-response", - value: AccountLockedLongerDurationDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AccountLockedLongerDurationDenomResponseProtoMsg): AccountLockedLongerDurationDenomResponse { - return AccountLockedLongerDurationDenomResponse.decode(message.value); - }, - toProto(message: AccountLockedLongerDurationDenomResponse): Uint8Array { - return AccountLockedLongerDurationDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: AccountLockedLongerDurationDenomResponse): AccountLockedLongerDurationDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.AccountLockedLongerDurationDenomResponse", - value: AccountLockedLongerDurationDenomResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.lockup.QueryParamsRequest", - aminoType: "osmosis/lockup/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/lockup/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.lockup.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.lockup.QueryParamsResponse", - aminoType: "osmosis/lockup/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/lockup/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/lockup/tx.amino.ts deleted file mode 100644 index 31d040f1..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/tx.amino.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { MsgLockTokens, MsgBeginUnlockingAll, MsgBeginUnlocking, MsgExtendLockup, MsgForceUnlock } from "./tx"; -export const AminoConverter = { - "/osmosis.lockup.MsgLockTokens": { - aminoType: "osmosis/lockup/lock-tokens", - toAmino: MsgLockTokens.toAmino, - fromAmino: MsgLockTokens.fromAmino - }, - "/osmosis.lockup.MsgBeginUnlockingAll": { - aminoType: "osmosis/lockup/begin-unlock-tokens", - toAmino: MsgBeginUnlockingAll.toAmino, - fromAmino: MsgBeginUnlockingAll.fromAmino - }, - "/osmosis.lockup.MsgBeginUnlocking": { - aminoType: "osmosis/lockup/begin-unlock-period-lock", - toAmino: MsgBeginUnlocking.toAmino, - fromAmino: MsgBeginUnlocking.fromAmino - }, - "/osmosis.lockup.MsgExtendLockup": { - aminoType: "osmosis/lockup/extend-lockup", - toAmino: MsgExtendLockup.toAmino, - fromAmino: MsgExtendLockup.fromAmino - }, - "/osmosis.lockup.MsgForceUnlock": { - aminoType: "osmosis/lockup/force-unlock", - toAmino: MsgForceUnlock.toAmino, - fromAmino: MsgForceUnlock.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/lockup/tx.registry.ts deleted file mode 100644 index 5fda9d18..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/tx.registry.ts +++ /dev/null @@ -1,171 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgLockTokens, MsgBeginUnlockingAll, MsgBeginUnlocking, MsgExtendLockup, MsgForceUnlock } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.lockup.MsgLockTokens", MsgLockTokens], ["/osmosis.lockup.MsgBeginUnlockingAll", MsgBeginUnlockingAll], ["/osmosis.lockup.MsgBeginUnlocking", MsgBeginUnlocking], ["/osmosis.lockup.MsgExtendLockup", MsgExtendLockup], ["/osmosis.lockup.MsgForceUnlock", MsgForceUnlock]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - lockTokens(value: MsgLockTokens) { - return { - typeUrl: "/osmosis.lockup.MsgLockTokens", - value: MsgLockTokens.encode(value).finish() - }; - }, - beginUnlockingAll(value: MsgBeginUnlockingAll) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - value: MsgBeginUnlockingAll.encode(value).finish() - }; - }, - beginUnlocking(value: MsgBeginUnlocking) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - value: MsgBeginUnlocking.encode(value).finish() - }; - }, - extendLockup(value: MsgExtendLockup) { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - value: MsgExtendLockup.encode(value).finish() - }; - }, - forceUnlock(value: MsgForceUnlock) { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - value: MsgForceUnlock.encode(value).finish() - }; - } - }, - withTypeUrl: { - lockTokens(value: MsgLockTokens) { - return { - typeUrl: "/osmosis.lockup.MsgLockTokens", - value - }; - }, - beginUnlockingAll(value: MsgBeginUnlockingAll) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - value - }; - }, - beginUnlocking(value: MsgBeginUnlocking) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - value - }; - }, - extendLockup(value: MsgExtendLockup) { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - value - }; - }, - forceUnlock(value: MsgForceUnlock) { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - value - }; - } - }, - toJSON: { - lockTokens(value: MsgLockTokens) { - return { - typeUrl: "/osmosis.lockup.MsgLockTokens", - value: MsgLockTokens.toJSON(value) - }; - }, - beginUnlockingAll(value: MsgBeginUnlockingAll) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - value: MsgBeginUnlockingAll.toJSON(value) - }; - }, - beginUnlocking(value: MsgBeginUnlocking) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - value: MsgBeginUnlocking.toJSON(value) - }; - }, - extendLockup(value: MsgExtendLockup) { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - value: MsgExtendLockup.toJSON(value) - }; - }, - forceUnlock(value: MsgForceUnlock) { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - value: MsgForceUnlock.toJSON(value) - }; - } - }, - fromJSON: { - lockTokens(value: any) { - return { - typeUrl: "/osmosis.lockup.MsgLockTokens", - value: MsgLockTokens.fromJSON(value) - }; - }, - beginUnlockingAll(value: any) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - value: MsgBeginUnlockingAll.fromJSON(value) - }; - }, - beginUnlocking(value: any) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - value: MsgBeginUnlocking.fromJSON(value) - }; - }, - extendLockup(value: any) { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - value: MsgExtendLockup.fromJSON(value) - }; - }, - forceUnlock(value: any) { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - value: MsgForceUnlock.fromJSON(value) - }; - } - }, - fromPartial: { - lockTokens(value: MsgLockTokens) { - return { - typeUrl: "/osmosis.lockup.MsgLockTokens", - value: MsgLockTokens.fromPartial(value) - }; - }, - beginUnlockingAll(value: MsgBeginUnlockingAll) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - value: MsgBeginUnlockingAll.fromPartial(value) - }; - }, - beginUnlocking(value: MsgBeginUnlocking) { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - value: MsgBeginUnlocking.fromPartial(value) - }; - }, - extendLockup(value: MsgExtendLockup) { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - value: MsgExtendLockup.fromPartial(value) - }; - }, - forceUnlock(value: MsgForceUnlock) { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - value: MsgForceUnlock.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/lockup/tx.rpc.msg.ts deleted file mode 100644 index ea0398b1..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/tx.rpc.msg.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { MsgLockTokens, MsgLockTokensResponse, MsgBeginUnlockingAll, MsgBeginUnlockingAllResponse, MsgBeginUnlocking, MsgBeginUnlockingResponse, MsgExtendLockup, MsgExtendLockupResponse, MsgForceUnlock, MsgForceUnlockResponse } from "./tx"; -/** Msg defines the Msg service. */ -export interface Msg { - /** LockTokens lock tokens */ - lockTokens(request: MsgLockTokens): Promise; - /** BeginUnlockingAll begin unlocking all tokens */ - beginUnlockingAll(request: MsgBeginUnlockingAll): Promise; - /** MsgBeginUnlocking begins unlocking tokens by lock ID */ - beginUnlocking(request: MsgBeginUnlocking): Promise; - /** MsgEditLockup edits the existing lockups by lock ID */ - extendLockup(request: MsgExtendLockup): Promise; - forceUnlock(request: MsgForceUnlock): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.lockTokens = this.lockTokens.bind(this); - this.beginUnlockingAll = this.beginUnlockingAll.bind(this); - this.beginUnlocking = this.beginUnlocking.bind(this); - this.extendLockup = this.extendLockup.bind(this); - this.forceUnlock = this.forceUnlock.bind(this); - } - lockTokens(request: MsgLockTokens): Promise { - const data = MsgLockTokens.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Msg", "LockTokens", data); - return promise.then(data => MsgLockTokensResponse.decode(new BinaryReader(data))); - } - beginUnlockingAll(request: MsgBeginUnlockingAll): Promise { - const data = MsgBeginUnlockingAll.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Msg", "BeginUnlockingAll", data); - return promise.then(data => MsgBeginUnlockingAllResponse.decode(new BinaryReader(data))); - } - beginUnlocking(request: MsgBeginUnlocking): Promise { - const data = MsgBeginUnlocking.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Msg", "BeginUnlocking", data); - return promise.then(data => MsgBeginUnlockingResponse.decode(new BinaryReader(data))); - } - extendLockup(request: MsgExtendLockup): Promise { - const data = MsgExtendLockup.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Msg", "ExtendLockup", data); - return promise.then(data => MsgExtendLockupResponse.decode(new BinaryReader(data))); - } - forceUnlock(request: MsgForceUnlock): Promise { - const data = MsgForceUnlock.encode(request).finish(); - const promise = this.rpc.request("osmosis.lockup.Msg", "ForceUnlock", data); - return promise.then(data => MsgForceUnlockResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/lockup/tx.ts b/examples/interchainjs/src/codegen/osmosis/lockup/tx.ts deleted file mode 100644 index 1bb76c57..00000000 --- a/examples/interchainjs/src/codegen/osmosis/lockup/tx.ts +++ /dev/null @@ -1,1275 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { PeriodLock, PeriodLockAmino, PeriodLockSDKType } from "./lock"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -export interface MsgLockTokens { - owner: string; - duration: Duration | undefined; - coins: Coin[]; -} -export interface MsgLockTokensProtoMsg { - typeUrl: "/osmosis.lockup.MsgLockTokens"; - value: Uint8Array; -} -export interface MsgLockTokensAmino { - owner: string; - duration?: DurationAmino | undefined; - coins: CoinAmino[]; -} -export interface MsgLockTokensAminoMsg { - type: "osmosis/lockup/lock-tokens"; - value: MsgLockTokensAmino; -} -export interface MsgLockTokensSDKType { - owner: string; - duration: DurationSDKType | undefined; - coins: CoinSDKType[]; -} -export interface MsgLockTokensResponse { - ID: bigint; -} -export interface MsgLockTokensResponseProtoMsg { - typeUrl: "/osmosis.lockup.MsgLockTokensResponse"; - value: Uint8Array; -} -export interface MsgLockTokensResponseAmino { - ID: string; -} -export interface MsgLockTokensResponseAminoMsg { - type: "osmosis/lockup/lock-tokens-response"; - value: MsgLockTokensResponseAmino; -} -export interface MsgLockTokensResponseSDKType { - ID: bigint; -} -export interface MsgBeginUnlockingAll { - owner: string; -} -export interface MsgBeginUnlockingAllProtoMsg { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll"; - value: Uint8Array; -} -export interface MsgBeginUnlockingAllAmino { - owner: string; -} -export interface MsgBeginUnlockingAllAminoMsg { - type: "osmosis/lockup/begin-unlock-tokens"; - value: MsgBeginUnlockingAllAmino; -} -export interface MsgBeginUnlockingAllSDKType { - owner: string; -} -export interface MsgBeginUnlockingAllResponse { - unlocks: PeriodLock[]; -} -export interface MsgBeginUnlockingAllResponseProtoMsg { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAllResponse"; - value: Uint8Array; -} -export interface MsgBeginUnlockingAllResponseAmino { - unlocks: PeriodLockAmino[]; -} -export interface MsgBeginUnlockingAllResponseAminoMsg { - type: "osmosis/lockup/begin-unlocking-all-response"; - value: MsgBeginUnlockingAllResponseAmino; -} -export interface MsgBeginUnlockingAllResponseSDKType { - unlocks: PeriodLockSDKType[]; -} -export interface MsgBeginUnlocking { - owner: string; - ID: bigint; - /** Amount of unlocking coins. Unlock all if not set. */ - coins: Coin[]; -} -export interface MsgBeginUnlockingProtoMsg { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking"; - value: Uint8Array; -} -export interface MsgBeginUnlockingAmino { - owner: string; - ID: string; - /** Amount of unlocking coins. Unlock all if not set. */ - coins: CoinAmino[]; -} -export interface MsgBeginUnlockingAminoMsg { - type: "osmosis/lockup/begin-unlock-period-lock"; - value: MsgBeginUnlockingAmino; -} -export interface MsgBeginUnlockingSDKType { - owner: string; - ID: bigint; - coins: CoinSDKType[]; -} -export interface MsgBeginUnlockingResponse { - success: boolean; -} -export interface MsgBeginUnlockingResponseProtoMsg { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingResponse"; - value: Uint8Array; -} -export interface MsgBeginUnlockingResponseAmino { - success: boolean; -} -export interface MsgBeginUnlockingResponseAminoMsg { - type: "osmosis/lockup/begin-unlocking-response"; - value: MsgBeginUnlockingResponseAmino; -} -export interface MsgBeginUnlockingResponseSDKType { - success: boolean; -} -/** - * MsgExtendLockup extends the existing lockup's duration. - * The new duration is longer than the original. - */ -export interface MsgExtendLockup { - owner: string; - ID: bigint; - /** - * duration to be set. fails if lower than the current duration, or is - * unlocking - */ - duration: Duration | undefined; -} -export interface MsgExtendLockupProtoMsg { - typeUrl: "/osmosis.lockup.MsgExtendLockup"; - value: Uint8Array; -} -/** - * MsgExtendLockup extends the existing lockup's duration. - * The new duration is longer than the original. - */ -export interface MsgExtendLockupAmino { - owner: string; - ID: string; - /** - * duration to be set. fails if lower than the current duration, or is - * unlocking - */ - duration?: DurationAmino | undefined; -} -export interface MsgExtendLockupAminoMsg { - type: "osmosis/lockup/extend-lockup"; - value: MsgExtendLockupAmino; -} -/** - * MsgExtendLockup extends the existing lockup's duration. - * The new duration is longer than the original. - */ -export interface MsgExtendLockupSDKType { - owner: string; - ID: bigint; - duration: DurationSDKType | undefined; -} -export interface MsgExtendLockupResponse { - success: boolean; -} -export interface MsgExtendLockupResponseProtoMsg { - typeUrl: "/osmosis.lockup.MsgExtendLockupResponse"; - value: Uint8Array; -} -export interface MsgExtendLockupResponseAmino { - success: boolean; -} -export interface MsgExtendLockupResponseAminoMsg { - type: "osmosis/lockup/extend-lockup-response"; - value: MsgExtendLockupResponseAmino; -} -export interface MsgExtendLockupResponseSDKType { - success: boolean; -} -/** - * MsgForceUnlock unlocks locks immediately for - * addresses registered via governance. - */ -export interface MsgForceUnlock { - owner: string; - ID: bigint; - /** Amount of unlocking coins. Unlock all if not set. */ - coins: Coin[]; -} -export interface MsgForceUnlockProtoMsg { - typeUrl: "/osmosis.lockup.MsgForceUnlock"; - value: Uint8Array; -} -/** - * MsgForceUnlock unlocks locks immediately for - * addresses registered via governance. - */ -export interface MsgForceUnlockAmino { - owner: string; - ID: string; - /** Amount of unlocking coins. Unlock all if not set. */ - coins: CoinAmino[]; -} -export interface MsgForceUnlockAminoMsg { - type: "osmosis/lockup/force-unlock"; - value: MsgForceUnlockAmino; -} -/** - * MsgForceUnlock unlocks locks immediately for - * addresses registered via governance. - */ -export interface MsgForceUnlockSDKType { - owner: string; - ID: bigint; - coins: CoinSDKType[]; -} -export interface MsgForceUnlockResponse { - success: boolean; -} -export interface MsgForceUnlockResponseProtoMsg { - typeUrl: "/osmosis.lockup.MsgForceUnlockResponse"; - value: Uint8Array; -} -export interface MsgForceUnlockResponseAmino { - success: boolean; -} -export interface MsgForceUnlockResponseAminoMsg { - type: "osmosis/lockup/force-unlock-response"; - value: MsgForceUnlockResponseAmino; -} -export interface MsgForceUnlockResponseSDKType { - success: boolean; -} -function createBaseMsgLockTokens(): MsgLockTokens { - return { - owner: "", - duration: Duration.fromPartial({}), - coins: [] - }; -} -export const MsgLockTokens = { - typeUrl: "/osmosis.lockup.MsgLockTokens", - aminoType: "osmosis/lockup/lock-tokens", - encode(message: MsgLockTokens, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgLockTokens { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLockTokens(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgLockTokens { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgLockTokens): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgLockTokens { - const message = createBaseMsgLockTokens(); - message.owner = object.owner ?? ""; - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgLockTokensSDKType): MsgLockTokens { - return { - owner: object?.owner, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgLockTokens): MsgLockTokensSDKType { - const obj: any = {}; - obj.owner = message.owner; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: MsgLockTokensAmino): MsgLockTokens { - return { - owner: object.owner, - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgLockTokens): MsgLockTokensAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: MsgLockTokensAminoMsg): MsgLockTokens { - return MsgLockTokens.fromAmino(object.value); - }, - toAminoMsg(message: MsgLockTokens): MsgLockTokensAminoMsg { - return { - type: "osmosis/lockup/lock-tokens", - value: MsgLockTokens.toAmino(message) - }; - }, - fromProtoMsg(message: MsgLockTokensProtoMsg): MsgLockTokens { - return MsgLockTokens.decode(message.value); - }, - toProto(message: MsgLockTokens): Uint8Array { - return MsgLockTokens.encode(message).finish(); - }, - toProtoMsg(message: MsgLockTokens): MsgLockTokensProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgLockTokens", - value: MsgLockTokens.encode(message).finish() - }; - } -}; -function createBaseMsgLockTokensResponse(): MsgLockTokensResponse { - return { - ID: BigInt(0) - }; -} -export const MsgLockTokensResponse = { - typeUrl: "/osmosis.lockup.MsgLockTokensResponse", - aminoType: "osmosis/lockup/lock-tokens-response", - encode(message: MsgLockTokensResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ID !== BigInt(0)) { - writer.uint32(8).uint64(message.ID); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgLockTokensResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLockTokensResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ID = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgLockTokensResponse { - return { - ID: isSet(object.ID) ? BigInt(object.ID.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgLockTokensResponse): unknown { - const obj: any = {}; - message.ID !== undefined && (obj.ID = (message.ID || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgLockTokensResponse { - const message = createBaseMsgLockTokensResponse(); - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgLockTokensResponseSDKType): MsgLockTokensResponse { - return { - ID: object?.ID - }; - }, - toSDK(message: MsgLockTokensResponse): MsgLockTokensResponseSDKType { - const obj: any = {}; - obj.ID = message.ID; - return obj; - }, - fromAmino(object: MsgLockTokensResponseAmino): MsgLockTokensResponse { - return { - ID: BigInt(object.ID) - }; - }, - toAmino(message: MsgLockTokensResponse): MsgLockTokensResponseAmino { - const obj: any = {}; - obj.ID = message.ID ? message.ID.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgLockTokensResponseAminoMsg): MsgLockTokensResponse { - return MsgLockTokensResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgLockTokensResponse): MsgLockTokensResponseAminoMsg { - return { - type: "osmosis/lockup/lock-tokens-response", - value: MsgLockTokensResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgLockTokensResponseProtoMsg): MsgLockTokensResponse { - return MsgLockTokensResponse.decode(message.value); - }, - toProto(message: MsgLockTokensResponse): Uint8Array { - return MsgLockTokensResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgLockTokensResponse): MsgLockTokensResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgLockTokensResponse", - value: MsgLockTokensResponse.encode(message).finish() - }; - } -}; -function createBaseMsgBeginUnlockingAll(): MsgBeginUnlockingAll { - return { - owner: "" - }; -} -export const MsgBeginUnlockingAll = { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - aminoType: "osmosis/lockup/begin-unlock-tokens", - encode(message: MsgBeginUnlockingAll, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBeginUnlockingAll { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBeginUnlockingAll(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBeginUnlockingAll { - return { - owner: isSet(object.owner) ? String(object.owner) : "" - }; - }, - toJSON(message: MsgBeginUnlockingAll): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - return obj; - }, - fromPartial(object: DeepPartial): MsgBeginUnlockingAll { - const message = createBaseMsgBeginUnlockingAll(); - message.owner = object.owner ?? ""; - return message; - }, - fromSDK(object: MsgBeginUnlockingAllSDKType): MsgBeginUnlockingAll { - return { - owner: object?.owner - }; - }, - toSDK(message: MsgBeginUnlockingAll): MsgBeginUnlockingAllSDKType { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAmino(object: MsgBeginUnlockingAllAmino): MsgBeginUnlockingAll { - return { - owner: object.owner - }; - }, - toAmino(message: MsgBeginUnlockingAll): MsgBeginUnlockingAllAmino { - const obj: any = {}; - obj.owner = message.owner; - return obj; - }, - fromAminoMsg(object: MsgBeginUnlockingAllAminoMsg): MsgBeginUnlockingAll { - return MsgBeginUnlockingAll.fromAmino(object.value); - }, - toAminoMsg(message: MsgBeginUnlockingAll): MsgBeginUnlockingAllAminoMsg { - return { - type: "osmosis/lockup/begin-unlock-tokens", - value: MsgBeginUnlockingAll.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBeginUnlockingAllProtoMsg): MsgBeginUnlockingAll { - return MsgBeginUnlockingAll.decode(message.value); - }, - toProto(message: MsgBeginUnlockingAll): Uint8Array { - return MsgBeginUnlockingAll.encode(message).finish(); - }, - toProtoMsg(message: MsgBeginUnlockingAll): MsgBeginUnlockingAllProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAll", - value: MsgBeginUnlockingAll.encode(message).finish() - }; - } -}; -function createBaseMsgBeginUnlockingAllResponse(): MsgBeginUnlockingAllResponse { - return { - unlocks: [] - }; -} -export const MsgBeginUnlockingAllResponse = { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAllResponse", - aminoType: "osmosis/lockup/begin-unlocking-all-response", - encode(message: MsgBeginUnlockingAllResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.unlocks) { - PeriodLock.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBeginUnlockingAllResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBeginUnlockingAllResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unlocks.push(PeriodLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBeginUnlockingAllResponse { - return { - unlocks: Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => PeriodLock.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgBeginUnlockingAllResponse): unknown { - const obj: any = {}; - if (message.unlocks) { - obj.unlocks = message.unlocks.map(e => e ? PeriodLock.toJSON(e) : undefined); - } else { - obj.unlocks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgBeginUnlockingAllResponse { - const message = createBaseMsgBeginUnlockingAllResponse(); - message.unlocks = object.unlocks?.map(e => PeriodLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgBeginUnlockingAllResponseSDKType): MsgBeginUnlockingAllResponse { - return { - unlocks: Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => PeriodLock.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgBeginUnlockingAllResponse): MsgBeginUnlockingAllResponseSDKType { - const obj: any = {}; - if (message.unlocks) { - obj.unlocks = message.unlocks.map(e => e ? PeriodLock.toSDK(e) : undefined); - } else { - obj.unlocks = []; - } - return obj; - }, - fromAmino(object: MsgBeginUnlockingAllResponseAmino): MsgBeginUnlockingAllResponse { - return { - unlocks: Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => PeriodLock.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgBeginUnlockingAllResponse): MsgBeginUnlockingAllResponseAmino { - const obj: any = {}; - if (message.unlocks) { - obj.unlocks = message.unlocks.map(e => e ? PeriodLock.toAmino(e) : undefined); - } else { - obj.unlocks = []; - } - return obj; - }, - fromAminoMsg(object: MsgBeginUnlockingAllResponseAminoMsg): MsgBeginUnlockingAllResponse { - return MsgBeginUnlockingAllResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgBeginUnlockingAllResponse): MsgBeginUnlockingAllResponseAminoMsg { - return { - type: "osmosis/lockup/begin-unlocking-all-response", - value: MsgBeginUnlockingAllResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBeginUnlockingAllResponseProtoMsg): MsgBeginUnlockingAllResponse { - return MsgBeginUnlockingAllResponse.decode(message.value); - }, - toProto(message: MsgBeginUnlockingAllResponse): Uint8Array { - return MsgBeginUnlockingAllResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgBeginUnlockingAllResponse): MsgBeginUnlockingAllResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingAllResponse", - value: MsgBeginUnlockingAllResponse.encode(message).finish() - }; - } -}; -function createBaseMsgBeginUnlocking(): MsgBeginUnlocking { - return { - owner: "", - ID: BigInt(0), - coins: [] - }; -} -export const MsgBeginUnlocking = { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - aminoType: "osmosis/lockup/begin-unlock-period-lock", - encode(message: MsgBeginUnlocking, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.ID !== BigInt(0)) { - writer.uint32(16).uint64(message.ID); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBeginUnlocking { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBeginUnlocking(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.ID = reader.uint64(); - break; - case 3: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBeginUnlocking { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - ID: isSet(object.ID) ? BigInt(object.ID.toString()) : BigInt(0), - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgBeginUnlocking): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.ID !== undefined && (obj.ID = (message.ID || BigInt(0)).toString()); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgBeginUnlocking { - const message = createBaseMsgBeginUnlocking(); - message.owner = object.owner ?? ""; - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgBeginUnlockingSDKType): MsgBeginUnlocking { - return { - owner: object?.owner, - ID: object?.ID, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgBeginUnlocking): MsgBeginUnlockingSDKType { - const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: MsgBeginUnlockingAmino): MsgBeginUnlocking { - return { - owner: object.owner, - ID: BigInt(object.ID), - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgBeginUnlocking): MsgBeginUnlockingAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID ? message.ID.toString() : undefined; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: MsgBeginUnlockingAminoMsg): MsgBeginUnlocking { - return MsgBeginUnlocking.fromAmino(object.value); - }, - toAminoMsg(message: MsgBeginUnlocking): MsgBeginUnlockingAminoMsg { - return { - type: "osmosis/lockup/begin-unlock-period-lock", - value: MsgBeginUnlocking.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBeginUnlockingProtoMsg): MsgBeginUnlocking { - return MsgBeginUnlocking.decode(message.value); - }, - toProto(message: MsgBeginUnlocking): Uint8Array { - return MsgBeginUnlocking.encode(message).finish(); - }, - toProtoMsg(message: MsgBeginUnlocking): MsgBeginUnlockingProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlocking", - value: MsgBeginUnlocking.encode(message).finish() - }; - } -}; -function createBaseMsgBeginUnlockingResponse(): MsgBeginUnlockingResponse { - return { - success: false - }; -} -export const MsgBeginUnlockingResponse = { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingResponse", - aminoType: "osmosis/lockup/begin-unlocking-response", - encode(message: MsgBeginUnlockingResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.success === true) { - writer.uint32(8).bool(message.success); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBeginUnlockingResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBeginUnlockingResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBeginUnlockingResponse { - return { - success: isSet(object.success) ? Boolean(object.success) : false - }; - }, - toJSON(message: MsgBeginUnlockingResponse): unknown { - const obj: any = {}; - message.success !== undefined && (obj.success = message.success); - return obj; - }, - fromPartial(object: DeepPartial): MsgBeginUnlockingResponse { - const message = createBaseMsgBeginUnlockingResponse(); - message.success = object.success ?? false; - return message; - }, - fromSDK(object: MsgBeginUnlockingResponseSDKType): MsgBeginUnlockingResponse { - return { - success: object?.success - }; - }, - toSDK(message: MsgBeginUnlockingResponse): MsgBeginUnlockingResponseSDKType { - const obj: any = {}; - obj.success = message.success; - return obj; - }, - fromAmino(object: MsgBeginUnlockingResponseAmino): MsgBeginUnlockingResponse { - return { - success: object.success - }; - }, - toAmino(message: MsgBeginUnlockingResponse): MsgBeginUnlockingResponseAmino { - const obj: any = {}; - obj.success = message.success; - return obj; - }, - fromAminoMsg(object: MsgBeginUnlockingResponseAminoMsg): MsgBeginUnlockingResponse { - return MsgBeginUnlockingResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgBeginUnlockingResponse): MsgBeginUnlockingResponseAminoMsg { - return { - type: "osmosis/lockup/begin-unlocking-response", - value: MsgBeginUnlockingResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBeginUnlockingResponseProtoMsg): MsgBeginUnlockingResponse { - return MsgBeginUnlockingResponse.decode(message.value); - }, - toProto(message: MsgBeginUnlockingResponse): Uint8Array { - return MsgBeginUnlockingResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgBeginUnlockingResponse): MsgBeginUnlockingResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgBeginUnlockingResponse", - value: MsgBeginUnlockingResponse.encode(message).finish() - }; - } -}; -function createBaseMsgExtendLockup(): MsgExtendLockup { - return { - owner: "", - ID: BigInt(0), - duration: Duration.fromPartial({}) - }; -} -export const MsgExtendLockup = { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - aminoType: "osmosis/lockup/extend-lockup", - encode(message: MsgExtendLockup, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.ID !== BigInt(0)) { - writer.uint32(16).uint64(message.ID); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExtendLockup { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExtendLockup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.ID = reader.uint64(); - break; - case 3: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExtendLockup { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - ID: isSet(object.ID) ? BigInt(object.ID.toString()) : BigInt(0), - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: MsgExtendLockup): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.ID !== undefined && (obj.ID = (message.ID || BigInt(0)).toString()); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgExtendLockup { - const message = createBaseMsgExtendLockup(); - message.owner = object.owner ?? ""; - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: MsgExtendLockupSDKType): MsgExtendLockup { - return { - owner: object?.owner, - ID: object?.ID, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: MsgExtendLockup): MsgExtendLockupSDKType { - const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: MsgExtendLockupAmino): MsgExtendLockup { - return { - owner: object.owner, - ID: BigInt(object.ID), - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: MsgExtendLockup): MsgExtendLockupAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID ? message.ID.toString() : undefined; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: MsgExtendLockupAminoMsg): MsgExtendLockup { - return MsgExtendLockup.fromAmino(object.value); - }, - toAminoMsg(message: MsgExtendLockup): MsgExtendLockupAminoMsg { - return { - type: "osmosis/lockup/extend-lockup", - value: MsgExtendLockup.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExtendLockupProtoMsg): MsgExtendLockup { - return MsgExtendLockup.decode(message.value); - }, - toProto(message: MsgExtendLockup): Uint8Array { - return MsgExtendLockup.encode(message).finish(); - }, - toProtoMsg(message: MsgExtendLockup): MsgExtendLockupProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockup", - value: MsgExtendLockup.encode(message).finish() - }; - } -}; -function createBaseMsgExtendLockupResponse(): MsgExtendLockupResponse { - return { - success: false - }; -} -export const MsgExtendLockupResponse = { - typeUrl: "/osmosis.lockup.MsgExtendLockupResponse", - aminoType: "osmosis/lockup/extend-lockup-response", - encode(message: MsgExtendLockupResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.success === true) { - writer.uint32(8).bool(message.success); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgExtendLockupResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExtendLockupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgExtendLockupResponse { - return { - success: isSet(object.success) ? Boolean(object.success) : false - }; - }, - toJSON(message: MsgExtendLockupResponse): unknown { - const obj: any = {}; - message.success !== undefined && (obj.success = message.success); - return obj; - }, - fromPartial(object: DeepPartial): MsgExtendLockupResponse { - const message = createBaseMsgExtendLockupResponse(); - message.success = object.success ?? false; - return message; - }, - fromSDK(object: MsgExtendLockupResponseSDKType): MsgExtendLockupResponse { - return { - success: object?.success - }; - }, - toSDK(message: MsgExtendLockupResponse): MsgExtendLockupResponseSDKType { - const obj: any = {}; - obj.success = message.success; - return obj; - }, - fromAmino(object: MsgExtendLockupResponseAmino): MsgExtendLockupResponse { - return { - success: object.success - }; - }, - toAmino(message: MsgExtendLockupResponse): MsgExtendLockupResponseAmino { - const obj: any = {}; - obj.success = message.success; - return obj; - }, - fromAminoMsg(object: MsgExtendLockupResponseAminoMsg): MsgExtendLockupResponse { - return MsgExtendLockupResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgExtendLockupResponse): MsgExtendLockupResponseAminoMsg { - return { - type: "osmosis/lockup/extend-lockup-response", - value: MsgExtendLockupResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgExtendLockupResponseProtoMsg): MsgExtendLockupResponse { - return MsgExtendLockupResponse.decode(message.value); - }, - toProto(message: MsgExtendLockupResponse): Uint8Array { - return MsgExtendLockupResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgExtendLockupResponse): MsgExtendLockupResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgExtendLockupResponse", - value: MsgExtendLockupResponse.encode(message).finish() - }; - } -}; -function createBaseMsgForceUnlock(): MsgForceUnlock { - return { - owner: "", - ID: BigInt(0), - coins: [] - }; -} -export const MsgForceUnlock = { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - aminoType: "osmosis/lockup/force-unlock", - encode(message: MsgForceUnlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.ID !== BigInt(0)) { - writer.uint32(16).uint64(message.ID); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgForceUnlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgForceUnlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.ID = reader.uint64(); - break; - case 3: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgForceUnlock { - return { - owner: isSet(object.owner) ? String(object.owner) : "", - ID: isSet(object.ID) ? BigInt(object.ID.toString()) : BigInt(0), - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: MsgForceUnlock): unknown { - const obj: any = {}; - message.owner !== undefined && (obj.owner = message.owner); - message.ID !== undefined && (obj.ID = (message.ID || BigInt(0)).toString()); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgForceUnlock { - const message = createBaseMsgForceUnlock(); - message.owner = object.owner ?? ""; - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: MsgForceUnlockSDKType): MsgForceUnlock { - return { - owner: object?.owner, - ID: object?.ID, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: MsgForceUnlock): MsgForceUnlockSDKType { - const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAmino(object: MsgForceUnlockAmino): MsgForceUnlock { - return { - owner: object.owner, - ID: BigInt(object.ID), - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: MsgForceUnlock): MsgForceUnlockAmino { - const obj: any = {}; - obj.owner = message.owner; - obj.ID = message.ID ? message.ID.toString() : undefined; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - return obj; - }, - fromAminoMsg(object: MsgForceUnlockAminoMsg): MsgForceUnlock { - return MsgForceUnlock.fromAmino(object.value); - }, - toAminoMsg(message: MsgForceUnlock): MsgForceUnlockAminoMsg { - return { - type: "osmosis/lockup/force-unlock", - value: MsgForceUnlock.toAmino(message) - }; - }, - fromProtoMsg(message: MsgForceUnlockProtoMsg): MsgForceUnlock { - return MsgForceUnlock.decode(message.value); - }, - toProto(message: MsgForceUnlock): Uint8Array { - return MsgForceUnlock.encode(message).finish(); - }, - toProtoMsg(message: MsgForceUnlock): MsgForceUnlockProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlock", - value: MsgForceUnlock.encode(message).finish() - }; - } -}; -function createBaseMsgForceUnlockResponse(): MsgForceUnlockResponse { - return { - success: false - }; -} -export const MsgForceUnlockResponse = { - typeUrl: "/osmosis.lockup.MsgForceUnlockResponse", - aminoType: "osmosis/lockup/force-unlock-response", - encode(message: MsgForceUnlockResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.success === true) { - writer.uint32(8).bool(message.success); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgForceUnlockResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgForceUnlockResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgForceUnlockResponse { - return { - success: isSet(object.success) ? Boolean(object.success) : false - }; - }, - toJSON(message: MsgForceUnlockResponse): unknown { - const obj: any = {}; - message.success !== undefined && (obj.success = message.success); - return obj; - }, - fromPartial(object: DeepPartial): MsgForceUnlockResponse { - const message = createBaseMsgForceUnlockResponse(); - message.success = object.success ?? false; - return message; - }, - fromSDK(object: MsgForceUnlockResponseSDKType): MsgForceUnlockResponse { - return { - success: object?.success - }; - }, - toSDK(message: MsgForceUnlockResponse): MsgForceUnlockResponseSDKType { - const obj: any = {}; - obj.success = message.success; - return obj; - }, - fromAmino(object: MsgForceUnlockResponseAmino): MsgForceUnlockResponse { - return { - success: object.success - }; - }, - toAmino(message: MsgForceUnlockResponse): MsgForceUnlockResponseAmino { - const obj: any = {}; - obj.success = message.success; - return obj; - }, - fromAminoMsg(object: MsgForceUnlockResponseAminoMsg): MsgForceUnlockResponse { - return MsgForceUnlockResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgForceUnlockResponse): MsgForceUnlockResponseAminoMsg { - return { - type: "osmosis/lockup/force-unlock-response", - value: MsgForceUnlockResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgForceUnlockResponseProtoMsg): MsgForceUnlockResponse { - return MsgForceUnlockResponse.decode(message.value); - }, - toProto(message: MsgForceUnlockResponse): Uint8Array { - return MsgForceUnlockResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgForceUnlockResponse): MsgForceUnlockResponseProtoMsg { - return { - typeUrl: "/osmosis.lockup.MsgForceUnlockResponse", - value: MsgForceUnlockResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/genesis.ts deleted file mode 100644 index 9ebd5901..00000000 --- a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/genesis.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { Minter, MinterAmino, MinterSDKType, Params, ParamsAmino, ParamsSDKType } from "./mint"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisState { - /** minter is an abstraction for holding current rewards information. */ - minter: Minter | undefined; - /** params defines all the paramaters of the mint module. */ - params: Params | undefined; - /** - * reduction_started_epoch is the first epoch in which the reduction of mint - * begins. - */ - reductionStartedEpoch: bigint; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisStateAmino { - /** minter is an abstraction for holding current rewards information. */ - minter?: MinterAmino | undefined; - /** params defines all the paramaters of the mint module. */ - params?: ParamsAmino | undefined; - /** - * reduction_started_epoch is the first epoch in which the reduction of mint - * begins. - */ - reduction_started_epoch: string; -} -export interface GenesisStateAminoMsg { - type: "osmosis/mint/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the mint module's genesis state. */ -export interface GenesisStateSDKType { - minter: MinterSDKType | undefined; - params: ParamsSDKType | undefined; - reduction_started_epoch: bigint; -} -function createBaseGenesisState(): GenesisState { - return { - minter: Minter.fromPartial({}), - params: Params.fromPartial({}), - reductionStartedEpoch: BigInt(0) - }; -} -export const GenesisState = { - typeUrl: "/osmosis.mint.v1beta1.GenesisState", - aminoType: "osmosis/mint/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.minter !== undefined) { - Minter.encode(message.minter, writer.uint32(10).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(18).fork()).ldelim(); - } - if (message.reductionStartedEpoch !== BigInt(0)) { - writer.uint32(24).int64(message.reductionStartedEpoch); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minter = Minter.decode(reader, reader.uint32()); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - case 3: - message.reductionStartedEpoch = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - minter: isSet(object.minter) ? Minter.fromJSON(object.minter) : undefined, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - reductionStartedEpoch: isSet(object.reductionStartedEpoch) ? BigInt(object.reductionStartedEpoch.toString()) : BigInt(0) - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.minter !== undefined && (obj.minter = message.minter ? Minter.toJSON(message.minter) : undefined); - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - message.reductionStartedEpoch !== undefined && (obj.reductionStartedEpoch = (message.reductionStartedEpoch || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.minter = object.minter !== undefined && object.minter !== null ? Minter.fromPartial(object.minter) : undefined; - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.reductionStartedEpoch = object.reductionStartedEpoch !== undefined && object.reductionStartedEpoch !== null ? BigInt(object.reductionStartedEpoch.toString()) : BigInt(0); - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - minter: object.minter ? Minter.fromSDK(object.minter) : undefined, - params: object.params ? Params.fromSDK(object.params) : undefined, - reductionStartedEpoch: object?.reduction_started_epoch - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.minter !== undefined && (obj.minter = message.minter ? Minter.toSDK(message.minter) : undefined); - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - obj.reduction_started_epoch = message.reductionStartedEpoch; - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - minter: object?.minter ? Minter.fromAmino(object.minter) : undefined, - params: object?.params ? Params.fromAmino(object.params) : undefined, - reductionStartedEpoch: BigInt(object.reduction_started_epoch) - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.minter = message.minter ? Minter.toAmino(message.minter) : undefined; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - obj.reduction_started_epoch = message.reductionStartedEpoch ? message.reductionStartedEpoch.toString() : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/mint/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/mint.ts b/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/mint.ts deleted file mode 100644 index 98ede5ee..00000000 --- a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/mint.ts +++ /dev/null @@ -1,744 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { Decimal } from "@cosmjs/math"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Minter represents the minting state. */ -export interface Minter { - /** epoch_provisions represent rewards for the current epoch. */ - epochProvisions: string; -} -export interface MinterProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.Minter"; - value: Uint8Array; -} -/** Minter represents the minting state. */ -export interface MinterAmino { - /** epoch_provisions represent rewards for the current epoch. */ - epoch_provisions: string; -} -export interface MinterAminoMsg { - type: "osmosis/mint/minter"; - value: MinterAmino; -} -/** Minter represents the minting state. */ -export interface MinterSDKType { - epoch_provisions: string; -} -/** - * WeightedAddress represents an address with a weight assigned to it. - * The weight is used to determine the proportion of the total minted - * tokens to be minted to the address. - */ -export interface WeightedAddress { - address: string; - weight: string; -} -export interface WeightedAddressProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.WeightedAddress"; - value: Uint8Array; -} -/** - * WeightedAddress represents an address with a weight assigned to it. - * The weight is used to determine the proportion of the total minted - * tokens to be minted to the address. - */ -export interface WeightedAddressAmino { - address: string; - weight: string; -} -export interface WeightedAddressAminoMsg { - type: "osmosis/mint/weighted-address"; - value: WeightedAddressAmino; -} -/** - * WeightedAddress represents an address with a weight assigned to it. - * The weight is used to determine the proportion of the total minted - * tokens to be minted to the address. - */ -export interface WeightedAddressSDKType { - address: string; - weight: string; -} -/** - * DistributionProportions defines the distribution proportions of the minted - * denom. In other words, defines which stakeholders will receive the minted - * denoms and how much. - */ -export interface DistributionProportions { - /** - * staking defines the proportion of the minted mint_denom that is to be - * allocated as staking rewards. - */ - staking: string; - /** - * pool_incentives defines the proportion of the minted mint_denom that is - * to be allocated as pool incentives. - */ - poolIncentives: string; - /** - * developer_rewards defines the proportion of the minted mint_denom that is - * to be allocated to developer rewards address. - */ - developerRewards: string; - /** - * community_pool defines the proportion of the minted mint_denom that is - * to be allocated to the community pool. - */ - communityPool: string; -} -export interface DistributionProportionsProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.DistributionProportions"; - value: Uint8Array; -} -/** - * DistributionProportions defines the distribution proportions of the minted - * denom. In other words, defines which stakeholders will receive the minted - * denoms and how much. - */ -export interface DistributionProportionsAmino { - /** - * staking defines the proportion of the minted mint_denom that is to be - * allocated as staking rewards. - */ - staking: string; - /** - * pool_incentives defines the proportion of the minted mint_denom that is - * to be allocated as pool incentives. - */ - pool_incentives: string; - /** - * developer_rewards defines the proportion of the minted mint_denom that is - * to be allocated to developer rewards address. - */ - developer_rewards: string; - /** - * community_pool defines the proportion of the minted mint_denom that is - * to be allocated to the community pool. - */ - community_pool: string; -} -export interface DistributionProportionsAminoMsg { - type: "osmosis/mint/distribution-proportions"; - value: DistributionProportionsAmino; -} -/** - * DistributionProportions defines the distribution proportions of the minted - * denom. In other words, defines which stakeholders will receive the minted - * denoms and how much. - */ -export interface DistributionProportionsSDKType { - staking: string; - pool_incentives: string; - developer_rewards: string; - community_pool: string; -} -/** Params holds parameters for the x/mint module. */ -export interface Params { - /** mint_denom is the denom of the coin to mint. */ - mintDenom: string; - /** genesis_epoch_provisions epoch provisions from the first epoch. */ - genesisEpochProvisions: string; - /** epoch_identifier mint epoch identifier e.g. (day, week). */ - epochIdentifier: string; - /** - * reduction_period_in_epochs the number of epochs it takes - * to reduce the rewards. - */ - reductionPeriodInEpochs: bigint; - /** - * reduction_factor is the reduction multiplier to execute - * at the end of each period set by reduction_period_in_epochs. - */ - reductionFactor: string; - /** - * distribution_proportions defines the distribution proportions of the minted - * denom. In other words, defines which stakeholders will receive the minted - * denoms and how much. - */ - distributionProportions: DistributionProportions | undefined; - /** - * weighted_developer_rewards_receivers is the address to receive developer - * rewards with weights assignedt to each address. The final amount that each - * address receives is: epoch_provisions * - * distribution_proportions.developer_rewards * Address's Weight. - */ - weightedDeveloperRewardsReceivers: WeightedAddress[]; - /** - * minting_rewards_distribution_start_epoch start epoch to distribute minting - * rewards - */ - mintingRewardsDistributionStartEpoch: bigint; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.Params"; - value: Uint8Array; -} -/** Params holds parameters for the x/mint module. */ -export interface ParamsAmino { - /** mint_denom is the denom of the coin to mint. */ - mint_denom: string; - /** genesis_epoch_provisions epoch provisions from the first epoch. */ - genesis_epoch_provisions: string; - /** epoch_identifier mint epoch identifier e.g. (day, week). */ - epoch_identifier: string; - /** - * reduction_period_in_epochs the number of epochs it takes - * to reduce the rewards. - */ - reduction_period_in_epochs: string; - /** - * reduction_factor is the reduction multiplier to execute - * at the end of each period set by reduction_period_in_epochs. - */ - reduction_factor: string; - /** - * distribution_proportions defines the distribution proportions of the minted - * denom. In other words, defines which stakeholders will receive the minted - * denoms and how much. - */ - distribution_proportions?: DistributionProportionsAmino | undefined; - /** - * weighted_developer_rewards_receivers is the address to receive developer - * rewards with weights assignedt to each address. The final amount that each - * address receives is: epoch_provisions * - * distribution_proportions.developer_rewards * Address's Weight. - */ - weighted_developer_rewards_receivers: WeightedAddressAmino[]; - /** - * minting_rewards_distribution_start_epoch start epoch to distribute minting - * rewards - */ - minting_rewards_distribution_start_epoch: string; -} -export interface ParamsAminoMsg { - type: "osmosis/mint/params"; - value: ParamsAmino; -} -/** Params holds parameters for the x/mint module. */ -export interface ParamsSDKType { - mint_denom: string; - genesis_epoch_provisions: string; - epoch_identifier: string; - reduction_period_in_epochs: bigint; - reduction_factor: string; - distribution_proportions: DistributionProportionsSDKType | undefined; - weighted_developer_rewards_receivers: WeightedAddressSDKType[]; - minting_rewards_distribution_start_epoch: bigint; -} -function createBaseMinter(): Minter { - return { - epochProvisions: "" - }; -} -export const Minter = { - typeUrl: "/osmosis.mint.v1beta1.Minter", - aminoType: "osmosis/mint/minter", - encode(message: Minter, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.epochProvisions !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.epochProvisions, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Minter { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMinter(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epochProvisions = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Minter { - return { - epochProvisions: isSet(object.epochProvisions) ? String(object.epochProvisions) : "" - }; - }, - toJSON(message: Minter): unknown { - const obj: any = {}; - message.epochProvisions !== undefined && (obj.epochProvisions = message.epochProvisions); - return obj; - }, - fromPartial(object: DeepPartial): Minter { - const message = createBaseMinter(); - message.epochProvisions = object.epochProvisions ?? ""; - return message; - }, - fromSDK(object: MinterSDKType): Minter { - return { - epochProvisions: object?.epoch_provisions - }; - }, - toSDK(message: Minter): MinterSDKType { - const obj: any = {}; - obj.epoch_provisions = message.epochProvisions; - return obj; - }, - fromAmino(object: MinterAmino): Minter { - return { - epochProvisions: object.epoch_provisions - }; - }, - toAmino(message: Minter): MinterAmino { - const obj: any = {}; - obj.epoch_provisions = message.epochProvisions; - return obj; - }, - fromAminoMsg(object: MinterAminoMsg): Minter { - return Minter.fromAmino(object.value); - }, - toAminoMsg(message: Minter): MinterAminoMsg { - return { - type: "osmosis/mint/minter", - value: Minter.toAmino(message) - }; - }, - fromProtoMsg(message: MinterProtoMsg): Minter { - return Minter.decode(message.value); - }, - toProto(message: Minter): Uint8Array { - return Minter.encode(message).finish(); - }, - toProtoMsg(message: Minter): MinterProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.Minter", - value: Minter.encode(message).finish() - }; - } -}; -function createBaseWeightedAddress(): WeightedAddress { - return { - address: "", - weight: "" - }; -} -export const WeightedAddress = { - typeUrl: "/osmosis.mint.v1beta1.WeightedAddress", - aminoType: "osmosis/mint/weighted-address", - encode(message: WeightedAddress, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.weight !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.weight, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): WeightedAddress { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWeightedAddress(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.weight = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): WeightedAddress { - return { - address: isSet(object.address) ? String(object.address) : "", - weight: isSet(object.weight) ? String(object.weight) : "" - }; - }, - toJSON(message: WeightedAddress): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - fromPartial(object: DeepPartial): WeightedAddress { - const message = createBaseWeightedAddress(); - message.address = object.address ?? ""; - message.weight = object.weight ?? ""; - return message; - }, - fromSDK(object: WeightedAddressSDKType): WeightedAddress { - return { - address: object?.address, - weight: object?.weight - }; - }, - toSDK(message: WeightedAddress): WeightedAddressSDKType { - const obj: any = {}; - obj.address = message.address; - obj.weight = message.weight; - return obj; - }, - fromAmino(object: WeightedAddressAmino): WeightedAddress { - return { - address: object.address, - weight: object.weight - }; - }, - toAmino(message: WeightedAddress): WeightedAddressAmino { - const obj: any = {}; - obj.address = message.address; - obj.weight = message.weight; - return obj; - }, - fromAminoMsg(object: WeightedAddressAminoMsg): WeightedAddress { - return WeightedAddress.fromAmino(object.value); - }, - toAminoMsg(message: WeightedAddress): WeightedAddressAminoMsg { - return { - type: "osmosis/mint/weighted-address", - value: WeightedAddress.toAmino(message) - }; - }, - fromProtoMsg(message: WeightedAddressProtoMsg): WeightedAddress { - return WeightedAddress.decode(message.value); - }, - toProto(message: WeightedAddress): Uint8Array { - return WeightedAddress.encode(message).finish(); - }, - toProtoMsg(message: WeightedAddress): WeightedAddressProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.WeightedAddress", - value: WeightedAddress.encode(message).finish() - }; - } -}; -function createBaseDistributionProportions(): DistributionProportions { - return { - staking: "", - poolIncentives: "", - developerRewards: "", - communityPool: "" - }; -} -export const DistributionProportions = { - typeUrl: "/osmosis.mint.v1beta1.DistributionProportions", - aminoType: "osmosis/mint/distribution-proportions", - encode(message: DistributionProportions, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.staking !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.staking, 18).atomics); - } - if (message.poolIncentives !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.poolIncentives, 18).atomics); - } - if (message.developerRewards !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.developerRewards, 18).atomics); - } - if (message.communityPool !== "") { - writer.uint32(34).string(Decimal.fromUserInput(message.communityPool, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DistributionProportions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDistributionProportions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.staking = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 2: - message.poolIncentives = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.developerRewards = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 4: - message.communityPool = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DistributionProportions { - return { - staking: isSet(object.staking) ? String(object.staking) : "", - poolIncentives: isSet(object.poolIncentives) ? String(object.poolIncentives) : "", - developerRewards: isSet(object.developerRewards) ? String(object.developerRewards) : "", - communityPool: isSet(object.communityPool) ? String(object.communityPool) : "" - }; - }, - toJSON(message: DistributionProportions): unknown { - const obj: any = {}; - message.staking !== undefined && (obj.staking = message.staking); - message.poolIncentives !== undefined && (obj.poolIncentives = message.poolIncentives); - message.developerRewards !== undefined && (obj.developerRewards = message.developerRewards); - message.communityPool !== undefined && (obj.communityPool = message.communityPool); - return obj; - }, - fromPartial(object: DeepPartial): DistributionProportions { - const message = createBaseDistributionProportions(); - message.staking = object.staking ?? ""; - message.poolIncentives = object.poolIncentives ?? ""; - message.developerRewards = object.developerRewards ?? ""; - message.communityPool = object.communityPool ?? ""; - return message; - }, - fromSDK(object: DistributionProportionsSDKType): DistributionProportions { - return { - staking: object?.staking, - poolIncentives: object?.pool_incentives, - developerRewards: object?.developer_rewards, - communityPool: object?.community_pool - }; - }, - toSDK(message: DistributionProportions): DistributionProportionsSDKType { - const obj: any = {}; - obj.staking = message.staking; - obj.pool_incentives = message.poolIncentives; - obj.developer_rewards = message.developerRewards; - obj.community_pool = message.communityPool; - return obj; - }, - fromAmino(object: DistributionProportionsAmino): DistributionProportions { - return { - staking: object.staking, - poolIncentives: object.pool_incentives, - developerRewards: object.developer_rewards, - communityPool: object.community_pool - }; - }, - toAmino(message: DistributionProportions): DistributionProportionsAmino { - const obj: any = {}; - obj.staking = message.staking; - obj.pool_incentives = message.poolIncentives; - obj.developer_rewards = message.developerRewards; - obj.community_pool = message.communityPool; - return obj; - }, - fromAminoMsg(object: DistributionProportionsAminoMsg): DistributionProportions { - return DistributionProportions.fromAmino(object.value); - }, - toAminoMsg(message: DistributionProportions): DistributionProportionsAminoMsg { - return { - type: "osmosis/mint/distribution-proportions", - value: DistributionProportions.toAmino(message) - }; - }, - fromProtoMsg(message: DistributionProportionsProtoMsg): DistributionProportions { - return DistributionProportions.decode(message.value); - }, - toProto(message: DistributionProportions): Uint8Array { - return DistributionProportions.encode(message).finish(); - }, - toProtoMsg(message: DistributionProportions): DistributionProportionsProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.DistributionProportions", - value: DistributionProportions.encode(message).finish() - }; - } -}; -function createBaseParams(): Params { - return { - mintDenom: "", - genesisEpochProvisions: "", - epochIdentifier: "", - reductionPeriodInEpochs: BigInt(0), - reductionFactor: "", - distributionProportions: DistributionProportions.fromPartial({}), - weightedDeveloperRewardsReceivers: [], - mintingRewardsDistributionStartEpoch: BigInt(0) - }; -} -export const Params = { - typeUrl: "/osmosis.mint.v1beta1.Params", - aminoType: "osmosis/mint/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.mintDenom !== "") { - writer.uint32(10).string(message.mintDenom); - } - if (message.genesisEpochProvisions !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.genesisEpochProvisions, 18).atomics); - } - if (message.epochIdentifier !== "") { - writer.uint32(26).string(message.epochIdentifier); - } - if (message.reductionPeriodInEpochs !== BigInt(0)) { - writer.uint32(32).int64(message.reductionPeriodInEpochs); - } - if (message.reductionFactor !== "") { - writer.uint32(42).string(Decimal.fromUserInput(message.reductionFactor, 18).atomics); - } - if (message.distributionProportions !== undefined) { - DistributionProportions.encode(message.distributionProportions, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.weightedDeveloperRewardsReceivers) { - WeightedAddress.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.mintingRewardsDistributionStartEpoch !== BigInt(0)) { - writer.uint32(64).int64(message.mintingRewardsDistributionStartEpoch); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mintDenom = reader.string(); - break; - case 2: - message.genesisEpochProvisions = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 3: - message.epochIdentifier = reader.string(); - break; - case 4: - message.reductionPeriodInEpochs = reader.int64(); - break; - case 5: - message.reductionFactor = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 6: - message.distributionProportions = DistributionProportions.decode(reader, reader.uint32()); - break; - case 7: - message.weightedDeveloperRewardsReceivers.push(WeightedAddress.decode(reader, reader.uint32())); - break; - case 8: - message.mintingRewardsDistributionStartEpoch = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - mintDenom: isSet(object.mintDenom) ? String(object.mintDenom) : "", - genesisEpochProvisions: isSet(object.genesisEpochProvisions) ? String(object.genesisEpochProvisions) : "", - epochIdentifier: isSet(object.epochIdentifier) ? String(object.epochIdentifier) : "", - reductionPeriodInEpochs: isSet(object.reductionPeriodInEpochs) ? BigInt(object.reductionPeriodInEpochs.toString()) : BigInt(0), - reductionFactor: isSet(object.reductionFactor) ? String(object.reductionFactor) : "", - distributionProportions: isSet(object.distributionProportions) ? DistributionProportions.fromJSON(object.distributionProportions) : undefined, - weightedDeveloperRewardsReceivers: Array.isArray(object?.weightedDeveloperRewardsReceivers) ? object.weightedDeveloperRewardsReceivers.map((e: any) => WeightedAddress.fromJSON(e)) : [], - mintingRewardsDistributionStartEpoch: isSet(object.mintingRewardsDistributionStartEpoch) ? BigInt(object.mintingRewardsDistributionStartEpoch.toString()) : BigInt(0) - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.mintDenom !== undefined && (obj.mintDenom = message.mintDenom); - message.genesisEpochProvisions !== undefined && (obj.genesisEpochProvisions = message.genesisEpochProvisions); - message.epochIdentifier !== undefined && (obj.epochIdentifier = message.epochIdentifier); - message.reductionPeriodInEpochs !== undefined && (obj.reductionPeriodInEpochs = (message.reductionPeriodInEpochs || BigInt(0)).toString()); - message.reductionFactor !== undefined && (obj.reductionFactor = message.reductionFactor); - message.distributionProportions !== undefined && (obj.distributionProportions = message.distributionProportions ? DistributionProportions.toJSON(message.distributionProportions) : undefined); - if (message.weightedDeveloperRewardsReceivers) { - obj.weightedDeveloperRewardsReceivers = message.weightedDeveloperRewardsReceivers.map(e => e ? WeightedAddress.toJSON(e) : undefined); - } else { - obj.weightedDeveloperRewardsReceivers = []; - } - message.mintingRewardsDistributionStartEpoch !== undefined && (obj.mintingRewardsDistributionStartEpoch = (message.mintingRewardsDistributionStartEpoch || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.mintDenom = object.mintDenom ?? ""; - message.genesisEpochProvisions = object.genesisEpochProvisions ?? ""; - message.epochIdentifier = object.epochIdentifier ?? ""; - message.reductionPeriodInEpochs = object.reductionPeriodInEpochs !== undefined && object.reductionPeriodInEpochs !== null ? BigInt(object.reductionPeriodInEpochs.toString()) : BigInt(0); - message.reductionFactor = object.reductionFactor ?? ""; - message.distributionProportions = object.distributionProportions !== undefined && object.distributionProportions !== null ? DistributionProportions.fromPartial(object.distributionProportions) : undefined; - message.weightedDeveloperRewardsReceivers = object.weightedDeveloperRewardsReceivers?.map(e => WeightedAddress.fromPartial(e)) || []; - message.mintingRewardsDistributionStartEpoch = object.mintingRewardsDistributionStartEpoch !== undefined && object.mintingRewardsDistributionStartEpoch !== null ? BigInt(object.mintingRewardsDistributionStartEpoch.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - mintDenom: object?.mint_denom, - genesisEpochProvisions: object?.genesis_epoch_provisions, - epochIdentifier: object?.epoch_identifier, - reductionPeriodInEpochs: object?.reduction_period_in_epochs, - reductionFactor: object?.reduction_factor, - distributionProportions: object.distribution_proportions ? DistributionProportions.fromSDK(object.distribution_proportions) : undefined, - weightedDeveloperRewardsReceivers: Array.isArray(object?.weighted_developer_rewards_receivers) ? object.weighted_developer_rewards_receivers.map((e: any) => WeightedAddress.fromSDK(e)) : [], - mintingRewardsDistributionStartEpoch: object?.minting_rewards_distribution_start_epoch - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.mint_denom = message.mintDenom; - obj.genesis_epoch_provisions = message.genesisEpochProvisions; - obj.epoch_identifier = message.epochIdentifier; - obj.reduction_period_in_epochs = message.reductionPeriodInEpochs; - obj.reduction_factor = message.reductionFactor; - message.distributionProportions !== undefined && (obj.distribution_proportions = message.distributionProportions ? DistributionProportions.toSDK(message.distributionProportions) : undefined); - if (message.weightedDeveloperRewardsReceivers) { - obj.weighted_developer_rewards_receivers = message.weightedDeveloperRewardsReceivers.map(e => e ? WeightedAddress.toSDK(e) : undefined); - } else { - obj.weighted_developer_rewards_receivers = []; - } - obj.minting_rewards_distribution_start_epoch = message.mintingRewardsDistributionStartEpoch; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - mintDenom: object.mint_denom, - genesisEpochProvisions: object.genesis_epoch_provisions, - epochIdentifier: object.epoch_identifier, - reductionPeriodInEpochs: BigInt(object.reduction_period_in_epochs), - reductionFactor: object.reduction_factor, - distributionProportions: object?.distribution_proportions ? DistributionProportions.fromAmino(object.distribution_proportions) : undefined, - weightedDeveloperRewardsReceivers: Array.isArray(object?.weighted_developer_rewards_receivers) ? object.weighted_developer_rewards_receivers.map((e: any) => WeightedAddress.fromAmino(e)) : [], - mintingRewardsDistributionStartEpoch: BigInt(object.minting_rewards_distribution_start_epoch) - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.mint_denom = message.mintDenom; - obj.genesis_epoch_provisions = message.genesisEpochProvisions; - obj.epoch_identifier = message.epochIdentifier; - obj.reduction_period_in_epochs = message.reductionPeriodInEpochs ? message.reductionPeriodInEpochs.toString() : undefined; - obj.reduction_factor = message.reductionFactor; - obj.distribution_proportions = message.distributionProportions ? DistributionProportions.toAmino(message.distributionProportions) : undefined; - if (message.weightedDeveloperRewardsReceivers) { - obj.weighted_developer_rewards_receivers = message.weightedDeveloperRewardsReceivers.map(e => e ? WeightedAddress.toAmino(e) : undefined); - } else { - obj.weighted_developer_rewards_receivers = []; - } - obj.minting_rewards_distribution_start_epoch = message.mintingRewardsDistributionStartEpoch ? message.mintingRewardsDistributionStartEpoch.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/mint/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/query.rpc.Query.ts deleted file mode 100644 index f583b79a..00000000 --- a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, QueryEpochProvisionsRequest, QueryEpochProvisionsResponse } from "./query"; -/** Query provides defines the gRPC querier service. */ -export interface Query { - /** Params returns the total set of minting parameters. */ - params(request?: QueryParamsRequest): Promise; - /** EpochProvisions returns the current minting epoch provisions value. */ - epochProvisions(request?: QueryEpochProvisionsRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.epochProvisions = this.epochProvisions.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.mint.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - epochProvisions(request: QueryEpochProvisionsRequest = {}): Promise { - const data = QueryEpochProvisionsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.mint.v1beta1.Query", "EpochProvisions", data); - return promise.then(data => QueryEpochProvisionsResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - epochProvisions(request?: QueryEpochProvisionsRequest): Promise { - return queryService.epochProvisions(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseEpochProvisionsQuery extends ReactQueryParams { - request?: QueryEpochProvisionsRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useEpochProvisions = ({ - request, - options - }: UseEpochProvisionsQuery) => { - return useQuery(["epochProvisionsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.epochProvisions(request); - }, options); - }; - return { - /** Params returns the total set of minting parameters. */useParams, - /** EpochProvisions returns the current minting epoch provisions value. */useEpochProvisions - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryEpochProvisionsStore { - store = new QueryStore(queryService?.epochProvisions); - epochProvisions(request: QueryEpochProvisionsRequest) { - return this.store.getData(request); - } - } - return { - /** Params returns the total set of minting parameters. */QueryParamsStore, - /** EpochProvisions returns the current minting epoch provisions value. */QueryEpochProvisionsStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/query.ts deleted file mode 100644 index ce5f8b09..00000000 --- a/examples/interchainjs/src/codegen/osmosis/mint/v1beta1/query.ts +++ /dev/null @@ -1,409 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./mint"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/mint/query-params-request"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/mint/query-params-response"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** - * QueryEpochProvisionsRequest is the request type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsRequest {} -export interface QueryEpochProvisionsRequestProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.QueryEpochProvisionsRequest"; - value: Uint8Array; -} -/** - * QueryEpochProvisionsRequest is the request type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsRequestAmino {} -export interface QueryEpochProvisionsRequestAminoMsg { - type: "osmosis/mint/query-epoch-provisions-request"; - value: QueryEpochProvisionsRequestAmino; -} -/** - * QueryEpochProvisionsRequest is the request type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsRequestSDKType {} -/** - * QueryEpochProvisionsResponse is the response type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsResponse { - /** epoch_provisions is the current minting per epoch provisions value. */ - epochProvisions: Uint8Array; -} -export interface QueryEpochProvisionsResponseProtoMsg { - typeUrl: "/osmosis.mint.v1beta1.QueryEpochProvisionsResponse"; - value: Uint8Array; -} -/** - * QueryEpochProvisionsResponse is the response type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsResponseAmino { - /** epoch_provisions is the current minting per epoch provisions value. */ - epoch_provisions: Uint8Array; -} -export interface QueryEpochProvisionsResponseAminoMsg { - type: "osmosis/mint/query-epoch-provisions-response"; - value: QueryEpochProvisionsResponseAmino; -} -/** - * QueryEpochProvisionsResponse is the response type for the - * Query/EpochProvisions RPC method. - */ -export interface QueryEpochProvisionsResponseSDKType { - epoch_provisions: Uint8Array; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.mint.v1beta1.QueryParamsRequest", - aminoType: "osmosis/mint/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/mint/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.mint.v1beta1.QueryParamsResponse", - aminoType: "osmosis/mint/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/mint/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryEpochProvisionsRequest(): QueryEpochProvisionsRequest { - return {}; -} -export const QueryEpochProvisionsRequest = { - typeUrl: "/osmosis.mint.v1beta1.QueryEpochProvisionsRequest", - aminoType: "osmosis/mint/query-epoch-provisions-request", - encode(_: QueryEpochProvisionsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryEpochProvisionsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryEpochProvisionsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryEpochProvisionsRequest { - return {}; - }, - toJSON(_: QueryEpochProvisionsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryEpochProvisionsRequest { - const message = createBaseQueryEpochProvisionsRequest(); - return message; - }, - fromSDK(_: QueryEpochProvisionsRequestSDKType): QueryEpochProvisionsRequest { - return {}; - }, - toSDK(_: QueryEpochProvisionsRequest): QueryEpochProvisionsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryEpochProvisionsRequestAmino): QueryEpochProvisionsRequest { - return {}; - }, - toAmino(_: QueryEpochProvisionsRequest): QueryEpochProvisionsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryEpochProvisionsRequestAminoMsg): QueryEpochProvisionsRequest { - return QueryEpochProvisionsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryEpochProvisionsRequest): QueryEpochProvisionsRequestAminoMsg { - return { - type: "osmosis/mint/query-epoch-provisions-request", - value: QueryEpochProvisionsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryEpochProvisionsRequestProtoMsg): QueryEpochProvisionsRequest { - return QueryEpochProvisionsRequest.decode(message.value); - }, - toProto(message: QueryEpochProvisionsRequest): Uint8Array { - return QueryEpochProvisionsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryEpochProvisionsRequest): QueryEpochProvisionsRequestProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.QueryEpochProvisionsRequest", - value: QueryEpochProvisionsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryEpochProvisionsResponse(): QueryEpochProvisionsResponse { - return { - epochProvisions: new Uint8Array() - }; -} -export const QueryEpochProvisionsResponse = { - typeUrl: "/osmosis.mint.v1beta1.QueryEpochProvisionsResponse", - aminoType: "osmosis/mint/query-epoch-provisions-response", - encode(message: QueryEpochProvisionsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.epochProvisions.length !== 0) { - writer.uint32(10).bytes(message.epochProvisions); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryEpochProvisionsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryEpochProvisionsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epochProvisions = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryEpochProvisionsResponse { - return { - epochProvisions: isSet(object.epochProvisions) ? bytesFromBase64(object.epochProvisions) : new Uint8Array() - }; - }, - toJSON(message: QueryEpochProvisionsResponse): unknown { - const obj: any = {}; - message.epochProvisions !== undefined && (obj.epochProvisions = base64FromBytes(message.epochProvisions !== undefined ? message.epochProvisions : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): QueryEpochProvisionsResponse { - const message = createBaseQueryEpochProvisionsResponse(); - message.epochProvisions = object.epochProvisions ?? new Uint8Array(); - return message; - }, - fromSDK(object: QueryEpochProvisionsResponseSDKType): QueryEpochProvisionsResponse { - return { - epochProvisions: object?.epoch_provisions - }; - }, - toSDK(message: QueryEpochProvisionsResponse): QueryEpochProvisionsResponseSDKType { - const obj: any = {}; - obj.epoch_provisions = message.epochProvisions; - return obj; - }, - fromAmino(object: QueryEpochProvisionsResponseAmino): QueryEpochProvisionsResponse { - return { - epochProvisions: object.epoch_provisions - }; - }, - toAmino(message: QueryEpochProvisionsResponse): QueryEpochProvisionsResponseAmino { - const obj: any = {}; - obj.epoch_provisions = message.epochProvisions; - return obj; - }, - fromAminoMsg(object: QueryEpochProvisionsResponseAminoMsg): QueryEpochProvisionsResponse { - return QueryEpochProvisionsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryEpochProvisionsResponse): QueryEpochProvisionsResponseAminoMsg { - return { - type: "osmosis/mint/query-epoch-provisions-response", - value: QueryEpochProvisionsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryEpochProvisionsResponseProtoMsg): QueryEpochProvisionsResponse { - return QueryEpochProvisionsResponse.decode(message.value); - }, - toProto(message: QueryEpochProvisionsResponse): Uint8Array { - return QueryEpochProvisionsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryEpochProvisionsResponse): QueryEpochProvisionsResponseProtoMsg { - return { - typeUrl: "/osmosis.mint.v1beta1.QueryEpochProvisionsResponse", - value: QueryEpochProvisionsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/genesis.ts deleted file mode 100644 index 94faa8c2..00000000 --- a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/genesis.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType, DistrInfo, DistrInfoAmino, DistrInfoSDKType, PoolToGauges, PoolToGaugesAmino, PoolToGaugesSDKType } from "./incentives"; -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the pool incentives module's genesis state. */ -export interface GenesisState { - /** params defines all the paramaters of the module. */ - params: Params | undefined; - lockableDurations: Duration[]; - distrInfo?: DistrInfo | undefined; - poolToGauges?: PoolToGauges | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the pool incentives module's genesis state. */ -export interface GenesisStateAmino { - /** params defines all the paramaters of the module. */ - params?: ParamsAmino | undefined; - lockable_durations: DurationAmino[]; - distr_info?: DistrInfoAmino | undefined; - pool_to_gauges?: PoolToGaugesAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "osmosis/poolincentives/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the pool incentives module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - lockable_durations: DurationSDKType[]; - distr_info?: DistrInfoSDKType | undefined; - pool_to_gauges?: PoolToGaugesSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - lockableDurations: [], - distrInfo: undefined, - poolToGauges: undefined - }; -} -export const GenesisState = { - typeUrl: "/osmosis.poolincentives.v1beta1.GenesisState", - aminoType: "osmosis/poolincentives/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.lockableDurations) { - Duration.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.distrInfo !== undefined) { - DistrInfo.encode(message.distrInfo, writer.uint32(26).fork()).ldelim(); - } - if (message.poolToGauges !== undefined) { - PoolToGauges.encode(message.poolToGauges, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.lockableDurations.push(Duration.decode(reader, reader.uint32())); - break; - case 3: - message.distrInfo = DistrInfo.decode(reader, reader.uint32()); - break; - case 4: - message.poolToGauges = PoolToGauges.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - lockableDurations: Array.isArray(object?.lockableDurations) ? object.lockableDurations.map((e: any) => Duration.fromJSON(e)) : [], - distrInfo: isSet(object.distrInfo) ? DistrInfo.fromJSON(object.distrInfo) : undefined, - poolToGauges: isSet(object.poolToGauges) ? PoolToGauges.fromJSON(object.poolToGauges) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.lockableDurations) { - obj.lockableDurations = message.lockableDurations.map(e => e ? Duration.toJSON(e) : undefined); - } else { - obj.lockableDurations = []; - } - message.distrInfo !== undefined && (obj.distrInfo = message.distrInfo ? DistrInfo.toJSON(message.distrInfo) : undefined); - message.poolToGauges !== undefined && (obj.poolToGauges = message.poolToGauges ? PoolToGauges.toJSON(message.poolToGauges) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; - message.distrInfo = object.distrInfo !== undefined && object.distrInfo !== null ? DistrInfo.fromPartial(object.distrInfo) : undefined; - message.poolToGauges = object.poolToGauges !== undefined && object.poolToGauges !== null ? PoolToGauges.fromPartial(object.poolToGauges) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromSDK(e)) : [], - distrInfo: object.distr_info ? DistrInfo.fromSDK(object.distr_info) : undefined, - poolToGauges: object.pool_to_gauges ? PoolToGauges.fromSDK(object.pool_to_gauges) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toSDK(e) : undefined); - } else { - obj.lockable_durations = []; - } - message.distrInfo !== undefined && (obj.distr_info = message.distrInfo ? DistrInfo.toSDK(message.distrInfo) : undefined); - message.poolToGauges !== undefined && (obj.pool_to_gauges = message.poolToGauges ? PoolToGauges.toSDK(message.poolToGauges) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromAmino(e)) : [], - distrInfo: object?.distr_info ? DistrInfo.fromAmino(object.distr_info) : undefined, - poolToGauges: object?.pool_to_gauges ? PoolToGauges.fromAmino(object.pool_to_gauges) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e) : undefined); - } else { - obj.lockable_durations = []; - } - obj.distr_info = message.distrInfo ? DistrInfo.toAmino(message.distrInfo) : undefined; - obj.pool_to_gauges = message.poolToGauges ? PoolToGauges.toAmino(message.poolToGauges) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/poolincentives/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/gov.ts b/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/gov.ts deleted file mode 100644 index 1d3739cd..00000000 --- a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/gov.ts +++ /dev/null @@ -1,359 +0,0 @@ -import { DistrRecord, DistrRecordAmino, DistrRecordSDKType } from "./incentives"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * ReplacePoolIncentivesProposal is a gov Content type for updating the pool - * incentives. If a ReplacePoolIncentivesProposal passes, the proposal’s records - * override the existing DistrRecords set in the module. Each record has a - * specified gauge id and weight, and the incentives are distributed to each - * gauge according to weight/total_weight. The incentives are put in the fee - * pool and it is allocated to gauges and community pool by the DistrRecords - * configuration. Note that gaugeId=0 represents the community pool. - */ -export interface ReplacePoolIncentivesProposal { - title: string; - description: string; - records: DistrRecord[]; -} -export interface ReplacePoolIncentivesProposalProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.ReplacePoolIncentivesProposal"; - value: Uint8Array; -} -/** - * ReplacePoolIncentivesProposal is a gov Content type for updating the pool - * incentives. If a ReplacePoolIncentivesProposal passes, the proposal’s records - * override the existing DistrRecords set in the module. Each record has a - * specified gauge id and weight, and the incentives are distributed to each - * gauge according to weight/total_weight. The incentives are put in the fee - * pool and it is allocated to gauges and community pool by the DistrRecords - * configuration. Note that gaugeId=0 represents the community pool. - */ -export interface ReplacePoolIncentivesProposalAmino { - title: string; - description: string; - records: DistrRecordAmino[]; -} -export interface ReplacePoolIncentivesProposalAminoMsg { - type: "osmosis/poolincentives/replace-pool-incentives-proposal"; - value: ReplacePoolIncentivesProposalAmino; -} -/** - * ReplacePoolIncentivesProposal is a gov Content type for updating the pool - * incentives. If a ReplacePoolIncentivesProposal passes, the proposal’s records - * override the existing DistrRecords set in the module. Each record has a - * specified gauge id and weight, and the incentives are distributed to each - * gauge according to weight/total_weight. The incentives are put in the fee - * pool and it is allocated to gauges and community pool by the DistrRecords - * configuration. Note that gaugeId=0 represents the community pool. - */ -export interface ReplacePoolIncentivesProposalSDKType { - title: string; - description: string; - records: DistrRecordSDKType[]; -} -/** - * For example: if the existing DistrRecords were: - * [(Gauge 0, 5), (Gauge 1, 6), (Gauge 2, 6)] - * An UpdatePoolIncentivesProposal includes - * [(Gauge 1, 0), (Gauge 2, 4), (Gauge 3, 10)] - * This would delete Gauge 1, Edit Gauge 2, and Add Gauge 3 - * The result DistrRecords in state would be: - * [(Gauge 0, 5), (Gauge 2, 4), (Gauge 3, 10)] - */ -export interface UpdatePoolIncentivesProposal { - title: string; - description: string; - records: DistrRecord[]; -} -export interface UpdatePoolIncentivesProposalProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.UpdatePoolIncentivesProposal"; - value: Uint8Array; -} -/** - * For example: if the existing DistrRecords were: - * [(Gauge 0, 5), (Gauge 1, 6), (Gauge 2, 6)] - * An UpdatePoolIncentivesProposal includes - * [(Gauge 1, 0), (Gauge 2, 4), (Gauge 3, 10)] - * This would delete Gauge 1, Edit Gauge 2, and Add Gauge 3 - * The result DistrRecords in state would be: - * [(Gauge 0, 5), (Gauge 2, 4), (Gauge 3, 10)] - */ -export interface UpdatePoolIncentivesProposalAmino { - title: string; - description: string; - records: DistrRecordAmino[]; -} -export interface UpdatePoolIncentivesProposalAminoMsg { - type: "osmosis/poolincentives/update-pool-incentives-proposal"; - value: UpdatePoolIncentivesProposalAmino; -} -/** - * For example: if the existing DistrRecords were: - * [(Gauge 0, 5), (Gauge 1, 6), (Gauge 2, 6)] - * An UpdatePoolIncentivesProposal includes - * [(Gauge 1, 0), (Gauge 2, 4), (Gauge 3, 10)] - * This would delete Gauge 1, Edit Gauge 2, and Add Gauge 3 - * The result DistrRecords in state would be: - * [(Gauge 0, 5), (Gauge 2, 4), (Gauge 3, 10)] - */ -export interface UpdatePoolIncentivesProposalSDKType { - title: string; - description: string; - records: DistrRecordSDKType[]; -} -function createBaseReplacePoolIncentivesProposal(): ReplacePoolIncentivesProposal { - return { - title: "", - description: "", - records: [] - }; -} -export const ReplacePoolIncentivesProposal = { - typeUrl: "/osmosis.poolincentives.v1beta1.ReplacePoolIncentivesProposal", - aminoType: "osmosis/poolincentives/replace-pool-incentives-proposal", - encode(message: ReplacePoolIncentivesProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.records) { - DistrRecord.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ReplacePoolIncentivesProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseReplacePoolIncentivesProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.records.push(DistrRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ReplacePoolIncentivesProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromJSON(e)) : [] - }; - }, - toJSON(message: ReplacePoolIncentivesProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toJSON(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ReplacePoolIncentivesProposal { - const message = createBaseReplacePoolIncentivesProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.records = object.records?.map(e => DistrRecord.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ReplacePoolIncentivesProposalSDKType): ReplacePoolIncentivesProposal { - return { - title: object?.title, - description: object?.description, - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromSDK(e)) : [] - }; - }, - toSDK(message: ReplacePoolIncentivesProposal): ReplacePoolIncentivesProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toSDK(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromAmino(object: ReplacePoolIncentivesProposalAmino): ReplacePoolIncentivesProposal { - return { - title: object.title, - description: object.description, - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromAmino(e)) : [] - }; - }, - toAmino(message: ReplacePoolIncentivesProposal): ReplacePoolIncentivesProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toAmino(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromAminoMsg(object: ReplacePoolIncentivesProposalAminoMsg): ReplacePoolIncentivesProposal { - return ReplacePoolIncentivesProposal.fromAmino(object.value); - }, - toAminoMsg(message: ReplacePoolIncentivesProposal): ReplacePoolIncentivesProposalAminoMsg { - return { - type: "osmosis/poolincentives/replace-pool-incentives-proposal", - value: ReplacePoolIncentivesProposal.toAmino(message) - }; - }, - fromProtoMsg(message: ReplacePoolIncentivesProposalProtoMsg): ReplacePoolIncentivesProposal { - return ReplacePoolIncentivesProposal.decode(message.value); - }, - toProto(message: ReplacePoolIncentivesProposal): Uint8Array { - return ReplacePoolIncentivesProposal.encode(message).finish(); - }, - toProtoMsg(message: ReplacePoolIncentivesProposal): ReplacePoolIncentivesProposalProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.ReplacePoolIncentivesProposal", - value: ReplacePoolIncentivesProposal.encode(message).finish() - }; - } -}; -function createBaseUpdatePoolIncentivesProposal(): UpdatePoolIncentivesProposal { - return { - title: "", - description: "", - records: [] - }; -} -export const UpdatePoolIncentivesProposal = { - typeUrl: "/osmosis.poolincentives.v1beta1.UpdatePoolIncentivesProposal", - aminoType: "osmosis/poolincentives/update-pool-incentives-proposal", - encode(message: UpdatePoolIncentivesProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.records) { - DistrRecord.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpdatePoolIncentivesProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdatePoolIncentivesProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.records.push(DistrRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpdatePoolIncentivesProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromJSON(e)) : [] - }; - }, - toJSON(message: UpdatePoolIncentivesProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toJSON(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromPartial(object: DeepPartial): UpdatePoolIncentivesProposal { - const message = createBaseUpdatePoolIncentivesProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.records = object.records?.map(e => DistrRecord.fromPartial(e)) || []; - return message; - }, - fromSDK(object: UpdatePoolIncentivesProposalSDKType): UpdatePoolIncentivesProposal { - return { - title: object?.title, - description: object?.description, - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromSDK(e)) : [] - }; - }, - toSDK(message: UpdatePoolIncentivesProposal): UpdatePoolIncentivesProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toSDK(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromAmino(object: UpdatePoolIncentivesProposalAmino): UpdatePoolIncentivesProposal { - return { - title: object.title, - description: object.description, - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromAmino(e)) : [] - }; - }, - toAmino(message: UpdatePoolIncentivesProposal): UpdatePoolIncentivesProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toAmino(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromAminoMsg(object: UpdatePoolIncentivesProposalAminoMsg): UpdatePoolIncentivesProposal { - return UpdatePoolIncentivesProposal.fromAmino(object.value); - }, - toAminoMsg(message: UpdatePoolIncentivesProposal): UpdatePoolIncentivesProposalAminoMsg { - return { - type: "osmosis/poolincentives/update-pool-incentives-proposal", - value: UpdatePoolIncentivesProposal.toAmino(message) - }; - }, - fromProtoMsg(message: UpdatePoolIncentivesProposalProtoMsg): UpdatePoolIncentivesProposal { - return UpdatePoolIncentivesProposal.decode(message.value); - }, - toProto(message: UpdatePoolIncentivesProposal): Uint8Array { - return UpdatePoolIncentivesProposal.encode(message).finish(); - }, - toProtoMsg(message: UpdatePoolIncentivesProposal): UpdatePoolIncentivesProposalProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.UpdatePoolIncentivesProposal", - value: UpdatePoolIncentivesProposal.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/incentives.ts b/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/incentives.ts deleted file mode 100644 index 9c5eeb9b..00000000 --- a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/incentives.ts +++ /dev/null @@ -1,749 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -export interface Params { - /** - * minted_denom is the denomination of the coin expected to be minted by the - * minting module. Pool-incentives module doesn’t actually mint the coin - * itself, but rather manages the distribution of coins that matches the - * defined minted_denom. - */ - mintedDenom: string; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.Params"; - value: Uint8Array; -} -export interface ParamsAmino { - /** - * minted_denom is the denomination of the coin expected to be minted by the - * minting module. Pool-incentives module doesn’t actually mint the coin - * itself, but rather manages the distribution of coins that matches the - * defined minted_denom. - */ - minted_denom: string; -} -export interface ParamsAminoMsg { - type: "osmosis/poolincentives/params"; - value: ParamsAmino; -} -export interface ParamsSDKType { - minted_denom: string; -} -export interface LockableDurationsInfo { - lockableDurations: Duration[]; -} -export interface LockableDurationsInfoProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.LockableDurationsInfo"; - value: Uint8Array; -} -export interface LockableDurationsInfoAmino { - lockable_durations: DurationAmino[]; -} -export interface LockableDurationsInfoAminoMsg { - type: "osmosis/poolincentives/lockable-durations-info"; - value: LockableDurationsInfoAmino; -} -export interface LockableDurationsInfoSDKType { - lockable_durations: DurationSDKType[]; -} -export interface DistrInfo { - totalWeight: string; - records: DistrRecord[]; -} -export interface DistrInfoProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.DistrInfo"; - value: Uint8Array; -} -export interface DistrInfoAmino { - total_weight: string; - records: DistrRecordAmino[]; -} -export interface DistrInfoAminoMsg { - type: "osmosis/poolincentives/distr-info"; - value: DistrInfoAmino; -} -export interface DistrInfoSDKType { - total_weight: string; - records: DistrRecordSDKType[]; -} -export interface DistrRecord { - gaugeId: bigint; - weight: string; -} -export interface DistrRecordProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.DistrRecord"; - value: Uint8Array; -} -export interface DistrRecordAmino { - gauge_id: string; - weight: string; -} -export interface DistrRecordAminoMsg { - type: "osmosis/poolincentives/distr-record"; - value: DistrRecordAmino; -} -export interface DistrRecordSDKType { - gauge_id: bigint; - weight: string; -} -export interface PoolToGauge { - poolId: bigint; - gaugeId: bigint; - duration: Duration | undefined; -} -export interface PoolToGaugeProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.PoolToGauge"; - value: Uint8Array; -} -export interface PoolToGaugeAmino { - pool_id: string; - gauge_id: string; - duration?: DurationAmino | undefined; -} -export interface PoolToGaugeAminoMsg { - type: "osmosis/poolincentives/pool-to-gauge"; - value: PoolToGaugeAmino; -} -export interface PoolToGaugeSDKType { - pool_id: bigint; - gauge_id: bigint; - duration: DurationSDKType | undefined; -} -export interface PoolToGauges { - poolToGauge: PoolToGauge[]; -} -export interface PoolToGaugesProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.PoolToGauges"; - value: Uint8Array; -} -export interface PoolToGaugesAmino { - pool_to_gauge: PoolToGaugeAmino[]; -} -export interface PoolToGaugesAminoMsg { - type: "osmosis/poolincentives/pool-to-gauges"; - value: PoolToGaugesAmino; -} -export interface PoolToGaugesSDKType { - pool_to_gauge: PoolToGaugeSDKType[]; -} -function createBaseParams(): Params { - return { - mintedDenom: "" - }; -} -export const Params = { - typeUrl: "/osmosis.poolincentives.v1beta1.Params", - aminoType: "osmosis/poolincentives/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.mintedDenom !== "") { - writer.uint32(10).string(message.mintedDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mintedDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - mintedDenom: isSet(object.mintedDenom) ? String(object.mintedDenom) : "" - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.mintedDenom !== undefined && (obj.mintedDenom = message.mintedDenom); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.mintedDenom = object.mintedDenom ?? ""; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - mintedDenom: object?.minted_denom - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.minted_denom = message.mintedDenom; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - mintedDenom: object.minted_denom - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.minted_denom = message.mintedDenom; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/poolincentives/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseLockableDurationsInfo(): LockableDurationsInfo { - return { - lockableDurations: [] - }; -} -export const LockableDurationsInfo = { - typeUrl: "/osmosis.poolincentives.v1beta1.LockableDurationsInfo", - aminoType: "osmosis/poolincentives/lockable-durations-info", - encode(message: LockableDurationsInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.lockableDurations) { - Duration.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockableDurationsInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockableDurationsInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockableDurations.push(Duration.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockableDurationsInfo { - return { - lockableDurations: Array.isArray(object?.lockableDurations) ? object.lockableDurations.map((e: any) => Duration.fromJSON(e)) : [] - }; - }, - toJSON(message: LockableDurationsInfo): unknown { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockableDurations = message.lockableDurations.map(e => e ? Duration.toJSON(e) : undefined); - } else { - obj.lockableDurations = []; - } - return obj; - }, - fromPartial(object: DeepPartial): LockableDurationsInfo { - const message = createBaseLockableDurationsInfo(); - message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; - return message; - }, - fromSDK(object: LockableDurationsInfoSDKType): LockableDurationsInfo { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromSDK(e)) : [] - }; - }, - toSDK(message: LockableDurationsInfo): LockableDurationsInfoSDKType { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toSDK(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAmino(object: LockableDurationsInfoAmino): LockableDurationsInfo { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromAmino(e)) : [] - }; - }, - toAmino(message: LockableDurationsInfo): LockableDurationsInfoAmino { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAminoMsg(object: LockableDurationsInfoAminoMsg): LockableDurationsInfo { - return LockableDurationsInfo.fromAmino(object.value); - }, - toAminoMsg(message: LockableDurationsInfo): LockableDurationsInfoAminoMsg { - return { - type: "osmosis/poolincentives/lockable-durations-info", - value: LockableDurationsInfo.toAmino(message) - }; - }, - fromProtoMsg(message: LockableDurationsInfoProtoMsg): LockableDurationsInfo { - return LockableDurationsInfo.decode(message.value); - }, - toProto(message: LockableDurationsInfo): Uint8Array { - return LockableDurationsInfo.encode(message).finish(); - }, - toProtoMsg(message: LockableDurationsInfo): LockableDurationsInfoProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.LockableDurationsInfo", - value: LockableDurationsInfo.encode(message).finish() - }; - } -}; -function createBaseDistrInfo(): DistrInfo { - return { - totalWeight: "", - records: [] - }; -} -export const DistrInfo = { - typeUrl: "/osmosis.poolincentives.v1beta1.DistrInfo", - aminoType: "osmosis/poolincentives/distr-info", - encode(message: DistrInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.totalWeight !== "") { - writer.uint32(10).string(message.totalWeight); - } - for (const v of message.records) { - DistrRecord.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DistrInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDistrInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalWeight = reader.string(); - break; - case 2: - message.records.push(DistrRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DistrInfo { - return { - totalWeight: isSet(object.totalWeight) ? String(object.totalWeight) : "", - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromJSON(e)) : [] - }; - }, - toJSON(message: DistrInfo): unknown { - const obj: any = {}; - message.totalWeight !== undefined && (obj.totalWeight = message.totalWeight); - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toJSON(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromPartial(object: DeepPartial): DistrInfo { - const message = createBaseDistrInfo(); - message.totalWeight = object.totalWeight ?? ""; - message.records = object.records?.map(e => DistrRecord.fromPartial(e)) || []; - return message; - }, - fromSDK(object: DistrInfoSDKType): DistrInfo { - return { - totalWeight: object?.total_weight, - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromSDK(e)) : [] - }; - }, - toSDK(message: DistrInfo): DistrInfoSDKType { - const obj: any = {}; - obj.total_weight = message.totalWeight; - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toSDK(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromAmino(object: DistrInfoAmino): DistrInfo { - return { - totalWeight: object.total_weight, - records: Array.isArray(object?.records) ? object.records.map((e: any) => DistrRecord.fromAmino(e)) : [] - }; - }, - toAmino(message: DistrInfo): DistrInfoAmino { - const obj: any = {}; - obj.total_weight = message.totalWeight; - if (message.records) { - obj.records = message.records.map(e => e ? DistrRecord.toAmino(e) : undefined); - } else { - obj.records = []; - } - return obj; - }, - fromAminoMsg(object: DistrInfoAminoMsg): DistrInfo { - return DistrInfo.fromAmino(object.value); - }, - toAminoMsg(message: DistrInfo): DistrInfoAminoMsg { - return { - type: "osmosis/poolincentives/distr-info", - value: DistrInfo.toAmino(message) - }; - }, - fromProtoMsg(message: DistrInfoProtoMsg): DistrInfo { - return DistrInfo.decode(message.value); - }, - toProto(message: DistrInfo): Uint8Array { - return DistrInfo.encode(message).finish(); - }, - toProtoMsg(message: DistrInfo): DistrInfoProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.DistrInfo", - value: DistrInfo.encode(message).finish() - }; - } -}; -function createBaseDistrRecord(): DistrRecord { - return { - gaugeId: BigInt(0), - weight: "" - }; -} -export const DistrRecord = { - typeUrl: "/osmosis.poolincentives.v1beta1.DistrRecord", - aminoType: "osmosis/poolincentives/distr-record", - encode(message: DistrRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gaugeId !== BigInt(0)) { - writer.uint32(8).uint64(message.gaugeId); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DistrRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDistrRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gaugeId = reader.uint64(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DistrRecord { - return { - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0), - weight: isSet(object.weight) ? String(object.weight) : "" - }; - }, - toJSON(message: DistrRecord): unknown { - const obj: any = {}; - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - message.weight !== undefined && (obj.weight = message.weight); - return obj; - }, - fromPartial(object: DeepPartial): DistrRecord { - const message = createBaseDistrRecord(); - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - message.weight = object.weight ?? ""; - return message; - }, - fromSDK(object: DistrRecordSDKType): DistrRecord { - return { - gaugeId: object?.gauge_id, - weight: object?.weight - }; - }, - toSDK(message: DistrRecord): DistrRecordSDKType { - const obj: any = {}; - obj.gauge_id = message.gaugeId; - obj.weight = message.weight; - return obj; - }, - fromAmino(object: DistrRecordAmino): DistrRecord { - return { - gaugeId: BigInt(object.gauge_id), - weight: object.weight - }; - }, - toAmino(message: DistrRecord): DistrRecordAmino { - const obj: any = {}; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.weight = message.weight; - return obj; - }, - fromAminoMsg(object: DistrRecordAminoMsg): DistrRecord { - return DistrRecord.fromAmino(object.value); - }, - toAminoMsg(message: DistrRecord): DistrRecordAminoMsg { - return { - type: "osmosis/poolincentives/distr-record", - value: DistrRecord.toAmino(message) - }; - }, - fromProtoMsg(message: DistrRecordProtoMsg): DistrRecord { - return DistrRecord.decode(message.value); - }, - toProto(message: DistrRecord): Uint8Array { - return DistrRecord.encode(message).finish(); - }, - toProtoMsg(message: DistrRecord): DistrRecordProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.DistrRecord", - value: DistrRecord.encode(message).finish() - }; - } -}; -function createBasePoolToGauge(): PoolToGauge { - return { - poolId: BigInt(0), - gaugeId: BigInt(0), - duration: Duration.fromPartial({}) - }; -} -export const PoolToGauge = { - typeUrl: "/osmosis.poolincentives.v1beta1.PoolToGauge", - aminoType: "osmosis/poolincentives/pool-to-gauge", - encode(message: PoolToGauge, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.gaugeId !== BigInt(0)) { - writer.uint32(16).uint64(message.gaugeId); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PoolToGauge { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePoolToGauge(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.gaugeId = reader.uint64(); - break; - case 3: - message.duration = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PoolToGauge { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0), - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined - }; - }, - toJSON(message: PoolToGauge): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): PoolToGauge { - const message = createBasePoolToGauge(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - return message; - }, - fromSDK(object: PoolToGaugeSDKType): PoolToGauge { - return { - poolId: object?.pool_id, - gaugeId: object?.gauge_id, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined - }; - }, - toSDK(message: PoolToGauge): PoolToGaugeSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.gauge_id = message.gaugeId; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - return obj; - }, - fromAmino(object: PoolToGaugeAmino): PoolToGauge { - return { - poolId: BigInt(object.pool_id), - gaugeId: BigInt(object.gauge_id), - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined - }; - }, - toAmino(message: PoolToGauge): PoolToGaugeAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - return obj; - }, - fromAminoMsg(object: PoolToGaugeAminoMsg): PoolToGauge { - return PoolToGauge.fromAmino(object.value); - }, - toAminoMsg(message: PoolToGauge): PoolToGaugeAminoMsg { - return { - type: "osmosis/poolincentives/pool-to-gauge", - value: PoolToGauge.toAmino(message) - }; - }, - fromProtoMsg(message: PoolToGaugeProtoMsg): PoolToGauge { - return PoolToGauge.decode(message.value); - }, - toProto(message: PoolToGauge): Uint8Array { - return PoolToGauge.encode(message).finish(); - }, - toProtoMsg(message: PoolToGauge): PoolToGaugeProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.PoolToGauge", - value: PoolToGauge.encode(message).finish() - }; - } -}; -function createBasePoolToGauges(): PoolToGauges { - return { - poolToGauge: [] - }; -} -export const PoolToGauges = { - typeUrl: "/osmosis.poolincentives.v1beta1.PoolToGauges", - aminoType: "osmosis/poolincentives/pool-to-gauges", - encode(message: PoolToGauges, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.poolToGauge) { - PoolToGauge.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PoolToGauges { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePoolToGauges(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.poolToGauge.push(PoolToGauge.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PoolToGauges { - return { - poolToGauge: Array.isArray(object?.poolToGauge) ? object.poolToGauge.map((e: any) => PoolToGauge.fromJSON(e)) : [] - }; - }, - toJSON(message: PoolToGauges): unknown { - const obj: any = {}; - if (message.poolToGauge) { - obj.poolToGauge = message.poolToGauge.map(e => e ? PoolToGauge.toJSON(e) : undefined); - } else { - obj.poolToGauge = []; - } - return obj; - }, - fromPartial(object: DeepPartial): PoolToGauges { - const message = createBasePoolToGauges(); - message.poolToGauge = object.poolToGauge?.map(e => PoolToGauge.fromPartial(e)) || []; - return message; - }, - fromSDK(object: PoolToGaugesSDKType): PoolToGauges { - return { - poolToGauge: Array.isArray(object?.pool_to_gauge) ? object.pool_to_gauge.map((e: any) => PoolToGauge.fromSDK(e)) : [] - }; - }, - toSDK(message: PoolToGauges): PoolToGaugesSDKType { - const obj: any = {}; - if (message.poolToGauge) { - obj.pool_to_gauge = message.poolToGauge.map(e => e ? PoolToGauge.toSDK(e) : undefined); - } else { - obj.pool_to_gauge = []; - } - return obj; - }, - fromAmino(object: PoolToGaugesAmino): PoolToGauges { - return { - poolToGauge: Array.isArray(object?.pool_to_gauge) ? object.pool_to_gauge.map((e: any) => PoolToGauge.fromAmino(e)) : [] - }; - }, - toAmino(message: PoolToGauges): PoolToGaugesAmino { - const obj: any = {}; - if (message.poolToGauge) { - obj.pool_to_gauge = message.poolToGauge.map(e => e ? PoolToGauge.toAmino(e) : undefined); - } else { - obj.pool_to_gauge = []; - } - return obj; - }, - fromAminoMsg(object: PoolToGaugesAminoMsg): PoolToGauges { - return PoolToGauges.fromAmino(object.value); - }, - toAminoMsg(message: PoolToGauges): PoolToGaugesAminoMsg { - return { - type: "osmosis/poolincentives/pool-to-gauges", - value: PoolToGauges.toAmino(message) - }; - }, - fromProtoMsg(message: PoolToGaugesProtoMsg): PoolToGauges { - return PoolToGauges.decode(message.value); - }, - toProto(message: PoolToGauges): Uint8Array { - return PoolToGauges.encode(message).finish(); - }, - toProtoMsg(message: PoolToGauges): PoolToGaugesProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.PoolToGauges", - value: PoolToGauges.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/query.rpc.Query.ts deleted file mode 100644 index be9c4bc2..00000000 --- a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryGaugeIdsRequest, QueryGaugeIdsResponse, QueryDistrInfoRequest, QueryDistrInfoResponse, QueryParamsRequest, QueryParamsResponse, QueryLockableDurationsRequest, QueryLockableDurationsResponse, QueryIncentivizedPoolsRequest, QueryIncentivizedPoolsResponse, QueryExternalIncentiveGaugesRequest, QueryExternalIncentiveGaugesResponse } from "./query"; -export interface Query { - /** GaugeIds takes the pool id and returns the matching gauge ids and durations */ - gaugeIds(request: QueryGaugeIdsRequest): Promise; - /** DistrInfo returns the pool's matching gauge ids and weights. */ - distrInfo(request?: QueryDistrInfoRequest): Promise; - /** Params returns pool incentives params. */ - params(request?: QueryParamsRequest): Promise; - /** LockableDurations returns lock durations for pools. */ - lockableDurations(request?: QueryLockableDurationsRequest): Promise; - /** IncentivizedPools returns currently incentivized pools */ - incentivizedPools(request?: QueryIncentivizedPoolsRequest): Promise; - /** ExternalIncentiveGauges returns external incentive gauges. */ - externalIncentiveGauges(request?: QueryExternalIncentiveGaugesRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.gaugeIds = this.gaugeIds.bind(this); - this.distrInfo = this.distrInfo.bind(this); - this.params = this.params.bind(this); - this.lockableDurations = this.lockableDurations.bind(this); - this.incentivizedPools = this.incentivizedPools.bind(this); - this.externalIncentiveGauges = this.externalIncentiveGauges.bind(this); - } - gaugeIds(request: QueryGaugeIdsRequest): Promise { - const data = QueryGaugeIdsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.poolincentives.v1beta1.Query", "GaugeIds", data); - return promise.then(data => QueryGaugeIdsResponse.decode(new BinaryReader(data))); - } - distrInfo(request: QueryDistrInfoRequest = {}): Promise { - const data = QueryDistrInfoRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.poolincentives.v1beta1.Query", "DistrInfo", data); - return promise.then(data => QueryDistrInfoResponse.decode(new BinaryReader(data))); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.poolincentives.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - lockableDurations(request: QueryLockableDurationsRequest = {}): Promise { - const data = QueryLockableDurationsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.poolincentives.v1beta1.Query", "LockableDurations", data); - return promise.then(data => QueryLockableDurationsResponse.decode(new BinaryReader(data))); - } - incentivizedPools(request: QueryIncentivizedPoolsRequest = {}): Promise { - const data = QueryIncentivizedPoolsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.poolincentives.v1beta1.Query", "IncentivizedPools", data); - return promise.then(data => QueryIncentivizedPoolsResponse.decode(new BinaryReader(data))); - } - externalIncentiveGauges(request: QueryExternalIncentiveGaugesRequest = {}): Promise { - const data = QueryExternalIncentiveGaugesRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.poolincentives.v1beta1.Query", "ExternalIncentiveGauges", data); - return promise.then(data => QueryExternalIncentiveGaugesResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - gaugeIds(request: QueryGaugeIdsRequest): Promise { - return queryService.gaugeIds(request); - }, - distrInfo(request?: QueryDistrInfoRequest): Promise { - return queryService.distrInfo(request); - }, - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - lockableDurations(request?: QueryLockableDurationsRequest): Promise { - return queryService.lockableDurations(request); - }, - incentivizedPools(request?: QueryIncentivizedPoolsRequest): Promise { - return queryService.incentivizedPools(request); - }, - externalIncentiveGauges(request?: QueryExternalIncentiveGaugesRequest): Promise { - return queryService.externalIncentiveGauges(request); - } - }; -}; -export interface UseGaugeIdsQuery extends ReactQueryParams { - request: QueryGaugeIdsRequest; -} -export interface UseDistrInfoQuery extends ReactQueryParams { - request?: QueryDistrInfoRequest; -} -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseLockableDurationsQuery extends ReactQueryParams { - request?: QueryLockableDurationsRequest; -} -export interface UseIncentivizedPoolsQuery extends ReactQueryParams { - request?: QueryIncentivizedPoolsRequest; -} -export interface UseExternalIncentiveGaugesQuery extends ReactQueryParams { - request?: QueryExternalIncentiveGaugesRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useGaugeIds = ({ - request, - options - }: UseGaugeIdsQuery) => { - return useQuery(["gaugeIdsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.gaugeIds(request); - }, options); - }; - const useDistrInfo = ({ - request, - options - }: UseDistrInfoQuery) => { - return useQuery(["distrInfoQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.distrInfo(request); - }, options); - }; - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useLockableDurations = ({ - request, - options - }: UseLockableDurationsQuery) => { - return useQuery(["lockableDurationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.lockableDurations(request); - }, options); - }; - const useIncentivizedPools = ({ - request, - options - }: UseIncentivizedPoolsQuery) => { - return useQuery(["incentivizedPoolsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.incentivizedPools(request); - }, options); - }; - const useExternalIncentiveGauges = ({ - request, - options - }: UseExternalIncentiveGaugesQuery) => { - return useQuery(["externalIncentiveGaugesQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.externalIncentiveGauges(request); - }, options); - }; - return { - /** GaugeIds takes the pool id and returns the matching gauge ids and durations */useGaugeIds, - /** DistrInfo returns the pool's matching gauge ids and weights. */useDistrInfo, - /** Params returns pool incentives params. */useParams, - /** LockableDurations returns lock durations for pools. */useLockableDurations, - /** IncentivizedPools returns currently incentivized pools */useIncentivizedPools, - /** ExternalIncentiveGauges returns external incentive gauges. */useExternalIncentiveGauges - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryGaugeIdsStore { - store = new QueryStore(queryService?.gaugeIds); - gaugeIds(request: QueryGaugeIdsRequest) { - return this.store.getData(request); - } - } - class QueryDistrInfoStore { - store = new QueryStore(queryService?.distrInfo); - distrInfo(request: QueryDistrInfoRequest) { - return this.store.getData(request); - } - } - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryLockableDurationsStore { - store = new QueryStore(queryService?.lockableDurations); - lockableDurations(request: QueryLockableDurationsRequest) { - return this.store.getData(request); - } - } - class QueryIncentivizedPoolsStore { - store = new QueryStore(queryService?.incentivizedPools); - incentivizedPools(request: QueryIncentivizedPoolsRequest) { - return this.store.getData(request); - } - } - class QueryExternalIncentiveGaugesStore { - store = new QueryStore(queryService?.externalIncentiveGauges); - externalIncentiveGauges(request: QueryExternalIncentiveGaugesRequest) { - return this.store.getData(request); - } - } - return { - /** GaugeIds takes the pool id and returns the matching gauge ids and durations */QueryGaugeIdsStore, - /** DistrInfo returns the pool's matching gauge ids and weights. */QueryDistrInfoStore, - /** Params returns pool incentives params. */QueryParamsStore, - /** LockableDurations returns lock durations for pools. */QueryLockableDurationsStore, - /** IncentivizedPools returns currently incentivized pools */QueryIncentivizedPoolsStore, - /** ExternalIncentiveGauges returns external incentive gauges. */QueryExternalIncentiveGaugesStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/query.ts deleted file mode 100644 index b9ccdeab..00000000 --- a/examples/interchainjs/src/codegen/osmosis/pool-incentives/v1beta1/query.ts +++ /dev/null @@ -1,1471 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { DistrInfo, DistrInfoAmino, DistrInfoSDKType, Params, ParamsAmino, ParamsSDKType } from "./incentives"; -import { Gauge, GaugeAmino, GaugeSDKType } from "../../incentives/gauge"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -export interface QueryGaugeIdsRequest { - poolId: bigint; -} -export interface QueryGaugeIdsRequestProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryGaugeIdsRequest"; - value: Uint8Array; -} -export interface QueryGaugeIdsRequestAmino { - pool_id: string; -} -export interface QueryGaugeIdsRequestAminoMsg { - type: "osmosis/poolincentives/query-gauge-ids-request"; - value: QueryGaugeIdsRequestAmino; -} -export interface QueryGaugeIdsRequestSDKType { - pool_id: bigint; -} -export interface QueryGaugeIdsResponse { - gaugeIdsWithDuration: QueryGaugeIdsResponse_GaugeIdWithDuration[]; -} -export interface QueryGaugeIdsResponseProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryGaugeIdsResponse"; - value: Uint8Array; -} -export interface QueryGaugeIdsResponseAmino { - gauge_ids_with_duration: QueryGaugeIdsResponse_GaugeIdWithDurationAmino[]; -} -export interface QueryGaugeIdsResponseAminoMsg { - type: "osmosis/poolincentives/query-gauge-ids-response"; - value: QueryGaugeIdsResponseAmino; -} -export interface QueryGaugeIdsResponseSDKType { - gauge_ids_with_duration: QueryGaugeIdsResponse_GaugeIdWithDurationSDKType[]; -} -export interface QueryGaugeIdsResponse_GaugeIdWithDuration { - gaugeId: bigint; - duration: Duration | undefined; - gaugeIncentivePercentage: string; -} -export interface QueryGaugeIdsResponse_GaugeIdWithDurationProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.GaugeIdWithDuration"; - value: Uint8Array; -} -export interface QueryGaugeIdsResponse_GaugeIdWithDurationAmino { - gauge_id: string; - duration?: DurationAmino | undefined; - gauge_incentive_percentage: string; -} -export interface QueryGaugeIdsResponse_GaugeIdWithDurationAminoMsg { - type: "osmosis/poolincentives/gauge-id-with-duration"; - value: QueryGaugeIdsResponse_GaugeIdWithDurationAmino; -} -export interface QueryGaugeIdsResponse_GaugeIdWithDurationSDKType { - gauge_id: bigint; - duration: DurationSDKType | undefined; - gauge_incentive_percentage: string; -} -export interface QueryDistrInfoRequest {} -export interface QueryDistrInfoRequestProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryDistrInfoRequest"; - value: Uint8Array; -} -export interface QueryDistrInfoRequestAmino {} -export interface QueryDistrInfoRequestAminoMsg { - type: "osmosis/poolincentives/query-distr-info-request"; - value: QueryDistrInfoRequestAmino; -} -export interface QueryDistrInfoRequestSDKType {} -export interface QueryDistrInfoResponse { - distrInfo: DistrInfo | undefined; -} -export interface QueryDistrInfoResponseProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryDistrInfoResponse"; - value: Uint8Array; -} -export interface QueryDistrInfoResponseAmino { - distr_info?: DistrInfoAmino | undefined; -} -export interface QueryDistrInfoResponseAminoMsg { - type: "osmosis/poolincentives/query-distr-info-response"; - value: QueryDistrInfoResponseAmino; -} -export interface QueryDistrInfoResponseSDKType { - distr_info: DistrInfoSDKType | undefined; -} -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/poolincentives/query-params-request"; - value: QueryParamsRequestAmino; -} -export interface QueryParamsRequestSDKType {} -export interface QueryParamsResponse { - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -export interface QueryParamsResponseAmino { - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/poolincentives/query-params-response"; - value: QueryParamsResponseAmino; -} -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -export interface QueryLockableDurationsRequest {} -export interface QueryLockableDurationsRequestProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryLockableDurationsRequest"; - value: Uint8Array; -} -export interface QueryLockableDurationsRequestAmino {} -export interface QueryLockableDurationsRequestAminoMsg { - type: "osmosis/poolincentives/query-lockable-durations-request"; - value: QueryLockableDurationsRequestAmino; -} -export interface QueryLockableDurationsRequestSDKType {} -export interface QueryLockableDurationsResponse { - lockableDurations: Duration[]; -} -export interface QueryLockableDurationsResponseProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryLockableDurationsResponse"; - value: Uint8Array; -} -export interface QueryLockableDurationsResponseAmino { - lockable_durations: DurationAmino[]; -} -export interface QueryLockableDurationsResponseAminoMsg { - type: "osmosis/poolincentives/query-lockable-durations-response"; - value: QueryLockableDurationsResponseAmino; -} -export interface QueryLockableDurationsResponseSDKType { - lockable_durations: DurationSDKType[]; -} -export interface QueryIncentivizedPoolsRequest {} -export interface QueryIncentivizedPoolsRequestProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryIncentivizedPoolsRequest"; - value: Uint8Array; -} -export interface QueryIncentivizedPoolsRequestAmino {} -export interface QueryIncentivizedPoolsRequestAminoMsg { - type: "osmosis/poolincentives/query-incentivized-pools-request"; - value: QueryIncentivizedPoolsRequestAmino; -} -export interface QueryIncentivizedPoolsRequestSDKType {} -export interface IncentivizedPool { - poolId: bigint; - lockableDuration: Duration | undefined; - gaugeId: bigint; -} -export interface IncentivizedPoolProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.IncentivizedPool"; - value: Uint8Array; -} -export interface IncentivizedPoolAmino { - pool_id: string; - lockable_duration?: DurationAmino | undefined; - gauge_id: string; -} -export interface IncentivizedPoolAminoMsg { - type: "osmosis/poolincentives/incentivized-pool"; - value: IncentivizedPoolAmino; -} -export interface IncentivizedPoolSDKType { - pool_id: bigint; - lockable_duration: DurationSDKType | undefined; - gauge_id: bigint; -} -export interface QueryIncentivizedPoolsResponse { - incentivizedPools: IncentivizedPool[]; -} -export interface QueryIncentivizedPoolsResponseProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryIncentivizedPoolsResponse"; - value: Uint8Array; -} -export interface QueryIncentivizedPoolsResponseAmino { - incentivized_pools: IncentivizedPoolAmino[]; -} -export interface QueryIncentivizedPoolsResponseAminoMsg { - type: "osmosis/poolincentives/query-incentivized-pools-response"; - value: QueryIncentivizedPoolsResponseAmino; -} -export interface QueryIncentivizedPoolsResponseSDKType { - incentivized_pools: IncentivizedPoolSDKType[]; -} -export interface QueryExternalIncentiveGaugesRequest {} -export interface QueryExternalIncentiveGaugesRequestProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryExternalIncentiveGaugesRequest"; - value: Uint8Array; -} -export interface QueryExternalIncentiveGaugesRequestAmino {} -export interface QueryExternalIncentiveGaugesRequestAminoMsg { - type: "osmosis/poolincentives/query-external-incentive-gauges-request"; - value: QueryExternalIncentiveGaugesRequestAmino; -} -export interface QueryExternalIncentiveGaugesRequestSDKType {} -export interface QueryExternalIncentiveGaugesResponse { - data: Gauge[]; -} -export interface QueryExternalIncentiveGaugesResponseProtoMsg { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryExternalIncentiveGaugesResponse"; - value: Uint8Array; -} -export interface QueryExternalIncentiveGaugesResponseAmino { - data: GaugeAmino[]; -} -export interface QueryExternalIncentiveGaugesResponseAminoMsg { - type: "osmosis/poolincentives/query-external-incentive-gauges-response"; - value: QueryExternalIncentiveGaugesResponseAmino; -} -export interface QueryExternalIncentiveGaugesResponseSDKType { - data: GaugeSDKType[]; -} -function createBaseQueryGaugeIdsRequest(): QueryGaugeIdsRequest { - return { - poolId: BigInt(0) - }; -} -export const QueryGaugeIdsRequest = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryGaugeIdsRequest", - aminoType: "osmosis/poolincentives/query-gauge-ids-request", - encode(message: QueryGaugeIdsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGaugeIdsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGaugeIdsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGaugeIdsRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryGaugeIdsRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryGaugeIdsRequest { - const message = createBaseQueryGaugeIdsRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryGaugeIdsRequestSDKType): QueryGaugeIdsRequest { - return { - poolId: object?.pool_id - }; - }, - toSDK(message: QueryGaugeIdsRequest): QueryGaugeIdsRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: QueryGaugeIdsRequestAmino): QueryGaugeIdsRequest { - return { - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: QueryGaugeIdsRequest): QueryGaugeIdsRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryGaugeIdsRequestAminoMsg): QueryGaugeIdsRequest { - return QueryGaugeIdsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryGaugeIdsRequest): QueryGaugeIdsRequestAminoMsg { - return { - type: "osmosis/poolincentives/query-gauge-ids-request", - value: QueryGaugeIdsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGaugeIdsRequestProtoMsg): QueryGaugeIdsRequest { - return QueryGaugeIdsRequest.decode(message.value); - }, - toProto(message: QueryGaugeIdsRequest): Uint8Array { - return QueryGaugeIdsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryGaugeIdsRequest): QueryGaugeIdsRequestProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryGaugeIdsRequest", - value: QueryGaugeIdsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryGaugeIdsResponse(): QueryGaugeIdsResponse { - return { - gaugeIdsWithDuration: [] - }; -} -export const QueryGaugeIdsResponse = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryGaugeIdsResponse", - aminoType: "osmosis/poolincentives/query-gauge-ids-response", - encode(message: QueryGaugeIdsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.gaugeIdsWithDuration) { - QueryGaugeIdsResponse_GaugeIdWithDuration.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGaugeIdsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGaugeIdsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gaugeIdsWithDuration.push(QueryGaugeIdsResponse_GaugeIdWithDuration.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGaugeIdsResponse { - return { - gaugeIdsWithDuration: Array.isArray(object?.gaugeIdsWithDuration) ? object.gaugeIdsWithDuration.map((e: any) => QueryGaugeIdsResponse_GaugeIdWithDuration.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryGaugeIdsResponse): unknown { - const obj: any = {}; - if (message.gaugeIdsWithDuration) { - obj.gaugeIdsWithDuration = message.gaugeIdsWithDuration.map(e => e ? QueryGaugeIdsResponse_GaugeIdWithDuration.toJSON(e) : undefined); - } else { - obj.gaugeIdsWithDuration = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryGaugeIdsResponse { - const message = createBaseQueryGaugeIdsResponse(); - message.gaugeIdsWithDuration = object.gaugeIdsWithDuration?.map(e => QueryGaugeIdsResponse_GaugeIdWithDuration.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryGaugeIdsResponseSDKType): QueryGaugeIdsResponse { - return { - gaugeIdsWithDuration: Array.isArray(object?.gauge_ids_with_duration) ? object.gauge_ids_with_duration.map((e: any) => QueryGaugeIdsResponse_GaugeIdWithDuration.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryGaugeIdsResponse): QueryGaugeIdsResponseSDKType { - const obj: any = {}; - if (message.gaugeIdsWithDuration) { - obj.gauge_ids_with_duration = message.gaugeIdsWithDuration.map(e => e ? QueryGaugeIdsResponse_GaugeIdWithDuration.toSDK(e) : undefined); - } else { - obj.gauge_ids_with_duration = []; - } - return obj; - }, - fromAmino(object: QueryGaugeIdsResponseAmino): QueryGaugeIdsResponse { - return { - gaugeIdsWithDuration: Array.isArray(object?.gauge_ids_with_duration) ? object.gauge_ids_with_duration.map((e: any) => QueryGaugeIdsResponse_GaugeIdWithDuration.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryGaugeIdsResponse): QueryGaugeIdsResponseAmino { - const obj: any = {}; - if (message.gaugeIdsWithDuration) { - obj.gauge_ids_with_duration = message.gaugeIdsWithDuration.map(e => e ? QueryGaugeIdsResponse_GaugeIdWithDuration.toAmino(e) : undefined); - } else { - obj.gauge_ids_with_duration = []; - } - return obj; - }, - fromAminoMsg(object: QueryGaugeIdsResponseAminoMsg): QueryGaugeIdsResponse { - return QueryGaugeIdsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryGaugeIdsResponse): QueryGaugeIdsResponseAminoMsg { - return { - type: "osmosis/poolincentives/query-gauge-ids-response", - value: QueryGaugeIdsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGaugeIdsResponseProtoMsg): QueryGaugeIdsResponse { - return QueryGaugeIdsResponse.decode(message.value); - }, - toProto(message: QueryGaugeIdsResponse): Uint8Array { - return QueryGaugeIdsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryGaugeIdsResponse): QueryGaugeIdsResponseProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryGaugeIdsResponse", - value: QueryGaugeIdsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryGaugeIdsResponse_GaugeIdWithDuration(): QueryGaugeIdsResponse_GaugeIdWithDuration { - return { - gaugeId: BigInt(0), - duration: Duration.fromPartial({}), - gaugeIncentivePercentage: "" - }; -} -export const QueryGaugeIdsResponse_GaugeIdWithDuration = { - typeUrl: "/osmosis.poolincentives.v1beta1.GaugeIdWithDuration", - aminoType: "osmosis/poolincentives/gauge-id-with-duration", - encode(message: QueryGaugeIdsResponse_GaugeIdWithDuration, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.gaugeId !== BigInt(0)) { - writer.uint32(8).uint64(message.gaugeId); - } - if (message.duration !== undefined) { - Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); - } - if (message.gaugeIncentivePercentage !== "") { - writer.uint32(26).string(message.gaugeIncentivePercentage); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryGaugeIdsResponse_GaugeIdWithDuration { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGaugeIdsResponse_GaugeIdWithDuration(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gaugeId = reader.uint64(); - break; - case 2: - message.duration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.gaugeIncentivePercentage = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryGaugeIdsResponse_GaugeIdWithDuration { - return { - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0), - duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined, - gaugeIncentivePercentage: isSet(object.gaugeIncentivePercentage) ? String(object.gaugeIncentivePercentage) : "" - }; - }, - toJSON(message: QueryGaugeIdsResponse_GaugeIdWithDuration): unknown { - const obj: any = {}; - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined); - message.gaugeIncentivePercentage !== undefined && (obj.gaugeIncentivePercentage = message.gaugeIncentivePercentage); - return obj; - }, - fromPartial(object: DeepPartial): QueryGaugeIdsResponse_GaugeIdWithDuration { - const message = createBaseQueryGaugeIdsResponse_GaugeIdWithDuration(); - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - message.duration = object.duration !== undefined && object.duration !== null ? Duration.fromPartial(object.duration) : undefined; - message.gaugeIncentivePercentage = object.gaugeIncentivePercentage ?? ""; - return message; - }, - fromSDK(object: QueryGaugeIdsResponse_GaugeIdWithDurationSDKType): QueryGaugeIdsResponse_GaugeIdWithDuration { - return { - gaugeId: object?.gauge_id, - duration: object.duration ? Duration.fromSDK(object.duration) : undefined, - gaugeIncentivePercentage: object?.gauge_incentive_percentage - }; - }, - toSDK(message: QueryGaugeIdsResponse_GaugeIdWithDuration): QueryGaugeIdsResponse_GaugeIdWithDurationSDKType { - const obj: any = {}; - obj.gauge_id = message.gaugeId; - message.duration !== undefined && (obj.duration = message.duration ? Duration.toSDK(message.duration) : undefined); - obj.gauge_incentive_percentage = message.gaugeIncentivePercentage; - return obj; - }, - fromAmino(object: QueryGaugeIdsResponse_GaugeIdWithDurationAmino): QueryGaugeIdsResponse_GaugeIdWithDuration { - return { - gaugeId: BigInt(object.gauge_id), - duration: object?.duration ? Duration.fromAmino(object.duration) : undefined, - gaugeIncentivePercentage: object.gauge_incentive_percentage - }; - }, - toAmino(message: QueryGaugeIdsResponse_GaugeIdWithDuration): QueryGaugeIdsResponse_GaugeIdWithDurationAmino { - const obj: any = {}; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.duration = message.duration ? Duration.toAmino(message.duration) : undefined; - obj.gauge_incentive_percentage = message.gaugeIncentivePercentage; - return obj; - }, - fromAminoMsg(object: QueryGaugeIdsResponse_GaugeIdWithDurationAminoMsg): QueryGaugeIdsResponse_GaugeIdWithDuration { - return QueryGaugeIdsResponse_GaugeIdWithDuration.fromAmino(object.value); - }, - toAminoMsg(message: QueryGaugeIdsResponse_GaugeIdWithDuration): QueryGaugeIdsResponse_GaugeIdWithDurationAminoMsg { - return { - type: "osmosis/poolincentives/gauge-id-with-duration", - value: QueryGaugeIdsResponse_GaugeIdWithDuration.toAmino(message) - }; - }, - fromProtoMsg(message: QueryGaugeIdsResponse_GaugeIdWithDurationProtoMsg): QueryGaugeIdsResponse_GaugeIdWithDuration { - return QueryGaugeIdsResponse_GaugeIdWithDuration.decode(message.value); - }, - toProto(message: QueryGaugeIdsResponse_GaugeIdWithDuration): Uint8Array { - return QueryGaugeIdsResponse_GaugeIdWithDuration.encode(message).finish(); - }, - toProtoMsg(message: QueryGaugeIdsResponse_GaugeIdWithDuration): QueryGaugeIdsResponse_GaugeIdWithDurationProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.GaugeIdWithDuration", - value: QueryGaugeIdsResponse_GaugeIdWithDuration.encode(message).finish() - }; - } -}; -function createBaseQueryDistrInfoRequest(): QueryDistrInfoRequest { - return {}; -} -export const QueryDistrInfoRequest = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryDistrInfoRequest", - aminoType: "osmosis/poolincentives/query-distr-info-request", - encode(_: QueryDistrInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDistrInfoRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDistrInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryDistrInfoRequest { - return {}; - }, - toJSON(_: QueryDistrInfoRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryDistrInfoRequest { - const message = createBaseQueryDistrInfoRequest(); - return message; - }, - fromSDK(_: QueryDistrInfoRequestSDKType): QueryDistrInfoRequest { - return {}; - }, - toSDK(_: QueryDistrInfoRequest): QueryDistrInfoRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryDistrInfoRequestAmino): QueryDistrInfoRequest { - return {}; - }, - toAmino(_: QueryDistrInfoRequest): QueryDistrInfoRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryDistrInfoRequestAminoMsg): QueryDistrInfoRequest { - return QueryDistrInfoRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDistrInfoRequest): QueryDistrInfoRequestAminoMsg { - return { - type: "osmosis/poolincentives/query-distr-info-request", - value: QueryDistrInfoRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDistrInfoRequestProtoMsg): QueryDistrInfoRequest { - return QueryDistrInfoRequest.decode(message.value); - }, - toProto(message: QueryDistrInfoRequest): Uint8Array { - return QueryDistrInfoRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDistrInfoRequest): QueryDistrInfoRequestProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryDistrInfoRequest", - value: QueryDistrInfoRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDistrInfoResponse(): QueryDistrInfoResponse { - return { - distrInfo: DistrInfo.fromPartial({}) - }; -} -export const QueryDistrInfoResponse = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryDistrInfoResponse", - aminoType: "osmosis/poolincentives/query-distr-info-response", - encode(message: QueryDistrInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.distrInfo !== undefined) { - DistrInfo.encode(message.distrInfo, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDistrInfoResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDistrInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.distrInfo = DistrInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDistrInfoResponse { - return { - distrInfo: isSet(object.distrInfo) ? DistrInfo.fromJSON(object.distrInfo) : undefined - }; - }, - toJSON(message: QueryDistrInfoResponse): unknown { - const obj: any = {}; - message.distrInfo !== undefined && (obj.distrInfo = message.distrInfo ? DistrInfo.toJSON(message.distrInfo) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDistrInfoResponse { - const message = createBaseQueryDistrInfoResponse(); - message.distrInfo = object.distrInfo !== undefined && object.distrInfo !== null ? DistrInfo.fromPartial(object.distrInfo) : undefined; - return message; - }, - fromSDK(object: QueryDistrInfoResponseSDKType): QueryDistrInfoResponse { - return { - distrInfo: object.distr_info ? DistrInfo.fromSDK(object.distr_info) : undefined - }; - }, - toSDK(message: QueryDistrInfoResponse): QueryDistrInfoResponseSDKType { - const obj: any = {}; - message.distrInfo !== undefined && (obj.distr_info = message.distrInfo ? DistrInfo.toSDK(message.distrInfo) : undefined); - return obj; - }, - fromAmino(object: QueryDistrInfoResponseAmino): QueryDistrInfoResponse { - return { - distrInfo: object?.distr_info ? DistrInfo.fromAmino(object.distr_info) : undefined - }; - }, - toAmino(message: QueryDistrInfoResponse): QueryDistrInfoResponseAmino { - const obj: any = {}; - obj.distr_info = message.distrInfo ? DistrInfo.toAmino(message.distrInfo) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDistrInfoResponseAminoMsg): QueryDistrInfoResponse { - return QueryDistrInfoResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDistrInfoResponse): QueryDistrInfoResponseAminoMsg { - return { - type: "osmosis/poolincentives/query-distr-info-response", - value: QueryDistrInfoResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDistrInfoResponseProtoMsg): QueryDistrInfoResponse { - return QueryDistrInfoResponse.decode(message.value); - }, - toProto(message: QueryDistrInfoResponse): Uint8Array { - return QueryDistrInfoResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDistrInfoResponse): QueryDistrInfoResponseProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryDistrInfoResponse", - value: QueryDistrInfoResponse.encode(message).finish() - }; - } -}; -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryParamsRequest", - aminoType: "osmosis/poolincentives/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/poolincentives/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryParamsResponse", - aminoType: "osmosis/poolincentives/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/poolincentives/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryLockableDurationsRequest(): QueryLockableDurationsRequest { - return {}; -} -export const QueryLockableDurationsRequest = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryLockableDurationsRequest", - aminoType: "osmosis/poolincentives/query-lockable-durations-request", - encode(_: QueryLockableDurationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryLockableDurationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryLockableDurationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryLockableDurationsRequest { - return {}; - }, - toJSON(_: QueryLockableDurationsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryLockableDurationsRequest { - const message = createBaseQueryLockableDurationsRequest(); - return message; - }, - fromSDK(_: QueryLockableDurationsRequestSDKType): QueryLockableDurationsRequest { - return {}; - }, - toSDK(_: QueryLockableDurationsRequest): QueryLockableDurationsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryLockableDurationsRequestAmino): QueryLockableDurationsRequest { - return {}; - }, - toAmino(_: QueryLockableDurationsRequest): QueryLockableDurationsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryLockableDurationsRequestAminoMsg): QueryLockableDurationsRequest { - return QueryLockableDurationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryLockableDurationsRequest): QueryLockableDurationsRequestAminoMsg { - return { - type: "osmosis/poolincentives/query-lockable-durations-request", - value: QueryLockableDurationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryLockableDurationsRequestProtoMsg): QueryLockableDurationsRequest { - return QueryLockableDurationsRequest.decode(message.value); - }, - toProto(message: QueryLockableDurationsRequest): Uint8Array { - return QueryLockableDurationsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryLockableDurationsRequest): QueryLockableDurationsRequestProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryLockableDurationsRequest", - value: QueryLockableDurationsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryLockableDurationsResponse(): QueryLockableDurationsResponse { - return { - lockableDurations: [] - }; -} -export const QueryLockableDurationsResponse = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryLockableDurationsResponse", - aminoType: "osmosis/poolincentives/query-lockable-durations-response", - encode(message: QueryLockableDurationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.lockableDurations) { - Duration.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryLockableDurationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryLockableDurationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockableDurations.push(Duration.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryLockableDurationsResponse { - return { - lockableDurations: Array.isArray(object?.lockableDurations) ? object.lockableDurations.map((e: any) => Duration.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryLockableDurationsResponse): unknown { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockableDurations = message.lockableDurations.map(e => e ? Duration.toJSON(e) : undefined); - } else { - obj.lockableDurations = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryLockableDurationsResponse { - const message = createBaseQueryLockableDurationsResponse(); - message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryLockableDurationsResponseSDKType): QueryLockableDurationsResponse { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseSDKType { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toSDK(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAmino(object: QueryLockableDurationsResponseAmino): QueryLockableDurationsResponse { - return { - lockableDurations: Array.isArray(object?.lockable_durations) ? object.lockable_durations.map((e: any) => Duration.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseAmino { - const obj: any = {}; - if (message.lockableDurations) { - obj.lockable_durations = message.lockableDurations.map(e => e ? Duration.toAmino(e) : undefined); - } else { - obj.lockable_durations = []; - } - return obj; - }, - fromAminoMsg(object: QueryLockableDurationsResponseAminoMsg): QueryLockableDurationsResponse { - return QueryLockableDurationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseAminoMsg { - return { - type: "osmosis/poolincentives/query-lockable-durations-response", - value: QueryLockableDurationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryLockableDurationsResponseProtoMsg): QueryLockableDurationsResponse { - return QueryLockableDurationsResponse.decode(message.value); - }, - toProto(message: QueryLockableDurationsResponse): Uint8Array { - return QueryLockableDurationsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryLockableDurationsResponse): QueryLockableDurationsResponseProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryLockableDurationsResponse", - value: QueryLockableDurationsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryIncentivizedPoolsRequest(): QueryIncentivizedPoolsRequest { - return {}; -} -export const QueryIncentivizedPoolsRequest = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryIncentivizedPoolsRequest", - aminoType: "osmosis/poolincentives/query-incentivized-pools-request", - encode(_: QueryIncentivizedPoolsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryIncentivizedPoolsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryIncentivizedPoolsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryIncentivizedPoolsRequest { - return {}; - }, - toJSON(_: QueryIncentivizedPoolsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryIncentivizedPoolsRequest { - const message = createBaseQueryIncentivizedPoolsRequest(); - return message; - }, - fromSDK(_: QueryIncentivizedPoolsRequestSDKType): QueryIncentivizedPoolsRequest { - return {}; - }, - toSDK(_: QueryIncentivizedPoolsRequest): QueryIncentivizedPoolsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryIncentivizedPoolsRequestAmino): QueryIncentivizedPoolsRequest { - return {}; - }, - toAmino(_: QueryIncentivizedPoolsRequest): QueryIncentivizedPoolsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryIncentivizedPoolsRequestAminoMsg): QueryIncentivizedPoolsRequest { - return QueryIncentivizedPoolsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryIncentivizedPoolsRequest): QueryIncentivizedPoolsRequestAminoMsg { - return { - type: "osmosis/poolincentives/query-incentivized-pools-request", - value: QueryIncentivizedPoolsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryIncentivizedPoolsRequestProtoMsg): QueryIncentivizedPoolsRequest { - return QueryIncentivizedPoolsRequest.decode(message.value); - }, - toProto(message: QueryIncentivizedPoolsRequest): Uint8Array { - return QueryIncentivizedPoolsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryIncentivizedPoolsRequest): QueryIncentivizedPoolsRequestProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryIncentivizedPoolsRequest", - value: QueryIncentivizedPoolsRequest.encode(message).finish() - }; - } -}; -function createBaseIncentivizedPool(): IncentivizedPool { - return { - poolId: BigInt(0), - lockableDuration: Duration.fromPartial({}), - gaugeId: BigInt(0) - }; -} -export const IncentivizedPool = { - typeUrl: "/osmosis.poolincentives.v1beta1.IncentivizedPool", - aminoType: "osmosis/poolincentives/incentivized-pool", - encode(message: IncentivizedPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.lockableDuration !== undefined) { - Duration.encode(message.lockableDuration, writer.uint32(18).fork()).ldelim(); - } - if (message.gaugeId !== BigInt(0)) { - writer.uint32(24).uint64(message.gaugeId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): IncentivizedPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIncentivizedPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.lockableDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.gaugeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): IncentivizedPool { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - lockableDuration: isSet(object.lockableDuration) ? Duration.fromJSON(object.lockableDuration) : undefined, - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0) - }; - }, - toJSON(message: IncentivizedPool): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.lockableDuration !== undefined && (obj.lockableDuration = message.lockableDuration ? Duration.toJSON(message.lockableDuration) : undefined); - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): IncentivizedPool { - const message = createBaseIncentivizedPool(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.lockableDuration = object.lockableDuration !== undefined && object.lockableDuration !== null ? Duration.fromPartial(object.lockableDuration) : undefined; - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: IncentivizedPoolSDKType): IncentivizedPool { - return { - poolId: object?.pool_id, - lockableDuration: object.lockable_duration ? Duration.fromSDK(object.lockable_duration) : undefined, - gaugeId: object?.gauge_id - }; - }, - toSDK(message: IncentivizedPool): IncentivizedPoolSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - message.lockableDuration !== undefined && (obj.lockable_duration = message.lockableDuration ? Duration.toSDK(message.lockableDuration) : undefined); - obj.gauge_id = message.gaugeId; - return obj; - }, - fromAmino(object: IncentivizedPoolAmino): IncentivizedPool { - return { - poolId: BigInt(object.pool_id), - lockableDuration: object?.lockable_duration ? Duration.fromAmino(object.lockable_duration) : undefined, - gaugeId: BigInt(object.gauge_id) - }; - }, - toAmino(message: IncentivizedPool): IncentivizedPoolAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.lockable_duration = message.lockableDuration ? Duration.toAmino(message.lockableDuration) : undefined; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: IncentivizedPoolAminoMsg): IncentivizedPool { - return IncentivizedPool.fromAmino(object.value); - }, - toAminoMsg(message: IncentivizedPool): IncentivizedPoolAminoMsg { - return { - type: "osmosis/poolincentives/incentivized-pool", - value: IncentivizedPool.toAmino(message) - }; - }, - fromProtoMsg(message: IncentivizedPoolProtoMsg): IncentivizedPool { - return IncentivizedPool.decode(message.value); - }, - toProto(message: IncentivizedPool): Uint8Array { - return IncentivizedPool.encode(message).finish(); - }, - toProtoMsg(message: IncentivizedPool): IncentivizedPoolProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.IncentivizedPool", - value: IncentivizedPool.encode(message).finish() - }; - } -}; -function createBaseQueryIncentivizedPoolsResponse(): QueryIncentivizedPoolsResponse { - return { - incentivizedPools: [] - }; -} -export const QueryIncentivizedPoolsResponse = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryIncentivizedPoolsResponse", - aminoType: "osmosis/poolincentives/query-incentivized-pools-response", - encode(message: QueryIncentivizedPoolsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.incentivizedPools) { - IncentivizedPool.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryIncentivizedPoolsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryIncentivizedPoolsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.incentivizedPools.push(IncentivizedPool.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryIncentivizedPoolsResponse { - return { - incentivizedPools: Array.isArray(object?.incentivizedPools) ? object.incentivizedPools.map((e: any) => IncentivizedPool.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryIncentivizedPoolsResponse): unknown { - const obj: any = {}; - if (message.incentivizedPools) { - obj.incentivizedPools = message.incentivizedPools.map(e => e ? IncentivizedPool.toJSON(e) : undefined); - } else { - obj.incentivizedPools = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryIncentivizedPoolsResponse { - const message = createBaseQueryIncentivizedPoolsResponse(); - message.incentivizedPools = object.incentivizedPools?.map(e => IncentivizedPool.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryIncentivizedPoolsResponseSDKType): QueryIncentivizedPoolsResponse { - return { - incentivizedPools: Array.isArray(object?.incentivized_pools) ? object.incentivized_pools.map((e: any) => IncentivizedPool.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryIncentivizedPoolsResponse): QueryIncentivizedPoolsResponseSDKType { - const obj: any = {}; - if (message.incentivizedPools) { - obj.incentivized_pools = message.incentivizedPools.map(e => e ? IncentivizedPool.toSDK(e) : undefined); - } else { - obj.incentivized_pools = []; - } - return obj; - }, - fromAmino(object: QueryIncentivizedPoolsResponseAmino): QueryIncentivizedPoolsResponse { - return { - incentivizedPools: Array.isArray(object?.incentivized_pools) ? object.incentivized_pools.map((e: any) => IncentivizedPool.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryIncentivizedPoolsResponse): QueryIncentivizedPoolsResponseAmino { - const obj: any = {}; - if (message.incentivizedPools) { - obj.incentivized_pools = message.incentivizedPools.map(e => e ? IncentivizedPool.toAmino(e) : undefined); - } else { - obj.incentivized_pools = []; - } - return obj; - }, - fromAminoMsg(object: QueryIncentivizedPoolsResponseAminoMsg): QueryIncentivizedPoolsResponse { - return QueryIncentivizedPoolsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryIncentivizedPoolsResponse): QueryIncentivizedPoolsResponseAminoMsg { - return { - type: "osmosis/poolincentives/query-incentivized-pools-response", - value: QueryIncentivizedPoolsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryIncentivizedPoolsResponseProtoMsg): QueryIncentivizedPoolsResponse { - return QueryIncentivizedPoolsResponse.decode(message.value); - }, - toProto(message: QueryIncentivizedPoolsResponse): Uint8Array { - return QueryIncentivizedPoolsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryIncentivizedPoolsResponse): QueryIncentivizedPoolsResponseProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryIncentivizedPoolsResponse", - value: QueryIncentivizedPoolsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryExternalIncentiveGaugesRequest(): QueryExternalIncentiveGaugesRequest { - return {}; -} -export const QueryExternalIncentiveGaugesRequest = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryExternalIncentiveGaugesRequest", - aminoType: "osmosis/poolincentives/query-external-incentive-gauges-request", - encode(_: QueryExternalIncentiveGaugesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryExternalIncentiveGaugesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryExternalIncentiveGaugesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryExternalIncentiveGaugesRequest { - return {}; - }, - toJSON(_: QueryExternalIncentiveGaugesRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryExternalIncentiveGaugesRequest { - const message = createBaseQueryExternalIncentiveGaugesRequest(); - return message; - }, - fromSDK(_: QueryExternalIncentiveGaugesRequestSDKType): QueryExternalIncentiveGaugesRequest { - return {}; - }, - toSDK(_: QueryExternalIncentiveGaugesRequest): QueryExternalIncentiveGaugesRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryExternalIncentiveGaugesRequestAmino): QueryExternalIncentiveGaugesRequest { - return {}; - }, - toAmino(_: QueryExternalIncentiveGaugesRequest): QueryExternalIncentiveGaugesRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryExternalIncentiveGaugesRequestAminoMsg): QueryExternalIncentiveGaugesRequest { - return QueryExternalIncentiveGaugesRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryExternalIncentiveGaugesRequest): QueryExternalIncentiveGaugesRequestAminoMsg { - return { - type: "osmosis/poolincentives/query-external-incentive-gauges-request", - value: QueryExternalIncentiveGaugesRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryExternalIncentiveGaugesRequestProtoMsg): QueryExternalIncentiveGaugesRequest { - return QueryExternalIncentiveGaugesRequest.decode(message.value); - }, - toProto(message: QueryExternalIncentiveGaugesRequest): Uint8Array { - return QueryExternalIncentiveGaugesRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryExternalIncentiveGaugesRequest): QueryExternalIncentiveGaugesRequestProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryExternalIncentiveGaugesRequest", - value: QueryExternalIncentiveGaugesRequest.encode(message).finish() - }; - } -}; -function createBaseQueryExternalIncentiveGaugesResponse(): QueryExternalIncentiveGaugesResponse { - return { - data: [] - }; -} -export const QueryExternalIncentiveGaugesResponse = { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryExternalIncentiveGaugesResponse", - aminoType: "osmosis/poolincentives/query-external-incentive-gauges-response", - encode(message: QueryExternalIncentiveGaugesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.data) { - Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryExternalIncentiveGaugesResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryExternalIncentiveGaugesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data.push(Gauge.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryExternalIncentiveGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryExternalIncentiveGaugesResponse): unknown { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toJSON(e) : undefined); - } else { - obj.data = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryExternalIncentiveGaugesResponse { - const message = createBaseQueryExternalIncentiveGaugesResponse(); - message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryExternalIncentiveGaugesResponseSDKType): QueryExternalIncentiveGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryExternalIncentiveGaugesResponse): QueryExternalIncentiveGaugesResponseSDKType { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toSDK(e) : undefined); - } else { - obj.data = []; - } - return obj; - }, - fromAmino(object: QueryExternalIncentiveGaugesResponseAmino): QueryExternalIncentiveGaugesResponse { - return { - data: Array.isArray(object?.data) ? object.data.map((e: any) => Gauge.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryExternalIncentiveGaugesResponse): QueryExternalIncentiveGaugesResponseAmino { - const obj: any = {}; - if (message.data) { - obj.data = message.data.map(e => e ? Gauge.toAmino(e) : undefined); - } else { - obj.data = []; - } - return obj; - }, - fromAminoMsg(object: QueryExternalIncentiveGaugesResponseAminoMsg): QueryExternalIncentiveGaugesResponse { - return QueryExternalIncentiveGaugesResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryExternalIncentiveGaugesResponse): QueryExternalIncentiveGaugesResponseAminoMsg { - return { - type: "osmosis/poolincentives/query-external-incentive-gauges-response", - value: QueryExternalIncentiveGaugesResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryExternalIncentiveGaugesResponseProtoMsg): QueryExternalIncentiveGaugesResponse { - return QueryExternalIncentiveGaugesResponse.decode(message.value); - }, - toProto(message: QueryExternalIncentiveGaugesResponse): Uint8Array { - return QueryExternalIncentiveGaugesResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryExternalIncentiveGaugesResponse): QueryExternalIncentiveGaugesResponseProtoMsg { - return { - typeUrl: "/osmosis.poolincentives.v1beta1.QueryExternalIncentiveGaugesResponse", - value: QueryExternalIncentiveGaugesResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/rpc.query.ts b/examples/interchainjs/src/codegen/osmosis/rpc.query.ts deleted file mode 100644 index d5ea1d41..00000000 --- a/examples/interchainjs/src/codegen/osmosis/rpc.query.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import { QueryClient } from "@cosmjs/stargate"; -export const createRPCQueryClient = async ({ - rpcEndpoint -}: { - rpcEndpoint: string | HttpEndpoint; -}) => { - const tmClient = await Tendermint34Client.connect(rpcEndpoint); - const client = new QueryClient(tmClient); - return { - cosmos: { - app: { - v1alpha1: (await import("../cosmos/app/v1alpha1/query.rpc.Query")).createRpcQueryExtension(client) - }, - auth: { - v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - authz: { - v1beta1: (await import("../cosmos/authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - bank: { - v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - base: { - tendermint: { - v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) - } - }, - distribution: { - v1beta1: (await import("../cosmos/distribution/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - evidence: { - v1beta1: (await import("../cosmos/evidence/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - feegrant: { - v1beta1: (await import("../cosmos/feegrant/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - gov: { - v1: (await import("../cosmos/gov/v1/query.rpc.Query")).createRpcQueryExtension(client), - v1beta1: (await import("../cosmos/gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - group: { - v1: (await import("../cosmos/group/v1/query.rpc.Query")).createRpcQueryExtension(client) - }, - mint: { - v1beta1: (await import("../cosmos/mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - nft: { - v1beta1: (await import("../cosmos/nft/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - params: { - v1beta1: (await import("../cosmos/params/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - slashing: { - v1beta1: (await import("../cosmos/slashing/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - staking: { - v1beta1: (await import("../cosmos/staking/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - tx: { - v1beta1: (await import("../cosmos/tx/v1beta1/service.rpc.Service")).createRpcQueryExtension(client) - }, - upgrade: { - v1beta1: (await import("../cosmos/upgrade/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - } - }, - osmosis: { - claim: { - v1beta1: (await import("./claim/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - epochs: { - v1beta1: (await import("./epochs/query.rpc.Query")).createRpcQueryExtension(client) - }, - gamm: { - v1beta1: (await import("./gamm/v1beta1/query.rpc.Query")).createRpcQueryExtension(client), - v2: (await import("./gamm/v2/query.rpc.Query")).createRpcQueryExtension(client) - }, - ibcratelimit: { - v1beta1: (await import("./ibc-rate-limit/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - incentives: (await import("./incentives/query.rpc.Query")).createRpcQueryExtension(client), - lockup: (await import("./lockup/query.rpc.Query")).createRpcQueryExtension(client), - mint: { - v1beta1: (await import("./mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - poolincentives: { - v1beta1: (await import("./pool-incentives/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - superfluid: (await import("./superfluid/query.rpc.Query")).createRpcQueryExtension(client), - tokenfactory: { - v1beta1: (await import("./tokenfactory/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - twap: { - v1beta1: (await import("./twap/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - }, - txfees: { - v1beta1: (await import("./txfees/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) - } - } - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/rpc.tx.ts b/examples/interchainjs/src/codegen/osmosis/rpc.tx.ts deleted file mode 100644 index 8d4b6b8b..00000000 --- a/examples/interchainjs/src/codegen/osmosis/rpc.tx.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Rpc } from "../helpers"; -export const createRPCMsgClient = async ({ - rpc -}: { - rpc: Rpc; -}) => ({ - cosmos: { - authz: { - v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - bank: { - v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - crisis: { - v1beta1: new (await import("../cosmos/crisis/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - distribution: { - v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - evidence: { - v1beta1: new (await import("../cosmos/evidence/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - feegrant: { - v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - gov: { - v1: new (await import("../cosmos/gov/v1/tx.rpc.msg")).MsgClientImpl(rpc), - v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - group: { - v1: new (await import("../cosmos/group/v1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - nft: { - v1beta1: new (await import("../cosmos/nft/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - slashing: { - v1beta1: new (await import("../cosmos/slashing/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - staking: { - v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - upgrade: { - v1beta1: new (await import("../cosmos/upgrade/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - vesting: { - v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - } - }, - osmosis: { - gamm: { - poolmodels: { - balancer: { - v1beta1: new (await import("./gamm/pool-models/balancer/tx/tx.rpc.msg")).MsgClientImpl(rpc) - }, - stableswap: { - v1beta1: new (await import("./gamm/pool-models/stableswap/tx.rpc.msg")).MsgClientImpl(rpc) - } - }, - v1beta1: new (await import("./gamm/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - }, - incentives: new (await import("./incentives/tx.rpc.msg")).MsgClientImpl(rpc), - lockup: new (await import("./lockup/tx.rpc.msg")).MsgClientImpl(rpc), - superfluid: new (await import("./superfluid/tx.rpc.msg")).MsgClientImpl(rpc), - tokenfactory: { - v1beta1: new (await import("./tokenfactory/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) - } - } -}); \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/sumtree/v1beta1/tree.ts b/examples/interchainjs/src/codegen/osmosis/sumtree/v1beta1/tree.ts deleted file mode 100644 index 64f0cd43..00000000 --- a/examples/interchainjs/src/codegen/osmosis/sumtree/v1beta1/tree.ts +++ /dev/null @@ -1,346 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; -export interface Node { - children: Child[]; -} -export interface NodeProtoMsg { - typeUrl: "/osmosis.store.v1beta1.Node"; - value: Uint8Array; -} -export interface NodeAmino { - children: ChildAmino[]; -} -export interface NodeAminoMsg { - type: "osmosis/store/node"; - value: NodeAmino; -} -export interface NodeSDKType { - children: ChildSDKType[]; -} -export interface Child { - index: Uint8Array; - accumulation: string; -} -export interface ChildProtoMsg { - typeUrl: "/osmosis.store.v1beta1.Child"; - value: Uint8Array; -} -export interface ChildAmino { - index: Uint8Array; - accumulation: string; -} -export interface ChildAminoMsg { - type: "osmosis/store/child"; - value: ChildAmino; -} -export interface ChildSDKType { - index: Uint8Array; - accumulation: string; -} -export interface Leaf { - leaf: Child | undefined; -} -export interface LeafProtoMsg { - typeUrl: "/osmosis.store.v1beta1.Leaf"; - value: Uint8Array; -} -export interface LeafAmino { - leaf?: ChildAmino | undefined; -} -export interface LeafAminoMsg { - type: "osmosis/store/leaf"; - value: LeafAmino; -} -export interface LeafSDKType { - leaf: ChildSDKType | undefined; -} -function createBaseNode(): Node { - return { - children: [] - }; -} -export const Node = { - typeUrl: "/osmosis.store.v1beta1.Node", - aminoType: "osmosis/store/node", - encode(message: Node, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.children) { - Child.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Node { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.children.push(Child.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Node { - return { - children: Array.isArray(object?.children) ? object.children.map((e: any) => Child.fromJSON(e)) : [] - }; - }, - toJSON(message: Node): unknown { - const obj: any = {}; - if (message.children) { - obj.children = message.children.map(e => e ? Child.toJSON(e) : undefined); - } else { - obj.children = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Node { - const message = createBaseNode(); - message.children = object.children?.map(e => Child.fromPartial(e)) || []; - return message; - }, - fromSDK(object: NodeSDKType): Node { - return { - children: Array.isArray(object?.children) ? object.children.map((e: any) => Child.fromSDK(e)) : [] - }; - }, - toSDK(message: Node): NodeSDKType { - const obj: any = {}; - if (message.children) { - obj.children = message.children.map(e => e ? Child.toSDK(e) : undefined); - } else { - obj.children = []; - } - return obj; - }, - fromAmino(object: NodeAmino): Node { - return { - children: Array.isArray(object?.children) ? object.children.map((e: any) => Child.fromAmino(e)) : [] - }; - }, - toAmino(message: Node): NodeAmino { - const obj: any = {}; - if (message.children) { - obj.children = message.children.map(e => e ? Child.toAmino(e) : undefined); - } else { - obj.children = []; - } - return obj; - }, - fromAminoMsg(object: NodeAminoMsg): Node { - return Node.fromAmino(object.value); - }, - toAminoMsg(message: Node): NodeAminoMsg { - return { - type: "osmosis/store/node", - value: Node.toAmino(message) - }; - }, - fromProtoMsg(message: NodeProtoMsg): Node { - return Node.decode(message.value); - }, - toProto(message: Node): Uint8Array { - return Node.encode(message).finish(); - }, - toProtoMsg(message: Node): NodeProtoMsg { - return { - typeUrl: "/osmosis.store.v1beta1.Node", - value: Node.encode(message).finish() - }; - } -}; -function createBaseChild(): Child { - return { - index: new Uint8Array(), - accumulation: "" - }; -} -export const Child = { - typeUrl: "/osmosis.store.v1beta1.Child", - aminoType: "osmosis/store/child", - encode(message: Child, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index.length !== 0) { - writer.uint32(10).bytes(message.index); - } - if (message.accumulation !== "") { - writer.uint32(18).string(message.accumulation); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Child { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChild(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.bytes(); - break; - case 2: - message.accumulation = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Child { - return { - index: isSet(object.index) ? bytesFromBase64(object.index) : new Uint8Array(), - accumulation: isSet(object.accumulation) ? String(object.accumulation) : "" - }; - }, - toJSON(message: Child): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = base64FromBytes(message.index !== undefined ? message.index : new Uint8Array())); - message.accumulation !== undefined && (obj.accumulation = message.accumulation); - return obj; - }, - fromPartial(object: DeepPartial): Child { - const message = createBaseChild(); - message.index = object.index ?? new Uint8Array(); - message.accumulation = object.accumulation ?? ""; - return message; - }, - fromSDK(object: ChildSDKType): Child { - return { - index: object?.index, - accumulation: object?.accumulation - }; - }, - toSDK(message: Child): ChildSDKType { - const obj: any = {}; - obj.index = message.index; - obj.accumulation = message.accumulation; - return obj; - }, - fromAmino(object: ChildAmino): Child { - return { - index: object.index, - accumulation: object.accumulation - }; - }, - toAmino(message: Child): ChildAmino { - const obj: any = {}; - obj.index = message.index; - obj.accumulation = message.accumulation; - return obj; - }, - fromAminoMsg(object: ChildAminoMsg): Child { - return Child.fromAmino(object.value); - }, - toAminoMsg(message: Child): ChildAminoMsg { - return { - type: "osmosis/store/child", - value: Child.toAmino(message) - }; - }, - fromProtoMsg(message: ChildProtoMsg): Child { - return Child.decode(message.value); - }, - toProto(message: Child): Uint8Array { - return Child.encode(message).finish(); - }, - toProtoMsg(message: Child): ChildProtoMsg { - return { - typeUrl: "/osmosis.store.v1beta1.Child", - value: Child.encode(message).finish() - }; - } -}; -function createBaseLeaf(): Leaf { - return { - leaf: Child.fromPartial({}) - }; -} -export const Leaf = { - typeUrl: "/osmosis.store.v1beta1.Leaf", - aminoType: "osmosis/store/leaf", - encode(message: Leaf, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.leaf !== undefined) { - Child.encode(message.leaf, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Leaf { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLeaf(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leaf = Child.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Leaf { - return { - leaf: isSet(object.leaf) ? Child.fromJSON(object.leaf) : undefined - }; - }, - toJSON(message: Leaf): unknown { - const obj: any = {}; - message.leaf !== undefined && (obj.leaf = message.leaf ? Child.toJSON(message.leaf) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Leaf { - const message = createBaseLeaf(); - message.leaf = object.leaf !== undefined && object.leaf !== null ? Child.fromPartial(object.leaf) : undefined; - return message; - }, - fromSDK(object: LeafSDKType): Leaf { - return { - leaf: object.leaf ? Child.fromSDK(object.leaf) : undefined - }; - }, - toSDK(message: Leaf): LeafSDKType { - const obj: any = {}; - message.leaf !== undefined && (obj.leaf = message.leaf ? Child.toSDK(message.leaf) : undefined); - return obj; - }, - fromAmino(object: LeafAmino): Leaf { - return { - leaf: object?.leaf ? Child.fromAmino(object.leaf) : undefined - }; - }, - toAmino(message: Leaf): LeafAmino { - const obj: any = {}; - obj.leaf = message.leaf ? Child.toAmino(message.leaf) : undefined; - return obj; - }, - fromAminoMsg(object: LeafAminoMsg): Leaf { - return Leaf.fromAmino(object.value); - }, - toAminoMsg(message: Leaf): LeafAminoMsg { - return { - type: "osmosis/store/leaf", - value: Leaf.toAmino(message) - }; - }, - fromProtoMsg(message: LeafProtoMsg): Leaf { - return Leaf.decode(message.value); - }, - toProto(message: Leaf): Uint8Array { - return Leaf.encode(message).finish(); - }, - toProtoMsg(message: Leaf): LeafProtoMsg { - return { - typeUrl: "/osmosis.store.v1beta1.Leaf", - value: Leaf.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/genesis.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/genesis.ts deleted file mode 100644 index 9712cd13..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/genesis.ts +++ /dev/null @@ -1,252 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { SuperfluidAsset, SuperfluidAssetAmino, SuperfluidAssetSDKType, OsmoEquivalentMultiplierRecord, OsmoEquivalentMultiplierRecordAmino, OsmoEquivalentMultiplierRecordSDKType, SuperfluidIntermediaryAccount, SuperfluidIntermediaryAccountAmino, SuperfluidIntermediaryAccountSDKType, LockIdIntermediaryAccountConnection, LockIdIntermediaryAccountConnectionAmino, LockIdIntermediaryAccountConnectionSDKType } from "./superfluid"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** GenesisState defines the module's genesis state. */ -export interface GenesisState { - params: Params | undefined; - /** - * superfluid_assets defines the registered superfluid assets that have been - * registered via governance. - */ - superfluidAssets: SuperfluidAsset[]; - /** - * osmo_equivalent_multipliers is the records of osmo equivalent amount of - * each superfluid registered pool, updated every epoch. - */ - osmoEquivalentMultipliers: OsmoEquivalentMultiplierRecord[]; - /** - * intermediary_accounts is a secondary account for superfluid staking that - * plays an intermediary role between validators and the delegators. - */ - intermediaryAccounts: SuperfluidIntermediaryAccount[]; - intemediaryAccountConnections: LockIdIntermediaryAccountConnection[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.superfluid.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the module's genesis state. */ -export interface GenesisStateAmino { - params?: ParamsAmino | undefined; - /** - * superfluid_assets defines the registered superfluid assets that have been - * registered via governance. - */ - superfluid_assets: SuperfluidAssetAmino[]; - /** - * osmo_equivalent_multipliers is the records of osmo equivalent amount of - * each superfluid registered pool, updated every epoch. - */ - osmo_equivalent_multipliers: OsmoEquivalentMultiplierRecordAmino[]; - /** - * intermediary_accounts is a secondary account for superfluid staking that - * plays an intermediary role between validators and the delegators. - */ - intermediary_accounts: SuperfluidIntermediaryAccountAmino[]; - intemediary_account_connections: LockIdIntermediaryAccountConnectionAmino[]; -} -export interface GenesisStateAminoMsg { - type: "osmosis/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - superfluid_assets: SuperfluidAssetSDKType[]; - osmo_equivalent_multipliers: OsmoEquivalentMultiplierRecordSDKType[]; - intermediary_accounts: SuperfluidIntermediaryAccountSDKType[]; - intemediary_account_connections: LockIdIntermediaryAccountConnectionSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - superfluidAssets: [], - osmoEquivalentMultipliers: [], - intermediaryAccounts: [], - intemediaryAccountConnections: [] - }; -} -export const GenesisState = { - typeUrl: "/osmosis.superfluid.GenesisState", - aminoType: "osmosis/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.superfluidAssets) { - SuperfluidAsset.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.osmoEquivalentMultipliers) { - OsmoEquivalentMultiplierRecord.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.intermediaryAccounts) { - SuperfluidIntermediaryAccount.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.intemediaryAccountConnections) { - LockIdIntermediaryAccountConnection.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.superfluidAssets.push(SuperfluidAsset.decode(reader, reader.uint32())); - break; - case 3: - message.osmoEquivalentMultipliers.push(OsmoEquivalentMultiplierRecord.decode(reader, reader.uint32())); - break; - case 4: - message.intermediaryAccounts.push(SuperfluidIntermediaryAccount.decode(reader, reader.uint32())); - break; - case 5: - message.intemediaryAccountConnections.push(LockIdIntermediaryAccountConnection.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - superfluidAssets: Array.isArray(object?.superfluidAssets) ? object.superfluidAssets.map((e: any) => SuperfluidAsset.fromJSON(e)) : [], - osmoEquivalentMultipliers: Array.isArray(object?.osmoEquivalentMultipliers) ? object.osmoEquivalentMultipliers.map((e: any) => OsmoEquivalentMultiplierRecord.fromJSON(e)) : [], - intermediaryAccounts: Array.isArray(object?.intermediaryAccounts) ? object.intermediaryAccounts.map((e: any) => SuperfluidIntermediaryAccount.fromJSON(e)) : [], - intemediaryAccountConnections: Array.isArray(object?.intemediaryAccountConnections) ? object.intemediaryAccountConnections.map((e: any) => LockIdIntermediaryAccountConnection.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.superfluidAssets) { - obj.superfluidAssets = message.superfluidAssets.map(e => e ? SuperfluidAsset.toJSON(e) : undefined); - } else { - obj.superfluidAssets = []; - } - if (message.osmoEquivalentMultipliers) { - obj.osmoEquivalentMultipliers = message.osmoEquivalentMultipliers.map(e => e ? OsmoEquivalentMultiplierRecord.toJSON(e) : undefined); - } else { - obj.osmoEquivalentMultipliers = []; - } - if (message.intermediaryAccounts) { - obj.intermediaryAccounts = message.intermediaryAccounts.map(e => e ? SuperfluidIntermediaryAccount.toJSON(e) : undefined); - } else { - obj.intermediaryAccounts = []; - } - if (message.intemediaryAccountConnections) { - obj.intemediaryAccountConnections = message.intemediaryAccountConnections.map(e => e ? LockIdIntermediaryAccountConnection.toJSON(e) : undefined); - } else { - obj.intemediaryAccountConnections = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.superfluidAssets = object.superfluidAssets?.map(e => SuperfluidAsset.fromPartial(e)) || []; - message.osmoEquivalentMultipliers = object.osmoEquivalentMultipliers?.map(e => OsmoEquivalentMultiplierRecord.fromPartial(e)) || []; - message.intermediaryAccounts = object.intermediaryAccounts?.map(e => SuperfluidIntermediaryAccount.fromPartial(e)) || []; - message.intemediaryAccountConnections = object.intemediaryAccountConnections?.map(e => LockIdIntermediaryAccountConnection.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - superfluidAssets: Array.isArray(object?.superfluid_assets) ? object.superfluid_assets.map((e: any) => SuperfluidAsset.fromSDK(e)) : [], - osmoEquivalentMultipliers: Array.isArray(object?.osmo_equivalent_multipliers) ? object.osmo_equivalent_multipliers.map((e: any) => OsmoEquivalentMultiplierRecord.fromSDK(e)) : [], - intermediaryAccounts: Array.isArray(object?.intermediary_accounts) ? object.intermediary_accounts.map((e: any) => SuperfluidIntermediaryAccount.fromSDK(e)) : [], - intemediaryAccountConnections: Array.isArray(object?.intemediary_account_connections) ? object.intemediary_account_connections.map((e: any) => LockIdIntermediaryAccountConnection.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.superfluidAssets) { - obj.superfluid_assets = message.superfluidAssets.map(e => e ? SuperfluidAsset.toSDK(e) : undefined); - } else { - obj.superfluid_assets = []; - } - if (message.osmoEquivalentMultipliers) { - obj.osmo_equivalent_multipliers = message.osmoEquivalentMultipliers.map(e => e ? OsmoEquivalentMultiplierRecord.toSDK(e) : undefined); - } else { - obj.osmo_equivalent_multipliers = []; - } - if (message.intermediaryAccounts) { - obj.intermediary_accounts = message.intermediaryAccounts.map(e => e ? SuperfluidIntermediaryAccount.toSDK(e) : undefined); - } else { - obj.intermediary_accounts = []; - } - if (message.intemediaryAccountConnections) { - obj.intemediary_account_connections = message.intemediaryAccountConnections.map(e => e ? LockIdIntermediaryAccountConnection.toSDK(e) : undefined); - } else { - obj.intemediary_account_connections = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - superfluidAssets: Array.isArray(object?.superfluid_assets) ? object.superfluid_assets.map((e: any) => SuperfluidAsset.fromAmino(e)) : [], - osmoEquivalentMultipliers: Array.isArray(object?.osmo_equivalent_multipliers) ? object.osmo_equivalent_multipliers.map((e: any) => OsmoEquivalentMultiplierRecord.fromAmino(e)) : [], - intermediaryAccounts: Array.isArray(object?.intermediary_accounts) ? object.intermediary_accounts.map((e: any) => SuperfluidIntermediaryAccount.fromAmino(e)) : [], - intemediaryAccountConnections: Array.isArray(object?.intemediary_account_connections) ? object.intemediary_account_connections.map((e: any) => LockIdIntermediaryAccountConnection.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.superfluidAssets) { - obj.superfluid_assets = message.superfluidAssets.map(e => e ? SuperfluidAsset.toAmino(e) : undefined); - } else { - obj.superfluid_assets = []; - } - if (message.osmoEquivalentMultipliers) { - obj.osmo_equivalent_multipliers = message.osmoEquivalentMultipliers.map(e => e ? OsmoEquivalentMultiplierRecord.toAmino(e) : undefined); - } else { - obj.osmo_equivalent_multipliers = []; - } - if (message.intermediaryAccounts) { - obj.intermediary_accounts = message.intermediaryAccounts.map(e => e ? SuperfluidIntermediaryAccount.toAmino(e) : undefined); - } else { - obj.intermediary_accounts = []; - } - if (message.intemediaryAccountConnections) { - obj.intemediary_account_connections = message.intemediaryAccountConnections.map(e => e ? LockIdIntermediaryAccountConnection.toAmino(e) : undefined); - } else { - obj.intemediary_account_connections = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.superfluid.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/params.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/params.ts deleted file mode 100644 index 2da18cd5..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/params.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { Decimal } from "@cosmjs/math"; -import { isSet, DeepPartial } from "../../helpers"; -/** Params holds parameters for the superfluid module */ -export interface Params { - /** - * minimum_risk_factor is to be cut on OSMO equivalent value of lp tokens for - * superfluid staking, default: 5%. The minimum risk factor works - * to counter-balance the staked amount on chain's exposure to various asset - * volatilities, and have base staking be 'resistant' to volatility. - */ - minimumRiskFactor: string; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.superfluid.Params"; - value: Uint8Array; -} -/** Params holds parameters for the superfluid module */ -export interface ParamsAmino { - /** - * minimum_risk_factor is to be cut on OSMO equivalent value of lp tokens for - * superfluid staking, default: 5%. The minimum risk factor works - * to counter-balance the staked amount on chain's exposure to various asset - * volatilities, and have base staking be 'resistant' to volatility. - */ - minimum_risk_factor: string; -} -export interface ParamsAminoMsg { - type: "osmosis/params"; - value: ParamsAmino; -} -/** Params holds parameters for the superfluid module */ -export interface ParamsSDKType { - minimum_risk_factor: string; -} -function createBaseParams(): Params { - return { - minimumRiskFactor: "" - }; -} -export const Params = { - typeUrl: "/osmosis.superfluid.Params", - aminoType: "osmosis/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.minimumRiskFactor !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.minimumRiskFactor, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.minimumRiskFactor = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - minimumRiskFactor: isSet(object.minimumRiskFactor) ? String(object.minimumRiskFactor) : "" - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.minimumRiskFactor !== undefined && (obj.minimumRiskFactor = message.minimumRiskFactor); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.minimumRiskFactor = object.minimumRiskFactor ?? ""; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - minimumRiskFactor: object?.minimum_risk_factor - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.minimum_risk_factor = message.minimumRiskFactor; - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - minimumRiskFactor: object.minimum_risk_factor - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.minimum_risk_factor = message.minimumRiskFactor; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.superfluid.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/query.rpc.Query.ts deleted file mode 100644 index 051bf42f..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/query.rpc.Query.ts +++ /dev/null @@ -1,567 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, AssetTypeRequest, AssetTypeResponse, AllAssetsRequest, AllAssetsResponse, AssetMultiplierRequest, AssetMultiplierResponse, AllIntermediaryAccountsRequest, AllIntermediaryAccountsResponse, ConnectedIntermediaryAccountRequest, ConnectedIntermediaryAccountResponse, QueryTotalDelegationByValidatorForDenomRequest, QueryTotalDelegationByValidatorForDenomResponse, TotalSuperfluidDelegationsRequest, TotalSuperfluidDelegationsResponse, SuperfluidDelegationAmountRequest, SuperfluidDelegationAmountResponse, SuperfluidDelegationsByDelegatorRequest, SuperfluidDelegationsByDelegatorResponse, SuperfluidUndelegationsByDelegatorRequest, SuperfluidUndelegationsByDelegatorResponse, SuperfluidDelegationsByValidatorDenomRequest, SuperfluidDelegationsByValidatorDenomResponse, EstimateSuperfluidDelegatedAmountByValidatorDenomRequest, EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, QueryTotalDelegationByDelegatorRequest, QueryTotalDelegationByDelegatorResponse, QueryUnpoolWhitelistRequest, QueryUnpoolWhitelistResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** Params returns the total set of superfluid parameters. */ - params(request?: QueryParamsRequest): Promise; - /** - * Returns superfluid asset type, whether if it's a native asset or an lp - * share. - */ - assetType(request: AssetTypeRequest): Promise; - /** Returns all registered superfluid assets. */ - allAssets(request?: AllAssetsRequest): Promise; - /** Returns the osmo equivalent multiplier used in the most recent epoch. */ - assetMultiplier(request: AssetMultiplierRequest): Promise; - /** Returns all superfluid intermediary accounts. */ - allIntermediaryAccounts(request?: AllIntermediaryAccountsRequest): Promise; - /** Returns intermediary account connected to a superfluid staked lock by id */ - connectedIntermediaryAccount(request: ConnectedIntermediaryAccountRequest): Promise; - /** Returns the amount of delegations of specific denom for all validators */ - totalDelegationByValidatorForDenom(request: QueryTotalDelegationByValidatorForDenomRequest): Promise; - /** - * Returns the total amount of osmo superfluidly staked. - * Response is denominated in uosmo. - */ - totalSuperfluidDelegations(request?: TotalSuperfluidDelegationsRequest): Promise; - /** - * Returns the coins superfluid delegated for the delegator, validator, denom - * triplet - */ - superfluidDelegationAmount(request: SuperfluidDelegationAmountRequest): Promise; - /** Returns all the delegated superfluid poistions for a specific delegator. */ - superfluidDelegationsByDelegator(request: SuperfluidDelegationsByDelegatorRequest): Promise; - /** Returns all the undelegating superfluid poistions for a specific delegator. */ - superfluidUndelegationsByDelegator(request: SuperfluidUndelegationsByDelegatorRequest): Promise; - /** - * Returns all the superfluid positions of a specific denom delegated to one - * validator - */ - superfluidDelegationsByValidatorDenom(request: SuperfluidDelegationsByValidatorDenomRequest): Promise; - /** - * Returns the amount of a specific denom delegated to a specific validator - * This is labeled an estimate, because the way it calculates the amount can - * lead rounding errors from the true delegated amount - */ - estimateSuperfluidDelegatedAmountByValidatorDenom(request: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): Promise; - /** Returns the specified delegations for a specific delegator */ - totalDelegationByDelegator(request: QueryTotalDelegationByDelegatorRequest): Promise; - /** Returns a list of whitelisted pool ids to unpool. */ - unpoolWhitelist(request?: QueryUnpoolWhitelistRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.assetType = this.assetType.bind(this); - this.allAssets = this.allAssets.bind(this); - this.assetMultiplier = this.assetMultiplier.bind(this); - this.allIntermediaryAccounts = this.allIntermediaryAccounts.bind(this); - this.connectedIntermediaryAccount = this.connectedIntermediaryAccount.bind(this); - this.totalDelegationByValidatorForDenom = this.totalDelegationByValidatorForDenom.bind(this); - this.totalSuperfluidDelegations = this.totalSuperfluidDelegations.bind(this); - this.superfluidDelegationAmount = this.superfluidDelegationAmount.bind(this); - this.superfluidDelegationsByDelegator = this.superfluidDelegationsByDelegator.bind(this); - this.superfluidUndelegationsByDelegator = this.superfluidUndelegationsByDelegator.bind(this); - this.superfluidDelegationsByValidatorDenom = this.superfluidDelegationsByValidatorDenom.bind(this); - this.estimateSuperfluidDelegatedAmountByValidatorDenom = this.estimateSuperfluidDelegatedAmountByValidatorDenom.bind(this); - this.totalDelegationByDelegator = this.totalDelegationByDelegator.bind(this); - this.unpoolWhitelist = this.unpoolWhitelist.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - assetType(request: AssetTypeRequest): Promise { - const data = AssetTypeRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "AssetType", data); - return promise.then(data => AssetTypeResponse.decode(new BinaryReader(data))); - } - allAssets(request: AllAssetsRequest = {}): Promise { - const data = AllAssetsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "AllAssets", data); - return promise.then(data => AllAssetsResponse.decode(new BinaryReader(data))); - } - assetMultiplier(request: AssetMultiplierRequest): Promise { - const data = AssetMultiplierRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "AssetMultiplier", data); - return promise.then(data => AssetMultiplierResponse.decode(new BinaryReader(data))); - } - allIntermediaryAccounts(request: AllIntermediaryAccountsRequest = { - pagination: undefined - }): Promise { - const data = AllIntermediaryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "AllIntermediaryAccounts", data); - return promise.then(data => AllIntermediaryAccountsResponse.decode(new BinaryReader(data))); - } - connectedIntermediaryAccount(request: ConnectedIntermediaryAccountRequest): Promise { - const data = ConnectedIntermediaryAccountRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "ConnectedIntermediaryAccount", data); - return promise.then(data => ConnectedIntermediaryAccountResponse.decode(new BinaryReader(data))); - } - totalDelegationByValidatorForDenom(request: QueryTotalDelegationByValidatorForDenomRequest): Promise { - const data = QueryTotalDelegationByValidatorForDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "TotalDelegationByValidatorForDenom", data); - return promise.then(data => QueryTotalDelegationByValidatorForDenomResponse.decode(new BinaryReader(data))); - } - totalSuperfluidDelegations(request: TotalSuperfluidDelegationsRequest = {}): Promise { - const data = TotalSuperfluidDelegationsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "TotalSuperfluidDelegations", data); - return promise.then(data => TotalSuperfluidDelegationsResponse.decode(new BinaryReader(data))); - } - superfluidDelegationAmount(request: SuperfluidDelegationAmountRequest): Promise { - const data = SuperfluidDelegationAmountRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "SuperfluidDelegationAmount", data); - return promise.then(data => SuperfluidDelegationAmountResponse.decode(new BinaryReader(data))); - } - superfluidDelegationsByDelegator(request: SuperfluidDelegationsByDelegatorRequest): Promise { - const data = SuperfluidDelegationsByDelegatorRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "SuperfluidDelegationsByDelegator", data); - return promise.then(data => SuperfluidDelegationsByDelegatorResponse.decode(new BinaryReader(data))); - } - superfluidUndelegationsByDelegator(request: SuperfluidUndelegationsByDelegatorRequest): Promise { - const data = SuperfluidUndelegationsByDelegatorRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "SuperfluidUndelegationsByDelegator", data); - return promise.then(data => SuperfluidUndelegationsByDelegatorResponse.decode(new BinaryReader(data))); - } - superfluidDelegationsByValidatorDenom(request: SuperfluidDelegationsByValidatorDenomRequest): Promise { - const data = SuperfluidDelegationsByValidatorDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "SuperfluidDelegationsByValidatorDenom", data); - return promise.then(data => SuperfluidDelegationsByValidatorDenomResponse.decode(new BinaryReader(data))); - } - estimateSuperfluidDelegatedAmountByValidatorDenom(request: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): Promise { - const data = EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "EstimateSuperfluidDelegatedAmountByValidatorDenom", data); - return promise.then(data => EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.decode(new BinaryReader(data))); - } - totalDelegationByDelegator(request: QueryTotalDelegationByDelegatorRequest): Promise { - const data = QueryTotalDelegationByDelegatorRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "TotalDelegationByDelegator", data); - return promise.then(data => QueryTotalDelegationByDelegatorResponse.decode(new BinaryReader(data))); - } - unpoolWhitelist(request: QueryUnpoolWhitelistRequest = {}): Promise { - const data = QueryUnpoolWhitelistRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Query", "UnpoolWhitelist", data); - return promise.then(data => QueryUnpoolWhitelistResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - assetType(request: AssetTypeRequest): Promise { - return queryService.assetType(request); - }, - allAssets(request?: AllAssetsRequest): Promise { - return queryService.allAssets(request); - }, - assetMultiplier(request: AssetMultiplierRequest): Promise { - return queryService.assetMultiplier(request); - }, - allIntermediaryAccounts(request?: AllIntermediaryAccountsRequest): Promise { - return queryService.allIntermediaryAccounts(request); - }, - connectedIntermediaryAccount(request: ConnectedIntermediaryAccountRequest): Promise { - return queryService.connectedIntermediaryAccount(request); - }, - totalDelegationByValidatorForDenom(request: QueryTotalDelegationByValidatorForDenomRequest): Promise { - return queryService.totalDelegationByValidatorForDenom(request); - }, - totalSuperfluidDelegations(request?: TotalSuperfluidDelegationsRequest): Promise { - return queryService.totalSuperfluidDelegations(request); - }, - superfluidDelegationAmount(request: SuperfluidDelegationAmountRequest): Promise { - return queryService.superfluidDelegationAmount(request); - }, - superfluidDelegationsByDelegator(request: SuperfluidDelegationsByDelegatorRequest): Promise { - return queryService.superfluidDelegationsByDelegator(request); - }, - superfluidUndelegationsByDelegator(request: SuperfluidUndelegationsByDelegatorRequest): Promise { - return queryService.superfluidUndelegationsByDelegator(request); - }, - superfluidDelegationsByValidatorDenom(request: SuperfluidDelegationsByValidatorDenomRequest): Promise { - return queryService.superfluidDelegationsByValidatorDenom(request); - }, - estimateSuperfluidDelegatedAmountByValidatorDenom(request: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): Promise { - return queryService.estimateSuperfluidDelegatedAmountByValidatorDenom(request); - }, - totalDelegationByDelegator(request: QueryTotalDelegationByDelegatorRequest): Promise { - return queryService.totalDelegationByDelegator(request); - }, - unpoolWhitelist(request?: QueryUnpoolWhitelistRequest): Promise { - return queryService.unpoolWhitelist(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseAssetTypeQuery extends ReactQueryParams { - request: AssetTypeRequest; -} -export interface UseAllAssetsQuery extends ReactQueryParams { - request?: AllAssetsRequest; -} -export interface UseAssetMultiplierQuery extends ReactQueryParams { - request: AssetMultiplierRequest; -} -export interface UseAllIntermediaryAccountsQuery extends ReactQueryParams { - request?: AllIntermediaryAccountsRequest; -} -export interface UseConnectedIntermediaryAccountQuery extends ReactQueryParams { - request: ConnectedIntermediaryAccountRequest; -} -export interface UseTotalDelegationByValidatorForDenomQuery extends ReactQueryParams { - request: QueryTotalDelegationByValidatorForDenomRequest; -} -export interface UseTotalSuperfluidDelegationsQuery extends ReactQueryParams { - request?: TotalSuperfluidDelegationsRequest; -} -export interface UseSuperfluidDelegationAmountQuery extends ReactQueryParams { - request: SuperfluidDelegationAmountRequest; -} -export interface UseSuperfluidDelegationsByDelegatorQuery extends ReactQueryParams { - request: SuperfluidDelegationsByDelegatorRequest; -} -export interface UseSuperfluidUndelegationsByDelegatorQuery extends ReactQueryParams { - request: SuperfluidUndelegationsByDelegatorRequest; -} -export interface UseSuperfluidDelegationsByValidatorDenomQuery extends ReactQueryParams { - request: SuperfluidDelegationsByValidatorDenomRequest; -} -export interface UseEstimateSuperfluidDelegatedAmountByValidatorDenomQuery extends ReactQueryParams { - request: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest; -} -export interface UseTotalDelegationByDelegatorQuery extends ReactQueryParams { - request: QueryTotalDelegationByDelegatorRequest; -} -export interface UseUnpoolWhitelistQuery extends ReactQueryParams { - request?: QueryUnpoolWhitelistRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useAssetType = ({ - request, - options - }: UseAssetTypeQuery) => { - return useQuery(["assetTypeQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.assetType(request); - }, options); - }; - const useAllAssets = ({ - request, - options - }: UseAllAssetsQuery) => { - return useQuery(["allAssetsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allAssets(request); - }, options); - }; - const useAssetMultiplier = ({ - request, - options - }: UseAssetMultiplierQuery) => { - return useQuery(["assetMultiplierQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.assetMultiplier(request); - }, options); - }; - const useAllIntermediaryAccounts = ({ - request, - options - }: UseAllIntermediaryAccountsQuery) => { - return useQuery(["allIntermediaryAccountsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.allIntermediaryAccounts(request); - }, options); - }; - const useConnectedIntermediaryAccount = ({ - request, - options - }: UseConnectedIntermediaryAccountQuery) => { - return useQuery(["connectedIntermediaryAccountQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.connectedIntermediaryAccount(request); - }, options); - }; - const useTotalDelegationByValidatorForDenom = ({ - request, - options - }: UseTotalDelegationByValidatorForDenomQuery) => { - return useQuery(["totalDelegationByValidatorForDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalDelegationByValidatorForDenom(request); - }, options); - }; - const useTotalSuperfluidDelegations = ({ - request, - options - }: UseTotalSuperfluidDelegationsQuery) => { - return useQuery(["totalSuperfluidDelegationsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalSuperfluidDelegations(request); - }, options); - }; - const useSuperfluidDelegationAmount = ({ - request, - options - }: UseSuperfluidDelegationAmountQuery) => { - return useQuery(["superfluidDelegationAmountQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.superfluidDelegationAmount(request); - }, options); - }; - const useSuperfluidDelegationsByDelegator = ({ - request, - options - }: UseSuperfluidDelegationsByDelegatorQuery) => { - return useQuery(["superfluidDelegationsByDelegatorQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.superfluidDelegationsByDelegator(request); - }, options); - }; - const useSuperfluidUndelegationsByDelegator = ({ - request, - options - }: UseSuperfluidUndelegationsByDelegatorQuery) => { - return useQuery(["superfluidUndelegationsByDelegatorQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.superfluidUndelegationsByDelegator(request); - }, options); - }; - const useSuperfluidDelegationsByValidatorDenom = ({ - request, - options - }: UseSuperfluidDelegationsByValidatorDenomQuery) => { - return useQuery(["superfluidDelegationsByValidatorDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.superfluidDelegationsByValidatorDenom(request); - }, options); - }; - const useEstimateSuperfluidDelegatedAmountByValidatorDenom = ({ - request, - options - }: UseEstimateSuperfluidDelegatedAmountByValidatorDenomQuery) => { - return useQuery(["estimateSuperfluidDelegatedAmountByValidatorDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.estimateSuperfluidDelegatedAmountByValidatorDenom(request); - }, options); - }; - const useTotalDelegationByDelegator = ({ - request, - options - }: UseTotalDelegationByDelegatorQuery) => { - return useQuery(["totalDelegationByDelegatorQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.totalDelegationByDelegator(request); - }, options); - }; - const useUnpoolWhitelist = ({ - request, - options - }: UseUnpoolWhitelistQuery) => { - return useQuery(["unpoolWhitelistQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.unpoolWhitelist(request); - }, options); - }; - return { - /** Params returns the total set of superfluid parameters. */useParams, - /** - * Returns superfluid asset type, whether if it's a native asset or an lp - * share. - */ - useAssetType, - /** Returns all registered superfluid assets. */useAllAssets, - /** Returns the osmo equivalent multiplier used in the most recent epoch. */useAssetMultiplier, - /** Returns all superfluid intermediary accounts. */useAllIntermediaryAccounts, - /** Returns intermediary account connected to a superfluid staked lock by id */useConnectedIntermediaryAccount, - /** Returns the amount of delegations of specific denom for all validators */useTotalDelegationByValidatorForDenom, - /** - * Returns the total amount of osmo superfluidly staked. - * Response is denominated in uosmo. - */ - useTotalSuperfluidDelegations, - /** - * Returns the coins superfluid delegated for the delegator, validator, denom - * triplet - */ - useSuperfluidDelegationAmount, - /** Returns all the delegated superfluid poistions for a specific delegator. */useSuperfluidDelegationsByDelegator, - /** Returns all the undelegating superfluid poistions for a specific delegator. */useSuperfluidUndelegationsByDelegator, - /** - * Returns all the superfluid positions of a specific denom delegated to one - * validator - */ - useSuperfluidDelegationsByValidatorDenom, - /** - * Returns the amount of a specific denom delegated to a specific validator - * This is labeled an estimate, because the way it calculates the amount can - * lead rounding errors from the true delegated amount - */ - useEstimateSuperfluidDelegatedAmountByValidatorDenom, - /** Returns the specified delegations for a specific delegator */useTotalDelegationByDelegator, - /** Returns a list of whitelisted pool ids to unpool. */useUnpoolWhitelist - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryAssetTypeStore { - store = new QueryStore(queryService?.assetType); - assetType(request: AssetTypeRequest) { - return this.store.getData(request); - } - } - class QueryAllAssetsStore { - store = new QueryStore(queryService?.allAssets); - allAssets(request: AllAssetsRequest) { - return this.store.getData(request); - } - } - class QueryAssetMultiplierStore { - store = new QueryStore(queryService?.assetMultiplier); - assetMultiplier(request: AssetMultiplierRequest) { - return this.store.getData(request); - } - } - class QueryAllIntermediaryAccountsStore { - store = new QueryStore(queryService?.allIntermediaryAccounts); - allIntermediaryAccounts(request: AllIntermediaryAccountsRequest) { - return this.store.getData(request); - } - } - class QueryConnectedIntermediaryAccountStore { - store = new QueryStore(queryService?.connectedIntermediaryAccount); - connectedIntermediaryAccount(request: ConnectedIntermediaryAccountRequest) { - return this.store.getData(request); - } - } - class QueryTotalDelegationByValidatorForDenomStore { - store = new QueryStore(queryService?.totalDelegationByValidatorForDenom); - totalDelegationByValidatorForDenom(request: QueryTotalDelegationByValidatorForDenomRequest) { - return this.store.getData(request); - } - } - class QueryTotalSuperfluidDelegationsStore { - store = new QueryStore(queryService?.totalSuperfluidDelegations); - totalSuperfluidDelegations(request: TotalSuperfluidDelegationsRequest) { - return this.store.getData(request); - } - } - class QuerySuperfluidDelegationAmountStore { - store = new QueryStore(queryService?.superfluidDelegationAmount); - superfluidDelegationAmount(request: SuperfluidDelegationAmountRequest) { - return this.store.getData(request); - } - } - class QuerySuperfluidDelegationsByDelegatorStore { - store = new QueryStore(queryService?.superfluidDelegationsByDelegator); - superfluidDelegationsByDelegator(request: SuperfluidDelegationsByDelegatorRequest) { - return this.store.getData(request); - } - } - class QuerySuperfluidUndelegationsByDelegatorStore { - store = new QueryStore(queryService?.superfluidUndelegationsByDelegator); - superfluidUndelegationsByDelegator(request: SuperfluidUndelegationsByDelegatorRequest) { - return this.store.getData(request); - } - } - class QuerySuperfluidDelegationsByValidatorDenomStore { - store = new QueryStore(queryService?.superfluidDelegationsByValidatorDenom); - superfluidDelegationsByValidatorDenom(request: SuperfluidDelegationsByValidatorDenomRequest) { - return this.store.getData(request); - } - } - class QueryEstimateSuperfluidDelegatedAmountByValidatorDenomStore { - store = new QueryStore(queryService?.estimateSuperfluidDelegatedAmountByValidatorDenom); - estimateSuperfluidDelegatedAmountByValidatorDenom(request: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) { - return this.store.getData(request); - } - } - class QueryTotalDelegationByDelegatorStore { - store = new QueryStore(queryService?.totalDelegationByDelegator); - totalDelegationByDelegator(request: QueryTotalDelegationByDelegatorRequest) { - return this.store.getData(request); - } - } - class QueryUnpoolWhitelistStore { - store = new QueryStore(queryService?.unpoolWhitelist); - unpoolWhitelist(request: QueryUnpoolWhitelistRequest) { - return this.store.getData(request); - } - } - return { - /** Params returns the total set of superfluid parameters. */QueryParamsStore, - /** - * Returns superfluid asset type, whether if it's a native asset or an lp - * share. - */ - QueryAssetTypeStore, - /** Returns all registered superfluid assets. */QueryAllAssetsStore, - /** Returns the osmo equivalent multiplier used in the most recent epoch. */QueryAssetMultiplierStore, - /** Returns all superfluid intermediary accounts. */QueryAllIntermediaryAccountsStore, - /** Returns intermediary account connected to a superfluid staked lock by id */QueryConnectedIntermediaryAccountStore, - /** Returns the amount of delegations of specific denom for all validators */QueryTotalDelegationByValidatorForDenomStore, - /** - * Returns the total amount of osmo superfluidly staked. - * Response is denominated in uosmo. - */ - QueryTotalSuperfluidDelegationsStore, - /** - * Returns the coins superfluid delegated for the delegator, validator, denom - * triplet - */ - QuerySuperfluidDelegationAmountStore, - /** Returns all the delegated superfluid poistions for a specific delegator. */QuerySuperfluidDelegationsByDelegatorStore, - /** Returns all the undelegating superfluid poistions for a specific delegator. */QuerySuperfluidUndelegationsByDelegatorStore, - /** - * Returns all the superfluid positions of a specific denom delegated to one - * validator - */ - QuerySuperfluidDelegationsByValidatorDenomStore, - /** - * Returns the amount of a specific denom delegated to a specific validator - * This is labeled an estimate, because the way it calculates the amount can - * lead rounding errors from the true delegated amount - */ - QueryEstimateSuperfluidDelegatedAmountByValidatorDenomStore, - /** Returns the specified delegations for a specific delegator */QueryTotalDelegationByDelegatorStore, - /** Returns a list of whitelisted pool ids to unpool. */QueryUnpoolWhitelistStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/query.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/query.ts deleted file mode 100644 index 7c189857..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/query.ts +++ /dev/null @@ -1,3769 +0,0 @@ -import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination"; -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { SuperfluidAssetType, SuperfluidAsset, SuperfluidAssetAmino, SuperfluidAssetSDKType, OsmoEquivalentMultiplierRecord, OsmoEquivalentMultiplierRecordAmino, OsmoEquivalentMultiplierRecordSDKType, SuperfluidDelegationRecord, SuperfluidDelegationRecordAmino, SuperfluidDelegationRecordSDKType, superfluidAssetTypeFromJSON, superfluidAssetTypeToJSON } from "./superfluid"; -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { SyntheticLock, SyntheticLockAmino, SyntheticLockSDKType } from "../lockup/lock"; -import { DelegationResponse, DelegationResponseAmino, DelegationResponseSDKType } from "../../cosmos/staking/v1beta1/staking"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { DeepPartial, isSet } from "../../helpers"; -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.superfluid.QueryParamsRequest"; - value: Uint8Array; -} -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/query-params-request"; - value: QueryParamsRequestAmino; -} -export interface QueryParamsRequestSDKType {} -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.superfluid.QueryParamsResponse"; - value: Uint8Array; -} -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/query-params-response"; - value: QueryParamsResponseAmino; -} -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -export interface AssetTypeRequest { - denom: string; -} -export interface AssetTypeRequestProtoMsg { - typeUrl: "/osmosis.superfluid.AssetTypeRequest"; - value: Uint8Array; -} -export interface AssetTypeRequestAmino { - denom: string; -} -export interface AssetTypeRequestAminoMsg { - type: "osmosis/asset-type-request"; - value: AssetTypeRequestAmino; -} -export interface AssetTypeRequestSDKType { - denom: string; -} -export interface AssetTypeResponse { - assetType: SuperfluidAssetType; -} -export interface AssetTypeResponseProtoMsg { - typeUrl: "/osmosis.superfluid.AssetTypeResponse"; - value: Uint8Array; -} -export interface AssetTypeResponseAmino { - asset_type: SuperfluidAssetType; -} -export interface AssetTypeResponseAminoMsg { - type: "osmosis/asset-type-response"; - value: AssetTypeResponseAmino; -} -export interface AssetTypeResponseSDKType { - asset_type: SuperfluidAssetType; -} -export interface AllAssetsRequest {} -export interface AllAssetsRequestProtoMsg { - typeUrl: "/osmosis.superfluid.AllAssetsRequest"; - value: Uint8Array; -} -export interface AllAssetsRequestAmino {} -export interface AllAssetsRequestAminoMsg { - type: "osmosis/all-assets-request"; - value: AllAssetsRequestAmino; -} -export interface AllAssetsRequestSDKType {} -export interface AllAssetsResponse { - assets: SuperfluidAsset[]; -} -export interface AllAssetsResponseProtoMsg { - typeUrl: "/osmosis.superfluid.AllAssetsResponse"; - value: Uint8Array; -} -export interface AllAssetsResponseAmino { - assets: SuperfluidAssetAmino[]; -} -export interface AllAssetsResponseAminoMsg { - type: "osmosis/all-assets-response"; - value: AllAssetsResponseAmino; -} -export interface AllAssetsResponseSDKType { - assets: SuperfluidAssetSDKType[]; -} -export interface AssetMultiplierRequest { - denom: string; -} -export interface AssetMultiplierRequestProtoMsg { - typeUrl: "/osmosis.superfluid.AssetMultiplierRequest"; - value: Uint8Array; -} -export interface AssetMultiplierRequestAmino { - denom: string; -} -export interface AssetMultiplierRequestAminoMsg { - type: "osmosis/asset-multiplier-request"; - value: AssetMultiplierRequestAmino; -} -export interface AssetMultiplierRequestSDKType { - denom: string; -} -export interface AssetMultiplierResponse { - osmoEquivalentMultiplier: OsmoEquivalentMultiplierRecord | undefined; -} -export interface AssetMultiplierResponseProtoMsg { - typeUrl: "/osmosis.superfluid.AssetMultiplierResponse"; - value: Uint8Array; -} -export interface AssetMultiplierResponseAmino { - osmo_equivalent_multiplier?: OsmoEquivalentMultiplierRecordAmino | undefined; -} -export interface AssetMultiplierResponseAminoMsg { - type: "osmosis/asset-multiplier-response"; - value: AssetMultiplierResponseAmino; -} -export interface AssetMultiplierResponseSDKType { - osmo_equivalent_multiplier: OsmoEquivalentMultiplierRecordSDKType | undefined; -} -export interface SuperfluidIntermediaryAccountInfo { - denom: string; - valAddr: string; - gaugeId: bigint; - address: string; -} -export interface SuperfluidIntermediaryAccountInfoProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidIntermediaryAccountInfo"; - value: Uint8Array; -} -export interface SuperfluidIntermediaryAccountInfoAmino { - denom: string; - val_addr: string; - gauge_id: string; - address: string; -} -export interface SuperfluidIntermediaryAccountInfoAminoMsg { - type: "osmosis/superfluid-intermediary-account-info"; - value: SuperfluidIntermediaryAccountInfoAmino; -} -export interface SuperfluidIntermediaryAccountInfoSDKType { - denom: string; - val_addr: string; - gauge_id: bigint; - address: string; -} -export interface AllIntermediaryAccountsRequest { - pagination: PageRequest | undefined; -} -export interface AllIntermediaryAccountsRequestProtoMsg { - typeUrl: "/osmosis.superfluid.AllIntermediaryAccountsRequest"; - value: Uint8Array; -} -export interface AllIntermediaryAccountsRequestAmino { - pagination?: PageRequestAmino | undefined; -} -export interface AllIntermediaryAccountsRequestAminoMsg { - type: "osmosis/all-intermediary-accounts-request"; - value: AllIntermediaryAccountsRequestAmino; -} -export interface AllIntermediaryAccountsRequestSDKType { - pagination: PageRequestSDKType | undefined; -} -export interface AllIntermediaryAccountsResponse { - accounts: SuperfluidIntermediaryAccountInfo[]; - pagination: PageResponse | undefined; -} -export interface AllIntermediaryAccountsResponseProtoMsg { - typeUrl: "/osmosis.superfluid.AllIntermediaryAccountsResponse"; - value: Uint8Array; -} -export interface AllIntermediaryAccountsResponseAmino { - accounts: SuperfluidIntermediaryAccountInfoAmino[]; - pagination?: PageResponseAmino | undefined; -} -export interface AllIntermediaryAccountsResponseAminoMsg { - type: "osmosis/all-intermediary-accounts-response"; - value: AllIntermediaryAccountsResponseAmino; -} -export interface AllIntermediaryAccountsResponseSDKType { - accounts: SuperfluidIntermediaryAccountInfoSDKType[]; - pagination: PageResponseSDKType | undefined; -} -export interface ConnectedIntermediaryAccountRequest { - lockId: bigint; -} -export interface ConnectedIntermediaryAccountRequestProtoMsg { - typeUrl: "/osmosis.superfluid.ConnectedIntermediaryAccountRequest"; - value: Uint8Array; -} -export interface ConnectedIntermediaryAccountRequestAmino { - lock_id: string; -} -export interface ConnectedIntermediaryAccountRequestAminoMsg { - type: "osmosis/connected-intermediary-account-request"; - value: ConnectedIntermediaryAccountRequestAmino; -} -export interface ConnectedIntermediaryAccountRequestSDKType { - lock_id: bigint; -} -export interface ConnectedIntermediaryAccountResponse { - account: SuperfluidIntermediaryAccountInfo | undefined; -} -export interface ConnectedIntermediaryAccountResponseProtoMsg { - typeUrl: "/osmosis.superfluid.ConnectedIntermediaryAccountResponse"; - value: Uint8Array; -} -export interface ConnectedIntermediaryAccountResponseAmino { - account?: SuperfluidIntermediaryAccountInfoAmino | undefined; -} -export interface ConnectedIntermediaryAccountResponseAminoMsg { - type: "osmosis/connected-intermediary-account-response"; - value: ConnectedIntermediaryAccountResponseAmino; -} -export interface ConnectedIntermediaryAccountResponseSDKType { - account: SuperfluidIntermediaryAccountInfoSDKType | undefined; -} -export interface QueryTotalDelegationByValidatorForDenomRequest { - denom: string; -} -export interface QueryTotalDelegationByValidatorForDenomRequestProtoMsg { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByValidatorForDenomRequest"; - value: Uint8Array; -} -export interface QueryTotalDelegationByValidatorForDenomRequestAmino { - denom: string; -} -export interface QueryTotalDelegationByValidatorForDenomRequestAminoMsg { - type: "osmosis/query-total-delegation-by-validator-for-denom-request"; - value: QueryTotalDelegationByValidatorForDenomRequestAmino; -} -export interface QueryTotalDelegationByValidatorForDenomRequestSDKType { - denom: string; -} -export interface QueryTotalDelegationByValidatorForDenomResponse { - assets: Delegations[]; -} -export interface QueryTotalDelegationByValidatorForDenomResponseProtoMsg { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByValidatorForDenomResponse"; - value: Uint8Array; -} -export interface QueryTotalDelegationByValidatorForDenomResponseAmino { - assets: DelegationsAmino[]; -} -export interface QueryTotalDelegationByValidatorForDenomResponseAminoMsg { - type: "osmosis/query-total-delegation-by-validator-for-denom-response"; - value: QueryTotalDelegationByValidatorForDenomResponseAmino; -} -export interface QueryTotalDelegationByValidatorForDenomResponseSDKType { - assets: DelegationsSDKType[]; -} -export interface Delegations { - valAddr: string; - amountSfsd: string; - osmoEquivalent: string; -} -export interface DelegationsProtoMsg { - typeUrl: "/osmosis.superfluid.Delegations"; - value: Uint8Array; -} -export interface DelegationsAmino { - val_addr: string; - amount_sfsd: string; - osmo_equivalent: string; -} -export interface DelegationsAminoMsg { - type: "osmosis/delegations"; - value: DelegationsAmino; -} -export interface DelegationsSDKType { - val_addr: string; - amount_sfsd: string; - osmo_equivalent: string; -} -export interface TotalSuperfluidDelegationsRequest {} -export interface TotalSuperfluidDelegationsRequestProtoMsg { - typeUrl: "/osmosis.superfluid.TotalSuperfluidDelegationsRequest"; - value: Uint8Array; -} -export interface TotalSuperfluidDelegationsRequestAmino {} -export interface TotalSuperfluidDelegationsRequestAminoMsg { - type: "osmosis/total-superfluid-delegations-request"; - value: TotalSuperfluidDelegationsRequestAmino; -} -export interface TotalSuperfluidDelegationsRequestSDKType {} -export interface TotalSuperfluidDelegationsResponse { - totalDelegations: string; -} -export interface TotalSuperfluidDelegationsResponseProtoMsg { - typeUrl: "/osmosis.superfluid.TotalSuperfluidDelegationsResponse"; - value: Uint8Array; -} -export interface TotalSuperfluidDelegationsResponseAmino { - total_delegations: string; -} -export interface TotalSuperfluidDelegationsResponseAminoMsg { - type: "osmosis/total-superfluid-delegations-response"; - value: TotalSuperfluidDelegationsResponseAmino; -} -export interface TotalSuperfluidDelegationsResponseSDKType { - total_delegations: string; -} -export interface SuperfluidDelegationAmountRequest { - delegatorAddress: string; - validatorAddress: string; - denom: string; -} -export interface SuperfluidDelegationAmountRequestProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationAmountRequest"; - value: Uint8Array; -} -export interface SuperfluidDelegationAmountRequestAmino { - delegator_address: string; - validator_address: string; - denom: string; -} -export interface SuperfluidDelegationAmountRequestAminoMsg { - type: "osmosis/superfluid-delegation-amount-request"; - value: SuperfluidDelegationAmountRequestAmino; -} -export interface SuperfluidDelegationAmountRequestSDKType { - delegator_address: string; - validator_address: string; - denom: string; -} -export interface SuperfluidDelegationAmountResponse { - amount: Coin[]; -} -export interface SuperfluidDelegationAmountResponseProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationAmountResponse"; - value: Uint8Array; -} -export interface SuperfluidDelegationAmountResponseAmino { - amount: CoinAmino[]; -} -export interface SuperfluidDelegationAmountResponseAminoMsg { - type: "osmosis/superfluid-delegation-amount-response"; - value: SuperfluidDelegationAmountResponseAmino; -} -export interface SuperfluidDelegationAmountResponseSDKType { - amount: CoinSDKType[]; -} -export interface SuperfluidDelegationsByDelegatorRequest { - delegatorAddress: string; -} -export interface SuperfluidDelegationsByDelegatorRequestProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByDelegatorRequest"; - value: Uint8Array; -} -export interface SuperfluidDelegationsByDelegatorRequestAmino { - delegator_address: string; -} -export interface SuperfluidDelegationsByDelegatorRequestAminoMsg { - type: "osmosis/superfluid-delegations-by-delegator-request"; - value: SuperfluidDelegationsByDelegatorRequestAmino; -} -export interface SuperfluidDelegationsByDelegatorRequestSDKType { - delegator_address: string; -} -export interface SuperfluidDelegationsByDelegatorResponse { - superfluidDelegationRecords: SuperfluidDelegationRecord[]; - totalDelegatedCoins: Coin[]; - totalEquivalentStakedAmount: Coin | undefined; -} -export interface SuperfluidDelegationsByDelegatorResponseProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByDelegatorResponse"; - value: Uint8Array; -} -export interface SuperfluidDelegationsByDelegatorResponseAmino { - superfluid_delegation_records: SuperfluidDelegationRecordAmino[]; - total_delegated_coins: CoinAmino[]; - total_equivalent_staked_amount?: CoinAmino | undefined; -} -export interface SuperfluidDelegationsByDelegatorResponseAminoMsg { - type: "osmosis/superfluid-delegations-by-delegator-response"; - value: SuperfluidDelegationsByDelegatorResponseAmino; -} -export interface SuperfluidDelegationsByDelegatorResponseSDKType { - superfluid_delegation_records: SuperfluidDelegationRecordSDKType[]; - total_delegated_coins: CoinSDKType[]; - total_equivalent_staked_amount: CoinSDKType | undefined; -} -export interface SuperfluidUndelegationsByDelegatorRequest { - delegatorAddress: string; - denom: string; -} -export interface SuperfluidUndelegationsByDelegatorRequestProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidUndelegationsByDelegatorRequest"; - value: Uint8Array; -} -export interface SuperfluidUndelegationsByDelegatorRequestAmino { - delegator_address: string; - denom: string; -} -export interface SuperfluidUndelegationsByDelegatorRequestAminoMsg { - type: "osmosis/superfluid-undelegations-by-delegator-request"; - value: SuperfluidUndelegationsByDelegatorRequestAmino; -} -export interface SuperfluidUndelegationsByDelegatorRequestSDKType { - delegator_address: string; - denom: string; -} -export interface SuperfluidUndelegationsByDelegatorResponse { - superfluidDelegationRecords: SuperfluidDelegationRecord[]; - totalUndelegatedCoins: Coin[]; - syntheticLocks: SyntheticLock[]; -} -export interface SuperfluidUndelegationsByDelegatorResponseProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidUndelegationsByDelegatorResponse"; - value: Uint8Array; -} -export interface SuperfluidUndelegationsByDelegatorResponseAmino { - superfluid_delegation_records: SuperfluidDelegationRecordAmino[]; - total_undelegated_coins: CoinAmino[]; - synthetic_locks: SyntheticLockAmino[]; -} -export interface SuperfluidUndelegationsByDelegatorResponseAminoMsg { - type: "osmosis/superfluid-undelegations-by-delegator-response"; - value: SuperfluidUndelegationsByDelegatorResponseAmino; -} -export interface SuperfluidUndelegationsByDelegatorResponseSDKType { - superfluid_delegation_records: SuperfluidDelegationRecordSDKType[]; - total_undelegated_coins: CoinSDKType[]; - synthetic_locks: SyntheticLockSDKType[]; -} -export interface SuperfluidDelegationsByValidatorDenomRequest { - validatorAddress: string; - denom: string; -} -export interface SuperfluidDelegationsByValidatorDenomRequestProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByValidatorDenomRequest"; - value: Uint8Array; -} -export interface SuperfluidDelegationsByValidatorDenomRequestAmino { - validator_address: string; - denom: string; -} -export interface SuperfluidDelegationsByValidatorDenomRequestAminoMsg { - type: "osmosis/superfluid-delegations-by-validator-denom-request"; - value: SuperfluidDelegationsByValidatorDenomRequestAmino; -} -export interface SuperfluidDelegationsByValidatorDenomRequestSDKType { - validator_address: string; - denom: string; -} -export interface SuperfluidDelegationsByValidatorDenomResponse { - superfluidDelegationRecords: SuperfluidDelegationRecord[]; -} -export interface SuperfluidDelegationsByValidatorDenomResponseProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByValidatorDenomResponse"; - value: Uint8Array; -} -export interface SuperfluidDelegationsByValidatorDenomResponseAmino { - superfluid_delegation_records: SuperfluidDelegationRecordAmino[]; -} -export interface SuperfluidDelegationsByValidatorDenomResponseAminoMsg { - type: "osmosis/superfluid-delegations-by-validator-denom-response"; - value: SuperfluidDelegationsByValidatorDenomResponseAmino; -} -export interface SuperfluidDelegationsByValidatorDenomResponseSDKType { - superfluid_delegation_records: SuperfluidDelegationRecordSDKType[]; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - validatorAddress: string; - denom: string; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomRequestProtoMsg { - typeUrl: "/osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest"; - value: Uint8Array; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAmino { - validator_address: string; - denom: string; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAminoMsg { - type: "osmosis/estimate-superfluid-delegated-amount-by-validator-denom-request"; - value: EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAmino; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomRequestSDKType { - validator_address: string; - denom: string; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - totalDelegatedCoins: Coin[]; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomResponseProtoMsg { - typeUrl: "/osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomResponse"; - value: Uint8Array; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAmino { - total_delegated_coins: CoinAmino[]; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAminoMsg { - type: "osmosis/estimate-superfluid-delegated-amount-by-validator-denom-response"; - value: EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAmino; -} -export interface EstimateSuperfluidDelegatedAmountByValidatorDenomResponseSDKType { - total_delegated_coins: CoinSDKType[]; -} -export interface QueryTotalDelegationByDelegatorRequest { - delegatorAddress: string; -} -export interface QueryTotalDelegationByDelegatorRequestProtoMsg { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByDelegatorRequest"; - value: Uint8Array; -} -export interface QueryTotalDelegationByDelegatorRequestAmino { - delegator_address: string; -} -export interface QueryTotalDelegationByDelegatorRequestAminoMsg { - type: "osmosis/query-total-delegation-by-delegator-request"; - value: QueryTotalDelegationByDelegatorRequestAmino; -} -export interface QueryTotalDelegationByDelegatorRequestSDKType { - delegator_address: string; -} -export interface QueryTotalDelegationByDelegatorResponse { - superfluidDelegationRecords: SuperfluidDelegationRecord[]; - delegationResponse: DelegationResponse[]; - totalDelegatedCoins: Coin[]; - totalEquivalentStakedAmount: Coin | undefined; -} -export interface QueryTotalDelegationByDelegatorResponseProtoMsg { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByDelegatorResponse"; - value: Uint8Array; -} -export interface QueryTotalDelegationByDelegatorResponseAmino { - superfluid_delegation_records: SuperfluidDelegationRecordAmino[]; - delegation_response: DelegationResponseAmino[]; - total_delegated_coins: CoinAmino[]; - total_equivalent_staked_amount?: CoinAmino | undefined; -} -export interface QueryTotalDelegationByDelegatorResponseAminoMsg { - type: "osmosis/query-total-delegation-by-delegator-response"; - value: QueryTotalDelegationByDelegatorResponseAmino; -} -export interface QueryTotalDelegationByDelegatorResponseSDKType { - superfluid_delegation_records: SuperfluidDelegationRecordSDKType[]; - delegation_response: DelegationResponseSDKType[]; - total_delegated_coins: CoinSDKType[]; - total_equivalent_staked_amount: CoinSDKType | undefined; -} -export interface QueryUnpoolWhitelistRequest {} -export interface QueryUnpoolWhitelistRequestProtoMsg { - typeUrl: "/osmosis.superfluid.QueryUnpoolWhitelistRequest"; - value: Uint8Array; -} -export interface QueryUnpoolWhitelistRequestAmino {} -export interface QueryUnpoolWhitelistRequestAminoMsg { - type: "osmosis/query-unpool-whitelist-request"; - value: QueryUnpoolWhitelistRequestAmino; -} -export interface QueryUnpoolWhitelistRequestSDKType {} -export interface QueryUnpoolWhitelistResponse { - poolIds: bigint[]; -} -export interface QueryUnpoolWhitelistResponseProtoMsg { - typeUrl: "/osmosis.superfluid.QueryUnpoolWhitelistResponse"; - value: Uint8Array; -} -export interface QueryUnpoolWhitelistResponseAmino { - pool_ids: string[]; -} -export interface QueryUnpoolWhitelistResponseAminoMsg { - type: "osmosis/query-unpool-whitelist-response"; - value: QueryUnpoolWhitelistResponseAmino; -} -export interface QueryUnpoolWhitelistResponseSDKType { - pool_ids: bigint[]; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.superfluid.QueryParamsRequest", - aminoType: "osmosis/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.superfluid.QueryParamsResponse", - aminoType: "osmosis/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseAssetTypeRequest(): AssetTypeRequest { - return { - denom: "" - }; -} -export const AssetTypeRequest = { - typeUrl: "/osmosis.superfluid.AssetTypeRequest", - aminoType: "osmosis/asset-type-request", - encode(message: AssetTypeRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AssetTypeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAssetTypeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AssetTypeRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: AssetTypeRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): AssetTypeRequest { - const message = createBaseAssetTypeRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: AssetTypeRequestSDKType): AssetTypeRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: AssetTypeRequest): AssetTypeRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: AssetTypeRequestAmino): AssetTypeRequest { - return { - denom: object.denom - }; - }, - toAmino(message: AssetTypeRequest): AssetTypeRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: AssetTypeRequestAminoMsg): AssetTypeRequest { - return AssetTypeRequest.fromAmino(object.value); - }, - toAminoMsg(message: AssetTypeRequest): AssetTypeRequestAminoMsg { - return { - type: "osmosis/asset-type-request", - value: AssetTypeRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AssetTypeRequestProtoMsg): AssetTypeRequest { - return AssetTypeRequest.decode(message.value); - }, - toProto(message: AssetTypeRequest): Uint8Array { - return AssetTypeRequest.encode(message).finish(); - }, - toProtoMsg(message: AssetTypeRequest): AssetTypeRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AssetTypeRequest", - value: AssetTypeRequest.encode(message).finish() - }; - } -}; -function createBaseAssetTypeResponse(): AssetTypeResponse { - return { - assetType: 0 - }; -} -export const AssetTypeResponse = { - typeUrl: "/osmosis.superfluid.AssetTypeResponse", - aminoType: "osmosis/asset-type-response", - encode(message: AssetTypeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.assetType !== 0) { - writer.uint32(8).int32(message.assetType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AssetTypeResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAssetTypeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.assetType = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AssetTypeResponse { - return { - assetType: isSet(object.assetType) ? superfluidAssetTypeFromJSON(object.assetType) : -1 - }; - }, - toJSON(message: AssetTypeResponse): unknown { - const obj: any = {}; - message.assetType !== undefined && (obj.assetType = superfluidAssetTypeToJSON(message.assetType)); - return obj; - }, - fromPartial(object: DeepPartial): AssetTypeResponse { - const message = createBaseAssetTypeResponse(); - message.assetType = object.assetType ?? 0; - return message; - }, - fromSDK(object: AssetTypeResponseSDKType): AssetTypeResponse { - return { - assetType: isSet(object.asset_type) ? superfluidAssetTypeFromJSON(object.asset_type) : -1 - }; - }, - toSDK(message: AssetTypeResponse): AssetTypeResponseSDKType { - const obj: any = {}; - message.assetType !== undefined && (obj.asset_type = superfluidAssetTypeToJSON(message.assetType)); - return obj; - }, - fromAmino(object: AssetTypeResponseAmino): AssetTypeResponse { - return { - assetType: isSet(object.asset_type) ? superfluidAssetTypeFromJSON(object.asset_type) : -1 - }; - }, - toAmino(message: AssetTypeResponse): AssetTypeResponseAmino { - const obj: any = {}; - obj.asset_type = message.assetType; - return obj; - }, - fromAminoMsg(object: AssetTypeResponseAminoMsg): AssetTypeResponse { - return AssetTypeResponse.fromAmino(object.value); - }, - toAminoMsg(message: AssetTypeResponse): AssetTypeResponseAminoMsg { - return { - type: "osmosis/asset-type-response", - value: AssetTypeResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AssetTypeResponseProtoMsg): AssetTypeResponse { - return AssetTypeResponse.decode(message.value); - }, - toProto(message: AssetTypeResponse): Uint8Array { - return AssetTypeResponse.encode(message).finish(); - }, - toProtoMsg(message: AssetTypeResponse): AssetTypeResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AssetTypeResponse", - value: AssetTypeResponse.encode(message).finish() - }; - } -}; -function createBaseAllAssetsRequest(): AllAssetsRequest { - return {}; -} -export const AllAssetsRequest = { - typeUrl: "/osmosis.superfluid.AllAssetsRequest", - aminoType: "osmosis/all-assets-request", - encode(_: AllAssetsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AllAssetsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAllAssetsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): AllAssetsRequest { - return {}; - }, - toJSON(_: AllAssetsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): AllAssetsRequest { - const message = createBaseAllAssetsRequest(); - return message; - }, - fromSDK(_: AllAssetsRequestSDKType): AllAssetsRequest { - return {}; - }, - toSDK(_: AllAssetsRequest): AllAssetsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: AllAssetsRequestAmino): AllAssetsRequest { - return {}; - }, - toAmino(_: AllAssetsRequest): AllAssetsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: AllAssetsRequestAminoMsg): AllAssetsRequest { - return AllAssetsRequest.fromAmino(object.value); - }, - toAminoMsg(message: AllAssetsRequest): AllAssetsRequestAminoMsg { - return { - type: "osmosis/all-assets-request", - value: AllAssetsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AllAssetsRequestProtoMsg): AllAssetsRequest { - return AllAssetsRequest.decode(message.value); - }, - toProto(message: AllAssetsRequest): Uint8Array { - return AllAssetsRequest.encode(message).finish(); - }, - toProtoMsg(message: AllAssetsRequest): AllAssetsRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AllAssetsRequest", - value: AllAssetsRequest.encode(message).finish() - }; - } -}; -function createBaseAllAssetsResponse(): AllAssetsResponse { - return { - assets: [] - }; -} -export const AllAssetsResponse = { - typeUrl: "/osmosis.superfluid.AllAssetsResponse", - aminoType: "osmosis/all-assets-response", - encode(message: AllAssetsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.assets) { - SuperfluidAsset.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AllAssetsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAllAssetsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.assets.push(SuperfluidAsset.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AllAssetsResponse { - return { - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => SuperfluidAsset.fromJSON(e)) : [] - }; - }, - toJSON(message: AllAssetsResponse): unknown { - const obj: any = {}; - if (message.assets) { - obj.assets = message.assets.map(e => e ? SuperfluidAsset.toJSON(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromPartial(object: DeepPartial): AllAssetsResponse { - const message = createBaseAllAssetsResponse(); - message.assets = object.assets?.map(e => SuperfluidAsset.fromPartial(e)) || []; - return message; - }, - fromSDK(object: AllAssetsResponseSDKType): AllAssetsResponse { - return { - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => SuperfluidAsset.fromSDK(e)) : [] - }; - }, - toSDK(message: AllAssetsResponse): AllAssetsResponseSDKType { - const obj: any = {}; - if (message.assets) { - obj.assets = message.assets.map(e => e ? SuperfluidAsset.toSDK(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromAmino(object: AllAssetsResponseAmino): AllAssetsResponse { - return { - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => SuperfluidAsset.fromAmino(e)) : [] - }; - }, - toAmino(message: AllAssetsResponse): AllAssetsResponseAmino { - const obj: any = {}; - if (message.assets) { - obj.assets = message.assets.map(e => e ? SuperfluidAsset.toAmino(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromAminoMsg(object: AllAssetsResponseAminoMsg): AllAssetsResponse { - return AllAssetsResponse.fromAmino(object.value); - }, - toAminoMsg(message: AllAssetsResponse): AllAssetsResponseAminoMsg { - return { - type: "osmosis/all-assets-response", - value: AllAssetsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AllAssetsResponseProtoMsg): AllAssetsResponse { - return AllAssetsResponse.decode(message.value); - }, - toProto(message: AllAssetsResponse): Uint8Array { - return AllAssetsResponse.encode(message).finish(); - }, - toProtoMsg(message: AllAssetsResponse): AllAssetsResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AllAssetsResponse", - value: AllAssetsResponse.encode(message).finish() - }; - } -}; -function createBaseAssetMultiplierRequest(): AssetMultiplierRequest { - return { - denom: "" - }; -} -export const AssetMultiplierRequest = { - typeUrl: "/osmosis.superfluid.AssetMultiplierRequest", - aminoType: "osmosis/asset-multiplier-request", - encode(message: AssetMultiplierRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AssetMultiplierRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAssetMultiplierRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AssetMultiplierRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: AssetMultiplierRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): AssetMultiplierRequest { - const message = createBaseAssetMultiplierRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: AssetMultiplierRequestSDKType): AssetMultiplierRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: AssetMultiplierRequest): AssetMultiplierRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: AssetMultiplierRequestAmino): AssetMultiplierRequest { - return { - denom: object.denom - }; - }, - toAmino(message: AssetMultiplierRequest): AssetMultiplierRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: AssetMultiplierRequestAminoMsg): AssetMultiplierRequest { - return AssetMultiplierRequest.fromAmino(object.value); - }, - toAminoMsg(message: AssetMultiplierRequest): AssetMultiplierRequestAminoMsg { - return { - type: "osmosis/asset-multiplier-request", - value: AssetMultiplierRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AssetMultiplierRequestProtoMsg): AssetMultiplierRequest { - return AssetMultiplierRequest.decode(message.value); - }, - toProto(message: AssetMultiplierRequest): Uint8Array { - return AssetMultiplierRequest.encode(message).finish(); - }, - toProtoMsg(message: AssetMultiplierRequest): AssetMultiplierRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AssetMultiplierRequest", - value: AssetMultiplierRequest.encode(message).finish() - }; - } -}; -function createBaseAssetMultiplierResponse(): AssetMultiplierResponse { - return { - osmoEquivalentMultiplier: OsmoEquivalentMultiplierRecord.fromPartial({}) - }; -} -export const AssetMultiplierResponse = { - typeUrl: "/osmosis.superfluid.AssetMultiplierResponse", - aminoType: "osmosis/asset-multiplier-response", - encode(message: AssetMultiplierResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.osmoEquivalentMultiplier !== undefined) { - OsmoEquivalentMultiplierRecord.encode(message.osmoEquivalentMultiplier, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AssetMultiplierResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAssetMultiplierResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osmoEquivalentMultiplier = OsmoEquivalentMultiplierRecord.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AssetMultiplierResponse { - return { - osmoEquivalentMultiplier: isSet(object.osmoEquivalentMultiplier) ? OsmoEquivalentMultiplierRecord.fromJSON(object.osmoEquivalentMultiplier) : undefined - }; - }, - toJSON(message: AssetMultiplierResponse): unknown { - const obj: any = {}; - message.osmoEquivalentMultiplier !== undefined && (obj.osmoEquivalentMultiplier = message.osmoEquivalentMultiplier ? OsmoEquivalentMultiplierRecord.toJSON(message.osmoEquivalentMultiplier) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AssetMultiplierResponse { - const message = createBaseAssetMultiplierResponse(); - message.osmoEquivalentMultiplier = object.osmoEquivalentMultiplier !== undefined && object.osmoEquivalentMultiplier !== null ? OsmoEquivalentMultiplierRecord.fromPartial(object.osmoEquivalentMultiplier) : undefined; - return message; - }, - fromSDK(object: AssetMultiplierResponseSDKType): AssetMultiplierResponse { - return { - osmoEquivalentMultiplier: object.osmo_equivalent_multiplier ? OsmoEquivalentMultiplierRecord.fromSDK(object.osmo_equivalent_multiplier) : undefined - }; - }, - toSDK(message: AssetMultiplierResponse): AssetMultiplierResponseSDKType { - const obj: any = {}; - message.osmoEquivalentMultiplier !== undefined && (obj.osmo_equivalent_multiplier = message.osmoEquivalentMultiplier ? OsmoEquivalentMultiplierRecord.toSDK(message.osmoEquivalentMultiplier) : undefined); - return obj; - }, - fromAmino(object: AssetMultiplierResponseAmino): AssetMultiplierResponse { - return { - osmoEquivalentMultiplier: object?.osmo_equivalent_multiplier ? OsmoEquivalentMultiplierRecord.fromAmino(object.osmo_equivalent_multiplier) : undefined - }; - }, - toAmino(message: AssetMultiplierResponse): AssetMultiplierResponseAmino { - const obj: any = {}; - obj.osmo_equivalent_multiplier = message.osmoEquivalentMultiplier ? OsmoEquivalentMultiplierRecord.toAmino(message.osmoEquivalentMultiplier) : undefined; - return obj; - }, - fromAminoMsg(object: AssetMultiplierResponseAminoMsg): AssetMultiplierResponse { - return AssetMultiplierResponse.fromAmino(object.value); - }, - toAminoMsg(message: AssetMultiplierResponse): AssetMultiplierResponseAminoMsg { - return { - type: "osmosis/asset-multiplier-response", - value: AssetMultiplierResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AssetMultiplierResponseProtoMsg): AssetMultiplierResponse { - return AssetMultiplierResponse.decode(message.value); - }, - toProto(message: AssetMultiplierResponse): Uint8Array { - return AssetMultiplierResponse.encode(message).finish(); - }, - toProtoMsg(message: AssetMultiplierResponse): AssetMultiplierResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AssetMultiplierResponse", - value: AssetMultiplierResponse.encode(message).finish() - }; - } -}; -function createBaseSuperfluidIntermediaryAccountInfo(): SuperfluidIntermediaryAccountInfo { - return { - denom: "", - valAddr: "", - gaugeId: BigInt(0), - address: "" - }; -} -export const SuperfluidIntermediaryAccountInfo = { - typeUrl: "/osmosis.superfluid.SuperfluidIntermediaryAccountInfo", - aminoType: "osmosis/superfluid-intermediary-account-info", - encode(message: SuperfluidIntermediaryAccountInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.valAddr !== "") { - writer.uint32(18).string(message.valAddr); - } - if (message.gaugeId !== BigInt(0)) { - writer.uint32(24).uint64(message.gaugeId); - } - if (message.address !== "") { - writer.uint32(34).string(message.address); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidIntermediaryAccountInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidIntermediaryAccountInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.valAddr = reader.string(); - break; - case 3: - message.gaugeId = reader.uint64(); - break; - case 4: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidIntermediaryAccountInfo { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - valAddr: isSet(object.valAddr) ? String(object.valAddr) : "", - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0), - address: isSet(object.address) ? String(object.address) : "" - }; - }, - toJSON(message: SuperfluidIntermediaryAccountInfo): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.valAddr !== undefined && (obj.valAddr = message.valAddr); - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidIntermediaryAccountInfo { - const message = createBaseSuperfluidIntermediaryAccountInfo(); - message.denom = object.denom ?? ""; - message.valAddr = object.valAddr ?? ""; - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - message.address = object.address ?? ""; - return message; - }, - fromSDK(object: SuperfluidIntermediaryAccountInfoSDKType): SuperfluidIntermediaryAccountInfo { - return { - denom: object?.denom, - valAddr: object?.val_addr, - gaugeId: object?.gauge_id, - address: object?.address - }; - }, - toSDK(message: SuperfluidIntermediaryAccountInfo): SuperfluidIntermediaryAccountInfoSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.val_addr = message.valAddr; - obj.gauge_id = message.gaugeId; - obj.address = message.address; - return obj; - }, - fromAmino(object: SuperfluidIntermediaryAccountInfoAmino): SuperfluidIntermediaryAccountInfo { - return { - denom: object.denom, - valAddr: object.val_addr, - gaugeId: BigInt(object.gauge_id), - address: object.address - }; - }, - toAmino(message: SuperfluidIntermediaryAccountInfo): SuperfluidIntermediaryAccountInfoAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.val_addr = message.valAddr; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - obj.address = message.address; - return obj; - }, - fromAminoMsg(object: SuperfluidIntermediaryAccountInfoAminoMsg): SuperfluidIntermediaryAccountInfo { - return SuperfluidIntermediaryAccountInfo.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidIntermediaryAccountInfo): SuperfluidIntermediaryAccountInfoAminoMsg { - return { - type: "osmosis/superfluid-intermediary-account-info", - value: SuperfluidIntermediaryAccountInfo.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidIntermediaryAccountInfoProtoMsg): SuperfluidIntermediaryAccountInfo { - return SuperfluidIntermediaryAccountInfo.decode(message.value); - }, - toProto(message: SuperfluidIntermediaryAccountInfo): Uint8Array { - return SuperfluidIntermediaryAccountInfo.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidIntermediaryAccountInfo): SuperfluidIntermediaryAccountInfoProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidIntermediaryAccountInfo", - value: SuperfluidIntermediaryAccountInfo.encode(message).finish() - }; - } -}; -function createBaseAllIntermediaryAccountsRequest(): AllIntermediaryAccountsRequest { - return { - pagination: PageRequest.fromPartial({}) - }; -} -export const AllIntermediaryAccountsRequest = { - typeUrl: "/osmosis.superfluid.AllIntermediaryAccountsRequest", - aminoType: "osmosis/all-intermediary-accounts-request", - encode(message: AllIntermediaryAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AllIntermediaryAccountsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAllIntermediaryAccountsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AllIntermediaryAccountsRequest { - return { - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: AllIntermediaryAccountsRequest): unknown { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AllIntermediaryAccountsRequest { - const message = createBaseAllIntermediaryAccountsRequest(); - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: AllIntermediaryAccountsRequestSDKType): AllIntermediaryAccountsRequest { - return { - pagination: object.pagination ? PageRequest.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: AllIntermediaryAccountsRequest): AllIntermediaryAccountsRequestSDKType { - const obj: any = {}; - message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: AllIntermediaryAccountsRequestAmino): AllIntermediaryAccountsRequest { - return { - pagination: object?.pagination ? PageRequest.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: AllIntermediaryAccountsRequest): AllIntermediaryAccountsRequestAmino { - const obj: any = {}; - obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: AllIntermediaryAccountsRequestAminoMsg): AllIntermediaryAccountsRequest { - return AllIntermediaryAccountsRequest.fromAmino(object.value); - }, - toAminoMsg(message: AllIntermediaryAccountsRequest): AllIntermediaryAccountsRequestAminoMsg { - return { - type: "osmosis/all-intermediary-accounts-request", - value: AllIntermediaryAccountsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: AllIntermediaryAccountsRequestProtoMsg): AllIntermediaryAccountsRequest { - return AllIntermediaryAccountsRequest.decode(message.value); - }, - toProto(message: AllIntermediaryAccountsRequest): Uint8Array { - return AllIntermediaryAccountsRequest.encode(message).finish(); - }, - toProtoMsg(message: AllIntermediaryAccountsRequest): AllIntermediaryAccountsRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AllIntermediaryAccountsRequest", - value: AllIntermediaryAccountsRequest.encode(message).finish() - }; - } -}; -function createBaseAllIntermediaryAccountsResponse(): AllIntermediaryAccountsResponse { - return { - accounts: [], - pagination: PageResponse.fromPartial({}) - }; -} -export const AllIntermediaryAccountsResponse = { - typeUrl: "/osmosis.superfluid.AllIntermediaryAccountsResponse", - aminoType: "osmosis/all-intermediary-accounts-response", - encode(message: AllIntermediaryAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.accounts) { - SuperfluidIntermediaryAccountInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): AllIntermediaryAccountsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAllIntermediaryAccountsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accounts.push(SuperfluidIntermediaryAccountInfo.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): AllIntermediaryAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => SuperfluidIntermediaryAccountInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined - }; - }, - toJSON(message: AllIntermediaryAccountsResponse): unknown { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? SuperfluidIntermediaryAccountInfo.toJSON(e) : undefined); - } else { - obj.accounts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): AllIntermediaryAccountsResponse { - const message = createBaseAllIntermediaryAccountsResponse(); - message.accounts = object.accounts?.map(e => SuperfluidIntermediaryAccountInfo.fromPartial(e)) || []; - message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; - return message; - }, - fromSDK(object: AllIntermediaryAccountsResponseSDKType): AllIntermediaryAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => SuperfluidIntermediaryAccountInfo.fromSDK(e)) : [], - pagination: object.pagination ? PageResponse.fromSDK(object.pagination) : undefined - }; - }, - toSDK(message: AllIntermediaryAccountsResponse): AllIntermediaryAccountsResponseSDKType { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? SuperfluidIntermediaryAccountInfo.toSDK(e) : undefined); - } else { - obj.accounts = []; - } - message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toSDK(message.pagination) : undefined); - return obj; - }, - fromAmino(object: AllIntermediaryAccountsResponseAmino): AllIntermediaryAccountsResponse { - return { - accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => SuperfluidIntermediaryAccountInfo.fromAmino(e)) : [], - pagination: object?.pagination ? PageResponse.fromAmino(object.pagination) : undefined - }; - }, - toAmino(message: AllIntermediaryAccountsResponse): AllIntermediaryAccountsResponseAmino { - const obj: any = {}; - if (message.accounts) { - obj.accounts = message.accounts.map(e => e ? SuperfluidIntermediaryAccountInfo.toAmino(e) : undefined); - } else { - obj.accounts = []; - } - obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; - return obj; - }, - fromAminoMsg(object: AllIntermediaryAccountsResponseAminoMsg): AllIntermediaryAccountsResponse { - return AllIntermediaryAccountsResponse.fromAmino(object.value); - }, - toAminoMsg(message: AllIntermediaryAccountsResponse): AllIntermediaryAccountsResponseAminoMsg { - return { - type: "osmosis/all-intermediary-accounts-response", - value: AllIntermediaryAccountsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: AllIntermediaryAccountsResponseProtoMsg): AllIntermediaryAccountsResponse { - return AllIntermediaryAccountsResponse.decode(message.value); - }, - toProto(message: AllIntermediaryAccountsResponse): Uint8Array { - return AllIntermediaryAccountsResponse.encode(message).finish(); - }, - toProtoMsg(message: AllIntermediaryAccountsResponse): AllIntermediaryAccountsResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.AllIntermediaryAccountsResponse", - value: AllIntermediaryAccountsResponse.encode(message).finish() - }; - } -}; -function createBaseConnectedIntermediaryAccountRequest(): ConnectedIntermediaryAccountRequest { - return { - lockId: BigInt(0) - }; -} -export const ConnectedIntermediaryAccountRequest = { - typeUrl: "/osmosis.superfluid.ConnectedIntermediaryAccountRequest", - aminoType: "osmosis/connected-intermediary-account-request", - encode(message: ConnectedIntermediaryAccountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lockId !== BigInt(0)) { - writer.uint32(8).uint64(message.lockId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConnectedIntermediaryAccountRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConnectedIntermediaryAccountRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConnectedIntermediaryAccountRequest { - return { - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0) - }; - }, - toJSON(message: ConnectedIntermediaryAccountRequest): unknown { - const obj: any = {}; - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ConnectedIntermediaryAccountRequest { - const message = createBaseConnectedIntermediaryAccountRequest(); - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ConnectedIntermediaryAccountRequestSDKType): ConnectedIntermediaryAccountRequest { - return { - lockId: object?.lock_id - }; - }, - toSDK(message: ConnectedIntermediaryAccountRequest): ConnectedIntermediaryAccountRequestSDKType { - const obj: any = {}; - obj.lock_id = message.lockId; - return obj; - }, - fromAmino(object: ConnectedIntermediaryAccountRequestAmino): ConnectedIntermediaryAccountRequest { - return { - lockId: BigInt(object.lock_id) - }; - }, - toAmino(message: ConnectedIntermediaryAccountRequest): ConnectedIntermediaryAccountRequestAmino { - const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ConnectedIntermediaryAccountRequestAminoMsg): ConnectedIntermediaryAccountRequest { - return ConnectedIntermediaryAccountRequest.fromAmino(object.value); - }, - toAminoMsg(message: ConnectedIntermediaryAccountRequest): ConnectedIntermediaryAccountRequestAminoMsg { - return { - type: "osmosis/connected-intermediary-account-request", - value: ConnectedIntermediaryAccountRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ConnectedIntermediaryAccountRequestProtoMsg): ConnectedIntermediaryAccountRequest { - return ConnectedIntermediaryAccountRequest.decode(message.value); - }, - toProto(message: ConnectedIntermediaryAccountRequest): Uint8Array { - return ConnectedIntermediaryAccountRequest.encode(message).finish(); - }, - toProtoMsg(message: ConnectedIntermediaryAccountRequest): ConnectedIntermediaryAccountRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.ConnectedIntermediaryAccountRequest", - value: ConnectedIntermediaryAccountRequest.encode(message).finish() - }; - } -}; -function createBaseConnectedIntermediaryAccountResponse(): ConnectedIntermediaryAccountResponse { - return { - account: SuperfluidIntermediaryAccountInfo.fromPartial({}) - }; -} -export const ConnectedIntermediaryAccountResponse = { - typeUrl: "/osmosis.superfluid.ConnectedIntermediaryAccountResponse", - aminoType: "osmosis/connected-intermediary-account-response", - encode(message: ConnectedIntermediaryAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.account !== undefined) { - SuperfluidIntermediaryAccountInfo.encode(message.account, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConnectedIntermediaryAccountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConnectedIntermediaryAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = SuperfluidIntermediaryAccountInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConnectedIntermediaryAccountResponse { - return { - account: isSet(object.account) ? SuperfluidIntermediaryAccountInfo.fromJSON(object.account) : undefined - }; - }, - toJSON(message: ConnectedIntermediaryAccountResponse): unknown { - const obj: any = {}; - message.account !== undefined && (obj.account = message.account ? SuperfluidIntermediaryAccountInfo.toJSON(message.account) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConnectedIntermediaryAccountResponse { - const message = createBaseConnectedIntermediaryAccountResponse(); - message.account = object.account !== undefined && object.account !== null ? SuperfluidIntermediaryAccountInfo.fromPartial(object.account) : undefined; - return message; - }, - fromSDK(object: ConnectedIntermediaryAccountResponseSDKType): ConnectedIntermediaryAccountResponse { - return { - account: object.account ? SuperfluidIntermediaryAccountInfo.fromSDK(object.account) : undefined - }; - }, - toSDK(message: ConnectedIntermediaryAccountResponse): ConnectedIntermediaryAccountResponseSDKType { - const obj: any = {}; - message.account !== undefined && (obj.account = message.account ? SuperfluidIntermediaryAccountInfo.toSDK(message.account) : undefined); - return obj; - }, - fromAmino(object: ConnectedIntermediaryAccountResponseAmino): ConnectedIntermediaryAccountResponse { - return { - account: object?.account ? SuperfluidIntermediaryAccountInfo.fromAmino(object.account) : undefined - }; - }, - toAmino(message: ConnectedIntermediaryAccountResponse): ConnectedIntermediaryAccountResponseAmino { - const obj: any = {}; - obj.account = message.account ? SuperfluidIntermediaryAccountInfo.toAmino(message.account) : undefined; - return obj; - }, - fromAminoMsg(object: ConnectedIntermediaryAccountResponseAminoMsg): ConnectedIntermediaryAccountResponse { - return ConnectedIntermediaryAccountResponse.fromAmino(object.value); - }, - toAminoMsg(message: ConnectedIntermediaryAccountResponse): ConnectedIntermediaryAccountResponseAminoMsg { - return { - type: "osmosis/connected-intermediary-account-response", - value: ConnectedIntermediaryAccountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ConnectedIntermediaryAccountResponseProtoMsg): ConnectedIntermediaryAccountResponse { - return ConnectedIntermediaryAccountResponse.decode(message.value); - }, - toProto(message: ConnectedIntermediaryAccountResponse): Uint8Array { - return ConnectedIntermediaryAccountResponse.encode(message).finish(); - }, - toProtoMsg(message: ConnectedIntermediaryAccountResponse): ConnectedIntermediaryAccountResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.ConnectedIntermediaryAccountResponse", - value: ConnectedIntermediaryAccountResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalDelegationByValidatorForDenomRequest(): QueryTotalDelegationByValidatorForDenomRequest { - return { - denom: "" - }; -} -export const QueryTotalDelegationByValidatorForDenomRequest = { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByValidatorForDenomRequest", - aminoType: "osmosis/query-total-delegation-by-validator-for-denom-request", - encode(message: QueryTotalDelegationByValidatorForDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalDelegationByValidatorForDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalDelegationByValidatorForDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalDelegationByValidatorForDenomRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QueryTotalDelegationByValidatorForDenomRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalDelegationByValidatorForDenomRequest { - const message = createBaseQueryTotalDelegationByValidatorForDenomRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QueryTotalDelegationByValidatorForDenomRequestSDKType): QueryTotalDelegationByValidatorForDenomRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: QueryTotalDelegationByValidatorForDenomRequest): QueryTotalDelegationByValidatorForDenomRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QueryTotalDelegationByValidatorForDenomRequestAmino): QueryTotalDelegationByValidatorForDenomRequest { - return { - denom: object.denom - }; - }, - toAmino(message: QueryTotalDelegationByValidatorForDenomRequest): QueryTotalDelegationByValidatorForDenomRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QueryTotalDelegationByValidatorForDenomRequestAminoMsg): QueryTotalDelegationByValidatorForDenomRequest { - return QueryTotalDelegationByValidatorForDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalDelegationByValidatorForDenomRequest): QueryTotalDelegationByValidatorForDenomRequestAminoMsg { - return { - type: "osmosis/query-total-delegation-by-validator-for-denom-request", - value: QueryTotalDelegationByValidatorForDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalDelegationByValidatorForDenomRequestProtoMsg): QueryTotalDelegationByValidatorForDenomRequest { - return QueryTotalDelegationByValidatorForDenomRequest.decode(message.value); - }, - toProto(message: QueryTotalDelegationByValidatorForDenomRequest): Uint8Array { - return QueryTotalDelegationByValidatorForDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalDelegationByValidatorForDenomRequest): QueryTotalDelegationByValidatorForDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByValidatorForDenomRequest", - value: QueryTotalDelegationByValidatorForDenomRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalDelegationByValidatorForDenomResponse(): QueryTotalDelegationByValidatorForDenomResponse { - return { - assets: [] - }; -} -export const QueryTotalDelegationByValidatorForDenomResponse = { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByValidatorForDenomResponse", - aminoType: "osmosis/query-total-delegation-by-validator-for-denom-response", - encode(message: QueryTotalDelegationByValidatorForDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.assets) { - Delegations.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalDelegationByValidatorForDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalDelegationByValidatorForDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.assets.push(Delegations.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalDelegationByValidatorForDenomResponse { - return { - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => Delegations.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryTotalDelegationByValidatorForDenomResponse): unknown { - const obj: any = {}; - if (message.assets) { - obj.assets = message.assets.map(e => e ? Delegations.toJSON(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalDelegationByValidatorForDenomResponse { - const message = createBaseQueryTotalDelegationByValidatorForDenomResponse(); - message.assets = object.assets?.map(e => Delegations.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryTotalDelegationByValidatorForDenomResponseSDKType): QueryTotalDelegationByValidatorForDenomResponse { - return { - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => Delegations.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryTotalDelegationByValidatorForDenomResponse): QueryTotalDelegationByValidatorForDenomResponseSDKType { - const obj: any = {}; - if (message.assets) { - obj.assets = message.assets.map(e => e ? Delegations.toSDK(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromAmino(object: QueryTotalDelegationByValidatorForDenomResponseAmino): QueryTotalDelegationByValidatorForDenomResponse { - return { - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => Delegations.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryTotalDelegationByValidatorForDenomResponse): QueryTotalDelegationByValidatorForDenomResponseAmino { - const obj: any = {}; - if (message.assets) { - obj.assets = message.assets.map(e => e ? Delegations.toAmino(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromAminoMsg(object: QueryTotalDelegationByValidatorForDenomResponseAminoMsg): QueryTotalDelegationByValidatorForDenomResponse { - return QueryTotalDelegationByValidatorForDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalDelegationByValidatorForDenomResponse): QueryTotalDelegationByValidatorForDenomResponseAminoMsg { - return { - type: "osmosis/query-total-delegation-by-validator-for-denom-response", - value: QueryTotalDelegationByValidatorForDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalDelegationByValidatorForDenomResponseProtoMsg): QueryTotalDelegationByValidatorForDenomResponse { - return QueryTotalDelegationByValidatorForDenomResponse.decode(message.value); - }, - toProto(message: QueryTotalDelegationByValidatorForDenomResponse): Uint8Array { - return QueryTotalDelegationByValidatorForDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalDelegationByValidatorForDenomResponse): QueryTotalDelegationByValidatorForDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByValidatorForDenomResponse", - value: QueryTotalDelegationByValidatorForDenomResponse.encode(message).finish() - }; - } -}; -function createBaseDelegations(): Delegations { - return { - valAddr: "", - amountSfsd: "", - osmoEquivalent: "" - }; -} -export const Delegations = { - typeUrl: "/osmosis.superfluid.Delegations", - aminoType: "osmosis/delegations", - encode(message: Delegations, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.valAddr !== "") { - writer.uint32(10).string(message.valAddr); - } - if (message.amountSfsd !== "") { - writer.uint32(18).string(message.amountSfsd); - } - if (message.osmoEquivalent !== "") { - writer.uint32(26).string(message.osmoEquivalent); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Delegations { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDelegations(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.valAddr = reader.string(); - break; - case 2: - message.amountSfsd = reader.string(); - break; - case 3: - message.osmoEquivalent = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Delegations { - return { - valAddr: isSet(object.valAddr) ? String(object.valAddr) : "", - amountSfsd: isSet(object.amountSfsd) ? String(object.amountSfsd) : "", - osmoEquivalent: isSet(object.osmoEquivalent) ? String(object.osmoEquivalent) : "" - }; - }, - toJSON(message: Delegations): unknown { - const obj: any = {}; - message.valAddr !== undefined && (obj.valAddr = message.valAddr); - message.amountSfsd !== undefined && (obj.amountSfsd = message.amountSfsd); - message.osmoEquivalent !== undefined && (obj.osmoEquivalent = message.osmoEquivalent); - return obj; - }, - fromPartial(object: DeepPartial): Delegations { - const message = createBaseDelegations(); - message.valAddr = object.valAddr ?? ""; - message.amountSfsd = object.amountSfsd ?? ""; - message.osmoEquivalent = object.osmoEquivalent ?? ""; - return message; - }, - fromSDK(object: DelegationsSDKType): Delegations { - return { - valAddr: object?.val_addr, - amountSfsd: object?.amount_sfsd, - osmoEquivalent: object?.osmo_equivalent - }; - }, - toSDK(message: Delegations): DelegationsSDKType { - const obj: any = {}; - obj.val_addr = message.valAddr; - obj.amount_sfsd = message.amountSfsd; - obj.osmo_equivalent = message.osmoEquivalent; - return obj; - }, - fromAmino(object: DelegationsAmino): Delegations { - return { - valAddr: object.val_addr, - amountSfsd: object.amount_sfsd, - osmoEquivalent: object.osmo_equivalent - }; - }, - toAmino(message: Delegations): DelegationsAmino { - const obj: any = {}; - obj.val_addr = message.valAddr; - obj.amount_sfsd = message.amountSfsd; - obj.osmo_equivalent = message.osmoEquivalent; - return obj; - }, - fromAminoMsg(object: DelegationsAminoMsg): Delegations { - return Delegations.fromAmino(object.value); - }, - toAminoMsg(message: Delegations): DelegationsAminoMsg { - return { - type: "osmosis/delegations", - value: Delegations.toAmino(message) - }; - }, - fromProtoMsg(message: DelegationsProtoMsg): Delegations { - return Delegations.decode(message.value); - }, - toProto(message: Delegations): Uint8Array { - return Delegations.encode(message).finish(); - }, - toProtoMsg(message: Delegations): DelegationsProtoMsg { - return { - typeUrl: "/osmosis.superfluid.Delegations", - value: Delegations.encode(message).finish() - }; - } -}; -function createBaseTotalSuperfluidDelegationsRequest(): TotalSuperfluidDelegationsRequest { - return {}; -} -export const TotalSuperfluidDelegationsRequest = { - typeUrl: "/osmosis.superfluid.TotalSuperfluidDelegationsRequest", - aminoType: "osmosis/total-superfluid-delegations-request", - encode(_: TotalSuperfluidDelegationsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TotalSuperfluidDelegationsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTotalSuperfluidDelegationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): TotalSuperfluidDelegationsRequest { - return {}; - }, - toJSON(_: TotalSuperfluidDelegationsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): TotalSuperfluidDelegationsRequest { - const message = createBaseTotalSuperfluidDelegationsRequest(); - return message; - }, - fromSDK(_: TotalSuperfluidDelegationsRequestSDKType): TotalSuperfluidDelegationsRequest { - return {}; - }, - toSDK(_: TotalSuperfluidDelegationsRequest): TotalSuperfluidDelegationsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: TotalSuperfluidDelegationsRequestAmino): TotalSuperfluidDelegationsRequest { - return {}; - }, - toAmino(_: TotalSuperfluidDelegationsRequest): TotalSuperfluidDelegationsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: TotalSuperfluidDelegationsRequestAminoMsg): TotalSuperfluidDelegationsRequest { - return TotalSuperfluidDelegationsRequest.fromAmino(object.value); - }, - toAminoMsg(message: TotalSuperfluidDelegationsRequest): TotalSuperfluidDelegationsRequestAminoMsg { - return { - type: "osmosis/total-superfluid-delegations-request", - value: TotalSuperfluidDelegationsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: TotalSuperfluidDelegationsRequestProtoMsg): TotalSuperfluidDelegationsRequest { - return TotalSuperfluidDelegationsRequest.decode(message.value); - }, - toProto(message: TotalSuperfluidDelegationsRequest): Uint8Array { - return TotalSuperfluidDelegationsRequest.encode(message).finish(); - }, - toProtoMsg(message: TotalSuperfluidDelegationsRequest): TotalSuperfluidDelegationsRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.TotalSuperfluidDelegationsRequest", - value: TotalSuperfluidDelegationsRequest.encode(message).finish() - }; - } -}; -function createBaseTotalSuperfluidDelegationsResponse(): TotalSuperfluidDelegationsResponse { - return { - totalDelegations: "" - }; -} -export const TotalSuperfluidDelegationsResponse = { - typeUrl: "/osmosis.superfluid.TotalSuperfluidDelegationsResponse", - aminoType: "osmosis/total-superfluid-delegations-response", - encode(message: TotalSuperfluidDelegationsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.totalDelegations !== "") { - writer.uint32(10).string(message.totalDelegations); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TotalSuperfluidDelegationsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTotalSuperfluidDelegationsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalDelegations = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TotalSuperfluidDelegationsResponse { - return { - totalDelegations: isSet(object.totalDelegations) ? String(object.totalDelegations) : "" - }; - }, - toJSON(message: TotalSuperfluidDelegationsResponse): unknown { - const obj: any = {}; - message.totalDelegations !== undefined && (obj.totalDelegations = message.totalDelegations); - return obj; - }, - fromPartial(object: DeepPartial): TotalSuperfluidDelegationsResponse { - const message = createBaseTotalSuperfluidDelegationsResponse(); - message.totalDelegations = object.totalDelegations ?? ""; - return message; - }, - fromSDK(object: TotalSuperfluidDelegationsResponseSDKType): TotalSuperfluidDelegationsResponse { - return { - totalDelegations: object?.total_delegations - }; - }, - toSDK(message: TotalSuperfluidDelegationsResponse): TotalSuperfluidDelegationsResponseSDKType { - const obj: any = {}; - obj.total_delegations = message.totalDelegations; - return obj; - }, - fromAmino(object: TotalSuperfluidDelegationsResponseAmino): TotalSuperfluidDelegationsResponse { - return { - totalDelegations: object.total_delegations - }; - }, - toAmino(message: TotalSuperfluidDelegationsResponse): TotalSuperfluidDelegationsResponseAmino { - const obj: any = {}; - obj.total_delegations = message.totalDelegations; - return obj; - }, - fromAminoMsg(object: TotalSuperfluidDelegationsResponseAminoMsg): TotalSuperfluidDelegationsResponse { - return TotalSuperfluidDelegationsResponse.fromAmino(object.value); - }, - toAminoMsg(message: TotalSuperfluidDelegationsResponse): TotalSuperfluidDelegationsResponseAminoMsg { - return { - type: "osmosis/total-superfluid-delegations-response", - value: TotalSuperfluidDelegationsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: TotalSuperfluidDelegationsResponseProtoMsg): TotalSuperfluidDelegationsResponse { - return TotalSuperfluidDelegationsResponse.decode(message.value); - }, - toProto(message: TotalSuperfluidDelegationsResponse): Uint8Array { - return TotalSuperfluidDelegationsResponse.encode(message).finish(); - }, - toProtoMsg(message: TotalSuperfluidDelegationsResponse): TotalSuperfluidDelegationsResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.TotalSuperfluidDelegationsResponse", - value: TotalSuperfluidDelegationsResponse.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationAmountRequest(): SuperfluidDelegationAmountRequest { - return { - delegatorAddress: "", - validatorAddress: "", - denom: "" - }; -} -export const SuperfluidDelegationAmountRequest = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationAmountRequest", - aminoType: "osmosis/superfluid-delegation-amount-request", - encode(message: SuperfluidDelegationAmountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.denom !== "") { - writer.uint32(26).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationAmountRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationAmountRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationAmountRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: SuperfluidDelegationAmountRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationAmountRequest { - const message = createBaseSuperfluidDelegationAmountRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: SuperfluidDelegationAmountRequestSDKType): SuperfluidDelegationAmountRequest { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - denom: object?.denom - }; - }, - toSDK(message: SuperfluidDelegationAmountRequest): SuperfluidDelegationAmountRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: SuperfluidDelegationAmountRequestAmino): SuperfluidDelegationAmountRequest { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - denom: object.denom - }; - }, - toAmino(message: SuperfluidDelegationAmountRequest): SuperfluidDelegationAmountRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationAmountRequestAminoMsg): SuperfluidDelegationAmountRequest { - return SuperfluidDelegationAmountRequest.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationAmountRequest): SuperfluidDelegationAmountRequestAminoMsg { - return { - type: "osmosis/superfluid-delegation-amount-request", - value: SuperfluidDelegationAmountRequest.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationAmountRequestProtoMsg): SuperfluidDelegationAmountRequest { - return SuperfluidDelegationAmountRequest.decode(message.value); - }, - toProto(message: SuperfluidDelegationAmountRequest): Uint8Array { - return SuperfluidDelegationAmountRequest.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationAmountRequest): SuperfluidDelegationAmountRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationAmountRequest", - value: SuperfluidDelegationAmountRequest.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationAmountResponse(): SuperfluidDelegationAmountResponse { - return { - amount: [] - }; -} -export const SuperfluidDelegationAmountResponse = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationAmountResponse", - aminoType: "osmosis/superfluid-delegation-amount-response", - encode(message: SuperfluidDelegationAmountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.amount) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationAmountResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationAmountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationAmountResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: SuperfluidDelegationAmountResponse): unknown { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationAmountResponse { - const message = createBaseSuperfluidDelegationAmountResponse(); - message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SuperfluidDelegationAmountResponseSDKType): SuperfluidDelegationAmountResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: SuperfluidDelegationAmountResponse): SuperfluidDelegationAmountResponseSDKType { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAmino(object: SuperfluidDelegationAmountResponseAmino): SuperfluidDelegationAmountResponse { - return { - amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: SuperfluidDelegationAmountResponse): SuperfluidDelegationAmountResponseAmino { - const obj: any = {}; - if (message.amount) { - obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.amount = []; - } - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationAmountResponseAminoMsg): SuperfluidDelegationAmountResponse { - return SuperfluidDelegationAmountResponse.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationAmountResponse): SuperfluidDelegationAmountResponseAminoMsg { - return { - type: "osmosis/superfluid-delegation-amount-response", - value: SuperfluidDelegationAmountResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationAmountResponseProtoMsg): SuperfluidDelegationAmountResponse { - return SuperfluidDelegationAmountResponse.decode(message.value); - }, - toProto(message: SuperfluidDelegationAmountResponse): Uint8Array { - return SuperfluidDelegationAmountResponse.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationAmountResponse): SuperfluidDelegationAmountResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationAmountResponse", - value: SuperfluidDelegationAmountResponse.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationsByDelegatorRequest(): SuperfluidDelegationsByDelegatorRequest { - return { - delegatorAddress: "" - }; -} -export const SuperfluidDelegationsByDelegatorRequest = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByDelegatorRequest", - aminoType: "osmosis/superfluid-delegations-by-delegator-request", - encode(message: SuperfluidDelegationsByDelegatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationsByDelegatorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationsByDelegatorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationsByDelegatorRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" - }; - }, - toJSON(message: SuperfluidDelegationsByDelegatorRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationsByDelegatorRequest { - const message = createBaseSuperfluidDelegationsByDelegatorRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - return message; - }, - fromSDK(object: SuperfluidDelegationsByDelegatorRequestSDKType): SuperfluidDelegationsByDelegatorRequest { - return { - delegatorAddress: object?.delegator_address - }; - }, - toSDK(message: SuperfluidDelegationsByDelegatorRequest): SuperfluidDelegationsByDelegatorRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAmino(object: SuperfluidDelegationsByDelegatorRequestAmino): SuperfluidDelegationsByDelegatorRequest { - return { - delegatorAddress: object.delegator_address - }; - }, - toAmino(message: SuperfluidDelegationsByDelegatorRequest): SuperfluidDelegationsByDelegatorRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationsByDelegatorRequestAminoMsg): SuperfluidDelegationsByDelegatorRequest { - return SuperfluidDelegationsByDelegatorRequest.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationsByDelegatorRequest): SuperfluidDelegationsByDelegatorRequestAminoMsg { - return { - type: "osmosis/superfluid-delegations-by-delegator-request", - value: SuperfluidDelegationsByDelegatorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationsByDelegatorRequestProtoMsg): SuperfluidDelegationsByDelegatorRequest { - return SuperfluidDelegationsByDelegatorRequest.decode(message.value); - }, - toProto(message: SuperfluidDelegationsByDelegatorRequest): Uint8Array { - return SuperfluidDelegationsByDelegatorRequest.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationsByDelegatorRequest): SuperfluidDelegationsByDelegatorRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByDelegatorRequest", - value: SuperfluidDelegationsByDelegatorRequest.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationsByDelegatorResponse(): SuperfluidDelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: [], - totalDelegatedCoins: [], - totalEquivalentStakedAmount: Coin.fromPartial({}) - }; -} -export const SuperfluidDelegationsByDelegatorResponse = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByDelegatorResponse", - aminoType: "osmosis/superfluid-delegations-by-delegator-response", - encode(message: SuperfluidDelegationsByDelegatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.superfluidDelegationRecords) { - SuperfluidDelegationRecord.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.totalDelegatedCoins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.totalEquivalentStakedAmount !== undefined) { - Coin.encode(message.totalEquivalentStakedAmount, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationsByDelegatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationsByDelegatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.superfluidDelegationRecords.push(SuperfluidDelegationRecord.decode(reader, reader.uint32())); - break; - case 2: - message.totalDelegatedCoins.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.totalEquivalentStakedAmount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluidDelegationRecords) ? object.superfluidDelegationRecords.map((e: any) => SuperfluidDelegationRecord.fromJSON(e)) : [], - totalDelegatedCoins: Array.isArray(object?.totalDelegatedCoins) ? object.totalDelegatedCoins.map((e: any) => Coin.fromJSON(e)) : [], - totalEquivalentStakedAmount: isSet(object.totalEquivalentStakedAmount) ? Coin.fromJSON(object.totalEquivalentStakedAmount) : undefined - }; - }, - toJSON(message: SuperfluidDelegationsByDelegatorResponse): unknown { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluidDelegationRecords = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toJSON(e) : undefined); - } else { - obj.superfluidDelegationRecords = []; - } - if (message.totalDelegatedCoins) { - obj.totalDelegatedCoins = message.totalDelegatedCoins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.totalDelegatedCoins = []; - } - message.totalEquivalentStakedAmount !== undefined && (obj.totalEquivalentStakedAmount = message.totalEquivalentStakedAmount ? Coin.toJSON(message.totalEquivalentStakedAmount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationsByDelegatorResponse { - const message = createBaseSuperfluidDelegationsByDelegatorResponse(); - message.superfluidDelegationRecords = object.superfluidDelegationRecords?.map(e => SuperfluidDelegationRecord.fromPartial(e)) || []; - message.totalDelegatedCoins = object.totalDelegatedCoins?.map(e => Coin.fromPartial(e)) || []; - message.totalEquivalentStakedAmount = object.totalEquivalentStakedAmount !== undefined && object.totalEquivalentStakedAmount !== null ? Coin.fromPartial(object.totalEquivalentStakedAmount) : undefined; - return message; - }, - fromSDK(object: SuperfluidDelegationsByDelegatorResponseSDKType): SuperfluidDelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromSDK(e)) : [], - totalDelegatedCoins: Array.isArray(object?.total_delegated_coins) ? object.total_delegated_coins.map((e: any) => Coin.fromSDK(e)) : [], - totalEquivalentStakedAmount: object.total_equivalent_staked_amount ? Coin.fromSDK(object.total_equivalent_staked_amount) : undefined - }; - }, - toSDK(message: SuperfluidDelegationsByDelegatorResponse): SuperfluidDelegationsByDelegatorResponseSDKType { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toSDK(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - if (message.totalDelegatedCoins) { - obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total_delegated_coins = []; - } - message.totalEquivalentStakedAmount !== undefined && (obj.total_equivalent_staked_amount = message.totalEquivalentStakedAmount ? Coin.toSDK(message.totalEquivalentStakedAmount) : undefined); - return obj; - }, - fromAmino(object: SuperfluidDelegationsByDelegatorResponseAmino): SuperfluidDelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromAmino(e)) : [], - totalDelegatedCoins: Array.isArray(object?.total_delegated_coins) ? object.total_delegated_coins.map((e: any) => Coin.fromAmino(e)) : [], - totalEquivalentStakedAmount: object?.total_equivalent_staked_amount ? Coin.fromAmino(object.total_equivalent_staked_amount) : undefined - }; - }, - toAmino(message: SuperfluidDelegationsByDelegatorResponse): SuperfluidDelegationsByDelegatorResponseAmino { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - if (message.totalDelegatedCoins) { - obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total_delegated_coins = []; - } - obj.total_equivalent_staked_amount = message.totalEquivalentStakedAmount ? Coin.toAmino(message.totalEquivalentStakedAmount) : undefined; - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationsByDelegatorResponseAminoMsg): SuperfluidDelegationsByDelegatorResponse { - return SuperfluidDelegationsByDelegatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationsByDelegatorResponse): SuperfluidDelegationsByDelegatorResponseAminoMsg { - return { - type: "osmosis/superfluid-delegations-by-delegator-response", - value: SuperfluidDelegationsByDelegatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationsByDelegatorResponseProtoMsg): SuperfluidDelegationsByDelegatorResponse { - return SuperfluidDelegationsByDelegatorResponse.decode(message.value); - }, - toProto(message: SuperfluidDelegationsByDelegatorResponse): Uint8Array { - return SuperfluidDelegationsByDelegatorResponse.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationsByDelegatorResponse): SuperfluidDelegationsByDelegatorResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByDelegatorResponse", - value: SuperfluidDelegationsByDelegatorResponse.encode(message).finish() - }; - } -}; -function createBaseSuperfluidUndelegationsByDelegatorRequest(): SuperfluidUndelegationsByDelegatorRequest { - return { - delegatorAddress: "", - denom: "" - }; -} -export const SuperfluidUndelegationsByDelegatorRequest = { - typeUrl: "/osmosis.superfluid.SuperfluidUndelegationsByDelegatorRequest", - aminoType: "osmosis/superfluid-undelegations-by-delegator-request", - encode(message: SuperfluidUndelegationsByDelegatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidUndelegationsByDelegatorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidUndelegationsByDelegatorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidUndelegationsByDelegatorRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: SuperfluidUndelegationsByDelegatorRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidUndelegationsByDelegatorRequest { - const message = createBaseSuperfluidUndelegationsByDelegatorRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: SuperfluidUndelegationsByDelegatorRequestSDKType): SuperfluidUndelegationsByDelegatorRequest { - return { - delegatorAddress: object?.delegator_address, - denom: object?.denom - }; - }, - toSDK(message: SuperfluidUndelegationsByDelegatorRequest): SuperfluidUndelegationsByDelegatorRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: SuperfluidUndelegationsByDelegatorRequestAmino): SuperfluidUndelegationsByDelegatorRequest { - return { - delegatorAddress: object.delegator_address, - denom: object.denom - }; - }, - toAmino(message: SuperfluidUndelegationsByDelegatorRequest): SuperfluidUndelegationsByDelegatorRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: SuperfluidUndelegationsByDelegatorRequestAminoMsg): SuperfluidUndelegationsByDelegatorRequest { - return SuperfluidUndelegationsByDelegatorRequest.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidUndelegationsByDelegatorRequest): SuperfluidUndelegationsByDelegatorRequestAminoMsg { - return { - type: "osmosis/superfluid-undelegations-by-delegator-request", - value: SuperfluidUndelegationsByDelegatorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidUndelegationsByDelegatorRequestProtoMsg): SuperfluidUndelegationsByDelegatorRequest { - return SuperfluidUndelegationsByDelegatorRequest.decode(message.value); - }, - toProto(message: SuperfluidUndelegationsByDelegatorRequest): Uint8Array { - return SuperfluidUndelegationsByDelegatorRequest.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidUndelegationsByDelegatorRequest): SuperfluidUndelegationsByDelegatorRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidUndelegationsByDelegatorRequest", - value: SuperfluidUndelegationsByDelegatorRequest.encode(message).finish() - }; - } -}; -function createBaseSuperfluidUndelegationsByDelegatorResponse(): SuperfluidUndelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: [], - totalUndelegatedCoins: [], - syntheticLocks: [] - }; -} -export const SuperfluidUndelegationsByDelegatorResponse = { - typeUrl: "/osmosis.superfluid.SuperfluidUndelegationsByDelegatorResponse", - aminoType: "osmosis/superfluid-undelegations-by-delegator-response", - encode(message: SuperfluidUndelegationsByDelegatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.superfluidDelegationRecords) { - SuperfluidDelegationRecord.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.totalUndelegatedCoins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.syntheticLocks) { - SyntheticLock.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidUndelegationsByDelegatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidUndelegationsByDelegatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.superfluidDelegationRecords.push(SuperfluidDelegationRecord.decode(reader, reader.uint32())); - break; - case 2: - message.totalUndelegatedCoins.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.syntheticLocks.push(SyntheticLock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidUndelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluidDelegationRecords) ? object.superfluidDelegationRecords.map((e: any) => SuperfluidDelegationRecord.fromJSON(e)) : [], - totalUndelegatedCoins: Array.isArray(object?.totalUndelegatedCoins) ? object.totalUndelegatedCoins.map((e: any) => Coin.fromJSON(e)) : [], - syntheticLocks: Array.isArray(object?.syntheticLocks) ? object.syntheticLocks.map((e: any) => SyntheticLock.fromJSON(e)) : [] - }; - }, - toJSON(message: SuperfluidUndelegationsByDelegatorResponse): unknown { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluidDelegationRecords = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toJSON(e) : undefined); - } else { - obj.superfluidDelegationRecords = []; - } - if (message.totalUndelegatedCoins) { - obj.totalUndelegatedCoins = message.totalUndelegatedCoins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.totalUndelegatedCoins = []; - } - if (message.syntheticLocks) { - obj.syntheticLocks = message.syntheticLocks.map(e => e ? SyntheticLock.toJSON(e) : undefined); - } else { - obj.syntheticLocks = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidUndelegationsByDelegatorResponse { - const message = createBaseSuperfluidUndelegationsByDelegatorResponse(); - message.superfluidDelegationRecords = object.superfluidDelegationRecords?.map(e => SuperfluidDelegationRecord.fromPartial(e)) || []; - message.totalUndelegatedCoins = object.totalUndelegatedCoins?.map(e => Coin.fromPartial(e)) || []; - message.syntheticLocks = object.syntheticLocks?.map(e => SyntheticLock.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SuperfluidUndelegationsByDelegatorResponseSDKType): SuperfluidUndelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromSDK(e)) : [], - totalUndelegatedCoins: Array.isArray(object?.total_undelegated_coins) ? object.total_undelegated_coins.map((e: any) => Coin.fromSDK(e)) : [], - syntheticLocks: Array.isArray(object?.synthetic_locks) ? object.synthetic_locks.map((e: any) => SyntheticLock.fromSDK(e)) : [] - }; - }, - toSDK(message: SuperfluidUndelegationsByDelegatorResponse): SuperfluidUndelegationsByDelegatorResponseSDKType { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toSDK(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - if (message.totalUndelegatedCoins) { - obj.total_undelegated_coins = message.totalUndelegatedCoins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total_undelegated_coins = []; - } - if (message.syntheticLocks) { - obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toSDK(e) : undefined); - } else { - obj.synthetic_locks = []; - } - return obj; - }, - fromAmino(object: SuperfluidUndelegationsByDelegatorResponseAmino): SuperfluidUndelegationsByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromAmino(e)) : [], - totalUndelegatedCoins: Array.isArray(object?.total_undelegated_coins) ? object.total_undelegated_coins.map((e: any) => Coin.fromAmino(e)) : [], - syntheticLocks: Array.isArray(object?.synthetic_locks) ? object.synthetic_locks.map((e: any) => SyntheticLock.fromAmino(e)) : [] - }; - }, - toAmino(message: SuperfluidUndelegationsByDelegatorResponse): SuperfluidUndelegationsByDelegatorResponseAmino { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - if (message.totalUndelegatedCoins) { - obj.total_undelegated_coins = message.totalUndelegatedCoins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total_undelegated_coins = []; - } - if (message.syntheticLocks) { - obj.synthetic_locks = message.syntheticLocks.map(e => e ? SyntheticLock.toAmino(e) : undefined); - } else { - obj.synthetic_locks = []; - } - return obj; - }, - fromAminoMsg(object: SuperfluidUndelegationsByDelegatorResponseAminoMsg): SuperfluidUndelegationsByDelegatorResponse { - return SuperfluidUndelegationsByDelegatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidUndelegationsByDelegatorResponse): SuperfluidUndelegationsByDelegatorResponseAminoMsg { - return { - type: "osmosis/superfluid-undelegations-by-delegator-response", - value: SuperfluidUndelegationsByDelegatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidUndelegationsByDelegatorResponseProtoMsg): SuperfluidUndelegationsByDelegatorResponse { - return SuperfluidUndelegationsByDelegatorResponse.decode(message.value); - }, - toProto(message: SuperfluidUndelegationsByDelegatorResponse): Uint8Array { - return SuperfluidUndelegationsByDelegatorResponse.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidUndelegationsByDelegatorResponse): SuperfluidUndelegationsByDelegatorResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidUndelegationsByDelegatorResponse", - value: SuperfluidUndelegationsByDelegatorResponse.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationsByValidatorDenomRequest(): SuperfluidDelegationsByValidatorDenomRequest { - return { - validatorAddress: "", - denom: "" - }; -} -export const SuperfluidDelegationsByValidatorDenomRequest = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByValidatorDenomRequest", - aminoType: "osmosis/superfluid-delegations-by-validator-denom-request", - encode(message: SuperfluidDelegationsByValidatorDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationsByValidatorDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationsByValidatorDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationsByValidatorDenomRequest { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: SuperfluidDelegationsByValidatorDenomRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationsByValidatorDenomRequest { - const message = createBaseSuperfluidDelegationsByValidatorDenomRequest(); - message.validatorAddress = object.validatorAddress ?? ""; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: SuperfluidDelegationsByValidatorDenomRequestSDKType): SuperfluidDelegationsByValidatorDenomRequest { - return { - validatorAddress: object?.validator_address, - denom: object?.denom - }; - }, - toSDK(message: SuperfluidDelegationsByValidatorDenomRequest): SuperfluidDelegationsByValidatorDenomRequestSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: SuperfluidDelegationsByValidatorDenomRequestAmino): SuperfluidDelegationsByValidatorDenomRequest { - return { - validatorAddress: object.validator_address, - denom: object.denom - }; - }, - toAmino(message: SuperfluidDelegationsByValidatorDenomRequest): SuperfluidDelegationsByValidatorDenomRequestAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationsByValidatorDenomRequestAminoMsg): SuperfluidDelegationsByValidatorDenomRequest { - return SuperfluidDelegationsByValidatorDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationsByValidatorDenomRequest): SuperfluidDelegationsByValidatorDenomRequestAminoMsg { - return { - type: "osmosis/superfluid-delegations-by-validator-denom-request", - value: SuperfluidDelegationsByValidatorDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationsByValidatorDenomRequestProtoMsg): SuperfluidDelegationsByValidatorDenomRequest { - return SuperfluidDelegationsByValidatorDenomRequest.decode(message.value); - }, - toProto(message: SuperfluidDelegationsByValidatorDenomRequest): Uint8Array { - return SuperfluidDelegationsByValidatorDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationsByValidatorDenomRequest): SuperfluidDelegationsByValidatorDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByValidatorDenomRequest", - value: SuperfluidDelegationsByValidatorDenomRequest.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationsByValidatorDenomResponse(): SuperfluidDelegationsByValidatorDenomResponse { - return { - superfluidDelegationRecords: [] - }; -} -export const SuperfluidDelegationsByValidatorDenomResponse = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByValidatorDenomResponse", - aminoType: "osmosis/superfluid-delegations-by-validator-denom-response", - encode(message: SuperfluidDelegationsByValidatorDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.superfluidDelegationRecords) { - SuperfluidDelegationRecord.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationsByValidatorDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationsByValidatorDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.superfluidDelegationRecords.push(SuperfluidDelegationRecord.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationsByValidatorDenomResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluidDelegationRecords) ? object.superfluidDelegationRecords.map((e: any) => SuperfluidDelegationRecord.fromJSON(e)) : [] - }; - }, - toJSON(message: SuperfluidDelegationsByValidatorDenomResponse): unknown { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluidDelegationRecords = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toJSON(e) : undefined); - } else { - obj.superfluidDelegationRecords = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationsByValidatorDenomResponse { - const message = createBaseSuperfluidDelegationsByValidatorDenomResponse(); - message.superfluidDelegationRecords = object.superfluidDelegationRecords?.map(e => SuperfluidDelegationRecord.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SuperfluidDelegationsByValidatorDenomResponseSDKType): SuperfluidDelegationsByValidatorDenomResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromSDK(e)) : [] - }; - }, - toSDK(message: SuperfluidDelegationsByValidatorDenomResponse): SuperfluidDelegationsByValidatorDenomResponseSDKType { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toSDK(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - return obj; - }, - fromAmino(object: SuperfluidDelegationsByValidatorDenomResponseAmino): SuperfluidDelegationsByValidatorDenomResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromAmino(e)) : [] - }; - }, - toAmino(message: SuperfluidDelegationsByValidatorDenomResponse): SuperfluidDelegationsByValidatorDenomResponseAmino { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationsByValidatorDenomResponseAminoMsg): SuperfluidDelegationsByValidatorDenomResponse { - return SuperfluidDelegationsByValidatorDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationsByValidatorDenomResponse): SuperfluidDelegationsByValidatorDenomResponseAminoMsg { - return { - type: "osmosis/superfluid-delegations-by-validator-denom-response", - value: SuperfluidDelegationsByValidatorDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationsByValidatorDenomResponseProtoMsg): SuperfluidDelegationsByValidatorDenomResponse { - return SuperfluidDelegationsByValidatorDenomResponse.decode(message.value); - }, - toProto(message: SuperfluidDelegationsByValidatorDenomResponse): Uint8Array { - return SuperfluidDelegationsByValidatorDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationsByValidatorDenomResponse): SuperfluidDelegationsByValidatorDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationsByValidatorDenomResponse", - value: SuperfluidDelegationsByValidatorDenomResponse.encode(message).finish() - }; - } -}; -function createBaseEstimateSuperfluidDelegatedAmountByValidatorDenomRequest(): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - return { - validatorAddress: "", - denom: "" - }; -} -export const EstimateSuperfluidDelegatedAmountByValidatorDenomRequest = { - typeUrl: "/osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest", - aminoType: "osmosis/estimate-superfluid-delegated-amount-by-validator-denom-request", - encode(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validatorAddress !== "") { - writer.uint32(10).string(message.validatorAddress); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEstimateSuperfluidDelegatedAmountByValidatorDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorAddress = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - return { - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): unknown { - const obj: any = {}; - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - const message = createBaseEstimateSuperfluidDelegatedAmountByValidatorDenomRequest(); - message.validatorAddress = object.validatorAddress ?? ""; - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: EstimateSuperfluidDelegatedAmountByValidatorDenomRequestSDKType): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - return { - validatorAddress: object?.validator_address, - denom: object?.denom - }; - }, - toSDK(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): EstimateSuperfluidDelegatedAmountByValidatorDenomRequestSDKType { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAmino): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - return { - validatorAddress: object.validator_address, - denom: object.denom - }; - }, - toAmino(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAmino { - const obj: any = {}; - obj.validator_address = message.validatorAddress; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAminoMsg): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - return EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): EstimateSuperfluidDelegatedAmountByValidatorDenomRequestAminoMsg { - return { - type: "osmosis/estimate-superfluid-delegated-amount-by-validator-denom-request", - value: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequestProtoMsg): EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { - return EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.decode(message.value); - }, - toProto(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): Uint8Array { - return EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest): EstimateSuperfluidDelegatedAmountByValidatorDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest", - value: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.encode(message).finish() - }; - } -}; -function createBaseEstimateSuperfluidDelegatedAmountByValidatorDenomResponse(): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - return { - totalDelegatedCoins: [] - }; -} -export const EstimateSuperfluidDelegatedAmountByValidatorDenomResponse = { - typeUrl: "/osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomResponse", - aminoType: "osmosis/estimate-superfluid-delegated-amount-by-validator-denom-response", - encode(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.totalDelegatedCoins) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEstimateSuperfluidDelegatedAmountByValidatorDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalDelegatedCoins.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - return { - totalDelegatedCoins: Array.isArray(object?.totalDelegatedCoins) ? object.totalDelegatedCoins.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse): unknown { - const obj: any = {}; - if (message.totalDelegatedCoins) { - obj.totalDelegatedCoins = message.totalDelegatedCoins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.totalDelegatedCoins = []; - } - return obj; - }, - fromPartial(object: DeepPartial): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - const message = createBaseEstimateSuperfluidDelegatedAmountByValidatorDenomResponse(); - message.totalDelegatedCoins = object.totalDelegatedCoins?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: EstimateSuperfluidDelegatedAmountByValidatorDenomResponseSDKType): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - return { - totalDelegatedCoins: Array.isArray(object?.total_delegated_coins) ? object.total_delegated_coins.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse): EstimateSuperfluidDelegatedAmountByValidatorDenomResponseSDKType { - const obj: any = {}; - if (message.totalDelegatedCoins) { - obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total_delegated_coins = []; - } - return obj; - }, - fromAmino(object: EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAmino): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - return { - totalDelegatedCoins: Array.isArray(object?.total_delegated_coins) ? object.total_delegated_coins.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse): EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAmino { - const obj: any = {}; - if (message.totalDelegatedCoins) { - obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total_delegated_coins = []; - } - return obj; - }, - fromAminoMsg(object: EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAminoMsg): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - return EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse): EstimateSuperfluidDelegatedAmountByValidatorDenomResponseAminoMsg { - return { - type: "osmosis/estimate-superfluid-delegated-amount-by-validator-denom-response", - value: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponseProtoMsg): EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { - return EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.decode(message.value); - }, - toProto(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse): Uint8Array { - return EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse): EstimateSuperfluidDelegatedAmountByValidatorDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomResponse", - value: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.encode(message).finish() - }; - } -}; -function createBaseQueryTotalDelegationByDelegatorRequest(): QueryTotalDelegationByDelegatorRequest { - return { - delegatorAddress: "" - }; -} -export const QueryTotalDelegationByDelegatorRequest = { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByDelegatorRequest", - aminoType: "osmosis/query-total-delegation-by-delegator-request", - encode(message: QueryTotalDelegationByDelegatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalDelegationByDelegatorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalDelegationByDelegatorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalDelegationByDelegatorRequest { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" - }; - }, - toJSON(message: QueryTotalDelegationByDelegatorRequest): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalDelegationByDelegatorRequest { - const message = createBaseQueryTotalDelegationByDelegatorRequest(); - message.delegatorAddress = object.delegatorAddress ?? ""; - return message; - }, - fromSDK(object: QueryTotalDelegationByDelegatorRequestSDKType): QueryTotalDelegationByDelegatorRequest { - return { - delegatorAddress: object?.delegator_address - }; - }, - toSDK(message: QueryTotalDelegationByDelegatorRequest): QueryTotalDelegationByDelegatorRequestSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAmino(object: QueryTotalDelegationByDelegatorRequestAmino): QueryTotalDelegationByDelegatorRequest { - return { - delegatorAddress: object.delegator_address - }; - }, - toAmino(message: QueryTotalDelegationByDelegatorRequest): QueryTotalDelegationByDelegatorRequestAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - return obj; - }, - fromAminoMsg(object: QueryTotalDelegationByDelegatorRequestAminoMsg): QueryTotalDelegationByDelegatorRequest { - return QueryTotalDelegationByDelegatorRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalDelegationByDelegatorRequest): QueryTotalDelegationByDelegatorRequestAminoMsg { - return { - type: "osmosis/query-total-delegation-by-delegator-request", - value: QueryTotalDelegationByDelegatorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalDelegationByDelegatorRequestProtoMsg): QueryTotalDelegationByDelegatorRequest { - return QueryTotalDelegationByDelegatorRequest.decode(message.value); - }, - toProto(message: QueryTotalDelegationByDelegatorRequest): Uint8Array { - return QueryTotalDelegationByDelegatorRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalDelegationByDelegatorRequest): QueryTotalDelegationByDelegatorRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByDelegatorRequest", - value: QueryTotalDelegationByDelegatorRequest.encode(message).finish() - }; - } -}; -function createBaseQueryTotalDelegationByDelegatorResponse(): QueryTotalDelegationByDelegatorResponse { - return { - superfluidDelegationRecords: [], - delegationResponse: [], - totalDelegatedCoins: [], - totalEquivalentStakedAmount: Coin.fromPartial({}) - }; -} -export const QueryTotalDelegationByDelegatorResponse = { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByDelegatorResponse", - aminoType: "osmosis/query-total-delegation-by-delegator-response", - encode(message: QueryTotalDelegationByDelegatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.superfluidDelegationRecords) { - SuperfluidDelegationRecord.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.delegationResponse) { - DelegationResponse.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.totalDelegatedCoins) { - Coin.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.totalEquivalentStakedAmount !== undefined) { - Coin.encode(message.totalEquivalentStakedAmount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryTotalDelegationByDelegatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTotalDelegationByDelegatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.superfluidDelegationRecords.push(SuperfluidDelegationRecord.decode(reader, reader.uint32())); - break; - case 2: - message.delegationResponse.push(DelegationResponse.decode(reader, reader.uint32())); - break; - case 3: - message.totalDelegatedCoins.push(Coin.decode(reader, reader.uint32())); - break; - case 4: - message.totalEquivalentStakedAmount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryTotalDelegationByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluidDelegationRecords) ? object.superfluidDelegationRecords.map((e: any) => SuperfluidDelegationRecord.fromJSON(e)) : [], - delegationResponse: Array.isArray(object?.delegationResponse) ? object.delegationResponse.map((e: any) => DelegationResponse.fromJSON(e)) : [], - totalDelegatedCoins: Array.isArray(object?.totalDelegatedCoins) ? object.totalDelegatedCoins.map((e: any) => Coin.fromJSON(e)) : [], - totalEquivalentStakedAmount: isSet(object.totalEquivalentStakedAmount) ? Coin.fromJSON(object.totalEquivalentStakedAmount) : undefined - }; - }, - toJSON(message: QueryTotalDelegationByDelegatorResponse): unknown { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluidDelegationRecords = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toJSON(e) : undefined); - } else { - obj.superfluidDelegationRecords = []; - } - if (message.delegationResponse) { - obj.delegationResponse = message.delegationResponse.map(e => e ? DelegationResponse.toJSON(e) : undefined); - } else { - obj.delegationResponse = []; - } - if (message.totalDelegatedCoins) { - obj.totalDelegatedCoins = message.totalDelegatedCoins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.totalDelegatedCoins = []; - } - message.totalEquivalentStakedAmount !== undefined && (obj.totalEquivalentStakedAmount = message.totalEquivalentStakedAmount ? Coin.toJSON(message.totalEquivalentStakedAmount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryTotalDelegationByDelegatorResponse { - const message = createBaseQueryTotalDelegationByDelegatorResponse(); - message.superfluidDelegationRecords = object.superfluidDelegationRecords?.map(e => SuperfluidDelegationRecord.fromPartial(e)) || []; - message.delegationResponse = object.delegationResponse?.map(e => DelegationResponse.fromPartial(e)) || []; - message.totalDelegatedCoins = object.totalDelegatedCoins?.map(e => Coin.fromPartial(e)) || []; - message.totalEquivalentStakedAmount = object.totalEquivalentStakedAmount !== undefined && object.totalEquivalentStakedAmount !== null ? Coin.fromPartial(object.totalEquivalentStakedAmount) : undefined; - return message; - }, - fromSDK(object: QueryTotalDelegationByDelegatorResponseSDKType): QueryTotalDelegationByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromSDK(e)) : [], - delegationResponse: Array.isArray(object?.delegation_response) ? object.delegation_response.map((e: any) => DelegationResponse.fromSDK(e)) : [], - totalDelegatedCoins: Array.isArray(object?.total_delegated_coins) ? object.total_delegated_coins.map((e: any) => Coin.fromSDK(e)) : [], - totalEquivalentStakedAmount: object.total_equivalent_staked_amount ? Coin.fromSDK(object.total_equivalent_staked_amount) : undefined - }; - }, - toSDK(message: QueryTotalDelegationByDelegatorResponse): QueryTotalDelegationByDelegatorResponseSDKType { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toSDK(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - if (message.delegationResponse) { - obj.delegation_response = message.delegationResponse.map(e => e ? DelegationResponse.toSDK(e) : undefined); - } else { - obj.delegation_response = []; - } - if (message.totalDelegatedCoins) { - obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.total_delegated_coins = []; - } - message.totalEquivalentStakedAmount !== undefined && (obj.total_equivalent_staked_amount = message.totalEquivalentStakedAmount ? Coin.toSDK(message.totalEquivalentStakedAmount) : undefined); - return obj; - }, - fromAmino(object: QueryTotalDelegationByDelegatorResponseAmino): QueryTotalDelegationByDelegatorResponse { - return { - superfluidDelegationRecords: Array.isArray(object?.superfluid_delegation_records) ? object.superfluid_delegation_records.map((e: any) => SuperfluidDelegationRecord.fromAmino(e)) : [], - delegationResponse: Array.isArray(object?.delegation_response) ? object.delegation_response.map((e: any) => DelegationResponse.fromAmino(e)) : [], - totalDelegatedCoins: Array.isArray(object?.total_delegated_coins) ? object.total_delegated_coins.map((e: any) => Coin.fromAmino(e)) : [], - totalEquivalentStakedAmount: object?.total_equivalent_staked_amount ? Coin.fromAmino(object.total_equivalent_staked_amount) : undefined - }; - }, - toAmino(message: QueryTotalDelegationByDelegatorResponse): QueryTotalDelegationByDelegatorResponseAmino { - const obj: any = {}; - if (message.superfluidDelegationRecords) { - obj.superfluid_delegation_records = message.superfluidDelegationRecords.map(e => e ? SuperfluidDelegationRecord.toAmino(e) : undefined); - } else { - obj.superfluid_delegation_records = []; - } - if (message.delegationResponse) { - obj.delegation_response = message.delegationResponse.map(e => e ? DelegationResponse.toAmino(e) : undefined); - } else { - obj.delegation_response = []; - } - if (message.totalDelegatedCoins) { - obj.total_delegated_coins = message.totalDelegatedCoins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.total_delegated_coins = []; - } - obj.total_equivalent_staked_amount = message.totalEquivalentStakedAmount ? Coin.toAmino(message.totalEquivalentStakedAmount) : undefined; - return obj; - }, - fromAminoMsg(object: QueryTotalDelegationByDelegatorResponseAminoMsg): QueryTotalDelegationByDelegatorResponse { - return QueryTotalDelegationByDelegatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryTotalDelegationByDelegatorResponse): QueryTotalDelegationByDelegatorResponseAminoMsg { - return { - type: "osmosis/query-total-delegation-by-delegator-response", - value: QueryTotalDelegationByDelegatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryTotalDelegationByDelegatorResponseProtoMsg): QueryTotalDelegationByDelegatorResponse { - return QueryTotalDelegationByDelegatorResponse.decode(message.value); - }, - toProto(message: QueryTotalDelegationByDelegatorResponse): Uint8Array { - return QueryTotalDelegationByDelegatorResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryTotalDelegationByDelegatorResponse): QueryTotalDelegationByDelegatorResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryTotalDelegationByDelegatorResponse", - value: QueryTotalDelegationByDelegatorResponse.encode(message).finish() - }; - } -}; -function createBaseQueryUnpoolWhitelistRequest(): QueryUnpoolWhitelistRequest { - return {}; -} -export const QueryUnpoolWhitelistRequest = { - typeUrl: "/osmosis.superfluid.QueryUnpoolWhitelistRequest", - aminoType: "osmosis/query-unpool-whitelist-request", - encode(_: QueryUnpoolWhitelistRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnpoolWhitelistRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnpoolWhitelistRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryUnpoolWhitelistRequest { - return {}; - }, - toJSON(_: QueryUnpoolWhitelistRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryUnpoolWhitelistRequest { - const message = createBaseQueryUnpoolWhitelistRequest(); - return message; - }, - fromSDK(_: QueryUnpoolWhitelistRequestSDKType): QueryUnpoolWhitelistRequest { - return {}; - }, - toSDK(_: QueryUnpoolWhitelistRequest): QueryUnpoolWhitelistRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryUnpoolWhitelistRequestAmino): QueryUnpoolWhitelistRequest { - return {}; - }, - toAmino(_: QueryUnpoolWhitelistRequest): QueryUnpoolWhitelistRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryUnpoolWhitelistRequestAminoMsg): QueryUnpoolWhitelistRequest { - return QueryUnpoolWhitelistRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnpoolWhitelistRequest): QueryUnpoolWhitelistRequestAminoMsg { - return { - type: "osmosis/query-unpool-whitelist-request", - value: QueryUnpoolWhitelistRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnpoolWhitelistRequestProtoMsg): QueryUnpoolWhitelistRequest { - return QueryUnpoolWhitelistRequest.decode(message.value); - }, - toProto(message: QueryUnpoolWhitelistRequest): Uint8Array { - return QueryUnpoolWhitelistRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryUnpoolWhitelistRequest): QueryUnpoolWhitelistRequestProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryUnpoolWhitelistRequest", - value: QueryUnpoolWhitelistRequest.encode(message).finish() - }; - } -}; -function createBaseQueryUnpoolWhitelistResponse(): QueryUnpoolWhitelistResponse { - return { - poolIds: [] - }; -} -export const QueryUnpoolWhitelistResponse = { - typeUrl: "/osmosis.superfluid.QueryUnpoolWhitelistResponse", - aminoType: "osmosis/query-unpool-whitelist-response", - encode(message: QueryUnpoolWhitelistResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.poolIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryUnpoolWhitelistResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryUnpoolWhitelistResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.poolIds.push(reader.uint64()); - } - } else { - message.poolIds.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryUnpoolWhitelistResponse { - return { - poolIds: Array.isArray(object?.poolIds) ? object.poolIds.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: QueryUnpoolWhitelistResponse): unknown { - const obj: any = {}; - if (message.poolIds) { - obj.poolIds = message.poolIds.map(e => (e || BigInt(0)).toString()); - } else { - obj.poolIds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryUnpoolWhitelistResponse { - const message = createBaseQueryUnpoolWhitelistResponse(); - message.poolIds = object.poolIds?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: QueryUnpoolWhitelistResponseSDKType): QueryUnpoolWhitelistResponse { - return { - poolIds: Array.isArray(object?.pool_ids) ? object.pool_ids.map((e: any) => e) : [] - }; - }, - toSDK(message: QueryUnpoolWhitelistResponse): QueryUnpoolWhitelistResponseSDKType { - const obj: any = {}; - if (message.poolIds) { - obj.pool_ids = message.poolIds.map(e => e); - } else { - obj.pool_ids = []; - } - return obj; - }, - fromAmino(object: QueryUnpoolWhitelistResponseAmino): QueryUnpoolWhitelistResponse { - return { - poolIds: Array.isArray(object?.pool_ids) ? object.pool_ids.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: QueryUnpoolWhitelistResponse): QueryUnpoolWhitelistResponseAmino { - const obj: any = {}; - if (message.poolIds) { - obj.pool_ids = message.poolIds.map(e => e.toString()); - } else { - obj.pool_ids = []; - } - return obj; - }, - fromAminoMsg(object: QueryUnpoolWhitelistResponseAminoMsg): QueryUnpoolWhitelistResponse { - return QueryUnpoolWhitelistResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryUnpoolWhitelistResponse): QueryUnpoolWhitelistResponseAminoMsg { - return { - type: "osmosis/query-unpool-whitelist-response", - value: QueryUnpoolWhitelistResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryUnpoolWhitelistResponseProtoMsg): QueryUnpoolWhitelistResponse { - return QueryUnpoolWhitelistResponse.decode(message.value); - }, - toProto(message: QueryUnpoolWhitelistResponse): Uint8Array { - return QueryUnpoolWhitelistResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryUnpoolWhitelistResponse): QueryUnpoolWhitelistResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.QueryUnpoolWhitelistResponse", - value: QueryUnpoolWhitelistResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/superfluid.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/superfluid.ts deleted file mode 100644 index db0f87ac..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/superfluid.ts +++ /dev/null @@ -1,930 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -import { Decimal } from "@cosmjs/math"; -/** - * SuperfluidAssetType indicates whether the superfluid asset is - * a native token itself or the lp share of a pool. - */ -export enum SuperfluidAssetType { - SuperfluidAssetTypeNative = 0, - SuperfluidAssetTypeLPShare = 1, - UNRECOGNIZED = -1, -} -export const SuperfluidAssetTypeSDKType = SuperfluidAssetType; -export const SuperfluidAssetTypeAmino = SuperfluidAssetType; -export function superfluidAssetTypeFromJSON(object: any): SuperfluidAssetType { - switch (object) { - case 0: - case "SuperfluidAssetTypeNative": - return SuperfluidAssetType.SuperfluidAssetTypeNative; - case 1: - case "SuperfluidAssetTypeLPShare": - return SuperfluidAssetType.SuperfluidAssetTypeLPShare; - case -1: - case "UNRECOGNIZED": - default: - return SuperfluidAssetType.UNRECOGNIZED; - } -} -export function superfluidAssetTypeToJSON(object: SuperfluidAssetType): string { - switch (object) { - case SuperfluidAssetType.SuperfluidAssetTypeNative: - return "SuperfluidAssetTypeNative"; - case SuperfluidAssetType.SuperfluidAssetTypeLPShare: - return "SuperfluidAssetTypeLPShare"; - case SuperfluidAssetType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** SuperfluidAsset stores the pair of superfluid asset type and denom pair */ -export interface SuperfluidAsset { - denom: string; - /** - * AssetType indicates whether the superfluid asset is a native token or an lp - * share - */ - assetType: SuperfluidAssetType; -} -export interface SuperfluidAssetProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidAsset"; - value: Uint8Array; -} -/** SuperfluidAsset stores the pair of superfluid asset type and denom pair */ -export interface SuperfluidAssetAmino { - denom: string; - /** - * AssetType indicates whether the superfluid asset is a native token or an lp - * share - */ - asset_type: SuperfluidAssetType; -} -export interface SuperfluidAssetAminoMsg { - type: "osmosis/superfluid-asset"; - value: SuperfluidAssetAmino; -} -/** SuperfluidAsset stores the pair of superfluid asset type and denom pair */ -export interface SuperfluidAssetSDKType { - denom: string; - asset_type: SuperfluidAssetType; -} -/** - * SuperfluidIntermediaryAccount takes the role of intermediary between LP token - * and OSMO tokens for superfluid staking. The intermediary account is the - * actual account responsible for delegation, not the validator account itself. - */ -export interface SuperfluidIntermediaryAccount { - /** Denom indicates the denom of the superfluid asset. */ - denom: string; - valAddr: string; - /** perpetual gauge for rewards distribution */ - gaugeId: bigint; -} -export interface SuperfluidIntermediaryAccountProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidIntermediaryAccount"; - value: Uint8Array; -} -/** - * SuperfluidIntermediaryAccount takes the role of intermediary between LP token - * and OSMO tokens for superfluid staking. The intermediary account is the - * actual account responsible for delegation, not the validator account itself. - */ -export interface SuperfluidIntermediaryAccountAmino { - /** Denom indicates the denom of the superfluid asset. */ - denom: string; - val_addr: string; - /** perpetual gauge for rewards distribution */ - gauge_id: string; -} -export interface SuperfluidIntermediaryAccountAminoMsg { - type: "osmosis/superfluid-intermediary-account"; - value: SuperfluidIntermediaryAccountAmino; -} -/** - * SuperfluidIntermediaryAccount takes the role of intermediary between LP token - * and OSMO tokens for superfluid staking. The intermediary account is the - * actual account responsible for delegation, not the validator account itself. - */ -export interface SuperfluidIntermediaryAccountSDKType { - denom: string; - val_addr: string; - gauge_id: bigint; -} -/** - * The Osmo-Equivalent-Multiplier Record for epoch N refers to the osmo worth we - * treat an LP share as having, for all of epoch N. Eventually this is intended - * to be set as the Time-weighted-average-osmo-backing for the entire duration - * of epoch N-1. (Thereby locking whats in use for epoch N as based on the prior - * epochs rewards) However for now, this is not the TWAP but instead the spot - * price at the boundary. For different types of assets in the future, it could - * change. - */ -export interface OsmoEquivalentMultiplierRecord { - epochNumber: bigint; - /** superfluid asset denom, can be LP token or native token */ - denom: string; - multiplier: string; -} -export interface OsmoEquivalentMultiplierRecordProtoMsg { - typeUrl: "/osmosis.superfluid.OsmoEquivalentMultiplierRecord"; - value: Uint8Array; -} -/** - * The Osmo-Equivalent-Multiplier Record for epoch N refers to the osmo worth we - * treat an LP share as having, for all of epoch N. Eventually this is intended - * to be set as the Time-weighted-average-osmo-backing for the entire duration - * of epoch N-1. (Thereby locking whats in use for epoch N as based on the prior - * epochs rewards) However for now, this is not the TWAP but instead the spot - * price at the boundary. For different types of assets in the future, it could - * change. - */ -export interface OsmoEquivalentMultiplierRecordAmino { - epoch_number: string; - /** superfluid asset denom, can be LP token or native token */ - denom: string; - multiplier: string; -} -export interface OsmoEquivalentMultiplierRecordAminoMsg { - type: "osmosis/osmo-equivalent-multiplier-record"; - value: OsmoEquivalentMultiplierRecordAmino; -} -/** - * The Osmo-Equivalent-Multiplier Record for epoch N refers to the osmo worth we - * treat an LP share as having, for all of epoch N. Eventually this is intended - * to be set as the Time-weighted-average-osmo-backing for the entire duration - * of epoch N-1. (Thereby locking whats in use for epoch N as based on the prior - * epochs rewards) However for now, this is not the TWAP but instead the spot - * price at the boundary. For different types of assets in the future, it could - * change. - */ -export interface OsmoEquivalentMultiplierRecordSDKType { - epoch_number: bigint; - denom: string; - multiplier: string; -} -/** - * SuperfluidDelegationRecord is a struct used to indicate superfluid - * delegations of an account in the state machine in a user friendly form. - */ -export interface SuperfluidDelegationRecord { - delegatorAddress: string; - validatorAddress: string; - delegationAmount: Coin | undefined; - equivalentStakedAmount: Coin | undefined; -} -export interface SuperfluidDelegationRecordProtoMsg { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationRecord"; - value: Uint8Array; -} -/** - * SuperfluidDelegationRecord is a struct used to indicate superfluid - * delegations of an account in the state machine in a user friendly form. - */ -export interface SuperfluidDelegationRecordAmino { - delegator_address: string; - validator_address: string; - delegation_amount?: CoinAmino | undefined; - equivalent_staked_amount?: CoinAmino | undefined; -} -export interface SuperfluidDelegationRecordAminoMsg { - type: "osmosis/superfluid-delegation-record"; - value: SuperfluidDelegationRecordAmino; -} -/** - * SuperfluidDelegationRecord is a struct used to indicate superfluid - * delegations of an account in the state machine in a user friendly form. - */ -export interface SuperfluidDelegationRecordSDKType { - delegator_address: string; - validator_address: string; - delegation_amount: CoinSDKType | undefined; - equivalent_staked_amount: CoinSDKType | undefined; -} -/** - * LockIdIntermediaryAccountConnection is a struct used to indicate the - * relationship between the underlying lock id and superfluid delegation done - * via lp shares. - */ -export interface LockIdIntermediaryAccountConnection { - lockId: bigint; - intermediaryAccount: string; -} -export interface LockIdIntermediaryAccountConnectionProtoMsg { - typeUrl: "/osmosis.superfluid.LockIdIntermediaryAccountConnection"; - value: Uint8Array; -} -/** - * LockIdIntermediaryAccountConnection is a struct used to indicate the - * relationship between the underlying lock id and superfluid delegation done - * via lp shares. - */ -export interface LockIdIntermediaryAccountConnectionAmino { - lock_id: string; - intermediary_account: string; -} -export interface LockIdIntermediaryAccountConnectionAminoMsg { - type: "osmosis/lock-id-intermediary-account-connection"; - value: LockIdIntermediaryAccountConnectionAmino; -} -/** - * LockIdIntermediaryAccountConnection is a struct used to indicate the - * relationship between the underlying lock id and superfluid delegation done - * via lp shares. - */ -export interface LockIdIntermediaryAccountConnectionSDKType { - lock_id: bigint; - intermediary_account: string; -} -export interface UnpoolWhitelistedPools { - ids: bigint[]; -} -export interface UnpoolWhitelistedPoolsProtoMsg { - typeUrl: "/osmosis.superfluid.UnpoolWhitelistedPools"; - value: Uint8Array; -} -export interface UnpoolWhitelistedPoolsAmino { - ids: string[]; -} -export interface UnpoolWhitelistedPoolsAminoMsg { - type: "osmosis/unpool-whitelisted-pools"; - value: UnpoolWhitelistedPoolsAmino; -} -export interface UnpoolWhitelistedPoolsSDKType { - ids: bigint[]; -} -function createBaseSuperfluidAsset(): SuperfluidAsset { - return { - denom: "", - assetType: 0 - }; -} -export const SuperfluidAsset = { - typeUrl: "/osmosis.superfluid.SuperfluidAsset", - aminoType: "osmosis/superfluid-asset", - encode(message: SuperfluidAsset, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.assetType !== 0) { - writer.uint32(16).int32(message.assetType); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidAsset { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidAsset(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.assetType = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidAsset { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - assetType: isSet(object.assetType) ? superfluidAssetTypeFromJSON(object.assetType) : -1 - }; - }, - toJSON(message: SuperfluidAsset): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.assetType !== undefined && (obj.assetType = superfluidAssetTypeToJSON(message.assetType)); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidAsset { - const message = createBaseSuperfluidAsset(); - message.denom = object.denom ?? ""; - message.assetType = object.assetType ?? 0; - return message; - }, - fromSDK(object: SuperfluidAssetSDKType): SuperfluidAsset { - return { - denom: object?.denom, - assetType: isSet(object.asset_type) ? superfluidAssetTypeFromJSON(object.asset_type) : -1 - }; - }, - toSDK(message: SuperfluidAsset): SuperfluidAssetSDKType { - const obj: any = {}; - obj.denom = message.denom; - message.assetType !== undefined && (obj.asset_type = superfluidAssetTypeToJSON(message.assetType)); - return obj; - }, - fromAmino(object: SuperfluidAssetAmino): SuperfluidAsset { - return { - denom: object.denom, - assetType: isSet(object.asset_type) ? superfluidAssetTypeFromJSON(object.asset_type) : -1 - }; - }, - toAmino(message: SuperfluidAsset): SuperfluidAssetAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.asset_type = message.assetType; - return obj; - }, - fromAminoMsg(object: SuperfluidAssetAminoMsg): SuperfluidAsset { - return SuperfluidAsset.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidAsset): SuperfluidAssetAminoMsg { - return { - type: "osmosis/superfluid-asset", - value: SuperfluidAsset.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidAssetProtoMsg): SuperfluidAsset { - return SuperfluidAsset.decode(message.value); - }, - toProto(message: SuperfluidAsset): Uint8Array { - return SuperfluidAsset.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidAsset): SuperfluidAssetProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidAsset", - value: SuperfluidAsset.encode(message).finish() - }; - } -}; -function createBaseSuperfluidIntermediaryAccount(): SuperfluidIntermediaryAccount { - return { - denom: "", - valAddr: "", - gaugeId: BigInt(0) - }; -} -export const SuperfluidIntermediaryAccount = { - typeUrl: "/osmosis.superfluid.SuperfluidIntermediaryAccount", - aminoType: "osmosis/superfluid-intermediary-account", - encode(message: SuperfluidIntermediaryAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.valAddr !== "") { - writer.uint32(18).string(message.valAddr); - } - if (message.gaugeId !== BigInt(0)) { - writer.uint32(24).uint64(message.gaugeId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidIntermediaryAccount { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidIntermediaryAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.valAddr = reader.string(); - break; - case 3: - message.gaugeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidIntermediaryAccount { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - valAddr: isSet(object.valAddr) ? String(object.valAddr) : "", - gaugeId: isSet(object.gaugeId) ? BigInt(object.gaugeId.toString()) : BigInt(0) - }; - }, - toJSON(message: SuperfluidIntermediaryAccount): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.valAddr !== undefined && (obj.valAddr = message.valAddr); - message.gaugeId !== undefined && (obj.gaugeId = (message.gaugeId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidIntermediaryAccount { - const message = createBaseSuperfluidIntermediaryAccount(); - message.denom = object.denom ?? ""; - message.valAddr = object.valAddr ?? ""; - message.gaugeId = object.gaugeId !== undefined && object.gaugeId !== null ? BigInt(object.gaugeId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SuperfluidIntermediaryAccountSDKType): SuperfluidIntermediaryAccount { - return { - denom: object?.denom, - valAddr: object?.val_addr, - gaugeId: object?.gauge_id - }; - }, - toSDK(message: SuperfluidIntermediaryAccount): SuperfluidIntermediaryAccountSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.val_addr = message.valAddr; - obj.gauge_id = message.gaugeId; - return obj; - }, - fromAmino(object: SuperfluidIntermediaryAccountAmino): SuperfluidIntermediaryAccount { - return { - denom: object.denom, - valAddr: object.val_addr, - gaugeId: BigInt(object.gauge_id) - }; - }, - toAmino(message: SuperfluidIntermediaryAccount): SuperfluidIntermediaryAccountAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.val_addr = message.valAddr; - obj.gauge_id = message.gaugeId ? message.gaugeId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SuperfluidIntermediaryAccountAminoMsg): SuperfluidIntermediaryAccount { - return SuperfluidIntermediaryAccount.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidIntermediaryAccount): SuperfluidIntermediaryAccountAminoMsg { - return { - type: "osmosis/superfluid-intermediary-account", - value: SuperfluidIntermediaryAccount.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidIntermediaryAccountProtoMsg): SuperfluidIntermediaryAccount { - return SuperfluidIntermediaryAccount.decode(message.value); - }, - toProto(message: SuperfluidIntermediaryAccount): Uint8Array { - return SuperfluidIntermediaryAccount.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidIntermediaryAccount): SuperfluidIntermediaryAccountProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidIntermediaryAccount", - value: SuperfluidIntermediaryAccount.encode(message).finish() - }; - } -}; -function createBaseOsmoEquivalentMultiplierRecord(): OsmoEquivalentMultiplierRecord { - return { - epochNumber: BigInt(0), - denom: "", - multiplier: "" - }; -} -export const OsmoEquivalentMultiplierRecord = { - typeUrl: "/osmosis.superfluid.OsmoEquivalentMultiplierRecord", - aminoType: "osmosis/osmo-equivalent-multiplier-record", - encode(message: OsmoEquivalentMultiplierRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.epochNumber !== BigInt(0)) { - writer.uint32(8).int64(message.epochNumber); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - if (message.multiplier !== "") { - writer.uint32(26).string(Decimal.fromUserInput(message.multiplier, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): OsmoEquivalentMultiplierRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOsmoEquivalentMultiplierRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.epochNumber = reader.int64(); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.multiplier = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): OsmoEquivalentMultiplierRecord { - return { - epochNumber: isSet(object.epochNumber) ? BigInt(object.epochNumber.toString()) : BigInt(0), - denom: isSet(object.denom) ? String(object.denom) : "", - multiplier: isSet(object.multiplier) ? String(object.multiplier) : "" - }; - }, - toJSON(message: OsmoEquivalentMultiplierRecord): unknown { - const obj: any = {}; - message.epochNumber !== undefined && (obj.epochNumber = (message.epochNumber || BigInt(0)).toString()); - message.denom !== undefined && (obj.denom = message.denom); - message.multiplier !== undefined && (obj.multiplier = message.multiplier); - return obj; - }, - fromPartial(object: DeepPartial): OsmoEquivalentMultiplierRecord { - const message = createBaseOsmoEquivalentMultiplierRecord(); - message.epochNumber = object.epochNumber !== undefined && object.epochNumber !== null ? BigInt(object.epochNumber.toString()) : BigInt(0); - message.denom = object.denom ?? ""; - message.multiplier = object.multiplier ?? ""; - return message; - }, - fromSDK(object: OsmoEquivalentMultiplierRecordSDKType): OsmoEquivalentMultiplierRecord { - return { - epochNumber: object?.epoch_number, - denom: object?.denom, - multiplier: object?.multiplier - }; - }, - toSDK(message: OsmoEquivalentMultiplierRecord): OsmoEquivalentMultiplierRecordSDKType { - const obj: any = {}; - obj.epoch_number = message.epochNumber; - obj.denom = message.denom; - obj.multiplier = message.multiplier; - return obj; - }, - fromAmino(object: OsmoEquivalentMultiplierRecordAmino): OsmoEquivalentMultiplierRecord { - return { - epochNumber: BigInt(object.epoch_number), - denom: object.denom, - multiplier: object.multiplier - }; - }, - toAmino(message: OsmoEquivalentMultiplierRecord): OsmoEquivalentMultiplierRecordAmino { - const obj: any = {}; - obj.epoch_number = message.epochNumber ? message.epochNumber.toString() : undefined; - obj.denom = message.denom; - obj.multiplier = message.multiplier; - return obj; - }, - fromAminoMsg(object: OsmoEquivalentMultiplierRecordAminoMsg): OsmoEquivalentMultiplierRecord { - return OsmoEquivalentMultiplierRecord.fromAmino(object.value); - }, - toAminoMsg(message: OsmoEquivalentMultiplierRecord): OsmoEquivalentMultiplierRecordAminoMsg { - return { - type: "osmosis/osmo-equivalent-multiplier-record", - value: OsmoEquivalentMultiplierRecord.toAmino(message) - }; - }, - fromProtoMsg(message: OsmoEquivalentMultiplierRecordProtoMsg): OsmoEquivalentMultiplierRecord { - return OsmoEquivalentMultiplierRecord.decode(message.value); - }, - toProto(message: OsmoEquivalentMultiplierRecord): Uint8Array { - return OsmoEquivalentMultiplierRecord.encode(message).finish(); - }, - toProtoMsg(message: OsmoEquivalentMultiplierRecord): OsmoEquivalentMultiplierRecordProtoMsg { - return { - typeUrl: "/osmosis.superfluid.OsmoEquivalentMultiplierRecord", - value: OsmoEquivalentMultiplierRecord.encode(message).finish() - }; - } -}; -function createBaseSuperfluidDelegationRecord(): SuperfluidDelegationRecord { - return { - delegatorAddress: "", - validatorAddress: "", - delegationAmount: Coin.fromPartial({}), - equivalentStakedAmount: Coin.fromPartial({}) - }; -} -export const SuperfluidDelegationRecord = { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationRecord", - aminoType: "osmosis/superfluid-delegation-record", - encode(message: SuperfluidDelegationRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.delegatorAddress !== "") { - writer.uint32(10).string(message.delegatorAddress); - } - if (message.validatorAddress !== "") { - writer.uint32(18).string(message.validatorAddress); - } - if (message.delegationAmount !== undefined) { - Coin.encode(message.delegationAmount, writer.uint32(26).fork()).ldelim(); - } - if (message.equivalentStakedAmount !== undefined) { - Coin.encode(message.equivalentStakedAmount, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SuperfluidDelegationRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSuperfluidDelegationRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.delegatorAddress = reader.string(); - break; - case 2: - message.validatorAddress = reader.string(); - break; - case 3: - message.delegationAmount = Coin.decode(reader, reader.uint32()); - break; - case 4: - message.equivalentStakedAmount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SuperfluidDelegationRecord { - return { - delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", - validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - delegationAmount: isSet(object.delegationAmount) ? Coin.fromJSON(object.delegationAmount) : undefined, - equivalentStakedAmount: isSet(object.equivalentStakedAmount) ? Coin.fromJSON(object.equivalentStakedAmount) : undefined - }; - }, - toJSON(message: SuperfluidDelegationRecord): unknown { - const obj: any = {}; - message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress); - message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress); - message.delegationAmount !== undefined && (obj.delegationAmount = message.delegationAmount ? Coin.toJSON(message.delegationAmount) : undefined); - message.equivalentStakedAmount !== undefined && (obj.equivalentStakedAmount = message.equivalentStakedAmount ? Coin.toJSON(message.equivalentStakedAmount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SuperfluidDelegationRecord { - const message = createBaseSuperfluidDelegationRecord(); - message.delegatorAddress = object.delegatorAddress ?? ""; - message.validatorAddress = object.validatorAddress ?? ""; - message.delegationAmount = object.delegationAmount !== undefined && object.delegationAmount !== null ? Coin.fromPartial(object.delegationAmount) : undefined; - message.equivalentStakedAmount = object.equivalentStakedAmount !== undefined && object.equivalentStakedAmount !== null ? Coin.fromPartial(object.equivalentStakedAmount) : undefined; - return message; - }, - fromSDK(object: SuperfluidDelegationRecordSDKType): SuperfluidDelegationRecord { - return { - delegatorAddress: object?.delegator_address, - validatorAddress: object?.validator_address, - delegationAmount: object.delegation_amount ? Coin.fromSDK(object.delegation_amount) : undefined, - equivalentStakedAmount: object.equivalent_staked_amount ? Coin.fromSDK(object.equivalent_staked_amount) : undefined - }; - }, - toSDK(message: SuperfluidDelegationRecord): SuperfluidDelegationRecordSDKType { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - message.delegationAmount !== undefined && (obj.delegation_amount = message.delegationAmount ? Coin.toSDK(message.delegationAmount) : undefined); - message.equivalentStakedAmount !== undefined && (obj.equivalent_staked_amount = message.equivalentStakedAmount ? Coin.toSDK(message.equivalentStakedAmount) : undefined); - return obj; - }, - fromAmino(object: SuperfluidDelegationRecordAmino): SuperfluidDelegationRecord { - return { - delegatorAddress: object.delegator_address, - validatorAddress: object.validator_address, - delegationAmount: object?.delegation_amount ? Coin.fromAmino(object.delegation_amount) : undefined, - equivalentStakedAmount: object?.equivalent_staked_amount ? Coin.fromAmino(object.equivalent_staked_amount) : undefined - }; - }, - toAmino(message: SuperfluidDelegationRecord): SuperfluidDelegationRecordAmino { - const obj: any = {}; - obj.delegator_address = message.delegatorAddress; - obj.validator_address = message.validatorAddress; - obj.delegation_amount = message.delegationAmount ? Coin.toAmino(message.delegationAmount) : undefined; - obj.equivalent_staked_amount = message.equivalentStakedAmount ? Coin.toAmino(message.equivalentStakedAmount) : undefined; - return obj; - }, - fromAminoMsg(object: SuperfluidDelegationRecordAminoMsg): SuperfluidDelegationRecord { - return SuperfluidDelegationRecord.fromAmino(object.value); - }, - toAminoMsg(message: SuperfluidDelegationRecord): SuperfluidDelegationRecordAminoMsg { - return { - type: "osmosis/superfluid-delegation-record", - value: SuperfluidDelegationRecord.toAmino(message) - }; - }, - fromProtoMsg(message: SuperfluidDelegationRecordProtoMsg): SuperfluidDelegationRecord { - return SuperfluidDelegationRecord.decode(message.value); - }, - toProto(message: SuperfluidDelegationRecord): Uint8Array { - return SuperfluidDelegationRecord.encode(message).finish(); - }, - toProtoMsg(message: SuperfluidDelegationRecord): SuperfluidDelegationRecordProtoMsg { - return { - typeUrl: "/osmosis.superfluid.SuperfluidDelegationRecord", - value: SuperfluidDelegationRecord.encode(message).finish() - }; - } -}; -function createBaseLockIdIntermediaryAccountConnection(): LockIdIntermediaryAccountConnection { - return { - lockId: BigInt(0), - intermediaryAccount: "" - }; -} -export const LockIdIntermediaryAccountConnection = { - typeUrl: "/osmosis.superfluid.LockIdIntermediaryAccountConnection", - aminoType: "osmosis/lock-id-intermediary-account-connection", - encode(message: LockIdIntermediaryAccountConnection, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.lockId !== BigInt(0)) { - writer.uint32(8).uint64(message.lockId); - } - if (message.intermediaryAccount !== "") { - writer.uint32(18).string(message.intermediaryAccount); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LockIdIntermediaryAccountConnection { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockIdIntermediaryAccountConnection(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lockId = reader.uint64(); - break; - case 2: - message.intermediaryAccount = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LockIdIntermediaryAccountConnection { - return { - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0), - intermediaryAccount: isSet(object.intermediaryAccount) ? String(object.intermediaryAccount) : "" - }; - }, - toJSON(message: LockIdIntermediaryAccountConnection): unknown { - const obj: any = {}; - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - message.intermediaryAccount !== undefined && (obj.intermediaryAccount = message.intermediaryAccount); - return obj; - }, - fromPartial(object: DeepPartial): LockIdIntermediaryAccountConnection { - const message = createBaseLockIdIntermediaryAccountConnection(); - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - message.intermediaryAccount = object.intermediaryAccount ?? ""; - return message; - }, - fromSDK(object: LockIdIntermediaryAccountConnectionSDKType): LockIdIntermediaryAccountConnection { - return { - lockId: object?.lock_id, - intermediaryAccount: object?.intermediary_account - }; - }, - toSDK(message: LockIdIntermediaryAccountConnection): LockIdIntermediaryAccountConnectionSDKType { - const obj: any = {}; - obj.lock_id = message.lockId; - obj.intermediary_account = message.intermediaryAccount; - return obj; - }, - fromAmino(object: LockIdIntermediaryAccountConnectionAmino): LockIdIntermediaryAccountConnection { - return { - lockId: BigInt(object.lock_id), - intermediaryAccount: object.intermediary_account - }; - }, - toAmino(message: LockIdIntermediaryAccountConnection): LockIdIntermediaryAccountConnectionAmino { - const obj: any = {}; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - obj.intermediary_account = message.intermediaryAccount; - return obj; - }, - fromAminoMsg(object: LockIdIntermediaryAccountConnectionAminoMsg): LockIdIntermediaryAccountConnection { - return LockIdIntermediaryAccountConnection.fromAmino(object.value); - }, - toAminoMsg(message: LockIdIntermediaryAccountConnection): LockIdIntermediaryAccountConnectionAminoMsg { - return { - type: "osmosis/lock-id-intermediary-account-connection", - value: LockIdIntermediaryAccountConnection.toAmino(message) - }; - }, - fromProtoMsg(message: LockIdIntermediaryAccountConnectionProtoMsg): LockIdIntermediaryAccountConnection { - return LockIdIntermediaryAccountConnection.decode(message.value); - }, - toProto(message: LockIdIntermediaryAccountConnection): Uint8Array { - return LockIdIntermediaryAccountConnection.encode(message).finish(); - }, - toProtoMsg(message: LockIdIntermediaryAccountConnection): LockIdIntermediaryAccountConnectionProtoMsg { - return { - typeUrl: "/osmosis.superfluid.LockIdIntermediaryAccountConnection", - value: LockIdIntermediaryAccountConnection.encode(message).finish() - }; - } -}; -function createBaseUnpoolWhitelistedPools(): UnpoolWhitelistedPools { - return { - ids: [] - }; -} -export const UnpoolWhitelistedPools = { - typeUrl: "/osmosis.superfluid.UnpoolWhitelistedPools", - aminoType: "osmosis/unpool-whitelisted-pools", - encode(message: UnpoolWhitelistedPools, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.ids) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UnpoolWhitelistedPools { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUnpoolWhitelistedPools(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.ids.push(reader.uint64()); - } - } else { - message.ids.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UnpoolWhitelistedPools { - return { - ids: Array.isArray(object?.ids) ? object.ids.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: UnpoolWhitelistedPools): unknown { - const obj: any = {}; - if (message.ids) { - obj.ids = message.ids.map(e => (e || BigInt(0)).toString()); - } else { - obj.ids = []; - } - return obj; - }, - fromPartial(object: DeepPartial): UnpoolWhitelistedPools { - const message = createBaseUnpoolWhitelistedPools(); - message.ids = object.ids?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: UnpoolWhitelistedPoolsSDKType): UnpoolWhitelistedPools { - return { - ids: Array.isArray(object?.ids) ? object.ids.map((e: any) => e) : [] - }; - }, - toSDK(message: UnpoolWhitelistedPools): UnpoolWhitelistedPoolsSDKType { - const obj: any = {}; - if (message.ids) { - obj.ids = message.ids.map(e => e); - } else { - obj.ids = []; - } - return obj; - }, - fromAmino(object: UnpoolWhitelistedPoolsAmino): UnpoolWhitelistedPools { - return { - ids: Array.isArray(object?.ids) ? object.ids.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: UnpoolWhitelistedPools): UnpoolWhitelistedPoolsAmino { - const obj: any = {}; - if (message.ids) { - obj.ids = message.ids.map(e => e.toString()); - } else { - obj.ids = []; - } - return obj; - }, - fromAminoMsg(object: UnpoolWhitelistedPoolsAminoMsg): UnpoolWhitelistedPools { - return UnpoolWhitelistedPools.fromAmino(object.value); - }, - toAminoMsg(message: UnpoolWhitelistedPools): UnpoolWhitelistedPoolsAminoMsg { - return { - type: "osmosis/unpool-whitelisted-pools", - value: UnpoolWhitelistedPools.toAmino(message) - }; - }, - fromProtoMsg(message: UnpoolWhitelistedPoolsProtoMsg): UnpoolWhitelistedPools { - return UnpoolWhitelistedPools.decode(message.value); - }, - toProto(message: UnpoolWhitelistedPools): Uint8Array { - return UnpoolWhitelistedPools.encode(message).finish(); - }, - toProtoMsg(message: UnpoolWhitelistedPools): UnpoolWhitelistedPoolsProtoMsg { - return { - typeUrl: "/osmosis.superfluid.UnpoolWhitelistedPools", - value: UnpoolWhitelistedPools.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/tx.amino.ts deleted file mode 100644 index fc075cfe..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.amino.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { MsgSuperfluidDelegate, MsgSuperfluidUndelegate, MsgSuperfluidUnbondLock, MsgLockAndSuperfluidDelegate, MsgUnPoolWhitelistedPool } from "./tx"; -export const AminoConverter = { - "/osmosis.superfluid.MsgSuperfluidDelegate": { - aminoType: "osmosis/superfluid-delegate", - toAmino: MsgSuperfluidDelegate.toAmino, - fromAmino: MsgSuperfluidDelegate.fromAmino - }, - "/osmosis.superfluid.MsgSuperfluidUndelegate": { - aminoType: "osmosis/superfluid-undelegate", - toAmino: MsgSuperfluidUndelegate.toAmino, - fromAmino: MsgSuperfluidUndelegate.fromAmino - }, - "/osmosis.superfluid.MsgSuperfluidUnbondLock": { - aminoType: "osmosis/superfluid-unbond-lock", - toAmino: MsgSuperfluidUnbondLock.toAmino, - fromAmino: MsgSuperfluidUnbondLock.fromAmino - }, - "/osmosis.superfluid.MsgLockAndSuperfluidDelegate": { - aminoType: "osmosis/lock-and-superfluid-delegate", - toAmino: MsgLockAndSuperfluidDelegate.toAmino, - fromAmino: MsgLockAndSuperfluidDelegate.fromAmino - }, - "/osmosis.superfluid.MsgUnPoolWhitelistedPool": { - aminoType: "osmosis/unpool-whitelisted-pool", - toAmino: MsgUnPoolWhitelistedPool.toAmino, - fromAmino: MsgUnPoolWhitelistedPool.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/tx.registry.ts deleted file mode 100644 index 9d38481f..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.registry.ts +++ /dev/null @@ -1,171 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgSuperfluidDelegate, MsgSuperfluidUndelegate, MsgSuperfluidUnbondLock, MsgLockAndSuperfluidDelegate, MsgUnPoolWhitelistedPool } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.superfluid.MsgSuperfluidDelegate", MsgSuperfluidDelegate], ["/osmosis.superfluid.MsgSuperfluidUndelegate", MsgSuperfluidUndelegate], ["/osmosis.superfluid.MsgSuperfluidUnbondLock", MsgSuperfluidUnbondLock], ["/osmosis.superfluid.MsgLockAndSuperfluidDelegate", MsgLockAndSuperfluidDelegate], ["/osmosis.superfluid.MsgUnPoolWhitelistedPool", MsgUnPoolWhitelistedPool]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - superfluidDelegate(value: MsgSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - value: MsgSuperfluidDelegate.encode(value).finish() - }; - }, - superfluidUndelegate(value: MsgSuperfluidUndelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - value: MsgSuperfluidUndelegate.encode(value).finish() - }; - }, - superfluidUnbondLock(value: MsgSuperfluidUnbondLock) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - value: MsgSuperfluidUnbondLock.encode(value).finish() - }; - }, - lockAndSuperfluidDelegate(value: MsgLockAndSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - value: MsgLockAndSuperfluidDelegate.encode(value).finish() - }; - }, - unPoolWhitelistedPool(value: MsgUnPoolWhitelistedPool) { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - value: MsgUnPoolWhitelistedPool.encode(value).finish() - }; - } - }, - withTypeUrl: { - superfluidDelegate(value: MsgSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - value - }; - }, - superfluidUndelegate(value: MsgSuperfluidUndelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - value - }; - }, - superfluidUnbondLock(value: MsgSuperfluidUnbondLock) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - value - }; - }, - lockAndSuperfluidDelegate(value: MsgLockAndSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - value - }; - }, - unPoolWhitelistedPool(value: MsgUnPoolWhitelistedPool) { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - value - }; - } - }, - toJSON: { - superfluidDelegate(value: MsgSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - value: MsgSuperfluidDelegate.toJSON(value) - }; - }, - superfluidUndelegate(value: MsgSuperfluidUndelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - value: MsgSuperfluidUndelegate.toJSON(value) - }; - }, - superfluidUnbondLock(value: MsgSuperfluidUnbondLock) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - value: MsgSuperfluidUnbondLock.toJSON(value) - }; - }, - lockAndSuperfluidDelegate(value: MsgLockAndSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - value: MsgLockAndSuperfluidDelegate.toJSON(value) - }; - }, - unPoolWhitelistedPool(value: MsgUnPoolWhitelistedPool) { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - value: MsgUnPoolWhitelistedPool.toJSON(value) - }; - } - }, - fromJSON: { - superfluidDelegate(value: any) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - value: MsgSuperfluidDelegate.fromJSON(value) - }; - }, - superfluidUndelegate(value: any) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - value: MsgSuperfluidUndelegate.fromJSON(value) - }; - }, - superfluidUnbondLock(value: any) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - value: MsgSuperfluidUnbondLock.fromJSON(value) - }; - }, - lockAndSuperfluidDelegate(value: any) { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - value: MsgLockAndSuperfluidDelegate.fromJSON(value) - }; - }, - unPoolWhitelistedPool(value: any) { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - value: MsgUnPoolWhitelistedPool.fromJSON(value) - }; - } - }, - fromPartial: { - superfluidDelegate(value: MsgSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - value: MsgSuperfluidDelegate.fromPartial(value) - }; - }, - superfluidUndelegate(value: MsgSuperfluidUndelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - value: MsgSuperfluidUndelegate.fromPartial(value) - }; - }, - superfluidUnbondLock(value: MsgSuperfluidUnbondLock) { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - value: MsgSuperfluidUnbondLock.fromPartial(value) - }; - }, - lockAndSuperfluidDelegate(value: MsgLockAndSuperfluidDelegate) { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - value: MsgLockAndSuperfluidDelegate.fromPartial(value) - }; - }, - unPoolWhitelistedPool(value: MsgUnPoolWhitelistedPool) { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - value: MsgUnPoolWhitelistedPool.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/tx.rpc.msg.ts deleted file mode 100644 index 49656317..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.rpc.msg.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Rpc } from "../../helpers"; -import { BinaryReader } from "../../binary"; -import { MsgSuperfluidDelegate, MsgSuperfluidDelegateResponse, MsgSuperfluidUndelegate, MsgSuperfluidUndelegateResponse, MsgSuperfluidUnbondLock, MsgSuperfluidUnbondLockResponse, MsgLockAndSuperfluidDelegate, MsgLockAndSuperfluidDelegateResponse, MsgUnPoolWhitelistedPool, MsgUnPoolWhitelistedPoolResponse } from "./tx"; -/** Msg defines the Msg service. */ -export interface Msg { - /** Execute superfluid delegation for a lockup */ - superfluidDelegate(request: MsgSuperfluidDelegate): Promise; - /** Execute superfluid undelegation for a lockup */ - superfluidUndelegate(request: MsgSuperfluidUndelegate): Promise; - /** - * For a given lock that is being superfluidly undelegated, - * also unbond the underlying lock. - */ - superfluidUnbondLock(request: MsgSuperfluidUnbondLock): Promise; - /** Execute lockup lock and superfluid delegation in a single msg */ - lockAndSuperfluidDelegate(request: MsgLockAndSuperfluidDelegate): Promise; - unPoolWhitelistedPool(request: MsgUnPoolWhitelistedPool): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.superfluidDelegate = this.superfluidDelegate.bind(this); - this.superfluidUndelegate = this.superfluidUndelegate.bind(this); - this.superfluidUnbondLock = this.superfluidUnbondLock.bind(this); - this.lockAndSuperfluidDelegate = this.lockAndSuperfluidDelegate.bind(this); - this.unPoolWhitelistedPool = this.unPoolWhitelistedPool.bind(this); - } - superfluidDelegate(request: MsgSuperfluidDelegate): Promise { - const data = MsgSuperfluidDelegate.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Msg", "SuperfluidDelegate", data); - return promise.then(data => MsgSuperfluidDelegateResponse.decode(new BinaryReader(data))); - } - superfluidUndelegate(request: MsgSuperfluidUndelegate): Promise { - const data = MsgSuperfluidUndelegate.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Msg", "SuperfluidUndelegate", data); - return promise.then(data => MsgSuperfluidUndelegateResponse.decode(new BinaryReader(data))); - } - superfluidUnbondLock(request: MsgSuperfluidUnbondLock): Promise { - const data = MsgSuperfluidUnbondLock.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Msg", "SuperfluidUnbondLock", data); - return promise.then(data => MsgSuperfluidUnbondLockResponse.decode(new BinaryReader(data))); - } - lockAndSuperfluidDelegate(request: MsgLockAndSuperfluidDelegate): Promise { - const data = MsgLockAndSuperfluidDelegate.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Msg", "LockAndSuperfluidDelegate", data); - return promise.then(data => MsgLockAndSuperfluidDelegateResponse.decode(new BinaryReader(data))); - } - unPoolWhitelistedPool(request: MsgUnPoolWhitelistedPool): Promise { - const data = MsgUnPoolWhitelistedPool.encode(request).finish(); - const promise = this.rpc.request("osmosis.superfluid.Msg", "UnPoolWhitelistedPool", data); - return promise.then(data => MsgUnPoolWhitelistedPoolResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/tx.ts deleted file mode 100644 index 65b3021b..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/tx.ts +++ /dev/null @@ -1,1178 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -export interface MsgSuperfluidDelegate { - sender: string; - lockId: bigint; - valAddr: string; -} -export interface MsgSuperfluidDelegateProtoMsg { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate"; - value: Uint8Array; -} -export interface MsgSuperfluidDelegateAmino { - sender: string; - lock_id: string; - val_addr: string; -} -export interface MsgSuperfluidDelegateAminoMsg { - type: "osmosis/superfluid-delegate"; - value: MsgSuperfluidDelegateAmino; -} -export interface MsgSuperfluidDelegateSDKType { - sender: string; - lock_id: bigint; - val_addr: string; -} -export interface MsgSuperfluidDelegateResponse {} -export interface MsgSuperfluidDelegateResponseProtoMsg { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegateResponse"; - value: Uint8Array; -} -export interface MsgSuperfluidDelegateResponseAmino {} -export interface MsgSuperfluidDelegateResponseAminoMsg { - type: "osmosis/superfluid-delegate-response"; - value: MsgSuperfluidDelegateResponseAmino; -} -export interface MsgSuperfluidDelegateResponseSDKType {} -export interface MsgSuperfluidUndelegate { - sender: string; - lockId: bigint; -} -export interface MsgSuperfluidUndelegateProtoMsg { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate"; - value: Uint8Array; -} -export interface MsgSuperfluidUndelegateAmino { - sender: string; - lock_id: string; -} -export interface MsgSuperfluidUndelegateAminoMsg { - type: "osmosis/superfluid-undelegate"; - value: MsgSuperfluidUndelegateAmino; -} -export interface MsgSuperfluidUndelegateSDKType { - sender: string; - lock_id: bigint; -} -export interface MsgSuperfluidUndelegateResponse {} -export interface MsgSuperfluidUndelegateResponseProtoMsg { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegateResponse"; - value: Uint8Array; -} -export interface MsgSuperfluidUndelegateResponseAmino {} -export interface MsgSuperfluidUndelegateResponseAminoMsg { - type: "osmosis/superfluid-undelegate-response"; - value: MsgSuperfluidUndelegateResponseAmino; -} -export interface MsgSuperfluidUndelegateResponseSDKType {} -export interface MsgSuperfluidUnbondLock { - sender: string; - lockId: bigint; -} -export interface MsgSuperfluidUnbondLockProtoMsg { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock"; - value: Uint8Array; -} -export interface MsgSuperfluidUnbondLockAmino { - sender: string; - lock_id: string; -} -export interface MsgSuperfluidUnbondLockAminoMsg { - type: "osmosis/superfluid-unbond-lock"; - value: MsgSuperfluidUnbondLockAmino; -} -export interface MsgSuperfluidUnbondLockSDKType { - sender: string; - lock_id: bigint; -} -export interface MsgSuperfluidUnbondLockResponse {} -export interface MsgSuperfluidUnbondLockResponseProtoMsg { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLockResponse"; - value: Uint8Array; -} -export interface MsgSuperfluidUnbondLockResponseAmino {} -export interface MsgSuperfluidUnbondLockResponseAminoMsg { - type: "osmosis/superfluid-unbond-lock-response"; - value: MsgSuperfluidUnbondLockResponseAmino; -} -export interface MsgSuperfluidUnbondLockResponseSDKType {} -/** - * MsgLockAndSuperfluidDelegate locks coins with the unbonding period duration, - * and then does a superfluid lock from the newly created lockup, to the - * specified validator addr. - */ -export interface MsgLockAndSuperfluidDelegate { - sender: string; - coins: Coin[]; - valAddr: string; -} -export interface MsgLockAndSuperfluidDelegateProtoMsg { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate"; - value: Uint8Array; -} -/** - * MsgLockAndSuperfluidDelegate locks coins with the unbonding period duration, - * and then does a superfluid lock from the newly created lockup, to the - * specified validator addr. - */ -export interface MsgLockAndSuperfluidDelegateAmino { - sender: string; - coins: CoinAmino[]; - val_addr: string; -} -export interface MsgLockAndSuperfluidDelegateAminoMsg { - type: "osmosis/lock-and-superfluid-delegate"; - value: MsgLockAndSuperfluidDelegateAmino; -} -/** - * MsgLockAndSuperfluidDelegate locks coins with the unbonding period duration, - * and then does a superfluid lock from the newly created lockup, to the - * specified validator addr. - */ -export interface MsgLockAndSuperfluidDelegateSDKType { - sender: string; - coins: CoinSDKType[]; - val_addr: string; -} -export interface MsgLockAndSuperfluidDelegateResponse { - ID: bigint; -} -export interface MsgLockAndSuperfluidDelegateResponseProtoMsg { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse"; - value: Uint8Array; -} -export interface MsgLockAndSuperfluidDelegateResponseAmino { - ID: string; -} -export interface MsgLockAndSuperfluidDelegateResponseAminoMsg { - type: "osmosis/lock-and-superfluid-delegate-response"; - value: MsgLockAndSuperfluidDelegateResponseAmino; -} -export interface MsgLockAndSuperfluidDelegateResponseSDKType { - ID: bigint; -} -/** - * MsgUnPoolWhitelistedPool Unpools every lock the sender has, that is - * associated with pool pool_id. If pool_id is not approved for unpooling by - * governance, this is a no-op. Unpooling takes the locked gamm shares, and runs - * "ExitPool" on it, to get the constituent tokens. e.g. z gamm/pool/1 tokens - * ExitPools into constituent tokens x uatom, y uosmo. Then it creates a new - * lock for every constituent token, with the duration associated with the lock. - * If the lock was unbonding, the new lockup durations should be the time left - * until unbond completion. - */ -export interface MsgUnPoolWhitelistedPool { - sender: string; - poolId: bigint; -} -export interface MsgUnPoolWhitelistedPoolProtoMsg { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool"; - value: Uint8Array; -} -/** - * MsgUnPoolWhitelistedPool Unpools every lock the sender has, that is - * associated with pool pool_id. If pool_id is not approved for unpooling by - * governance, this is a no-op. Unpooling takes the locked gamm shares, and runs - * "ExitPool" on it, to get the constituent tokens. e.g. z gamm/pool/1 tokens - * ExitPools into constituent tokens x uatom, y uosmo. Then it creates a new - * lock for every constituent token, with the duration associated with the lock. - * If the lock was unbonding, the new lockup durations should be the time left - * until unbond completion. - */ -export interface MsgUnPoolWhitelistedPoolAmino { - sender: string; - pool_id: string; -} -export interface MsgUnPoolWhitelistedPoolAminoMsg { - type: "osmosis/unpool-whitelisted-pool"; - value: MsgUnPoolWhitelistedPoolAmino; -} -/** - * MsgUnPoolWhitelistedPool Unpools every lock the sender has, that is - * associated with pool pool_id. If pool_id is not approved for unpooling by - * governance, this is a no-op. Unpooling takes the locked gamm shares, and runs - * "ExitPool" on it, to get the constituent tokens. e.g. z gamm/pool/1 tokens - * ExitPools into constituent tokens x uatom, y uosmo. Then it creates a new - * lock for every constituent token, with the duration associated with the lock. - * If the lock was unbonding, the new lockup durations should be the time left - * until unbond completion. - */ -export interface MsgUnPoolWhitelistedPoolSDKType { - sender: string; - pool_id: bigint; -} -export interface MsgUnPoolWhitelistedPoolResponse { - exitedLockIds: bigint[]; -} -export interface MsgUnPoolWhitelistedPoolResponseProtoMsg { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPoolResponse"; - value: Uint8Array; -} -export interface MsgUnPoolWhitelistedPoolResponseAmino { - exited_lock_ids: string[]; -} -export interface MsgUnPoolWhitelistedPoolResponseAminoMsg { - type: "osmosis/un-pool-whitelisted-pool-response"; - value: MsgUnPoolWhitelistedPoolResponseAmino; -} -export interface MsgUnPoolWhitelistedPoolResponseSDKType { - exited_lock_ids: bigint[]; -} -function createBaseMsgSuperfluidDelegate(): MsgSuperfluidDelegate { - return { - sender: "", - lockId: BigInt(0), - valAddr: "" - }; -} -export const MsgSuperfluidDelegate = { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - aminoType: "osmosis/superfluid-delegate", - encode(message: MsgSuperfluidDelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.lockId !== BigInt(0)) { - writer.uint32(16).uint64(message.lockId); - } - if (message.valAddr !== "") { - writer.uint32(26).string(message.valAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSuperfluidDelegate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSuperfluidDelegate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.lockId = reader.uint64(); - break; - case 3: - message.valAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSuperfluidDelegate { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0), - valAddr: isSet(object.valAddr) ? String(object.valAddr) : "" - }; - }, - toJSON(message: MsgSuperfluidDelegate): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - message.valAddr !== undefined && (obj.valAddr = message.valAddr); - return obj; - }, - fromPartial(object: DeepPartial): MsgSuperfluidDelegate { - const message = createBaseMsgSuperfluidDelegate(); - message.sender = object.sender ?? ""; - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - message.valAddr = object.valAddr ?? ""; - return message; - }, - fromSDK(object: MsgSuperfluidDelegateSDKType): MsgSuperfluidDelegate { - return { - sender: object?.sender, - lockId: object?.lock_id, - valAddr: object?.val_addr - }; - }, - toSDK(message: MsgSuperfluidDelegate): MsgSuperfluidDelegateSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId; - obj.val_addr = message.valAddr; - return obj; - }, - fromAmino(object: MsgSuperfluidDelegateAmino): MsgSuperfluidDelegate { - return { - sender: object.sender, - lockId: BigInt(object.lock_id), - valAddr: object.val_addr - }; - }, - toAmino(message: MsgSuperfluidDelegate): MsgSuperfluidDelegateAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - obj.val_addr = message.valAddr; - return obj; - }, - fromAminoMsg(object: MsgSuperfluidDelegateAminoMsg): MsgSuperfluidDelegate { - return MsgSuperfluidDelegate.fromAmino(object.value); - }, - toAminoMsg(message: MsgSuperfluidDelegate): MsgSuperfluidDelegateAminoMsg { - return { - type: "osmosis/superfluid-delegate", - value: MsgSuperfluidDelegate.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSuperfluidDelegateProtoMsg): MsgSuperfluidDelegate { - return MsgSuperfluidDelegate.decode(message.value); - }, - toProto(message: MsgSuperfluidDelegate): Uint8Array { - return MsgSuperfluidDelegate.encode(message).finish(); - }, - toProtoMsg(message: MsgSuperfluidDelegate): MsgSuperfluidDelegateProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegate", - value: MsgSuperfluidDelegate.encode(message).finish() - }; - } -}; -function createBaseMsgSuperfluidDelegateResponse(): MsgSuperfluidDelegateResponse { - return {}; -} -export const MsgSuperfluidDelegateResponse = { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegateResponse", - aminoType: "osmosis/superfluid-delegate-response", - encode(_: MsgSuperfluidDelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSuperfluidDelegateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSuperfluidDelegateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSuperfluidDelegateResponse { - return {}; - }, - toJSON(_: MsgSuperfluidDelegateResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSuperfluidDelegateResponse { - const message = createBaseMsgSuperfluidDelegateResponse(); - return message; - }, - fromSDK(_: MsgSuperfluidDelegateResponseSDKType): MsgSuperfluidDelegateResponse { - return {}; - }, - toSDK(_: MsgSuperfluidDelegateResponse): MsgSuperfluidDelegateResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSuperfluidDelegateResponseAmino): MsgSuperfluidDelegateResponse { - return {}; - }, - toAmino(_: MsgSuperfluidDelegateResponse): MsgSuperfluidDelegateResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSuperfluidDelegateResponseAminoMsg): MsgSuperfluidDelegateResponse { - return MsgSuperfluidDelegateResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSuperfluidDelegateResponse): MsgSuperfluidDelegateResponseAminoMsg { - return { - type: "osmosis/superfluid-delegate-response", - value: MsgSuperfluidDelegateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSuperfluidDelegateResponseProtoMsg): MsgSuperfluidDelegateResponse { - return MsgSuperfluidDelegateResponse.decode(message.value); - }, - toProto(message: MsgSuperfluidDelegateResponse): Uint8Array { - return MsgSuperfluidDelegateResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSuperfluidDelegateResponse): MsgSuperfluidDelegateResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidDelegateResponse", - value: MsgSuperfluidDelegateResponse.encode(message).finish() - }; - } -}; -function createBaseMsgSuperfluidUndelegate(): MsgSuperfluidUndelegate { - return { - sender: "", - lockId: BigInt(0) - }; -} -export const MsgSuperfluidUndelegate = { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - aminoType: "osmosis/superfluid-undelegate", - encode(message: MsgSuperfluidUndelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.lockId !== BigInt(0)) { - writer.uint32(16).uint64(message.lockId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSuperfluidUndelegate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSuperfluidUndelegate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.lockId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSuperfluidUndelegate { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgSuperfluidUndelegate): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgSuperfluidUndelegate { - const message = createBaseMsgSuperfluidUndelegate(); - message.sender = object.sender ?? ""; - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgSuperfluidUndelegateSDKType): MsgSuperfluidUndelegate { - return { - sender: object?.sender, - lockId: object?.lock_id - }; - }, - toSDK(message: MsgSuperfluidUndelegate): MsgSuperfluidUndelegateSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId; - return obj; - }, - fromAmino(object: MsgSuperfluidUndelegateAmino): MsgSuperfluidUndelegate { - return { - sender: object.sender, - lockId: BigInt(object.lock_id) - }; - }, - toAmino(message: MsgSuperfluidUndelegate): MsgSuperfluidUndelegateAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgSuperfluidUndelegateAminoMsg): MsgSuperfluidUndelegate { - return MsgSuperfluidUndelegate.fromAmino(object.value); - }, - toAminoMsg(message: MsgSuperfluidUndelegate): MsgSuperfluidUndelegateAminoMsg { - return { - type: "osmosis/superfluid-undelegate", - value: MsgSuperfluidUndelegate.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSuperfluidUndelegateProtoMsg): MsgSuperfluidUndelegate { - return MsgSuperfluidUndelegate.decode(message.value); - }, - toProto(message: MsgSuperfluidUndelegate): Uint8Array { - return MsgSuperfluidUndelegate.encode(message).finish(); - }, - toProtoMsg(message: MsgSuperfluidUndelegate): MsgSuperfluidUndelegateProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegate", - value: MsgSuperfluidUndelegate.encode(message).finish() - }; - } -}; -function createBaseMsgSuperfluidUndelegateResponse(): MsgSuperfluidUndelegateResponse { - return {}; -} -export const MsgSuperfluidUndelegateResponse = { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegateResponse", - aminoType: "osmosis/superfluid-undelegate-response", - encode(_: MsgSuperfluidUndelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSuperfluidUndelegateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSuperfluidUndelegateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSuperfluidUndelegateResponse { - return {}; - }, - toJSON(_: MsgSuperfluidUndelegateResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSuperfluidUndelegateResponse { - const message = createBaseMsgSuperfluidUndelegateResponse(); - return message; - }, - fromSDK(_: MsgSuperfluidUndelegateResponseSDKType): MsgSuperfluidUndelegateResponse { - return {}; - }, - toSDK(_: MsgSuperfluidUndelegateResponse): MsgSuperfluidUndelegateResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSuperfluidUndelegateResponseAmino): MsgSuperfluidUndelegateResponse { - return {}; - }, - toAmino(_: MsgSuperfluidUndelegateResponse): MsgSuperfluidUndelegateResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSuperfluidUndelegateResponseAminoMsg): MsgSuperfluidUndelegateResponse { - return MsgSuperfluidUndelegateResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSuperfluidUndelegateResponse): MsgSuperfluidUndelegateResponseAminoMsg { - return { - type: "osmosis/superfluid-undelegate-response", - value: MsgSuperfluidUndelegateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSuperfluidUndelegateResponseProtoMsg): MsgSuperfluidUndelegateResponse { - return MsgSuperfluidUndelegateResponse.decode(message.value); - }, - toProto(message: MsgSuperfluidUndelegateResponse): Uint8Array { - return MsgSuperfluidUndelegateResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSuperfluidUndelegateResponse): MsgSuperfluidUndelegateResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUndelegateResponse", - value: MsgSuperfluidUndelegateResponse.encode(message).finish() - }; - } -}; -function createBaseMsgSuperfluidUnbondLock(): MsgSuperfluidUnbondLock { - return { - sender: "", - lockId: BigInt(0) - }; -} -export const MsgSuperfluidUnbondLock = { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - aminoType: "osmosis/superfluid-unbond-lock", - encode(message: MsgSuperfluidUnbondLock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.lockId !== BigInt(0)) { - writer.uint32(16).uint64(message.lockId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSuperfluidUnbondLock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSuperfluidUnbondLock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.lockId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSuperfluidUnbondLock { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - lockId: isSet(object.lockId) ? BigInt(object.lockId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgSuperfluidUnbondLock): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.lockId !== undefined && (obj.lockId = (message.lockId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgSuperfluidUnbondLock { - const message = createBaseMsgSuperfluidUnbondLock(); - message.sender = object.sender ?? ""; - message.lockId = object.lockId !== undefined && object.lockId !== null ? BigInt(object.lockId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgSuperfluidUnbondLockSDKType): MsgSuperfluidUnbondLock { - return { - sender: object?.sender, - lockId: object?.lock_id - }; - }, - toSDK(message: MsgSuperfluidUnbondLock): MsgSuperfluidUnbondLockSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId; - return obj; - }, - fromAmino(object: MsgSuperfluidUnbondLockAmino): MsgSuperfluidUnbondLock { - return { - sender: object.sender, - lockId: BigInt(object.lock_id) - }; - }, - toAmino(message: MsgSuperfluidUnbondLock): MsgSuperfluidUnbondLockAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.lock_id = message.lockId ? message.lockId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgSuperfluidUnbondLockAminoMsg): MsgSuperfluidUnbondLock { - return MsgSuperfluidUnbondLock.fromAmino(object.value); - }, - toAminoMsg(message: MsgSuperfluidUnbondLock): MsgSuperfluidUnbondLockAminoMsg { - return { - type: "osmosis/superfluid-unbond-lock", - value: MsgSuperfluidUnbondLock.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSuperfluidUnbondLockProtoMsg): MsgSuperfluidUnbondLock { - return MsgSuperfluidUnbondLock.decode(message.value); - }, - toProto(message: MsgSuperfluidUnbondLock): Uint8Array { - return MsgSuperfluidUnbondLock.encode(message).finish(); - }, - toProtoMsg(message: MsgSuperfluidUnbondLock): MsgSuperfluidUnbondLockProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLock", - value: MsgSuperfluidUnbondLock.encode(message).finish() - }; - } -}; -function createBaseMsgSuperfluidUnbondLockResponse(): MsgSuperfluidUnbondLockResponse { - return {}; -} -export const MsgSuperfluidUnbondLockResponse = { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLockResponse", - aminoType: "osmosis/superfluid-unbond-lock-response", - encode(_: MsgSuperfluidUnbondLockResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSuperfluidUnbondLockResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSuperfluidUnbondLockResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSuperfluidUnbondLockResponse { - return {}; - }, - toJSON(_: MsgSuperfluidUnbondLockResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSuperfluidUnbondLockResponse { - const message = createBaseMsgSuperfluidUnbondLockResponse(); - return message; - }, - fromSDK(_: MsgSuperfluidUnbondLockResponseSDKType): MsgSuperfluidUnbondLockResponse { - return {}; - }, - toSDK(_: MsgSuperfluidUnbondLockResponse): MsgSuperfluidUnbondLockResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSuperfluidUnbondLockResponseAmino): MsgSuperfluidUnbondLockResponse { - return {}; - }, - toAmino(_: MsgSuperfluidUnbondLockResponse): MsgSuperfluidUnbondLockResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSuperfluidUnbondLockResponseAminoMsg): MsgSuperfluidUnbondLockResponse { - return MsgSuperfluidUnbondLockResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSuperfluidUnbondLockResponse): MsgSuperfluidUnbondLockResponseAminoMsg { - return { - type: "osmosis/superfluid-unbond-lock-response", - value: MsgSuperfluidUnbondLockResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSuperfluidUnbondLockResponseProtoMsg): MsgSuperfluidUnbondLockResponse { - return MsgSuperfluidUnbondLockResponse.decode(message.value); - }, - toProto(message: MsgSuperfluidUnbondLockResponse): Uint8Array { - return MsgSuperfluidUnbondLockResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSuperfluidUnbondLockResponse): MsgSuperfluidUnbondLockResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgSuperfluidUnbondLockResponse", - value: MsgSuperfluidUnbondLockResponse.encode(message).finish() - }; - } -}; -function createBaseMsgLockAndSuperfluidDelegate(): MsgLockAndSuperfluidDelegate { - return { - sender: "", - coins: [], - valAddr: "" - }; -} -export const MsgLockAndSuperfluidDelegate = { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - aminoType: "osmosis/lock-and-superfluid-delegate", - encode(message: MsgLockAndSuperfluidDelegate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - for (const v of message.coins) { - Coin.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.valAddr !== "") { - writer.uint32(26).string(message.valAddr); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgLockAndSuperfluidDelegate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLockAndSuperfluidDelegate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.coins.push(Coin.decode(reader, reader.uint32())); - break; - case 3: - message.valAddr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgLockAndSuperfluidDelegate { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromJSON(e)) : [], - valAddr: isSet(object.valAddr) ? String(object.valAddr) : "" - }; - }, - toJSON(message: MsgLockAndSuperfluidDelegate): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.coins = []; - } - message.valAddr !== undefined && (obj.valAddr = message.valAddr); - return obj; - }, - fromPartial(object: DeepPartial): MsgLockAndSuperfluidDelegate { - const message = createBaseMsgLockAndSuperfluidDelegate(); - message.sender = object.sender ?? ""; - message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; - message.valAddr = object.valAddr ?? ""; - return message; - }, - fromSDK(object: MsgLockAndSuperfluidDelegateSDKType): MsgLockAndSuperfluidDelegate { - return { - sender: object?.sender, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromSDK(e)) : [], - valAddr: object?.val_addr - }; - }, - toSDK(message: MsgLockAndSuperfluidDelegate): MsgLockAndSuperfluidDelegateSDKType { - const obj: any = {}; - obj.sender = message.sender; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.coins = []; - } - obj.val_addr = message.valAddr; - return obj; - }, - fromAmino(object: MsgLockAndSuperfluidDelegateAmino): MsgLockAndSuperfluidDelegate { - return { - sender: object.sender, - coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => Coin.fromAmino(e)) : [], - valAddr: object.val_addr - }; - }, - toAmino(message: MsgLockAndSuperfluidDelegate): MsgLockAndSuperfluidDelegateAmino { - const obj: any = {}; - obj.sender = message.sender; - if (message.coins) { - obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.coins = []; - } - obj.val_addr = message.valAddr; - return obj; - }, - fromAminoMsg(object: MsgLockAndSuperfluidDelegateAminoMsg): MsgLockAndSuperfluidDelegate { - return MsgLockAndSuperfluidDelegate.fromAmino(object.value); - }, - toAminoMsg(message: MsgLockAndSuperfluidDelegate): MsgLockAndSuperfluidDelegateAminoMsg { - return { - type: "osmosis/lock-and-superfluid-delegate", - value: MsgLockAndSuperfluidDelegate.toAmino(message) - }; - }, - fromProtoMsg(message: MsgLockAndSuperfluidDelegateProtoMsg): MsgLockAndSuperfluidDelegate { - return MsgLockAndSuperfluidDelegate.decode(message.value); - }, - toProto(message: MsgLockAndSuperfluidDelegate): Uint8Array { - return MsgLockAndSuperfluidDelegate.encode(message).finish(); - }, - toProtoMsg(message: MsgLockAndSuperfluidDelegate): MsgLockAndSuperfluidDelegateProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegate", - value: MsgLockAndSuperfluidDelegate.encode(message).finish() - }; - } -}; -function createBaseMsgLockAndSuperfluidDelegateResponse(): MsgLockAndSuperfluidDelegateResponse { - return { - ID: BigInt(0) - }; -} -export const MsgLockAndSuperfluidDelegateResponse = { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse", - aminoType: "osmosis/lock-and-superfluid-delegate-response", - encode(message: MsgLockAndSuperfluidDelegateResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ID !== BigInt(0)) { - writer.uint32(8).uint64(message.ID); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgLockAndSuperfluidDelegateResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLockAndSuperfluidDelegateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ID = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgLockAndSuperfluidDelegateResponse { - return { - ID: isSet(object.ID) ? BigInt(object.ID.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgLockAndSuperfluidDelegateResponse): unknown { - const obj: any = {}; - message.ID !== undefined && (obj.ID = (message.ID || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgLockAndSuperfluidDelegateResponse { - const message = createBaseMsgLockAndSuperfluidDelegateResponse(); - message.ID = object.ID !== undefined && object.ID !== null ? BigInt(object.ID.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgLockAndSuperfluidDelegateResponseSDKType): MsgLockAndSuperfluidDelegateResponse { - return { - ID: object?.ID - }; - }, - toSDK(message: MsgLockAndSuperfluidDelegateResponse): MsgLockAndSuperfluidDelegateResponseSDKType { - const obj: any = {}; - obj.ID = message.ID; - return obj; - }, - fromAmino(object: MsgLockAndSuperfluidDelegateResponseAmino): MsgLockAndSuperfluidDelegateResponse { - return { - ID: BigInt(object.ID) - }; - }, - toAmino(message: MsgLockAndSuperfluidDelegateResponse): MsgLockAndSuperfluidDelegateResponseAmino { - const obj: any = {}; - obj.ID = message.ID ? message.ID.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgLockAndSuperfluidDelegateResponseAminoMsg): MsgLockAndSuperfluidDelegateResponse { - return MsgLockAndSuperfluidDelegateResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgLockAndSuperfluidDelegateResponse): MsgLockAndSuperfluidDelegateResponseAminoMsg { - return { - type: "osmosis/lock-and-superfluid-delegate-response", - value: MsgLockAndSuperfluidDelegateResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgLockAndSuperfluidDelegateResponseProtoMsg): MsgLockAndSuperfluidDelegateResponse { - return MsgLockAndSuperfluidDelegateResponse.decode(message.value); - }, - toProto(message: MsgLockAndSuperfluidDelegateResponse): Uint8Array { - return MsgLockAndSuperfluidDelegateResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgLockAndSuperfluidDelegateResponse): MsgLockAndSuperfluidDelegateResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse", - value: MsgLockAndSuperfluidDelegateResponse.encode(message).finish() - }; - } -}; -function createBaseMsgUnPoolWhitelistedPool(): MsgUnPoolWhitelistedPool { - return { - sender: "", - poolId: BigInt(0) - }; -} -export const MsgUnPoolWhitelistedPool = { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - aminoType: "osmosis/unpool-whitelisted-pool", - encode(message: MsgUnPoolWhitelistedPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.poolId !== BigInt(0)) { - writer.uint32(16).uint64(message.poolId); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUnPoolWhitelistedPool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUnPoolWhitelistedPool(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.poolId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUnPoolWhitelistedPool { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0) - }; - }, - toJSON(message: MsgUnPoolWhitelistedPool): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): MsgUnPoolWhitelistedPool { - const message = createBaseMsgUnPoolWhitelistedPool(); - message.sender = object.sender ?? ""; - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - return message; - }, - fromSDK(object: MsgUnPoolWhitelistedPoolSDKType): MsgUnPoolWhitelistedPool { - return { - sender: object?.sender, - poolId: object?.pool_id - }; - }, - toSDK(message: MsgUnPoolWhitelistedPool): MsgUnPoolWhitelistedPoolSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId; - return obj; - }, - fromAmino(object: MsgUnPoolWhitelistedPoolAmino): MsgUnPoolWhitelistedPool { - return { - sender: object.sender, - poolId: BigInt(object.pool_id) - }; - }, - toAmino(message: MsgUnPoolWhitelistedPool): MsgUnPoolWhitelistedPoolAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - return obj; - }, - fromAminoMsg(object: MsgUnPoolWhitelistedPoolAminoMsg): MsgUnPoolWhitelistedPool { - return MsgUnPoolWhitelistedPool.fromAmino(object.value); - }, - toAminoMsg(message: MsgUnPoolWhitelistedPool): MsgUnPoolWhitelistedPoolAminoMsg { - return { - type: "osmosis/unpool-whitelisted-pool", - value: MsgUnPoolWhitelistedPool.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUnPoolWhitelistedPoolProtoMsg): MsgUnPoolWhitelistedPool { - return MsgUnPoolWhitelistedPool.decode(message.value); - }, - toProto(message: MsgUnPoolWhitelistedPool): Uint8Array { - return MsgUnPoolWhitelistedPool.encode(message).finish(); - }, - toProtoMsg(message: MsgUnPoolWhitelistedPool): MsgUnPoolWhitelistedPoolProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPool", - value: MsgUnPoolWhitelistedPool.encode(message).finish() - }; - } -}; -function createBaseMsgUnPoolWhitelistedPoolResponse(): MsgUnPoolWhitelistedPoolResponse { - return { - exitedLockIds: [] - }; -} -export const MsgUnPoolWhitelistedPoolResponse = { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPoolResponse", - aminoType: "osmosis/un-pool-whitelisted-pool-response", - encode(message: MsgUnPoolWhitelistedPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.exitedLockIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgUnPoolWhitelistedPoolResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUnPoolWhitelistedPoolResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.exitedLockIds.push(reader.uint64()); - } - } else { - message.exitedLockIds.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgUnPoolWhitelistedPoolResponse { - return { - exitedLockIds: Array.isArray(object?.exitedLockIds) ? object.exitedLockIds.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: MsgUnPoolWhitelistedPoolResponse): unknown { - const obj: any = {}; - if (message.exitedLockIds) { - obj.exitedLockIds = message.exitedLockIds.map(e => (e || BigInt(0)).toString()); - } else { - obj.exitedLockIds = []; - } - return obj; - }, - fromPartial(object: DeepPartial): MsgUnPoolWhitelistedPoolResponse { - const message = createBaseMsgUnPoolWhitelistedPoolResponse(); - message.exitedLockIds = object.exitedLockIds?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: MsgUnPoolWhitelistedPoolResponseSDKType): MsgUnPoolWhitelistedPoolResponse { - return { - exitedLockIds: Array.isArray(object?.exited_lock_ids) ? object.exited_lock_ids.map((e: any) => e) : [] - }; - }, - toSDK(message: MsgUnPoolWhitelistedPoolResponse): MsgUnPoolWhitelistedPoolResponseSDKType { - const obj: any = {}; - if (message.exitedLockIds) { - obj.exited_lock_ids = message.exitedLockIds.map(e => e); - } else { - obj.exited_lock_ids = []; - } - return obj; - }, - fromAmino(object: MsgUnPoolWhitelistedPoolResponseAmino): MsgUnPoolWhitelistedPoolResponse { - return { - exitedLockIds: Array.isArray(object?.exited_lock_ids) ? object.exited_lock_ids.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: MsgUnPoolWhitelistedPoolResponse): MsgUnPoolWhitelistedPoolResponseAmino { - const obj: any = {}; - if (message.exitedLockIds) { - obj.exited_lock_ids = message.exitedLockIds.map(e => e.toString()); - } else { - obj.exited_lock_ids = []; - } - return obj; - }, - fromAminoMsg(object: MsgUnPoolWhitelistedPoolResponseAminoMsg): MsgUnPoolWhitelistedPoolResponse { - return MsgUnPoolWhitelistedPoolResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgUnPoolWhitelistedPoolResponse): MsgUnPoolWhitelistedPoolResponseAminoMsg { - return { - type: "osmosis/un-pool-whitelisted-pool-response", - value: MsgUnPoolWhitelistedPoolResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgUnPoolWhitelistedPoolResponseProtoMsg): MsgUnPoolWhitelistedPoolResponse { - return MsgUnPoolWhitelistedPoolResponse.decode(message.value); - }, - toProto(message: MsgUnPoolWhitelistedPoolResponse): Uint8Array { - return MsgUnPoolWhitelistedPoolResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgUnPoolWhitelistedPoolResponse): MsgUnPoolWhitelistedPoolResponseProtoMsg { - return { - typeUrl: "/osmosis.superfluid.MsgUnPoolWhitelistedPoolResponse", - value: MsgUnPoolWhitelistedPoolResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/superfluid/v1beta1/gov.ts b/examples/interchainjs/src/codegen/osmosis/superfluid/v1beta1/gov.ts deleted file mode 100644 index 38884565..00000000 --- a/examples/interchainjs/src/codegen/osmosis/superfluid/v1beta1/gov.ts +++ /dev/null @@ -1,518 +0,0 @@ -import { SuperfluidAsset, SuperfluidAssetAmino, SuperfluidAssetSDKType } from "../superfluid"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * SetSuperfluidAssetsProposal is a gov Content type to update the superfluid - * assets - */ -export interface SetSuperfluidAssetsProposal { - title: string; - description: string; - assets: SuperfluidAsset[]; -} -export interface SetSuperfluidAssetsProposalProtoMsg { - typeUrl: "/osmosis.superfluid.v1beta1.SetSuperfluidAssetsProposal"; - value: Uint8Array; -} -/** - * SetSuperfluidAssetsProposal is a gov Content type to update the superfluid - * assets - */ -export interface SetSuperfluidAssetsProposalAmino { - title: string; - description: string; - assets: SuperfluidAssetAmino[]; -} -export interface SetSuperfluidAssetsProposalAminoMsg { - type: "osmosis/v1beta1/set-superfluid-assets-proposal"; - value: SetSuperfluidAssetsProposalAmino; -} -/** - * SetSuperfluidAssetsProposal is a gov Content type to update the superfluid - * assets - */ -export interface SetSuperfluidAssetsProposalSDKType { - title: string; - description: string; - assets: SuperfluidAssetSDKType[]; -} -/** - * RemoveSuperfluidAssetsProposal is a gov Content type to remove the superfluid - * assets by denom - */ -export interface RemoveSuperfluidAssetsProposal { - title: string; - description: string; - superfluidAssetDenoms: string[]; -} -export interface RemoveSuperfluidAssetsProposalProtoMsg { - typeUrl: "/osmosis.superfluid.v1beta1.RemoveSuperfluidAssetsProposal"; - value: Uint8Array; -} -/** - * RemoveSuperfluidAssetsProposal is a gov Content type to remove the superfluid - * assets by denom - */ -export interface RemoveSuperfluidAssetsProposalAmino { - title: string; - description: string; - superfluid_asset_denoms: string[]; -} -export interface RemoveSuperfluidAssetsProposalAminoMsg { - type: "osmosis/v1beta1/remove-superfluid-assets-proposal"; - value: RemoveSuperfluidAssetsProposalAmino; -} -/** - * RemoveSuperfluidAssetsProposal is a gov Content type to remove the superfluid - * assets by denom - */ -export interface RemoveSuperfluidAssetsProposalSDKType { - title: string; - description: string; - superfluid_asset_denoms: string[]; -} -/** - * UpdateUnpoolWhiteListProposal is a gov Content type to update the - * allowed list of pool ids. - */ -export interface UpdateUnpoolWhiteListProposal { - title: string; - description: string; - ids: bigint[]; - isOverwrite: boolean; -} -export interface UpdateUnpoolWhiteListProposalProtoMsg { - typeUrl: "/osmosis.superfluid.v1beta1.UpdateUnpoolWhiteListProposal"; - value: Uint8Array; -} -/** - * UpdateUnpoolWhiteListProposal is a gov Content type to update the - * allowed list of pool ids. - */ -export interface UpdateUnpoolWhiteListProposalAmino { - title: string; - description: string; - ids: string[]; - is_overwrite: boolean; -} -export interface UpdateUnpoolWhiteListProposalAminoMsg { - type: "osmosis/v1beta1/update-unpool-white-list-proposal"; - value: UpdateUnpoolWhiteListProposalAmino; -} -/** - * UpdateUnpoolWhiteListProposal is a gov Content type to update the - * allowed list of pool ids. - */ -export interface UpdateUnpoolWhiteListProposalSDKType { - title: string; - description: string; - ids: bigint[]; - is_overwrite: boolean; -} -function createBaseSetSuperfluidAssetsProposal(): SetSuperfluidAssetsProposal { - return { - title: "", - description: "", - assets: [] - }; -} -export const SetSuperfluidAssetsProposal = { - typeUrl: "/osmosis.superfluid.v1beta1.SetSuperfluidAssetsProposal", - aminoType: "osmosis/v1beta1/set-superfluid-assets-proposal", - encode(message: SetSuperfluidAssetsProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.assets) { - SuperfluidAsset.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SetSuperfluidAssetsProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSetSuperfluidAssetsProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.assets.push(SuperfluidAsset.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SetSuperfluidAssetsProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => SuperfluidAsset.fromJSON(e)) : [] - }; - }, - toJSON(message: SetSuperfluidAssetsProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.assets) { - obj.assets = message.assets.map(e => e ? SuperfluidAsset.toJSON(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromPartial(object: DeepPartial): SetSuperfluidAssetsProposal { - const message = createBaseSetSuperfluidAssetsProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.assets = object.assets?.map(e => SuperfluidAsset.fromPartial(e)) || []; - return message; - }, - fromSDK(object: SetSuperfluidAssetsProposalSDKType): SetSuperfluidAssetsProposal { - return { - title: object?.title, - description: object?.description, - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => SuperfluidAsset.fromSDK(e)) : [] - }; - }, - toSDK(message: SetSuperfluidAssetsProposal): SetSuperfluidAssetsProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.assets) { - obj.assets = message.assets.map(e => e ? SuperfluidAsset.toSDK(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromAmino(object: SetSuperfluidAssetsProposalAmino): SetSuperfluidAssetsProposal { - return { - title: object.title, - description: object.description, - assets: Array.isArray(object?.assets) ? object.assets.map((e: any) => SuperfluidAsset.fromAmino(e)) : [] - }; - }, - toAmino(message: SetSuperfluidAssetsProposal): SetSuperfluidAssetsProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.assets) { - obj.assets = message.assets.map(e => e ? SuperfluidAsset.toAmino(e) : undefined); - } else { - obj.assets = []; - } - return obj; - }, - fromAminoMsg(object: SetSuperfluidAssetsProposalAminoMsg): SetSuperfluidAssetsProposal { - return SetSuperfluidAssetsProposal.fromAmino(object.value); - }, - toAminoMsg(message: SetSuperfluidAssetsProposal): SetSuperfluidAssetsProposalAminoMsg { - return { - type: "osmosis/v1beta1/set-superfluid-assets-proposal", - value: SetSuperfluidAssetsProposal.toAmino(message) - }; - }, - fromProtoMsg(message: SetSuperfluidAssetsProposalProtoMsg): SetSuperfluidAssetsProposal { - return SetSuperfluidAssetsProposal.decode(message.value); - }, - toProto(message: SetSuperfluidAssetsProposal): Uint8Array { - return SetSuperfluidAssetsProposal.encode(message).finish(); - }, - toProtoMsg(message: SetSuperfluidAssetsProposal): SetSuperfluidAssetsProposalProtoMsg { - return { - typeUrl: "/osmosis.superfluid.v1beta1.SetSuperfluidAssetsProposal", - value: SetSuperfluidAssetsProposal.encode(message).finish() - }; - } -}; -function createBaseRemoveSuperfluidAssetsProposal(): RemoveSuperfluidAssetsProposal { - return { - title: "", - description: "", - superfluidAssetDenoms: [] - }; -} -export const RemoveSuperfluidAssetsProposal = { - typeUrl: "/osmosis.superfluid.v1beta1.RemoveSuperfluidAssetsProposal", - aminoType: "osmosis/v1beta1/remove-superfluid-assets-proposal", - encode(message: RemoveSuperfluidAssetsProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.superfluidAssetDenoms) { - writer.uint32(26).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RemoveSuperfluidAssetsProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRemoveSuperfluidAssetsProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.superfluidAssetDenoms.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RemoveSuperfluidAssetsProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - superfluidAssetDenoms: Array.isArray(object?.superfluidAssetDenoms) ? object.superfluidAssetDenoms.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: RemoveSuperfluidAssetsProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.superfluidAssetDenoms) { - obj.superfluidAssetDenoms = message.superfluidAssetDenoms.map(e => e); - } else { - obj.superfluidAssetDenoms = []; - } - return obj; - }, - fromPartial(object: DeepPartial): RemoveSuperfluidAssetsProposal { - const message = createBaseRemoveSuperfluidAssetsProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.superfluidAssetDenoms = object.superfluidAssetDenoms?.map(e => e) || []; - return message; - }, - fromSDK(object: RemoveSuperfluidAssetsProposalSDKType): RemoveSuperfluidAssetsProposal { - return { - title: object?.title, - description: object?.description, - superfluidAssetDenoms: Array.isArray(object?.superfluid_asset_denoms) ? object.superfluid_asset_denoms.map((e: any) => e) : [] - }; - }, - toSDK(message: RemoveSuperfluidAssetsProposal): RemoveSuperfluidAssetsProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.superfluidAssetDenoms) { - obj.superfluid_asset_denoms = message.superfluidAssetDenoms.map(e => e); - } else { - obj.superfluid_asset_denoms = []; - } - return obj; - }, - fromAmino(object: RemoveSuperfluidAssetsProposalAmino): RemoveSuperfluidAssetsProposal { - return { - title: object.title, - description: object.description, - superfluidAssetDenoms: Array.isArray(object?.superfluid_asset_denoms) ? object.superfluid_asset_denoms.map((e: any) => e) : [] - }; - }, - toAmino(message: RemoveSuperfluidAssetsProposal): RemoveSuperfluidAssetsProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.superfluidAssetDenoms) { - obj.superfluid_asset_denoms = message.superfluidAssetDenoms.map(e => e); - } else { - obj.superfluid_asset_denoms = []; - } - return obj; - }, - fromAminoMsg(object: RemoveSuperfluidAssetsProposalAminoMsg): RemoveSuperfluidAssetsProposal { - return RemoveSuperfluidAssetsProposal.fromAmino(object.value); - }, - toAminoMsg(message: RemoveSuperfluidAssetsProposal): RemoveSuperfluidAssetsProposalAminoMsg { - return { - type: "osmosis/v1beta1/remove-superfluid-assets-proposal", - value: RemoveSuperfluidAssetsProposal.toAmino(message) - }; - }, - fromProtoMsg(message: RemoveSuperfluidAssetsProposalProtoMsg): RemoveSuperfluidAssetsProposal { - return RemoveSuperfluidAssetsProposal.decode(message.value); - }, - toProto(message: RemoveSuperfluidAssetsProposal): Uint8Array { - return RemoveSuperfluidAssetsProposal.encode(message).finish(); - }, - toProtoMsg(message: RemoveSuperfluidAssetsProposal): RemoveSuperfluidAssetsProposalProtoMsg { - return { - typeUrl: "/osmosis.superfluid.v1beta1.RemoveSuperfluidAssetsProposal", - value: RemoveSuperfluidAssetsProposal.encode(message).finish() - }; - } -}; -function createBaseUpdateUnpoolWhiteListProposal(): UpdateUnpoolWhiteListProposal { - return { - title: "", - description: "", - ids: [], - isOverwrite: false - }; -} -export const UpdateUnpoolWhiteListProposal = { - typeUrl: "/osmosis.superfluid.v1beta1.UpdateUnpoolWhiteListProposal", - aminoType: "osmosis/v1beta1/update-unpool-white-list-proposal", - encode(message: UpdateUnpoolWhiteListProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.ids) { - writer.uint64(v); - } - writer.ldelim(); - if (message.isOverwrite === true) { - writer.uint32(32).bool(message.isOverwrite); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpdateUnpoolWhiteListProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateUnpoolWhiteListProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.ids.push(reader.uint64()); - } - } else { - message.ids.push(reader.uint64()); - } - break; - case 4: - message.isOverwrite = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpdateUnpoolWhiteListProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - ids: Array.isArray(object?.ids) ? object.ids.map((e: any) => BigInt(e.toString())) : [], - isOverwrite: isSet(object.isOverwrite) ? Boolean(object.isOverwrite) : false - }; - }, - toJSON(message: UpdateUnpoolWhiteListProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.ids) { - obj.ids = message.ids.map(e => (e || BigInt(0)).toString()); - } else { - obj.ids = []; - } - message.isOverwrite !== undefined && (obj.isOverwrite = message.isOverwrite); - return obj; - }, - fromPartial(object: DeepPartial): UpdateUnpoolWhiteListProposal { - const message = createBaseUpdateUnpoolWhiteListProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.ids = object.ids?.map(e => BigInt(e.toString())) || []; - message.isOverwrite = object.isOverwrite ?? false; - return message; - }, - fromSDK(object: UpdateUnpoolWhiteListProposalSDKType): UpdateUnpoolWhiteListProposal { - return { - title: object?.title, - description: object?.description, - ids: Array.isArray(object?.ids) ? object.ids.map((e: any) => e) : [], - isOverwrite: object?.is_overwrite - }; - }, - toSDK(message: UpdateUnpoolWhiteListProposal): UpdateUnpoolWhiteListProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.ids) { - obj.ids = message.ids.map(e => e); - } else { - obj.ids = []; - } - obj.is_overwrite = message.isOverwrite; - return obj; - }, - fromAmino(object: UpdateUnpoolWhiteListProposalAmino): UpdateUnpoolWhiteListProposal { - return { - title: object.title, - description: object.description, - ids: Array.isArray(object?.ids) ? object.ids.map((e: any) => BigInt(e)) : [], - isOverwrite: object.is_overwrite - }; - }, - toAmino(message: UpdateUnpoolWhiteListProposal): UpdateUnpoolWhiteListProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - if (message.ids) { - obj.ids = message.ids.map(e => e.toString()); - } else { - obj.ids = []; - } - obj.is_overwrite = message.isOverwrite; - return obj; - }, - fromAminoMsg(object: UpdateUnpoolWhiteListProposalAminoMsg): UpdateUnpoolWhiteListProposal { - return UpdateUnpoolWhiteListProposal.fromAmino(object.value); - }, - toAminoMsg(message: UpdateUnpoolWhiteListProposal): UpdateUnpoolWhiteListProposalAminoMsg { - return { - type: "osmosis/v1beta1/update-unpool-white-list-proposal", - value: UpdateUnpoolWhiteListProposal.toAmino(message) - }; - }, - fromProtoMsg(message: UpdateUnpoolWhiteListProposalProtoMsg): UpdateUnpoolWhiteListProposal { - return UpdateUnpoolWhiteListProposal.decode(message.value); - }, - toProto(message: UpdateUnpoolWhiteListProposal): Uint8Array { - return UpdateUnpoolWhiteListProposal.encode(message).finish(); - }, - toProtoMsg(message: UpdateUnpoolWhiteListProposal): UpdateUnpoolWhiteListProposalProtoMsg { - return { - typeUrl: "/osmosis.superfluid.v1beta1.UpdateUnpoolWhiteListProposal", - value: UpdateUnpoolWhiteListProposal.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts deleted file mode 100644 index 73e501ea..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ -export interface DenomAuthorityMetadata { - /** Can be empty for no admin, or a valid osmosis address */ - admin: string; -} -export interface DenomAuthorityMetadataProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata"; - value: Uint8Array; -} -/** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ -export interface DenomAuthorityMetadataAmino { - /** Can be empty for no admin, or a valid osmosis address */ - admin: string; -} -export interface DenomAuthorityMetadataAminoMsg { - type: "osmosis/tokenfactory/denom-authority-metadata"; - value: DenomAuthorityMetadataAmino; -} -/** - * DenomAuthorityMetadata specifies metadata for addresses that have specific - * capabilities over a token factory denom. Right now there is only one Admin - * permission, but is planned to be extended to the future. - */ -export interface DenomAuthorityMetadataSDKType { - admin: string; -} -function createBaseDenomAuthorityMetadata(): DenomAuthorityMetadata { - return { - admin: "" - }; -} -export const DenomAuthorityMetadata = { - typeUrl: "/osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata", - aminoType: "osmosis/tokenfactory/denom-authority-metadata", - encode(message: DenomAuthorityMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DenomAuthorityMetadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDenomAuthorityMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DenomAuthorityMetadata { - return { - admin: isSet(object.admin) ? String(object.admin) : "" - }; - }, - toJSON(message: DenomAuthorityMetadata): unknown { - const obj: any = {}; - message.admin !== undefined && (obj.admin = message.admin); - return obj; - }, - fromPartial(object: DeepPartial): DenomAuthorityMetadata { - const message = createBaseDenomAuthorityMetadata(); - message.admin = object.admin ?? ""; - return message; - }, - fromSDK(object: DenomAuthorityMetadataSDKType): DenomAuthorityMetadata { - return { - admin: object?.admin - }; - }, - toSDK(message: DenomAuthorityMetadata): DenomAuthorityMetadataSDKType { - const obj: any = {}; - obj.admin = message.admin; - return obj; - }, - fromAmino(object: DenomAuthorityMetadataAmino): DenomAuthorityMetadata { - return { - admin: object.admin - }; - }, - toAmino(message: DenomAuthorityMetadata): DenomAuthorityMetadataAmino { - const obj: any = {}; - obj.admin = message.admin; - return obj; - }, - fromAminoMsg(object: DenomAuthorityMetadataAminoMsg): DenomAuthorityMetadata { - return DenomAuthorityMetadata.fromAmino(object.value); - }, - toAminoMsg(message: DenomAuthorityMetadata): DenomAuthorityMetadataAminoMsg { - return { - type: "osmosis/tokenfactory/denom-authority-metadata", - value: DenomAuthorityMetadata.toAmino(message) - }; - }, - fromProtoMsg(message: DenomAuthorityMetadataProtoMsg): DenomAuthorityMetadata { - return DenomAuthorityMetadata.decode(message.value); - }, - toProto(message: DenomAuthorityMetadata): Uint8Array { - return DenomAuthorityMetadata.encode(message).finish(); - }, - toProtoMsg(message: DenomAuthorityMetadata): DenomAuthorityMetadataProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata", - value: DenomAuthorityMetadata.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/genesis.ts deleted file mode 100644 index 30eb9fe7..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/genesis.ts +++ /dev/null @@ -1,280 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino, DenomAuthorityMetadataSDKType } from "./authorityMetadata"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the tokenfactory module's genesis state. */ -export interface GenesisState { - /** params defines the paramaters of the module. */ - params: Params | undefined; - factoryDenoms: GenesisDenom[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the tokenfactory module's genesis state. */ -export interface GenesisStateAmino { - /** params defines the paramaters of the module. */ - params?: ParamsAmino | undefined; - factory_denoms: GenesisDenomAmino[]; -} -export interface GenesisStateAminoMsg { - type: "osmosis/tokenfactory/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the tokenfactory module's genesis state. */ -export interface GenesisStateSDKType { - params: ParamsSDKType | undefined; - factory_denoms: GenesisDenomSDKType[]; -} -/** - * GenesisDenom defines a tokenfactory denom that is defined within genesis - * state. The structure contains DenomAuthorityMetadata which defines the - * denom's admin. - */ -export interface GenesisDenom { - denom: string; - authorityMetadata: DenomAuthorityMetadata | undefined; -} -export interface GenesisDenomProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.GenesisDenom"; - value: Uint8Array; -} -/** - * GenesisDenom defines a tokenfactory denom that is defined within genesis - * state. The structure contains DenomAuthorityMetadata which defines the - * denom's admin. - */ -export interface GenesisDenomAmino { - denom: string; - authority_metadata?: DenomAuthorityMetadataAmino | undefined; -} -export interface GenesisDenomAminoMsg { - type: "osmosis/tokenfactory/genesis-denom"; - value: GenesisDenomAmino; -} -/** - * GenesisDenom defines a tokenfactory denom that is defined within genesis - * state. The structure contains DenomAuthorityMetadata which defines the - * denom's admin. - */ -export interface GenesisDenomSDKType { - denom: string; - authority_metadata: DenomAuthorityMetadataSDKType | undefined; -} -function createBaseGenesisState(): GenesisState { - return { - params: Params.fromPartial({}), - factoryDenoms: [] - }; -} -export const GenesisState = { - typeUrl: "/osmosis.tokenfactory.v1beta1.GenesisState", - aminoType: "osmosis/tokenfactory/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.factoryDenoms) { - GenesisDenom.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.factoryDenoms.push(GenesisDenom.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - factoryDenoms: Array.isArray(object?.factoryDenoms) ? object.factoryDenoms.map((e: any) => GenesisDenom.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.factoryDenoms) { - obj.factoryDenoms = message.factoryDenoms.map(e => e ? GenesisDenom.toJSON(e) : undefined); - } else { - obj.factoryDenoms = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - message.factoryDenoms = object.factoryDenoms?.map(e => GenesisDenom.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - params: object.params ? Params.fromSDK(object.params) : undefined, - factoryDenoms: Array.isArray(object?.factory_denoms) ? object.factory_denoms.map((e: any) => GenesisDenom.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - if (message.factoryDenoms) { - obj.factory_denoms = message.factoryDenoms.map(e => e ? GenesisDenom.toSDK(e) : undefined); - } else { - obj.factory_denoms = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined, - factoryDenoms: Array.isArray(object?.factory_denoms) ? object.factory_denoms.map((e: any) => GenesisDenom.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - if (message.factoryDenoms) { - obj.factory_denoms = message.factoryDenoms.map(e => e ? GenesisDenom.toAmino(e) : undefined); - } else { - obj.factory_denoms = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/tokenfactory/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; -function createBaseGenesisDenom(): GenesisDenom { - return { - denom: "", - authorityMetadata: DenomAuthorityMetadata.fromPartial({}) - }; -} -export const GenesisDenom = { - typeUrl: "/osmosis.tokenfactory.v1beta1.GenesisDenom", - aminoType: "osmosis/tokenfactory/genesis-denom", - encode(message: GenesisDenom, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.authorityMetadata !== undefined) { - DenomAuthorityMetadata.encode(message.authorityMetadata, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisDenom { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisDenom(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.authorityMetadata = DenomAuthorityMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisDenom { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - authorityMetadata: isSet(object.authorityMetadata) ? DenomAuthorityMetadata.fromJSON(object.authorityMetadata) : undefined - }; - }, - toJSON(message: GenesisDenom): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.authorityMetadata !== undefined && (obj.authorityMetadata = message.authorityMetadata ? DenomAuthorityMetadata.toJSON(message.authorityMetadata) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisDenom { - const message = createBaseGenesisDenom(); - message.denom = object.denom ?? ""; - message.authorityMetadata = object.authorityMetadata !== undefined && object.authorityMetadata !== null ? DenomAuthorityMetadata.fromPartial(object.authorityMetadata) : undefined; - return message; - }, - fromSDK(object: GenesisDenomSDKType): GenesisDenom { - return { - denom: object?.denom, - authorityMetadata: object.authority_metadata ? DenomAuthorityMetadata.fromSDK(object.authority_metadata) : undefined - }; - }, - toSDK(message: GenesisDenom): GenesisDenomSDKType { - const obj: any = {}; - obj.denom = message.denom; - message.authorityMetadata !== undefined && (obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toSDK(message.authorityMetadata) : undefined); - return obj; - }, - fromAmino(object: GenesisDenomAmino): GenesisDenom { - return { - denom: object.denom, - authorityMetadata: object?.authority_metadata ? DenomAuthorityMetadata.fromAmino(object.authority_metadata) : undefined - }; - }, - toAmino(message: GenesisDenom): GenesisDenomAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toAmino(message.authorityMetadata) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisDenomAminoMsg): GenesisDenom { - return GenesisDenom.fromAmino(object.value); - }, - toAminoMsg(message: GenesisDenom): GenesisDenomAminoMsg { - return { - type: "osmosis/tokenfactory/genesis-denom", - value: GenesisDenom.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisDenomProtoMsg): GenesisDenom { - return GenesisDenom.decode(message.value); - }, - toProto(message: GenesisDenom): Uint8Array { - return GenesisDenom.encode(message).finish(); - }, - toProtoMsg(message: GenesisDenom): GenesisDenomProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.GenesisDenom", - value: GenesisDenom.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/params.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/params.ts deleted file mode 100644 index e8f00fde..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/params.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial } from "../../../helpers"; -/** Params defines the parameters for the tokenfactory module. */ -export interface Params { - denomCreationFee: Coin[]; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.Params"; - value: Uint8Array; -} -/** Params defines the parameters for the tokenfactory module. */ -export interface ParamsAmino { - denom_creation_fee: CoinAmino[]; -} -export interface ParamsAminoMsg { - type: "osmosis/tokenfactory/params"; - value: ParamsAmino; -} -/** Params defines the parameters for the tokenfactory module. */ -export interface ParamsSDKType { - denom_creation_fee: CoinSDKType[]; -} -function createBaseParams(): Params { - return { - denomCreationFee: [] - }; -} -export const Params = { - typeUrl: "/osmosis.tokenfactory.v1beta1.Params", - aminoType: "osmosis/tokenfactory/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.denomCreationFee) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denomCreationFee.push(Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - denomCreationFee: Array.isArray(object?.denomCreationFee) ? object.denomCreationFee.map((e: any) => Coin.fromJSON(e)) : [] - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - if (message.denomCreationFee) { - obj.denomCreationFee = message.denomCreationFee.map(e => e ? Coin.toJSON(e) : undefined); - } else { - obj.denomCreationFee = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.denomCreationFee = object.denomCreationFee?.map(e => Coin.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - denomCreationFee: Array.isArray(object?.denom_creation_fee) ? object.denom_creation_fee.map((e: any) => Coin.fromSDK(e)) : [] - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - if (message.denomCreationFee) { - obj.denom_creation_fee = message.denomCreationFee.map(e => e ? Coin.toSDK(e) : undefined); - } else { - obj.denom_creation_fee = []; - } - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - denomCreationFee: Array.isArray(object?.denom_creation_fee) ? object.denom_creation_fee.map((e: any) => Coin.fromAmino(e)) : [] - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - if (message.denomCreationFee) { - obj.denom_creation_fee = message.denomCreationFee.map(e => e ? Coin.toAmino(e) : undefined); - } else { - obj.denom_creation_fee = []; - } - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/tokenfactory/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 8cde7d86..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryParamsRequest, QueryParamsResponse, QueryDenomAuthorityMetadataRequest, QueryDenomAuthorityMetadataResponse, QueryDenomsFromCreatorRequest, QueryDenomsFromCreatorResponse } from "./query"; -/** Query defines the gRPC querier service. */ -export interface Query { - /** - * Params defines a gRPC query method that returns the tokenfactory module's - * parameters. - */ - params(request?: QueryParamsRequest): Promise; - /** - * DenomAuthorityMetadata defines a gRPC query method for fetching - * DenomAuthorityMetadata for a particular denom. - */ - denomAuthorityMetadata(request: QueryDenomAuthorityMetadataRequest): Promise; - /** - * DenomsFromCreator defines a gRPC query method for fetching all - * denominations created by a specific admin/creator. - */ - denomsFromCreator(request: QueryDenomsFromCreatorRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.denomAuthorityMetadata = this.denomAuthorityMetadata.bind(this); - this.denomsFromCreator = this.denomsFromCreator.bind(this); - } - params(request: QueryParamsRequest = {}): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Query", "Params", data); - return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data))); - } - denomAuthorityMetadata(request: QueryDenomAuthorityMetadataRequest): Promise { - const data = QueryDenomAuthorityMetadataRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Query", "DenomAuthorityMetadata", data); - return promise.then(data => QueryDenomAuthorityMetadataResponse.decode(new BinaryReader(data))); - } - denomsFromCreator(request: QueryDenomsFromCreatorRequest): Promise { - const data = QueryDenomsFromCreatorRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Query", "DenomsFromCreator", data); - return promise.then(data => QueryDenomsFromCreatorResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: QueryParamsRequest): Promise { - return queryService.params(request); - }, - denomAuthorityMetadata(request: QueryDenomAuthorityMetadataRequest): Promise { - return queryService.denomAuthorityMetadata(request); - }, - denomsFromCreator(request: QueryDenomsFromCreatorRequest): Promise { - return queryService.denomsFromCreator(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: QueryParamsRequest; -} -export interface UseDenomAuthorityMetadataQuery extends ReactQueryParams { - request: QueryDenomAuthorityMetadataRequest; -} -export interface UseDenomsFromCreatorQuery extends ReactQueryParams { - request: QueryDenomsFromCreatorRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useDenomAuthorityMetadata = ({ - request, - options - }: UseDenomAuthorityMetadataQuery) => { - return useQuery(["denomAuthorityMetadataQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomAuthorityMetadata(request); - }, options); - }; - const useDenomsFromCreator = ({ - request, - options - }: UseDenomsFromCreatorQuery) => { - return useQuery(["denomsFromCreatorQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomsFromCreator(request); - }, options); - }; - return { - /** - * Params defines a gRPC query method that returns the tokenfactory module's - * parameters. - */ - useParams, - /** - * DenomAuthorityMetadata defines a gRPC query method for fetching - * DenomAuthorityMetadata for a particular denom. - */ - useDenomAuthorityMetadata, - /** - * DenomsFromCreator defines a gRPC query method for fetching all - * denominations created by a specific admin/creator. - */ - useDenomsFromCreator - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: QueryParamsRequest) { - return this.store.getData(request); - } - } - class QueryDenomAuthorityMetadataStore { - store = new QueryStore(queryService?.denomAuthorityMetadata); - denomAuthorityMetadata(request: QueryDenomAuthorityMetadataRequest) { - return this.store.getData(request); - } - } - class QueryDenomsFromCreatorStore { - store = new QueryStore(queryService?.denomsFromCreator); - denomsFromCreator(request: QueryDenomsFromCreatorRequest) { - return this.store.getData(request); - } - } - return { - /** - * Params defines a gRPC query method that returns the tokenfactory module's - * parameters. - */ - QueryParamsStore, - /** - * DenomAuthorityMetadata defines a gRPC query method for fetching - * DenomAuthorityMetadata for a particular denom. - */ - QueryDenomAuthorityMetadataStore, - /** - * DenomsFromCreator defines a gRPC query method for fetching all - * denominations created by a specific admin/creator. - */ - QueryDenomsFromCreatorStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/query.ts deleted file mode 100644 index 886754e2..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/query.ts +++ /dev/null @@ -1,678 +0,0 @@ -import { Params, ParamsAmino, ParamsSDKType } from "./params"; -import { DenomAuthorityMetadata, DenomAuthorityMetadataAmino, DenomAuthorityMetadataSDKType } from "./authorityMetadata"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} -export interface QueryParamsRequestProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryParamsRequest"; - value: Uint8Array; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestAmino {} -export interface QueryParamsRequestAminoMsg { - type: "osmosis/tokenfactory/query-params-request"; - value: QueryParamsRequestAmino; -} -/** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequestSDKType {} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponse { - /** params defines the parameters of the module. */ - params: Params | undefined; -} -export interface QueryParamsResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryParamsResponse"; - value: Uint8Array; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseAmino { - /** params defines the parameters of the module. */ - params?: ParamsAmino | undefined; -} -export interface QueryParamsResponseAminoMsg { - type: "osmosis/tokenfactory/query-params-response"; - value: QueryParamsResponseAmino; -} -/** QueryParamsResponse is the response type for the Query/Params RPC method. */ -export interface QueryParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -/** - * QueryDenomAuthorityMetadataRequest defines the request structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataRequest { - denom: string; -} -export interface QueryDenomAuthorityMetadataRequestProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest"; - value: Uint8Array; -} -/** - * QueryDenomAuthorityMetadataRequest defines the request structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataRequestAmino { - denom: string; -} -export interface QueryDenomAuthorityMetadataRequestAminoMsg { - type: "osmosis/tokenfactory/query-denom-authority-metadata-request"; - value: QueryDenomAuthorityMetadataRequestAmino; -} -/** - * QueryDenomAuthorityMetadataRequest defines the request structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataRequestSDKType { - denom: string; -} -/** - * QueryDenomAuthorityMetadataResponse defines the response structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataResponse { - authorityMetadata: DenomAuthorityMetadata | undefined; -} -export interface QueryDenomAuthorityMetadataResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse"; - value: Uint8Array; -} -/** - * QueryDenomAuthorityMetadataResponse defines the response structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataResponseAmino { - authority_metadata?: DenomAuthorityMetadataAmino | undefined; -} -export interface QueryDenomAuthorityMetadataResponseAminoMsg { - type: "osmosis/tokenfactory/query-denom-authority-metadata-response"; - value: QueryDenomAuthorityMetadataResponseAmino; -} -/** - * QueryDenomAuthorityMetadataResponse defines the response structure for the - * DenomAuthorityMetadata gRPC query. - */ -export interface QueryDenomAuthorityMetadataResponseSDKType { - authority_metadata: DenomAuthorityMetadataSDKType | undefined; -} -/** - * QueryDenomsFromCreatorRequest defines the request structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorRequest { - creator: string; -} -export interface QueryDenomsFromCreatorRequestProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest"; - value: Uint8Array; -} -/** - * QueryDenomsFromCreatorRequest defines the request structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorRequestAmino { - creator: string; -} -export interface QueryDenomsFromCreatorRequestAminoMsg { - type: "osmosis/tokenfactory/query-denoms-from-creator-request"; - value: QueryDenomsFromCreatorRequestAmino; -} -/** - * QueryDenomsFromCreatorRequest defines the request structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorRequestSDKType { - creator: string; -} -/** - * QueryDenomsFromCreatorRequest defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorResponse { - denoms: string[]; -} -export interface QueryDenomsFromCreatorResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse"; - value: Uint8Array; -} -/** - * QueryDenomsFromCreatorRequest defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorResponseAmino { - denoms: string[]; -} -export interface QueryDenomsFromCreatorResponseAminoMsg { - type: "osmosis/tokenfactory/query-denoms-from-creator-response"; - value: QueryDenomsFromCreatorResponseAmino; -} -/** - * QueryDenomsFromCreatorRequest defines the response structure for the - * DenomsFromCreator gRPC query. - */ -export interface QueryDenomsFromCreatorResponseSDKType { - denoms: string[]; -} -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} -export const QueryParamsRequest = { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryParamsRequest", - aminoType: "osmosis/tokenfactory/query-params-request", - encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, - fromSDK(_: QueryParamsRequestSDKType): QueryParamsRequest { - return {}; - }, - toSDK(_: QueryParamsRequest): QueryParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { - return {}; - }, - toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { - return QueryParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { - return { - type: "osmosis/tokenfactory/query-params-request", - value: QueryParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { - return QueryParamsRequest.decode(message.value); - }, - toProto(message: QueryParamsRequest): Uint8Array { - return QueryParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryParamsRequest", - value: QueryParamsRequest.encode(message).finish() - }; - } -}; -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const QueryParamsResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryParamsResponse", - aminoType: "osmosis/tokenfactory/query-params-response", - encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: QueryParamsResponseSDKType): QueryParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: QueryParamsResponse): QueryParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { - return QueryParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { - return { - type: "osmosis/tokenfactory/query-params-response", - value: QueryParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { - return QueryParamsResponse.decode(message.value); - }, - toProto(message: QueryParamsResponse): Uint8Array { - return QueryParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryParamsResponse", - value: QueryParamsResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomAuthorityMetadataRequest(): QueryDenomAuthorityMetadataRequest { - return { - denom: "" - }; -} -export const QueryDenomAuthorityMetadataRequest = { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest", - aminoType: "osmosis/tokenfactory/query-denom-authority-metadata-request", - encode(message: QueryDenomAuthorityMetadataRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomAuthorityMetadataRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomAuthorityMetadataRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomAuthorityMetadataRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QueryDenomAuthorityMetadataRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomAuthorityMetadataRequest { - const message = createBaseQueryDenomAuthorityMetadataRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QueryDenomAuthorityMetadataRequestSDKType): QueryDenomAuthorityMetadataRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: QueryDenomAuthorityMetadataRequest): QueryDenomAuthorityMetadataRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QueryDenomAuthorityMetadataRequestAmino): QueryDenomAuthorityMetadataRequest { - return { - denom: object.denom - }; - }, - toAmino(message: QueryDenomAuthorityMetadataRequest): QueryDenomAuthorityMetadataRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QueryDenomAuthorityMetadataRequestAminoMsg): QueryDenomAuthorityMetadataRequest { - return QueryDenomAuthorityMetadataRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomAuthorityMetadataRequest): QueryDenomAuthorityMetadataRequestAminoMsg { - return { - type: "osmosis/tokenfactory/query-denom-authority-metadata-request", - value: QueryDenomAuthorityMetadataRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomAuthorityMetadataRequestProtoMsg): QueryDenomAuthorityMetadataRequest { - return QueryDenomAuthorityMetadataRequest.decode(message.value); - }, - toProto(message: QueryDenomAuthorityMetadataRequest): Uint8Array { - return QueryDenomAuthorityMetadataRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomAuthorityMetadataRequest): QueryDenomAuthorityMetadataRequestProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest", - value: QueryDenomAuthorityMetadataRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomAuthorityMetadataResponse(): QueryDenomAuthorityMetadataResponse { - return { - authorityMetadata: DenomAuthorityMetadata.fromPartial({}) - }; -} -export const QueryDenomAuthorityMetadataResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse", - aminoType: "osmosis/tokenfactory/query-denom-authority-metadata-response", - encode(message: QueryDenomAuthorityMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.authorityMetadata !== undefined) { - DenomAuthorityMetadata.encode(message.authorityMetadata, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomAuthorityMetadataResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomAuthorityMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorityMetadata = DenomAuthorityMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomAuthorityMetadataResponse { - return { - authorityMetadata: isSet(object.authorityMetadata) ? DenomAuthorityMetadata.fromJSON(object.authorityMetadata) : undefined - }; - }, - toJSON(message: QueryDenomAuthorityMetadataResponse): unknown { - const obj: any = {}; - message.authorityMetadata !== undefined && (obj.authorityMetadata = message.authorityMetadata ? DenomAuthorityMetadata.toJSON(message.authorityMetadata) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomAuthorityMetadataResponse { - const message = createBaseQueryDenomAuthorityMetadataResponse(); - message.authorityMetadata = object.authorityMetadata !== undefined && object.authorityMetadata !== null ? DenomAuthorityMetadata.fromPartial(object.authorityMetadata) : undefined; - return message; - }, - fromSDK(object: QueryDenomAuthorityMetadataResponseSDKType): QueryDenomAuthorityMetadataResponse { - return { - authorityMetadata: object.authority_metadata ? DenomAuthorityMetadata.fromSDK(object.authority_metadata) : undefined - }; - }, - toSDK(message: QueryDenomAuthorityMetadataResponse): QueryDenomAuthorityMetadataResponseSDKType { - const obj: any = {}; - message.authorityMetadata !== undefined && (obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toSDK(message.authorityMetadata) : undefined); - return obj; - }, - fromAmino(object: QueryDenomAuthorityMetadataResponseAmino): QueryDenomAuthorityMetadataResponse { - return { - authorityMetadata: object?.authority_metadata ? DenomAuthorityMetadata.fromAmino(object.authority_metadata) : undefined - }; - }, - toAmino(message: QueryDenomAuthorityMetadataResponse): QueryDenomAuthorityMetadataResponseAmino { - const obj: any = {}; - obj.authority_metadata = message.authorityMetadata ? DenomAuthorityMetadata.toAmino(message.authorityMetadata) : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomAuthorityMetadataResponseAminoMsg): QueryDenomAuthorityMetadataResponse { - return QueryDenomAuthorityMetadataResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomAuthorityMetadataResponse): QueryDenomAuthorityMetadataResponseAminoMsg { - return { - type: "osmosis/tokenfactory/query-denom-authority-metadata-response", - value: QueryDenomAuthorityMetadataResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomAuthorityMetadataResponseProtoMsg): QueryDenomAuthorityMetadataResponse { - return QueryDenomAuthorityMetadataResponse.decode(message.value); - }, - toProto(message: QueryDenomAuthorityMetadataResponse): Uint8Array { - return QueryDenomAuthorityMetadataResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomAuthorityMetadataResponse): QueryDenomAuthorityMetadataResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse", - value: QueryDenomAuthorityMetadataResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomsFromCreatorRequest(): QueryDenomsFromCreatorRequest { - return { - creator: "" - }; -} -export const QueryDenomsFromCreatorRequest = { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest", - aminoType: "osmosis/tokenfactory/query-denoms-from-creator-request", - encode(message: QueryDenomsFromCreatorRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomsFromCreatorRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomsFromCreatorRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomsFromCreatorRequest { - return { - creator: isSet(object.creator) ? String(object.creator) : "" - }; - }, - toJSON(message: QueryDenomsFromCreatorRequest): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomsFromCreatorRequest { - const message = createBaseQueryDenomsFromCreatorRequest(); - message.creator = object.creator ?? ""; - return message; - }, - fromSDK(object: QueryDenomsFromCreatorRequestSDKType): QueryDenomsFromCreatorRequest { - return { - creator: object?.creator - }; - }, - toSDK(message: QueryDenomsFromCreatorRequest): QueryDenomsFromCreatorRequestSDKType { - const obj: any = {}; - obj.creator = message.creator; - return obj; - }, - fromAmino(object: QueryDenomsFromCreatorRequestAmino): QueryDenomsFromCreatorRequest { - return { - creator: object.creator - }; - }, - toAmino(message: QueryDenomsFromCreatorRequest): QueryDenomsFromCreatorRequestAmino { - const obj: any = {}; - obj.creator = message.creator; - return obj; - }, - fromAminoMsg(object: QueryDenomsFromCreatorRequestAminoMsg): QueryDenomsFromCreatorRequest { - return QueryDenomsFromCreatorRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomsFromCreatorRequest): QueryDenomsFromCreatorRequestAminoMsg { - return { - type: "osmosis/tokenfactory/query-denoms-from-creator-request", - value: QueryDenomsFromCreatorRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomsFromCreatorRequestProtoMsg): QueryDenomsFromCreatorRequest { - return QueryDenomsFromCreatorRequest.decode(message.value); - }, - toProto(message: QueryDenomsFromCreatorRequest): Uint8Array { - return QueryDenomsFromCreatorRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomsFromCreatorRequest): QueryDenomsFromCreatorRequestProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest", - value: QueryDenomsFromCreatorRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomsFromCreatorResponse(): QueryDenomsFromCreatorResponse { - return { - denoms: [] - }; -} -export const QueryDenomsFromCreatorResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse", - aminoType: "osmosis/tokenfactory/query-denoms-from-creator-response", - encode(message: QueryDenomsFromCreatorResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.denoms) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomsFromCreatorResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomsFromCreatorResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denoms.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomsFromCreatorResponse { - return { - denoms: Array.isArray(object?.denoms) ? object.denoms.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: QueryDenomsFromCreatorResponse): unknown { - const obj: any = {}; - if (message.denoms) { - obj.denoms = message.denoms.map(e => e); - } else { - obj.denoms = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomsFromCreatorResponse { - const message = createBaseQueryDenomsFromCreatorResponse(); - message.denoms = object.denoms?.map(e => e) || []; - return message; - }, - fromSDK(object: QueryDenomsFromCreatorResponseSDKType): QueryDenomsFromCreatorResponse { - return { - denoms: Array.isArray(object?.denoms) ? object.denoms.map((e: any) => e) : [] - }; - }, - toSDK(message: QueryDenomsFromCreatorResponse): QueryDenomsFromCreatorResponseSDKType { - const obj: any = {}; - if (message.denoms) { - obj.denoms = message.denoms.map(e => e); - } else { - obj.denoms = []; - } - return obj; - }, - fromAmino(object: QueryDenomsFromCreatorResponseAmino): QueryDenomsFromCreatorResponse { - return { - denoms: Array.isArray(object?.denoms) ? object.denoms.map((e: any) => e) : [] - }; - }, - toAmino(message: QueryDenomsFromCreatorResponse): QueryDenomsFromCreatorResponseAmino { - const obj: any = {}; - if (message.denoms) { - obj.denoms = message.denoms.map(e => e); - } else { - obj.denoms = []; - } - return obj; - }, - fromAminoMsg(object: QueryDenomsFromCreatorResponseAminoMsg): QueryDenomsFromCreatorResponse { - return QueryDenomsFromCreatorResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomsFromCreatorResponse): QueryDenomsFromCreatorResponseAminoMsg { - return { - type: "osmosis/tokenfactory/query-denoms-from-creator-response", - value: QueryDenomsFromCreatorResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomsFromCreatorResponseProtoMsg): QueryDenomsFromCreatorResponse { - return QueryDenomsFromCreatorResponse.decode(message.value); - }, - toProto(message: QueryDenomsFromCreatorResponse): Uint8Array { - return QueryDenomsFromCreatorResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomsFromCreatorResponse): QueryDenomsFromCreatorResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse", - value: QueryDenomsFromCreatorResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.amino.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.amino.ts deleted file mode 100644 index 4f023717..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.amino.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { MsgCreateDenom, MsgMint, MsgBurn, MsgChangeAdmin, MsgSetDenomMetadata } from "./tx"; -export const AminoConverter = { - "/osmosis.tokenfactory.v1beta1.MsgCreateDenom": { - aminoType: "osmosis/tokenfactory/create-denom", - toAmino: MsgCreateDenom.toAmino, - fromAmino: MsgCreateDenom.fromAmino - }, - "/osmosis.tokenfactory.v1beta1.MsgMint": { - aminoType: "osmosis/tokenfactory/mint", - toAmino: MsgMint.toAmino, - fromAmino: MsgMint.fromAmino - }, - "/osmosis.tokenfactory.v1beta1.MsgBurn": { - aminoType: "osmosis/tokenfactory/burn", - toAmino: MsgBurn.toAmino, - fromAmino: MsgBurn.fromAmino - }, - "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin": { - aminoType: "osmosis/tokenfactory/change-admin", - toAmino: MsgChangeAdmin.toAmino, - fromAmino: MsgChangeAdmin.fromAmino - }, - "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata": { - aminoType: "osmosis/tokenfactory/set-denom-metadata", - toAmino: MsgSetDenomMetadata.toAmino, - fromAmino: MsgSetDenomMetadata.fromAmino - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.registry.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.registry.ts deleted file mode 100644 index 71dc01f6..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.registry.ts +++ /dev/null @@ -1,171 +0,0 @@ -//@ts-nocheck -import { GeneratedType, Registry } from "@cosmjs/proto-signing"; -import { MsgCreateDenom, MsgMint, MsgBurn, MsgChangeAdmin, MsgSetDenomMetadata } from "./tx"; -export const registry: ReadonlyArray<[string, GeneratedType]> = [["/osmosis.tokenfactory.v1beta1.MsgCreateDenom", MsgCreateDenom], ["/osmosis.tokenfactory.v1beta1.MsgMint", MsgMint], ["/osmosis.tokenfactory.v1beta1.MsgBurn", MsgBurn], ["/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", MsgChangeAdmin], ["/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", MsgSetDenomMetadata]]; -export const load = (protoRegistry: Registry) => { - registry.forEach(([typeUrl, mod]) => { - protoRegistry.register(typeUrl, mod); - }); -}; -export const MessageComposer = { - encoded: { - createDenom(value: MsgCreateDenom) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - value: MsgCreateDenom.encode(value).finish() - }; - }, - mint(value: MsgMint) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - value: MsgMint.encode(value).finish() - }; - }, - burn(value: MsgBurn) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - value: MsgBurn.encode(value).finish() - }; - }, - changeAdmin(value: MsgChangeAdmin) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - value: MsgChangeAdmin.encode(value).finish() - }; - }, - setDenomMetadata(value: MsgSetDenomMetadata) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - value: MsgSetDenomMetadata.encode(value).finish() - }; - } - }, - withTypeUrl: { - createDenom(value: MsgCreateDenom) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - value - }; - }, - mint(value: MsgMint) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - value - }; - }, - burn(value: MsgBurn) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - value - }; - }, - changeAdmin(value: MsgChangeAdmin) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - value - }; - }, - setDenomMetadata(value: MsgSetDenomMetadata) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - value - }; - } - }, - toJSON: { - createDenom(value: MsgCreateDenom) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - value: MsgCreateDenom.toJSON(value) - }; - }, - mint(value: MsgMint) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - value: MsgMint.toJSON(value) - }; - }, - burn(value: MsgBurn) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - value: MsgBurn.toJSON(value) - }; - }, - changeAdmin(value: MsgChangeAdmin) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - value: MsgChangeAdmin.toJSON(value) - }; - }, - setDenomMetadata(value: MsgSetDenomMetadata) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - value: MsgSetDenomMetadata.toJSON(value) - }; - } - }, - fromJSON: { - createDenom(value: any) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - value: MsgCreateDenom.fromJSON(value) - }; - }, - mint(value: any) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - value: MsgMint.fromJSON(value) - }; - }, - burn(value: any) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - value: MsgBurn.fromJSON(value) - }; - }, - changeAdmin(value: any) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - value: MsgChangeAdmin.fromJSON(value) - }; - }, - setDenomMetadata(value: any) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - value: MsgSetDenomMetadata.fromJSON(value) - }; - } - }, - fromPartial: { - createDenom(value: MsgCreateDenom) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - value: MsgCreateDenom.fromPartial(value) - }; - }, - mint(value: MsgMint) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - value: MsgMint.fromPartial(value) - }; - }, - burn(value: MsgBurn) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - value: MsgBurn.fromPartial(value) - }; - }, - changeAdmin(value: MsgChangeAdmin) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - value: MsgChangeAdmin.fromPartial(value) - }; - }, - setDenomMetadata(value: MsgSetDenomMetadata) { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - value: MsgSetDenomMetadata.fromPartial(value) - }; - } - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.rpc.msg.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.rpc.msg.ts deleted file mode 100644 index d33cf41e..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.rpc.msg.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { MsgCreateDenom, MsgCreateDenomResponse, MsgMint, MsgMintResponse, MsgBurn, MsgBurnResponse, MsgChangeAdmin, MsgChangeAdminResponse, MsgSetDenomMetadata, MsgSetDenomMetadataResponse } from "./tx"; -/** Msg defines the tokefactory module's gRPC message service. */ -export interface Msg { - createDenom(request: MsgCreateDenom): Promise; - mint(request: MsgMint): Promise; - burn(request: MsgBurn): Promise; - changeAdmin(request: MsgChangeAdmin): Promise; - setDenomMetadata(request: MsgSetDenomMetadata): Promise; -} -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.createDenom = this.createDenom.bind(this); - this.mint = this.mint.bind(this); - this.burn = this.burn.bind(this); - this.changeAdmin = this.changeAdmin.bind(this); - this.setDenomMetadata = this.setDenomMetadata.bind(this); - } - createDenom(request: MsgCreateDenom): Promise { - const data = MsgCreateDenom.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Msg", "CreateDenom", data); - return promise.then(data => MsgCreateDenomResponse.decode(new BinaryReader(data))); - } - mint(request: MsgMint): Promise { - const data = MsgMint.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Msg", "Mint", data); - return promise.then(data => MsgMintResponse.decode(new BinaryReader(data))); - } - burn(request: MsgBurn): Promise { - const data = MsgBurn.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Msg", "Burn", data); - return promise.then(data => MsgBurnResponse.decode(new BinaryReader(data))); - } - changeAdmin(request: MsgChangeAdmin): Promise { - const data = MsgChangeAdmin.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Msg", "ChangeAdmin", data); - return promise.then(data => MsgChangeAdminResponse.decode(new BinaryReader(data))); - } - setDenomMetadata(request: MsgSetDenomMetadata): Promise { - const data = MsgSetDenomMetadata.encode(request).finish(); - const promise = this.rpc.request("osmosis.tokenfactory.v1beta1.Msg", "SetDenomMetadata", data); - return promise.then(data => MsgSetDenomMetadataResponse.decode(new BinaryReader(data))); - } -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.ts b/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.ts deleted file mode 100644 index 35d0472c..00000000 --- a/examples/interchainjs/src/codegen/osmosis/tokenfactory/v1beta1/tx.ts +++ /dev/null @@ -1,1179 +0,0 @@ -import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; -import { Metadata, MetadataAmino, MetadataSDKType } from "../../../cosmos/bank/v1beta1/bank"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * MsgCreateDenom defines the message structure for the CreateDenom gRPC service - * method. It allows an account to create a new denom. It requires a sender - * address and a sub denomination. The (sender_address, sub_denomination) tuple - * must be unique and cannot be re-used. - * - * The resulting denom created is defined as - * . The resulting denom's admin is - * originally set to be the creator, but this can be changed later. The token - * denom does not indicate the current admin. - */ -export interface MsgCreateDenom { - sender: string; - /** subdenom can be up to 44 "alphanumeric" characters long. */ - subdenom: string; -} -export interface MsgCreateDenomProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom"; - value: Uint8Array; -} -/** - * MsgCreateDenom defines the message structure for the CreateDenom gRPC service - * method. It allows an account to create a new denom. It requires a sender - * address and a sub denomination. The (sender_address, sub_denomination) tuple - * must be unique and cannot be re-used. - * - * The resulting denom created is defined as - * . The resulting denom's admin is - * originally set to be the creator, but this can be changed later. The token - * denom does not indicate the current admin. - */ -export interface MsgCreateDenomAmino { - sender: string; - /** subdenom can be up to 44 "alphanumeric" characters long. */ - subdenom: string; -} -export interface MsgCreateDenomAminoMsg { - type: "osmosis/tokenfactory/create-denom"; - value: MsgCreateDenomAmino; -} -/** - * MsgCreateDenom defines the message structure for the CreateDenom gRPC service - * method. It allows an account to create a new denom. It requires a sender - * address and a sub denomination. The (sender_address, sub_denomination) tuple - * must be unique and cannot be re-used. - * - * The resulting denom created is defined as - * . The resulting denom's admin is - * originally set to be the creator, but this can be changed later. The token - * denom does not indicate the current admin. - */ -export interface MsgCreateDenomSDKType { - sender: string; - subdenom: string; -} -/** - * MsgCreateDenomResponse is the return value of MsgCreateDenom - * It returns the full string of the newly created denom - */ -export interface MsgCreateDenomResponse { - newTokenDenom: string; -} -export interface MsgCreateDenomResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse"; - value: Uint8Array; -} -/** - * MsgCreateDenomResponse is the return value of MsgCreateDenom - * It returns the full string of the newly created denom - */ -export interface MsgCreateDenomResponseAmino { - new_token_denom: string; -} -export interface MsgCreateDenomResponseAminoMsg { - type: "osmosis/tokenfactory/create-denom-response"; - value: MsgCreateDenomResponseAmino; -} -/** - * MsgCreateDenomResponse is the return value of MsgCreateDenom - * It returns the full string of the newly created denom - */ -export interface MsgCreateDenomResponseSDKType { - new_token_denom: string; -} -/** - * MsgMint is the sdk.Msg type for allowing an admin account to mint - * more of a token. For now, we only support minting to the sender account - */ -export interface MsgMint { - sender: string; - amount: Coin | undefined; -} -export interface MsgMintProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint"; - value: Uint8Array; -} -/** - * MsgMint is the sdk.Msg type for allowing an admin account to mint - * more of a token. For now, we only support minting to the sender account - */ -export interface MsgMintAmino { - sender: string; - amount?: CoinAmino | undefined; -} -export interface MsgMintAminoMsg { - type: "osmosis/tokenfactory/mint"; - value: MsgMintAmino; -} -/** - * MsgMint is the sdk.Msg type for allowing an admin account to mint - * more of a token. For now, we only support minting to the sender account - */ -export interface MsgMintSDKType { - sender: string; - amount: CoinSDKType | undefined; -} -export interface MsgMintResponse {} -export interface MsgMintResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMintResponse"; - value: Uint8Array; -} -export interface MsgMintResponseAmino {} -export interface MsgMintResponseAminoMsg { - type: "osmosis/tokenfactory/mint-response"; - value: MsgMintResponseAmino; -} -export interface MsgMintResponseSDKType {} -/** - * MsgBurn is the sdk.Msg type for allowing an admin account to burn - * a token. For now, we only support burning from the sender account. - */ -export interface MsgBurn { - sender: string; - amount: Coin | undefined; -} -export interface MsgBurnProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn"; - value: Uint8Array; -} -/** - * MsgBurn is the sdk.Msg type for allowing an admin account to burn - * a token. For now, we only support burning from the sender account. - */ -export interface MsgBurnAmino { - sender: string; - amount?: CoinAmino | undefined; -} -export interface MsgBurnAminoMsg { - type: "osmosis/tokenfactory/burn"; - value: MsgBurnAmino; -} -/** - * MsgBurn is the sdk.Msg type for allowing an admin account to burn - * a token. For now, we only support burning from the sender account. - */ -export interface MsgBurnSDKType { - sender: string; - amount: CoinSDKType | undefined; -} -export interface MsgBurnResponse {} -export interface MsgBurnResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurnResponse"; - value: Uint8Array; -} -export interface MsgBurnResponseAmino {} -export interface MsgBurnResponseAminoMsg { - type: "osmosis/tokenfactory/burn-response"; - value: MsgBurnResponseAmino; -} -export interface MsgBurnResponseSDKType {} -/** - * MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign - * adminship of a denom to a new account - */ -export interface MsgChangeAdmin { - sender: string; - denom: string; - newAdmin: string; -} -export interface MsgChangeAdminProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin"; - value: Uint8Array; -} -/** - * MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign - * adminship of a denom to a new account - */ -export interface MsgChangeAdminAmino { - sender: string; - denom: string; - new_admin: string; -} -export interface MsgChangeAdminAminoMsg { - type: "osmosis/tokenfactory/change-admin"; - value: MsgChangeAdminAmino; -} -/** - * MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign - * adminship of a denom to a new account - */ -export interface MsgChangeAdminSDKType { - sender: string; - denom: string; - new_admin: string; -} -/** - * MsgChangeAdminResponse defines the response structure for an executed - * MsgChangeAdmin message. - */ -export interface MsgChangeAdminResponse {} -export interface MsgChangeAdminResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse"; - value: Uint8Array; -} -/** - * MsgChangeAdminResponse defines the response structure for an executed - * MsgChangeAdmin message. - */ -export interface MsgChangeAdminResponseAmino {} -export interface MsgChangeAdminResponseAminoMsg { - type: "osmosis/tokenfactory/change-admin-response"; - value: MsgChangeAdminResponseAmino; -} -/** - * MsgChangeAdminResponse defines the response structure for an executed - * MsgChangeAdmin message. - */ -export interface MsgChangeAdminResponseSDKType {} -/** - * MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set - * the denom's bank metadata - */ -export interface MsgSetDenomMetadata { - sender: string; - metadata: Metadata | undefined; -} -export interface MsgSetDenomMetadataProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata"; - value: Uint8Array; -} -/** - * MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set - * the denom's bank metadata - */ -export interface MsgSetDenomMetadataAmino { - sender: string; - metadata?: MetadataAmino | undefined; -} -export interface MsgSetDenomMetadataAminoMsg { - type: "osmosis/tokenfactory/set-denom-metadata"; - value: MsgSetDenomMetadataAmino; -} -/** - * MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set - * the denom's bank metadata - */ -export interface MsgSetDenomMetadataSDKType { - sender: string; - metadata: MetadataSDKType | undefined; -} -/** - * MsgSetDenomMetadataResponse defines the response structure for an executed - * MsgSetDenomMetadata message. - */ -export interface MsgSetDenomMetadataResponse {} -export interface MsgSetDenomMetadataResponseProtoMsg { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse"; - value: Uint8Array; -} -/** - * MsgSetDenomMetadataResponse defines the response structure for an executed - * MsgSetDenomMetadata message. - */ -export interface MsgSetDenomMetadataResponseAmino {} -export interface MsgSetDenomMetadataResponseAminoMsg { - type: "osmosis/tokenfactory/set-denom-metadata-response"; - value: MsgSetDenomMetadataResponseAmino; -} -/** - * MsgSetDenomMetadataResponse defines the response structure for an executed - * MsgSetDenomMetadata message. - */ -export interface MsgSetDenomMetadataResponseSDKType {} -function createBaseMsgCreateDenom(): MsgCreateDenom { - return { - sender: "", - subdenom: "" - }; -} -export const MsgCreateDenom = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - aminoType: "osmosis/tokenfactory/create-denom", - encode(message: MsgCreateDenom, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.subdenom !== "") { - writer.uint32(18).string(message.subdenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateDenom { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateDenom(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.subdenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateDenom { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - subdenom: isSet(object.subdenom) ? String(object.subdenom) : "" - }; - }, - toJSON(message: MsgCreateDenom): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.subdenom !== undefined && (obj.subdenom = message.subdenom); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateDenom { - const message = createBaseMsgCreateDenom(); - message.sender = object.sender ?? ""; - message.subdenom = object.subdenom ?? ""; - return message; - }, - fromSDK(object: MsgCreateDenomSDKType): MsgCreateDenom { - return { - sender: object?.sender, - subdenom: object?.subdenom - }; - }, - toSDK(message: MsgCreateDenom): MsgCreateDenomSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.subdenom = message.subdenom; - return obj; - }, - fromAmino(object: MsgCreateDenomAmino): MsgCreateDenom { - return { - sender: object.sender, - subdenom: object.subdenom - }; - }, - toAmino(message: MsgCreateDenom): MsgCreateDenomAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.subdenom = message.subdenom; - return obj; - }, - fromAminoMsg(object: MsgCreateDenomAminoMsg): MsgCreateDenom { - return MsgCreateDenom.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateDenom): MsgCreateDenomAminoMsg { - return { - type: "osmosis/tokenfactory/create-denom", - value: MsgCreateDenom.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateDenomProtoMsg): MsgCreateDenom { - return MsgCreateDenom.decode(message.value); - }, - toProto(message: MsgCreateDenom): Uint8Array { - return MsgCreateDenom.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateDenom): MsgCreateDenomProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", - value: MsgCreateDenom.encode(message).finish() - }; - } -}; -function createBaseMsgCreateDenomResponse(): MsgCreateDenomResponse { - return { - newTokenDenom: "" - }; -} -export const MsgCreateDenomResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse", - aminoType: "osmosis/tokenfactory/create-denom-response", - encode(message: MsgCreateDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.newTokenDenom !== "") { - writer.uint32(10).string(message.newTokenDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgCreateDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.newTokenDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgCreateDenomResponse { - return { - newTokenDenom: isSet(object.newTokenDenom) ? String(object.newTokenDenom) : "" - }; - }, - toJSON(message: MsgCreateDenomResponse): unknown { - const obj: any = {}; - message.newTokenDenom !== undefined && (obj.newTokenDenom = message.newTokenDenom); - return obj; - }, - fromPartial(object: DeepPartial): MsgCreateDenomResponse { - const message = createBaseMsgCreateDenomResponse(); - message.newTokenDenom = object.newTokenDenom ?? ""; - return message; - }, - fromSDK(object: MsgCreateDenomResponseSDKType): MsgCreateDenomResponse { - return { - newTokenDenom: object?.new_token_denom - }; - }, - toSDK(message: MsgCreateDenomResponse): MsgCreateDenomResponseSDKType { - const obj: any = {}; - obj.new_token_denom = message.newTokenDenom; - return obj; - }, - fromAmino(object: MsgCreateDenomResponseAmino): MsgCreateDenomResponse { - return { - newTokenDenom: object.new_token_denom - }; - }, - toAmino(message: MsgCreateDenomResponse): MsgCreateDenomResponseAmino { - const obj: any = {}; - obj.new_token_denom = message.newTokenDenom; - return obj; - }, - fromAminoMsg(object: MsgCreateDenomResponseAminoMsg): MsgCreateDenomResponse { - return MsgCreateDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgCreateDenomResponse): MsgCreateDenomResponseAminoMsg { - return { - type: "osmosis/tokenfactory/create-denom-response", - value: MsgCreateDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgCreateDenomResponseProtoMsg): MsgCreateDenomResponse { - return MsgCreateDenomResponse.decode(message.value); - }, - toProto(message: MsgCreateDenomResponse): Uint8Array { - return MsgCreateDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgCreateDenomResponse): MsgCreateDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse", - value: MsgCreateDenomResponse.encode(message).finish() - }; - } -}; -function createBaseMsgMint(): MsgMint { - return { - sender: "", - amount: Coin.fromPartial({}) - }; -} -export const MsgMint = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - aminoType: "osmosis/tokenfactory/mint", - encode(message: MsgMint, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMint { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMint(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgMint { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined - }; - }, - toJSON(message: MsgMint): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgMint { - const message = createBaseMsgMint(); - message.sender = object.sender ?? ""; - message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; - return message; - }, - fromSDK(object: MsgMintSDKType): MsgMint { - return { - sender: object?.sender, - amount: object.amount ? Coin.fromSDK(object.amount) : undefined - }; - }, - toSDK(message: MsgMint): MsgMintSDKType { - const obj: any = {}; - obj.sender = message.sender; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toSDK(message.amount) : undefined); - return obj; - }, - fromAmino(object: MsgMintAmino): MsgMint { - return { - sender: object.sender, - amount: object?.amount ? Coin.fromAmino(object.amount) : undefined - }; - }, - toAmino(message: MsgMint): MsgMintAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.amount = message.amount ? Coin.toAmino(message.amount) : undefined; - return obj; - }, - fromAminoMsg(object: MsgMintAminoMsg): MsgMint { - return MsgMint.fromAmino(object.value); - }, - toAminoMsg(message: MsgMint): MsgMintAminoMsg { - return { - type: "osmosis/tokenfactory/mint", - value: MsgMint.toAmino(message) - }; - }, - fromProtoMsg(message: MsgMintProtoMsg): MsgMint { - return MsgMint.decode(message.value); - }, - toProto(message: MsgMint): Uint8Array { - return MsgMint.encode(message).finish(); - }, - toProtoMsg(message: MsgMint): MsgMintProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", - value: MsgMint.encode(message).finish() - }; - } -}; -function createBaseMsgMintResponse(): MsgMintResponse { - return {}; -} -export const MsgMintResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMintResponse", - aminoType: "osmosis/tokenfactory/mint-response", - encode(_: MsgMintResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgMintResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMintResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgMintResponse { - return {}; - }, - toJSON(_: MsgMintResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgMintResponse { - const message = createBaseMsgMintResponse(); - return message; - }, - fromSDK(_: MsgMintResponseSDKType): MsgMintResponse { - return {}; - }, - toSDK(_: MsgMintResponse): MsgMintResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgMintResponseAmino): MsgMintResponse { - return {}; - }, - toAmino(_: MsgMintResponse): MsgMintResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgMintResponseAminoMsg): MsgMintResponse { - return MsgMintResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgMintResponse): MsgMintResponseAminoMsg { - return { - type: "osmosis/tokenfactory/mint-response", - value: MsgMintResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgMintResponseProtoMsg): MsgMintResponse { - return MsgMintResponse.decode(message.value); - }, - toProto(message: MsgMintResponse): Uint8Array { - return MsgMintResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgMintResponse): MsgMintResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMintResponse", - value: MsgMintResponse.encode(message).finish() - }; - } -}; -function createBaseMsgBurn(): MsgBurn { - return { - sender: "", - amount: Coin.fromPartial({}) - }; -} -export const MsgBurn = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - aminoType: "osmosis/tokenfactory/burn", - encode(message: MsgBurn, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBurn { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBurn(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgBurn { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined - }; - }, - toJSON(message: MsgBurn): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgBurn { - const message = createBaseMsgBurn(); - message.sender = object.sender ?? ""; - message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; - return message; - }, - fromSDK(object: MsgBurnSDKType): MsgBurn { - return { - sender: object?.sender, - amount: object.amount ? Coin.fromSDK(object.amount) : undefined - }; - }, - toSDK(message: MsgBurn): MsgBurnSDKType { - const obj: any = {}; - obj.sender = message.sender; - message.amount !== undefined && (obj.amount = message.amount ? Coin.toSDK(message.amount) : undefined); - return obj; - }, - fromAmino(object: MsgBurnAmino): MsgBurn { - return { - sender: object.sender, - amount: object?.amount ? Coin.fromAmino(object.amount) : undefined - }; - }, - toAmino(message: MsgBurn): MsgBurnAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.amount = message.amount ? Coin.toAmino(message.amount) : undefined; - return obj; - }, - fromAminoMsg(object: MsgBurnAminoMsg): MsgBurn { - return MsgBurn.fromAmino(object.value); - }, - toAminoMsg(message: MsgBurn): MsgBurnAminoMsg { - return { - type: "osmosis/tokenfactory/burn", - value: MsgBurn.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBurnProtoMsg): MsgBurn { - return MsgBurn.decode(message.value); - }, - toProto(message: MsgBurn): Uint8Array { - return MsgBurn.encode(message).finish(); - }, - toProtoMsg(message: MsgBurn): MsgBurnProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", - value: MsgBurn.encode(message).finish() - }; - } -}; -function createBaseMsgBurnResponse(): MsgBurnResponse { - return {}; -} -export const MsgBurnResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurnResponse", - aminoType: "osmosis/tokenfactory/burn-response", - encode(_: MsgBurnResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgBurnResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgBurnResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgBurnResponse { - return {}; - }, - toJSON(_: MsgBurnResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgBurnResponse { - const message = createBaseMsgBurnResponse(); - return message; - }, - fromSDK(_: MsgBurnResponseSDKType): MsgBurnResponse { - return {}; - }, - toSDK(_: MsgBurnResponse): MsgBurnResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgBurnResponseAmino): MsgBurnResponse { - return {}; - }, - toAmino(_: MsgBurnResponse): MsgBurnResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgBurnResponseAminoMsg): MsgBurnResponse { - return MsgBurnResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgBurnResponse): MsgBurnResponseAminoMsg { - return { - type: "osmosis/tokenfactory/burn-response", - value: MsgBurnResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgBurnResponseProtoMsg): MsgBurnResponse { - return MsgBurnResponse.decode(message.value); - }, - toProto(message: MsgBurnResponse): Uint8Array { - return MsgBurnResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgBurnResponse): MsgBurnResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurnResponse", - value: MsgBurnResponse.encode(message).finish() - }; - } -}; -function createBaseMsgChangeAdmin(): MsgChangeAdmin { - return { - sender: "", - denom: "", - newAdmin: "" - }; -} -export const MsgChangeAdmin = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - aminoType: "osmosis/tokenfactory/change-admin", - encode(message: MsgChangeAdmin, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.denom !== "") { - writer.uint32(18).string(message.denom); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChangeAdmin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChangeAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgChangeAdmin { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - denom: isSet(object.denom) ? String(object.denom) : "", - newAdmin: isSet(object.newAdmin) ? String(object.newAdmin) : "" - }; - }, - toJSON(message: MsgChangeAdmin): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.denom !== undefined && (obj.denom = message.denom); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - return obj; - }, - fromPartial(object: DeepPartial): MsgChangeAdmin { - const message = createBaseMsgChangeAdmin(); - message.sender = object.sender ?? ""; - message.denom = object.denom ?? ""; - message.newAdmin = object.newAdmin ?? ""; - return message; - }, - fromSDK(object: MsgChangeAdminSDKType): MsgChangeAdmin { - return { - sender: object?.sender, - denom: object?.denom, - newAdmin: object?.new_admin - }; - }, - toSDK(message: MsgChangeAdmin): MsgChangeAdminSDKType { - const obj: any = {}; - obj.sender = message.sender; - obj.denom = message.denom; - obj.new_admin = message.newAdmin; - return obj; - }, - fromAmino(object: MsgChangeAdminAmino): MsgChangeAdmin { - return { - sender: object.sender, - denom: object.denom, - newAdmin: object.new_admin - }; - }, - toAmino(message: MsgChangeAdmin): MsgChangeAdminAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.denom = message.denom; - obj.new_admin = message.newAdmin; - return obj; - }, - fromAminoMsg(object: MsgChangeAdminAminoMsg): MsgChangeAdmin { - return MsgChangeAdmin.fromAmino(object.value); - }, - toAminoMsg(message: MsgChangeAdmin): MsgChangeAdminAminoMsg { - return { - type: "osmosis/tokenfactory/change-admin", - value: MsgChangeAdmin.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChangeAdminProtoMsg): MsgChangeAdmin { - return MsgChangeAdmin.decode(message.value); - }, - toProto(message: MsgChangeAdmin): Uint8Array { - return MsgChangeAdmin.encode(message).finish(); - }, - toProtoMsg(message: MsgChangeAdmin): MsgChangeAdminProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", - value: MsgChangeAdmin.encode(message).finish() - }; - } -}; -function createBaseMsgChangeAdminResponse(): MsgChangeAdminResponse { - return {}; -} -export const MsgChangeAdminResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse", - aminoType: "osmosis/tokenfactory/change-admin-response", - encode(_: MsgChangeAdminResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgChangeAdminResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgChangeAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgChangeAdminResponse { - return {}; - }, - toJSON(_: MsgChangeAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgChangeAdminResponse { - const message = createBaseMsgChangeAdminResponse(); - return message; - }, - fromSDK(_: MsgChangeAdminResponseSDKType): MsgChangeAdminResponse { - return {}; - }, - toSDK(_: MsgChangeAdminResponse): MsgChangeAdminResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgChangeAdminResponseAmino): MsgChangeAdminResponse { - return {}; - }, - toAmino(_: MsgChangeAdminResponse): MsgChangeAdminResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgChangeAdminResponseAminoMsg): MsgChangeAdminResponse { - return MsgChangeAdminResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgChangeAdminResponse): MsgChangeAdminResponseAminoMsg { - return { - type: "osmosis/tokenfactory/change-admin-response", - value: MsgChangeAdminResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgChangeAdminResponseProtoMsg): MsgChangeAdminResponse { - return MsgChangeAdminResponse.decode(message.value); - }, - toProto(message: MsgChangeAdminResponse): Uint8Array { - return MsgChangeAdminResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgChangeAdminResponse): MsgChangeAdminResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse", - value: MsgChangeAdminResponse.encode(message).finish() - }; - } -}; -function createBaseMsgSetDenomMetadata(): MsgSetDenomMetadata { - return { - sender: "", - metadata: Metadata.fromPartial({}) - }; -} -export const MsgSetDenomMetadata = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - aminoType: "osmosis/tokenfactory/set-denom-metadata", - encode(message: MsgSetDenomMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSetDenomMetadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSetDenomMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.metadata = Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): MsgSetDenomMetadata { - return { - sender: isSet(object.sender) ? String(object.sender) : "", - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined - }; - }, - toJSON(message: MsgSetDenomMetadata): unknown { - const obj: any = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.metadata !== undefined && (obj.metadata = message.metadata ? Metadata.toJSON(message.metadata) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): MsgSetDenomMetadata { - const message = createBaseMsgSetDenomMetadata(); - message.sender = object.sender ?? ""; - message.metadata = object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined; - return message; - }, - fromSDK(object: MsgSetDenomMetadataSDKType): MsgSetDenomMetadata { - return { - sender: object?.sender, - metadata: object.metadata ? Metadata.fromSDK(object.metadata) : undefined - }; - }, - toSDK(message: MsgSetDenomMetadata): MsgSetDenomMetadataSDKType { - const obj: any = {}; - obj.sender = message.sender; - message.metadata !== undefined && (obj.metadata = message.metadata ? Metadata.toSDK(message.metadata) : undefined); - return obj; - }, - fromAmino(object: MsgSetDenomMetadataAmino): MsgSetDenomMetadata { - return { - sender: object.sender, - metadata: object?.metadata ? Metadata.fromAmino(object.metadata) : undefined - }; - }, - toAmino(message: MsgSetDenomMetadata): MsgSetDenomMetadataAmino { - const obj: any = {}; - obj.sender = message.sender; - obj.metadata = message.metadata ? Metadata.toAmino(message.metadata) : undefined; - return obj; - }, - fromAminoMsg(object: MsgSetDenomMetadataAminoMsg): MsgSetDenomMetadata { - return MsgSetDenomMetadata.fromAmino(object.value); - }, - toAminoMsg(message: MsgSetDenomMetadata): MsgSetDenomMetadataAminoMsg { - return { - type: "osmosis/tokenfactory/set-denom-metadata", - value: MsgSetDenomMetadata.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSetDenomMetadataProtoMsg): MsgSetDenomMetadata { - return MsgSetDenomMetadata.decode(message.value); - }, - toProto(message: MsgSetDenomMetadata): Uint8Array { - return MsgSetDenomMetadata.encode(message).finish(); - }, - toProtoMsg(message: MsgSetDenomMetadata): MsgSetDenomMetadataProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", - value: MsgSetDenomMetadata.encode(message).finish() - }; - } -}; -function createBaseMsgSetDenomMetadataResponse(): MsgSetDenomMetadataResponse { - return {}; -} -export const MsgSetDenomMetadataResponse = { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse", - aminoType: "osmosis/tokenfactory/set-denom-metadata-response", - encode(_: MsgSetDenomMetadataResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): MsgSetDenomMetadataResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSetDenomMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): MsgSetDenomMetadataResponse { - return {}; - }, - toJSON(_: MsgSetDenomMetadataResponse): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): MsgSetDenomMetadataResponse { - const message = createBaseMsgSetDenomMetadataResponse(); - return message; - }, - fromSDK(_: MsgSetDenomMetadataResponseSDKType): MsgSetDenomMetadataResponse { - return {}; - }, - toSDK(_: MsgSetDenomMetadataResponse): MsgSetDenomMetadataResponseSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: MsgSetDenomMetadataResponseAmino): MsgSetDenomMetadataResponse { - return {}; - }, - toAmino(_: MsgSetDenomMetadataResponse): MsgSetDenomMetadataResponseAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: MsgSetDenomMetadataResponseAminoMsg): MsgSetDenomMetadataResponse { - return MsgSetDenomMetadataResponse.fromAmino(object.value); - }, - toAminoMsg(message: MsgSetDenomMetadataResponse): MsgSetDenomMetadataResponseAminoMsg { - return { - type: "osmosis/tokenfactory/set-denom-metadata-response", - value: MsgSetDenomMetadataResponse.toAmino(message) - }; - }, - fromProtoMsg(message: MsgSetDenomMetadataResponseProtoMsg): MsgSetDenomMetadataResponse { - return MsgSetDenomMetadataResponse.decode(message.value); - }, - toProto(message: MsgSetDenomMetadataResponse): Uint8Array { - return MsgSetDenomMetadataResponse.encode(message).finish(); - }, - toProtoMsg(message: MsgSetDenomMetadataResponse): MsgSetDenomMetadataResponseProtoMsg { - return { - typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse", - value: MsgSetDenomMetadataResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/genesis.ts deleted file mode 100644 index 91ce15bc..00000000 --- a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/genesis.ts +++ /dev/null @@ -1,270 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration"; -import { TwapRecord, TwapRecordAmino, TwapRecordSDKType } from "./twap_record"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** Params holds parameters for the twap module */ -export interface Params { - pruneEpochIdentifier: string; - recordHistoryKeepPeriod: Duration | undefined; -} -export interface ParamsProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.Params"; - value: Uint8Array; -} -/** Params holds parameters for the twap module */ -export interface ParamsAmino { - prune_epoch_identifier: string; - record_history_keep_period?: DurationAmino | undefined; -} -export interface ParamsAminoMsg { - type: "osmosis/twap/params"; - value: ParamsAmino; -} -/** Params holds parameters for the twap module */ -export interface ParamsSDKType { - prune_epoch_identifier: string; - record_history_keep_period: DurationSDKType | undefined; -} -/** GenesisState defines the twap module's genesis state. */ -export interface GenesisState { - /** twaps is the collection of all twap records. */ - twaps: TwapRecord[]; - /** params is the container of twap parameters. */ - params: Params | undefined; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the twap module's genesis state. */ -export interface GenesisStateAmino { - /** twaps is the collection of all twap records. */ - twaps: TwapRecordAmino[]; - /** params is the container of twap parameters. */ - params?: ParamsAmino | undefined; -} -export interface GenesisStateAminoMsg { - type: "osmosis/twap/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the twap module's genesis state. */ -export interface GenesisStateSDKType { - twaps: TwapRecordSDKType[]; - params: ParamsSDKType | undefined; -} -function createBaseParams(): Params { - return { - pruneEpochIdentifier: "", - recordHistoryKeepPeriod: Duration.fromPartial({}) - }; -} -export const Params = { - typeUrl: "/osmosis.twap.v1beta1.Params", - aminoType: "osmosis/twap/params", - encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pruneEpochIdentifier !== "") { - writer.uint32(10).string(message.pruneEpochIdentifier); - } - if (message.recordHistoryKeepPeriod !== undefined) { - Duration.encode(message.recordHistoryKeepPeriod, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Params { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pruneEpochIdentifier = reader.string(); - break; - case 2: - message.recordHistoryKeepPeriod = Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Params { - return { - pruneEpochIdentifier: isSet(object.pruneEpochIdentifier) ? String(object.pruneEpochIdentifier) : "", - recordHistoryKeepPeriod: isSet(object.recordHistoryKeepPeriod) ? Duration.fromJSON(object.recordHistoryKeepPeriod) : undefined - }; - }, - toJSON(message: Params): unknown { - const obj: any = {}; - message.pruneEpochIdentifier !== undefined && (obj.pruneEpochIdentifier = message.pruneEpochIdentifier); - message.recordHistoryKeepPeriod !== undefined && (obj.recordHistoryKeepPeriod = message.recordHistoryKeepPeriod ? Duration.toJSON(message.recordHistoryKeepPeriod) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Params { - const message = createBaseParams(); - message.pruneEpochIdentifier = object.pruneEpochIdentifier ?? ""; - message.recordHistoryKeepPeriod = object.recordHistoryKeepPeriod !== undefined && object.recordHistoryKeepPeriod !== null ? Duration.fromPartial(object.recordHistoryKeepPeriod) : undefined; - return message; - }, - fromSDK(object: ParamsSDKType): Params { - return { - pruneEpochIdentifier: object?.prune_epoch_identifier, - recordHistoryKeepPeriod: object.record_history_keep_period ? Duration.fromSDK(object.record_history_keep_period) : undefined - }; - }, - toSDK(message: Params): ParamsSDKType { - const obj: any = {}; - obj.prune_epoch_identifier = message.pruneEpochIdentifier; - message.recordHistoryKeepPeriod !== undefined && (obj.record_history_keep_period = message.recordHistoryKeepPeriod ? Duration.toSDK(message.recordHistoryKeepPeriod) : undefined); - return obj; - }, - fromAmino(object: ParamsAmino): Params { - return { - pruneEpochIdentifier: object.prune_epoch_identifier, - recordHistoryKeepPeriod: object?.record_history_keep_period ? Duration.fromAmino(object.record_history_keep_period) : undefined - }; - }, - toAmino(message: Params): ParamsAmino { - const obj: any = {}; - obj.prune_epoch_identifier = message.pruneEpochIdentifier; - obj.record_history_keep_period = message.recordHistoryKeepPeriod ? Duration.toAmino(message.recordHistoryKeepPeriod) : undefined; - return obj; - }, - fromAminoMsg(object: ParamsAminoMsg): Params { - return Params.fromAmino(object.value); - }, - toAminoMsg(message: Params): ParamsAminoMsg { - return { - type: "osmosis/twap/params", - value: Params.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsProtoMsg): Params { - return Params.decode(message.value); - }, - toProto(message: Params): Uint8Array { - return Params.encode(message).finish(); - }, - toProtoMsg(message: Params): ParamsProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.Params", - value: Params.encode(message).finish() - }; - } -}; -function createBaseGenesisState(): GenesisState { - return { - twaps: [], - params: Params.fromPartial({}) - }; -} -export const GenesisState = { - typeUrl: "/osmosis.twap.v1beta1.GenesisState", - aminoType: "osmosis/twap/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.twaps) { - TwapRecord.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.twaps.push(TwapRecord.decode(reader, reader.uint32())); - break; - case 2: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - twaps: Array.isArray(object?.twaps) ? object.twaps.map((e: any) => TwapRecord.fromJSON(e)) : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.twaps) { - obj.twaps = message.twaps.map(e => e ? TwapRecord.toJSON(e) : undefined); - } else { - obj.twaps = []; - } - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.twaps = object.twaps?.map(e => TwapRecord.fromPartial(e)) || []; - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - twaps: Array.isArray(object?.twaps) ? object.twaps.map((e: any) => TwapRecord.fromSDK(e)) : [], - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - if (message.twaps) { - obj.twaps = message.twaps.map(e => e ? TwapRecord.toSDK(e) : undefined); - } else { - obj.twaps = []; - } - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - twaps: Array.isArray(object?.twaps) ? object.twaps.map((e: any) => TwapRecord.fromAmino(e)) : [], - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - if (message.twaps) { - obj.twaps = message.twaps.map(e => e ? TwapRecord.toAmino(e) : undefined); - } else { - obj.twaps = []; - } - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/twap/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/query.rpc.Query.ts deleted file mode 100644 index edc369a9..00000000 --- a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { ParamsRequest, ParamsResponse, ArithmeticTwapRequest, ArithmeticTwapResponse, ArithmeticTwapToNowRequest, ArithmeticTwapToNowResponse } from "./query"; -export interface Query { - params(request?: ParamsRequest): Promise; - arithmeticTwap(request: ArithmeticTwapRequest): Promise; - arithmeticTwapToNow(request: ArithmeticTwapToNowRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.params = this.params.bind(this); - this.arithmeticTwap = this.arithmeticTwap.bind(this); - this.arithmeticTwapToNow = this.arithmeticTwapToNow.bind(this); - } - params(request: ParamsRequest = {}): Promise { - const data = ParamsRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.twap.v1beta1.Query", "Params", data); - return promise.then(data => ParamsResponse.decode(new BinaryReader(data))); - } - arithmeticTwap(request: ArithmeticTwapRequest): Promise { - const data = ArithmeticTwapRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.twap.v1beta1.Query", "ArithmeticTwap", data); - return promise.then(data => ArithmeticTwapResponse.decode(new BinaryReader(data))); - } - arithmeticTwapToNow(request: ArithmeticTwapToNowRequest): Promise { - const data = ArithmeticTwapToNowRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.twap.v1beta1.Query", "ArithmeticTwapToNow", data); - return promise.then(data => ArithmeticTwapToNowResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - params(request?: ParamsRequest): Promise { - return queryService.params(request); - }, - arithmeticTwap(request: ArithmeticTwapRequest): Promise { - return queryService.arithmeticTwap(request); - }, - arithmeticTwapToNow(request: ArithmeticTwapToNowRequest): Promise { - return queryService.arithmeticTwapToNow(request); - } - }; -}; -export interface UseParamsQuery extends ReactQueryParams { - request?: ParamsRequest; -} -export interface UseArithmeticTwapQuery extends ReactQueryParams { - request: ArithmeticTwapRequest; -} -export interface UseArithmeticTwapToNowQuery extends ReactQueryParams { - request: ArithmeticTwapToNowRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useParams = ({ - request, - options - }: UseParamsQuery) => { - return useQuery(["paramsQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.params(request); - }, options); - }; - const useArithmeticTwap = ({ - request, - options - }: UseArithmeticTwapQuery) => { - return useQuery(["arithmeticTwapQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.arithmeticTwap(request); - }, options); - }; - const useArithmeticTwapToNow = ({ - request, - options - }: UseArithmeticTwapToNowQuery) => { - return useQuery(["arithmeticTwapToNowQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.arithmeticTwapToNow(request); - }, options); - }; - return { - useParams, - useArithmeticTwap, - useArithmeticTwapToNow - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryParamsStore { - store = new QueryStore(queryService?.params); - params(request: ParamsRequest) { - return this.store.getData(request); - } - } - class QueryArithmeticTwapStore { - store = new QueryStore(queryService?.arithmeticTwap); - arithmeticTwap(request: ArithmeticTwapRequest) { - return this.store.getData(request); - } - } - class QueryArithmeticTwapToNowStore { - store = new QueryStore(queryService?.arithmeticTwapToNow); - arithmeticTwapToNow(request: ArithmeticTwapToNowRequest) { - return this.store.getData(request); - } - } - return { - QueryParamsStore, - QueryArithmeticTwapStore, - QueryArithmeticTwapToNowStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/query.ts deleted file mode 100644 index da976c8b..00000000 --- a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/query.ts +++ /dev/null @@ -1,730 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Params, ParamsAmino, ParamsSDKType } from "./genesis"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -import { Decimal } from "@cosmjs/math"; -export interface ArithmeticTwapRequest { - poolId: bigint; - baseAsset: string; - quoteAsset: string; - startTime: Date | undefined; - endTime?: Date | undefined; -} -export interface ArithmeticTwapRequestProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapRequest"; - value: Uint8Array; -} -export interface ArithmeticTwapRequestAmino { - pool_id: string; - base_asset: string; - quote_asset: string; - start_time?: Date | undefined; - end_time?: Date | undefined; -} -export interface ArithmeticTwapRequestAminoMsg { - type: "osmosis/twap/arithmetic-twap-request"; - value: ArithmeticTwapRequestAmino; -} -export interface ArithmeticTwapRequestSDKType { - pool_id: bigint; - base_asset: string; - quote_asset: string; - start_time: Date | undefined; - end_time?: Date | undefined; -} -export interface ArithmeticTwapResponse { - arithmeticTwap: string; -} -export interface ArithmeticTwapResponseProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapResponse"; - value: Uint8Array; -} -export interface ArithmeticTwapResponseAmino { - arithmetic_twap: string; -} -export interface ArithmeticTwapResponseAminoMsg { - type: "osmosis/twap/arithmetic-twap-response"; - value: ArithmeticTwapResponseAmino; -} -export interface ArithmeticTwapResponseSDKType { - arithmetic_twap: string; -} -export interface ArithmeticTwapToNowRequest { - poolId: bigint; - baseAsset: string; - quoteAsset: string; - startTime: Date | undefined; -} -export interface ArithmeticTwapToNowRequestProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapToNowRequest"; - value: Uint8Array; -} -export interface ArithmeticTwapToNowRequestAmino { - pool_id: string; - base_asset: string; - quote_asset: string; - start_time?: Date | undefined; -} -export interface ArithmeticTwapToNowRequestAminoMsg { - type: "osmosis/twap/arithmetic-twap-to-now-request"; - value: ArithmeticTwapToNowRequestAmino; -} -export interface ArithmeticTwapToNowRequestSDKType { - pool_id: bigint; - base_asset: string; - quote_asset: string; - start_time: Date | undefined; -} -export interface ArithmeticTwapToNowResponse { - arithmeticTwap: string; -} -export interface ArithmeticTwapToNowResponseProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapToNowResponse"; - value: Uint8Array; -} -export interface ArithmeticTwapToNowResponseAmino { - arithmetic_twap: string; -} -export interface ArithmeticTwapToNowResponseAminoMsg { - type: "osmosis/twap/arithmetic-twap-to-now-response"; - value: ArithmeticTwapToNowResponseAmino; -} -export interface ArithmeticTwapToNowResponseSDKType { - arithmetic_twap: string; -} -export interface ParamsRequest {} -export interface ParamsRequestProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.ParamsRequest"; - value: Uint8Array; -} -export interface ParamsRequestAmino {} -export interface ParamsRequestAminoMsg { - type: "osmosis/twap/params-request"; - value: ParamsRequestAmino; -} -export interface ParamsRequestSDKType {} -export interface ParamsResponse { - params: Params | undefined; -} -export interface ParamsResponseProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.ParamsResponse"; - value: Uint8Array; -} -export interface ParamsResponseAmino { - params?: ParamsAmino | undefined; -} -export interface ParamsResponseAminoMsg { - type: "osmosis/twap/params-response"; - value: ParamsResponseAmino; -} -export interface ParamsResponseSDKType { - params: ParamsSDKType | undefined; -} -function createBaseArithmeticTwapRequest(): ArithmeticTwapRequest { - return { - poolId: BigInt(0), - baseAsset: "", - quoteAsset: "", - startTime: new Date(), - endTime: undefined - }; -} -export const ArithmeticTwapRequest = { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapRequest", - aminoType: "osmosis/twap/arithmetic-twap-request", - encode(message: ArithmeticTwapRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.baseAsset !== "") { - writer.uint32(18).string(message.baseAsset); - } - if (message.quoteAsset !== "") { - writer.uint32(26).string(message.quoteAsset); - } - if (message.startTime !== undefined) { - Timestamp.encode(toTimestamp(message.startTime), writer.uint32(34).fork()).ldelim(); - } - if (message.endTime !== undefined) { - Timestamp.encode(toTimestamp(message.endTime), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ArithmeticTwapRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseArithmeticTwapRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.baseAsset = reader.string(); - break; - case 3: - message.quoteAsset = reader.string(); - break; - case 4: - message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ArithmeticTwapRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - baseAsset: isSet(object.baseAsset) ? String(object.baseAsset) : "", - quoteAsset: isSet(object.quoteAsset) ? String(object.quoteAsset) : "", - startTime: isSet(object.startTime) ? new Date(object.startTime) : undefined, - endTime: isSet(object.endTime) ? new Date(object.endTime) : undefined - }; - }, - toJSON(message: ArithmeticTwapRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.baseAsset !== undefined && (obj.baseAsset = message.baseAsset); - message.quoteAsset !== undefined && (obj.quoteAsset = message.quoteAsset); - message.startTime !== undefined && (obj.startTime = message.startTime.toISOString()); - message.endTime !== undefined && (obj.endTime = message.endTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): ArithmeticTwapRequest { - const message = createBaseArithmeticTwapRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.baseAsset = object.baseAsset ?? ""; - message.quoteAsset = object.quoteAsset ?? ""; - message.startTime = object.startTime ?? undefined; - message.endTime = object.endTime ?? undefined; - return message; - }, - fromSDK(object: ArithmeticTwapRequestSDKType): ArithmeticTwapRequest { - return { - poolId: object?.pool_id, - baseAsset: object?.base_asset, - quoteAsset: object?.quote_asset, - startTime: object.start_time ?? undefined, - endTime: object.end_time ?? undefined - }; - }, - toSDK(message: ArithmeticTwapRequest): ArithmeticTwapRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.base_asset = message.baseAsset; - obj.quote_asset = message.quoteAsset; - message.startTime !== undefined && (obj.start_time = message.startTime ?? undefined); - message.endTime !== undefined && (obj.end_time = message.endTime ?? undefined); - return obj; - }, - fromAmino(object: ArithmeticTwapRequestAmino): ArithmeticTwapRequest { - return { - poolId: BigInt(object.pool_id), - baseAsset: object.base_asset, - quoteAsset: object.quote_asset, - startTime: object.start_time, - endTime: object?.end_time - }; - }, - toAmino(message: ArithmeticTwapRequest): ArithmeticTwapRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.base_asset = message.baseAsset; - obj.quote_asset = message.quoteAsset; - obj.start_time = message.startTime; - obj.end_time = message.endTime; - return obj; - }, - fromAminoMsg(object: ArithmeticTwapRequestAminoMsg): ArithmeticTwapRequest { - return ArithmeticTwapRequest.fromAmino(object.value); - }, - toAminoMsg(message: ArithmeticTwapRequest): ArithmeticTwapRequestAminoMsg { - return { - type: "osmosis/twap/arithmetic-twap-request", - value: ArithmeticTwapRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ArithmeticTwapRequestProtoMsg): ArithmeticTwapRequest { - return ArithmeticTwapRequest.decode(message.value); - }, - toProto(message: ArithmeticTwapRequest): Uint8Array { - return ArithmeticTwapRequest.encode(message).finish(); - }, - toProtoMsg(message: ArithmeticTwapRequest): ArithmeticTwapRequestProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapRequest", - value: ArithmeticTwapRequest.encode(message).finish() - }; - } -}; -function createBaseArithmeticTwapResponse(): ArithmeticTwapResponse { - return { - arithmeticTwap: "" - }; -} -export const ArithmeticTwapResponse = { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapResponse", - aminoType: "osmosis/twap/arithmetic-twap-response", - encode(message: ArithmeticTwapResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.arithmeticTwap !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.arithmeticTwap, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ArithmeticTwapResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseArithmeticTwapResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.arithmeticTwap = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ArithmeticTwapResponse { - return { - arithmeticTwap: isSet(object.arithmeticTwap) ? String(object.arithmeticTwap) : "" - }; - }, - toJSON(message: ArithmeticTwapResponse): unknown { - const obj: any = {}; - message.arithmeticTwap !== undefined && (obj.arithmeticTwap = message.arithmeticTwap); - return obj; - }, - fromPartial(object: DeepPartial): ArithmeticTwapResponse { - const message = createBaseArithmeticTwapResponse(); - message.arithmeticTwap = object.arithmeticTwap ?? ""; - return message; - }, - fromSDK(object: ArithmeticTwapResponseSDKType): ArithmeticTwapResponse { - return { - arithmeticTwap: object?.arithmetic_twap - }; - }, - toSDK(message: ArithmeticTwapResponse): ArithmeticTwapResponseSDKType { - const obj: any = {}; - obj.arithmetic_twap = message.arithmeticTwap; - return obj; - }, - fromAmino(object: ArithmeticTwapResponseAmino): ArithmeticTwapResponse { - return { - arithmeticTwap: object.arithmetic_twap - }; - }, - toAmino(message: ArithmeticTwapResponse): ArithmeticTwapResponseAmino { - const obj: any = {}; - obj.arithmetic_twap = message.arithmeticTwap; - return obj; - }, - fromAminoMsg(object: ArithmeticTwapResponseAminoMsg): ArithmeticTwapResponse { - return ArithmeticTwapResponse.fromAmino(object.value); - }, - toAminoMsg(message: ArithmeticTwapResponse): ArithmeticTwapResponseAminoMsg { - return { - type: "osmosis/twap/arithmetic-twap-response", - value: ArithmeticTwapResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ArithmeticTwapResponseProtoMsg): ArithmeticTwapResponse { - return ArithmeticTwapResponse.decode(message.value); - }, - toProto(message: ArithmeticTwapResponse): Uint8Array { - return ArithmeticTwapResponse.encode(message).finish(); - }, - toProtoMsg(message: ArithmeticTwapResponse): ArithmeticTwapResponseProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapResponse", - value: ArithmeticTwapResponse.encode(message).finish() - }; - } -}; -function createBaseArithmeticTwapToNowRequest(): ArithmeticTwapToNowRequest { - return { - poolId: BigInt(0), - baseAsset: "", - quoteAsset: "", - startTime: new Date() - }; -} -export const ArithmeticTwapToNowRequest = { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapToNowRequest", - aminoType: "osmosis/twap/arithmetic-twap-to-now-request", - encode(message: ArithmeticTwapToNowRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.baseAsset !== "") { - writer.uint32(18).string(message.baseAsset); - } - if (message.quoteAsset !== "") { - writer.uint32(26).string(message.quoteAsset); - } - if (message.startTime !== undefined) { - Timestamp.encode(toTimestamp(message.startTime), writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ArithmeticTwapToNowRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseArithmeticTwapToNowRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.baseAsset = reader.string(); - break; - case 3: - message.quoteAsset = reader.string(); - break; - case 4: - message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ArithmeticTwapToNowRequest { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - baseAsset: isSet(object.baseAsset) ? String(object.baseAsset) : "", - quoteAsset: isSet(object.quoteAsset) ? String(object.quoteAsset) : "", - startTime: isSet(object.startTime) ? new Date(object.startTime) : undefined - }; - }, - toJSON(message: ArithmeticTwapToNowRequest): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.baseAsset !== undefined && (obj.baseAsset = message.baseAsset); - message.quoteAsset !== undefined && (obj.quoteAsset = message.quoteAsset); - message.startTime !== undefined && (obj.startTime = message.startTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): ArithmeticTwapToNowRequest { - const message = createBaseArithmeticTwapToNowRequest(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.baseAsset = object.baseAsset ?? ""; - message.quoteAsset = object.quoteAsset ?? ""; - message.startTime = object.startTime ?? undefined; - return message; - }, - fromSDK(object: ArithmeticTwapToNowRequestSDKType): ArithmeticTwapToNowRequest { - return { - poolId: object?.pool_id, - baseAsset: object?.base_asset, - quoteAsset: object?.quote_asset, - startTime: object.start_time ?? undefined - }; - }, - toSDK(message: ArithmeticTwapToNowRequest): ArithmeticTwapToNowRequestSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.base_asset = message.baseAsset; - obj.quote_asset = message.quoteAsset; - message.startTime !== undefined && (obj.start_time = message.startTime ?? undefined); - return obj; - }, - fromAmino(object: ArithmeticTwapToNowRequestAmino): ArithmeticTwapToNowRequest { - return { - poolId: BigInt(object.pool_id), - baseAsset: object.base_asset, - quoteAsset: object.quote_asset, - startTime: object.start_time - }; - }, - toAmino(message: ArithmeticTwapToNowRequest): ArithmeticTwapToNowRequestAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.base_asset = message.baseAsset; - obj.quote_asset = message.quoteAsset; - obj.start_time = message.startTime; - return obj; - }, - fromAminoMsg(object: ArithmeticTwapToNowRequestAminoMsg): ArithmeticTwapToNowRequest { - return ArithmeticTwapToNowRequest.fromAmino(object.value); - }, - toAminoMsg(message: ArithmeticTwapToNowRequest): ArithmeticTwapToNowRequestAminoMsg { - return { - type: "osmosis/twap/arithmetic-twap-to-now-request", - value: ArithmeticTwapToNowRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ArithmeticTwapToNowRequestProtoMsg): ArithmeticTwapToNowRequest { - return ArithmeticTwapToNowRequest.decode(message.value); - }, - toProto(message: ArithmeticTwapToNowRequest): Uint8Array { - return ArithmeticTwapToNowRequest.encode(message).finish(); - }, - toProtoMsg(message: ArithmeticTwapToNowRequest): ArithmeticTwapToNowRequestProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapToNowRequest", - value: ArithmeticTwapToNowRequest.encode(message).finish() - }; - } -}; -function createBaseArithmeticTwapToNowResponse(): ArithmeticTwapToNowResponse { - return { - arithmeticTwap: "" - }; -} -export const ArithmeticTwapToNowResponse = { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapToNowResponse", - aminoType: "osmosis/twap/arithmetic-twap-to-now-response", - encode(message: ArithmeticTwapToNowResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.arithmeticTwap !== "") { - writer.uint32(10).string(Decimal.fromUserInput(message.arithmeticTwap, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ArithmeticTwapToNowResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseArithmeticTwapToNowResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.arithmeticTwap = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ArithmeticTwapToNowResponse { - return { - arithmeticTwap: isSet(object.arithmeticTwap) ? String(object.arithmeticTwap) : "" - }; - }, - toJSON(message: ArithmeticTwapToNowResponse): unknown { - const obj: any = {}; - message.arithmeticTwap !== undefined && (obj.arithmeticTwap = message.arithmeticTwap); - return obj; - }, - fromPartial(object: DeepPartial): ArithmeticTwapToNowResponse { - const message = createBaseArithmeticTwapToNowResponse(); - message.arithmeticTwap = object.arithmeticTwap ?? ""; - return message; - }, - fromSDK(object: ArithmeticTwapToNowResponseSDKType): ArithmeticTwapToNowResponse { - return { - arithmeticTwap: object?.arithmetic_twap - }; - }, - toSDK(message: ArithmeticTwapToNowResponse): ArithmeticTwapToNowResponseSDKType { - const obj: any = {}; - obj.arithmetic_twap = message.arithmeticTwap; - return obj; - }, - fromAmino(object: ArithmeticTwapToNowResponseAmino): ArithmeticTwapToNowResponse { - return { - arithmeticTwap: object.arithmetic_twap - }; - }, - toAmino(message: ArithmeticTwapToNowResponse): ArithmeticTwapToNowResponseAmino { - const obj: any = {}; - obj.arithmetic_twap = message.arithmeticTwap; - return obj; - }, - fromAminoMsg(object: ArithmeticTwapToNowResponseAminoMsg): ArithmeticTwapToNowResponse { - return ArithmeticTwapToNowResponse.fromAmino(object.value); - }, - toAminoMsg(message: ArithmeticTwapToNowResponse): ArithmeticTwapToNowResponseAminoMsg { - return { - type: "osmosis/twap/arithmetic-twap-to-now-response", - value: ArithmeticTwapToNowResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ArithmeticTwapToNowResponseProtoMsg): ArithmeticTwapToNowResponse { - return ArithmeticTwapToNowResponse.decode(message.value); - }, - toProto(message: ArithmeticTwapToNowResponse): Uint8Array { - return ArithmeticTwapToNowResponse.encode(message).finish(); - }, - toProtoMsg(message: ArithmeticTwapToNowResponse): ArithmeticTwapToNowResponseProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.ArithmeticTwapToNowResponse", - value: ArithmeticTwapToNowResponse.encode(message).finish() - }; - } -}; -function createBaseParamsRequest(): ParamsRequest { - return {}; -} -export const ParamsRequest = { - typeUrl: "/osmosis.twap.v1beta1.ParamsRequest", - aminoType: "osmosis/twap/params-request", - encode(_: ParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ParamsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): ParamsRequest { - return {}; - }, - toJSON(_: ParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): ParamsRequest { - const message = createBaseParamsRequest(); - return message; - }, - fromSDK(_: ParamsRequestSDKType): ParamsRequest { - return {}; - }, - toSDK(_: ParamsRequest): ParamsRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: ParamsRequestAmino): ParamsRequest { - return {}; - }, - toAmino(_: ParamsRequest): ParamsRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: ParamsRequestAminoMsg): ParamsRequest { - return ParamsRequest.fromAmino(object.value); - }, - toAminoMsg(message: ParamsRequest): ParamsRequestAminoMsg { - return { - type: "osmosis/twap/params-request", - value: ParamsRequest.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsRequestProtoMsg): ParamsRequest { - return ParamsRequest.decode(message.value); - }, - toProto(message: ParamsRequest): Uint8Array { - return ParamsRequest.encode(message).finish(); - }, - toProtoMsg(message: ParamsRequest): ParamsRequestProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.ParamsRequest", - value: ParamsRequest.encode(message).finish() - }; - } -}; -function createBaseParamsResponse(): ParamsResponse { - return { - params: Params.fromPartial({}) - }; -} -export const ParamsResponse = { - typeUrl: "/osmosis.twap.v1beta1.ParamsResponse", - aminoType: "osmosis/twap/params-response", - encode(message: ParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ParamsResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParamsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ParamsResponse { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined - }; - }, - toJSON(message: ParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ParamsResponse { - const message = createBaseParamsResponse(); - message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; - return message; - }, - fromSDK(object: ParamsResponseSDKType): ParamsResponse { - return { - params: object.params ? Params.fromSDK(object.params) : undefined - }; - }, - toSDK(message: ParamsResponse): ParamsResponseSDKType { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toSDK(message.params) : undefined); - return obj; - }, - fromAmino(object: ParamsResponseAmino): ParamsResponse { - return { - params: object?.params ? Params.fromAmino(object.params) : undefined - }; - }, - toAmino(message: ParamsResponse): ParamsResponseAmino { - const obj: any = {}; - obj.params = message.params ? Params.toAmino(message.params) : undefined; - return obj; - }, - fromAminoMsg(object: ParamsResponseAminoMsg): ParamsResponse { - return ParamsResponse.fromAmino(object.value); - }, - toAminoMsg(message: ParamsResponse): ParamsResponseAminoMsg { - return { - type: "osmosis/twap/params-response", - value: ParamsResponse.toAmino(message) - }; - }, - fromProtoMsg(message: ParamsResponseProtoMsg): ParamsResponse { - return ParamsResponse.decode(message.value); - }, - toProto(message: ParamsResponse): Uint8Array { - return ParamsResponse.encode(message).finish(); - }, - toProtoMsg(message: ParamsResponse): ParamsResponseProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.ParamsResponse", - value: ParamsResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/twap_record.ts b/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/twap_record.ts deleted file mode 100644 index da5c4dc3..00000000 --- a/examples/interchainjs/src/codegen/osmosis/twap/v1beta1/twap_record.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { toTimestamp, fromTimestamp, isSet, DeepPartial } from "../../../helpers"; -import { Decimal } from "@cosmjs/math"; -/** - * A TWAP record should be indexed in state by pool_id, (asset pair), timestamp - * The asset pair assets should be lexicographically sorted. - * Technically (pool_id, asset_0_denom, asset_1_denom, height) do not need to - * appear in the struct however we view this as the wrong performance tradeoff - * given SDK today. Would rather we optimize for readability and correctness, - * than an optimal state storage format. The system bottleneck is elsewhere for - * now. - */ -export interface TwapRecord { - poolId: bigint; - /** Lexicographically smaller denom of the pair */ - asset0Denom: string; - /** Lexicographically larger denom of the pair */ - asset1Denom: string; - /** height this record corresponds to, for debugging purposes */ - height: bigint; - /** - * This field should only exist until we have a global registry in the state - * machine, mapping prior block heights within {TIME RANGE} to times. - */ - time: Date | undefined; - /** - * We store the last spot prices in the struct, so that we can interpolate - * accumulator values for times between when accumulator records are stored. - */ - p0LastSpotPrice: string; - p1LastSpotPrice: string; - p0ArithmeticTwapAccumulator: string; - p1ArithmeticTwapAccumulator: string; - /** - * This field contains the time in which the last spot price error occured. - * It is used to alert the caller if they are getting a potentially erroneous - * TWAP, due to an unforeseen underlying error. - */ - lastErrorTime: Date | undefined; -} -export interface TwapRecordProtoMsg { - typeUrl: "/osmosis.twap.v1beta1.TwapRecord"; - value: Uint8Array; -} -/** - * A TWAP record should be indexed in state by pool_id, (asset pair), timestamp - * The asset pair assets should be lexicographically sorted. - * Technically (pool_id, asset_0_denom, asset_1_denom, height) do not need to - * appear in the struct however we view this as the wrong performance tradeoff - * given SDK today. Would rather we optimize for readability and correctness, - * than an optimal state storage format. The system bottleneck is elsewhere for - * now. - */ -export interface TwapRecordAmino { - pool_id: string; - /** Lexicographically smaller denom of the pair */ - asset0_denom: string; - /** Lexicographically larger denom of the pair */ - asset1_denom: string; - /** height this record corresponds to, for debugging purposes */ - height: string; - /** - * This field should only exist until we have a global registry in the state - * machine, mapping prior block heights within {TIME RANGE} to times. - */ - time?: Date | undefined; - /** - * We store the last spot prices in the struct, so that we can interpolate - * accumulator values for times between when accumulator records are stored. - */ - p0_last_spot_price: string; - p1_last_spot_price: string; - p0_arithmetic_twap_accumulator: string; - p1_arithmetic_twap_accumulator: string; - /** - * This field contains the time in which the last spot price error occured. - * It is used to alert the caller if they are getting a potentially erroneous - * TWAP, due to an unforeseen underlying error. - */ - last_error_time?: Date | undefined; -} -export interface TwapRecordAminoMsg { - type: "osmosis/twap/twap-record"; - value: TwapRecordAmino; -} -/** - * A TWAP record should be indexed in state by pool_id, (asset pair), timestamp - * The asset pair assets should be lexicographically sorted. - * Technically (pool_id, asset_0_denom, asset_1_denom, height) do not need to - * appear in the struct however we view this as the wrong performance tradeoff - * given SDK today. Would rather we optimize for readability and correctness, - * than an optimal state storage format. The system bottleneck is elsewhere for - * now. - */ -export interface TwapRecordSDKType { - pool_id: bigint; - asset0_denom: string; - asset1_denom: string; - height: bigint; - time: Date | undefined; - p0_last_spot_price: string; - p1_last_spot_price: string; - p0_arithmetic_twap_accumulator: string; - p1_arithmetic_twap_accumulator: string; - last_error_time: Date | undefined; -} -function createBaseTwapRecord(): TwapRecord { - return { - poolId: BigInt(0), - asset0Denom: "", - asset1Denom: "", - height: BigInt(0), - time: new Date(), - p0LastSpotPrice: "", - p1LastSpotPrice: "", - p0ArithmeticTwapAccumulator: "", - p1ArithmeticTwapAccumulator: "", - lastErrorTime: new Date() - }; -} -export const TwapRecord = { - typeUrl: "/osmosis.twap.v1beta1.TwapRecord", - aminoType: "osmosis/twap/twap-record", - encode(message: TwapRecord, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolId !== BigInt(0)) { - writer.uint32(8).uint64(message.poolId); - } - if (message.asset0Denom !== "") { - writer.uint32(18).string(message.asset0Denom); - } - if (message.asset1Denom !== "") { - writer.uint32(26).string(message.asset1Denom); - } - if (message.height !== BigInt(0)) { - writer.uint32(32).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(42).fork()).ldelim(); - } - if (message.p0LastSpotPrice !== "") { - writer.uint32(50).string(Decimal.fromUserInput(message.p0LastSpotPrice, 18).atomics); - } - if (message.p1LastSpotPrice !== "") { - writer.uint32(58).string(Decimal.fromUserInput(message.p1LastSpotPrice, 18).atomics); - } - if (message.p0ArithmeticTwapAccumulator !== "") { - writer.uint32(66).string(Decimal.fromUserInput(message.p0ArithmeticTwapAccumulator, 18).atomics); - } - if (message.p1ArithmeticTwapAccumulator !== "") { - writer.uint32(74).string(Decimal.fromUserInput(message.p1ArithmeticTwapAccumulator, 18).atomics); - } - if (message.lastErrorTime !== undefined) { - Timestamp.encode(toTimestamp(message.lastErrorTime), writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TwapRecord { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTwapRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolId = reader.uint64(); - break; - case 2: - message.asset0Denom = reader.string(); - break; - case 3: - message.asset1Denom = reader.string(); - break; - case 4: - message.height = reader.int64(); - break; - case 5: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.p0LastSpotPrice = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 7: - message.p1LastSpotPrice = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 8: - message.p0ArithmeticTwapAccumulator = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 9: - message.p1ArithmeticTwapAccumulator = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - case 11: - message.lastErrorTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TwapRecord { - return { - poolId: isSet(object.poolId) ? BigInt(object.poolId.toString()) : BigInt(0), - asset0Denom: isSet(object.asset0Denom) ? String(object.asset0Denom) : "", - asset1Denom: isSet(object.asset1Denom) ? String(object.asset1Denom) : "", - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - time: isSet(object.time) ? new Date(object.time) : undefined, - p0LastSpotPrice: isSet(object.p0LastSpotPrice) ? String(object.p0LastSpotPrice) : "", - p1LastSpotPrice: isSet(object.p1LastSpotPrice) ? String(object.p1LastSpotPrice) : "", - p0ArithmeticTwapAccumulator: isSet(object.p0ArithmeticTwapAccumulator) ? String(object.p0ArithmeticTwapAccumulator) : "", - p1ArithmeticTwapAccumulator: isSet(object.p1ArithmeticTwapAccumulator) ? String(object.p1ArithmeticTwapAccumulator) : "", - lastErrorTime: isSet(object.lastErrorTime) ? new Date(object.lastErrorTime) : undefined - }; - }, - toJSON(message: TwapRecord): unknown { - const obj: any = {}; - message.poolId !== undefined && (obj.poolId = (message.poolId || BigInt(0)).toString()); - message.asset0Denom !== undefined && (obj.asset0Denom = message.asset0Denom); - message.asset1Denom !== undefined && (obj.asset1Denom = message.asset1Denom); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.time !== undefined && (obj.time = message.time.toISOString()); - message.p0LastSpotPrice !== undefined && (obj.p0LastSpotPrice = message.p0LastSpotPrice); - message.p1LastSpotPrice !== undefined && (obj.p1LastSpotPrice = message.p1LastSpotPrice); - message.p0ArithmeticTwapAccumulator !== undefined && (obj.p0ArithmeticTwapAccumulator = message.p0ArithmeticTwapAccumulator); - message.p1ArithmeticTwapAccumulator !== undefined && (obj.p1ArithmeticTwapAccumulator = message.p1ArithmeticTwapAccumulator); - message.lastErrorTime !== undefined && (obj.lastErrorTime = message.lastErrorTime.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): TwapRecord { - const message = createBaseTwapRecord(); - message.poolId = object.poolId !== undefined && object.poolId !== null ? BigInt(object.poolId.toString()) : BigInt(0); - message.asset0Denom = object.asset0Denom ?? ""; - message.asset1Denom = object.asset1Denom ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.p0LastSpotPrice = object.p0LastSpotPrice ?? ""; - message.p1LastSpotPrice = object.p1LastSpotPrice ?? ""; - message.p0ArithmeticTwapAccumulator = object.p0ArithmeticTwapAccumulator ?? ""; - message.p1ArithmeticTwapAccumulator = object.p1ArithmeticTwapAccumulator ?? ""; - message.lastErrorTime = object.lastErrorTime ?? undefined; - return message; - }, - fromSDK(object: TwapRecordSDKType): TwapRecord { - return { - poolId: object?.pool_id, - asset0Denom: object?.asset0_denom, - asset1Denom: object?.asset1_denom, - height: object?.height, - time: object.time ?? undefined, - p0LastSpotPrice: object?.p0_last_spot_price, - p1LastSpotPrice: object?.p1_last_spot_price, - p0ArithmeticTwapAccumulator: object?.p0_arithmetic_twap_accumulator, - p1ArithmeticTwapAccumulator: object?.p1_arithmetic_twap_accumulator, - lastErrorTime: object.last_error_time ?? undefined - }; - }, - toSDK(message: TwapRecord): TwapRecordSDKType { - const obj: any = {}; - obj.pool_id = message.poolId; - obj.asset0_denom = message.asset0Denom; - obj.asset1_denom = message.asset1Denom; - obj.height = message.height; - message.time !== undefined && (obj.time = message.time ?? undefined); - obj.p0_last_spot_price = message.p0LastSpotPrice; - obj.p1_last_spot_price = message.p1LastSpotPrice; - obj.p0_arithmetic_twap_accumulator = message.p0ArithmeticTwapAccumulator; - obj.p1_arithmetic_twap_accumulator = message.p1ArithmeticTwapAccumulator; - message.lastErrorTime !== undefined && (obj.last_error_time = message.lastErrorTime ?? undefined); - return obj; - }, - fromAmino(object: TwapRecordAmino): TwapRecord { - return { - poolId: BigInt(object.pool_id), - asset0Denom: object.asset0_denom, - asset1Denom: object.asset1_denom, - height: BigInt(object.height), - time: object.time, - p0LastSpotPrice: object.p0_last_spot_price, - p1LastSpotPrice: object.p1_last_spot_price, - p0ArithmeticTwapAccumulator: object.p0_arithmetic_twap_accumulator, - p1ArithmeticTwapAccumulator: object.p1_arithmetic_twap_accumulator, - lastErrorTime: object.last_error_time - }; - }, - toAmino(message: TwapRecord): TwapRecordAmino { - const obj: any = {}; - obj.pool_id = message.poolId ? message.poolId.toString() : undefined; - obj.asset0_denom = message.asset0Denom; - obj.asset1_denom = message.asset1Denom; - obj.height = message.height ? message.height.toString() : undefined; - obj.time = message.time; - obj.p0_last_spot_price = message.p0LastSpotPrice; - obj.p1_last_spot_price = message.p1LastSpotPrice; - obj.p0_arithmetic_twap_accumulator = message.p0ArithmeticTwapAccumulator; - obj.p1_arithmetic_twap_accumulator = message.p1ArithmeticTwapAccumulator; - obj.last_error_time = message.lastErrorTime; - return obj; - }, - fromAminoMsg(object: TwapRecordAminoMsg): TwapRecord { - return TwapRecord.fromAmino(object.value); - }, - toAminoMsg(message: TwapRecord): TwapRecordAminoMsg { - return { - type: "osmosis/twap/twap-record", - value: TwapRecord.toAmino(message) - }; - }, - fromProtoMsg(message: TwapRecordProtoMsg): TwapRecord { - return TwapRecord.decode(message.value); - }, - toProto(message: TwapRecord): Uint8Array { - return TwapRecord.encode(message).finish(); - }, - toProtoMsg(message: TwapRecord): TwapRecordProtoMsg { - return { - typeUrl: "/osmosis.twap.v1beta1.TwapRecord", - value: TwapRecord.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/feetoken.ts b/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/feetoken.ts deleted file mode 100644 index b473c1fa..00000000 --- a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/feetoken.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * FeeToken is a struct that specifies a coin denom, and pool ID pair. - * This marks the token as eligible for use as a tx fee asset in Osmosis. - * Its price in osmo is derived through looking at the provided pool ID. - * The pool ID must have osmo as one of its assets. - */ -export interface FeeToken { - denom: string; - poolID: bigint; -} -export interface FeeTokenProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.FeeToken"; - value: Uint8Array; -} -/** - * FeeToken is a struct that specifies a coin denom, and pool ID pair. - * This marks the token as eligible for use as a tx fee asset in Osmosis. - * Its price in osmo is derived through looking at the provided pool ID. - * The pool ID must have osmo as one of its assets. - */ -export interface FeeTokenAmino { - denom: string; - poolID: string; -} -export interface FeeTokenAminoMsg { - type: "osmosis/txfees/fee-token"; - value: FeeTokenAmino; -} -/** - * FeeToken is a struct that specifies a coin denom, and pool ID pair. - * This marks the token as eligible for use as a tx fee asset in Osmosis. - * Its price in osmo is derived through looking at the provided pool ID. - * The pool ID must have osmo as one of its assets. - */ -export interface FeeTokenSDKType { - denom: string; - poolID: bigint; -} -function createBaseFeeToken(): FeeToken { - return { - denom: "", - poolID: BigInt(0) - }; -} -export const FeeToken = { - typeUrl: "/osmosis.txfees.v1beta1.FeeToken", - aminoType: "osmosis/txfees/fee-token", - encode(message: FeeToken, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.poolID !== BigInt(0)) { - writer.uint32(16).uint64(message.poolID); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): FeeToken { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeeToken(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.poolID = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): FeeToken { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - poolID: isSet(object.poolID) ? BigInt(object.poolID.toString()) : BigInt(0) - }; - }, - toJSON(message: FeeToken): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.poolID !== undefined && (obj.poolID = (message.poolID || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): FeeToken { - const message = createBaseFeeToken(); - message.denom = object.denom ?? ""; - message.poolID = object.poolID !== undefined && object.poolID !== null ? BigInt(object.poolID.toString()) : BigInt(0); - return message; - }, - fromSDK(object: FeeTokenSDKType): FeeToken { - return { - denom: object?.denom, - poolID: object?.poolID - }; - }, - toSDK(message: FeeToken): FeeTokenSDKType { - const obj: any = {}; - obj.denom = message.denom; - obj.poolID = message.poolID; - return obj; - }, - fromAmino(object: FeeTokenAmino): FeeToken { - return { - denom: object.denom, - poolID: BigInt(object.poolID) - }; - }, - toAmino(message: FeeToken): FeeTokenAmino { - const obj: any = {}; - obj.denom = message.denom; - obj.poolID = message.poolID ? message.poolID.toString() : undefined; - return obj; - }, - fromAminoMsg(object: FeeTokenAminoMsg): FeeToken { - return FeeToken.fromAmino(object.value); - }, - toAminoMsg(message: FeeToken): FeeTokenAminoMsg { - return { - type: "osmosis/txfees/fee-token", - value: FeeToken.toAmino(message) - }; - }, - fromProtoMsg(message: FeeTokenProtoMsg): FeeToken { - return FeeToken.decode(message.value); - }, - toProto(message: FeeToken): Uint8Array { - return FeeToken.encode(message).finish(); - }, - toProtoMsg(message: FeeToken): FeeTokenProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.FeeToken", - value: FeeToken.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/genesis.ts b/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/genesis.ts deleted file mode 100644 index 6f42c5df..00000000 --- a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/genesis.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { FeeToken, FeeTokenAmino, FeeTokenSDKType } from "./feetoken"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** GenesisState defines the txfees module's genesis state. */ -export interface GenesisState { - basedenom: string; - feetokens: FeeToken[]; -} -export interface GenesisStateProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.GenesisState"; - value: Uint8Array; -} -/** GenesisState defines the txfees module's genesis state. */ -export interface GenesisStateAmino { - basedenom: string; - feetokens: FeeTokenAmino[]; -} -export interface GenesisStateAminoMsg { - type: "osmosis/txfees/genesis-state"; - value: GenesisStateAmino; -} -/** GenesisState defines the txfees module's genesis state. */ -export interface GenesisStateSDKType { - basedenom: string; - feetokens: FeeTokenSDKType[]; -} -function createBaseGenesisState(): GenesisState { - return { - basedenom: "", - feetokens: [] - }; -} -export const GenesisState = { - typeUrl: "/osmosis.txfees.v1beta1.GenesisState", - aminoType: "osmosis/txfees/genesis-state", - encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.basedenom !== "") { - writer.uint32(10).string(message.basedenom); - } - for (const v of message.feetokens) { - FeeToken.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.basedenom = reader.string(); - break; - case 2: - message.feetokens.push(FeeToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): GenesisState { - return { - basedenom: isSet(object.basedenom) ? String(object.basedenom) : "", - feetokens: Array.isArray(object?.feetokens) ? object.feetokens.map((e: any) => FeeToken.fromJSON(e)) : [] - }; - }, - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.basedenom !== undefined && (obj.basedenom = message.basedenom); - if (message.feetokens) { - obj.feetokens = message.feetokens.map(e => e ? FeeToken.toJSON(e) : undefined); - } else { - obj.feetokens = []; - } - return obj; - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.basedenom = object.basedenom ?? ""; - message.feetokens = object.feetokens?.map(e => FeeToken.fromPartial(e)) || []; - return message; - }, - fromSDK(object: GenesisStateSDKType): GenesisState { - return { - basedenom: object?.basedenom, - feetokens: Array.isArray(object?.feetokens) ? object.feetokens.map((e: any) => FeeToken.fromSDK(e)) : [] - }; - }, - toSDK(message: GenesisState): GenesisStateSDKType { - const obj: any = {}; - obj.basedenom = message.basedenom; - if (message.feetokens) { - obj.feetokens = message.feetokens.map(e => e ? FeeToken.toSDK(e) : undefined); - } else { - obj.feetokens = []; - } - return obj; - }, - fromAmino(object: GenesisStateAmino): GenesisState { - return { - basedenom: object.basedenom, - feetokens: Array.isArray(object?.feetokens) ? object.feetokens.map((e: any) => FeeToken.fromAmino(e)) : [] - }; - }, - toAmino(message: GenesisState): GenesisStateAmino { - const obj: any = {}; - obj.basedenom = message.basedenom; - if (message.feetokens) { - obj.feetokens = message.feetokens.map(e => e ? FeeToken.toAmino(e) : undefined); - } else { - obj.feetokens = []; - } - return obj; - }, - fromAminoMsg(object: GenesisStateAminoMsg): GenesisState { - return GenesisState.fromAmino(object.value); - }, - toAminoMsg(message: GenesisState): GenesisStateAminoMsg { - return { - type: "osmosis/txfees/genesis-state", - value: GenesisState.toAmino(message) - }; - }, - fromProtoMsg(message: GenesisStateProtoMsg): GenesisState { - return GenesisState.decode(message.value); - }, - toProto(message: GenesisState): Uint8Array { - return GenesisState.encode(message).finish(); - }, - toProtoMsg(message: GenesisState): GenesisStateProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.GenesisState", - value: GenesisState.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/gov.ts b/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/gov.ts deleted file mode 100644 index 21700ccb..00000000 --- a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/gov.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { FeeToken, FeeTokenAmino, FeeTokenSDKType } from "./feetoken"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -/** - * UpdateFeeTokenProposal is a gov Content type for adding a new whitelisted fee - * token. It must specify a denom along with gamm pool ID to use as a spot price - * calculator. It can be used to add a new denom to the whitelist It can also be - * used to update the Pool to associate with the denom. If Pool ID is set to 0, - * it will remove the denom from the whitelisted set. - */ -export interface UpdateFeeTokenProposal { - title: string; - description: string; - feetoken: FeeToken | undefined; -} -export interface UpdateFeeTokenProposalProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.UpdateFeeTokenProposal"; - value: Uint8Array; -} -/** - * UpdateFeeTokenProposal is a gov Content type for adding a new whitelisted fee - * token. It must specify a denom along with gamm pool ID to use as a spot price - * calculator. It can be used to add a new denom to the whitelist It can also be - * used to update the Pool to associate with the denom. If Pool ID is set to 0, - * it will remove the denom from the whitelisted set. - */ -export interface UpdateFeeTokenProposalAmino { - title: string; - description: string; - feetoken?: FeeTokenAmino | undefined; -} -export interface UpdateFeeTokenProposalAminoMsg { - type: "osmosis/txfees/update-fee-token-proposal"; - value: UpdateFeeTokenProposalAmino; -} -/** - * UpdateFeeTokenProposal is a gov Content type for adding a new whitelisted fee - * token. It must specify a denom along with gamm pool ID to use as a spot price - * calculator. It can be used to add a new denom to the whitelist It can also be - * used to update the Pool to associate with the denom. If Pool ID is set to 0, - * it will remove the denom from the whitelisted set. - */ -export interface UpdateFeeTokenProposalSDKType { - title: string; - description: string; - feetoken: FeeTokenSDKType | undefined; -} -function createBaseUpdateFeeTokenProposal(): UpdateFeeTokenProposal { - return { - title: "", - description: "", - feetoken: FeeToken.fromPartial({}) - }; -} -export const UpdateFeeTokenProposal = { - typeUrl: "/osmosis.txfees.v1beta1.UpdateFeeTokenProposal", - aminoType: "osmosis/txfees/update-fee-token-proposal", - encode(message: UpdateFeeTokenProposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.feetoken !== undefined) { - FeeToken.encode(message.feetoken, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): UpdateFeeTokenProposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateFeeTokenProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.feetoken = FeeToken.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): UpdateFeeTokenProposal { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - feetoken: isSet(object.feetoken) ? FeeToken.fromJSON(object.feetoken) : undefined - }; - }, - toJSON(message: UpdateFeeTokenProposal): unknown { - const obj: any = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.feetoken !== undefined && (obj.feetoken = message.feetoken ? FeeToken.toJSON(message.feetoken) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): UpdateFeeTokenProposal { - const message = createBaseUpdateFeeTokenProposal(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.feetoken = object.feetoken !== undefined && object.feetoken !== null ? FeeToken.fromPartial(object.feetoken) : undefined; - return message; - }, - fromSDK(object: UpdateFeeTokenProposalSDKType): UpdateFeeTokenProposal { - return { - title: object?.title, - description: object?.description, - feetoken: object.feetoken ? FeeToken.fromSDK(object.feetoken) : undefined - }; - }, - toSDK(message: UpdateFeeTokenProposal): UpdateFeeTokenProposalSDKType { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - message.feetoken !== undefined && (obj.feetoken = message.feetoken ? FeeToken.toSDK(message.feetoken) : undefined); - return obj; - }, - fromAmino(object: UpdateFeeTokenProposalAmino): UpdateFeeTokenProposal { - return { - title: object.title, - description: object.description, - feetoken: object?.feetoken ? FeeToken.fromAmino(object.feetoken) : undefined - }; - }, - toAmino(message: UpdateFeeTokenProposal): UpdateFeeTokenProposalAmino { - const obj: any = {}; - obj.title = message.title; - obj.description = message.description; - obj.feetoken = message.feetoken ? FeeToken.toAmino(message.feetoken) : undefined; - return obj; - }, - fromAminoMsg(object: UpdateFeeTokenProposalAminoMsg): UpdateFeeTokenProposal { - return UpdateFeeTokenProposal.fromAmino(object.value); - }, - toAminoMsg(message: UpdateFeeTokenProposal): UpdateFeeTokenProposalAminoMsg { - return { - type: "osmosis/txfees/update-fee-token-proposal", - value: UpdateFeeTokenProposal.toAmino(message) - }; - }, - fromProtoMsg(message: UpdateFeeTokenProposalProtoMsg): UpdateFeeTokenProposal { - return UpdateFeeTokenProposal.decode(message.value); - }, - toProto(message: UpdateFeeTokenProposal): Uint8Array { - return UpdateFeeTokenProposal.encode(message).finish(); - }, - toProtoMsg(message: UpdateFeeTokenProposal): UpdateFeeTokenProposalProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.UpdateFeeTokenProposal", - value: UpdateFeeTokenProposal.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/query.rpc.Query.ts b/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/query.rpc.Query.ts deleted file mode 100644 index 2427b4df..00000000 --- a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/query.rpc.Query.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { Rpc } from "../../../helpers"; -import { BinaryReader } from "../../../binary"; -import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from "@cosmjs/stargate"; -import { ReactQueryParams } from "../../../react-query"; -import { useQuery } from "@tanstack/react-query"; -import { QueryStore } from "../../../mobx"; -import { QueryFeeTokensRequest, QueryFeeTokensResponse, QueryDenomSpotPriceRequest, QueryDenomSpotPriceResponse, QueryDenomPoolIdRequest, QueryDenomPoolIdResponse, QueryBaseDenomRequest, QueryBaseDenomResponse } from "./query"; -export interface Query { - /** - * FeeTokens returns a list of all the whitelisted fee tokens and their - * corresponding pools. It does not include the BaseDenom, which has its own - * query endpoint - */ - feeTokens(request?: QueryFeeTokensRequest): Promise; - /** DenomSpotPrice returns all spot prices by each registered token denom. */ - denomSpotPrice(request: QueryDenomSpotPriceRequest): Promise; - /** Returns the poolID for a specified denom input. */ - denomPoolId(request: QueryDenomPoolIdRequest): Promise; - /** Returns a list of all base denom tokens and their corresponding pools. */ - baseDenom(request?: QueryBaseDenomRequest): Promise; -} -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.feeTokens = this.feeTokens.bind(this); - this.denomSpotPrice = this.denomSpotPrice.bind(this); - this.denomPoolId = this.denomPoolId.bind(this); - this.baseDenom = this.baseDenom.bind(this); - } - feeTokens(request: QueryFeeTokensRequest = {}): Promise { - const data = QueryFeeTokensRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.txfees.v1beta1.Query", "FeeTokens", data); - return promise.then(data => QueryFeeTokensResponse.decode(new BinaryReader(data))); - } - denomSpotPrice(request: QueryDenomSpotPriceRequest): Promise { - const data = QueryDenomSpotPriceRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.txfees.v1beta1.Query", "DenomSpotPrice", data); - return promise.then(data => QueryDenomSpotPriceResponse.decode(new BinaryReader(data))); - } - denomPoolId(request: QueryDenomPoolIdRequest): Promise { - const data = QueryDenomPoolIdRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.txfees.v1beta1.Query", "DenomPoolId", data); - return promise.then(data => QueryDenomPoolIdResponse.decode(new BinaryReader(data))); - } - baseDenom(request: QueryBaseDenomRequest = {}): Promise { - const data = QueryBaseDenomRequest.encode(request).finish(); - const promise = this.rpc.request("osmosis.txfees.v1beta1.Query", "BaseDenom", data); - return promise.then(data => QueryBaseDenomResponse.decode(new BinaryReader(data))); - } -} -export const createRpcQueryExtension = (base: QueryClient) => { - const rpc = createProtobufRpcClient(base); - const queryService = new QueryClientImpl(rpc); - return { - feeTokens(request?: QueryFeeTokensRequest): Promise { - return queryService.feeTokens(request); - }, - denomSpotPrice(request: QueryDenomSpotPriceRequest): Promise { - return queryService.denomSpotPrice(request); - }, - denomPoolId(request: QueryDenomPoolIdRequest): Promise { - return queryService.denomPoolId(request); - }, - baseDenom(request?: QueryBaseDenomRequest): Promise { - return queryService.baseDenom(request); - } - }; -}; -export interface UseFeeTokensQuery extends ReactQueryParams { - request?: QueryFeeTokensRequest; -} -export interface UseDenomSpotPriceQuery extends ReactQueryParams { - request: QueryDenomSpotPriceRequest; -} -export interface UseDenomPoolIdQuery extends ReactQueryParams { - request: QueryDenomPoolIdRequest; -} -export interface UseBaseDenomQuery extends ReactQueryParams { - request?: QueryBaseDenomRequest; -} -const _queryClients: WeakMap = new WeakMap(); -const getQueryService = (rpc: ProtobufRpcClient | undefined): QueryClientImpl | undefined => { - if (!rpc) return; - if (_queryClients.has(rpc)) { - return _queryClients.get(rpc); - } - const queryService = new QueryClientImpl(rpc); - _queryClients.set(rpc, queryService); - return queryService; -}; -export const createRpcQueryHooks = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - const useFeeTokens = ({ - request, - options - }: UseFeeTokensQuery) => { - return useQuery(["feeTokensQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.feeTokens(request); - }, options); - }; - const useDenomSpotPrice = ({ - request, - options - }: UseDenomSpotPriceQuery) => { - return useQuery(["denomSpotPriceQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomSpotPrice(request); - }, options); - }; - const useDenomPoolId = ({ - request, - options - }: UseDenomPoolIdQuery) => { - return useQuery(["denomPoolIdQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.denomPoolId(request); - }, options); - }; - const useBaseDenom = ({ - request, - options - }: UseBaseDenomQuery) => { - return useQuery(["baseDenomQuery", request], () => { - if (!queryService) throw new Error("Query Service not initialized"); - return queryService.baseDenom(request); - }, options); - }; - return { - /** - * FeeTokens returns a list of all the whitelisted fee tokens and their - * corresponding pools. It does not include the BaseDenom, which has its own - * query endpoint - */ - useFeeTokens, - /** DenomSpotPrice returns all spot prices by each registered token denom. */useDenomSpotPrice, - /** Returns the poolID for a specified denom input. */useDenomPoolId, - /** Returns a list of all base denom tokens and their corresponding pools. */useBaseDenom - }; -}; -export const createRpcQueryMobxStores = (rpc: ProtobufRpcClient | undefined) => { - const queryService = getQueryService(rpc); - class QueryFeeTokensStore { - store = new QueryStore(queryService?.feeTokens); - feeTokens(request: QueryFeeTokensRequest) { - return this.store.getData(request); - } - } - class QueryDenomSpotPriceStore { - store = new QueryStore(queryService?.denomSpotPrice); - denomSpotPrice(request: QueryDenomSpotPriceRequest) { - return this.store.getData(request); - } - } - class QueryDenomPoolIdStore { - store = new QueryStore(queryService?.denomPoolId); - denomPoolId(request: QueryDenomPoolIdRequest) { - return this.store.getData(request); - } - } - class QueryBaseDenomStore { - store = new QueryStore(queryService?.baseDenom); - baseDenom(request: QueryBaseDenomRequest) { - return this.store.getData(request); - } - } - return { - /** - * FeeTokens returns a list of all the whitelisted fee tokens and their - * corresponding pools. It does not include the BaseDenom, which has its own - * query endpoint - */ - QueryFeeTokensStore, - /** DenomSpotPrice returns all spot prices by each registered token denom. */QueryDenomSpotPriceStore, - /** Returns the poolID for a specified denom input. */QueryDenomPoolIdStore, - /** Returns a list of all base denom tokens and their corresponding pools. */QueryBaseDenomStore - }; -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/query.ts b/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/query.ts deleted file mode 100644 index a3cb75a1..00000000 --- a/examples/interchainjs/src/codegen/osmosis/txfees/v1beta1/query.ts +++ /dev/null @@ -1,849 +0,0 @@ -import { FeeToken, FeeTokenAmino, FeeTokenSDKType } from "./feetoken"; -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { DeepPartial, isSet } from "../../../helpers"; -import { Decimal } from "@cosmjs/math"; -export interface QueryFeeTokensRequest {} -export interface QueryFeeTokensRequestProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryFeeTokensRequest"; - value: Uint8Array; -} -export interface QueryFeeTokensRequestAmino {} -export interface QueryFeeTokensRequestAminoMsg { - type: "osmosis/txfees/query-fee-tokens-request"; - value: QueryFeeTokensRequestAmino; -} -export interface QueryFeeTokensRequestSDKType {} -export interface QueryFeeTokensResponse { - feeTokens: FeeToken[]; -} -export interface QueryFeeTokensResponseProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryFeeTokensResponse"; - value: Uint8Array; -} -export interface QueryFeeTokensResponseAmino { - fee_tokens: FeeTokenAmino[]; -} -export interface QueryFeeTokensResponseAminoMsg { - type: "osmosis/txfees/query-fee-tokens-response"; - value: QueryFeeTokensResponseAmino; -} -export interface QueryFeeTokensResponseSDKType { - fee_tokens: FeeTokenSDKType[]; -} -/** - * QueryDenomSpotPriceRequest defines grpc request structure for querying spot - * price for the specified tx fee denom - */ -export interface QueryDenomSpotPriceRequest { - denom: string; -} -export interface QueryDenomSpotPriceRequestProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomSpotPriceRequest"; - value: Uint8Array; -} -/** - * QueryDenomSpotPriceRequest defines grpc request structure for querying spot - * price for the specified tx fee denom - */ -export interface QueryDenomSpotPriceRequestAmino { - denom: string; -} -export interface QueryDenomSpotPriceRequestAminoMsg { - type: "osmosis/txfees/query-denom-spot-price-request"; - value: QueryDenomSpotPriceRequestAmino; -} -/** - * QueryDenomSpotPriceRequest defines grpc request structure for querying spot - * price for the specified tx fee denom - */ -export interface QueryDenomSpotPriceRequestSDKType { - denom: string; -} -/** - * QueryDenomSpotPriceRequest defines grpc response structure for querying spot - * price for the specified tx fee denom - */ -export interface QueryDenomSpotPriceResponse { - poolID: bigint; - spotPrice: string; -} -export interface QueryDenomSpotPriceResponseProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomSpotPriceResponse"; - value: Uint8Array; -} -/** - * QueryDenomSpotPriceRequest defines grpc response structure for querying spot - * price for the specified tx fee denom - */ -export interface QueryDenomSpotPriceResponseAmino { - poolID: string; - spot_price: string; -} -export interface QueryDenomSpotPriceResponseAminoMsg { - type: "osmosis/txfees/query-denom-spot-price-response"; - value: QueryDenomSpotPriceResponseAmino; -} -/** - * QueryDenomSpotPriceRequest defines grpc response structure for querying spot - * price for the specified tx fee denom - */ -export interface QueryDenomSpotPriceResponseSDKType { - poolID: bigint; - spot_price: string; -} -export interface QueryDenomPoolIdRequest { - denom: string; -} -export interface QueryDenomPoolIdRequestProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomPoolIdRequest"; - value: Uint8Array; -} -export interface QueryDenomPoolIdRequestAmino { - denom: string; -} -export interface QueryDenomPoolIdRequestAminoMsg { - type: "osmosis/txfees/query-denom-pool-id-request"; - value: QueryDenomPoolIdRequestAmino; -} -export interface QueryDenomPoolIdRequestSDKType { - denom: string; -} -export interface QueryDenomPoolIdResponse { - poolID: bigint; -} -export interface QueryDenomPoolIdResponseProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomPoolIdResponse"; - value: Uint8Array; -} -export interface QueryDenomPoolIdResponseAmino { - poolID: string; -} -export interface QueryDenomPoolIdResponseAminoMsg { - type: "osmosis/txfees/query-denom-pool-id-response"; - value: QueryDenomPoolIdResponseAmino; -} -export interface QueryDenomPoolIdResponseSDKType { - poolID: bigint; -} -export interface QueryBaseDenomRequest {} -export interface QueryBaseDenomRequestProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryBaseDenomRequest"; - value: Uint8Array; -} -export interface QueryBaseDenomRequestAmino {} -export interface QueryBaseDenomRequestAminoMsg { - type: "osmosis/txfees/query-base-denom-request"; - value: QueryBaseDenomRequestAmino; -} -export interface QueryBaseDenomRequestSDKType {} -export interface QueryBaseDenomResponse { - baseDenom: string; -} -export interface QueryBaseDenomResponseProtoMsg { - typeUrl: "/osmosis.txfees.v1beta1.QueryBaseDenomResponse"; - value: Uint8Array; -} -export interface QueryBaseDenomResponseAmino { - base_denom: string; -} -export interface QueryBaseDenomResponseAminoMsg { - type: "osmosis/txfees/query-base-denom-response"; - value: QueryBaseDenomResponseAmino; -} -export interface QueryBaseDenomResponseSDKType { - base_denom: string; -} -function createBaseQueryFeeTokensRequest(): QueryFeeTokensRequest { - return {}; -} -export const QueryFeeTokensRequest = { - typeUrl: "/osmosis.txfees.v1beta1.QueryFeeTokensRequest", - aminoType: "osmosis/txfees/query-fee-tokens-request", - encode(_: QueryFeeTokensRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryFeeTokensRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryFeeTokensRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryFeeTokensRequest { - return {}; - }, - toJSON(_: QueryFeeTokensRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryFeeTokensRequest { - const message = createBaseQueryFeeTokensRequest(); - return message; - }, - fromSDK(_: QueryFeeTokensRequestSDKType): QueryFeeTokensRequest { - return {}; - }, - toSDK(_: QueryFeeTokensRequest): QueryFeeTokensRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryFeeTokensRequestAmino): QueryFeeTokensRequest { - return {}; - }, - toAmino(_: QueryFeeTokensRequest): QueryFeeTokensRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryFeeTokensRequestAminoMsg): QueryFeeTokensRequest { - return QueryFeeTokensRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryFeeTokensRequest): QueryFeeTokensRequestAminoMsg { - return { - type: "osmosis/txfees/query-fee-tokens-request", - value: QueryFeeTokensRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryFeeTokensRequestProtoMsg): QueryFeeTokensRequest { - return QueryFeeTokensRequest.decode(message.value); - }, - toProto(message: QueryFeeTokensRequest): Uint8Array { - return QueryFeeTokensRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryFeeTokensRequest): QueryFeeTokensRequestProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryFeeTokensRequest", - value: QueryFeeTokensRequest.encode(message).finish() - }; - } -}; -function createBaseQueryFeeTokensResponse(): QueryFeeTokensResponse { - return { - feeTokens: [] - }; -} -export const QueryFeeTokensResponse = { - typeUrl: "/osmosis.txfees.v1beta1.QueryFeeTokensResponse", - aminoType: "osmosis/txfees/query-fee-tokens-response", - encode(message: QueryFeeTokensResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.feeTokens) { - FeeToken.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryFeeTokensResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryFeeTokensResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.feeTokens.push(FeeToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryFeeTokensResponse { - return { - feeTokens: Array.isArray(object?.feeTokens) ? object.feeTokens.map((e: any) => FeeToken.fromJSON(e)) : [] - }; - }, - toJSON(message: QueryFeeTokensResponse): unknown { - const obj: any = {}; - if (message.feeTokens) { - obj.feeTokens = message.feeTokens.map(e => e ? FeeToken.toJSON(e) : undefined); - } else { - obj.feeTokens = []; - } - return obj; - }, - fromPartial(object: DeepPartial): QueryFeeTokensResponse { - const message = createBaseQueryFeeTokensResponse(); - message.feeTokens = object.feeTokens?.map(e => FeeToken.fromPartial(e)) || []; - return message; - }, - fromSDK(object: QueryFeeTokensResponseSDKType): QueryFeeTokensResponse { - return { - feeTokens: Array.isArray(object?.fee_tokens) ? object.fee_tokens.map((e: any) => FeeToken.fromSDK(e)) : [] - }; - }, - toSDK(message: QueryFeeTokensResponse): QueryFeeTokensResponseSDKType { - const obj: any = {}; - if (message.feeTokens) { - obj.fee_tokens = message.feeTokens.map(e => e ? FeeToken.toSDK(e) : undefined); - } else { - obj.fee_tokens = []; - } - return obj; - }, - fromAmino(object: QueryFeeTokensResponseAmino): QueryFeeTokensResponse { - return { - feeTokens: Array.isArray(object?.fee_tokens) ? object.fee_tokens.map((e: any) => FeeToken.fromAmino(e)) : [] - }; - }, - toAmino(message: QueryFeeTokensResponse): QueryFeeTokensResponseAmino { - const obj: any = {}; - if (message.feeTokens) { - obj.fee_tokens = message.feeTokens.map(e => e ? FeeToken.toAmino(e) : undefined); - } else { - obj.fee_tokens = []; - } - return obj; - }, - fromAminoMsg(object: QueryFeeTokensResponseAminoMsg): QueryFeeTokensResponse { - return QueryFeeTokensResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryFeeTokensResponse): QueryFeeTokensResponseAminoMsg { - return { - type: "osmosis/txfees/query-fee-tokens-response", - value: QueryFeeTokensResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryFeeTokensResponseProtoMsg): QueryFeeTokensResponse { - return QueryFeeTokensResponse.decode(message.value); - }, - toProto(message: QueryFeeTokensResponse): Uint8Array { - return QueryFeeTokensResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryFeeTokensResponse): QueryFeeTokensResponseProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryFeeTokensResponse", - value: QueryFeeTokensResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomSpotPriceRequest(): QueryDenomSpotPriceRequest { - return { - denom: "" - }; -} -export const QueryDenomSpotPriceRequest = { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomSpotPriceRequest", - aminoType: "osmosis/txfees/query-denom-spot-price-request", - encode(message: QueryDenomSpotPriceRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomSpotPriceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomSpotPriceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomSpotPriceRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QueryDenomSpotPriceRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomSpotPriceRequest { - const message = createBaseQueryDenomSpotPriceRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QueryDenomSpotPriceRequestSDKType): QueryDenomSpotPriceRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: QueryDenomSpotPriceRequest): QueryDenomSpotPriceRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QueryDenomSpotPriceRequestAmino): QueryDenomSpotPriceRequest { - return { - denom: object.denom - }; - }, - toAmino(message: QueryDenomSpotPriceRequest): QueryDenomSpotPriceRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QueryDenomSpotPriceRequestAminoMsg): QueryDenomSpotPriceRequest { - return QueryDenomSpotPriceRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomSpotPriceRequest): QueryDenomSpotPriceRequestAminoMsg { - return { - type: "osmosis/txfees/query-denom-spot-price-request", - value: QueryDenomSpotPriceRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomSpotPriceRequestProtoMsg): QueryDenomSpotPriceRequest { - return QueryDenomSpotPriceRequest.decode(message.value); - }, - toProto(message: QueryDenomSpotPriceRequest): Uint8Array { - return QueryDenomSpotPriceRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomSpotPriceRequest): QueryDenomSpotPriceRequestProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomSpotPriceRequest", - value: QueryDenomSpotPriceRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomSpotPriceResponse(): QueryDenomSpotPriceResponse { - return { - poolID: BigInt(0), - spotPrice: "" - }; -} -export const QueryDenomSpotPriceResponse = { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomSpotPriceResponse", - aminoType: "osmosis/txfees/query-denom-spot-price-response", - encode(message: QueryDenomSpotPriceResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolID !== BigInt(0)) { - writer.uint32(8).uint64(message.poolID); - } - if (message.spotPrice !== "") { - writer.uint32(18).string(Decimal.fromUserInput(message.spotPrice, 18).atomics); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomSpotPriceResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomSpotPriceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolID = reader.uint64(); - break; - case 2: - message.spotPrice = Decimal.fromAtomics(reader.string(), 18).toString(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomSpotPriceResponse { - return { - poolID: isSet(object.poolID) ? BigInt(object.poolID.toString()) : BigInt(0), - spotPrice: isSet(object.spotPrice) ? String(object.spotPrice) : "" - }; - }, - toJSON(message: QueryDenomSpotPriceResponse): unknown { - const obj: any = {}; - message.poolID !== undefined && (obj.poolID = (message.poolID || BigInt(0)).toString()); - message.spotPrice !== undefined && (obj.spotPrice = message.spotPrice); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomSpotPriceResponse { - const message = createBaseQueryDenomSpotPriceResponse(); - message.poolID = object.poolID !== undefined && object.poolID !== null ? BigInt(object.poolID.toString()) : BigInt(0); - message.spotPrice = object.spotPrice ?? ""; - return message; - }, - fromSDK(object: QueryDenomSpotPriceResponseSDKType): QueryDenomSpotPriceResponse { - return { - poolID: object?.poolID, - spotPrice: object?.spot_price - }; - }, - toSDK(message: QueryDenomSpotPriceResponse): QueryDenomSpotPriceResponseSDKType { - const obj: any = {}; - obj.poolID = message.poolID; - obj.spot_price = message.spotPrice; - return obj; - }, - fromAmino(object: QueryDenomSpotPriceResponseAmino): QueryDenomSpotPriceResponse { - return { - poolID: BigInt(object.poolID), - spotPrice: object.spot_price - }; - }, - toAmino(message: QueryDenomSpotPriceResponse): QueryDenomSpotPriceResponseAmino { - const obj: any = {}; - obj.poolID = message.poolID ? message.poolID.toString() : undefined; - obj.spot_price = message.spotPrice; - return obj; - }, - fromAminoMsg(object: QueryDenomSpotPriceResponseAminoMsg): QueryDenomSpotPriceResponse { - return QueryDenomSpotPriceResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomSpotPriceResponse): QueryDenomSpotPriceResponseAminoMsg { - return { - type: "osmosis/txfees/query-denom-spot-price-response", - value: QueryDenomSpotPriceResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomSpotPriceResponseProtoMsg): QueryDenomSpotPriceResponse { - return QueryDenomSpotPriceResponse.decode(message.value); - }, - toProto(message: QueryDenomSpotPriceResponse): Uint8Array { - return QueryDenomSpotPriceResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomSpotPriceResponse): QueryDenomSpotPriceResponseProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomSpotPriceResponse", - value: QueryDenomSpotPriceResponse.encode(message).finish() - }; - } -}; -function createBaseQueryDenomPoolIdRequest(): QueryDenomPoolIdRequest { - return { - denom: "" - }; -} -export const QueryDenomPoolIdRequest = { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomPoolIdRequest", - aminoType: "osmosis/txfees/query-denom-pool-id-request", - encode(message: QueryDenomPoolIdRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomPoolIdRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomPoolIdRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomPoolIdRequest { - return { - denom: isSet(object.denom) ? String(object.denom) : "" - }; - }, - toJSON(message: QueryDenomPoolIdRequest): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomPoolIdRequest { - const message = createBaseQueryDenomPoolIdRequest(); - message.denom = object.denom ?? ""; - return message; - }, - fromSDK(object: QueryDenomPoolIdRequestSDKType): QueryDenomPoolIdRequest { - return { - denom: object?.denom - }; - }, - toSDK(message: QueryDenomPoolIdRequest): QueryDenomPoolIdRequestSDKType { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAmino(object: QueryDenomPoolIdRequestAmino): QueryDenomPoolIdRequest { - return { - denom: object.denom - }; - }, - toAmino(message: QueryDenomPoolIdRequest): QueryDenomPoolIdRequestAmino { - const obj: any = {}; - obj.denom = message.denom; - return obj; - }, - fromAminoMsg(object: QueryDenomPoolIdRequestAminoMsg): QueryDenomPoolIdRequest { - return QueryDenomPoolIdRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomPoolIdRequest): QueryDenomPoolIdRequestAminoMsg { - return { - type: "osmosis/txfees/query-denom-pool-id-request", - value: QueryDenomPoolIdRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomPoolIdRequestProtoMsg): QueryDenomPoolIdRequest { - return QueryDenomPoolIdRequest.decode(message.value); - }, - toProto(message: QueryDenomPoolIdRequest): Uint8Array { - return QueryDenomPoolIdRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomPoolIdRequest): QueryDenomPoolIdRequestProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomPoolIdRequest", - value: QueryDenomPoolIdRequest.encode(message).finish() - }; - } -}; -function createBaseQueryDenomPoolIdResponse(): QueryDenomPoolIdResponse { - return { - poolID: BigInt(0) - }; -} -export const QueryDenomPoolIdResponse = { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomPoolIdResponse", - aminoType: "osmosis/txfees/query-denom-pool-id-response", - encode(message: QueryDenomPoolIdResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.poolID !== BigInt(0)) { - writer.uint32(8).uint64(message.poolID); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryDenomPoolIdResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDenomPoolIdResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.poolID = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryDenomPoolIdResponse { - return { - poolID: isSet(object.poolID) ? BigInt(object.poolID.toString()) : BigInt(0) - }; - }, - toJSON(message: QueryDenomPoolIdResponse): unknown { - const obj: any = {}; - message.poolID !== undefined && (obj.poolID = (message.poolID || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): QueryDenomPoolIdResponse { - const message = createBaseQueryDenomPoolIdResponse(); - message.poolID = object.poolID !== undefined && object.poolID !== null ? BigInt(object.poolID.toString()) : BigInt(0); - return message; - }, - fromSDK(object: QueryDenomPoolIdResponseSDKType): QueryDenomPoolIdResponse { - return { - poolID: object?.poolID - }; - }, - toSDK(message: QueryDenomPoolIdResponse): QueryDenomPoolIdResponseSDKType { - const obj: any = {}; - obj.poolID = message.poolID; - return obj; - }, - fromAmino(object: QueryDenomPoolIdResponseAmino): QueryDenomPoolIdResponse { - return { - poolID: BigInt(object.poolID) - }; - }, - toAmino(message: QueryDenomPoolIdResponse): QueryDenomPoolIdResponseAmino { - const obj: any = {}; - obj.poolID = message.poolID ? message.poolID.toString() : undefined; - return obj; - }, - fromAminoMsg(object: QueryDenomPoolIdResponseAminoMsg): QueryDenomPoolIdResponse { - return QueryDenomPoolIdResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryDenomPoolIdResponse): QueryDenomPoolIdResponseAminoMsg { - return { - type: "osmosis/txfees/query-denom-pool-id-response", - value: QueryDenomPoolIdResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryDenomPoolIdResponseProtoMsg): QueryDenomPoolIdResponse { - return QueryDenomPoolIdResponse.decode(message.value); - }, - toProto(message: QueryDenomPoolIdResponse): Uint8Array { - return QueryDenomPoolIdResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryDenomPoolIdResponse): QueryDenomPoolIdResponseProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryDenomPoolIdResponse", - value: QueryDenomPoolIdResponse.encode(message).finish() - }; - } -}; -function createBaseQueryBaseDenomRequest(): QueryBaseDenomRequest { - return {}; -} -export const QueryBaseDenomRequest = { - typeUrl: "/osmosis.txfees.v1beta1.QueryBaseDenomRequest", - aminoType: "osmosis/txfees/query-base-denom-request", - encode(_: QueryBaseDenomRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryBaseDenomRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBaseDenomRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): QueryBaseDenomRequest { - return {}; - }, - toJSON(_: QueryBaseDenomRequest): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): QueryBaseDenomRequest { - const message = createBaseQueryBaseDenomRequest(); - return message; - }, - fromSDK(_: QueryBaseDenomRequestSDKType): QueryBaseDenomRequest { - return {}; - }, - toSDK(_: QueryBaseDenomRequest): QueryBaseDenomRequestSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: QueryBaseDenomRequestAmino): QueryBaseDenomRequest { - return {}; - }, - toAmino(_: QueryBaseDenomRequest): QueryBaseDenomRequestAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: QueryBaseDenomRequestAminoMsg): QueryBaseDenomRequest { - return QueryBaseDenomRequest.fromAmino(object.value); - }, - toAminoMsg(message: QueryBaseDenomRequest): QueryBaseDenomRequestAminoMsg { - return { - type: "osmosis/txfees/query-base-denom-request", - value: QueryBaseDenomRequest.toAmino(message) - }; - }, - fromProtoMsg(message: QueryBaseDenomRequestProtoMsg): QueryBaseDenomRequest { - return QueryBaseDenomRequest.decode(message.value); - }, - toProto(message: QueryBaseDenomRequest): Uint8Array { - return QueryBaseDenomRequest.encode(message).finish(); - }, - toProtoMsg(message: QueryBaseDenomRequest): QueryBaseDenomRequestProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryBaseDenomRequest", - value: QueryBaseDenomRequest.encode(message).finish() - }; - } -}; -function createBaseQueryBaseDenomResponse(): QueryBaseDenomResponse { - return { - baseDenom: "" - }; -} -export const QueryBaseDenomResponse = { - typeUrl: "/osmosis.txfees.v1beta1.QueryBaseDenomResponse", - aminoType: "osmosis/txfees/query-base-denom-response", - encode(message: QueryBaseDenomResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.baseDenom !== "") { - writer.uint32(10).string(message.baseDenom); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): QueryBaseDenomResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBaseDenomResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseDenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): QueryBaseDenomResponse { - return { - baseDenom: isSet(object.baseDenom) ? String(object.baseDenom) : "" - }; - }, - toJSON(message: QueryBaseDenomResponse): unknown { - const obj: any = {}; - message.baseDenom !== undefined && (obj.baseDenom = message.baseDenom); - return obj; - }, - fromPartial(object: DeepPartial): QueryBaseDenomResponse { - const message = createBaseQueryBaseDenomResponse(); - message.baseDenom = object.baseDenom ?? ""; - return message; - }, - fromSDK(object: QueryBaseDenomResponseSDKType): QueryBaseDenomResponse { - return { - baseDenom: object?.base_denom - }; - }, - toSDK(message: QueryBaseDenomResponse): QueryBaseDenomResponseSDKType { - const obj: any = {}; - obj.base_denom = message.baseDenom; - return obj; - }, - fromAmino(object: QueryBaseDenomResponseAmino): QueryBaseDenomResponse { - return { - baseDenom: object.base_denom - }; - }, - toAmino(message: QueryBaseDenomResponse): QueryBaseDenomResponseAmino { - const obj: any = {}; - obj.base_denom = message.baseDenom; - return obj; - }, - fromAminoMsg(object: QueryBaseDenomResponseAminoMsg): QueryBaseDenomResponse { - return QueryBaseDenomResponse.fromAmino(object.value); - }, - toAminoMsg(message: QueryBaseDenomResponse): QueryBaseDenomResponseAminoMsg { - return { - type: "osmosis/txfees/query-base-denom-response", - value: QueryBaseDenomResponse.toAmino(message) - }; - }, - fromProtoMsg(message: QueryBaseDenomResponseProtoMsg): QueryBaseDenomResponse { - return QueryBaseDenomResponse.decode(message.value); - }, - toProto(message: QueryBaseDenomResponse): Uint8Array { - return QueryBaseDenomResponse.encode(message).finish(); - }, - toProtoMsg(message: QueryBaseDenomResponse): QueryBaseDenomResponseProtoMsg { - return { - typeUrl: "/osmosis.txfees.v1beta1.QueryBaseDenomResponse", - value: QueryBaseDenomResponse.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/react-query.ts b/examples/interchainjs/src/codegen/react-query.ts deleted file mode 100644 index 7c5cb5bc..00000000 --- a/examples/interchainjs/src/codegen/react-query.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - -import { getRpcClient } from './extern' -import { - useQuery, - UseQueryOptions, -} from '@tanstack/react-query'; - -import { HttpEndpoint, ProtobufRpcClient } from '@cosmjs/stargate'; -import { Tendermint34Client } from '@cosmjs/tendermint-rpc'; - -export interface ReactQueryParams { - options?: UseQueryOptions; -} - -export interface UseRpcClientQuery extends ReactQueryParams { - rpcEndpoint: string | HttpEndpoint; -} - -export interface UseRpcEndpointQuery extends ReactQueryParams { - getter: () => Promise; -} - -export const useRpcEndpoint = ({ - getter, - options, -}: UseRpcEndpointQuery) => { - return useQuery(['rpcEndpoint', getter], async () => { - return await getter(); - }, options); -}; - -export const useRpcClient = ({ - rpcEndpoint, - options, -}: UseRpcClientQuery) => { - return useQuery(['rpcClient', rpcEndpoint], async () => { - return await getRpcClient(rpcEndpoint); - }, options); -}; - -interface UseTendermintClient extends ReactQueryParams { - rpcEndpoint: string | HttpEndpoint; -} - -/** - * Hook that uses react-query to cache a connected tendermint client. - */ -export const useTendermintClient = ({ - rpcEndpoint, - options, -}: UseTendermintClient) => { - const { data: client } = useQuery( - ['client', 'tendermint', rpcEndpoint], - () => Tendermint34Client.connect(rpcEndpoint), - { - // allow overriding - onError: (e) => { - throw new Error(`Failed to connect to ${rpcEndpoint}` + '\n' + e) - }, - ...options, - } - ) - return { client } -}; diff --git a/examples/interchainjs/src/codegen/tendermint/abci/types.ts b/examples/interchainjs/src/codegen/tendermint/abci/types.ts deleted file mode 100644 index 4322162a..00000000 --- a/examples/interchainjs/src/codegen/tendermint/abci/types.ts +++ /dev/null @@ -1,6528 +0,0 @@ -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Header, HeaderAmino, HeaderSDKType } from "../types/types"; -import { ProofOps, ProofOpsAmino, ProofOpsSDKType } from "../crypto/proof"; -import { EvidenceParams, EvidenceParamsAmino, EvidenceParamsSDKType, ValidatorParams, ValidatorParamsAmino, ValidatorParamsSDKType, VersionParams, VersionParamsAmino, VersionParamsSDKType } from "../types/params"; -import { PublicKey, PublicKeyAmino, PublicKeySDKType } from "../crypto/keys"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../helpers"; -export enum CheckTxType { - NEW = 0, - RECHECK = 1, - UNRECOGNIZED = -1, -} -export const CheckTxTypeSDKType = CheckTxType; -export const CheckTxTypeAmino = CheckTxType; -export function checkTxTypeFromJSON(object: any): CheckTxType { - switch (object) { - case 0: - case "NEW": - return CheckTxType.NEW; - case 1: - case "RECHECK": - return CheckTxType.RECHECK; - case -1: - case "UNRECOGNIZED": - default: - return CheckTxType.UNRECOGNIZED; - } -} -export function checkTxTypeToJSON(object: CheckTxType): string { - switch (object) { - case CheckTxType.NEW: - return "NEW"; - case CheckTxType.RECHECK: - return "RECHECK"; - case CheckTxType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum ResponseOfferSnapshot_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Snapshot accepted, apply chunks */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** REJECT - Reject this specific snapshot, try others */ - REJECT = 3, - /** REJECT_FORMAT - Reject all snapshots of this format, try others */ - REJECT_FORMAT = 4, - /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */ - REJECT_SENDER = 5, - UNRECOGNIZED = -1, -} -export const ResponseOfferSnapshot_ResultSDKType = ResponseOfferSnapshot_Result; -export const ResponseOfferSnapshot_ResultAmino = ResponseOfferSnapshot_Result; -export function responseOfferSnapshot_ResultFromJSON(object: any): ResponseOfferSnapshot_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseOfferSnapshot_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseOfferSnapshot_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseOfferSnapshot_Result.ABORT; - case 3: - case "REJECT": - return ResponseOfferSnapshot_Result.REJECT; - case 4: - case "REJECT_FORMAT": - return ResponseOfferSnapshot_Result.REJECT_FORMAT; - case 5: - case "REJECT_SENDER": - return ResponseOfferSnapshot_Result.REJECT_SENDER; - case -1: - case "UNRECOGNIZED": - default: - return ResponseOfferSnapshot_Result.UNRECOGNIZED; - } -} -export function responseOfferSnapshot_ResultToJSON(object: ResponseOfferSnapshot_Result): string { - switch (object) { - case ResponseOfferSnapshot_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseOfferSnapshot_Result.ACCEPT: - return "ACCEPT"; - case ResponseOfferSnapshot_Result.ABORT: - return "ABORT"; - case ResponseOfferSnapshot_Result.REJECT: - return "REJECT"; - case ResponseOfferSnapshot_Result.REJECT_FORMAT: - return "REJECT_FORMAT"; - case ResponseOfferSnapshot_Result.REJECT_SENDER: - return "REJECT_SENDER"; - case ResponseOfferSnapshot_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum ResponseApplySnapshotChunk_Result { - /** UNKNOWN - Unknown result, abort all snapshot restoration */ - UNKNOWN = 0, - /** ACCEPT - Chunk successfully accepted */ - ACCEPT = 1, - /** ABORT - Abort all snapshot restoration */ - ABORT = 2, - /** RETRY - Retry chunk (combine with refetch and reject) */ - RETRY = 3, - /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */ - RETRY_SNAPSHOT = 4, - /** REJECT_SNAPSHOT - Reject this snapshot, try others */ - REJECT_SNAPSHOT = 5, - UNRECOGNIZED = -1, -} -export const ResponseApplySnapshotChunk_ResultSDKType = ResponseApplySnapshotChunk_Result; -export const ResponseApplySnapshotChunk_ResultAmino = ResponseApplySnapshotChunk_Result; -export function responseApplySnapshotChunk_ResultFromJSON(object: any): ResponseApplySnapshotChunk_Result { - switch (object) { - case 0: - case "UNKNOWN": - return ResponseApplySnapshotChunk_Result.UNKNOWN; - case 1: - case "ACCEPT": - return ResponseApplySnapshotChunk_Result.ACCEPT; - case 2: - case "ABORT": - return ResponseApplySnapshotChunk_Result.ABORT; - case 3: - case "RETRY": - return ResponseApplySnapshotChunk_Result.RETRY; - case 4: - case "RETRY_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT; - case 5: - case "REJECT_SNAPSHOT": - return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT; - case -1: - case "UNRECOGNIZED": - default: - return ResponseApplySnapshotChunk_Result.UNRECOGNIZED; - } -} -export function responseApplySnapshotChunk_ResultToJSON(object: ResponseApplySnapshotChunk_Result): string { - switch (object) { - case ResponseApplySnapshotChunk_Result.UNKNOWN: - return "UNKNOWN"; - case ResponseApplySnapshotChunk_Result.ACCEPT: - return "ACCEPT"; - case ResponseApplySnapshotChunk_Result.ABORT: - return "ABORT"; - case ResponseApplySnapshotChunk_Result.RETRY: - return "RETRY"; - case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT: - return "RETRY_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: - return "REJECT_SNAPSHOT"; - case ResponseApplySnapshotChunk_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2, - UNRECOGNIZED = -1, -} -export const EvidenceTypeSDKType = EvidenceType; -export const EvidenceTypeAmino = EvidenceType; -export function evidenceTypeFromJSON(object: any): EvidenceType { - switch (object) { - case 0: - case "UNKNOWN": - return EvidenceType.UNKNOWN; - case 1: - case "DUPLICATE_VOTE": - return EvidenceType.DUPLICATE_VOTE; - case 2: - case "LIGHT_CLIENT_ATTACK": - return EvidenceType.LIGHT_CLIENT_ATTACK; - case -1: - case "UNRECOGNIZED": - default: - return EvidenceType.UNRECOGNIZED; - } -} -export function evidenceTypeToJSON(object: EvidenceType): string { - switch (object) { - case EvidenceType.UNKNOWN: - return "UNKNOWN"; - case EvidenceType.DUPLICATE_VOTE: - return "DUPLICATE_VOTE"; - case EvidenceType.LIGHT_CLIENT_ATTACK: - return "LIGHT_CLIENT_ATTACK"; - case EvidenceType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -export interface Request { - echo?: RequestEcho | undefined; - flush?: RequestFlush | undefined; - info?: RequestInfo | undefined; - setOption?: RequestSetOption | undefined; - initChain?: RequestInitChain | undefined; - query?: RequestQuery | undefined; - beginBlock?: RequestBeginBlock | undefined; - checkTx?: RequestCheckTx | undefined; - deliverTx?: RequestDeliverTx | undefined; - endBlock?: RequestEndBlock | undefined; - commit?: RequestCommit | undefined; - listSnapshots?: RequestListSnapshots | undefined; - offerSnapshot?: RequestOfferSnapshot | undefined; - loadSnapshotChunk?: RequestLoadSnapshotChunk | undefined; - applySnapshotChunk?: RequestApplySnapshotChunk | undefined; -} -export interface RequestProtoMsg { - typeUrl: "/tendermint.abci.Request"; - value: Uint8Array; -} -export interface RequestAmino { - echo?: RequestEchoAmino | undefined; - flush?: RequestFlushAmino | undefined; - info?: RequestInfoAmino | undefined; - set_option?: RequestSetOptionAmino | undefined; - init_chain?: RequestInitChainAmino | undefined; - query?: RequestQueryAmino | undefined; - begin_block?: RequestBeginBlockAmino | undefined; - check_tx?: RequestCheckTxAmino | undefined; - deliver_tx?: RequestDeliverTxAmino | undefined; - end_block?: RequestEndBlockAmino | undefined; - commit?: RequestCommitAmino | undefined; - list_snapshots?: RequestListSnapshotsAmino | undefined; - offer_snapshot?: RequestOfferSnapshotAmino | undefined; - load_snapshot_chunk?: RequestLoadSnapshotChunkAmino | undefined; - apply_snapshot_chunk?: RequestApplySnapshotChunkAmino | undefined; -} -export interface RequestAminoMsg { - type: "/tendermint.abci.Request"; - value: RequestAmino; -} -export interface RequestSDKType { - echo?: RequestEchoSDKType | undefined; - flush?: RequestFlushSDKType | undefined; - info?: RequestInfoSDKType | undefined; - set_option?: RequestSetOptionSDKType | undefined; - init_chain?: RequestInitChainSDKType | undefined; - query?: RequestQuerySDKType | undefined; - begin_block?: RequestBeginBlockSDKType | undefined; - check_tx?: RequestCheckTxSDKType | undefined; - deliver_tx?: RequestDeliverTxSDKType | undefined; - end_block?: RequestEndBlockSDKType | undefined; - commit?: RequestCommitSDKType | undefined; - list_snapshots?: RequestListSnapshotsSDKType | undefined; - offer_snapshot?: RequestOfferSnapshotSDKType | undefined; - load_snapshot_chunk?: RequestLoadSnapshotChunkSDKType | undefined; - apply_snapshot_chunk?: RequestApplySnapshotChunkSDKType | undefined; -} -export interface RequestEcho { - message: string; -} -export interface RequestEchoProtoMsg { - typeUrl: "/tendermint.abci.RequestEcho"; - value: Uint8Array; -} -export interface RequestEchoAmino { - message: string; -} -export interface RequestEchoAminoMsg { - type: "/tendermint.abci.RequestEcho"; - value: RequestEchoAmino; -} -export interface RequestEchoSDKType { - message: string; -} -export interface RequestFlush {} -export interface RequestFlushProtoMsg { - typeUrl: "/tendermint.abci.RequestFlush"; - value: Uint8Array; -} -export interface RequestFlushAmino {} -export interface RequestFlushAminoMsg { - type: "/tendermint.abci.RequestFlush"; - value: RequestFlushAmino; -} -export interface RequestFlushSDKType {} -export interface RequestInfo { - version: string; - blockVersion: bigint; - p2pVersion: bigint; -} -export interface RequestInfoProtoMsg { - typeUrl: "/tendermint.abci.RequestInfo"; - value: Uint8Array; -} -export interface RequestInfoAmino { - version: string; - block_version: string; - p2p_version: string; -} -export interface RequestInfoAminoMsg { - type: "/tendermint.abci.RequestInfo"; - value: RequestInfoAmino; -} -export interface RequestInfoSDKType { - version: string; - block_version: bigint; - p2p_version: bigint; -} -/** nondeterministic */ -export interface RequestSetOption { - key: string; - value: string; -} -export interface RequestSetOptionProtoMsg { - typeUrl: "/tendermint.abci.RequestSetOption"; - value: Uint8Array; -} -/** nondeterministic */ -export interface RequestSetOptionAmino { - key: string; - value: string; -} -export interface RequestSetOptionAminoMsg { - type: "/tendermint.abci.RequestSetOption"; - value: RequestSetOptionAmino; -} -/** nondeterministic */ -export interface RequestSetOptionSDKType { - key: string; - value: string; -} -export interface RequestInitChain { - time: Date | undefined; - chainId: string; - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appStateBytes: Uint8Array; - initialHeight: bigint; -} -export interface RequestInitChainProtoMsg { - typeUrl: "/tendermint.abci.RequestInitChain"; - value: Uint8Array; -} -export interface RequestInitChainAmino { - time?: Date | undefined; - chain_id: string; - consensus_params?: ConsensusParamsAmino | undefined; - validators: ValidatorUpdateAmino[]; - app_state_bytes: Uint8Array; - initial_height: string; -} -export interface RequestInitChainAminoMsg { - type: "/tendermint.abci.RequestInitChain"; - value: RequestInitChainAmino; -} -export interface RequestInitChainSDKType { - time: Date | undefined; - chain_id: string; - consensus_params: ConsensusParamsSDKType | undefined; - validators: ValidatorUpdateSDKType[]; - app_state_bytes: Uint8Array; - initial_height: bigint; -} -export interface RequestQuery { - data: Uint8Array; - path: string; - height: bigint; - prove: boolean; -} -export interface RequestQueryProtoMsg { - typeUrl: "/tendermint.abci.RequestQuery"; - value: Uint8Array; -} -export interface RequestQueryAmino { - data: Uint8Array; - path: string; - height: string; - prove: boolean; -} -export interface RequestQueryAminoMsg { - type: "/tendermint.abci.RequestQuery"; - value: RequestQueryAmino; -} -export interface RequestQuerySDKType { - data: Uint8Array; - path: string; - height: bigint; - prove: boolean; -} -export interface RequestBeginBlock { - hash: Uint8Array; - header: Header | undefined; - lastCommitInfo: LastCommitInfo | undefined; - byzantineValidators: Evidence[]; -} -export interface RequestBeginBlockProtoMsg { - typeUrl: "/tendermint.abci.RequestBeginBlock"; - value: Uint8Array; -} -export interface RequestBeginBlockAmino { - hash: Uint8Array; - header?: HeaderAmino | undefined; - last_commit_info?: LastCommitInfoAmino | undefined; - byzantine_validators: EvidenceAmino[]; -} -export interface RequestBeginBlockAminoMsg { - type: "/tendermint.abci.RequestBeginBlock"; - value: RequestBeginBlockAmino; -} -export interface RequestBeginBlockSDKType { - hash: Uint8Array; - header: HeaderSDKType | undefined; - last_commit_info: LastCommitInfoSDKType | undefined; - byzantine_validators: EvidenceSDKType[]; -} -export interface RequestCheckTx { - tx: Uint8Array; - type: CheckTxType; -} -export interface RequestCheckTxProtoMsg { - typeUrl: "/tendermint.abci.RequestCheckTx"; - value: Uint8Array; -} -export interface RequestCheckTxAmino { - tx: Uint8Array; - type: CheckTxType; -} -export interface RequestCheckTxAminoMsg { - type: "/tendermint.abci.RequestCheckTx"; - value: RequestCheckTxAmino; -} -export interface RequestCheckTxSDKType { - tx: Uint8Array; - type: CheckTxType; -} -export interface RequestDeliverTx { - tx: Uint8Array; -} -export interface RequestDeliverTxProtoMsg { - typeUrl: "/tendermint.abci.RequestDeliverTx"; - value: Uint8Array; -} -export interface RequestDeliverTxAmino { - tx: Uint8Array; -} -export interface RequestDeliverTxAminoMsg { - type: "/tendermint.abci.RequestDeliverTx"; - value: RequestDeliverTxAmino; -} -export interface RequestDeliverTxSDKType { - tx: Uint8Array; -} -export interface RequestEndBlock { - height: bigint; -} -export interface RequestEndBlockProtoMsg { - typeUrl: "/tendermint.abci.RequestEndBlock"; - value: Uint8Array; -} -export interface RequestEndBlockAmino { - height: string; -} -export interface RequestEndBlockAminoMsg { - type: "/tendermint.abci.RequestEndBlock"; - value: RequestEndBlockAmino; -} -export interface RequestEndBlockSDKType { - height: bigint; -} -export interface RequestCommit {} -export interface RequestCommitProtoMsg { - typeUrl: "/tendermint.abci.RequestCommit"; - value: Uint8Array; -} -export interface RequestCommitAmino {} -export interface RequestCommitAminoMsg { - type: "/tendermint.abci.RequestCommit"; - value: RequestCommitAmino; -} -export interface RequestCommitSDKType {} -/** lists available snapshots */ -export interface RequestListSnapshots {} -export interface RequestListSnapshotsProtoMsg { - typeUrl: "/tendermint.abci.RequestListSnapshots"; - value: Uint8Array; -} -/** lists available snapshots */ -export interface RequestListSnapshotsAmino {} -export interface RequestListSnapshotsAminoMsg { - type: "/tendermint.abci.RequestListSnapshots"; - value: RequestListSnapshotsAmino; -} -/** lists available snapshots */ -export interface RequestListSnapshotsSDKType {} -/** offers a snapshot to the application */ -export interface RequestOfferSnapshot { - /** snapshot offered by peers */ - snapshot: Snapshot | undefined; - /** light client-verified app hash for snapshot height */ - appHash: Uint8Array; -} -export interface RequestOfferSnapshotProtoMsg { - typeUrl: "/tendermint.abci.RequestOfferSnapshot"; - value: Uint8Array; -} -/** offers a snapshot to the application */ -export interface RequestOfferSnapshotAmino { - /** snapshot offered by peers */ - snapshot?: SnapshotAmino | undefined; - /** light client-verified app hash for snapshot height */ - app_hash: Uint8Array; -} -export interface RequestOfferSnapshotAminoMsg { - type: "/tendermint.abci.RequestOfferSnapshot"; - value: RequestOfferSnapshotAmino; -} -/** offers a snapshot to the application */ -export interface RequestOfferSnapshotSDKType { - snapshot: SnapshotSDKType | undefined; - app_hash: Uint8Array; -} -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunk { - height: bigint; - format: number; - chunk: number; -} -export interface RequestLoadSnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk"; - value: Uint8Array; -} -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunkAmino { - height: string; - format: number; - chunk: number; -} -export interface RequestLoadSnapshotChunkAminoMsg { - type: "/tendermint.abci.RequestLoadSnapshotChunk"; - value: RequestLoadSnapshotChunkAmino; -} -/** loads a snapshot chunk */ -export interface RequestLoadSnapshotChunkSDKType { - height: bigint; - format: number; - chunk: number; -} -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunk { - index: number; - chunk: Uint8Array; - sender: string; -} -export interface RequestApplySnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk"; - value: Uint8Array; -} -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunkAmino { - index: number; - chunk: Uint8Array; - sender: string; -} -export interface RequestApplySnapshotChunkAminoMsg { - type: "/tendermint.abci.RequestApplySnapshotChunk"; - value: RequestApplySnapshotChunkAmino; -} -/** Applies a snapshot chunk */ -export interface RequestApplySnapshotChunkSDKType { - index: number; - chunk: Uint8Array; - sender: string; -} -export interface Response { - exception?: ResponseException | undefined; - echo?: ResponseEcho | undefined; - flush?: ResponseFlush | undefined; - info?: ResponseInfo | undefined; - setOption?: ResponseSetOption | undefined; - initChain?: ResponseInitChain | undefined; - query?: ResponseQuery | undefined; - beginBlock?: ResponseBeginBlock | undefined; - checkTx?: ResponseCheckTx | undefined; - deliverTx?: ResponseDeliverTx | undefined; - endBlock?: ResponseEndBlock | undefined; - commit?: ResponseCommit | undefined; - listSnapshots?: ResponseListSnapshots | undefined; - offerSnapshot?: ResponseOfferSnapshot | undefined; - loadSnapshotChunk?: ResponseLoadSnapshotChunk | undefined; - applySnapshotChunk?: ResponseApplySnapshotChunk | undefined; -} -export interface ResponseProtoMsg { - typeUrl: "/tendermint.abci.Response"; - value: Uint8Array; -} -export interface ResponseAmino { - exception?: ResponseExceptionAmino | undefined; - echo?: ResponseEchoAmino | undefined; - flush?: ResponseFlushAmino | undefined; - info?: ResponseInfoAmino | undefined; - set_option?: ResponseSetOptionAmino | undefined; - init_chain?: ResponseInitChainAmino | undefined; - query?: ResponseQueryAmino | undefined; - begin_block?: ResponseBeginBlockAmino | undefined; - check_tx?: ResponseCheckTxAmino | undefined; - deliver_tx?: ResponseDeliverTxAmino | undefined; - end_block?: ResponseEndBlockAmino | undefined; - commit?: ResponseCommitAmino | undefined; - list_snapshots?: ResponseListSnapshotsAmino | undefined; - offer_snapshot?: ResponseOfferSnapshotAmino | undefined; - load_snapshot_chunk?: ResponseLoadSnapshotChunkAmino | undefined; - apply_snapshot_chunk?: ResponseApplySnapshotChunkAmino | undefined; -} -export interface ResponseAminoMsg { - type: "/tendermint.abci.Response"; - value: ResponseAmino; -} -export interface ResponseSDKType { - exception?: ResponseExceptionSDKType | undefined; - echo?: ResponseEchoSDKType | undefined; - flush?: ResponseFlushSDKType | undefined; - info?: ResponseInfoSDKType | undefined; - set_option?: ResponseSetOptionSDKType | undefined; - init_chain?: ResponseInitChainSDKType | undefined; - query?: ResponseQuerySDKType | undefined; - begin_block?: ResponseBeginBlockSDKType | undefined; - check_tx?: ResponseCheckTxSDKType | undefined; - deliver_tx?: ResponseDeliverTxSDKType | undefined; - end_block?: ResponseEndBlockSDKType | undefined; - commit?: ResponseCommitSDKType | undefined; - list_snapshots?: ResponseListSnapshotsSDKType | undefined; - offer_snapshot?: ResponseOfferSnapshotSDKType | undefined; - load_snapshot_chunk?: ResponseLoadSnapshotChunkSDKType | undefined; - apply_snapshot_chunk?: ResponseApplySnapshotChunkSDKType | undefined; -} -/** nondeterministic */ -export interface ResponseException { - error: string; -} -export interface ResponseExceptionProtoMsg { - typeUrl: "/tendermint.abci.ResponseException"; - value: Uint8Array; -} -/** nondeterministic */ -export interface ResponseExceptionAmino { - error: string; -} -export interface ResponseExceptionAminoMsg { - type: "/tendermint.abci.ResponseException"; - value: ResponseExceptionAmino; -} -/** nondeterministic */ -export interface ResponseExceptionSDKType { - error: string; -} -export interface ResponseEcho { - message: string; -} -export interface ResponseEchoProtoMsg { - typeUrl: "/tendermint.abci.ResponseEcho"; - value: Uint8Array; -} -export interface ResponseEchoAmino { - message: string; -} -export interface ResponseEchoAminoMsg { - type: "/tendermint.abci.ResponseEcho"; - value: ResponseEchoAmino; -} -export interface ResponseEchoSDKType { - message: string; -} -export interface ResponseFlush {} -export interface ResponseFlushProtoMsg { - typeUrl: "/tendermint.abci.ResponseFlush"; - value: Uint8Array; -} -export interface ResponseFlushAmino {} -export interface ResponseFlushAminoMsg { - type: "/tendermint.abci.ResponseFlush"; - value: ResponseFlushAmino; -} -export interface ResponseFlushSDKType {} -export interface ResponseInfo { - data: string; - version: string; - appVersion: bigint; - lastBlockHeight: bigint; - lastBlockAppHash: Uint8Array; -} -export interface ResponseInfoProtoMsg { - typeUrl: "/tendermint.abci.ResponseInfo"; - value: Uint8Array; -} -export interface ResponseInfoAmino { - data: string; - version: string; - app_version: string; - last_block_height: string; - last_block_app_hash: Uint8Array; -} -export interface ResponseInfoAminoMsg { - type: "/tendermint.abci.ResponseInfo"; - value: ResponseInfoAmino; -} -export interface ResponseInfoSDKType { - data: string; - version: string; - app_version: bigint; - last_block_height: bigint; - last_block_app_hash: Uint8Array; -} -/** nondeterministic */ -export interface ResponseSetOption { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} -export interface ResponseSetOptionProtoMsg { - typeUrl: "/tendermint.abci.ResponseSetOption"; - value: Uint8Array; -} -/** nondeterministic */ -export interface ResponseSetOptionAmino { - code: number; - /** bytes data = 2; */ - log: string; - info: string; -} -export interface ResponseSetOptionAminoMsg { - type: "/tendermint.abci.ResponseSetOption"; - value: ResponseSetOptionAmino; -} -/** nondeterministic */ -export interface ResponseSetOptionSDKType { - code: number; - log: string; - info: string; -} -export interface ResponseInitChain { - consensusParams: ConsensusParams | undefined; - validators: ValidatorUpdate[]; - appHash: Uint8Array; -} -export interface ResponseInitChainProtoMsg { - typeUrl: "/tendermint.abci.ResponseInitChain"; - value: Uint8Array; -} -export interface ResponseInitChainAmino { - consensus_params?: ConsensusParamsAmino | undefined; - validators: ValidatorUpdateAmino[]; - app_hash: Uint8Array; -} -export interface ResponseInitChainAminoMsg { - type: "/tendermint.abci.ResponseInitChain"; - value: ResponseInitChainAmino; -} -export interface ResponseInitChainSDKType { - consensus_params: ConsensusParamsSDKType | undefined; - validators: ValidatorUpdateSDKType[]; - app_hash: Uint8Array; -} -export interface ResponseQuery { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: bigint; - key: Uint8Array; - value: Uint8Array; - proofOps: ProofOps | undefined; - height: bigint; - codespace: string; -} -export interface ResponseQueryProtoMsg { - typeUrl: "/tendermint.abci.ResponseQuery"; - value: Uint8Array; -} -export interface ResponseQueryAmino { - code: number; - /** bytes data = 2; // use "value" instead. */ - log: string; - /** nondeterministic */ - info: string; - index: string; - key: Uint8Array; - value: Uint8Array; - proof_ops?: ProofOpsAmino | undefined; - height: string; - codespace: string; -} -export interface ResponseQueryAminoMsg { - type: "/tendermint.abci.ResponseQuery"; - value: ResponseQueryAmino; -} -export interface ResponseQuerySDKType { - code: number; - log: string; - info: string; - index: bigint; - key: Uint8Array; - value: Uint8Array; - proof_ops: ProofOpsSDKType | undefined; - height: bigint; - codespace: string; -} -export interface ResponseBeginBlock { - events: Event[]; -} -export interface ResponseBeginBlockProtoMsg { - typeUrl: "/tendermint.abci.ResponseBeginBlock"; - value: Uint8Array; -} -export interface ResponseBeginBlockAmino { - events: EventAmino[]; -} -export interface ResponseBeginBlockAminoMsg { - type: "/tendermint.abci.ResponseBeginBlock"; - value: ResponseBeginBlockAmino; -} -export interface ResponseBeginBlockSDKType { - events: EventSDKType[]; -} -export interface ResponseCheckTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: bigint; - gasUsed: bigint; - events: Event[]; - codespace: string; -} -export interface ResponseCheckTxProtoMsg { - typeUrl: "/tendermint.abci.ResponseCheckTx"; - value: Uint8Array; -} -export interface ResponseCheckTxAmino { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gas_wanted: string; - gas_used: string; - events: EventAmino[]; - codespace: string; -} -export interface ResponseCheckTxAminoMsg { - type: "/tendermint.abci.ResponseCheckTx"; - value: ResponseCheckTxAmino; -} -export interface ResponseCheckTxSDKType { - code: number; - data: Uint8Array; - log: string; - info: string; - gas_wanted: bigint; - gas_used: bigint; - events: EventSDKType[]; - codespace: string; -} -export interface ResponseDeliverTx { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gasWanted: bigint; - gasUsed: bigint; - events: Event[]; - codespace: string; -} -export interface ResponseDeliverTxProtoMsg { - typeUrl: "/tendermint.abci.ResponseDeliverTx"; - value: Uint8Array; -} -export interface ResponseDeliverTxAmino { - code: number; - data: Uint8Array; - /** nondeterministic */ - log: string; - /** nondeterministic */ - info: string; - gas_wanted: string; - gas_used: string; - events: EventAmino[]; - codespace: string; -} -export interface ResponseDeliverTxAminoMsg { - type: "/tendermint.abci.ResponseDeliverTx"; - value: ResponseDeliverTxAmino; -} -export interface ResponseDeliverTxSDKType { - code: number; - data: Uint8Array; - log: string; - info: string; - gas_wanted: bigint; - gas_used: bigint; - events: EventSDKType[]; - codespace: string; -} -export interface ResponseEndBlock { - validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates: ConsensusParams | undefined; - events: Event[]; -} -export interface ResponseEndBlockProtoMsg { - typeUrl: "/tendermint.abci.ResponseEndBlock"; - value: Uint8Array; -} -export interface ResponseEndBlockAmino { - validator_updates: ValidatorUpdateAmino[]; - consensus_param_updates?: ConsensusParamsAmino | undefined; - events: EventAmino[]; -} -export interface ResponseEndBlockAminoMsg { - type: "/tendermint.abci.ResponseEndBlock"; - value: ResponseEndBlockAmino; -} -export interface ResponseEndBlockSDKType { - validator_updates: ValidatorUpdateSDKType[]; - consensus_param_updates: ConsensusParamsSDKType | undefined; - events: EventSDKType[]; -} -export interface ResponseCommit { - /** reserve 1 */ - data: Uint8Array; - retainHeight: bigint; -} -export interface ResponseCommitProtoMsg { - typeUrl: "/tendermint.abci.ResponseCommit"; - value: Uint8Array; -} -export interface ResponseCommitAmino { - /** reserve 1 */ - data: Uint8Array; - retain_height: string; -} -export interface ResponseCommitAminoMsg { - type: "/tendermint.abci.ResponseCommit"; - value: ResponseCommitAmino; -} -export interface ResponseCommitSDKType { - data: Uint8Array; - retain_height: bigint; -} -export interface ResponseListSnapshots { - snapshots: Snapshot[]; -} -export interface ResponseListSnapshotsProtoMsg { - typeUrl: "/tendermint.abci.ResponseListSnapshots"; - value: Uint8Array; -} -export interface ResponseListSnapshotsAmino { - snapshots: SnapshotAmino[]; -} -export interface ResponseListSnapshotsAminoMsg { - type: "/tendermint.abci.ResponseListSnapshots"; - value: ResponseListSnapshotsAmino; -} -export interface ResponseListSnapshotsSDKType { - snapshots: SnapshotSDKType[]; -} -export interface ResponseOfferSnapshot { - result: ResponseOfferSnapshot_Result; -} -export interface ResponseOfferSnapshotProtoMsg { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot"; - value: Uint8Array; -} -export interface ResponseOfferSnapshotAmino { - result: ResponseOfferSnapshot_Result; -} -export interface ResponseOfferSnapshotAminoMsg { - type: "/tendermint.abci.ResponseOfferSnapshot"; - value: ResponseOfferSnapshotAmino; -} -export interface ResponseOfferSnapshotSDKType { - result: ResponseOfferSnapshot_Result; -} -export interface ResponseLoadSnapshotChunk { - chunk: Uint8Array; -} -export interface ResponseLoadSnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk"; - value: Uint8Array; -} -export interface ResponseLoadSnapshotChunkAmino { - chunk: Uint8Array; -} -export interface ResponseLoadSnapshotChunkAminoMsg { - type: "/tendermint.abci.ResponseLoadSnapshotChunk"; - value: ResponseLoadSnapshotChunkAmino; -} -export interface ResponseLoadSnapshotChunkSDKType { - chunk: Uint8Array; -} -export interface ResponseApplySnapshotChunk { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetchChunks: number[]; - /** Chunk senders to reject and ban */ - rejectSenders: string[]; -} -export interface ResponseApplySnapshotChunkProtoMsg { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk"; - value: Uint8Array; -} -export interface ResponseApplySnapshotChunkAmino { - result: ResponseApplySnapshotChunk_Result; - /** Chunks to refetch and reapply */ - refetch_chunks: number[]; - /** Chunk senders to reject and ban */ - reject_senders: string[]; -} -export interface ResponseApplySnapshotChunkAminoMsg { - type: "/tendermint.abci.ResponseApplySnapshotChunk"; - value: ResponseApplySnapshotChunkAmino; -} -export interface ResponseApplySnapshotChunkSDKType { - result: ResponseApplySnapshotChunk_Result; - refetch_chunks: number[]; - reject_senders: string[]; -} -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} -export interface ConsensusParamsProtoMsg { - typeUrl: "/tendermint.abci.ConsensusParams"; - value: Uint8Array; -} -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParamsAmino { - block?: BlockParamsAmino | undefined; - evidence?: EvidenceParamsAmino | undefined; - validator?: ValidatorParamsAmino | undefined; - version?: VersionParamsAmino | undefined; -} -export interface ConsensusParamsAminoMsg { - type: "/tendermint.abci.ConsensusParams"; - value: ConsensusParamsAmino; -} -/** - * ConsensusParams contains all consensus-relevant parameters - * that can be adjusted by the abci app - */ -export interface ConsensusParamsSDKType { - block: BlockParamsSDKType | undefined; - evidence: EvidenceParamsSDKType | undefined; - validator: ValidatorParamsSDKType | undefined; - version: VersionParamsSDKType | undefined; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** Note: must be greater than 0 */ - maxBytes: bigint; - /** Note: must be greater or equal to -1 */ - maxGas: bigint; -} -export interface BlockParamsProtoMsg { - typeUrl: "/tendermint.abci.BlockParams"; - value: Uint8Array; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParamsAmino { - /** Note: must be greater than 0 */ - max_bytes: string; - /** Note: must be greater or equal to -1 */ - max_gas: string; -} -export interface BlockParamsAminoMsg { - type: "/tendermint.abci.BlockParams"; - value: BlockParamsAmino; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParamsSDKType { - max_bytes: bigint; - max_gas: bigint; -} -export interface LastCommitInfo { - round: number; - votes: VoteInfo[]; -} -export interface LastCommitInfoProtoMsg { - typeUrl: "/tendermint.abci.LastCommitInfo"; - value: Uint8Array; -} -export interface LastCommitInfoAmino { - round: number; - votes: VoteInfoAmino[]; -} -export interface LastCommitInfoAminoMsg { - type: "/tendermint.abci.LastCommitInfo"; - value: LastCommitInfoAmino; -} -export interface LastCommitInfoSDKType { - round: number; - votes: VoteInfoSDKType[]; -} -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface Event { - type: string; - attributes: EventAttribute[]; -} -export interface EventProtoMsg { - typeUrl: "/tendermint.abci.Event"; - value: Uint8Array; -} -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface EventAmino { - type: string; - attributes: EventAttributeAmino[]; -} -export interface EventAminoMsg { - type: "/tendermint.abci.Event"; - value: EventAmino; -} -/** - * Event allows application developers to attach additional information to - * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. - * Later, transactions may be queried using these events. - */ -export interface EventSDKType { - type: string; - attributes: EventAttributeSDKType[]; -} -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttribute { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} -export interface EventAttributeProtoMsg { - typeUrl: "/tendermint.abci.EventAttribute"; - value: Uint8Array; -} -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttributeAmino { - key: Uint8Array; - value: Uint8Array; - /** nondeterministic */ - index: boolean; -} -export interface EventAttributeAminoMsg { - type: "/tendermint.abci.EventAttribute"; - value: EventAttributeAmino; -} -/** EventAttribute is a single key-value pair, associated with an event. */ -export interface EventAttributeSDKType { - key: Uint8Array; - value: Uint8Array; - index: boolean; -} -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResult { - height: bigint; - index: number; - tx: Uint8Array; - result: ResponseDeliverTx | undefined; -} -export interface TxResultProtoMsg { - typeUrl: "/tendermint.abci.TxResult"; - value: Uint8Array; -} -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResultAmino { - height: string; - index: number; - tx: Uint8Array; - result?: ResponseDeliverTxAmino | undefined; -} -export interface TxResultAminoMsg { - type: "/tendermint.abci.TxResult"; - value: TxResultAmino; -} -/** - * TxResult contains results of executing the transaction. - * - * One usage is indexing transaction results. - */ -export interface TxResultSDKType { - height: bigint; - index: number; - tx: Uint8Array; - result: ResponseDeliverTxSDKType | undefined; -} -/** Validator */ -export interface Validator { - /** - * The first 20 bytes of SHA256(public key) - * PubKey pub_key = 2 [(gogoproto.nullable)=false]; - */ - address: Uint8Array; - /** The voting power */ - power: bigint; -} -export interface ValidatorProtoMsg { - typeUrl: "/tendermint.abci.Validator"; - value: Uint8Array; -} -/** Validator */ -export interface ValidatorAmino { - /** - * The first 20 bytes of SHA256(public key) - * PubKey pub_key = 2 [(gogoproto.nullable)=false]; - */ - address: Uint8Array; - /** The voting power */ - power: string; -} -export interface ValidatorAminoMsg { - type: "/tendermint.abci.Validator"; - value: ValidatorAmino; -} -/** Validator */ -export interface ValidatorSDKType { - address: Uint8Array; - power: bigint; -} -/** ValidatorUpdate */ -export interface ValidatorUpdate { - pubKey: PublicKey | undefined; - power: bigint; -} -export interface ValidatorUpdateProtoMsg { - typeUrl: "/tendermint.abci.ValidatorUpdate"; - value: Uint8Array; -} -/** ValidatorUpdate */ -export interface ValidatorUpdateAmino { - pub_key?: PublicKeyAmino | undefined; - power: string; -} -export interface ValidatorUpdateAminoMsg { - type: "/tendermint.abci.ValidatorUpdate"; - value: ValidatorUpdateAmino; -} -/** ValidatorUpdate */ -export interface ValidatorUpdateSDKType { - pub_key: PublicKeySDKType | undefined; - power: bigint; -} -/** VoteInfo */ -export interface VoteInfo { - validator: Validator | undefined; - signedLastBlock: boolean; -} -export interface VoteInfoProtoMsg { - typeUrl: "/tendermint.abci.VoteInfo"; - value: Uint8Array; -} -/** VoteInfo */ -export interface VoteInfoAmino { - validator?: ValidatorAmino | undefined; - signed_last_block: boolean; -} -export interface VoteInfoAminoMsg { - type: "/tendermint.abci.VoteInfo"; - value: VoteInfoAmino; -} -/** VoteInfo */ -export interface VoteInfoSDKType { - validator: ValidatorSDKType | undefined; - signed_last_block: boolean; -} -export interface Evidence { - type: EvidenceType; - /** The offending validator */ - validator: Validator | undefined; - /** The height when the offense occurred */ - height: bigint; - /** The corresponding time where the offense occurred */ - time: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - totalVotingPower: bigint; -} -export interface EvidenceProtoMsg { - typeUrl: "/tendermint.abci.Evidence"; - value: Uint8Array; -} -export interface EvidenceAmino { - type: EvidenceType; - /** The offending validator */ - validator?: ValidatorAmino | undefined; - /** The height when the offense occurred */ - height: string; - /** The corresponding time where the offense occurred */ - time?: Date | undefined; - /** - * Total voting power of the validator set in case the ABCI application does - * not store historical validators. - * https://github.com/tendermint/tendermint/issues/4581 - */ - total_voting_power: string; -} -export interface EvidenceAminoMsg { - type: "/tendermint.abci.Evidence"; - value: EvidenceAmino; -} -export interface EvidenceSDKType { - type: EvidenceType; - validator: ValidatorSDKType | undefined; - height: bigint; - time: Date | undefined; - total_voting_power: bigint; -} -export interface Snapshot { - /** The height at which the snapshot was taken */ - height: bigint; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} -export interface SnapshotProtoMsg { - typeUrl: "/tendermint.abci.Snapshot"; - value: Uint8Array; -} -export interface SnapshotAmino { - /** The height at which the snapshot was taken */ - height: string; - /** The application-specific snapshot format */ - format: number; - /** Number of chunks in the snapshot */ - chunks: number; - /** Arbitrary snapshot hash, equal only if identical */ - hash: Uint8Array; - /** Arbitrary application metadata */ - metadata: Uint8Array; -} -export interface SnapshotAminoMsg { - type: "/tendermint.abci.Snapshot"; - value: SnapshotAmino; -} -export interface SnapshotSDKType { - height: bigint; - format: number; - chunks: number; - hash: Uint8Array; - metadata: Uint8Array; -} -function createBaseRequest(): Request { - return { - echo: undefined, - flush: undefined, - info: undefined, - setOption: undefined, - initChain: undefined, - query: undefined, - beginBlock: undefined, - checkTx: undefined, - deliverTx: undefined, - endBlock: undefined, - commit: undefined, - listSnapshots: undefined, - offerSnapshot: undefined, - loadSnapshotChunk: undefined, - applySnapshotChunk: undefined - }; -} -export const Request = { - typeUrl: "/tendermint.abci.Request", - encode(message: Request, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.echo !== undefined) { - RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim(); - } - if (message.flush !== undefined) { - RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim(); - } - if (message.info !== undefined) { - RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); - } - if (message.setOption !== undefined) { - RequestSetOption.encode(message.setOption, writer.uint32(34).fork()).ldelim(); - } - if (message.initChain !== undefined) { - RequestInitChain.encode(message.initChain, writer.uint32(42).fork()).ldelim(); - } - if (message.query !== undefined) { - RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - RequestBeginBlock.encode(message.beginBlock, writer.uint32(58).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - RequestDeliverTx.encode(message.deliverTx, writer.uint32(74).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - RequestEndBlock.encode(message.endBlock, writer.uint32(82).fork()).ldelim(); - } - if (message.commit !== undefined) { - RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - RequestListSnapshots.encode(message.listSnapshots, writer.uint32(98).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(106).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(114).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Request { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.setOption = RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.initChain = RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.beginBlock = RequestBeginBlock.decode(reader, reader.uint32()); - break; - case 8: - message.checkTx = RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.endBlock = RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32()); - break; - case 13: - message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32()); - break; - case 14: - message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 15: - message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Request { - return { - echo: isSet(object.echo) ? RequestEcho.fromJSON(object.echo) : undefined, - flush: isSet(object.flush) ? RequestFlush.fromJSON(object.flush) : undefined, - info: isSet(object.info) ? RequestInfo.fromJSON(object.info) : undefined, - setOption: isSet(object.setOption) ? RequestSetOption.fromJSON(object.setOption) : undefined, - initChain: isSet(object.initChain) ? RequestInitChain.fromJSON(object.initChain) : undefined, - query: isSet(object.query) ? RequestQuery.fromJSON(object.query) : undefined, - beginBlock: isSet(object.beginBlock) ? RequestBeginBlock.fromJSON(object.beginBlock) : undefined, - checkTx: isSet(object.checkTx) ? RequestCheckTx.fromJSON(object.checkTx) : undefined, - deliverTx: isSet(object.deliverTx) ? RequestDeliverTx.fromJSON(object.deliverTx) : undefined, - endBlock: isSet(object.endBlock) ? RequestEndBlock.fromJSON(object.endBlock) : undefined, - commit: isSet(object.commit) ? RequestCommit.fromJSON(object.commit) : undefined, - listSnapshots: isSet(object.listSnapshots) ? RequestListSnapshots.fromJSON(object.listSnapshots) : undefined, - offerSnapshot: isSet(object.offerSnapshot) ? RequestOfferSnapshot.fromJSON(object.offerSnapshot) : undefined, - loadSnapshotChunk: isSet(object.loadSnapshotChunk) ? RequestLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk) : undefined, - applySnapshotChunk: isSet(object.applySnapshotChunk) ? RequestApplySnapshotChunk.fromJSON(object.applySnapshotChunk) : undefined - }; - }, - toJSON(message: Request): unknown { - const obj: any = {}; - message.echo !== undefined && (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && (obj.flush = message.flush ? RequestFlush.toJSON(message.flush) : undefined); - message.info !== undefined && (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && (obj.setOption = message.setOption ? RequestSetOption.toJSON(message.setOption) : undefined); - message.initChain !== undefined && (obj.initChain = message.initChain ? RequestInitChain.toJSON(message.initChain) : undefined); - message.query !== undefined && (obj.query = message.query ? RequestQuery.toJSON(message.query) : undefined); - message.beginBlock !== undefined && (obj.beginBlock = message.beginBlock ? RequestBeginBlock.toJSON(message.beginBlock) : undefined); - message.checkTx !== undefined && (obj.checkTx = message.checkTx ? RequestCheckTx.toJSON(message.checkTx) : undefined); - message.deliverTx !== undefined && (obj.deliverTx = message.deliverTx ? RequestDeliverTx.toJSON(message.deliverTx) : undefined); - message.endBlock !== undefined && (obj.endBlock = message.endBlock ? RequestEndBlock.toJSON(message.endBlock) : undefined); - message.commit !== undefined && (obj.commit = message.commit ? RequestCommit.toJSON(message.commit) : undefined); - message.listSnapshots !== undefined && (obj.listSnapshots = message.listSnapshots ? RequestListSnapshots.toJSON(message.listSnapshots) : undefined); - message.offerSnapshot !== undefined && (obj.offerSnapshot = message.offerSnapshot ? RequestOfferSnapshot.toJSON(message.offerSnapshot) : undefined); - message.loadSnapshotChunk !== undefined && (obj.loadSnapshotChunk = message.loadSnapshotChunk ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) : undefined); - message.applySnapshotChunk !== undefined && (obj.applySnapshotChunk = message.applySnapshotChunk ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Request { - const message = createBaseRequest(); - message.echo = object.echo !== undefined && object.echo !== null ? RequestEcho.fromPartial(object.echo) : undefined; - message.flush = object.flush !== undefined && object.flush !== null ? RequestFlush.fromPartial(object.flush) : undefined; - message.info = object.info !== undefined && object.info !== null ? RequestInfo.fromPartial(object.info) : undefined; - message.setOption = object.setOption !== undefined && object.setOption !== null ? RequestSetOption.fromPartial(object.setOption) : undefined; - message.initChain = object.initChain !== undefined && object.initChain !== null ? RequestInitChain.fromPartial(object.initChain) : undefined; - message.query = object.query !== undefined && object.query !== null ? RequestQuery.fromPartial(object.query) : undefined; - message.beginBlock = object.beginBlock !== undefined && object.beginBlock !== null ? RequestBeginBlock.fromPartial(object.beginBlock) : undefined; - message.checkTx = object.checkTx !== undefined && object.checkTx !== null ? RequestCheckTx.fromPartial(object.checkTx) : undefined; - message.deliverTx = object.deliverTx !== undefined && object.deliverTx !== null ? RequestDeliverTx.fromPartial(object.deliverTx) : undefined; - message.endBlock = object.endBlock !== undefined && object.endBlock !== null ? RequestEndBlock.fromPartial(object.endBlock) : undefined; - message.commit = object.commit !== undefined && object.commit !== null ? RequestCommit.fromPartial(object.commit) : undefined; - message.listSnapshots = object.listSnapshots !== undefined && object.listSnapshots !== null ? RequestListSnapshots.fromPartial(object.listSnapshots) : undefined; - message.offerSnapshot = object.offerSnapshot !== undefined && object.offerSnapshot !== null ? RequestOfferSnapshot.fromPartial(object.offerSnapshot) : undefined; - message.loadSnapshotChunk = object.loadSnapshotChunk !== undefined && object.loadSnapshotChunk !== null ? RequestLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk) : undefined; - message.applySnapshotChunk = object.applySnapshotChunk !== undefined && object.applySnapshotChunk !== null ? RequestApplySnapshotChunk.fromPartial(object.applySnapshotChunk) : undefined; - return message; - }, - fromSDK(object: RequestSDKType): Request { - return { - echo: object.echo ? RequestEcho.fromSDK(object.echo) : undefined, - flush: object.flush ? RequestFlush.fromSDK(object.flush) : undefined, - info: object.info ? RequestInfo.fromSDK(object.info) : undefined, - setOption: object.set_option ? RequestSetOption.fromSDK(object.set_option) : undefined, - initChain: object.init_chain ? RequestInitChain.fromSDK(object.init_chain) : undefined, - query: object.query ? RequestQuery.fromSDK(object.query) : undefined, - beginBlock: object.begin_block ? RequestBeginBlock.fromSDK(object.begin_block) : undefined, - checkTx: object.check_tx ? RequestCheckTx.fromSDK(object.check_tx) : undefined, - deliverTx: object.deliver_tx ? RequestDeliverTx.fromSDK(object.deliver_tx) : undefined, - endBlock: object.end_block ? RequestEndBlock.fromSDK(object.end_block) : undefined, - commit: object.commit ? RequestCommit.fromSDK(object.commit) : undefined, - listSnapshots: object.list_snapshots ? RequestListSnapshots.fromSDK(object.list_snapshots) : undefined, - offerSnapshot: object.offer_snapshot ? RequestOfferSnapshot.fromSDK(object.offer_snapshot) : undefined, - loadSnapshotChunk: object.load_snapshot_chunk ? RequestLoadSnapshotChunk.fromSDK(object.load_snapshot_chunk) : undefined, - applySnapshotChunk: object.apply_snapshot_chunk ? RequestApplySnapshotChunk.fromSDK(object.apply_snapshot_chunk) : undefined - }; - }, - toSDK(message: Request): RequestSDKType { - const obj: any = {}; - message.echo !== undefined && (obj.echo = message.echo ? RequestEcho.toSDK(message.echo) : undefined); - message.flush !== undefined && (obj.flush = message.flush ? RequestFlush.toSDK(message.flush) : undefined); - message.info !== undefined && (obj.info = message.info ? RequestInfo.toSDK(message.info) : undefined); - message.setOption !== undefined && (obj.set_option = message.setOption ? RequestSetOption.toSDK(message.setOption) : undefined); - message.initChain !== undefined && (obj.init_chain = message.initChain ? RequestInitChain.toSDK(message.initChain) : undefined); - message.query !== undefined && (obj.query = message.query ? RequestQuery.toSDK(message.query) : undefined); - message.beginBlock !== undefined && (obj.begin_block = message.beginBlock ? RequestBeginBlock.toSDK(message.beginBlock) : undefined); - message.checkTx !== undefined && (obj.check_tx = message.checkTx ? RequestCheckTx.toSDK(message.checkTx) : undefined); - message.deliverTx !== undefined && (obj.deliver_tx = message.deliverTx ? RequestDeliverTx.toSDK(message.deliverTx) : undefined); - message.endBlock !== undefined && (obj.end_block = message.endBlock ? RequestEndBlock.toSDK(message.endBlock) : undefined); - message.commit !== undefined && (obj.commit = message.commit ? RequestCommit.toSDK(message.commit) : undefined); - message.listSnapshots !== undefined && (obj.list_snapshots = message.listSnapshots ? RequestListSnapshots.toSDK(message.listSnapshots) : undefined); - message.offerSnapshot !== undefined && (obj.offer_snapshot = message.offerSnapshot ? RequestOfferSnapshot.toSDK(message.offerSnapshot) : undefined); - message.loadSnapshotChunk !== undefined && (obj.load_snapshot_chunk = message.loadSnapshotChunk ? RequestLoadSnapshotChunk.toSDK(message.loadSnapshotChunk) : undefined); - message.applySnapshotChunk !== undefined && (obj.apply_snapshot_chunk = message.applySnapshotChunk ? RequestApplySnapshotChunk.toSDK(message.applySnapshotChunk) : undefined); - return obj; - }, - fromAmino(object: RequestAmino): Request { - return { - echo: object?.echo ? RequestEcho.fromAmino(object.echo) : undefined, - flush: object?.flush ? RequestFlush.fromAmino(object.flush) : undefined, - info: object?.info ? RequestInfo.fromAmino(object.info) : undefined, - setOption: object?.set_option ? RequestSetOption.fromAmino(object.set_option) : undefined, - initChain: object?.init_chain ? RequestInitChain.fromAmino(object.init_chain) : undefined, - query: object?.query ? RequestQuery.fromAmino(object.query) : undefined, - beginBlock: object?.begin_block ? RequestBeginBlock.fromAmino(object.begin_block) : undefined, - checkTx: object?.check_tx ? RequestCheckTx.fromAmino(object.check_tx) : undefined, - deliverTx: object?.deliver_tx ? RequestDeliverTx.fromAmino(object.deliver_tx) : undefined, - endBlock: object?.end_block ? RequestEndBlock.fromAmino(object.end_block) : undefined, - commit: object?.commit ? RequestCommit.fromAmino(object.commit) : undefined, - listSnapshots: object?.list_snapshots ? RequestListSnapshots.fromAmino(object.list_snapshots) : undefined, - offerSnapshot: object?.offer_snapshot ? RequestOfferSnapshot.fromAmino(object.offer_snapshot) : undefined, - loadSnapshotChunk: object?.load_snapshot_chunk ? RequestLoadSnapshotChunk.fromAmino(object.load_snapshot_chunk) : undefined, - applySnapshotChunk: object?.apply_snapshot_chunk ? RequestApplySnapshotChunk.fromAmino(object.apply_snapshot_chunk) : undefined - }; - }, - toAmino(message: Request): RequestAmino { - const obj: any = {}; - obj.echo = message.echo ? RequestEcho.toAmino(message.echo) : undefined; - obj.flush = message.flush ? RequestFlush.toAmino(message.flush) : undefined; - obj.info = message.info ? RequestInfo.toAmino(message.info) : undefined; - obj.set_option = message.setOption ? RequestSetOption.toAmino(message.setOption) : undefined; - obj.init_chain = message.initChain ? RequestInitChain.toAmino(message.initChain) : undefined; - obj.query = message.query ? RequestQuery.toAmino(message.query) : undefined; - obj.begin_block = message.beginBlock ? RequestBeginBlock.toAmino(message.beginBlock) : undefined; - obj.check_tx = message.checkTx ? RequestCheckTx.toAmino(message.checkTx) : undefined; - obj.deliver_tx = message.deliverTx ? RequestDeliverTx.toAmino(message.deliverTx) : undefined; - obj.end_block = message.endBlock ? RequestEndBlock.toAmino(message.endBlock) : undefined; - obj.commit = message.commit ? RequestCommit.toAmino(message.commit) : undefined; - obj.list_snapshots = message.listSnapshots ? RequestListSnapshots.toAmino(message.listSnapshots) : undefined; - obj.offer_snapshot = message.offerSnapshot ? RequestOfferSnapshot.toAmino(message.offerSnapshot) : undefined; - obj.load_snapshot_chunk = message.loadSnapshotChunk ? RequestLoadSnapshotChunk.toAmino(message.loadSnapshotChunk) : undefined; - obj.apply_snapshot_chunk = message.applySnapshotChunk ? RequestApplySnapshotChunk.toAmino(message.applySnapshotChunk) : undefined; - return obj; - }, - fromAminoMsg(object: RequestAminoMsg): Request { - return Request.fromAmino(object.value); - }, - fromProtoMsg(message: RequestProtoMsg): Request { - return Request.decode(message.value); - }, - toProto(message: Request): Uint8Array { - return Request.encode(message).finish(); - }, - toProtoMsg(message: Request): RequestProtoMsg { - return { - typeUrl: "/tendermint.abci.Request", - value: Request.encode(message).finish() - }; - } -}; -function createBaseRequestEcho(): RequestEcho { - return { - message: "" - }; -} -export const RequestEcho = { - typeUrl: "/tendermint.abci.RequestEcho", - encode(message: RequestEcho, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestEcho { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestEcho(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestEcho { - return { - message: isSet(object.message) ? String(object.message) : "" - }; - }, - toJSON(message: RequestEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - fromPartial(object: DeepPartial): RequestEcho { - const message = createBaseRequestEcho(); - message.message = object.message ?? ""; - return message; - }, - fromSDK(object: RequestEchoSDKType): RequestEcho { - return { - message: object?.message - }; - }, - toSDK(message: RequestEcho): RequestEchoSDKType { - const obj: any = {}; - obj.message = message.message; - return obj; - }, - fromAmino(object: RequestEchoAmino): RequestEcho { - return { - message: object.message - }; - }, - toAmino(message: RequestEcho): RequestEchoAmino { - const obj: any = {}; - obj.message = message.message; - return obj; - }, - fromAminoMsg(object: RequestEchoAminoMsg): RequestEcho { - return RequestEcho.fromAmino(object.value); - }, - fromProtoMsg(message: RequestEchoProtoMsg): RequestEcho { - return RequestEcho.decode(message.value); - }, - toProto(message: RequestEcho): Uint8Array { - return RequestEcho.encode(message).finish(); - }, - toProtoMsg(message: RequestEcho): RequestEchoProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestEcho", - value: RequestEcho.encode(message).finish() - }; - } -}; -function createBaseRequestFlush(): RequestFlush { - return {}; -} -export const RequestFlush = { - typeUrl: "/tendermint.abci.RequestFlush", - encode(_: RequestFlush, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestFlush { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestFlush(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): RequestFlush { - return {}; - }, - toJSON(_: RequestFlush): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): RequestFlush { - const message = createBaseRequestFlush(); - return message; - }, - fromSDK(_: RequestFlushSDKType): RequestFlush { - return {}; - }, - toSDK(_: RequestFlush): RequestFlushSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: RequestFlushAmino): RequestFlush { - return {}; - }, - toAmino(_: RequestFlush): RequestFlushAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: RequestFlushAminoMsg): RequestFlush { - return RequestFlush.fromAmino(object.value); - }, - fromProtoMsg(message: RequestFlushProtoMsg): RequestFlush { - return RequestFlush.decode(message.value); - }, - toProto(message: RequestFlush): Uint8Array { - return RequestFlush.encode(message).finish(); - }, - toProtoMsg(message: RequestFlush): RequestFlushProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestFlush", - value: RequestFlush.encode(message).finish() - }; - } -}; -function createBaseRequestInfo(): RequestInfo { - return { - version: "", - blockVersion: BigInt(0), - p2pVersion: BigInt(0) - }; -} -export const RequestInfo = { - typeUrl: "/tendermint.abci.RequestInfo", - encode(message: RequestInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== "") { - writer.uint32(10).string(message.version); - } - if (message.blockVersion !== BigInt(0)) { - writer.uint32(16).uint64(message.blockVersion); - } - if (message.p2pVersion !== BigInt(0)) { - writer.uint32(24).uint64(message.p2pVersion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.blockVersion = reader.uint64(); - break; - case 3: - message.p2pVersion = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestInfo { - return { - version: isSet(object.version) ? String(object.version) : "", - blockVersion: isSet(object.blockVersion) ? BigInt(object.blockVersion.toString()) : BigInt(0), - p2pVersion: isSet(object.p2pVersion) ? BigInt(object.p2pVersion.toString()) : BigInt(0) - }; - }, - toJSON(message: RequestInfo): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = message.version); - message.blockVersion !== undefined && (obj.blockVersion = (message.blockVersion || BigInt(0)).toString()); - message.p2pVersion !== undefined && (obj.p2pVersion = (message.p2pVersion || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): RequestInfo { - const message = createBaseRequestInfo(); - message.version = object.version ?? ""; - message.blockVersion = object.blockVersion !== undefined && object.blockVersion !== null ? BigInt(object.blockVersion.toString()) : BigInt(0); - message.p2pVersion = object.p2pVersion !== undefined && object.p2pVersion !== null ? BigInt(object.p2pVersion.toString()) : BigInt(0); - return message; - }, - fromSDK(object: RequestInfoSDKType): RequestInfo { - return { - version: object?.version, - blockVersion: object?.block_version, - p2pVersion: object?.p2p_version - }; - }, - toSDK(message: RequestInfo): RequestInfoSDKType { - const obj: any = {}; - obj.version = message.version; - obj.block_version = message.blockVersion; - obj.p2p_version = message.p2pVersion; - return obj; - }, - fromAmino(object: RequestInfoAmino): RequestInfo { - return { - version: object.version, - blockVersion: BigInt(object.block_version), - p2pVersion: BigInt(object.p2p_version) - }; - }, - toAmino(message: RequestInfo): RequestInfoAmino { - const obj: any = {}; - obj.version = message.version; - obj.block_version = message.blockVersion ? message.blockVersion.toString() : undefined; - obj.p2p_version = message.p2pVersion ? message.p2pVersion.toString() : undefined; - return obj; - }, - fromAminoMsg(object: RequestInfoAminoMsg): RequestInfo { - return RequestInfo.fromAmino(object.value); - }, - fromProtoMsg(message: RequestInfoProtoMsg): RequestInfo { - return RequestInfo.decode(message.value); - }, - toProto(message: RequestInfo): Uint8Array { - return RequestInfo.encode(message).finish(); - }, - toProtoMsg(message: RequestInfo): RequestInfoProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestInfo", - value: RequestInfo.encode(message).finish() - }; - } -}; -function createBaseRequestSetOption(): RequestSetOption { - return { - key: "", - value: "" - }; -} -export const RequestSetOption = { - typeUrl: "/tendermint.abci.RequestSetOption", - encode(message: RequestSetOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestSetOption { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestSetOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestSetOption { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "" - }; - }, - toJSON(message: RequestSetOption): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); - return obj; - }, - fromPartial(object: DeepPartial): RequestSetOption { - const message = createBaseRequestSetOption(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, - fromSDK(object: RequestSetOptionSDKType): RequestSetOption { - return { - key: object?.key, - value: object?.value - }; - }, - toSDK(message: RequestSetOption): RequestSetOptionSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAmino(object: RequestSetOptionAmino): RequestSetOption { - return { - key: object.key, - value: object.value - }; - }, - toAmino(message: RequestSetOption): RequestSetOptionAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - return obj; - }, - fromAminoMsg(object: RequestSetOptionAminoMsg): RequestSetOption { - return RequestSetOption.fromAmino(object.value); - }, - fromProtoMsg(message: RequestSetOptionProtoMsg): RequestSetOption { - return RequestSetOption.decode(message.value); - }, - toProto(message: RequestSetOption): Uint8Array { - return RequestSetOption.encode(message).finish(); - }, - toProtoMsg(message: RequestSetOption): RequestSetOptionProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestSetOption", - value: RequestSetOption.encode(message).finish() - }; - } -}; -function createBaseRequestInitChain(): RequestInitChain { - return { - time: new Date(), - chainId: "", - consensusParams: ConsensusParams.fromPartial({}), - validators: [], - appStateBytes: new Uint8Array(), - initialHeight: BigInt(0) - }; -} -export const RequestInitChain = { - typeUrl: "/tendermint.abci.RequestInitChain", - encode(message: RequestInitChain, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.appStateBytes.length !== 0) { - writer.uint32(42).bytes(message.appStateBytes); - } - if (message.initialHeight !== BigInt(0)) { - writer.uint32(48).int64(message.initialHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestInitChain { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestInitChain(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 4: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 5: - message.appStateBytes = reader.bytes(); - break; - case 6: - message.initialHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestInitChain { - return { - time: isSet(object.time) ? new Date(object.time) : undefined, - chainId: isSet(object.chainId) ? String(object.chainId) : "", - consensusParams: isSet(object.consensusParams) ? ConsensusParams.fromJSON(object.consensusParams) : undefined, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => ValidatorUpdate.fromJSON(e)) : [], - appStateBytes: isSet(object.appStateBytes) ? bytesFromBase64(object.appStateBytes) : new Uint8Array(), - initialHeight: isSet(object.initialHeight) ? BigInt(object.initialHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: RequestInitChain): unknown { - const obj: any = {}; - message.time !== undefined && (obj.time = message.time.toISOString()); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.consensusParams !== undefined && (obj.consensusParams = message.consensusParams ? ConsensusParams.toJSON(message.consensusParams) : undefined); - if (message.validators) { - obj.validators = message.validators.map(e => e ? ValidatorUpdate.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.appStateBytes !== undefined && (obj.appStateBytes = base64FromBytes(message.appStateBytes !== undefined ? message.appStateBytes : new Uint8Array())); - message.initialHeight !== undefined && (obj.initialHeight = (message.initialHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): RequestInitChain { - const message = createBaseRequestInitChain(); - message.time = object.time ?? undefined; - message.chainId = object.chainId ?? ""; - message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null ? ConsensusParams.fromPartial(object.consensusParams) : undefined; - message.validators = object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || []; - message.appStateBytes = object.appStateBytes ?? new Uint8Array(); - message.initialHeight = object.initialHeight !== undefined && object.initialHeight !== null ? BigInt(object.initialHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: RequestInitChainSDKType): RequestInitChain { - return { - time: object.time ?? undefined, - chainId: object?.chain_id, - consensusParams: object.consensus_params ? ConsensusParams.fromSDK(object.consensus_params) : undefined, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => ValidatorUpdate.fromSDK(e)) : [], - appStateBytes: object?.app_state_bytes, - initialHeight: object?.initial_height - }; - }, - toSDK(message: RequestInitChain): RequestInitChainSDKType { - const obj: any = {}; - message.time !== undefined && (obj.time = message.time ?? undefined); - obj.chain_id = message.chainId; - message.consensusParams !== undefined && (obj.consensus_params = message.consensusParams ? ConsensusParams.toSDK(message.consensusParams) : undefined); - if (message.validators) { - obj.validators = message.validators.map(e => e ? ValidatorUpdate.toSDK(e) : undefined); - } else { - obj.validators = []; - } - obj.app_state_bytes = message.appStateBytes; - obj.initial_height = message.initialHeight; - return obj; - }, - fromAmino(object: RequestInitChainAmino): RequestInitChain { - return { - time: object.time, - chainId: object.chain_id, - consensusParams: object?.consensus_params ? ConsensusParams.fromAmino(object.consensus_params) : undefined, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => ValidatorUpdate.fromAmino(e)) : [], - appStateBytes: object.app_state_bytes, - initialHeight: BigInt(object.initial_height) - }; - }, - toAmino(message: RequestInitChain): RequestInitChainAmino { - const obj: any = {}; - obj.time = message.time; - obj.chain_id = message.chainId; - obj.consensus_params = message.consensusParams ? ConsensusParams.toAmino(message.consensusParams) : undefined; - if (message.validators) { - obj.validators = message.validators.map(e => e ? ValidatorUpdate.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.app_state_bytes = message.appStateBytes; - obj.initial_height = message.initialHeight ? message.initialHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: RequestInitChainAminoMsg): RequestInitChain { - return RequestInitChain.fromAmino(object.value); - }, - fromProtoMsg(message: RequestInitChainProtoMsg): RequestInitChain { - return RequestInitChain.decode(message.value); - }, - toProto(message: RequestInitChain): Uint8Array { - return RequestInitChain.encode(message).finish(); - }, - toProtoMsg(message: RequestInitChain): RequestInitChainProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestInitChain", - value: RequestInitChain.encode(message).finish() - }; - } -}; -function createBaseRequestQuery(): RequestQuery { - return { - data: new Uint8Array(), - path: "", - height: BigInt(0), - prove: false - }; -} -export const RequestQuery = { - typeUrl: "/tendermint.abci.RequestQuery", - encode(message: RequestQuery, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.prove === true) { - writer.uint32(32).bool(message.prove); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestQuery { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.prove = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestQuery { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - path: isSet(object.path) ? String(object.path) : "", - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - prove: isSet(object.prove) ? Boolean(object.prove) : false - }; - }, - toJSON(message: RequestQuery): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.path !== undefined && (obj.path = message.path); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.prove !== undefined && (obj.prove = message.prove); - return obj; - }, - fromPartial(object: DeepPartial): RequestQuery { - const message = createBaseRequestQuery(); - message.data = object.data ?? new Uint8Array(); - message.path = object.path ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.prove = object.prove ?? false; - return message; - }, - fromSDK(object: RequestQuerySDKType): RequestQuery { - return { - data: object?.data, - path: object?.path, - height: object?.height, - prove: object?.prove - }; - }, - toSDK(message: RequestQuery): RequestQuerySDKType { - const obj: any = {}; - obj.data = message.data; - obj.path = message.path; - obj.height = message.height; - obj.prove = message.prove; - return obj; - }, - fromAmino(object: RequestQueryAmino): RequestQuery { - return { - data: object.data, - path: object.path, - height: BigInt(object.height), - prove: object.prove - }; - }, - toAmino(message: RequestQuery): RequestQueryAmino { - const obj: any = {}; - obj.data = message.data; - obj.path = message.path; - obj.height = message.height ? message.height.toString() : undefined; - obj.prove = message.prove; - return obj; - }, - fromAminoMsg(object: RequestQueryAminoMsg): RequestQuery { - return RequestQuery.fromAmino(object.value); - }, - fromProtoMsg(message: RequestQueryProtoMsg): RequestQuery { - return RequestQuery.decode(message.value); - }, - toProto(message: RequestQuery): Uint8Array { - return RequestQuery.encode(message).finish(); - }, - toProtoMsg(message: RequestQuery): RequestQueryProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestQuery", - value: RequestQuery.encode(message).finish() - }; - } -}; -function createBaseRequestBeginBlock(): RequestBeginBlock { - return { - hash: new Uint8Array(), - header: Header.fromPartial({}), - lastCommitInfo: LastCommitInfo.fromPartial({}), - byzantineValidators: [] - }; -} -export const RequestBeginBlock = { - typeUrl: "/tendermint.abci.RequestBeginBlock", - encode(message: RequestBeginBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(18).fork()).ldelim(); - } - if (message.lastCommitInfo !== undefined) { - LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.byzantineValidators) { - Evidence.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestBeginBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestBeginBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.header = Header.decode(reader, reader.uint32()); - break; - case 3: - message.lastCommitInfo = LastCommitInfo.decode(reader, reader.uint32()); - break; - case 4: - message.byzantineValidators.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestBeginBlock { - return { - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), - header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - lastCommitInfo: isSet(object.lastCommitInfo) ? LastCommitInfo.fromJSON(object.lastCommitInfo) : undefined, - byzantineValidators: Array.isArray(object?.byzantineValidators) ? object.byzantineValidators.map((e: any) => Evidence.fromJSON(e)) : [] - }; - }, - toJSON(message: RequestBeginBlock): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.lastCommitInfo !== undefined && (obj.lastCommitInfo = message.lastCommitInfo ? LastCommitInfo.toJSON(message.lastCommitInfo) : undefined); - if (message.byzantineValidators) { - obj.byzantineValidators = message.byzantineValidators.map(e => e ? Evidence.toJSON(e) : undefined); - } else { - obj.byzantineValidators = []; - } - return obj; - }, - fromPartial(object: DeepPartial): RequestBeginBlock { - const message = createBaseRequestBeginBlock(); - message.hash = object.hash ?? new Uint8Array(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.lastCommitInfo = object.lastCommitInfo !== undefined && object.lastCommitInfo !== null ? LastCommitInfo.fromPartial(object.lastCommitInfo) : undefined; - message.byzantineValidators = object.byzantineValidators?.map(e => Evidence.fromPartial(e)) || []; - return message; - }, - fromSDK(object: RequestBeginBlockSDKType): RequestBeginBlock { - return { - hash: object?.hash, - header: object.header ? Header.fromSDK(object.header) : undefined, - lastCommitInfo: object.last_commit_info ? LastCommitInfo.fromSDK(object.last_commit_info) : undefined, - byzantineValidators: Array.isArray(object?.byzantine_validators) ? object.byzantine_validators.map((e: any) => Evidence.fromSDK(e)) : [] - }; - }, - toSDK(message: RequestBeginBlock): RequestBeginBlockSDKType { - const obj: any = {}; - obj.hash = message.hash; - message.header !== undefined && (obj.header = message.header ? Header.toSDK(message.header) : undefined); - message.lastCommitInfo !== undefined && (obj.last_commit_info = message.lastCommitInfo ? LastCommitInfo.toSDK(message.lastCommitInfo) : undefined); - if (message.byzantineValidators) { - obj.byzantine_validators = message.byzantineValidators.map(e => e ? Evidence.toSDK(e) : undefined); - } else { - obj.byzantine_validators = []; - } - return obj; - }, - fromAmino(object: RequestBeginBlockAmino): RequestBeginBlock { - return { - hash: object.hash, - header: object?.header ? Header.fromAmino(object.header) : undefined, - lastCommitInfo: object?.last_commit_info ? LastCommitInfo.fromAmino(object.last_commit_info) : undefined, - byzantineValidators: Array.isArray(object?.byzantine_validators) ? object.byzantine_validators.map((e: any) => Evidence.fromAmino(e)) : [] - }; - }, - toAmino(message: RequestBeginBlock): RequestBeginBlockAmino { - const obj: any = {}; - obj.hash = message.hash; - obj.header = message.header ? Header.toAmino(message.header) : undefined; - obj.last_commit_info = message.lastCommitInfo ? LastCommitInfo.toAmino(message.lastCommitInfo) : undefined; - if (message.byzantineValidators) { - obj.byzantine_validators = message.byzantineValidators.map(e => e ? Evidence.toAmino(e) : undefined); - } else { - obj.byzantine_validators = []; - } - return obj; - }, - fromAminoMsg(object: RequestBeginBlockAminoMsg): RequestBeginBlock { - return RequestBeginBlock.fromAmino(object.value); - }, - fromProtoMsg(message: RequestBeginBlockProtoMsg): RequestBeginBlock { - return RequestBeginBlock.decode(message.value); - }, - toProto(message: RequestBeginBlock): Uint8Array { - return RequestBeginBlock.encode(message).finish(); - }, - toProtoMsg(message: RequestBeginBlock): RequestBeginBlockProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestBeginBlock", - value: RequestBeginBlock.encode(message).finish() - }; - } -}; -function createBaseRequestCheckTx(): RequestCheckTx { - return { - tx: new Uint8Array(), - type: 0 - }; -} -export const RequestCheckTx = { - typeUrl: "/tendermint.abci.RequestCheckTx", - encode(message: RequestCheckTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - if (message.type !== 0) { - writer.uint32(16).int32(message.type); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestCheckTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestCheckTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - case 2: - message.type = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestCheckTx { - return { - tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(), - type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : -1 - }; - }, - toJSON(message: RequestCheckTx): unknown { - const obj: any = {}; - message.tx !== undefined && (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - fromPartial(object: DeepPartial): RequestCheckTx { - const message = createBaseRequestCheckTx(); - message.tx = object.tx ?? new Uint8Array(); - message.type = object.type ?? 0; - return message; - }, - fromSDK(object: RequestCheckTxSDKType): RequestCheckTx { - return { - tx: object?.tx, - type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : -1 - }; - }, - toSDK(message: RequestCheckTx): RequestCheckTxSDKType { - const obj: any = {}; - obj.tx = message.tx; - message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type)); - return obj; - }, - fromAmino(object: RequestCheckTxAmino): RequestCheckTx { - return { - tx: object.tx, - type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : -1 - }; - }, - toAmino(message: RequestCheckTx): RequestCheckTxAmino { - const obj: any = {}; - obj.tx = message.tx; - obj.type = message.type; - return obj; - }, - fromAminoMsg(object: RequestCheckTxAminoMsg): RequestCheckTx { - return RequestCheckTx.fromAmino(object.value); - }, - fromProtoMsg(message: RequestCheckTxProtoMsg): RequestCheckTx { - return RequestCheckTx.decode(message.value); - }, - toProto(message: RequestCheckTx): Uint8Array { - return RequestCheckTx.encode(message).finish(); - }, - toProtoMsg(message: RequestCheckTx): RequestCheckTxProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestCheckTx", - value: RequestCheckTx.encode(message).finish() - }; - } -}; -function createBaseRequestDeliverTx(): RequestDeliverTx { - return { - tx: new Uint8Array() - }; -} -export const RequestDeliverTx = { - typeUrl: "/tendermint.abci.RequestDeliverTx", - encode(message: RequestDeliverTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.tx.length !== 0) { - writer.uint32(10).bytes(message.tx); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestDeliverTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestDeliverTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tx = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestDeliverTx { - return { - tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array() - }; - }, - toJSON(message: RequestDeliverTx): unknown { - const obj: any = {}; - message.tx !== undefined && (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): RequestDeliverTx { - const message = createBaseRequestDeliverTx(); - message.tx = object.tx ?? new Uint8Array(); - return message; - }, - fromSDK(object: RequestDeliverTxSDKType): RequestDeliverTx { - return { - tx: object?.tx - }; - }, - toSDK(message: RequestDeliverTx): RequestDeliverTxSDKType { - const obj: any = {}; - obj.tx = message.tx; - return obj; - }, - fromAmino(object: RequestDeliverTxAmino): RequestDeliverTx { - return { - tx: object.tx - }; - }, - toAmino(message: RequestDeliverTx): RequestDeliverTxAmino { - const obj: any = {}; - obj.tx = message.tx; - return obj; - }, - fromAminoMsg(object: RequestDeliverTxAminoMsg): RequestDeliverTx { - return RequestDeliverTx.fromAmino(object.value); - }, - fromProtoMsg(message: RequestDeliverTxProtoMsg): RequestDeliverTx { - return RequestDeliverTx.decode(message.value); - }, - toProto(message: RequestDeliverTx): Uint8Array { - return RequestDeliverTx.encode(message).finish(); - }, - toProtoMsg(message: RequestDeliverTx): RequestDeliverTxProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestDeliverTx", - value: RequestDeliverTx.encode(message).finish() - }; - } -}; -function createBaseRequestEndBlock(): RequestEndBlock { - return { - height: BigInt(0) - }; -} -export const RequestEndBlock = { - typeUrl: "/tendermint.abci.RequestEndBlock", - encode(message: RequestEndBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestEndBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestEndBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestEndBlock { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0) - }; - }, - toJSON(message: RequestEndBlock): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): RequestEndBlock { - const message = createBaseRequestEndBlock(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - return message; - }, - fromSDK(object: RequestEndBlockSDKType): RequestEndBlock { - return { - height: object?.height - }; - }, - toSDK(message: RequestEndBlock): RequestEndBlockSDKType { - const obj: any = {}; - obj.height = message.height; - return obj; - }, - fromAmino(object: RequestEndBlockAmino): RequestEndBlock { - return { - height: BigInt(object.height) - }; - }, - toAmino(message: RequestEndBlock): RequestEndBlockAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - return obj; - }, - fromAminoMsg(object: RequestEndBlockAminoMsg): RequestEndBlock { - return RequestEndBlock.fromAmino(object.value); - }, - fromProtoMsg(message: RequestEndBlockProtoMsg): RequestEndBlock { - return RequestEndBlock.decode(message.value); - }, - toProto(message: RequestEndBlock): Uint8Array { - return RequestEndBlock.encode(message).finish(); - }, - toProtoMsg(message: RequestEndBlock): RequestEndBlockProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestEndBlock", - value: RequestEndBlock.encode(message).finish() - }; - } -}; -function createBaseRequestCommit(): RequestCommit { - return {}; -} -export const RequestCommit = { - typeUrl: "/tendermint.abci.RequestCommit", - encode(_: RequestCommit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestCommit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestCommit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): RequestCommit { - return {}; - }, - toJSON(_: RequestCommit): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): RequestCommit { - const message = createBaseRequestCommit(); - return message; - }, - fromSDK(_: RequestCommitSDKType): RequestCommit { - return {}; - }, - toSDK(_: RequestCommit): RequestCommitSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: RequestCommitAmino): RequestCommit { - return {}; - }, - toAmino(_: RequestCommit): RequestCommitAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: RequestCommitAminoMsg): RequestCommit { - return RequestCommit.fromAmino(object.value); - }, - fromProtoMsg(message: RequestCommitProtoMsg): RequestCommit { - return RequestCommit.decode(message.value); - }, - toProto(message: RequestCommit): Uint8Array { - return RequestCommit.encode(message).finish(); - }, - toProtoMsg(message: RequestCommit): RequestCommitProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestCommit", - value: RequestCommit.encode(message).finish() - }; - } -}; -function createBaseRequestListSnapshots(): RequestListSnapshots { - return {}; -} -export const RequestListSnapshots = { - typeUrl: "/tendermint.abci.RequestListSnapshots", - encode(_: RequestListSnapshots, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestListSnapshots { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestListSnapshots(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): RequestListSnapshots { - return {}; - }, - toJSON(_: RequestListSnapshots): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): RequestListSnapshots { - const message = createBaseRequestListSnapshots(); - return message; - }, - fromSDK(_: RequestListSnapshotsSDKType): RequestListSnapshots { - return {}; - }, - toSDK(_: RequestListSnapshots): RequestListSnapshotsSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: RequestListSnapshotsAmino): RequestListSnapshots { - return {}; - }, - toAmino(_: RequestListSnapshots): RequestListSnapshotsAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: RequestListSnapshotsAminoMsg): RequestListSnapshots { - return RequestListSnapshots.fromAmino(object.value); - }, - fromProtoMsg(message: RequestListSnapshotsProtoMsg): RequestListSnapshots { - return RequestListSnapshots.decode(message.value); - }, - toProto(message: RequestListSnapshots): Uint8Array { - return RequestListSnapshots.encode(message).finish(); - }, - toProtoMsg(message: RequestListSnapshots): RequestListSnapshotsProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestListSnapshots", - value: RequestListSnapshots.encode(message).finish() - }; - } -}; -function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { - return { - snapshot: Snapshot.fromPartial({}), - appHash: new Uint8Array() - }; -} -export const RequestOfferSnapshot = { - typeUrl: "/tendermint.abci.RequestOfferSnapshot", - encode(message: RequestOfferSnapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.snapshot !== undefined) { - Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(18).bytes(message.appHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestOfferSnapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestOfferSnapshot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestOfferSnapshot { - return { - snapshot: isSet(object.snapshot) ? Snapshot.fromJSON(object.snapshot) : undefined, - appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array() - }; - }, - toJSON(message: RequestOfferSnapshot): unknown { - const obj: any = {}; - message.snapshot !== undefined && (obj.snapshot = message.snapshot ? Snapshot.toJSON(message.snapshot) : undefined); - message.appHash !== undefined && (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): RequestOfferSnapshot { - const message = createBaseRequestOfferSnapshot(); - message.snapshot = object.snapshot !== undefined && object.snapshot !== null ? Snapshot.fromPartial(object.snapshot) : undefined; - message.appHash = object.appHash ?? new Uint8Array(); - return message; - }, - fromSDK(object: RequestOfferSnapshotSDKType): RequestOfferSnapshot { - return { - snapshot: object.snapshot ? Snapshot.fromSDK(object.snapshot) : undefined, - appHash: object?.app_hash - }; - }, - toSDK(message: RequestOfferSnapshot): RequestOfferSnapshotSDKType { - const obj: any = {}; - message.snapshot !== undefined && (obj.snapshot = message.snapshot ? Snapshot.toSDK(message.snapshot) : undefined); - obj.app_hash = message.appHash; - return obj; - }, - fromAmino(object: RequestOfferSnapshotAmino): RequestOfferSnapshot { - return { - snapshot: object?.snapshot ? Snapshot.fromAmino(object.snapshot) : undefined, - appHash: object.app_hash - }; - }, - toAmino(message: RequestOfferSnapshot): RequestOfferSnapshotAmino { - const obj: any = {}; - obj.snapshot = message.snapshot ? Snapshot.toAmino(message.snapshot) : undefined; - obj.app_hash = message.appHash; - return obj; - }, - fromAminoMsg(object: RequestOfferSnapshotAminoMsg): RequestOfferSnapshot { - return RequestOfferSnapshot.fromAmino(object.value); - }, - fromProtoMsg(message: RequestOfferSnapshotProtoMsg): RequestOfferSnapshot { - return RequestOfferSnapshot.decode(message.value); - }, - toProto(message: RequestOfferSnapshot): Uint8Array { - return RequestOfferSnapshot.encode(message).finish(); - }, - toProtoMsg(message: RequestOfferSnapshot): RequestOfferSnapshotProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestOfferSnapshot", - value: RequestOfferSnapshot.encode(message).finish() - }; - } -}; -function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { - return { - height: BigInt(0), - format: 0, - chunk: 0 - }; -} -export const RequestLoadSnapshotChunk = { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", - encode(message: RequestLoadSnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunk !== 0) { - writer.uint32(24).uint32(message.chunk); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestLoadSnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestLoadSnapshotChunk(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.uint64(); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestLoadSnapshotChunk { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - format: isSet(object.format) ? Number(object.format) : 0, - chunk: isSet(object.chunk) ? Number(object.chunk) : 0 - }; - }, - toJSON(message: RequestLoadSnapshotChunk): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.format !== undefined && (obj.format = Math.round(message.format)); - message.chunk !== undefined && (obj.chunk = Math.round(message.chunk)); - return obj; - }, - fromPartial(object: DeepPartial): RequestLoadSnapshotChunk { - const message = createBaseRequestLoadSnapshotChunk(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.format = object.format ?? 0; - message.chunk = object.chunk ?? 0; - return message; - }, - fromSDK(object: RequestLoadSnapshotChunkSDKType): RequestLoadSnapshotChunk { - return { - height: object?.height, - format: object?.format, - chunk: object?.chunk - }; - }, - toSDK(message: RequestLoadSnapshotChunk): RequestLoadSnapshotChunkSDKType { - const obj: any = {}; - obj.height = message.height; - obj.format = message.format; - obj.chunk = message.chunk; - return obj; - }, - fromAmino(object: RequestLoadSnapshotChunkAmino): RequestLoadSnapshotChunk { - return { - height: BigInt(object.height), - format: object.format, - chunk: object.chunk - }; - }, - toAmino(message: RequestLoadSnapshotChunk): RequestLoadSnapshotChunkAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.format = message.format; - obj.chunk = message.chunk; - return obj; - }, - fromAminoMsg(object: RequestLoadSnapshotChunkAminoMsg): RequestLoadSnapshotChunk { - return RequestLoadSnapshotChunk.fromAmino(object.value); - }, - fromProtoMsg(message: RequestLoadSnapshotChunkProtoMsg): RequestLoadSnapshotChunk { - return RequestLoadSnapshotChunk.decode(message.value); - }, - toProto(message: RequestLoadSnapshotChunk): Uint8Array { - return RequestLoadSnapshotChunk.encode(message).finish(); - }, - toProtoMsg(message: RequestLoadSnapshotChunk): RequestLoadSnapshotChunkProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestLoadSnapshotChunk", - value: RequestLoadSnapshotChunk.encode(message).finish() - }; - } -}; -function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { - return { - index: 0, - chunk: new Uint8Array(), - sender: "" - }; -} -export const RequestApplySnapshotChunk = { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", - encode(message: RequestApplySnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.chunk.length !== 0) { - writer.uint32(18).bytes(message.chunk); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): RequestApplySnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestApplySnapshotChunk(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): RequestApplySnapshotChunk { - return { - index: isSet(object.index) ? Number(object.index) : 0, - chunk: isSet(object.chunk) ? bytesFromBase64(object.chunk) : new Uint8Array(), - sender: isSet(object.sender) ? String(object.sender) : "" - }; - }, - toJSON(message: RequestApplySnapshotChunk): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = Math.round(message.index)); - message.chunk !== undefined && (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array())); - message.sender !== undefined && (obj.sender = message.sender); - return obj; - }, - fromPartial(object: DeepPartial): RequestApplySnapshotChunk { - const message = createBaseRequestApplySnapshotChunk(); - message.index = object.index ?? 0; - message.chunk = object.chunk ?? new Uint8Array(); - message.sender = object.sender ?? ""; - return message; - }, - fromSDK(object: RequestApplySnapshotChunkSDKType): RequestApplySnapshotChunk { - return { - index: object?.index, - chunk: object?.chunk, - sender: object?.sender - }; - }, - toSDK(message: RequestApplySnapshotChunk): RequestApplySnapshotChunkSDKType { - const obj: any = {}; - obj.index = message.index; - obj.chunk = message.chunk; - obj.sender = message.sender; - return obj; - }, - fromAmino(object: RequestApplySnapshotChunkAmino): RequestApplySnapshotChunk { - return { - index: object.index, - chunk: object.chunk, - sender: object.sender - }; - }, - toAmino(message: RequestApplySnapshotChunk): RequestApplySnapshotChunkAmino { - const obj: any = {}; - obj.index = message.index; - obj.chunk = message.chunk; - obj.sender = message.sender; - return obj; - }, - fromAminoMsg(object: RequestApplySnapshotChunkAminoMsg): RequestApplySnapshotChunk { - return RequestApplySnapshotChunk.fromAmino(object.value); - }, - fromProtoMsg(message: RequestApplySnapshotChunkProtoMsg): RequestApplySnapshotChunk { - return RequestApplySnapshotChunk.decode(message.value); - }, - toProto(message: RequestApplySnapshotChunk): Uint8Array { - return RequestApplySnapshotChunk.encode(message).finish(); - }, - toProtoMsg(message: RequestApplySnapshotChunk): RequestApplySnapshotChunkProtoMsg { - return { - typeUrl: "/tendermint.abci.RequestApplySnapshotChunk", - value: RequestApplySnapshotChunk.encode(message).finish() - }; - } -}; -function createBaseResponse(): Response { - return { - exception: undefined, - echo: undefined, - flush: undefined, - info: undefined, - setOption: undefined, - initChain: undefined, - query: undefined, - beginBlock: undefined, - checkTx: undefined, - deliverTx: undefined, - endBlock: undefined, - commit: undefined, - listSnapshots: undefined, - offerSnapshot: undefined, - loadSnapshotChunk: undefined, - applySnapshotChunk: undefined - }; -} -export const Response = { - typeUrl: "/tendermint.abci.Response", - encode(message: Response, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.exception !== undefined) { - ResponseException.encode(message.exception, writer.uint32(10).fork()).ldelim(); - } - if (message.echo !== undefined) { - ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim(); - } - if (message.flush !== undefined) { - ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim(); - } - if (message.info !== undefined) { - ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim(); - } - if (message.setOption !== undefined) { - ResponseSetOption.encode(message.setOption, writer.uint32(42).fork()).ldelim(); - } - if (message.initChain !== undefined) { - ResponseInitChain.encode(message.initChain, writer.uint32(50).fork()).ldelim(); - } - if (message.query !== undefined) { - ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim(); - } - if (message.beginBlock !== undefined) { - ResponseBeginBlock.encode(message.beginBlock, writer.uint32(66).fork()).ldelim(); - } - if (message.checkTx !== undefined) { - ResponseCheckTx.encode(message.checkTx, writer.uint32(74).fork()).ldelim(); - } - if (message.deliverTx !== undefined) { - ResponseDeliverTx.encode(message.deliverTx, writer.uint32(82).fork()).ldelim(); - } - if (message.endBlock !== undefined) { - ResponseEndBlock.encode(message.endBlock, writer.uint32(90).fork()).ldelim(); - } - if (message.commit !== undefined) { - ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim(); - } - if (message.listSnapshots !== undefined) { - ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(106).fork()).ldelim(); - } - if (message.offerSnapshot !== undefined) { - ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(114).fork()).ldelim(); - } - if (message.loadSnapshotChunk !== undefined) { - ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(122).fork()).ldelim(); - } - if (message.applySnapshotChunk !== undefined) { - ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(130).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Response { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.setOption = ResponseSetOption.decode(reader, reader.uint32()); - break; - case 6: - message.initChain = ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.beginBlock = ResponseBeginBlock.decode(reader, reader.uint32()); - break; - case 9: - message.checkTx = ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.endBlock = ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32()); - break; - case 14: - message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32()); - break; - case 15: - message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Response { - return { - exception: isSet(object.exception) ? ResponseException.fromJSON(object.exception) : undefined, - echo: isSet(object.echo) ? ResponseEcho.fromJSON(object.echo) : undefined, - flush: isSet(object.flush) ? ResponseFlush.fromJSON(object.flush) : undefined, - info: isSet(object.info) ? ResponseInfo.fromJSON(object.info) : undefined, - setOption: isSet(object.setOption) ? ResponseSetOption.fromJSON(object.setOption) : undefined, - initChain: isSet(object.initChain) ? ResponseInitChain.fromJSON(object.initChain) : undefined, - query: isSet(object.query) ? ResponseQuery.fromJSON(object.query) : undefined, - beginBlock: isSet(object.beginBlock) ? ResponseBeginBlock.fromJSON(object.beginBlock) : undefined, - checkTx: isSet(object.checkTx) ? ResponseCheckTx.fromJSON(object.checkTx) : undefined, - deliverTx: isSet(object.deliverTx) ? ResponseDeliverTx.fromJSON(object.deliverTx) : undefined, - endBlock: isSet(object.endBlock) ? ResponseEndBlock.fromJSON(object.endBlock) : undefined, - commit: isSet(object.commit) ? ResponseCommit.fromJSON(object.commit) : undefined, - listSnapshots: isSet(object.listSnapshots) ? ResponseListSnapshots.fromJSON(object.listSnapshots) : undefined, - offerSnapshot: isSet(object.offerSnapshot) ? ResponseOfferSnapshot.fromJSON(object.offerSnapshot) : undefined, - loadSnapshotChunk: isSet(object.loadSnapshotChunk) ? ResponseLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk) : undefined, - applySnapshotChunk: isSet(object.applySnapshotChunk) ? ResponseApplySnapshotChunk.fromJSON(object.applySnapshotChunk) : undefined - }; - }, - toJSON(message: Response): unknown { - const obj: any = {}; - message.exception !== undefined && (obj.exception = message.exception ? ResponseException.toJSON(message.exception) : undefined); - message.echo !== undefined && (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined); - message.flush !== undefined && (obj.flush = message.flush ? ResponseFlush.toJSON(message.flush) : undefined); - message.info !== undefined && (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined); - message.setOption !== undefined && (obj.setOption = message.setOption ? ResponseSetOption.toJSON(message.setOption) : undefined); - message.initChain !== undefined && (obj.initChain = message.initChain ? ResponseInitChain.toJSON(message.initChain) : undefined); - message.query !== undefined && (obj.query = message.query ? ResponseQuery.toJSON(message.query) : undefined); - message.beginBlock !== undefined && (obj.beginBlock = message.beginBlock ? ResponseBeginBlock.toJSON(message.beginBlock) : undefined); - message.checkTx !== undefined && (obj.checkTx = message.checkTx ? ResponseCheckTx.toJSON(message.checkTx) : undefined); - message.deliverTx !== undefined && (obj.deliverTx = message.deliverTx ? ResponseDeliverTx.toJSON(message.deliverTx) : undefined); - message.endBlock !== undefined && (obj.endBlock = message.endBlock ? ResponseEndBlock.toJSON(message.endBlock) : undefined); - message.commit !== undefined && (obj.commit = message.commit ? ResponseCommit.toJSON(message.commit) : undefined); - message.listSnapshots !== undefined && (obj.listSnapshots = message.listSnapshots ? ResponseListSnapshots.toJSON(message.listSnapshots) : undefined); - message.offerSnapshot !== undefined && (obj.offerSnapshot = message.offerSnapshot ? ResponseOfferSnapshot.toJSON(message.offerSnapshot) : undefined); - message.loadSnapshotChunk !== undefined && (obj.loadSnapshotChunk = message.loadSnapshotChunk ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk) : undefined); - message.applySnapshotChunk !== undefined && (obj.applySnapshotChunk = message.applySnapshotChunk ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Response { - const message = createBaseResponse(); - message.exception = object.exception !== undefined && object.exception !== null ? ResponseException.fromPartial(object.exception) : undefined; - message.echo = object.echo !== undefined && object.echo !== null ? ResponseEcho.fromPartial(object.echo) : undefined; - message.flush = object.flush !== undefined && object.flush !== null ? ResponseFlush.fromPartial(object.flush) : undefined; - message.info = object.info !== undefined && object.info !== null ? ResponseInfo.fromPartial(object.info) : undefined; - message.setOption = object.setOption !== undefined && object.setOption !== null ? ResponseSetOption.fromPartial(object.setOption) : undefined; - message.initChain = object.initChain !== undefined && object.initChain !== null ? ResponseInitChain.fromPartial(object.initChain) : undefined; - message.query = object.query !== undefined && object.query !== null ? ResponseQuery.fromPartial(object.query) : undefined; - message.beginBlock = object.beginBlock !== undefined && object.beginBlock !== null ? ResponseBeginBlock.fromPartial(object.beginBlock) : undefined; - message.checkTx = object.checkTx !== undefined && object.checkTx !== null ? ResponseCheckTx.fromPartial(object.checkTx) : undefined; - message.deliverTx = object.deliverTx !== undefined && object.deliverTx !== null ? ResponseDeliverTx.fromPartial(object.deliverTx) : undefined; - message.endBlock = object.endBlock !== undefined && object.endBlock !== null ? ResponseEndBlock.fromPartial(object.endBlock) : undefined; - message.commit = object.commit !== undefined && object.commit !== null ? ResponseCommit.fromPartial(object.commit) : undefined; - message.listSnapshots = object.listSnapshots !== undefined && object.listSnapshots !== null ? ResponseListSnapshots.fromPartial(object.listSnapshots) : undefined; - message.offerSnapshot = object.offerSnapshot !== undefined && object.offerSnapshot !== null ? ResponseOfferSnapshot.fromPartial(object.offerSnapshot) : undefined; - message.loadSnapshotChunk = object.loadSnapshotChunk !== undefined && object.loadSnapshotChunk !== null ? ResponseLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk) : undefined; - message.applySnapshotChunk = object.applySnapshotChunk !== undefined && object.applySnapshotChunk !== null ? ResponseApplySnapshotChunk.fromPartial(object.applySnapshotChunk) : undefined; - return message; - }, - fromSDK(object: ResponseSDKType): Response { - return { - exception: object.exception ? ResponseException.fromSDK(object.exception) : undefined, - echo: object.echo ? ResponseEcho.fromSDK(object.echo) : undefined, - flush: object.flush ? ResponseFlush.fromSDK(object.flush) : undefined, - info: object.info ? ResponseInfo.fromSDK(object.info) : undefined, - setOption: object.set_option ? ResponseSetOption.fromSDK(object.set_option) : undefined, - initChain: object.init_chain ? ResponseInitChain.fromSDK(object.init_chain) : undefined, - query: object.query ? ResponseQuery.fromSDK(object.query) : undefined, - beginBlock: object.begin_block ? ResponseBeginBlock.fromSDK(object.begin_block) : undefined, - checkTx: object.check_tx ? ResponseCheckTx.fromSDK(object.check_tx) : undefined, - deliverTx: object.deliver_tx ? ResponseDeliverTx.fromSDK(object.deliver_tx) : undefined, - endBlock: object.end_block ? ResponseEndBlock.fromSDK(object.end_block) : undefined, - commit: object.commit ? ResponseCommit.fromSDK(object.commit) : undefined, - listSnapshots: object.list_snapshots ? ResponseListSnapshots.fromSDK(object.list_snapshots) : undefined, - offerSnapshot: object.offer_snapshot ? ResponseOfferSnapshot.fromSDK(object.offer_snapshot) : undefined, - loadSnapshotChunk: object.load_snapshot_chunk ? ResponseLoadSnapshotChunk.fromSDK(object.load_snapshot_chunk) : undefined, - applySnapshotChunk: object.apply_snapshot_chunk ? ResponseApplySnapshotChunk.fromSDK(object.apply_snapshot_chunk) : undefined - }; - }, - toSDK(message: Response): ResponseSDKType { - const obj: any = {}; - message.exception !== undefined && (obj.exception = message.exception ? ResponseException.toSDK(message.exception) : undefined); - message.echo !== undefined && (obj.echo = message.echo ? ResponseEcho.toSDK(message.echo) : undefined); - message.flush !== undefined && (obj.flush = message.flush ? ResponseFlush.toSDK(message.flush) : undefined); - message.info !== undefined && (obj.info = message.info ? ResponseInfo.toSDK(message.info) : undefined); - message.setOption !== undefined && (obj.set_option = message.setOption ? ResponseSetOption.toSDK(message.setOption) : undefined); - message.initChain !== undefined && (obj.init_chain = message.initChain ? ResponseInitChain.toSDK(message.initChain) : undefined); - message.query !== undefined && (obj.query = message.query ? ResponseQuery.toSDK(message.query) : undefined); - message.beginBlock !== undefined && (obj.begin_block = message.beginBlock ? ResponseBeginBlock.toSDK(message.beginBlock) : undefined); - message.checkTx !== undefined && (obj.check_tx = message.checkTx ? ResponseCheckTx.toSDK(message.checkTx) : undefined); - message.deliverTx !== undefined && (obj.deliver_tx = message.deliverTx ? ResponseDeliverTx.toSDK(message.deliverTx) : undefined); - message.endBlock !== undefined && (obj.end_block = message.endBlock ? ResponseEndBlock.toSDK(message.endBlock) : undefined); - message.commit !== undefined && (obj.commit = message.commit ? ResponseCommit.toSDK(message.commit) : undefined); - message.listSnapshots !== undefined && (obj.list_snapshots = message.listSnapshots ? ResponseListSnapshots.toSDK(message.listSnapshots) : undefined); - message.offerSnapshot !== undefined && (obj.offer_snapshot = message.offerSnapshot ? ResponseOfferSnapshot.toSDK(message.offerSnapshot) : undefined); - message.loadSnapshotChunk !== undefined && (obj.load_snapshot_chunk = message.loadSnapshotChunk ? ResponseLoadSnapshotChunk.toSDK(message.loadSnapshotChunk) : undefined); - message.applySnapshotChunk !== undefined && (obj.apply_snapshot_chunk = message.applySnapshotChunk ? ResponseApplySnapshotChunk.toSDK(message.applySnapshotChunk) : undefined); - return obj; - }, - fromAmino(object: ResponseAmino): Response { - return { - exception: object?.exception ? ResponseException.fromAmino(object.exception) : undefined, - echo: object?.echo ? ResponseEcho.fromAmino(object.echo) : undefined, - flush: object?.flush ? ResponseFlush.fromAmino(object.flush) : undefined, - info: object?.info ? ResponseInfo.fromAmino(object.info) : undefined, - setOption: object?.set_option ? ResponseSetOption.fromAmino(object.set_option) : undefined, - initChain: object?.init_chain ? ResponseInitChain.fromAmino(object.init_chain) : undefined, - query: object?.query ? ResponseQuery.fromAmino(object.query) : undefined, - beginBlock: object?.begin_block ? ResponseBeginBlock.fromAmino(object.begin_block) : undefined, - checkTx: object?.check_tx ? ResponseCheckTx.fromAmino(object.check_tx) : undefined, - deliverTx: object?.deliver_tx ? ResponseDeliverTx.fromAmino(object.deliver_tx) : undefined, - endBlock: object?.end_block ? ResponseEndBlock.fromAmino(object.end_block) : undefined, - commit: object?.commit ? ResponseCommit.fromAmino(object.commit) : undefined, - listSnapshots: object?.list_snapshots ? ResponseListSnapshots.fromAmino(object.list_snapshots) : undefined, - offerSnapshot: object?.offer_snapshot ? ResponseOfferSnapshot.fromAmino(object.offer_snapshot) : undefined, - loadSnapshotChunk: object?.load_snapshot_chunk ? ResponseLoadSnapshotChunk.fromAmino(object.load_snapshot_chunk) : undefined, - applySnapshotChunk: object?.apply_snapshot_chunk ? ResponseApplySnapshotChunk.fromAmino(object.apply_snapshot_chunk) : undefined - }; - }, - toAmino(message: Response): ResponseAmino { - const obj: any = {}; - obj.exception = message.exception ? ResponseException.toAmino(message.exception) : undefined; - obj.echo = message.echo ? ResponseEcho.toAmino(message.echo) : undefined; - obj.flush = message.flush ? ResponseFlush.toAmino(message.flush) : undefined; - obj.info = message.info ? ResponseInfo.toAmino(message.info) : undefined; - obj.set_option = message.setOption ? ResponseSetOption.toAmino(message.setOption) : undefined; - obj.init_chain = message.initChain ? ResponseInitChain.toAmino(message.initChain) : undefined; - obj.query = message.query ? ResponseQuery.toAmino(message.query) : undefined; - obj.begin_block = message.beginBlock ? ResponseBeginBlock.toAmino(message.beginBlock) : undefined; - obj.check_tx = message.checkTx ? ResponseCheckTx.toAmino(message.checkTx) : undefined; - obj.deliver_tx = message.deliverTx ? ResponseDeliverTx.toAmino(message.deliverTx) : undefined; - obj.end_block = message.endBlock ? ResponseEndBlock.toAmino(message.endBlock) : undefined; - obj.commit = message.commit ? ResponseCommit.toAmino(message.commit) : undefined; - obj.list_snapshots = message.listSnapshots ? ResponseListSnapshots.toAmino(message.listSnapshots) : undefined; - obj.offer_snapshot = message.offerSnapshot ? ResponseOfferSnapshot.toAmino(message.offerSnapshot) : undefined; - obj.load_snapshot_chunk = message.loadSnapshotChunk ? ResponseLoadSnapshotChunk.toAmino(message.loadSnapshotChunk) : undefined; - obj.apply_snapshot_chunk = message.applySnapshotChunk ? ResponseApplySnapshotChunk.toAmino(message.applySnapshotChunk) : undefined; - return obj; - }, - fromAminoMsg(object: ResponseAminoMsg): Response { - return Response.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseProtoMsg): Response { - return Response.decode(message.value); - }, - toProto(message: Response): Uint8Array { - return Response.encode(message).finish(); - }, - toProtoMsg(message: Response): ResponseProtoMsg { - return { - typeUrl: "/tendermint.abci.Response", - value: Response.encode(message).finish() - }; - } -}; -function createBaseResponseException(): ResponseException { - return { - error: "" - }; -} -export const ResponseException = { - typeUrl: "/tendermint.abci.ResponseException", - encode(message: ResponseException, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.error !== "") { - writer.uint32(10).string(message.error); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseException { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseException(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseException { - return { - error: isSet(object.error) ? String(object.error) : "" - }; - }, - toJSON(message: ResponseException): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = message.error); - return obj; - }, - fromPartial(object: DeepPartial): ResponseException { - const message = createBaseResponseException(); - message.error = object.error ?? ""; - return message; - }, - fromSDK(object: ResponseExceptionSDKType): ResponseException { - return { - error: object?.error - }; - }, - toSDK(message: ResponseException): ResponseExceptionSDKType { - const obj: any = {}; - obj.error = message.error; - return obj; - }, - fromAmino(object: ResponseExceptionAmino): ResponseException { - return { - error: object.error - }; - }, - toAmino(message: ResponseException): ResponseExceptionAmino { - const obj: any = {}; - obj.error = message.error; - return obj; - }, - fromAminoMsg(object: ResponseExceptionAminoMsg): ResponseException { - return ResponseException.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseExceptionProtoMsg): ResponseException { - return ResponseException.decode(message.value); - }, - toProto(message: ResponseException): Uint8Array { - return ResponseException.encode(message).finish(); - }, - toProtoMsg(message: ResponseException): ResponseExceptionProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseException", - value: ResponseException.encode(message).finish() - }; - } -}; -function createBaseResponseEcho(): ResponseEcho { - return { - message: "" - }; -} -export const ResponseEcho = { - typeUrl: "/tendermint.abci.ResponseEcho", - encode(message: ResponseEcho, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.message !== "") { - writer.uint32(10).string(message.message); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseEcho { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseEcho(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseEcho { - return { - message: isSet(object.message) ? String(object.message) : "" - }; - }, - toJSON(message: ResponseEcho): unknown { - const obj: any = {}; - message.message !== undefined && (obj.message = message.message); - return obj; - }, - fromPartial(object: DeepPartial): ResponseEcho { - const message = createBaseResponseEcho(); - message.message = object.message ?? ""; - return message; - }, - fromSDK(object: ResponseEchoSDKType): ResponseEcho { - return { - message: object?.message - }; - }, - toSDK(message: ResponseEcho): ResponseEchoSDKType { - const obj: any = {}; - obj.message = message.message; - return obj; - }, - fromAmino(object: ResponseEchoAmino): ResponseEcho { - return { - message: object.message - }; - }, - toAmino(message: ResponseEcho): ResponseEchoAmino { - const obj: any = {}; - obj.message = message.message; - return obj; - }, - fromAminoMsg(object: ResponseEchoAminoMsg): ResponseEcho { - return ResponseEcho.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseEchoProtoMsg): ResponseEcho { - return ResponseEcho.decode(message.value); - }, - toProto(message: ResponseEcho): Uint8Array { - return ResponseEcho.encode(message).finish(); - }, - toProtoMsg(message: ResponseEcho): ResponseEchoProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseEcho", - value: ResponseEcho.encode(message).finish() - }; - } -}; -function createBaseResponseFlush(): ResponseFlush { - return {}; -} -export const ResponseFlush = { - typeUrl: "/tendermint.abci.ResponseFlush", - encode(_: ResponseFlush, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseFlush { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseFlush(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_: any): ResponseFlush { - return {}; - }, - toJSON(_: ResponseFlush): unknown { - const obj: any = {}; - return obj; - }, - fromPartial(_: DeepPartial): ResponseFlush { - const message = createBaseResponseFlush(); - return message; - }, - fromSDK(_: ResponseFlushSDKType): ResponseFlush { - return {}; - }, - toSDK(_: ResponseFlush): ResponseFlushSDKType { - const obj: any = {}; - return obj; - }, - fromAmino(_: ResponseFlushAmino): ResponseFlush { - return {}; - }, - toAmino(_: ResponseFlush): ResponseFlushAmino { - const obj: any = {}; - return obj; - }, - fromAminoMsg(object: ResponseFlushAminoMsg): ResponseFlush { - return ResponseFlush.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseFlushProtoMsg): ResponseFlush { - return ResponseFlush.decode(message.value); - }, - toProto(message: ResponseFlush): Uint8Array { - return ResponseFlush.encode(message).finish(); - }, - toProtoMsg(message: ResponseFlush): ResponseFlushProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseFlush", - value: ResponseFlush.encode(message).finish() - }; - } -}; -function createBaseResponseInfo(): ResponseInfo { - return { - data: "", - version: "", - appVersion: BigInt(0), - lastBlockHeight: BigInt(0), - lastBlockAppHash: new Uint8Array() - }; -} -export const ResponseInfo = { - typeUrl: "/tendermint.abci.ResponseInfo", - encode(message: ResponseInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data !== "") { - writer.uint32(10).string(message.data); - } - if (message.version !== "") { - writer.uint32(18).string(message.version); - } - if (message.appVersion !== BigInt(0)) { - writer.uint32(24).uint64(message.appVersion); - } - if (message.lastBlockHeight !== BigInt(0)) { - writer.uint32(32).int64(message.lastBlockHeight); - } - if (message.lastBlockAppHash.length !== 0) { - writer.uint32(42).bytes(message.lastBlockAppHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.appVersion = reader.uint64(); - break; - case 4: - message.lastBlockHeight = reader.int64(); - break; - case 5: - message.lastBlockAppHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseInfo { - return { - data: isSet(object.data) ? String(object.data) : "", - version: isSet(object.version) ? String(object.version) : "", - appVersion: isSet(object.appVersion) ? BigInt(object.appVersion.toString()) : BigInt(0), - lastBlockHeight: isSet(object.lastBlockHeight) ? BigInt(object.lastBlockHeight.toString()) : BigInt(0), - lastBlockAppHash: isSet(object.lastBlockAppHash) ? bytesFromBase64(object.lastBlockAppHash) : new Uint8Array() - }; - }, - toJSON(message: ResponseInfo): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = message.data); - message.version !== undefined && (obj.version = message.version); - message.appVersion !== undefined && (obj.appVersion = (message.appVersion || BigInt(0)).toString()); - message.lastBlockHeight !== undefined && (obj.lastBlockHeight = (message.lastBlockHeight || BigInt(0)).toString()); - message.lastBlockAppHash !== undefined && (obj.lastBlockAppHash = base64FromBytes(message.lastBlockAppHash !== undefined ? message.lastBlockAppHash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ResponseInfo { - const message = createBaseResponseInfo(); - message.data = object.data ?? ""; - message.version = object.version ?? ""; - message.appVersion = object.appVersion !== undefined && object.appVersion !== null ? BigInt(object.appVersion.toString()) : BigInt(0); - message.lastBlockHeight = object.lastBlockHeight !== undefined && object.lastBlockHeight !== null ? BigInt(object.lastBlockHeight.toString()) : BigInt(0); - message.lastBlockAppHash = object.lastBlockAppHash ?? new Uint8Array(); - return message; - }, - fromSDK(object: ResponseInfoSDKType): ResponseInfo { - return { - data: object?.data, - version: object?.version, - appVersion: object?.app_version, - lastBlockHeight: object?.last_block_height, - lastBlockAppHash: object?.last_block_app_hash - }; - }, - toSDK(message: ResponseInfo): ResponseInfoSDKType { - const obj: any = {}; - obj.data = message.data; - obj.version = message.version; - obj.app_version = message.appVersion; - obj.last_block_height = message.lastBlockHeight; - obj.last_block_app_hash = message.lastBlockAppHash; - return obj; - }, - fromAmino(object: ResponseInfoAmino): ResponseInfo { - return { - data: object.data, - version: object.version, - appVersion: BigInt(object.app_version), - lastBlockHeight: BigInt(object.last_block_height), - lastBlockAppHash: object.last_block_app_hash - }; - }, - toAmino(message: ResponseInfo): ResponseInfoAmino { - const obj: any = {}; - obj.data = message.data; - obj.version = message.version; - obj.app_version = message.appVersion ? message.appVersion.toString() : undefined; - obj.last_block_height = message.lastBlockHeight ? message.lastBlockHeight.toString() : undefined; - obj.last_block_app_hash = message.lastBlockAppHash; - return obj; - }, - fromAminoMsg(object: ResponseInfoAminoMsg): ResponseInfo { - return ResponseInfo.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseInfoProtoMsg): ResponseInfo { - return ResponseInfo.decode(message.value); - }, - toProto(message: ResponseInfo): Uint8Array { - return ResponseInfo.encode(message).finish(); - }, - toProtoMsg(message: ResponseInfo): ResponseInfoProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseInfo", - value: ResponseInfo.encode(message).finish() - }; - } -}; -function createBaseResponseSetOption(): ResponseSetOption { - return { - code: 0, - log: "", - info: "" - }; -} -export const ResponseSetOption = { - typeUrl: "/tendermint.abci.ResponseSetOption", - encode(message: ResponseSetOption, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseSetOption { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseSetOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseSetOption { - return { - code: isSet(object.code) ? Number(object.code) : 0, - log: isSet(object.log) ? String(object.log) : "", - info: isSet(object.info) ? String(object.info) : "" - }; - }, - toJSON(message: ResponseSetOption): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = Math.round(message.code)); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - return obj; - }, - fromPartial(object: DeepPartial): ResponseSetOption { - const message = createBaseResponseSetOption(); - message.code = object.code ?? 0; - message.log = object.log ?? ""; - message.info = object.info ?? ""; - return message; - }, - fromSDK(object: ResponseSetOptionSDKType): ResponseSetOption { - return { - code: object?.code, - log: object?.log, - info: object?.info - }; - }, - toSDK(message: ResponseSetOption): ResponseSetOptionSDKType { - const obj: any = {}; - obj.code = message.code; - obj.log = message.log; - obj.info = message.info; - return obj; - }, - fromAmino(object: ResponseSetOptionAmino): ResponseSetOption { - return { - code: object.code, - log: object.log, - info: object.info - }; - }, - toAmino(message: ResponseSetOption): ResponseSetOptionAmino { - const obj: any = {}; - obj.code = message.code; - obj.log = message.log; - obj.info = message.info; - return obj; - }, - fromAminoMsg(object: ResponseSetOptionAminoMsg): ResponseSetOption { - return ResponseSetOption.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseSetOptionProtoMsg): ResponseSetOption { - return ResponseSetOption.decode(message.value); - }, - toProto(message: ResponseSetOption): Uint8Array { - return ResponseSetOption.encode(message).finish(); - }, - toProtoMsg(message: ResponseSetOption): ResponseSetOptionProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseSetOption", - value: ResponseSetOption.encode(message).finish() - }; - } -}; -function createBaseResponseInitChain(): ResponseInitChain { - return { - consensusParams: ConsensusParams.fromPartial({}), - validators: [], - appHash: new Uint8Array() - }; -} -export const ResponseInitChain = { - typeUrl: "/tendermint.abci.ResponseInitChain", - encode(message: ResponseInitChain, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.consensusParams !== undefined) { - ConsensusParams.encode(message.consensusParams, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.validators) { - ValidatorUpdate.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.appHash.length !== 0) { - writer.uint32(26).bytes(message.appHash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseInitChain { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseInitChain(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensusParams = ConsensusParams.decode(reader, reader.uint32()); - break; - case 2: - message.validators.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 3: - message.appHash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseInitChain { - return { - consensusParams: isSet(object.consensusParams) ? ConsensusParams.fromJSON(object.consensusParams) : undefined, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => ValidatorUpdate.fromJSON(e)) : [], - appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array() - }; - }, - toJSON(message: ResponseInitChain): unknown { - const obj: any = {}; - message.consensusParams !== undefined && (obj.consensusParams = message.consensusParams ? ConsensusParams.toJSON(message.consensusParams) : undefined); - if (message.validators) { - obj.validators = message.validators.map(e => e ? ValidatorUpdate.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.appHash !== undefined && (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ResponseInitChain { - const message = createBaseResponseInitChain(); - message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null ? ConsensusParams.fromPartial(object.consensusParams) : undefined; - message.validators = object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || []; - message.appHash = object.appHash ?? new Uint8Array(); - return message; - }, - fromSDK(object: ResponseInitChainSDKType): ResponseInitChain { - return { - consensusParams: object.consensus_params ? ConsensusParams.fromSDK(object.consensus_params) : undefined, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => ValidatorUpdate.fromSDK(e)) : [], - appHash: object?.app_hash - }; - }, - toSDK(message: ResponseInitChain): ResponseInitChainSDKType { - const obj: any = {}; - message.consensusParams !== undefined && (obj.consensus_params = message.consensusParams ? ConsensusParams.toSDK(message.consensusParams) : undefined); - if (message.validators) { - obj.validators = message.validators.map(e => e ? ValidatorUpdate.toSDK(e) : undefined); - } else { - obj.validators = []; - } - obj.app_hash = message.appHash; - return obj; - }, - fromAmino(object: ResponseInitChainAmino): ResponseInitChain { - return { - consensusParams: object?.consensus_params ? ConsensusParams.fromAmino(object.consensus_params) : undefined, - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => ValidatorUpdate.fromAmino(e)) : [], - appHash: object.app_hash - }; - }, - toAmino(message: ResponseInitChain): ResponseInitChainAmino { - const obj: any = {}; - obj.consensus_params = message.consensusParams ? ConsensusParams.toAmino(message.consensusParams) : undefined; - if (message.validators) { - obj.validators = message.validators.map(e => e ? ValidatorUpdate.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.app_hash = message.appHash; - return obj; - }, - fromAminoMsg(object: ResponseInitChainAminoMsg): ResponseInitChain { - return ResponseInitChain.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseInitChainProtoMsg): ResponseInitChain { - return ResponseInitChain.decode(message.value); - }, - toProto(message: ResponseInitChain): Uint8Array { - return ResponseInitChain.encode(message).finish(); - }, - toProtoMsg(message: ResponseInitChain): ResponseInitChainProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseInitChain", - value: ResponseInitChain.encode(message).finish() - }; - } -}; -function createBaseResponseQuery(): ResponseQuery { - return { - code: 0, - log: "", - info: "", - index: BigInt(0), - key: new Uint8Array(), - value: new Uint8Array(), - proofOps: ProofOps.fromPartial({}), - height: BigInt(0), - codespace: "" - }; -} -export const ResponseQuery = { - typeUrl: "/tendermint.abci.ResponseQuery", - encode(message: ResponseQuery, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.index !== BigInt(0)) { - writer.uint32(40).int64(message.index); - } - if (message.key.length !== 0) { - writer.uint32(50).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(58).bytes(message.value); - } - if (message.proofOps !== undefined) { - ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim(); - } - if (message.height !== BigInt(0)) { - writer.uint32(72).int64(message.height); - } - if (message.codespace !== "") { - writer.uint32(82).string(message.codespace); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseQuery { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.index = reader.int64(); - break; - case 6: - message.key = reader.bytes(); - break; - case 7: - message.value = reader.bytes(); - break; - case 8: - message.proofOps = ProofOps.decode(reader, reader.uint32()); - break; - case 9: - message.height = reader.int64(); - break; - case 10: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseQuery { - return { - code: isSet(object.code) ? Number(object.code) : 0, - log: isSet(object.log) ? String(object.log) : "", - info: isSet(object.info) ? String(object.info) : "", - index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0), - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - proofOps: isSet(object.proofOps) ? ProofOps.fromJSON(object.proofOps) : undefined, - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - codespace: isSet(object.codespace) ? String(object.codespace) : "" - }; - }, - toJSON(message: ResponseQuery): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = Math.round(message.code)); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.index !== undefined && (obj.index = (message.index || BigInt(0)).toString()); - 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())); - message.proofOps !== undefined && (obj.proofOps = message.proofOps ? ProofOps.toJSON(message.proofOps) : undefined); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object: DeepPartial): ResponseQuery { - const message = createBaseResponseQuery(); - message.code = object.code ?? 0; - message.log = object.log ?? ""; - message.info = object.info ?? ""; - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.proofOps = object.proofOps !== undefined && object.proofOps !== null ? ProofOps.fromPartial(object.proofOps) : undefined; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.codespace = object.codespace ?? ""; - return message; - }, - fromSDK(object: ResponseQuerySDKType): ResponseQuery { - return { - code: object?.code, - log: object?.log, - info: object?.info, - index: object?.index, - key: object?.key, - value: object?.value, - proofOps: object.proof_ops ? ProofOps.fromSDK(object.proof_ops) : undefined, - height: object?.height, - codespace: object?.codespace - }; - }, - toSDK(message: ResponseQuery): ResponseQuerySDKType { - const obj: any = {}; - obj.code = message.code; - obj.log = message.log; - obj.info = message.info; - obj.index = message.index; - obj.key = message.key; - obj.value = message.value; - message.proofOps !== undefined && (obj.proof_ops = message.proofOps ? ProofOps.toSDK(message.proofOps) : undefined); - obj.height = message.height; - obj.codespace = message.codespace; - return obj; - }, - fromAmino(object: ResponseQueryAmino): ResponseQuery { - return { - code: object.code, - log: object.log, - info: object.info, - index: BigInt(object.index), - key: object.key, - value: object.value, - proofOps: object?.proof_ops ? ProofOps.fromAmino(object.proof_ops) : undefined, - height: BigInt(object.height), - codespace: object.codespace - }; - }, - toAmino(message: ResponseQuery): ResponseQueryAmino { - const obj: any = {}; - obj.code = message.code; - obj.log = message.log; - obj.info = message.info; - obj.index = message.index ? message.index.toString() : undefined; - obj.key = message.key; - obj.value = message.value; - obj.proof_ops = message.proofOps ? ProofOps.toAmino(message.proofOps) : undefined; - obj.height = message.height ? message.height.toString() : undefined; - obj.codespace = message.codespace; - return obj; - }, - fromAminoMsg(object: ResponseQueryAminoMsg): ResponseQuery { - return ResponseQuery.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseQueryProtoMsg): ResponseQuery { - return ResponseQuery.decode(message.value); - }, - toProto(message: ResponseQuery): Uint8Array { - return ResponseQuery.encode(message).finish(); - }, - toProtoMsg(message: ResponseQuery): ResponseQueryProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseQuery", - value: ResponseQuery.encode(message).finish() - }; - } -}; -function createBaseResponseBeginBlock(): ResponseBeginBlock { - return { - events: [] - }; -} -export const ResponseBeginBlock = { - typeUrl: "/tendermint.abci.ResponseBeginBlock", - encode(message: ResponseBeginBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.events) { - Event.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseBeginBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseBeginBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseBeginBlock { - return { - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [] - }; - }, - toJSON(message: ResponseBeginBlock): unknown { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ResponseBeginBlock { - const message = createBaseResponseBeginBlock(); - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ResponseBeginBlockSDKType): ResponseBeginBlock { - return { - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromSDK(e)) : [] - }; - }, - toSDK(message: ResponseBeginBlock): ResponseBeginBlockSDKType { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toSDK(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAmino(object: ResponseBeginBlockAmino): ResponseBeginBlock { - return { - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromAmino(e)) : [] - }; - }, - toAmino(message: ResponseBeginBlock): ResponseBeginBlockAmino { - const obj: any = {}; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAminoMsg(object: ResponseBeginBlockAminoMsg): ResponseBeginBlock { - return ResponseBeginBlock.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseBeginBlockProtoMsg): ResponseBeginBlock { - return ResponseBeginBlock.decode(message.value); - }, - toProto(message: ResponseBeginBlock): Uint8Array { - return ResponseBeginBlock.encode(message).finish(); - }, - toProtoMsg(message: ResponseBeginBlock): ResponseBeginBlockProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseBeginBlock", - value: ResponseBeginBlock.encode(message).finish() - }; - } -}; -function createBaseResponseCheckTx(): ResponseCheckTx { - return { - code: 0, - data: new Uint8Array(), - log: "", - info: "", - gasWanted: BigInt(0), - gasUsed: BigInt(0), - events: [], - codespace: "" - }; -} -export const ResponseCheckTx = { - typeUrl: "/tendermint.abci.ResponseCheckTx", - encode(message: ResponseCheckTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== BigInt(0)) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseCheckTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseCheckTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = reader.int64(); - break; - case 6: - message.gasUsed = reader.int64(); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseCheckTx { - return { - code: isSet(object.code) ? Number(object.code) : 0, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - log: isSet(object.log) ? String(object.log) : "", - info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gas_wanted) ? BigInt(object.gas_wanted.toString()) : BigInt(0), - gasUsed: isSet(object.gas_used) ? BigInt(object.gas_used.toString()) : BigInt(0), - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], - codespace: isSet(object.codespace) ? String(object.codespace) : "" - }; - }, - toJSON(message: ResponseCheckTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = Math.round(message.code)); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gas_wanted = (message.gasWanted || BigInt(0)).toString()); - message.gasUsed !== undefined && (obj.gas_used = (message.gasUsed || BigInt(0)).toString()); - if (message.events) { - obj.events = message.events.map(e => e ? Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object: DeepPartial): ResponseCheckTx { - const message = createBaseResponseCheckTx(); - message.code = object.code ?? 0; - message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.info = object.info ?? ""; - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.codespace = object.codespace ?? ""; - return message; - }, - fromSDK(object: ResponseCheckTxSDKType): ResponseCheckTx { - return { - code: object?.code, - data: object?.data, - log: object?.log, - info: object?.info, - gasWanted: object?.gas_wanted, - gasUsed: object?.gas_used, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromSDK(e)) : [], - codespace: object?.codespace - }; - }, - toSDK(message: ResponseCheckTx): ResponseCheckTxSDKType { - const obj: any = {}; - obj.code = message.code; - obj.data = message.data; - obj.log = message.log; - obj.info = message.info; - obj.gas_wanted = message.gasWanted; - obj.gas_used = message.gasUsed; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toSDK(e) : undefined); - } else { - obj.events = []; - } - obj.codespace = message.codespace; - return obj; - }, - fromAmino(object: ResponseCheckTxAmino): ResponseCheckTx { - return { - code: object.code, - data: object.data, - log: object.log, - info: object.info, - gasWanted: BigInt(object.gas_wanted), - gasUsed: BigInt(object.gas_used), - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromAmino(e)) : [], - codespace: object.codespace - }; - }, - toAmino(message: ResponseCheckTx): ResponseCheckTxAmino { - const obj: any = {}; - obj.code = message.code; - obj.data = message.data; - obj.log = message.log; - obj.info = message.info; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); - } else { - obj.events = []; - } - obj.codespace = message.codespace; - return obj; - }, - fromAminoMsg(object: ResponseCheckTxAminoMsg): ResponseCheckTx { - return ResponseCheckTx.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseCheckTxProtoMsg): ResponseCheckTx { - return ResponseCheckTx.decode(message.value); - }, - toProto(message: ResponseCheckTx): Uint8Array { - return ResponseCheckTx.encode(message).finish(); - }, - toProtoMsg(message: ResponseCheckTx): ResponseCheckTxProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseCheckTx", - value: ResponseCheckTx.encode(message).finish() - }; - } -}; -function createBaseResponseDeliverTx(): ResponseDeliverTx { - return { - code: 0, - data: new Uint8Array(), - log: "", - info: "", - gasWanted: BigInt(0), - gasUsed: BigInt(0), - events: [], - codespace: "" - }; -} -export const ResponseDeliverTx = { - typeUrl: "/tendermint.abci.ResponseDeliverTx", - encode(message: ResponseDeliverTx, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.code !== 0) { - writer.uint32(8).uint32(message.code); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.log !== "") { - writer.uint32(26).string(message.log); - } - if (message.info !== "") { - writer.uint32(34).string(message.info); - } - if (message.gasWanted !== BigInt(0)) { - writer.uint32(40).int64(message.gasWanted); - } - if (message.gasUsed !== BigInt(0)) { - writer.uint32(48).int64(message.gasUsed); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.codespace !== "") { - writer.uint32(66).string(message.codespace); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseDeliverTx { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseDeliverTx(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.log = reader.string(); - break; - case 4: - message.info = reader.string(); - break; - case 5: - message.gasWanted = reader.int64(); - break; - case 6: - message.gasUsed = reader.int64(); - break; - case 7: - message.events.push(Event.decode(reader, reader.uint32())); - break; - case 8: - message.codespace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseDeliverTx { - return { - code: isSet(object.code) ? Number(object.code) : 0, - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - log: isSet(object.log) ? String(object.log) : "", - info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gas_wanted) ? BigInt(object.gas_wanted.toString()) : BigInt(0), - gasUsed: isSet(object.gas_used) ? BigInt(object.gas_used.toString()) : BigInt(0), - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], - codespace: isSet(object.codespace) ? String(object.codespace) : "" - }; - }, - toJSON(message: ResponseDeliverTx): unknown { - const obj: any = {}; - message.code !== undefined && (obj.code = Math.round(message.code)); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.log !== undefined && (obj.log = message.log); - message.info !== undefined && (obj.info = message.info); - message.gasWanted !== undefined && (obj.gas_wanted = (message.gasWanted || BigInt(0)).toString()); - message.gasUsed !== undefined && (obj.gas_used = (message.gasUsed || BigInt(0)).toString()); - if (message.events) { - obj.events = message.events.map(e => e ? Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - message.codespace !== undefined && (obj.codespace = message.codespace); - return obj; - }, - fromPartial(object: DeepPartial): ResponseDeliverTx { - const message = createBaseResponseDeliverTx(); - message.code = object.code ?? 0; - message.data = object.data ?? new Uint8Array(); - message.log = object.log ?? ""; - message.info = object.info ?? ""; - message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null ? BigInt(object.gasWanted.toString()) : BigInt(0); - message.gasUsed = object.gasUsed !== undefined && object.gasUsed !== null ? BigInt(object.gasUsed.toString()) : BigInt(0); - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - message.codespace = object.codespace ?? ""; - return message; - }, - fromSDK(object: ResponseDeliverTxSDKType): ResponseDeliverTx { - return { - code: object?.code, - data: object?.data, - log: object?.log, - info: object?.info, - gasWanted: object?.gas_wanted, - gasUsed: object?.gas_used, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromSDK(e)) : [], - codespace: object?.codespace - }; - }, - toSDK(message: ResponseDeliverTx): ResponseDeliverTxSDKType { - const obj: any = {}; - obj.code = message.code; - obj.data = message.data; - obj.log = message.log; - obj.info = message.info; - obj.gas_wanted = message.gasWanted; - obj.gas_used = message.gasUsed; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toSDK(e) : undefined); - } else { - obj.events = []; - } - obj.codespace = message.codespace; - return obj; - }, - fromAmino(object: ResponseDeliverTxAmino): ResponseDeliverTx { - return { - code: object.code, - data: object.data, - log: object.log, - info: object.info, - gasWanted: BigInt(object.gas_wanted), - gasUsed: BigInt(object.gas_used), - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromAmino(e)) : [], - codespace: object.codespace - }; - }, - toAmino(message: ResponseDeliverTx): ResponseDeliverTxAmino { - const obj: any = {}; - obj.code = message.code; - obj.data = message.data; - obj.log = message.log; - obj.info = message.info; - obj.gas_wanted = message.gasWanted ? message.gasWanted.toString() : undefined; - obj.gas_used = message.gasUsed ? message.gasUsed.toString() : undefined; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); - } else { - obj.events = []; - } - obj.codespace = message.codespace; - return obj; - }, - fromAminoMsg(object: ResponseDeliverTxAminoMsg): ResponseDeliverTx { - return ResponseDeliverTx.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseDeliverTxProtoMsg): ResponseDeliverTx { - return ResponseDeliverTx.decode(message.value); - }, - toProto(message: ResponseDeliverTx): Uint8Array { - return ResponseDeliverTx.encode(message).finish(); - }, - toProtoMsg(message: ResponseDeliverTx): ResponseDeliverTxProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseDeliverTx", - value: ResponseDeliverTx.encode(message).finish() - }; - } -}; -function createBaseResponseEndBlock(): ResponseEndBlock { - return { - validatorUpdates: [], - consensusParamUpdates: ConsensusParams.fromPartial({}), - events: [] - }; -} -export const ResponseEndBlock = { - typeUrl: "/tendermint.abci.ResponseEndBlock", - encode(message: ResponseEndBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validatorUpdates) { - ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.consensusParamUpdates !== undefined) { - ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.events) { - Event.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseEndBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseEndBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 2: - message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32()); - break; - case 3: - message.events.push(Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseEndBlock { - return { - validatorUpdates: Array.isArray(object?.validatorUpdates) ? object.validatorUpdates.map((e: any) => ValidatorUpdate.fromJSON(e)) : [], - consensusParamUpdates: isSet(object.consensusParamUpdates) ? ConsensusParams.fromJSON(object.consensusParamUpdates) : undefined, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [] - }; - }, - toJSON(message: ResponseEndBlock): unknown { - const obj: any = {}; - if (message.validatorUpdates) { - obj.validatorUpdates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toJSON(e) : undefined); - } else { - obj.validatorUpdates = []; - } - message.consensusParamUpdates !== undefined && (obj.consensusParamUpdates = message.consensusParamUpdates ? ConsensusParams.toJSON(message.consensusParamUpdates) : undefined); - if (message.events) { - obj.events = message.events.map(e => e ? Event.toJSON(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ResponseEndBlock { - const message = createBaseResponseEndBlock(); - message.validatorUpdates = object.validatorUpdates?.map(e => ValidatorUpdate.fromPartial(e)) || []; - message.consensusParamUpdates = object.consensusParamUpdates !== undefined && object.consensusParamUpdates !== null ? ConsensusParams.fromPartial(object.consensusParamUpdates) : undefined; - message.events = object.events?.map(e => Event.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ResponseEndBlockSDKType): ResponseEndBlock { - return { - validatorUpdates: Array.isArray(object?.validator_updates) ? object.validator_updates.map((e: any) => ValidatorUpdate.fromSDK(e)) : [], - consensusParamUpdates: object.consensus_param_updates ? ConsensusParams.fromSDK(object.consensus_param_updates) : undefined, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromSDK(e)) : [] - }; - }, - toSDK(message: ResponseEndBlock): ResponseEndBlockSDKType { - const obj: any = {}; - if (message.validatorUpdates) { - obj.validator_updates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toSDK(e) : undefined); - } else { - obj.validator_updates = []; - } - message.consensusParamUpdates !== undefined && (obj.consensus_param_updates = message.consensusParamUpdates ? ConsensusParams.toSDK(message.consensusParamUpdates) : undefined); - if (message.events) { - obj.events = message.events.map(e => e ? Event.toSDK(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAmino(object: ResponseEndBlockAmino): ResponseEndBlock { - return { - validatorUpdates: Array.isArray(object?.validator_updates) ? object.validator_updates.map((e: any) => ValidatorUpdate.fromAmino(e)) : [], - consensusParamUpdates: object?.consensus_param_updates ? ConsensusParams.fromAmino(object.consensus_param_updates) : undefined, - events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromAmino(e)) : [] - }; - }, - toAmino(message: ResponseEndBlock): ResponseEndBlockAmino { - const obj: any = {}; - if (message.validatorUpdates) { - obj.validator_updates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toAmino(e) : undefined); - } else { - obj.validator_updates = []; - } - obj.consensus_param_updates = message.consensusParamUpdates ? ConsensusParams.toAmino(message.consensusParamUpdates) : undefined; - if (message.events) { - obj.events = message.events.map(e => e ? Event.toAmino(e) : undefined); - } else { - obj.events = []; - } - return obj; - }, - fromAminoMsg(object: ResponseEndBlockAminoMsg): ResponseEndBlock { - return ResponseEndBlock.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseEndBlockProtoMsg): ResponseEndBlock { - return ResponseEndBlock.decode(message.value); - }, - toProto(message: ResponseEndBlock): Uint8Array { - return ResponseEndBlock.encode(message).finish(); - }, - toProtoMsg(message: ResponseEndBlock): ResponseEndBlockProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseEndBlock", - value: ResponseEndBlock.encode(message).finish() - }; - } -}; -function createBaseResponseCommit(): ResponseCommit { - return { - data: new Uint8Array(), - retainHeight: BigInt(0) - }; -} -export const ResponseCommit = { - typeUrl: "/tendermint.abci.ResponseCommit", - encode(message: ResponseCommit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.retainHeight !== BigInt(0)) { - writer.uint32(24).int64(message.retainHeight); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseCommit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseCommit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retainHeight = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseCommit { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - retainHeight: isSet(object.retainHeight) ? BigInt(object.retainHeight.toString()) : BigInt(0) - }; - }, - toJSON(message: ResponseCommit): unknown { - const obj: any = {}; - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.retainHeight !== undefined && (obj.retainHeight = (message.retainHeight || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ResponseCommit { - const message = createBaseResponseCommit(); - message.data = object.data ?? new Uint8Array(); - message.retainHeight = object.retainHeight !== undefined && object.retainHeight !== null ? BigInt(object.retainHeight.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ResponseCommitSDKType): ResponseCommit { - return { - data: object?.data, - retainHeight: object?.retain_height - }; - }, - toSDK(message: ResponseCommit): ResponseCommitSDKType { - const obj: any = {}; - obj.data = message.data; - obj.retain_height = message.retainHeight; - return obj; - }, - fromAmino(object: ResponseCommitAmino): ResponseCommit { - return { - data: object.data, - retainHeight: BigInt(object.retain_height) - }; - }, - toAmino(message: ResponseCommit): ResponseCommitAmino { - const obj: any = {}; - obj.data = message.data; - obj.retain_height = message.retainHeight ? message.retainHeight.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ResponseCommitAminoMsg): ResponseCommit { - return ResponseCommit.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseCommitProtoMsg): ResponseCommit { - return ResponseCommit.decode(message.value); - }, - toProto(message: ResponseCommit): Uint8Array { - return ResponseCommit.encode(message).finish(); - }, - toProtoMsg(message: ResponseCommit): ResponseCommitProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseCommit", - value: ResponseCommit.encode(message).finish() - }; - } -}; -function createBaseResponseListSnapshots(): ResponseListSnapshots { - return { - snapshots: [] - }; -} -export const ResponseListSnapshots = { - typeUrl: "/tendermint.abci.ResponseListSnapshots", - encode(message: ResponseListSnapshots, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.snapshots) { - Snapshot.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseListSnapshots { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseListSnapshots(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshots.push(Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseListSnapshots { - return { - snapshots: Array.isArray(object?.snapshots) ? object.snapshots.map((e: any) => Snapshot.fromJSON(e)) : [] - }; - }, - toJSON(message: ResponseListSnapshots): unknown { - const obj: any = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map(e => e ? Snapshot.toJSON(e) : undefined); - } else { - obj.snapshots = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ResponseListSnapshots { - const message = createBaseResponseListSnapshots(); - message.snapshots = object.snapshots?.map(e => Snapshot.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ResponseListSnapshotsSDKType): ResponseListSnapshots { - return { - snapshots: Array.isArray(object?.snapshots) ? object.snapshots.map((e: any) => Snapshot.fromSDK(e)) : [] - }; - }, - toSDK(message: ResponseListSnapshots): ResponseListSnapshotsSDKType { - const obj: any = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map(e => e ? Snapshot.toSDK(e) : undefined); - } else { - obj.snapshots = []; - } - return obj; - }, - fromAmino(object: ResponseListSnapshotsAmino): ResponseListSnapshots { - return { - snapshots: Array.isArray(object?.snapshots) ? object.snapshots.map((e: any) => Snapshot.fromAmino(e)) : [] - }; - }, - toAmino(message: ResponseListSnapshots): ResponseListSnapshotsAmino { - const obj: any = {}; - if (message.snapshots) { - obj.snapshots = message.snapshots.map(e => e ? Snapshot.toAmino(e) : undefined); - } else { - obj.snapshots = []; - } - return obj; - }, - fromAminoMsg(object: ResponseListSnapshotsAminoMsg): ResponseListSnapshots { - return ResponseListSnapshots.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseListSnapshotsProtoMsg): ResponseListSnapshots { - return ResponseListSnapshots.decode(message.value); - }, - toProto(message: ResponseListSnapshots): Uint8Array { - return ResponseListSnapshots.encode(message).finish(); - }, - toProtoMsg(message: ResponseListSnapshots): ResponseListSnapshotsProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseListSnapshots", - value: ResponseListSnapshots.encode(message).finish() - }; - } -}; -function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { - return { - result: 0 - }; -} -export const ResponseOfferSnapshot = { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot", - encode(message: ResponseOfferSnapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseOfferSnapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseOfferSnapshot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseOfferSnapshot { - return { - result: isSet(object.result) ? responseOfferSnapshot_ResultFromJSON(object.result) : -1 - }; - }, - toJSON(message: ResponseOfferSnapshot): unknown { - const obj: any = {}; - message.result !== undefined && (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - fromPartial(object: DeepPartial): ResponseOfferSnapshot { - const message = createBaseResponseOfferSnapshot(); - message.result = object.result ?? 0; - return message; - }, - fromSDK(object: ResponseOfferSnapshotSDKType): ResponseOfferSnapshot { - return { - result: isSet(object.result) ? responseOfferSnapshot_ResultFromJSON(object.result) : -1 - }; - }, - toSDK(message: ResponseOfferSnapshot): ResponseOfferSnapshotSDKType { - const obj: any = {}; - message.result !== undefined && (obj.result = responseOfferSnapshot_ResultToJSON(message.result)); - return obj; - }, - fromAmino(object: ResponseOfferSnapshotAmino): ResponseOfferSnapshot { - return { - result: isSet(object.result) ? responseOfferSnapshot_ResultFromJSON(object.result) : -1 - }; - }, - toAmino(message: ResponseOfferSnapshot): ResponseOfferSnapshotAmino { - const obj: any = {}; - obj.result = message.result; - return obj; - }, - fromAminoMsg(object: ResponseOfferSnapshotAminoMsg): ResponseOfferSnapshot { - return ResponseOfferSnapshot.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseOfferSnapshotProtoMsg): ResponseOfferSnapshot { - return ResponseOfferSnapshot.decode(message.value); - }, - toProto(message: ResponseOfferSnapshot): Uint8Array { - return ResponseOfferSnapshot.encode(message).finish(); - }, - toProtoMsg(message: ResponseOfferSnapshot): ResponseOfferSnapshotProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseOfferSnapshot", - value: ResponseOfferSnapshot.encode(message).finish() - }; - } -}; -function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { - return { - chunk: new Uint8Array() - }; -} -export const ResponseLoadSnapshotChunk = { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", - encode(message: ResponseLoadSnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.chunk.length !== 0) { - writer.uint32(10).bytes(message.chunk); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseLoadSnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseLoadSnapshotChunk(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseLoadSnapshotChunk { - return { - chunk: isSet(object.chunk) ? bytesFromBase64(object.chunk) : new Uint8Array() - }; - }, - toJSON(message: ResponseLoadSnapshotChunk): unknown { - const obj: any = {}; - message.chunk !== undefined && (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk { - const message = createBaseResponseLoadSnapshotChunk(); - message.chunk = object.chunk ?? new Uint8Array(); - return message; - }, - fromSDK(object: ResponseLoadSnapshotChunkSDKType): ResponseLoadSnapshotChunk { - return { - chunk: object?.chunk - }; - }, - toSDK(message: ResponseLoadSnapshotChunk): ResponseLoadSnapshotChunkSDKType { - const obj: any = {}; - obj.chunk = message.chunk; - return obj; - }, - fromAmino(object: ResponseLoadSnapshotChunkAmino): ResponseLoadSnapshotChunk { - return { - chunk: object.chunk - }; - }, - toAmino(message: ResponseLoadSnapshotChunk): ResponseLoadSnapshotChunkAmino { - const obj: any = {}; - obj.chunk = message.chunk; - return obj; - }, - fromAminoMsg(object: ResponseLoadSnapshotChunkAminoMsg): ResponseLoadSnapshotChunk { - return ResponseLoadSnapshotChunk.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseLoadSnapshotChunkProtoMsg): ResponseLoadSnapshotChunk { - return ResponseLoadSnapshotChunk.decode(message.value); - }, - toProto(message: ResponseLoadSnapshotChunk): Uint8Array { - return ResponseLoadSnapshotChunk.encode(message).finish(); - }, - toProtoMsg(message: ResponseLoadSnapshotChunk): ResponseLoadSnapshotChunkProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseLoadSnapshotChunk", - value: ResponseLoadSnapshotChunk.encode(message).finish() - }; - } -}; -function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { - return { - result: 0, - refetchChunks: [], - rejectSenders: [] - }; -} -export const ResponseApplySnapshotChunk = { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", - encode(message: ResponseApplySnapshotChunk, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.result !== 0) { - writer.uint32(8).int32(message.result); - } - writer.uint32(18).fork(); - for (const v of message.refetchChunks) { - writer.uint32(v); - } - writer.ldelim(); - for (const v of message.rejectSenders) { - writer.uint32(26).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ResponseApplySnapshotChunk { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponseApplySnapshotChunk(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = (reader.int32() as any); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.refetchChunks.push(reader.uint32()); - } - } else { - message.refetchChunks.push(reader.uint32()); - } - break; - case 3: - message.rejectSenders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ResponseApplySnapshotChunk { - return { - result: isSet(object.result) ? responseApplySnapshotChunk_ResultFromJSON(object.result) : -1, - refetchChunks: Array.isArray(object?.refetchChunks) ? object.refetchChunks.map((e: any) => Number(e)) : [], - rejectSenders: Array.isArray(object?.rejectSenders) ? object.rejectSenders.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ResponseApplySnapshotChunk): unknown { - const obj: any = {}; - message.result !== undefined && (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetchChunks) { - obj.refetchChunks = message.refetchChunks.map(e => Math.round(e)); - } else { - obj.refetchChunks = []; - } - if (message.rejectSenders) { - obj.rejectSenders = message.rejectSenders.map(e => e); - } else { - obj.rejectSenders = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ResponseApplySnapshotChunk { - const message = createBaseResponseApplySnapshotChunk(); - message.result = object.result ?? 0; - message.refetchChunks = object.refetchChunks?.map(e => e) || []; - message.rejectSenders = object.rejectSenders?.map(e => e) || []; - return message; - }, - fromSDK(object: ResponseApplySnapshotChunkSDKType): ResponseApplySnapshotChunk { - return { - result: isSet(object.result) ? responseApplySnapshotChunk_ResultFromJSON(object.result) : -1, - refetchChunks: Array.isArray(object?.refetch_chunks) ? object.refetch_chunks.map((e: any) => e) : [], - rejectSenders: Array.isArray(object?.reject_senders) ? object.reject_senders.map((e: any) => e) : [] - }; - }, - toSDK(message: ResponseApplySnapshotChunk): ResponseApplySnapshotChunkSDKType { - const obj: any = {}; - message.result !== undefined && (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result)); - if (message.refetchChunks) { - obj.refetch_chunks = message.refetchChunks.map(e => e); - } else { - obj.refetch_chunks = []; - } - if (message.rejectSenders) { - obj.reject_senders = message.rejectSenders.map(e => e); - } else { - obj.reject_senders = []; - } - return obj; - }, - fromAmino(object: ResponseApplySnapshotChunkAmino): ResponseApplySnapshotChunk { - return { - result: isSet(object.result) ? responseApplySnapshotChunk_ResultFromJSON(object.result) : -1, - refetchChunks: Array.isArray(object?.refetch_chunks) ? object.refetch_chunks.map((e: any) => e) : [], - rejectSenders: Array.isArray(object?.reject_senders) ? object.reject_senders.map((e: any) => e) : [] - }; - }, - toAmino(message: ResponseApplySnapshotChunk): ResponseApplySnapshotChunkAmino { - const obj: any = {}; - obj.result = message.result; - if (message.refetchChunks) { - obj.refetch_chunks = message.refetchChunks.map(e => e); - } else { - obj.refetch_chunks = []; - } - if (message.rejectSenders) { - obj.reject_senders = message.rejectSenders.map(e => e); - } else { - obj.reject_senders = []; - } - return obj; - }, - fromAminoMsg(object: ResponseApplySnapshotChunkAminoMsg): ResponseApplySnapshotChunk { - return ResponseApplySnapshotChunk.fromAmino(object.value); - }, - fromProtoMsg(message: ResponseApplySnapshotChunkProtoMsg): ResponseApplySnapshotChunk { - return ResponseApplySnapshotChunk.decode(message.value); - }, - toProto(message: ResponseApplySnapshotChunk): Uint8Array { - return ResponseApplySnapshotChunk.encode(message).finish(); - }, - toProtoMsg(message: ResponseApplySnapshotChunk): ResponseApplySnapshotChunkProtoMsg { - return { - typeUrl: "/tendermint.abci.ResponseApplySnapshotChunk", - value: ResponseApplySnapshotChunk.encode(message).finish() - }; - } -}; -function createBaseConsensusParams(): ConsensusParams { - return { - block: BlockParams.fromPartial({}), - evidence: EvidenceParams.fromPartial({}), - validator: ValidatorParams.fromPartial({}), - version: VersionParams.fromPartial({}) - }; -} -export const ConsensusParams = { - typeUrl: "/tendermint.abci.ConsensusParams", - encode(message: ConsensusParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusParams { - return { - block: isSet(object.block) ? BlockParams.fromJSON(object.block) : undefined, - evidence: isSet(object.evidence) ? EvidenceParams.fromJSON(object.evidence) : undefined, - validator: isSet(object.validator) ? ValidatorParams.fromJSON(object.validator) : undefined, - version: isSet(object.version) ? VersionParams.fromJSON(object.version) : undefined - }; - }, - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block ? BlockParams.toJSON(message.block) : undefined); - message.evidence !== undefined && (obj.evidence = message.evidence ? EvidenceParams.toJSON(message.evidence) : undefined); - message.validator !== undefined && (obj.validator = message.validator ? ValidatorParams.toJSON(message.validator) : undefined); - message.version !== undefined && (obj.version = message.version ? VersionParams.toJSON(message.version) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusParams { - const message = createBaseConsensusParams(); - message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; - message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceParams.fromPartial(object.evidence) : undefined; - message.validator = object.validator !== undefined && object.validator !== null ? ValidatorParams.fromPartial(object.validator) : undefined; - message.version = object.version !== undefined && object.version !== null ? VersionParams.fromPartial(object.version) : undefined; - return message; - }, - fromSDK(object: ConsensusParamsSDKType): ConsensusParams { - return { - block: object.block ? BlockParams.fromSDK(object.block) : undefined, - evidence: object.evidence ? EvidenceParams.fromSDK(object.evidence) : undefined, - validator: object.validator ? ValidatorParams.fromSDK(object.validator) : undefined, - version: object.version ? VersionParams.fromSDK(object.version) : undefined - }; - }, - toSDK(message: ConsensusParams): ConsensusParamsSDKType { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block ? BlockParams.toSDK(message.block) : undefined); - message.evidence !== undefined && (obj.evidence = message.evidence ? EvidenceParams.toSDK(message.evidence) : undefined); - message.validator !== undefined && (obj.validator = message.validator ? ValidatorParams.toSDK(message.validator) : undefined); - message.version !== undefined && (obj.version = message.version ? VersionParams.toSDK(message.version) : undefined); - return obj; - }, - fromAmino(object: ConsensusParamsAmino): ConsensusParams { - return { - block: object?.block ? BlockParams.fromAmino(object.block) : undefined, - evidence: object?.evidence ? EvidenceParams.fromAmino(object.evidence) : undefined, - validator: object?.validator ? ValidatorParams.fromAmino(object.validator) : undefined, - version: object?.version ? VersionParams.fromAmino(object.version) : undefined - }; - }, - toAmino(message: ConsensusParams): ConsensusParamsAmino { - const obj: any = {}; - obj.block = message.block ? BlockParams.toAmino(message.block) : undefined; - obj.evidence = message.evidence ? EvidenceParams.toAmino(message.evidence) : undefined; - obj.validator = message.validator ? ValidatorParams.toAmino(message.validator) : undefined; - obj.version = message.version ? VersionParams.toAmino(message.version) : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusParamsAminoMsg): ConsensusParams { - return ConsensusParams.fromAmino(object.value); - }, - fromProtoMsg(message: ConsensusParamsProtoMsg): ConsensusParams { - return ConsensusParams.decode(message.value); - }, - toProto(message: ConsensusParams): Uint8Array { - return ConsensusParams.encode(message).finish(); - }, - toProtoMsg(message: ConsensusParams): ConsensusParamsProtoMsg { - return { - typeUrl: "/tendermint.abci.ConsensusParams", - value: ConsensusParams.encode(message).finish() - }; - } -}; -function createBaseBlockParams(): BlockParams { - return { - maxBytes: BigInt(0), - maxGas: BigInt(0) - }; -} -export const BlockParams = { - typeUrl: "/tendermint.abci.BlockParams", - encode(message: BlockParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxBytes !== BigInt(0)) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== BigInt(0)) { - writer.uint32(16).int64(message.maxGas); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = reader.int64(); - break; - case 2: - message.maxGas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BlockParams { - return { - maxBytes: isSet(object.maxBytes) ? BigInt(object.maxBytes.toString()) : BigInt(0), - maxGas: isSet(object.maxGas) ? BigInt(object.maxGas.toString()) : BigInt(0) - }; - }, - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || BigInt(0)).toString()); - message.maxGas !== undefined && (obj.maxGas = (message.maxGas || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): BlockParams { - const message = createBaseBlockParams(); - message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); - message.maxGas = object.maxGas !== undefined && object.maxGas !== null ? BigInt(object.maxGas.toString()) : BigInt(0); - return message; - }, - fromSDK(object: BlockParamsSDKType): BlockParams { - return { - maxBytes: object?.max_bytes, - maxGas: object?.max_gas - }; - }, - toSDK(message: BlockParams): BlockParamsSDKType { - const obj: any = {}; - obj.max_bytes = message.maxBytes; - obj.max_gas = message.maxGas; - return obj; - }, - fromAmino(object: BlockParamsAmino): BlockParams { - return { - maxBytes: BigInt(object.max_bytes), - maxGas: BigInt(object.max_gas) - }; - }, - toAmino(message: BlockParams): BlockParamsAmino { - const obj: any = {}; - obj.max_bytes = message.maxBytes ? message.maxBytes.toString() : undefined; - obj.max_gas = message.maxGas ? message.maxGas.toString() : undefined; - return obj; - }, - fromAminoMsg(object: BlockParamsAminoMsg): BlockParams { - return BlockParams.fromAmino(object.value); - }, - fromProtoMsg(message: BlockParamsProtoMsg): BlockParams { - return BlockParams.decode(message.value); - }, - toProto(message: BlockParams): Uint8Array { - return BlockParams.encode(message).finish(); - }, - toProtoMsg(message: BlockParams): BlockParamsProtoMsg { - return { - typeUrl: "/tendermint.abci.BlockParams", - value: BlockParams.encode(message).finish() - }; - } -}; -function createBaseLastCommitInfo(): LastCommitInfo { - return { - round: 0, - votes: [] - }; -} -export const LastCommitInfo = { - typeUrl: "/tendermint.abci.LastCommitInfo", - encode(message: LastCommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.round !== 0) { - writer.uint32(8).int32(message.round); - } - for (const v of message.votes) { - VoteInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LastCommitInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLastCommitInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.round = reader.int32(); - break; - case 2: - message.votes.push(VoteInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LastCommitInfo { - return { - round: isSet(object.round) ? Number(object.round) : 0, - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => VoteInfo.fromJSON(e)) : [] - }; - }, - toJSON(message: LastCommitInfo): unknown { - const obj: any = {}; - message.round !== undefined && (obj.round = Math.round(message.round)); - if (message.votes) { - obj.votes = message.votes.map(e => e ? VoteInfo.toJSON(e) : undefined); - } else { - obj.votes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): LastCommitInfo { - const message = createBaseLastCommitInfo(); - message.round = object.round ?? 0; - message.votes = object.votes?.map(e => VoteInfo.fromPartial(e)) || []; - return message; - }, - fromSDK(object: LastCommitInfoSDKType): LastCommitInfo { - return { - round: object?.round, - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => VoteInfo.fromSDK(e)) : [] - }; - }, - toSDK(message: LastCommitInfo): LastCommitInfoSDKType { - const obj: any = {}; - obj.round = message.round; - if (message.votes) { - obj.votes = message.votes.map(e => e ? VoteInfo.toSDK(e) : undefined); - } else { - obj.votes = []; - } - return obj; - }, - fromAmino(object: LastCommitInfoAmino): LastCommitInfo { - return { - round: object.round, - votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => VoteInfo.fromAmino(e)) : [] - }; - }, - toAmino(message: LastCommitInfo): LastCommitInfoAmino { - const obj: any = {}; - obj.round = message.round; - if (message.votes) { - obj.votes = message.votes.map(e => e ? VoteInfo.toAmino(e) : undefined); - } else { - obj.votes = []; - } - return obj; - }, - fromAminoMsg(object: LastCommitInfoAminoMsg): LastCommitInfo { - return LastCommitInfo.fromAmino(object.value); - }, - fromProtoMsg(message: LastCommitInfoProtoMsg): LastCommitInfo { - return LastCommitInfo.decode(message.value); - }, - toProto(message: LastCommitInfo): Uint8Array { - return LastCommitInfo.encode(message).finish(); - }, - toProtoMsg(message: LastCommitInfo): LastCommitInfoProtoMsg { - return { - typeUrl: "/tendermint.abci.LastCommitInfo", - value: LastCommitInfo.encode(message).finish() - }; - } -}; -function createBaseEvent(): Event { - return { - type: "", - attributes: [] - }; -} -export const Event = { - typeUrl: "/tendermint.abci.Event", - encode(message: Event, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - for (const v of message.attributes) { - EventAttribute.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Event { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.attributes.push(EventAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Event { - return { - type: isSet(object.type) ? String(object.type) : "", - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => EventAttribute.fromJSON(e)) : [] - }; - }, - toJSON(message: Event): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - if (message.attributes) { - obj.attributes = message.attributes.map(e => e ? EventAttribute.toJSON(e) : undefined); - } else { - obj.attributes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Event { - const message = createBaseEvent(); - message.type = object.type ?? ""; - message.attributes = object.attributes?.map(e => EventAttribute.fromPartial(e)) || []; - return message; - }, - fromSDK(object: EventSDKType): Event { - return { - type: object?.type, - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => EventAttribute.fromSDK(e)) : [] - }; - }, - toSDK(message: Event): EventSDKType { - const obj: any = {}; - obj.type = message.type; - if (message.attributes) { - obj.attributes = message.attributes.map(e => e ? EventAttribute.toSDK(e) : undefined); - } else { - obj.attributes = []; - } - return obj; - }, - fromAmino(object: EventAmino): Event { - return { - type: object.type, - attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => EventAttribute.fromAmino(e)) : [] - }; - }, - toAmino(message: Event): EventAmino { - const obj: any = {}; - obj.type = message.type; - if (message.attributes) { - obj.attributes = message.attributes.map(e => e ? EventAttribute.toAmino(e) : undefined); - } else { - obj.attributes = []; - } - return obj; - }, - fromAminoMsg(object: EventAminoMsg): Event { - return Event.fromAmino(object.value); - }, - fromProtoMsg(message: EventProtoMsg): Event { - return Event.decode(message.value); - }, - toProto(message: Event): Uint8Array { - return Event.encode(message).finish(); - }, - toProtoMsg(message: Event): EventProtoMsg { - return { - typeUrl: "/tendermint.abci.Event", - value: Event.encode(message).finish() - }; - } -}; -function createBaseEventAttribute(): EventAttribute { - return { - key: new Uint8Array(), - value: new Uint8Array(), - index: false - }; -} -export const EventAttribute = { - typeUrl: "/tendermint.abci.EventAttribute", - encode(message: EventAttribute, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (message.index === true) { - writer.uint32(24).bool(message.index); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EventAttribute { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventAttribute(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EventAttribute { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - index: isSet(object.index) ? Boolean(object.index) : false - }; - }, - toJSON(message: EventAttribute): unknown { - 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())); - message.index !== undefined && (obj.index = message.index); - return obj; - }, - fromPartial(object: DeepPartial): EventAttribute { - const message = createBaseEventAttribute(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.index = object.index ?? false; - return message; - }, - fromSDK(object: EventAttributeSDKType): EventAttribute { - return { - key: object?.key, - value: object?.value, - index: object?.index - }; - }, - toSDK(message: EventAttribute): EventAttributeSDKType { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.index = message.index; - return obj; - }, - fromAmino(object: EventAttributeAmino): EventAttribute { - return { - key: object.key, - value: object.value, - index: object.index - }; - }, - toAmino(message: EventAttribute): EventAttributeAmino { - const obj: any = {}; - obj.key = message.key; - obj.value = message.value; - obj.index = message.index; - return obj; - }, - fromAminoMsg(object: EventAttributeAminoMsg): EventAttribute { - return EventAttribute.fromAmino(object.value); - }, - fromProtoMsg(message: EventAttributeProtoMsg): EventAttribute { - return EventAttribute.decode(message.value); - }, - toProto(message: EventAttribute): Uint8Array { - return EventAttribute.encode(message).finish(); - }, - toProtoMsg(message: EventAttribute): EventAttributeProtoMsg { - return { - typeUrl: "/tendermint.abci.EventAttribute", - value: EventAttribute.encode(message).finish() - }; - } -}; -function createBaseTxResult(): TxResult { - return { - height: BigInt(0), - index: 0, - tx: new Uint8Array(), - result: ResponseDeliverTx.fromPartial({}) - }; -} -export const TxResult = { - typeUrl: "/tendermint.abci.TxResult", - encode(message: TxResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.index !== 0) { - writer.uint32(16).uint32(message.index); - } - if (message.tx.length !== 0) { - writer.uint32(26).bytes(message.tx); - } - if (message.result !== undefined) { - ResponseDeliverTx.encode(message.result, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxResult { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxResult { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - index: isSet(object.index) ? Number(object.index) : 0, - tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(), - result: isSet(object.result) ? ResponseDeliverTx.fromJSON(object.result) : undefined - }; - }, - toJSON(message: TxResult): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.index !== undefined && (obj.index = Math.round(message.index)); - message.tx !== undefined && (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array())); - message.result !== undefined && (obj.result = message.result ? ResponseDeliverTx.toJSON(message.result) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): TxResult { - const message = createBaseTxResult(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.index = object.index ?? 0; - message.tx = object.tx ?? new Uint8Array(); - message.result = object.result !== undefined && object.result !== null ? ResponseDeliverTx.fromPartial(object.result) : undefined; - return message; - }, - fromSDK(object: TxResultSDKType): TxResult { - return { - height: object?.height, - index: object?.index, - tx: object?.tx, - result: object.result ? ResponseDeliverTx.fromSDK(object.result) : undefined - }; - }, - toSDK(message: TxResult): TxResultSDKType { - const obj: any = {}; - obj.height = message.height; - obj.index = message.index; - obj.tx = message.tx; - message.result !== undefined && (obj.result = message.result ? ResponseDeliverTx.toSDK(message.result) : undefined); - return obj; - }, - fromAmino(object: TxResultAmino): TxResult { - return { - height: BigInt(object.height), - index: object.index, - tx: object.tx, - result: object?.result ? ResponseDeliverTx.fromAmino(object.result) : undefined - }; - }, - toAmino(message: TxResult): TxResultAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.index = message.index; - obj.tx = message.tx; - obj.result = message.result ? ResponseDeliverTx.toAmino(message.result) : undefined; - return obj; - }, - fromAminoMsg(object: TxResultAminoMsg): TxResult { - return TxResult.fromAmino(object.value); - }, - fromProtoMsg(message: TxResultProtoMsg): TxResult { - return TxResult.decode(message.value); - }, - toProto(message: TxResult): Uint8Array { - return TxResult.encode(message).finish(); - }, - toProtoMsg(message: TxResult): TxResultProtoMsg { - return { - typeUrl: "/tendermint.abci.TxResult", - value: TxResult.encode(message).finish() - }; - } -}; -function createBaseValidator(): Validator { - return { - address: new Uint8Array(), - power: BigInt(0) - }; -} -export const Validator = { - typeUrl: "/tendermint.abci.Validator", - encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.power !== BigInt(0)) { - writer.uint32(24).int64(message.power); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Validator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 3: - message.power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Validator { - return { - address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(), - power: isSet(object.power) ? BigInt(object.power.toString()) : BigInt(0) - }; - }, - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.power !== undefined && (obj.power = (message.power || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Validator { - const message = createBaseValidator(); - message.address = object.address ?? new Uint8Array(); - message.power = object.power !== undefined && object.power !== null ? BigInt(object.power.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorSDKType): Validator { - return { - address: object?.address, - power: object?.power - }; - }, - toSDK(message: Validator): ValidatorSDKType { - const obj: any = {}; - obj.address = message.address; - obj.power = message.power; - return obj; - }, - fromAmino(object: ValidatorAmino): Validator { - return { - address: object.address, - power: BigInt(object.power) - }; - }, - toAmino(message: Validator): ValidatorAmino { - const obj: any = {}; - obj.address = message.address; - obj.power = message.power ? message.power.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorAminoMsg): Validator { - return Validator.fromAmino(object.value); - }, - fromProtoMsg(message: ValidatorProtoMsg): Validator { - return Validator.decode(message.value); - }, - toProto(message: Validator): Uint8Array { - return Validator.encode(message).finish(); - }, - toProtoMsg(message: Validator): ValidatorProtoMsg { - return { - typeUrl: "/tendermint.abci.Validator", - value: Validator.encode(message).finish() - }; - } -}; -function createBaseValidatorUpdate(): ValidatorUpdate { - return { - pubKey: PublicKey.fromPartial({}), - power: BigInt(0) - }; -} -export const ValidatorUpdate = { - typeUrl: "/tendermint.abci.ValidatorUpdate", - encode(message: ValidatorUpdate, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.power !== BigInt(0)) { - writer.uint32(16).int64(message.power); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorUpdate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorUpdate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorUpdate { - return { - pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - power: isSet(object.power) ? BigInt(object.power.toString()) : BigInt(0) - }; - }, - toJSON(message: ValidatorUpdate): unknown { - const obj: any = {}; - message.pubKey !== undefined && (obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined); - message.power !== undefined && (obj.power = (message.power || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorUpdate { - const message = createBaseValidatorUpdate(); - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? PublicKey.fromPartial(object.pubKey) : undefined; - message.power = object.power !== undefined && object.power !== null ? BigInt(object.power.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorUpdateSDKType): ValidatorUpdate { - return { - pubKey: object.pub_key ? PublicKey.fromSDK(object.pub_key) : undefined, - power: object?.power - }; - }, - toSDK(message: ValidatorUpdate): ValidatorUpdateSDKType { - const obj: any = {}; - message.pubKey !== undefined && (obj.pub_key = message.pubKey ? PublicKey.toSDK(message.pubKey) : undefined); - obj.power = message.power; - return obj; - }, - fromAmino(object: ValidatorUpdateAmino): ValidatorUpdate { - return { - pubKey: object?.pub_key ? PublicKey.fromAmino(object.pub_key) : undefined, - power: BigInt(object.power) - }; - }, - toAmino(message: ValidatorUpdate): ValidatorUpdateAmino { - const obj: any = {}; - obj.pub_key = message.pubKey ? PublicKey.toAmino(message.pubKey) : undefined; - obj.power = message.power ? message.power.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorUpdateAminoMsg): ValidatorUpdate { - return ValidatorUpdate.fromAmino(object.value); - }, - fromProtoMsg(message: ValidatorUpdateProtoMsg): ValidatorUpdate { - return ValidatorUpdate.decode(message.value); - }, - toProto(message: ValidatorUpdate): Uint8Array { - return ValidatorUpdate.encode(message).finish(); - }, - toProtoMsg(message: ValidatorUpdate): ValidatorUpdateProtoMsg { - return { - typeUrl: "/tendermint.abci.ValidatorUpdate", - value: ValidatorUpdate.encode(message).finish() - }; - } -}; -function createBaseVoteInfo(): VoteInfo { - return { - validator: Validator.fromPartial({}), - signedLastBlock: false - }; -} -export const VoteInfo = { - typeUrl: "/tendermint.abci.VoteInfo", - encode(message: VoteInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); - } - if (message.signedLastBlock === true) { - writer.uint32(16).bool(message.signedLastBlock); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VoteInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVoteInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signedLastBlock = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): VoteInfo { - return { - validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined, - signedLastBlock: isSet(object.signedLastBlock) ? Boolean(object.signedLastBlock) : false - }; - }, - toJSON(message: VoteInfo): unknown { - const obj: any = {}; - message.validator !== undefined && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined); - message.signedLastBlock !== undefined && (obj.signedLastBlock = message.signedLastBlock); - return obj; - }, - fromPartial(object: DeepPartial): VoteInfo { - const message = createBaseVoteInfo(); - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - message.signedLastBlock = object.signedLastBlock ?? false; - return message; - }, - fromSDK(object: VoteInfoSDKType): VoteInfo { - return { - validator: object.validator ? Validator.fromSDK(object.validator) : undefined, - signedLastBlock: object?.signed_last_block - }; - }, - toSDK(message: VoteInfo): VoteInfoSDKType { - const obj: any = {}; - message.validator !== undefined && (obj.validator = message.validator ? Validator.toSDK(message.validator) : undefined); - obj.signed_last_block = message.signedLastBlock; - return obj; - }, - fromAmino(object: VoteInfoAmino): VoteInfo { - return { - validator: object?.validator ? Validator.fromAmino(object.validator) : undefined, - signedLastBlock: object.signed_last_block - }; - }, - toAmino(message: VoteInfo): VoteInfoAmino { - const obj: any = {}; - obj.validator = message.validator ? Validator.toAmino(message.validator) : undefined; - obj.signed_last_block = message.signedLastBlock; - return obj; - }, - fromAminoMsg(object: VoteInfoAminoMsg): VoteInfo { - return VoteInfo.fromAmino(object.value); - }, - fromProtoMsg(message: VoteInfoProtoMsg): VoteInfo { - return VoteInfo.decode(message.value); - }, - toProto(message: VoteInfo): Uint8Array { - return VoteInfo.encode(message).finish(); - }, - toProtoMsg(message: VoteInfo): VoteInfoProtoMsg { - return { - typeUrl: "/tendermint.abci.VoteInfo", - value: VoteInfo.encode(message).finish() - }; - } -}; -function createBaseEvidence(): Evidence { - return { - type: 0, - validator: Validator.fromPartial({}), - height: BigInt(0), - time: new Date(), - totalVotingPower: BigInt(0) - }; -} -export const Evidence = { - typeUrl: "/tendermint.abci.Evidence", - encode(message: Evidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.validator !== undefined) { - Validator.encode(message.validator, writer.uint32(18).fork()).ldelim(); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(40).int64(message.totalVotingPower); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Evidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.validator = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.totalVotingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Evidence { - return { - type: isSet(object.type) ? evidenceTypeFromJSON(object.type) : -1, - validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined, - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - time: isSet(object.time) ? new Date(object.time) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? BigInt(object.totalVotingPower.toString()) : BigInt(0) - }; - }, - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.time !== undefined && (obj.time = message.time.toISOString()); - message.totalVotingPower !== undefined && (obj.totalVotingPower = (message.totalVotingPower || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Evidence { - const message = createBaseEvidence(); - message.type = object.type ?? 0; - message.validator = object.validator !== undefined && object.validator !== null ? Validator.fromPartial(object.validator) : undefined; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EvidenceSDKType): Evidence { - return { - type: isSet(object.type) ? evidenceTypeFromJSON(object.type) : -1, - validator: object.validator ? Validator.fromSDK(object.validator) : undefined, - height: object?.height, - time: object.time ?? undefined, - totalVotingPower: object?.total_voting_power - }; - }, - toSDK(message: Evidence): EvidenceSDKType { - const obj: any = {}; - message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type)); - message.validator !== undefined && (obj.validator = message.validator ? Validator.toSDK(message.validator) : undefined); - obj.height = message.height; - message.time !== undefined && (obj.time = message.time ?? undefined); - obj.total_voting_power = message.totalVotingPower; - return obj; - }, - fromAmino(object: EvidenceAmino): Evidence { - return { - type: isSet(object.type) ? evidenceTypeFromJSON(object.type) : -1, - validator: object?.validator ? Validator.fromAmino(object.validator) : undefined, - height: BigInt(object.height), - time: object.time, - totalVotingPower: BigInt(object.total_voting_power) - }; - }, - toAmino(message: Evidence): EvidenceAmino { - const obj: any = {}; - obj.type = message.type; - obj.validator = message.validator ? Validator.toAmino(message.validator) : undefined; - obj.height = message.height ? message.height.toString() : undefined; - obj.time = message.time; - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EvidenceAminoMsg): Evidence { - return Evidence.fromAmino(object.value); - }, - fromProtoMsg(message: EvidenceProtoMsg): Evidence { - return Evidence.decode(message.value); - }, - toProto(message: Evidence): Uint8Array { - return Evidence.encode(message).finish(); - }, - toProtoMsg(message: Evidence): EvidenceProtoMsg { - return { - typeUrl: "/tendermint.abci.Evidence", - value: Evidence.encode(message).finish() - }; - } -}; -function createBaseSnapshot(): Snapshot { - return { - height: BigInt(0), - format: 0, - chunks: 0, - hash: new Uint8Array(), - metadata: new Uint8Array() - }; -} -export const Snapshot = { - typeUrl: "/tendermint.abci.Snapshot", - encode(message: Snapshot, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).uint64(message.height); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - if (message.chunks !== 0) { - writer.uint32(24).uint32(message.chunks); - } - if (message.hash.length !== 0) { - writer.uint32(34).bytes(message.hash); - } - if (message.metadata.length !== 0) { - writer.uint32(42).bytes(message.metadata); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Snapshot { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshot(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.uint64(); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Snapshot { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - format: isSet(object.format) ? Number(object.format) : 0, - chunks: isSet(object.chunks) ? Number(object.chunks) : 0, - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), - metadata: isSet(object.metadata) ? bytesFromBase64(object.metadata) : new Uint8Array() - }; - }, - toJSON(message: Snapshot): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.format !== undefined && (obj.format = Math.round(message.format)); - message.chunks !== undefined && (obj.chunks = Math.round(message.chunks)); - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.metadata !== undefined && (obj.metadata = base64FromBytes(message.metadata !== undefined ? message.metadata : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): Snapshot { - const message = createBaseSnapshot(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.format = object.format ?? 0; - message.chunks = object.chunks ?? 0; - message.hash = object.hash ?? new Uint8Array(); - message.metadata = object.metadata ?? new Uint8Array(); - return message; - }, - fromSDK(object: SnapshotSDKType): Snapshot { - return { - height: object?.height, - format: object?.format, - chunks: object?.chunks, - hash: object?.hash, - metadata: object?.metadata - }; - }, - toSDK(message: Snapshot): SnapshotSDKType { - const obj: any = {}; - obj.height = message.height; - obj.format = message.format; - obj.chunks = message.chunks; - obj.hash = message.hash; - obj.metadata = message.metadata; - return obj; - }, - fromAmino(object: SnapshotAmino): Snapshot { - return { - height: BigInt(object.height), - format: object.format, - chunks: object.chunks, - hash: object.hash, - metadata: object.metadata - }; - }, - toAmino(message: Snapshot): SnapshotAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.format = message.format; - obj.chunks = message.chunks; - obj.hash = message.hash; - obj.metadata = message.metadata; - return obj; - }, - fromAminoMsg(object: SnapshotAminoMsg): Snapshot { - return Snapshot.fromAmino(object.value); - }, - fromProtoMsg(message: SnapshotProtoMsg): Snapshot { - return Snapshot.decode(message.value); - }, - toProto(message: Snapshot): Uint8Array { - return Snapshot.encode(message).finish(); - }, - toProtoMsg(message: Snapshot): SnapshotProtoMsg { - return { - typeUrl: "/tendermint.abci.Snapshot", - value: Snapshot.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/bundle.ts b/examples/interchainjs/src/codegen/tendermint/bundle.ts deleted file mode 100644 index 73f5ef24..00000000 --- a/examples/interchainjs/src/codegen/tendermint/bundle.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as _183 from "./abci/types"; -import * as _184 from "./crypto/keys"; -import * as _185 from "./crypto/proof"; -import * as _186 from "./libs/bits/types"; -import * as _187 from "./p2p/types"; -import * as _188 from "./types/block"; -import * as _189 from "./types/evidence"; -import * as _190 from "./types/params"; -import * as _191 from "./types/types"; -import * as _192 from "./types/validator"; -import * as _193 from "./version/types"; -export namespace tendermint { - export const abci = { - ..._183 - }; - export const crypto = { - ..._184, - ..._185 - }; - export namespace libs { - export const bits = { - ..._186 - }; - } - export const p2p = { - ..._187 - }; - export const types = { - ..._188, - ..._189, - ..._190, - ..._191, - ..._192 - }; - export const version = { - ..._193 - }; -} \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/crypto/keys.ts b/examples/interchainjs/src/codegen/tendermint/crypto/keys.ts deleted file mode 100644 index 2986ad20..00000000 --- a/examples/interchainjs/src/codegen/tendermint/crypto/keys.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKey { - ed25519?: Uint8Array; - secp256k1?: Uint8Array; -} -export interface PublicKeyProtoMsg { - typeUrl: "/tendermint.crypto.PublicKey"; - value: Uint8Array; -} -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKeyAmino { - ed25519?: Uint8Array; - secp256k1?: Uint8Array; -} -export interface PublicKeyAminoMsg { - type: "/tendermint.crypto.PublicKey"; - value: PublicKeyAmino; -} -/** PublicKey defines the keys available for use with Tendermint Validators */ -export interface PublicKeySDKType { - ed25519?: Uint8Array; - secp256k1?: Uint8Array; -} -function createBasePublicKey(): PublicKey { - return { - ed25519: undefined, - secp256k1: undefined - }; -} -export const PublicKey = { - typeUrl: "/tendermint.crypto.PublicKey", - encode(message: PublicKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.ed25519 !== undefined) { - writer.uint32(10).bytes(message.ed25519); - } - if (message.secp256k1 !== undefined) { - writer.uint32(18).bytes(message.secp256k1); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PublicKey { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePublicKey(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PublicKey { - return { - ed25519: isSet(object.ed25519) ? bytesFromBase64(object.ed25519) : undefined, - secp256k1: isSet(object.secp256k1) ? bytesFromBase64(object.secp256k1) : undefined - }; - }, - toJSON(message: PublicKey): unknown { - const obj: any = {}; - message.ed25519 !== undefined && (obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined); - message.secp256k1 !== undefined && (obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): PublicKey { - const message = createBasePublicKey(); - message.ed25519 = object.ed25519 ?? undefined; - message.secp256k1 = object.secp256k1 ?? undefined; - return message; - }, - fromSDK(object: PublicKeySDKType): PublicKey { - return { - ed25519: object?.ed25519, - secp256k1: object?.secp256k1 - }; - }, - toSDK(message: PublicKey): PublicKeySDKType { - const obj: any = {}; - obj.ed25519 = message.ed25519; - obj.secp256k1 = message.secp256k1; - return obj; - }, - fromAmino(object: PublicKeyAmino): PublicKey { - return { - ed25519: object?.ed25519, - secp256k1: object?.secp256k1 - }; - }, - toAmino(message: PublicKey): PublicKeyAmino { - const obj: any = {}; - obj.ed25519 = message.ed25519; - obj.secp256k1 = message.secp256k1; - return obj; - }, - fromAminoMsg(object: PublicKeyAminoMsg): PublicKey { - return PublicKey.fromAmino(object.value); - }, - fromProtoMsg(message: PublicKeyProtoMsg): PublicKey { - return PublicKey.decode(message.value); - }, - toProto(message: PublicKey): Uint8Array { - return PublicKey.encode(message).finish(); - }, - toProtoMsg(message: PublicKey): PublicKeyProtoMsg { - return { - typeUrl: "/tendermint.crypto.PublicKey", - value: PublicKey.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/crypto/proof.ts b/examples/interchainjs/src/codegen/tendermint/crypto/proof.ts deleted file mode 100644 index d7f768b2..00000000 --- a/examples/interchainjs/src/codegen/tendermint/crypto/proof.ts +++ /dev/null @@ -1,674 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; -export interface Proof { - total: bigint; - index: bigint; - leafHash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ProofProtoMsg { - typeUrl: "/tendermint.crypto.Proof"; - value: Uint8Array; -} -export interface ProofAmino { - total: string; - index: string; - leaf_hash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ProofAminoMsg { - type: "/tendermint.crypto.Proof"; - value: ProofAmino; -} -export interface ProofSDKType { - total: bigint; - index: bigint; - leaf_hash: Uint8Array; - aunts: Uint8Array[]; -} -export interface ValueOp { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof: Proof | undefined; -} -export interface ValueOpProtoMsg { - typeUrl: "/tendermint.crypto.ValueOp"; - value: Uint8Array; -} -export interface ValueOpAmino { - /** Encoded in ProofOp.Key. */ - key: Uint8Array; - /** To encode in ProofOp.Data */ - proof?: ProofAmino | undefined; -} -export interface ValueOpAminoMsg { - type: "/tendermint.crypto.ValueOp"; - value: ValueOpAmino; -} -export interface ValueOpSDKType { - key: Uint8Array; - proof: ProofSDKType | undefined; -} -export interface DominoOp { - key: string; - input: string; - output: string; -} -export interface DominoOpProtoMsg { - typeUrl: "/tendermint.crypto.DominoOp"; - value: Uint8Array; -} -export interface DominoOpAmino { - key: string; - input: string; - output: string; -} -export interface DominoOpAminoMsg { - type: "/tendermint.crypto.DominoOp"; - value: DominoOpAmino; -} -export interface DominoOpSDKType { - key: string; - input: string; - output: string; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOp { - type: string; - key: Uint8Array; - data: Uint8Array; -} -export interface ProofOpProtoMsg { - typeUrl: "/tendermint.crypto.ProofOp"; - value: Uint8Array; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOpAmino { - type: string; - key: Uint8Array; - data: Uint8Array; -} -export interface ProofOpAminoMsg { - type: "/tendermint.crypto.ProofOp"; - value: ProofOpAmino; -} -/** - * ProofOp defines an operation used for calculating Merkle root - * The data could be arbitrary format, providing nessecary data - * for example neighbouring node hash - */ -export interface ProofOpSDKType { - type: string; - key: Uint8Array; - data: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOps { - ops: ProofOp[]; -} -export interface ProofOpsProtoMsg { - typeUrl: "/tendermint.crypto.ProofOps"; - value: Uint8Array; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOpsAmino { - ops: ProofOpAmino[]; -} -export interface ProofOpsAminoMsg { - type: "/tendermint.crypto.ProofOps"; - value: ProofOpsAmino; -} -/** ProofOps is Merkle proof defined by the list of ProofOps */ -export interface ProofOpsSDKType { - ops: ProofOpSDKType[]; -} -function createBaseProof(): Proof { - return { - total: BigInt(0), - index: BigInt(0), - leafHash: new Uint8Array(), - aunts: [] - }; -} -export const Proof = { - typeUrl: "/tendermint.crypto.Proof", - encode(message: Proof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.total !== BigInt(0)) { - writer.uint32(8).int64(message.total); - } - if (message.index !== BigInt(0)) { - writer.uint32(16).int64(message.index); - } - if (message.leafHash.length !== 0) { - writer.uint32(26).bytes(message.leafHash); - } - for (const v of message.aunts) { - writer.uint32(34).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.int64(); - break; - case 2: - message.index = reader.int64(); - break; - case 3: - message.leafHash = reader.bytes(); - break; - case 4: - message.aunts.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Proof { - return { - total: isSet(object.total) ? BigInt(object.total.toString()) : BigInt(0), - index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0), - leafHash: isSet(object.leafHash) ? bytesFromBase64(object.leafHash) : new Uint8Array(), - aunts: Array.isArray(object?.aunts) ? object.aunts.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: Proof): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = (message.total || BigInt(0)).toString()); - message.index !== undefined && (obj.index = (message.index || BigInt(0)).toString()); - message.leafHash !== undefined && (obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array())); - if (message.aunts) { - obj.aunts = message.aunts.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.aunts = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Proof { - const message = createBaseProof(); - message.total = object.total !== undefined && object.total !== null ? BigInt(object.total.toString()) : BigInt(0); - message.index = object.index !== undefined && object.index !== null ? BigInt(object.index.toString()) : BigInt(0); - message.leafHash = object.leafHash ?? new Uint8Array(); - message.aunts = object.aunts?.map(e => e) || []; - return message; - }, - fromSDK(object: ProofSDKType): Proof { - return { - total: object?.total, - index: object?.index, - leafHash: object?.leaf_hash, - aunts: Array.isArray(object?.aunts) ? object.aunts.map((e: any) => e) : [] - }; - }, - toSDK(message: Proof): ProofSDKType { - const obj: any = {}; - obj.total = message.total; - obj.index = message.index; - obj.leaf_hash = message.leafHash; - if (message.aunts) { - obj.aunts = message.aunts.map(e => e); - } else { - obj.aunts = []; - } - return obj; - }, - fromAmino(object: ProofAmino): Proof { - return { - total: BigInt(object.total), - index: BigInt(object.index), - leafHash: object.leaf_hash, - aunts: Array.isArray(object?.aunts) ? object.aunts.map((e: any) => e) : [] - }; - }, - toAmino(message: Proof): ProofAmino { - const obj: any = {}; - obj.total = message.total ? message.total.toString() : undefined; - obj.index = message.index ? message.index.toString() : undefined; - obj.leaf_hash = message.leafHash; - if (message.aunts) { - obj.aunts = message.aunts.map(e => e); - } else { - obj.aunts = []; - } - return obj; - }, - fromAminoMsg(object: ProofAminoMsg): Proof { - return Proof.fromAmino(object.value); - }, - fromProtoMsg(message: ProofProtoMsg): Proof { - return Proof.decode(message.value); - }, - toProto(message: Proof): Uint8Array { - return Proof.encode(message).finish(); - }, - toProtoMsg(message: Proof): ProofProtoMsg { - return { - typeUrl: "/tendermint.crypto.Proof", - value: Proof.encode(message).finish() - }; - } -}; -function createBaseValueOp(): ValueOp { - return { - key: new Uint8Array(), - proof: Proof.fromPartial({}) - }; -} -export const ValueOp = { - typeUrl: "/tendermint.crypto.ValueOp", - encode(message: ValueOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValueOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValueOp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValueOp { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined - }; - }, - toJSON(message: ValueOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ValueOp { - const message = createBaseValueOp(); - message.key = object.key ?? new Uint8Array(); - message.proof = object.proof !== undefined && object.proof !== null ? Proof.fromPartial(object.proof) : undefined; - return message; - }, - fromSDK(object: ValueOpSDKType): ValueOp { - return { - key: object?.key, - proof: object.proof ? Proof.fromSDK(object.proof) : undefined - }; - }, - toSDK(message: ValueOp): ValueOpSDKType { - const obj: any = {}; - obj.key = message.key; - message.proof !== undefined && (obj.proof = message.proof ? Proof.toSDK(message.proof) : undefined); - return obj; - }, - fromAmino(object: ValueOpAmino): ValueOp { - return { - key: object.key, - proof: object?.proof ? Proof.fromAmino(object.proof) : undefined - }; - }, - toAmino(message: ValueOp): ValueOpAmino { - const obj: any = {}; - obj.key = message.key; - obj.proof = message.proof ? Proof.toAmino(message.proof) : undefined; - return obj; - }, - fromAminoMsg(object: ValueOpAminoMsg): ValueOp { - return ValueOp.fromAmino(object.value); - }, - fromProtoMsg(message: ValueOpProtoMsg): ValueOp { - return ValueOp.decode(message.value); - }, - toProto(message: ValueOp): Uint8Array { - return ValueOp.encode(message).finish(); - }, - toProtoMsg(message: ValueOp): ValueOpProtoMsg { - return { - typeUrl: "/tendermint.crypto.ValueOp", - value: ValueOp.encode(message).finish() - }; - } -}; -function createBaseDominoOp(): DominoOp { - return { - key: "", - input: "", - output: "" - }; -} -export const DominoOp = { - typeUrl: "/tendermint.crypto.DominoOp", - encode(message: DominoOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.input !== "") { - writer.uint32(18).string(message.input); - } - if (message.output !== "") { - writer.uint32(26).string(message.output); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DominoOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDominoOp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DominoOp { - return { - key: isSet(object.key) ? String(object.key) : "", - input: isSet(object.input) ? String(object.input) : "", - output: isSet(object.output) ? String(object.output) : "" - }; - }, - toJSON(message: DominoOp): unknown { - const obj: any = {}; - message.key !== undefined && (obj.key = message.key); - message.input !== undefined && (obj.input = message.input); - message.output !== undefined && (obj.output = message.output); - return obj; - }, - fromPartial(object: DeepPartial): DominoOp { - const message = createBaseDominoOp(); - message.key = object.key ?? ""; - message.input = object.input ?? ""; - message.output = object.output ?? ""; - return message; - }, - fromSDK(object: DominoOpSDKType): DominoOp { - return { - key: object?.key, - input: object?.input, - output: object?.output - }; - }, - toSDK(message: DominoOp): DominoOpSDKType { - const obj: any = {}; - obj.key = message.key; - obj.input = message.input; - obj.output = message.output; - return obj; - }, - fromAmino(object: DominoOpAmino): DominoOp { - return { - key: object.key, - input: object.input, - output: object.output - }; - }, - toAmino(message: DominoOp): DominoOpAmino { - const obj: any = {}; - obj.key = message.key; - obj.input = message.input; - obj.output = message.output; - return obj; - }, - fromAminoMsg(object: DominoOpAminoMsg): DominoOp { - return DominoOp.fromAmino(object.value); - }, - fromProtoMsg(message: DominoOpProtoMsg): DominoOp { - return DominoOp.decode(message.value); - }, - toProto(message: DominoOp): Uint8Array { - return DominoOp.encode(message).finish(); - }, - toProtoMsg(message: DominoOp): DominoOpProtoMsg { - return { - typeUrl: "/tendermint.crypto.DominoOp", - value: DominoOp.encode(message).finish() - }; - } -}; -function createBaseProofOp(): ProofOp { - return { - type: "", - key: new Uint8Array(), - data: new Uint8Array() - }; -} -export const ProofOp = { - typeUrl: "/tendermint.crypto.ProofOp", - encode(message: ProofOp, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== "") { - writer.uint32(10).string(message.type); - } - if (message.key.length !== 0) { - writer.uint32(18).bytes(message.key); - } - if (message.data.length !== 0) { - writer.uint32(26).bytes(message.data); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ProofOp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProofOp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ProofOp { - return { - type: isSet(object.type) ? String(object.type) : "", - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() - }; - }, - toJSON(message: ProofOp): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = message.type); - message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): ProofOp { - const message = createBaseProofOp(); - message.type = object.type ?? ""; - message.key = object.key ?? new Uint8Array(); - message.data = object.data ?? new Uint8Array(); - return message; - }, - fromSDK(object: ProofOpSDKType): ProofOp { - return { - type: object?.type, - key: object?.key, - data: object?.data - }; - }, - toSDK(message: ProofOp): ProofOpSDKType { - const obj: any = {}; - obj.type = message.type; - obj.key = message.key; - obj.data = message.data; - return obj; - }, - fromAmino(object: ProofOpAmino): ProofOp { - return { - type: object.type, - key: object.key, - data: object.data - }; - }, - toAmino(message: ProofOp): ProofOpAmino { - const obj: any = {}; - obj.type = message.type; - obj.key = message.key; - obj.data = message.data; - return obj; - }, - fromAminoMsg(object: ProofOpAminoMsg): ProofOp { - return ProofOp.fromAmino(object.value); - }, - fromProtoMsg(message: ProofOpProtoMsg): ProofOp { - return ProofOp.decode(message.value); - }, - toProto(message: ProofOp): Uint8Array { - return ProofOp.encode(message).finish(); - }, - toProtoMsg(message: ProofOp): ProofOpProtoMsg { - return { - typeUrl: "/tendermint.crypto.ProofOp", - value: ProofOp.encode(message).finish() - }; - } -}; -function createBaseProofOps(): ProofOps { - return { - ops: [] - }; -} -export const ProofOps = { - typeUrl: "/tendermint.crypto.ProofOps", - encode(message: ProofOps, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.ops) { - ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ProofOps { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProofOps(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ops.push(ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ProofOps { - return { - ops: Array.isArray(object?.ops) ? object.ops.map((e: any) => ProofOp.fromJSON(e)) : [] - }; - }, - toJSON(message: ProofOps): unknown { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map(e => e ? ProofOp.toJSON(e) : undefined); - } else { - obj.ops = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ProofOps { - const message = createBaseProofOps(); - message.ops = object.ops?.map(e => ProofOp.fromPartial(e)) || []; - return message; - }, - fromSDK(object: ProofOpsSDKType): ProofOps { - return { - ops: Array.isArray(object?.ops) ? object.ops.map((e: any) => ProofOp.fromSDK(e)) : [] - }; - }, - toSDK(message: ProofOps): ProofOpsSDKType { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map(e => e ? ProofOp.toSDK(e) : undefined); - } else { - obj.ops = []; - } - return obj; - }, - fromAmino(object: ProofOpsAmino): ProofOps { - return { - ops: Array.isArray(object?.ops) ? object.ops.map((e: any) => ProofOp.fromAmino(e)) : [] - }; - }, - toAmino(message: ProofOps): ProofOpsAmino { - const obj: any = {}; - if (message.ops) { - obj.ops = message.ops.map(e => e ? ProofOp.toAmino(e) : undefined); - } else { - obj.ops = []; - } - return obj; - }, - fromAminoMsg(object: ProofOpsAminoMsg): ProofOps { - return ProofOps.fromAmino(object.value); - }, - fromProtoMsg(message: ProofOpsProtoMsg): ProofOps { - return ProofOps.decode(message.value); - }, - toProto(message: ProofOps): Uint8Array { - return ProofOps.encode(message).finish(); - }, - toProtoMsg(message: ProofOps): ProofOpsProtoMsg { - return { - typeUrl: "/tendermint.crypto.ProofOps", - value: ProofOps.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/libs/bits/types.ts b/examples/interchainjs/src/codegen/tendermint/libs/bits/types.ts deleted file mode 100644 index 7a27be22..00000000 --- a/examples/interchainjs/src/codegen/tendermint/libs/bits/types.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../../binary"; -import { isSet, DeepPartial } from "../../../helpers"; -export interface BitArray { - bits: bigint; - elems: bigint[]; -} -export interface BitArrayProtoMsg { - typeUrl: "/tendermint.libs.bits.BitArray"; - value: Uint8Array; -} -export interface BitArrayAmino { - bits: string; - elems: string[]; -} -export interface BitArrayAminoMsg { - type: "/tendermint.libs.bits.BitArray"; - value: BitArrayAmino; -} -export interface BitArraySDKType { - bits: bigint; - elems: bigint[]; -} -function createBaseBitArray(): BitArray { - return { - bits: BigInt(0), - elems: [] - }; -} -export const BitArray = { - typeUrl: "/tendermint.libs.bits.BitArray", - encode(message: BitArray, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.bits !== BigInt(0)) { - writer.uint32(8).int64(message.bits); - } - writer.uint32(18).fork(); - for (const v of message.elems) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BitArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBitArray(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bits = reader.int64(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.elems.push(reader.uint64()); - } - } else { - message.elems.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BitArray { - return { - bits: isSet(object.bits) ? BigInt(object.bits.toString()) : BigInt(0), - elems: Array.isArray(object?.elems) ? object.elems.map((e: any) => BigInt(e.toString())) : [] - }; - }, - toJSON(message: BitArray): unknown { - const obj: any = {}; - message.bits !== undefined && (obj.bits = (message.bits || BigInt(0)).toString()); - if (message.elems) { - obj.elems = message.elems.map(e => (e || BigInt(0)).toString()); - } else { - obj.elems = []; - } - return obj; - }, - fromPartial(object: DeepPartial): BitArray { - const message = createBaseBitArray(); - message.bits = object.bits !== undefined && object.bits !== null ? BigInt(object.bits.toString()) : BigInt(0); - message.elems = object.elems?.map(e => BigInt(e.toString())) || []; - return message; - }, - fromSDK(object: BitArraySDKType): BitArray { - return { - bits: object?.bits, - elems: Array.isArray(object?.elems) ? object.elems.map((e: any) => e) : [] - }; - }, - toSDK(message: BitArray): BitArraySDKType { - const obj: any = {}; - obj.bits = message.bits; - if (message.elems) { - obj.elems = message.elems.map(e => e); - } else { - obj.elems = []; - } - return obj; - }, - fromAmino(object: BitArrayAmino): BitArray { - return { - bits: BigInt(object.bits), - elems: Array.isArray(object?.elems) ? object.elems.map((e: any) => BigInt(e)) : [] - }; - }, - toAmino(message: BitArray): BitArrayAmino { - const obj: any = {}; - obj.bits = message.bits ? message.bits.toString() : undefined; - if (message.elems) { - obj.elems = message.elems.map(e => e.toString()); - } else { - obj.elems = []; - } - return obj; - }, - fromAminoMsg(object: BitArrayAminoMsg): BitArray { - return BitArray.fromAmino(object.value); - }, - fromProtoMsg(message: BitArrayProtoMsg): BitArray { - return BitArray.decode(message.value); - }, - toProto(message: BitArray): Uint8Array { - return BitArray.encode(message).finish(); - }, - toProtoMsg(message: BitArray): BitArrayProtoMsg { - return { - typeUrl: "/tendermint.libs.bits.BitArray", - value: BitArray.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/p2p/types.ts b/examples/interchainjs/src/codegen/tendermint/p2p/types.ts deleted file mode 100644 index 929958a8..00000000 --- a/examples/interchainjs/src/codegen/tendermint/p2p/types.ts +++ /dev/null @@ -1,760 +0,0 @@ -import { Timestamp } from "../../google/protobuf/timestamp"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, toTimestamp, fromTimestamp } from "../../helpers"; -export interface ProtocolVersion { - p2p: bigint; - block: bigint; - app: bigint; -} -export interface ProtocolVersionProtoMsg { - typeUrl: "/tendermint.p2p.ProtocolVersion"; - value: Uint8Array; -} -export interface ProtocolVersionAmino { - p2p: string; - block: string; - app: string; -} -export interface ProtocolVersionAminoMsg { - type: "/tendermint.p2p.ProtocolVersion"; - value: ProtocolVersionAmino; -} -export interface ProtocolVersionSDKType { - p2p: bigint; - block: bigint; - app: bigint; -} -export interface NodeInfo { - protocolVersion: ProtocolVersion | undefined; - nodeId: string; - listenAddr: string; - network: string; - version: string; - channels: Uint8Array; - moniker: string; - other: NodeInfoOther | undefined; -} -export interface NodeInfoProtoMsg { - typeUrl: "/tendermint.p2p.NodeInfo"; - value: Uint8Array; -} -export interface NodeInfoAmino { - protocol_version?: ProtocolVersionAmino | undefined; - node_id: string; - listen_addr: string; - network: string; - version: string; - channels: Uint8Array; - moniker: string; - other?: NodeInfoOtherAmino | undefined; -} -export interface NodeInfoAminoMsg { - type: "/tendermint.p2p.NodeInfo"; - value: NodeInfoAmino; -} -export interface NodeInfoSDKType { - protocol_version: ProtocolVersionSDKType | undefined; - node_id: string; - listen_addr: string; - network: string; - version: string; - channels: Uint8Array; - moniker: string; - other: NodeInfoOtherSDKType | undefined; -} -export interface NodeInfoOther { - txIndex: string; - rpcAddress: string; -} -export interface NodeInfoOtherProtoMsg { - typeUrl: "/tendermint.p2p.NodeInfoOther"; - value: Uint8Array; -} -export interface NodeInfoOtherAmino { - tx_index: string; - rpc_address: string; -} -export interface NodeInfoOtherAminoMsg { - type: "/tendermint.p2p.NodeInfoOther"; - value: NodeInfoOtherAmino; -} -export interface NodeInfoOtherSDKType { - tx_index: string; - rpc_address: string; -} -export interface PeerInfo { - id: string; - addressInfo: PeerAddressInfo[]; - lastConnected: Date | undefined; -} -export interface PeerInfoProtoMsg { - typeUrl: "/tendermint.p2p.PeerInfo"; - value: Uint8Array; -} -export interface PeerInfoAmino { - id: string; - address_info: PeerAddressInfoAmino[]; - last_connected?: Date | undefined; -} -export interface PeerInfoAminoMsg { - type: "/tendermint.p2p.PeerInfo"; - value: PeerInfoAmino; -} -export interface PeerInfoSDKType { - id: string; - address_info: PeerAddressInfoSDKType[]; - last_connected: Date | undefined; -} -export interface PeerAddressInfo { - address: string; - lastDialSuccess: Date | undefined; - lastDialFailure: Date | undefined; - dialFailures: number; -} -export interface PeerAddressInfoProtoMsg { - typeUrl: "/tendermint.p2p.PeerAddressInfo"; - value: Uint8Array; -} -export interface PeerAddressInfoAmino { - address: string; - last_dial_success?: Date | undefined; - last_dial_failure?: Date | undefined; - dial_failures: number; -} -export interface PeerAddressInfoAminoMsg { - type: "/tendermint.p2p.PeerAddressInfo"; - value: PeerAddressInfoAmino; -} -export interface PeerAddressInfoSDKType { - address: string; - last_dial_success: Date | undefined; - last_dial_failure: Date | undefined; - dial_failures: number; -} -function createBaseProtocolVersion(): ProtocolVersion { - return { - p2p: BigInt(0), - block: BigInt(0), - app: BigInt(0) - }; -} -export const ProtocolVersion = { - typeUrl: "/tendermint.p2p.ProtocolVersion", - encode(message: ProtocolVersion, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.p2p !== BigInt(0)) { - writer.uint32(8).uint64(message.p2p); - } - if (message.block !== BigInt(0)) { - writer.uint32(16).uint64(message.block); - } - if (message.app !== BigInt(0)) { - writer.uint32(24).uint64(message.app); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ProtocolVersion { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProtocolVersion(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.p2p = reader.uint64(); - break; - case 2: - message.block = reader.uint64(); - break; - case 3: - message.app = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ProtocolVersion { - return { - p2p: isSet(object.p2p) ? BigInt(object.p2p.toString()) : BigInt(0), - block: isSet(object.block) ? BigInt(object.block.toString()) : BigInt(0), - app: isSet(object.app) ? BigInt(object.app.toString()) : BigInt(0) - }; - }, - toJSON(message: ProtocolVersion): unknown { - const obj: any = {}; - message.p2p !== undefined && (obj.p2p = (message.p2p || BigInt(0)).toString()); - message.block !== undefined && (obj.block = (message.block || BigInt(0)).toString()); - message.app !== undefined && (obj.app = (message.app || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ProtocolVersion { - const message = createBaseProtocolVersion(); - message.p2p = object.p2p !== undefined && object.p2p !== null ? BigInt(object.p2p.toString()) : BigInt(0); - message.block = object.block !== undefined && object.block !== null ? BigInt(object.block.toString()) : BigInt(0); - message.app = object.app !== undefined && object.app !== null ? BigInt(object.app.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ProtocolVersionSDKType): ProtocolVersion { - return { - p2p: object?.p2p, - block: object?.block, - app: object?.app - }; - }, - toSDK(message: ProtocolVersion): ProtocolVersionSDKType { - const obj: any = {}; - obj.p2p = message.p2p; - obj.block = message.block; - obj.app = message.app; - return obj; - }, - fromAmino(object: ProtocolVersionAmino): ProtocolVersion { - return { - p2p: BigInt(object.p2p), - block: BigInt(object.block), - app: BigInt(object.app) - }; - }, - toAmino(message: ProtocolVersion): ProtocolVersionAmino { - const obj: any = {}; - obj.p2p = message.p2p ? message.p2p.toString() : undefined; - obj.block = message.block ? message.block.toString() : undefined; - obj.app = message.app ? message.app.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ProtocolVersionAminoMsg): ProtocolVersion { - return ProtocolVersion.fromAmino(object.value); - }, - fromProtoMsg(message: ProtocolVersionProtoMsg): ProtocolVersion { - return ProtocolVersion.decode(message.value); - }, - toProto(message: ProtocolVersion): Uint8Array { - return ProtocolVersion.encode(message).finish(); - }, - toProtoMsg(message: ProtocolVersion): ProtocolVersionProtoMsg { - return { - typeUrl: "/tendermint.p2p.ProtocolVersion", - value: ProtocolVersion.encode(message).finish() - }; - } -}; -function createBaseNodeInfo(): NodeInfo { - return { - protocolVersion: ProtocolVersion.fromPartial({}), - nodeId: "", - listenAddr: "", - network: "", - version: "", - channels: new Uint8Array(), - moniker: "", - other: NodeInfoOther.fromPartial({}) - }; -} -export const NodeInfo = { - typeUrl: "/tendermint.p2p.NodeInfo", - encode(message: NodeInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.protocolVersion !== undefined) { - ProtocolVersion.encode(message.protocolVersion, writer.uint32(10).fork()).ldelim(); - } - if (message.nodeId !== "") { - writer.uint32(18).string(message.nodeId); - } - if (message.listenAddr !== "") { - writer.uint32(26).string(message.listenAddr); - } - if (message.network !== "") { - writer.uint32(34).string(message.network); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.channels.length !== 0) { - writer.uint32(50).bytes(message.channels); - } - if (message.moniker !== "") { - writer.uint32(58).string(message.moniker); - } - if (message.other !== undefined) { - NodeInfoOther.encode(message.other, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): NodeInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNodeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocolVersion = ProtocolVersion.decode(reader, reader.uint32()); - break; - case 2: - message.nodeId = reader.string(); - break; - case 3: - message.listenAddr = reader.string(); - break; - case 4: - message.network = reader.string(); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.channels = reader.bytes(); - break; - case 7: - message.moniker = reader.string(); - break; - case 8: - message.other = NodeInfoOther.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): NodeInfo { - return { - protocolVersion: isSet(object.protocolVersion) ? ProtocolVersion.fromJSON(object.protocolVersion) : undefined, - nodeId: isSet(object.nodeId) ? String(object.nodeId) : "", - listenAddr: isSet(object.listenAddr) ? String(object.listenAddr) : "", - network: isSet(object.network) ? String(object.network) : "", - version: isSet(object.version) ? String(object.version) : "", - channels: isSet(object.channels) ? bytesFromBase64(object.channels) : new Uint8Array(), - moniker: isSet(object.moniker) ? String(object.moniker) : "", - other: isSet(object.other) ? NodeInfoOther.fromJSON(object.other) : undefined - }; - }, - toJSON(message: NodeInfo): unknown { - const obj: any = {}; - message.protocolVersion !== undefined && (obj.protocolVersion = message.protocolVersion ? ProtocolVersion.toJSON(message.protocolVersion) : undefined); - message.nodeId !== undefined && (obj.nodeId = message.nodeId); - message.listenAddr !== undefined && (obj.listenAddr = message.listenAddr); - message.network !== undefined && (obj.network = message.network); - message.version !== undefined && (obj.version = message.version); - message.channels !== undefined && (obj.channels = base64FromBytes(message.channels !== undefined ? message.channels : new Uint8Array())); - message.moniker !== undefined && (obj.moniker = message.moniker); - message.other !== undefined && (obj.other = message.other ? NodeInfoOther.toJSON(message.other) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): NodeInfo { - const message = createBaseNodeInfo(); - message.protocolVersion = object.protocolVersion !== undefined && object.protocolVersion !== null ? ProtocolVersion.fromPartial(object.protocolVersion) : undefined; - message.nodeId = object.nodeId ?? ""; - message.listenAddr = object.listenAddr ?? ""; - message.network = object.network ?? ""; - message.version = object.version ?? ""; - message.channels = object.channels ?? new Uint8Array(); - message.moniker = object.moniker ?? ""; - message.other = object.other !== undefined && object.other !== null ? NodeInfoOther.fromPartial(object.other) : undefined; - return message; - }, - fromSDK(object: NodeInfoSDKType): NodeInfo { - return { - protocolVersion: object.protocol_version ? ProtocolVersion.fromSDK(object.protocol_version) : undefined, - nodeId: object?.node_id, - listenAddr: object?.listen_addr, - network: object?.network, - version: object?.version, - channels: object?.channels, - moniker: object?.moniker, - other: object.other ? NodeInfoOther.fromSDK(object.other) : undefined - }; - }, - toSDK(message: NodeInfo): NodeInfoSDKType { - const obj: any = {}; - message.protocolVersion !== undefined && (obj.protocol_version = message.protocolVersion ? ProtocolVersion.toSDK(message.protocolVersion) : undefined); - obj.node_id = message.nodeId; - obj.listen_addr = message.listenAddr; - obj.network = message.network; - obj.version = message.version; - obj.channels = message.channels; - obj.moniker = message.moniker; - message.other !== undefined && (obj.other = message.other ? NodeInfoOther.toSDK(message.other) : undefined); - return obj; - }, - fromAmino(object: NodeInfoAmino): NodeInfo { - return { - protocolVersion: object?.protocol_version ? ProtocolVersion.fromAmino(object.protocol_version) : undefined, - nodeId: object.node_id, - listenAddr: object.listen_addr, - network: object.network, - version: object.version, - channels: object.channels, - moniker: object.moniker, - other: object?.other ? NodeInfoOther.fromAmino(object.other) : undefined - }; - }, - toAmino(message: NodeInfo): NodeInfoAmino { - const obj: any = {}; - obj.protocol_version = message.protocolVersion ? ProtocolVersion.toAmino(message.protocolVersion) : undefined; - obj.node_id = message.nodeId; - obj.listen_addr = message.listenAddr; - obj.network = message.network; - obj.version = message.version; - obj.channels = message.channels; - obj.moniker = message.moniker; - obj.other = message.other ? NodeInfoOther.toAmino(message.other) : undefined; - return obj; - }, - fromAminoMsg(object: NodeInfoAminoMsg): NodeInfo { - return NodeInfo.fromAmino(object.value); - }, - fromProtoMsg(message: NodeInfoProtoMsg): NodeInfo { - return NodeInfo.decode(message.value); - }, - toProto(message: NodeInfo): Uint8Array { - return NodeInfo.encode(message).finish(); - }, - toProtoMsg(message: NodeInfo): NodeInfoProtoMsg { - return { - typeUrl: "/tendermint.p2p.NodeInfo", - value: NodeInfo.encode(message).finish() - }; - } -}; -function createBaseNodeInfoOther(): NodeInfoOther { - return { - txIndex: "", - rpcAddress: "" - }; -} -export const NodeInfoOther = { - typeUrl: "/tendermint.p2p.NodeInfoOther", - encode(message: NodeInfoOther, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.txIndex !== "") { - writer.uint32(10).string(message.txIndex); - } - if (message.rpcAddress !== "") { - writer.uint32(18).string(message.rpcAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): NodeInfoOther { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNodeInfoOther(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txIndex = reader.string(); - break; - case 2: - message.rpcAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): NodeInfoOther { - return { - txIndex: isSet(object.txIndex) ? String(object.txIndex) : "", - rpcAddress: isSet(object.rpcAddress) ? String(object.rpcAddress) : "" - }; - }, - toJSON(message: NodeInfoOther): unknown { - const obj: any = {}; - message.txIndex !== undefined && (obj.txIndex = message.txIndex); - message.rpcAddress !== undefined && (obj.rpcAddress = message.rpcAddress); - return obj; - }, - fromPartial(object: DeepPartial): NodeInfoOther { - const message = createBaseNodeInfoOther(); - message.txIndex = object.txIndex ?? ""; - message.rpcAddress = object.rpcAddress ?? ""; - return message; - }, - fromSDK(object: NodeInfoOtherSDKType): NodeInfoOther { - return { - txIndex: object?.tx_index, - rpcAddress: object?.rpc_address - }; - }, - toSDK(message: NodeInfoOther): NodeInfoOtherSDKType { - const obj: any = {}; - obj.tx_index = message.txIndex; - obj.rpc_address = message.rpcAddress; - return obj; - }, - fromAmino(object: NodeInfoOtherAmino): NodeInfoOther { - return { - txIndex: object.tx_index, - rpcAddress: object.rpc_address - }; - }, - toAmino(message: NodeInfoOther): NodeInfoOtherAmino { - const obj: any = {}; - obj.tx_index = message.txIndex; - obj.rpc_address = message.rpcAddress; - return obj; - }, - fromAminoMsg(object: NodeInfoOtherAminoMsg): NodeInfoOther { - return NodeInfoOther.fromAmino(object.value); - }, - fromProtoMsg(message: NodeInfoOtherProtoMsg): NodeInfoOther { - return NodeInfoOther.decode(message.value); - }, - toProto(message: NodeInfoOther): Uint8Array { - return NodeInfoOther.encode(message).finish(); - }, - toProtoMsg(message: NodeInfoOther): NodeInfoOtherProtoMsg { - return { - typeUrl: "/tendermint.p2p.NodeInfoOther", - value: NodeInfoOther.encode(message).finish() - }; - } -}; -function createBasePeerInfo(): PeerInfo { - return { - id: "", - addressInfo: [], - lastConnected: new Date() - }; -} -export const PeerInfo = { - typeUrl: "/tendermint.p2p.PeerInfo", - encode(message: PeerInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - for (const v of message.addressInfo) { - PeerAddressInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.lastConnected !== undefined) { - Timestamp.encode(toTimestamp(message.lastConnected), writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PeerInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeerInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.addressInfo.push(PeerAddressInfo.decode(reader, reader.uint32())); - break; - case 3: - message.lastConnected = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PeerInfo { - return { - id: isSet(object.id) ? String(object.id) : "", - addressInfo: Array.isArray(object?.addressInfo) ? object.addressInfo.map((e: any) => PeerAddressInfo.fromJSON(e)) : [], - lastConnected: isSet(object.lastConnected) ? new Date(object.lastConnected) : undefined - }; - }, - toJSON(message: PeerInfo): unknown { - const obj: any = {}; - message.id !== undefined && (obj.id = message.id); - if (message.addressInfo) { - obj.addressInfo = message.addressInfo.map(e => e ? PeerAddressInfo.toJSON(e) : undefined); - } else { - obj.addressInfo = []; - } - message.lastConnected !== undefined && (obj.lastConnected = message.lastConnected.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): PeerInfo { - const message = createBasePeerInfo(); - message.id = object.id ?? ""; - message.addressInfo = object.addressInfo?.map(e => PeerAddressInfo.fromPartial(e)) || []; - message.lastConnected = object.lastConnected ?? undefined; - return message; - }, - fromSDK(object: PeerInfoSDKType): PeerInfo { - return { - id: object?.id, - addressInfo: Array.isArray(object?.address_info) ? object.address_info.map((e: any) => PeerAddressInfo.fromSDK(e)) : [], - lastConnected: object.last_connected ?? undefined - }; - }, - toSDK(message: PeerInfo): PeerInfoSDKType { - const obj: any = {}; - obj.id = message.id; - if (message.addressInfo) { - obj.address_info = message.addressInfo.map(e => e ? PeerAddressInfo.toSDK(e) : undefined); - } else { - obj.address_info = []; - } - message.lastConnected !== undefined && (obj.last_connected = message.lastConnected ?? undefined); - return obj; - }, - fromAmino(object: PeerInfoAmino): PeerInfo { - return { - id: object.id, - addressInfo: Array.isArray(object?.address_info) ? object.address_info.map((e: any) => PeerAddressInfo.fromAmino(e)) : [], - lastConnected: object.last_connected - }; - }, - toAmino(message: PeerInfo): PeerInfoAmino { - const obj: any = {}; - obj.id = message.id; - if (message.addressInfo) { - obj.address_info = message.addressInfo.map(e => e ? PeerAddressInfo.toAmino(e) : undefined); - } else { - obj.address_info = []; - } - obj.last_connected = message.lastConnected; - return obj; - }, - fromAminoMsg(object: PeerInfoAminoMsg): PeerInfo { - return PeerInfo.fromAmino(object.value); - }, - fromProtoMsg(message: PeerInfoProtoMsg): PeerInfo { - return PeerInfo.decode(message.value); - }, - toProto(message: PeerInfo): Uint8Array { - return PeerInfo.encode(message).finish(); - }, - toProtoMsg(message: PeerInfo): PeerInfoProtoMsg { - return { - typeUrl: "/tendermint.p2p.PeerInfo", - value: PeerInfo.encode(message).finish() - }; - } -}; -function createBasePeerAddressInfo(): PeerAddressInfo { - return { - address: "", - lastDialSuccess: new Date(), - lastDialFailure: new Date(), - dialFailures: 0 - }; -} -export const PeerAddressInfo = { - typeUrl: "/tendermint.p2p.PeerAddressInfo", - encode(message: PeerAddressInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.lastDialSuccess !== undefined) { - Timestamp.encode(toTimestamp(message.lastDialSuccess), writer.uint32(18).fork()).ldelim(); - } - if (message.lastDialFailure !== undefined) { - Timestamp.encode(toTimestamp(message.lastDialFailure), writer.uint32(26).fork()).ldelim(); - } - if (message.dialFailures !== 0) { - writer.uint32(32).uint32(message.dialFailures); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PeerAddressInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePeerAddressInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.lastDialSuccess = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 3: - message.lastDialFailure = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.dialFailures = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PeerAddressInfo { - return { - address: isSet(object.address) ? String(object.address) : "", - lastDialSuccess: isSet(object.lastDialSuccess) ? new Date(object.lastDialSuccess) : undefined, - lastDialFailure: isSet(object.lastDialFailure) ? new Date(object.lastDialFailure) : undefined, - dialFailures: isSet(object.dialFailures) ? Number(object.dialFailures) : 0 - }; - }, - toJSON(message: PeerAddressInfo): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.lastDialSuccess !== undefined && (obj.lastDialSuccess = message.lastDialSuccess.toISOString()); - message.lastDialFailure !== undefined && (obj.lastDialFailure = message.lastDialFailure.toISOString()); - message.dialFailures !== undefined && (obj.dialFailures = Math.round(message.dialFailures)); - return obj; - }, - fromPartial(object: DeepPartial): PeerAddressInfo { - const message = createBasePeerAddressInfo(); - message.address = object.address ?? ""; - message.lastDialSuccess = object.lastDialSuccess ?? undefined; - message.lastDialFailure = object.lastDialFailure ?? undefined; - message.dialFailures = object.dialFailures ?? 0; - return message; - }, - fromSDK(object: PeerAddressInfoSDKType): PeerAddressInfo { - return { - address: object?.address, - lastDialSuccess: object.last_dial_success ?? undefined, - lastDialFailure: object.last_dial_failure ?? undefined, - dialFailures: object?.dial_failures - }; - }, - toSDK(message: PeerAddressInfo): PeerAddressInfoSDKType { - const obj: any = {}; - obj.address = message.address; - message.lastDialSuccess !== undefined && (obj.last_dial_success = message.lastDialSuccess ?? undefined); - message.lastDialFailure !== undefined && (obj.last_dial_failure = message.lastDialFailure ?? undefined); - obj.dial_failures = message.dialFailures; - return obj; - }, - fromAmino(object: PeerAddressInfoAmino): PeerAddressInfo { - return { - address: object.address, - lastDialSuccess: object.last_dial_success, - lastDialFailure: object.last_dial_failure, - dialFailures: object.dial_failures - }; - }, - toAmino(message: PeerAddressInfo): PeerAddressInfoAmino { - const obj: any = {}; - obj.address = message.address; - obj.last_dial_success = message.lastDialSuccess; - obj.last_dial_failure = message.lastDialFailure; - obj.dial_failures = message.dialFailures; - return obj; - }, - fromAminoMsg(object: PeerAddressInfoAminoMsg): PeerAddressInfo { - return PeerAddressInfo.fromAmino(object.value); - }, - fromProtoMsg(message: PeerAddressInfoProtoMsg): PeerAddressInfo { - return PeerAddressInfo.decode(message.value); - }, - toProto(message: PeerAddressInfo): Uint8Array { - return PeerAddressInfo.encode(message).finish(); - }, - toProtoMsg(message: PeerAddressInfo): PeerAddressInfoProtoMsg { - return { - typeUrl: "/tendermint.p2p.PeerAddressInfo", - value: PeerAddressInfo.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/types/block.ts b/examples/interchainjs/src/codegen/tendermint/types/block.ts deleted file mode 100644 index 92b1e631..00000000 --- a/examples/interchainjs/src/codegen/tendermint/types/block.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { Header, HeaderAmino, HeaderSDKType, Data, DataAmino, DataSDKType, Commit, CommitAmino, CommitSDKType } from "./types"; -import { EvidenceList, EvidenceListAmino, EvidenceListSDKType } from "./evidence"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -export interface Block { - header: Header | undefined; - data: Data | undefined; - evidence: EvidenceList | undefined; - lastCommit: Commit | undefined; -} -export interface BlockProtoMsg { - typeUrl: "/tendermint.types.Block"; - value: Uint8Array; -} -export interface BlockAmino { - header?: HeaderAmino | undefined; - data?: DataAmino | undefined; - evidence?: EvidenceListAmino | undefined; - last_commit?: CommitAmino | undefined; -} -export interface BlockAminoMsg { - type: "/tendermint.types.Block"; - value: BlockAmino; -} -export interface BlockSDKType { - header: HeaderSDKType | undefined; - data: DataSDKType | undefined; - evidence: EvidenceListSDKType | undefined; - last_commit: CommitSDKType | undefined; -} -function createBaseBlock(): Block { - return { - header: Header.fromPartial({}), - data: Data.fromPartial({}), - evidence: EvidenceList.fromPartial({}), - lastCommit: Commit.fromPartial({}) - }; -} -export const Block = { - typeUrl: "/tendermint.types.Block", - encode(message: Block, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.data !== undefined) { - Data.encode(message.data, writer.uint32(18).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceList.encode(message.evidence, writer.uint32(26).fork()).ldelim(); - } - if (message.lastCommit !== undefined) { - Commit.encode(message.lastCommit, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Block { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.data = Data.decode(reader, reader.uint32()); - break; - case 3: - message.evidence = EvidenceList.decode(reader, reader.uint32()); - break; - case 4: - message.lastCommit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Block { - return { - header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - data: isSet(object.data) ? Data.fromJSON(object.data) : undefined, - evidence: isSet(object.evidence) ? EvidenceList.fromJSON(object.evidence) : undefined, - lastCommit: isSet(object.lastCommit) ? Commit.fromJSON(object.lastCommit) : undefined - }; - }, - toJSON(message: Block): unknown { - const obj: any = {}; - message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.data !== undefined && (obj.data = message.data ? Data.toJSON(message.data) : undefined); - message.evidence !== undefined && (obj.evidence = message.evidence ? EvidenceList.toJSON(message.evidence) : undefined); - message.lastCommit !== undefined && (obj.lastCommit = message.lastCommit ? Commit.toJSON(message.lastCommit) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Block { - const message = createBaseBlock(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.data = object.data !== undefined && object.data !== null ? Data.fromPartial(object.data) : undefined; - message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceList.fromPartial(object.evidence) : undefined; - message.lastCommit = object.lastCommit !== undefined && object.lastCommit !== null ? Commit.fromPartial(object.lastCommit) : undefined; - return message; - }, - fromSDK(object: BlockSDKType): Block { - return { - header: object.header ? Header.fromSDK(object.header) : undefined, - data: object.data ? Data.fromSDK(object.data) : undefined, - evidence: object.evidence ? EvidenceList.fromSDK(object.evidence) : undefined, - lastCommit: object.last_commit ? Commit.fromSDK(object.last_commit) : undefined - }; - }, - toSDK(message: Block): BlockSDKType { - const obj: any = {}; - message.header !== undefined && (obj.header = message.header ? Header.toSDK(message.header) : undefined); - message.data !== undefined && (obj.data = message.data ? Data.toSDK(message.data) : undefined); - message.evidence !== undefined && (obj.evidence = message.evidence ? EvidenceList.toSDK(message.evidence) : undefined); - message.lastCommit !== undefined && (obj.last_commit = message.lastCommit ? Commit.toSDK(message.lastCommit) : undefined); - return obj; - }, - fromAmino(object: BlockAmino): Block { - return { - header: object?.header ? Header.fromAmino(object.header) : undefined, - data: object?.data ? Data.fromAmino(object.data) : undefined, - evidence: object?.evidence ? EvidenceList.fromAmino(object.evidence) : undefined, - lastCommit: object?.last_commit ? Commit.fromAmino(object.last_commit) : undefined - }; - }, - toAmino(message: Block): BlockAmino { - const obj: any = {}; - obj.header = message.header ? Header.toAmino(message.header) : undefined; - obj.data = message.data ? Data.toAmino(message.data) : undefined; - obj.evidence = message.evidence ? EvidenceList.toAmino(message.evidence) : undefined; - obj.last_commit = message.lastCommit ? Commit.toAmino(message.lastCommit) : undefined; - return obj; - }, - fromAminoMsg(object: BlockAminoMsg): Block { - return Block.fromAmino(object.value); - }, - fromProtoMsg(message: BlockProtoMsg): Block { - return Block.decode(message.value); - }, - toProto(message: Block): Uint8Array { - return Block.encode(message).finish(); - }, - toProtoMsg(message: Block): BlockProtoMsg { - return { - typeUrl: "/tendermint.types.Block", - value: Block.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/types/evidence.ts b/examples/interchainjs/src/codegen/tendermint/types/evidence.ts deleted file mode 100644 index 20a67873..00000000 --- a/examples/interchainjs/src/codegen/tendermint/types/evidence.ts +++ /dev/null @@ -1,580 +0,0 @@ -import { Vote, VoteAmino, VoteSDKType, LightBlock, LightBlockAmino, LightBlockSDKType } from "./types"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { Validator, ValidatorAmino, ValidatorSDKType } from "./validator"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -export interface Evidence { - duplicateVoteEvidence?: DuplicateVoteEvidence | undefined; - lightClientAttackEvidence?: LightClientAttackEvidence | undefined; -} -export interface EvidenceProtoMsg { - typeUrl: "/tendermint.types.Evidence"; - value: Uint8Array; -} -export interface EvidenceAmino { - duplicate_vote_evidence?: DuplicateVoteEvidenceAmino | undefined; - light_client_attack_evidence?: LightClientAttackEvidenceAmino | undefined; -} -export interface EvidenceAminoMsg { - type: "/tendermint.types.Evidence"; - value: EvidenceAmino; -} -export interface EvidenceSDKType { - duplicate_vote_evidence?: DuplicateVoteEvidenceSDKType | undefined; - light_client_attack_evidence?: LightClientAttackEvidenceSDKType | undefined; -} -/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ -export interface DuplicateVoteEvidence { - voteA: Vote | undefined; - voteB: Vote | undefined; - totalVotingPower: bigint; - validatorPower: bigint; - timestamp: Date | undefined; -} -export interface DuplicateVoteEvidenceProtoMsg { - typeUrl: "/tendermint.types.DuplicateVoteEvidence"; - value: Uint8Array; -} -/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ -export interface DuplicateVoteEvidenceAmino { - vote_a?: VoteAmino | undefined; - vote_b?: VoteAmino | undefined; - total_voting_power: string; - validator_power: string; - timestamp?: Date | undefined; -} -export interface DuplicateVoteEvidenceAminoMsg { - type: "/tendermint.types.DuplicateVoteEvidence"; - value: DuplicateVoteEvidenceAmino; -} -/** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ -export interface DuplicateVoteEvidenceSDKType { - vote_a: VoteSDKType | undefined; - vote_b: VoteSDKType | undefined; - total_voting_power: bigint; - validator_power: bigint; - timestamp: Date | undefined; -} -/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ -export interface LightClientAttackEvidence { - conflictingBlock: LightBlock | undefined; - commonHeight: bigint; - byzantineValidators: Validator[]; - totalVotingPower: bigint; - timestamp: Date | undefined; -} -export interface LightClientAttackEvidenceProtoMsg { - typeUrl: "/tendermint.types.LightClientAttackEvidence"; - value: Uint8Array; -} -/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ -export interface LightClientAttackEvidenceAmino { - conflicting_block?: LightBlockAmino | undefined; - common_height: string; - byzantine_validators: ValidatorAmino[]; - total_voting_power: string; - timestamp?: Date | undefined; -} -export interface LightClientAttackEvidenceAminoMsg { - type: "/tendermint.types.LightClientAttackEvidence"; - value: LightClientAttackEvidenceAmino; -} -/** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ -export interface LightClientAttackEvidenceSDKType { - conflicting_block: LightBlockSDKType | undefined; - common_height: bigint; - byzantine_validators: ValidatorSDKType[]; - total_voting_power: bigint; - timestamp: Date | undefined; -} -export interface EvidenceList { - evidence: Evidence[]; -} -export interface EvidenceListProtoMsg { - typeUrl: "/tendermint.types.EvidenceList"; - value: Uint8Array; -} -export interface EvidenceListAmino { - evidence: EvidenceAmino[]; -} -export interface EvidenceListAminoMsg { - type: "/tendermint.types.EvidenceList"; - value: EvidenceListAmino; -} -export interface EvidenceListSDKType { - evidence: EvidenceSDKType[]; -} -function createBaseEvidence(): Evidence { - return { - duplicateVoteEvidence: undefined, - lightClientAttackEvidence: undefined - }; -} -export const Evidence = { - typeUrl: "/tendermint.types.Evidence", - encode(message: Evidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.duplicateVoteEvidence !== undefined) { - DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(10).fork()).ldelim(); - } - if (message.lightClientAttackEvidence !== undefined) { - LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Evidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.duplicateVoteEvidence = DuplicateVoteEvidence.decode(reader, reader.uint32()); - break; - case 2: - message.lightClientAttackEvidence = LightClientAttackEvidence.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Evidence { - return { - duplicateVoteEvidence: isSet(object.duplicateVoteEvidence) ? DuplicateVoteEvidence.fromJSON(object.duplicateVoteEvidence) : undefined, - lightClientAttackEvidence: isSet(object.lightClientAttackEvidence) ? LightClientAttackEvidence.fromJSON(object.lightClientAttackEvidence) : undefined - }; - }, - toJSON(message: Evidence): unknown { - const obj: any = {}; - message.duplicateVoteEvidence !== undefined && (obj.duplicateVoteEvidence = message.duplicateVoteEvidence ? DuplicateVoteEvidence.toJSON(message.duplicateVoteEvidence) : undefined); - message.lightClientAttackEvidence !== undefined && (obj.lightClientAttackEvidence = message.lightClientAttackEvidence ? LightClientAttackEvidence.toJSON(message.lightClientAttackEvidence) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Evidence { - const message = createBaseEvidence(); - message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null ? DuplicateVoteEvidence.fromPartial(object.duplicateVoteEvidence) : undefined; - message.lightClientAttackEvidence = object.lightClientAttackEvidence !== undefined && object.lightClientAttackEvidence !== null ? LightClientAttackEvidence.fromPartial(object.lightClientAttackEvidence) : undefined; - return message; - }, - fromSDK(object: EvidenceSDKType): Evidence { - return { - duplicateVoteEvidence: object.duplicate_vote_evidence ? DuplicateVoteEvidence.fromSDK(object.duplicate_vote_evidence) : undefined, - lightClientAttackEvidence: object.light_client_attack_evidence ? LightClientAttackEvidence.fromSDK(object.light_client_attack_evidence) : undefined - }; - }, - toSDK(message: Evidence): EvidenceSDKType { - const obj: any = {}; - message.duplicateVoteEvidence !== undefined && (obj.duplicate_vote_evidence = message.duplicateVoteEvidence ? DuplicateVoteEvidence.toSDK(message.duplicateVoteEvidence) : undefined); - message.lightClientAttackEvidence !== undefined && (obj.light_client_attack_evidence = message.lightClientAttackEvidence ? LightClientAttackEvidence.toSDK(message.lightClientAttackEvidence) : undefined); - return obj; - }, - fromAmino(object: EvidenceAmino): Evidence { - return { - duplicateVoteEvidence: object?.duplicate_vote_evidence ? DuplicateVoteEvidence.fromAmino(object.duplicate_vote_evidence) : undefined, - lightClientAttackEvidence: object?.light_client_attack_evidence ? LightClientAttackEvidence.fromAmino(object.light_client_attack_evidence) : undefined - }; - }, - toAmino(message: Evidence): EvidenceAmino { - const obj: any = {}; - obj.duplicate_vote_evidence = message.duplicateVoteEvidence ? DuplicateVoteEvidence.toAmino(message.duplicateVoteEvidence) : undefined; - obj.light_client_attack_evidence = message.lightClientAttackEvidence ? LightClientAttackEvidence.toAmino(message.lightClientAttackEvidence) : undefined; - return obj; - }, - fromAminoMsg(object: EvidenceAminoMsg): Evidence { - return Evidence.fromAmino(object.value); - }, - fromProtoMsg(message: EvidenceProtoMsg): Evidence { - return Evidence.decode(message.value); - }, - toProto(message: Evidence): Uint8Array { - return Evidence.encode(message).finish(); - }, - toProtoMsg(message: Evidence): EvidenceProtoMsg { - return { - typeUrl: "/tendermint.types.Evidence", - value: Evidence.encode(message).finish() - }; - } -}; -function createBaseDuplicateVoteEvidence(): DuplicateVoteEvidence { - return { - voteA: Vote.fromPartial({}), - voteB: Vote.fromPartial({}), - totalVotingPower: BigInt(0), - validatorPower: BigInt(0), - timestamp: new Date() - }; -} -export const DuplicateVoteEvidence = { - typeUrl: "/tendermint.types.DuplicateVoteEvidence", - encode(message: DuplicateVoteEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.voteA !== undefined) { - Vote.encode(message.voteA, writer.uint32(10).fork()).ldelim(); - } - if (message.voteB !== undefined) { - Vote.encode(message.voteB, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(24).int64(message.totalVotingPower); - } - if (message.validatorPower !== BigInt(0)) { - writer.uint32(32).int64(message.validatorPower); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): DuplicateVoteEvidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDuplicateVoteEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voteA = Vote.decode(reader, reader.uint32()); - break; - case 2: - message.voteB = Vote.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = reader.int64(); - break; - case 4: - message.validatorPower = reader.int64(); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): DuplicateVoteEvidence { - return { - voteA: isSet(object.voteA) ? Vote.fromJSON(object.voteA) : undefined, - voteB: isSet(object.voteB) ? Vote.fromJSON(object.voteB) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? BigInt(object.totalVotingPower.toString()) : BigInt(0), - validatorPower: isSet(object.validatorPower) ? BigInt(object.validatorPower.toString()) : BigInt(0), - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined - }; - }, - toJSON(message: DuplicateVoteEvidence): unknown { - const obj: any = {}; - message.voteA !== undefined && (obj.voteA = message.voteA ? Vote.toJSON(message.voteA) : undefined); - message.voteB !== undefined && (obj.voteB = message.voteB ? Vote.toJSON(message.voteB) : undefined); - message.totalVotingPower !== undefined && (obj.totalVotingPower = (message.totalVotingPower || BigInt(0)).toString()); - message.validatorPower !== undefined && (obj.validatorPower = (message.validatorPower || BigInt(0)).toString()); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): DuplicateVoteEvidence { - const message = createBaseDuplicateVoteEvidence(); - message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; - message.voteB = object.voteB !== undefined && object.voteB !== null ? Vote.fromPartial(object.voteB) : undefined; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - message.validatorPower = object.validatorPower !== undefined && object.validatorPower !== null ? BigInt(object.validatorPower.toString()) : BigInt(0); - message.timestamp = object.timestamp ?? undefined; - return message; - }, - fromSDK(object: DuplicateVoteEvidenceSDKType): DuplicateVoteEvidence { - return { - voteA: object.vote_a ? Vote.fromSDK(object.vote_a) : undefined, - voteB: object.vote_b ? Vote.fromSDK(object.vote_b) : undefined, - totalVotingPower: object?.total_voting_power, - validatorPower: object?.validator_power, - timestamp: object.timestamp ?? undefined - }; - }, - toSDK(message: DuplicateVoteEvidence): DuplicateVoteEvidenceSDKType { - const obj: any = {}; - message.voteA !== undefined && (obj.vote_a = message.voteA ? Vote.toSDK(message.voteA) : undefined); - message.voteB !== undefined && (obj.vote_b = message.voteB ? Vote.toSDK(message.voteB) : undefined); - obj.total_voting_power = message.totalVotingPower; - obj.validator_power = message.validatorPower; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - return obj; - }, - fromAmino(object: DuplicateVoteEvidenceAmino): DuplicateVoteEvidence { - return { - voteA: object?.vote_a ? Vote.fromAmino(object.vote_a) : undefined, - voteB: object?.vote_b ? Vote.fromAmino(object.vote_b) : undefined, - totalVotingPower: BigInt(object.total_voting_power), - validatorPower: BigInt(object.validator_power), - timestamp: object.timestamp - }; - }, - toAmino(message: DuplicateVoteEvidence): DuplicateVoteEvidenceAmino { - const obj: any = {}; - obj.vote_a = message.voteA ? Vote.toAmino(message.voteA) : undefined; - obj.vote_b = message.voteB ? Vote.toAmino(message.voteB) : undefined; - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; - obj.validator_power = message.validatorPower ? message.validatorPower.toString() : undefined; - obj.timestamp = message.timestamp; - return obj; - }, - fromAminoMsg(object: DuplicateVoteEvidenceAminoMsg): DuplicateVoteEvidence { - return DuplicateVoteEvidence.fromAmino(object.value); - }, - fromProtoMsg(message: DuplicateVoteEvidenceProtoMsg): DuplicateVoteEvidence { - return DuplicateVoteEvidence.decode(message.value); - }, - toProto(message: DuplicateVoteEvidence): Uint8Array { - return DuplicateVoteEvidence.encode(message).finish(); - }, - toProtoMsg(message: DuplicateVoteEvidence): DuplicateVoteEvidenceProtoMsg { - return { - typeUrl: "/tendermint.types.DuplicateVoteEvidence", - value: DuplicateVoteEvidence.encode(message).finish() - }; - } -}; -function createBaseLightClientAttackEvidence(): LightClientAttackEvidence { - return { - conflictingBlock: LightBlock.fromPartial({}), - commonHeight: BigInt(0), - byzantineValidators: [], - totalVotingPower: BigInt(0), - timestamp: new Date() - }; -} -export const LightClientAttackEvidence = { - typeUrl: "/tendermint.types.LightClientAttackEvidence", - encode(message: LightClientAttackEvidence, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.conflictingBlock !== undefined) { - LightBlock.encode(message.conflictingBlock, writer.uint32(10).fork()).ldelim(); - } - if (message.commonHeight !== BigInt(0)) { - writer.uint32(16).int64(message.commonHeight); - } - for (const v of message.byzantineValidators) { - Validator.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(32).int64(message.totalVotingPower); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LightClientAttackEvidence { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLightClientAttackEvidence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.conflictingBlock = LightBlock.decode(reader, reader.uint32()); - break; - case 2: - message.commonHeight = reader.int64(); - break; - case 3: - message.byzantineValidators.push(Validator.decode(reader, reader.uint32())); - break; - case 4: - message.totalVotingPower = reader.int64(); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LightClientAttackEvidence { - return { - conflictingBlock: isSet(object.conflictingBlock) ? LightBlock.fromJSON(object.conflictingBlock) : undefined, - commonHeight: isSet(object.commonHeight) ? BigInt(object.commonHeight.toString()) : BigInt(0), - byzantineValidators: Array.isArray(object?.byzantineValidators) ? object.byzantineValidators.map((e: any) => Validator.fromJSON(e)) : [], - totalVotingPower: isSet(object.totalVotingPower) ? BigInt(object.totalVotingPower.toString()) : BigInt(0), - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined - }; - }, - toJSON(message: LightClientAttackEvidence): unknown { - const obj: any = {}; - message.conflictingBlock !== undefined && (obj.conflictingBlock = message.conflictingBlock ? LightBlock.toJSON(message.conflictingBlock) : undefined); - message.commonHeight !== undefined && (obj.commonHeight = (message.commonHeight || BigInt(0)).toString()); - if (message.byzantineValidators) { - obj.byzantineValidators = message.byzantineValidators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.byzantineValidators = []; - } - message.totalVotingPower !== undefined && (obj.totalVotingPower = (message.totalVotingPower || BigInt(0)).toString()); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - return obj; - }, - fromPartial(object: DeepPartial): LightClientAttackEvidence { - const message = createBaseLightClientAttackEvidence(); - message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null ? LightBlock.fromPartial(object.conflictingBlock) : undefined; - message.commonHeight = object.commonHeight !== undefined && object.commonHeight !== null ? BigInt(object.commonHeight.toString()) : BigInt(0); - message.byzantineValidators = object.byzantineValidators?.map(e => Validator.fromPartial(e)) || []; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - message.timestamp = object.timestamp ?? undefined; - return message; - }, - fromSDK(object: LightClientAttackEvidenceSDKType): LightClientAttackEvidence { - return { - conflictingBlock: object.conflicting_block ? LightBlock.fromSDK(object.conflicting_block) : undefined, - commonHeight: object?.common_height, - byzantineValidators: Array.isArray(object?.byzantine_validators) ? object.byzantine_validators.map((e: any) => Validator.fromSDK(e)) : [], - totalVotingPower: object?.total_voting_power, - timestamp: object.timestamp ?? undefined - }; - }, - toSDK(message: LightClientAttackEvidence): LightClientAttackEvidenceSDKType { - const obj: any = {}; - message.conflictingBlock !== undefined && (obj.conflicting_block = message.conflictingBlock ? LightBlock.toSDK(message.conflictingBlock) : undefined); - obj.common_height = message.commonHeight; - if (message.byzantineValidators) { - obj.byzantine_validators = message.byzantineValidators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.byzantine_validators = []; - } - obj.total_voting_power = message.totalVotingPower; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - return obj; - }, - fromAmino(object: LightClientAttackEvidenceAmino): LightClientAttackEvidence { - return { - conflictingBlock: object?.conflicting_block ? LightBlock.fromAmino(object.conflicting_block) : undefined, - commonHeight: BigInt(object.common_height), - byzantineValidators: Array.isArray(object?.byzantine_validators) ? object.byzantine_validators.map((e: any) => Validator.fromAmino(e)) : [], - totalVotingPower: BigInt(object.total_voting_power), - timestamp: object.timestamp - }; - }, - toAmino(message: LightClientAttackEvidence): LightClientAttackEvidenceAmino { - const obj: any = {}; - obj.conflicting_block = message.conflictingBlock ? LightBlock.toAmino(message.conflictingBlock) : undefined; - obj.common_height = message.commonHeight ? message.commonHeight.toString() : undefined; - if (message.byzantineValidators) { - obj.byzantine_validators = message.byzantineValidators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.byzantine_validators = []; - } - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; - obj.timestamp = message.timestamp; - return obj; - }, - fromAminoMsg(object: LightClientAttackEvidenceAminoMsg): LightClientAttackEvidence { - return LightClientAttackEvidence.fromAmino(object.value); - }, - fromProtoMsg(message: LightClientAttackEvidenceProtoMsg): LightClientAttackEvidence { - return LightClientAttackEvidence.decode(message.value); - }, - toProto(message: LightClientAttackEvidence): Uint8Array { - return LightClientAttackEvidence.encode(message).finish(); - }, - toProtoMsg(message: LightClientAttackEvidence): LightClientAttackEvidenceProtoMsg { - return { - typeUrl: "/tendermint.types.LightClientAttackEvidence", - value: LightClientAttackEvidence.encode(message).finish() - }; - } -}; -function createBaseEvidenceList(): EvidenceList { - return { - evidence: [] - }; -} -export const EvidenceList = { - typeUrl: "/tendermint.types.EvidenceList", - encode(message: EvidenceList, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.evidence) { - Evidence.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EvidenceList { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidenceList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.evidence.push(Evidence.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EvidenceList { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Evidence.fromJSON(e)) : [] - }; - }, - toJSON(message: EvidenceList): unknown { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Evidence.toJSON(e) : undefined); - } else { - obj.evidence = []; - } - return obj; - }, - fromPartial(object: DeepPartial): EvidenceList { - const message = createBaseEvidenceList(); - message.evidence = object.evidence?.map(e => Evidence.fromPartial(e)) || []; - return message; - }, - fromSDK(object: EvidenceListSDKType): EvidenceList { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Evidence.fromSDK(e)) : [] - }; - }, - toSDK(message: EvidenceList): EvidenceListSDKType { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Evidence.toSDK(e) : undefined); - } else { - obj.evidence = []; - } - return obj; - }, - fromAmino(object: EvidenceListAmino): EvidenceList { - return { - evidence: Array.isArray(object?.evidence) ? object.evidence.map((e: any) => Evidence.fromAmino(e)) : [] - }; - }, - toAmino(message: EvidenceList): EvidenceListAmino { - const obj: any = {}; - if (message.evidence) { - obj.evidence = message.evidence.map(e => e ? Evidence.toAmino(e) : undefined); - } else { - obj.evidence = []; - } - return obj; - }, - fromAminoMsg(object: EvidenceListAminoMsg): EvidenceList { - return EvidenceList.fromAmino(object.value); - }, - fromProtoMsg(message: EvidenceListProtoMsg): EvidenceList { - return EvidenceList.decode(message.value); - }, - toProto(message: EvidenceList): Uint8Array { - return EvidenceList.encode(message).finish(); - }, - toProtoMsg(message: EvidenceList): EvidenceListProtoMsg { - return { - typeUrl: "/tendermint.types.EvidenceList", - value: EvidenceList.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/types/params.ts b/examples/interchainjs/src/codegen/tendermint/types/params.ts deleted file mode 100644 index 28d5d1ac..00000000 --- a/examples/interchainjs/src/codegen/tendermint/types/params.ts +++ /dev/null @@ -1,851 +0,0 @@ -import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParams { - block: BlockParams | undefined; - evidence: EvidenceParams | undefined; - validator: ValidatorParams | undefined; - version: VersionParams | undefined; -} -export interface ConsensusParamsProtoMsg { - typeUrl: "/tendermint.types.ConsensusParams"; - value: Uint8Array; -} -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParamsAmino { - block?: BlockParamsAmino | undefined; - evidence?: EvidenceParamsAmino | undefined; - validator?: ValidatorParamsAmino | undefined; - version?: VersionParamsAmino | undefined; -} -export interface ConsensusParamsAminoMsg { - type: "/tendermint.types.ConsensusParams"; - value: ConsensusParamsAmino; -} -/** - * ConsensusParams contains consensus critical parameters that determine the - * validity of blocks. - */ -export interface ConsensusParamsSDKType { - block: BlockParamsSDKType | undefined; - evidence: EvidenceParamsSDKType | undefined; - validator: ValidatorParamsSDKType | undefined; - version: VersionParamsSDKType | undefined; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParams { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - maxBytes: bigint; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - maxGas: bigint; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - timeIotaMs: bigint; -} -export interface BlockParamsProtoMsg { - typeUrl: "/tendermint.types.BlockParams"; - value: Uint8Array; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParamsAmino { - /** - * Max block size, in bytes. - * Note: must be greater than 0 - */ - max_bytes: string; - /** - * Max gas per block. - * Note: must be greater or equal to -1 - */ - max_gas: string; - /** - * Minimum time increment between consecutive blocks (in milliseconds) If the - * block header timestamp is ahead of the system clock, decrease this value. - * - * Not exposed to the application. - */ - time_iota_ms: string; -} -export interface BlockParamsAminoMsg { - type: "/tendermint.types.BlockParams"; - value: BlockParamsAmino; -} -/** BlockParams contains limits on the block size. */ -export interface BlockParamsSDKType { - max_bytes: bigint; - max_gas: bigint; - time_iota_ms: bigint; -} -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParams { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - maxAgeNumBlocks: bigint; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - maxAgeDuration: Duration | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - maxBytes: bigint; -} -export interface EvidenceParamsProtoMsg { - typeUrl: "/tendermint.types.EvidenceParams"; - value: Uint8Array; -} -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParamsAmino { - /** - * Max age of evidence, in blocks. - * - * The basic formula for calculating this is: MaxAgeDuration / {average block - * time}. - */ - max_age_num_blocks: string; - /** - * Max age of evidence, in time. - * - * It should correspond with an app's "unbonding period" or other similar - * mechanism for handling [Nothing-At-Stake - * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - */ - max_age_duration?: DurationAmino | undefined; - /** - * This sets the maximum size of total evidence in bytes that can be committed in a single block. - * and should fall comfortably under the max block bytes. - * Default is 1048576 or 1MB - */ - max_bytes: string; -} -export interface EvidenceParamsAminoMsg { - type: "/tendermint.types.EvidenceParams"; - value: EvidenceParamsAmino; -} -/** EvidenceParams determine how we handle evidence of malfeasance. */ -export interface EvidenceParamsSDKType { - max_age_num_blocks: bigint; - max_age_duration: DurationSDKType | undefined; - max_bytes: bigint; -} -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParams { - pubKeyTypes: string[]; -} -export interface ValidatorParamsProtoMsg { - typeUrl: "/tendermint.types.ValidatorParams"; - value: Uint8Array; -} -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParamsAmino { - pub_key_types: string[]; -} -export interface ValidatorParamsAminoMsg { - type: "/tendermint.types.ValidatorParams"; - value: ValidatorParamsAmino; -} -/** - * ValidatorParams restrict the public key types validators can use. - * NOTE: uses ABCI pubkey naming, not Amino names. - */ -export interface ValidatorParamsSDKType { - pub_key_types: string[]; -} -/** VersionParams contains the ABCI application version. */ -export interface VersionParams { - appVersion: bigint; -} -export interface VersionParamsProtoMsg { - typeUrl: "/tendermint.types.VersionParams"; - value: Uint8Array; -} -/** VersionParams contains the ABCI application version. */ -export interface VersionParamsAmino { - app_version: string; -} -export interface VersionParamsAminoMsg { - type: "/tendermint.types.VersionParams"; - value: VersionParamsAmino; -} -/** VersionParams contains the ABCI application version. */ -export interface VersionParamsSDKType { - app_version: bigint; -} -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParams { - blockMaxBytes: bigint; - blockMaxGas: bigint; -} -export interface HashedParamsProtoMsg { - typeUrl: "/tendermint.types.HashedParams"; - value: Uint8Array; -} -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParamsAmino { - block_max_bytes: string; - block_max_gas: string; -} -export interface HashedParamsAminoMsg { - type: "/tendermint.types.HashedParams"; - value: HashedParamsAmino; -} -/** - * HashedParams is a subset of ConsensusParams. - * - * It is hashed into the Header.ConsensusHash. - */ -export interface HashedParamsSDKType { - block_max_bytes: bigint; - block_max_gas: bigint; -} -function createBaseConsensusParams(): ConsensusParams { - return { - block: BlockParams.fromPartial({}), - evidence: EvidenceParams.fromPartial({}), - validator: ValidatorParams.fromPartial({}), - version: VersionParams.fromPartial({}) - }; -} -export const ConsensusParams = { - typeUrl: "/tendermint.types.ConsensusParams", - encode(message: ConsensusParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.block !== undefined) { - BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); - } - if (message.evidence !== undefined) { - EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); - } - if (message.validator !== undefined) { - ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); - } - if (message.version !== undefined) { - VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ConsensusParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = VersionParams.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ConsensusParams { - return { - block: isSet(object.block) ? BlockParams.fromJSON(object.block) : undefined, - evidence: isSet(object.evidence) ? EvidenceParams.fromJSON(object.evidence) : undefined, - validator: isSet(object.validator) ? ValidatorParams.fromJSON(object.validator) : undefined, - version: isSet(object.version) ? VersionParams.fromJSON(object.version) : undefined - }; - }, - toJSON(message: ConsensusParams): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block ? BlockParams.toJSON(message.block) : undefined); - message.evidence !== undefined && (obj.evidence = message.evidence ? EvidenceParams.toJSON(message.evidence) : undefined); - message.validator !== undefined && (obj.validator = message.validator ? ValidatorParams.toJSON(message.validator) : undefined); - message.version !== undefined && (obj.version = message.version ? VersionParams.toJSON(message.version) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): ConsensusParams { - const message = createBaseConsensusParams(); - message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; - message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceParams.fromPartial(object.evidence) : undefined; - message.validator = object.validator !== undefined && object.validator !== null ? ValidatorParams.fromPartial(object.validator) : undefined; - message.version = object.version !== undefined && object.version !== null ? VersionParams.fromPartial(object.version) : undefined; - return message; - }, - fromSDK(object: ConsensusParamsSDKType): ConsensusParams { - return { - block: object.block ? BlockParams.fromSDK(object.block) : undefined, - evidence: object.evidence ? EvidenceParams.fromSDK(object.evidence) : undefined, - validator: object.validator ? ValidatorParams.fromSDK(object.validator) : undefined, - version: object.version ? VersionParams.fromSDK(object.version) : undefined - }; - }, - toSDK(message: ConsensusParams): ConsensusParamsSDKType { - const obj: any = {}; - message.block !== undefined && (obj.block = message.block ? BlockParams.toSDK(message.block) : undefined); - message.evidence !== undefined && (obj.evidence = message.evidence ? EvidenceParams.toSDK(message.evidence) : undefined); - message.validator !== undefined && (obj.validator = message.validator ? ValidatorParams.toSDK(message.validator) : undefined); - message.version !== undefined && (obj.version = message.version ? VersionParams.toSDK(message.version) : undefined); - return obj; - }, - fromAmino(object: ConsensusParamsAmino): ConsensusParams { - return { - block: object?.block ? BlockParams.fromAmino(object.block) : undefined, - evidence: object?.evidence ? EvidenceParams.fromAmino(object.evidence) : undefined, - validator: object?.validator ? ValidatorParams.fromAmino(object.validator) : undefined, - version: object?.version ? VersionParams.fromAmino(object.version) : undefined - }; - }, - toAmino(message: ConsensusParams): ConsensusParamsAmino { - const obj: any = {}; - obj.block = message.block ? BlockParams.toAmino(message.block) : undefined; - obj.evidence = message.evidence ? EvidenceParams.toAmino(message.evidence) : undefined; - obj.validator = message.validator ? ValidatorParams.toAmino(message.validator) : undefined; - obj.version = message.version ? VersionParams.toAmino(message.version) : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusParamsAminoMsg): ConsensusParams { - return ConsensusParams.fromAmino(object.value); - }, - fromProtoMsg(message: ConsensusParamsProtoMsg): ConsensusParams { - return ConsensusParams.decode(message.value); - }, - toProto(message: ConsensusParams): Uint8Array { - return ConsensusParams.encode(message).finish(); - }, - toProtoMsg(message: ConsensusParams): ConsensusParamsProtoMsg { - return { - typeUrl: "/tendermint.types.ConsensusParams", - value: ConsensusParams.encode(message).finish() - }; - } -}; -function createBaseBlockParams(): BlockParams { - return { - maxBytes: BigInt(0), - maxGas: BigInt(0), - timeIotaMs: BigInt(0) - }; -} -export const BlockParams = { - typeUrl: "/tendermint.types.BlockParams", - encode(message: BlockParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxBytes !== BigInt(0)) { - writer.uint32(8).int64(message.maxBytes); - } - if (message.maxGas !== BigInt(0)) { - writer.uint32(16).int64(message.maxGas); - } - if (message.timeIotaMs !== BigInt(0)) { - writer.uint32(24).int64(message.timeIotaMs); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxBytes = reader.int64(); - break; - case 2: - message.maxGas = reader.int64(); - break; - case 3: - message.timeIotaMs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BlockParams { - return { - maxBytes: isSet(object.maxBytes) ? BigInt(object.maxBytes.toString()) : BigInt(0), - maxGas: isSet(object.maxGas) ? BigInt(object.maxGas.toString()) : BigInt(0), - timeIotaMs: isSet(object.timeIotaMs) ? BigInt(object.timeIotaMs.toString()) : BigInt(0) - }; - }, - toJSON(message: BlockParams): unknown { - const obj: any = {}; - message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || BigInt(0)).toString()); - message.maxGas !== undefined && (obj.maxGas = (message.maxGas || BigInt(0)).toString()); - message.timeIotaMs !== undefined && (obj.timeIotaMs = (message.timeIotaMs || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): BlockParams { - const message = createBaseBlockParams(); - message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); - message.maxGas = object.maxGas !== undefined && object.maxGas !== null ? BigInt(object.maxGas.toString()) : BigInt(0); - message.timeIotaMs = object.timeIotaMs !== undefined && object.timeIotaMs !== null ? BigInt(object.timeIotaMs.toString()) : BigInt(0); - return message; - }, - fromSDK(object: BlockParamsSDKType): BlockParams { - return { - maxBytes: object?.max_bytes, - maxGas: object?.max_gas, - timeIotaMs: object?.time_iota_ms - }; - }, - toSDK(message: BlockParams): BlockParamsSDKType { - const obj: any = {}; - obj.max_bytes = message.maxBytes; - obj.max_gas = message.maxGas; - obj.time_iota_ms = message.timeIotaMs; - return obj; - }, - fromAmino(object: BlockParamsAmino): BlockParams { - return { - maxBytes: BigInt(object.max_bytes), - maxGas: BigInt(object.max_gas), - timeIotaMs: BigInt(object.time_iota_ms) - }; - }, - toAmino(message: BlockParams): BlockParamsAmino { - const obj: any = {}; - obj.max_bytes = message.maxBytes ? message.maxBytes.toString() : undefined; - obj.max_gas = message.maxGas ? message.maxGas.toString() : undefined; - obj.time_iota_ms = message.timeIotaMs ? message.timeIotaMs.toString() : undefined; - return obj; - }, - fromAminoMsg(object: BlockParamsAminoMsg): BlockParams { - return BlockParams.fromAmino(object.value); - }, - fromProtoMsg(message: BlockParamsProtoMsg): BlockParams { - return BlockParams.decode(message.value); - }, - toProto(message: BlockParams): Uint8Array { - return BlockParams.encode(message).finish(); - }, - toProtoMsg(message: BlockParams): BlockParamsProtoMsg { - return { - typeUrl: "/tendermint.types.BlockParams", - value: BlockParams.encode(message).finish() - }; - } -}; -function createBaseEvidenceParams(): EvidenceParams { - return { - maxAgeNumBlocks: BigInt(0), - maxAgeDuration: Duration.fromPartial({}), - maxBytes: BigInt(0) - }; -} -export const EvidenceParams = { - typeUrl: "/tendermint.types.EvidenceParams", - encode(message: EvidenceParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.maxAgeNumBlocks !== BigInt(0)) { - writer.uint32(8).int64(message.maxAgeNumBlocks); - } - if (message.maxAgeDuration !== undefined) { - Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim(); - } - if (message.maxBytes !== BigInt(0)) { - writer.uint32(24).int64(message.maxBytes); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): EvidenceParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEvidenceParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxAgeNumBlocks = reader.int64(); - break; - case 2: - message.maxAgeDuration = Duration.decode(reader, reader.uint32()); - break; - case 3: - message.maxBytes = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): EvidenceParams { - return { - maxAgeNumBlocks: isSet(object.maxAgeNumBlocks) ? BigInt(object.maxAgeNumBlocks.toString()) : BigInt(0), - maxAgeDuration: isSet(object.maxAgeDuration) ? Duration.fromJSON(object.maxAgeDuration) : undefined, - maxBytes: isSet(object.maxBytes) ? BigInt(object.maxBytes.toString()) : BigInt(0) - }; - }, - toJSON(message: EvidenceParams): unknown { - const obj: any = {}; - message.maxAgeNumBlocks !== undefined && (obj.maxAgeNumBlocks = (message.maxAgeNumBlocks || BigInt(0)).toString()); - message.maxAgeDuration !== undefined && (obj.maxAgeDuration = message.maxAgeDuration ? Duration.toJSON(message.maxAgeDuration) : undefined); - message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): EvidenceParams { - const message = createBaseEvidenceParams(); - message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null ? BigInt(object.maxAgeNumBlocks.toString()) : BigInt(0); - message.maxAgeDuration = object.maxAgeDuration !== undefined && object.maxAgeDuration !== null ? Duration.fromPartial(object.maxAgeDuration) : undefined; - message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); - return message; - }, - fromSDK(object: EvidenceParamsSDKType): EvidenceParams { - return { - maxAgeNumBlocks: object?.max_age_num_blocks, - maxAgeDuration: object.max_age_duration ? Duration.fromSDK(object.max_age_duration) : undefined, - maxBytes: object?.max_bytes - }; - }, - toSDK(message: EvidenceParams): EvidenceParamsSDKType { - const obj: any = {}; - obj.max_age_num_blocks = message.maxAgeNumBlocks; - message.maxAgeDuration !== undefined && (obj.max_age_duration = message.maxAgeDuration ? Duration.toSDK(message.maxAgeDuration) : undefined); - obj.max_bytes = message.maxBytes; - return obj; - }, - fromAmino(object: EvidenceParamsAmino): EvidenceParams { - return { - maxAgeNumBlocks: BigInt(object.max_age_num_blocks), - maxAgeDuration: object?.max_age_duration ? Duration.fromAmino(object.max_age_duration) : undefined, - maxBytes: BigInt(object.max_bytes) - }; - }, - toAmino(message: EvidenceParams): EvidenceParamsAmino { - const obj: any = {}; - obj.max_age_num_blocks = message.maxAgeNumBlocks ? message.maxAgeNumBlocks.toString() : undefined; - obj.max_age_duration = message.maxAgeDuration ? Duration.toAmino(message.maxAgeDuration) : undefined; - obj.max_bytes = message.maxBytes ? message.maxBytes.toString() : undefined; - return obj; - }, - fromAminoMsg(object: EvidenceParamsAminoMsg): EvidenceParams { - return EvidenceParams.fromAmino(object.value); - }, - fromProtoMsg(message: EvidenceParamsProtoMsg): EvidenceParams { - return EvidenceParams.decode(message.value); - }, - toProto(message: EvidenceParams): Uint8Array { - return EvidenceParams.encode(message).finish(); - }, - toProtoMsg(message: EvidenceParams): EvidenceParamsProtoMsg { - return { - typeUrl: "/tendermint.types.EvidenceParams", - value: EvidenceParams.encode(message).finish() - }; - } -}; -function createBaseValidatorParams(): ValidatorParams { - return { - pubKeyTypes: [] - }; -} -export const ValidatorParams = { - typeUrl: "/tendermint.types.ValidatorParams", - encode(message: ValidatorParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.pubKeyTypes) { - writer.uint32(10).string(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKeyTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorParams { - return { - pubKeyTypes: Array.isArray(object?.pubKeyTypes) ? object.pubKeyTypes.map((e: any) => String(e)) : [] - }; - }, - toJSON(message: ValidatorParams): unknown { - const obj: any = {}; - if (message.pubKeyTypes) { - obj.pubKeyTypes = message.pubKeyTypes.map(e => e); - } else { - obj.pubKeyTypes = []; - } - return obj; - }, - fromPartial(object: DeepPartial): ValidatorParams { - const message = createBaseValidatorParams(); - message.pubKeyTypes = object.pubKeyTypes?.map(e => e) || []; - return message; - }, - fromSDK(object: ValidatorParamsSDKType): ValidatorParams { - return { - pubKeyTypes: Array.isArray(object?.pub_key_types) ? object.pub_key_types.map((e: any) => e) : [] - }; - }, - toSDK(message: ValidatorParams): ValidatorParamsSDKType { - const obj: any = {}; - if (message.pubKeyTypes) { - obj.pub_key_types = message.pubKeyTypes.map(e => e); - } else { - obj.pub_key_types = []; - } - return obj; - }, - fromAmino(object: ValidatorParamsAmino): ValidatorParams { - return { - pubKeyTypes: Array.isArray(object?.pub_key_types) ? object.pub_key_types.map((e: any) => e) : [] - }; - }, - toAmino(message: ValidatorParams): ValidatorParamsAmino { - const obj: any = {}; - if (message.pubKeyTypes) { - obj.pub_key_types = message.pubKeyTypes.map(e => e); - } else { - obj.pub_key_types = []; - } - return obj; - }, - fromAminoMsg(object: ValidatorParamsAminoMsg): ValidatorParams { - return ValidatorParams.fromAmino(object.value); - }, - fromProtoMsg(message: ValidatorParamsProtoMsg): ValidatorParams { - return ValidatorParams.decode(message.value); - }, - toProto(message: ValidatorParams): Uint8Array { - return ValidatorParams.encode(message).finish(); - }, - toProtoMsg(message: ValidatorParams): ValidatorParamsProtoMsg { - return { - typeUrl: "/tendermint.types.ValidatorParams", - value: ValidatorParams.encode(message).finish() - }; - } -}; -function createBaseVersionParams(): VersionParams { - return { - appVersion: BigInt(0) - }; -} -export const VersionParams = { - typeUrl: "/tendermint.types.VersionParams", - encode(message: VersionParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.appVersion !== BigInt(0)) { - writer.uint32(8).uint64(message.appVersion); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): VersionParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVersionParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appVersion = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): VersionParams { - return { - appVersion: isSet(object.appVersion) ? BigInt(object.appVersion.toString()) : BigInt(0) - }; - }, - toJSON(message: VersionParams): unknown { - const obj: any = {}; - message.appVersion !== undefined && (obj.appVersion = (message.appVersion || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): VersionParams { - const message = createBaseVersionParams(); - message.appVersion = object.appVersion !== undefined && object.appVersion !== null ? BigInt(object.appVersion.toString()) : BigInt(0); - return message; - }, - fromSDK(object: VersionParamsSDKType): VersionParams { - return { - appVersion: object?.app_version - }; - }, - toSDK(message: VersionParams): VersionParamsSDKType { - const obj: any = {}; - obj.app_version = message.appVersion; - return obj; - }, - fromAmino(object: VersionParamsAmino): VersionParams { - return { - appVersion: BigInt(object.app_version) - }; - }, - toAmino(message: VersionParams): VersionParamsAmino { - const obj: any = {}; - obj.app_version = message.appVersion ? message.appVersion.toString() : undefined; - return obj; - }, - fromAminoMsg(object: VersionParamsAminoMsg): VersionParams { - return VersionParams.fromAmino(object.value); - }, - fromProtoMsg(message: VersionParamsProtoMsg): VersionParams { - return VersionParams.decode(message.value); - }, - toProto(message: VersionParams): Uint8Array { - return VersionParams.encode(message).finish(); - }, - toProtoMsg(message: VersionParams): VersionParamsProtoMsg { - return { - typeUrl: "/tendermint.types.VersionParams", - value: VersionParams.encode(message).finish() - }; - } -}; -function createBaseHashedParams(): HashedParams { - return { - blockMaxBytes: BigInt(0), - blockMaxGas: BigInt(0) - }; -} -export const HashedParams = { - typeUrl: "/tendermint.types.HashedParams", - encode(message: HashedParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockMaxBytes !== BigInt(0)) { - writer.uint32(8).int64(message.blockMaxBytes); - } - if (message.blockMaxGas !== BigInt(0)) { - writer.uint32(16).int64(message.blockMaxGas); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): HashedParams { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHashedParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockMaxBytes = reader.int64(); - break; - case 2: - message.blockMaxGas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): HashedParams { - return { - blockMaxBytes: isSet(object.blockMaxBytes) ? BigInt(object.blockMaxBytes.toString()) : BigInt(0), - blockMaxGas: isSet(object.blockMaxGas) ? BigInt(object.blockMaxGas.toString()) : BigInt(0) - }; - }, - toJSON(message: HashedParams): unknown { - const obj: any = {}; - message.blockMaxBytes !== undefined && (obj.blockMaxBytes = (message.blockMaxBytes || BigInt(0)).toString()); - message.blockMaxGas !== undefined && (obj.blockMaxGas = (message.blockMaxGas || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): HashedParams { - const message = createBaseHashedParams(); - message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null ? BigInt(object.blockMaxBytes.toString()) : BigInt(0); - message.blockMaxGas = object.blockMaxGas !== undefined && object.blockMaxGas !== null ? BigInt(object.blockMaxGas.toString()) : BigInt(0); - return message; - }, - fromSDK(object: HashedParamsSDKType): HashedParams { - return { - blockMaxBytes: object?.block_max_bytes, - blockMaxGas: object?.block_max_gas - }; - }, - toSDK(message: HashedParams): HashedParamsSDKType { - const obj: any = {}; - obj.block_max_bytes = message.blockMaxBytes; - obj.block_max_gas = message.blockMaxGas; - return obj; - }, - fromAmino(object: HashedParamsAmino): HashedParams { - return { - blockMaxBytes: BigInt(object.block_max_bytes), - blockMaxGas: BigInt(object.block_max_gas) - }; - }, - toAmino(message: HashedParams): HashedParamsAmino { - const obj: any = {}; - obj.block_max_bytes = message.blockMaxBytes ? message.blockMaxBytes.toString() : undefined; - obj.block_max_gas = message.blockMaxGas ? message.blockMaxGas.toString() : undefined; - return obj; - }, - fromAminoMsg(object: HashedParamsAminoMsg): HashedParams { - return HashedParams.fromAmino(object.value); - }, - fromProtoMsg(message: HashedParamsProtoMsg): HashedParams { - return HashedParams.decode(message.value); - }, - toProto(message: HashedParams): Uint8Array { - return HashedParams.encode(message).finish(); - }, - toProtoMsg(message: HashedParams): HashedParamsProtoMsg { - return { - typeUrl: "/tendermint.types.HashedParams", - value: HashedParams.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/types/types.ts b/examples/interchainjs/src/codegen/tendermint/types/types.ts deleted file mode 100644 index c614db62..00000000 --- a/examples/interchainjs/src/codegen/tendermint/types/types.ts +++ /dev/null @@ -1,2190 +0,0 @@ -import { Proof, ProofAmino, ProofSDKType } from "../crypto/proof"; -import { Consensus, ConsensusAmino, ConsensusSDKType } from "../version/types"; -import { Timestamp } from "../../google/protobuf/timestamp"; -import { ValidatorSet, ValidatorSetAmino, ValidatorSetSDKType } from "./validator"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, toTimestamp, fromTimestamp } from "../../helpers"; -/** BlockIdFlag indicates which BlcokID the signature is for */ -export enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3, - UNRECOGNIZED = -1, -} -export const BlockIDFlagSDKType = BlockIDFlag; -export const BlockIDFlagAmino = BlockIDFlag; -export function blockIDFlagFromJSON(object: any): BlockIDFlag { - switch (object) { - case 0: - case "BLOCK_ID_FLAG_UNKNOWN": - return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN; - case 1: - case "BLOCK_ID_FLAG_ABSENT": - return BlockIDFlag.BLOCK_ID_FLAG_ABSENT; - case 2: - case "BLOCK_ID_FLAG_COMMIT": - return BlockIDFlag.BLOCK_ID_FLAG_COMMIT; - case 3: - case "BLOCK_ID_FLAG_NIL": - return BlockIDFlag.BLOCK_ID_FLAG_NIL; - case -1: - case "UNRECOGNIZED": - default: - return BlockIDFlag.UNRECOGNIZED; - } -} -export function blockIDFlagToJSON(object: BlockIDFlag): string { - switch (object) { - case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN: - return "BLOCK_ID_FLAG_UNKNOWN"; - case BlockIDFlag.BLOCK_ID_FLAG_ABSENT: - return "BLOCK_ID_FLAG_ABSENT"; - case BlockIDFlag.BLOCK_ID_FLAG_COMMIT: - return "BLOCK_ID_FLAG_COMMIT"; - case BlockIDFlag.BLOCK_ID_FLAG_NIL: - return "BLOCK_ID_FLAG_NIL"; - case BlockIDFlag.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** SignedMsgType is a type of signed message in the consensus. */ -export enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - /** SIGNED_MSG_TYPE_PREVOTE - Votes */ - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */ - SIGNED_MSG_TYPE_PROPOSAL = 32, - UNRECOGNIZED = -1, -} -export const SignedMsgTypeSDKType = SignedMsgType; -export const SignedMsgTypeAmino = SignedMsgType; -export function signedMsgTypeFromJSON(object: any): SignedMsgType { - switch (object) { - case 0: - case "SIGNED_MSG_TYPE_UNKNOWN": - return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN; - case 1: - case "SIGNED_MSG_TYPE_PREVOTE": - return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE; - case 2: - case "SIGNED_MSG_TYPE_PRECOMMIT": - return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT; - case 32: - case "SIGNED_MSG_TYPE_PROPOSAL": - return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL; - case -1: - case "UNRECOGNIZED": - default: - return SignedMsgType.UNRECOGNIZED; - } -} -export function signedMsgTypeToJSON(object: SignedMsgType): string { - switch (object) { - case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN: - return "SIGNED_MSG_TYPE_UNKNOWN"; - case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE: - return "SIGNED_MSG_TYPE_PREVOTE"; - case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT: - return "SIGNED_MSG_TYPE_PRECOMMIT"; - case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: - return "SIGNED_MSG_TYPE_PROPOSAL"; - case SignedMsgType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} -/** PartsetHeader */ -export interface PartSetHeader { - total: number; - hash: Uint8Array; -} -export interface PartSetHeaderProtoMsg { - typeUrl: "/tendermint.types.PartSetHeader"; - value: Uint8Array; -} -/** PartsetHeader */ -export interface PartSetHeaderAmino { - total: number; - hash: Uint8Array; -} -export interface PartSetHeaderAminoMsg { - type: "/tendermint.types.PartSetHeader"; - value: PartSetHeaderAmino; -} -/** PartsetHeader */ -export interface PartSetHeaderSDKType { - total: number; - hash: Uint8Array; -} -export interface Part { - index: number; - bytes: Uint8Array; - proof: Proof | undefined; -} -export interface PartProtoMsg { - typeUrl: "/tendermint.types.Part"; - value: Uint8Array; -} -export interface PartAmino { - index: number; - bytes: Uint8Array; - proof?: ProofAmino | undefined; -} -export interface PartAminoMsg { - type: "/tendermint.types.Part"; - value: PartAmino; -} -export interface PartSDKType { - index: number; - bytes: Uint8Array; - proof: ProofSDKType | undefined; -} -/** BlockID */ -export interface BlockID { - hash: Uint8Array; - partSetHeader: PartSetHeader | undefined; -} -export interface BlockIDProtoMsg { - typeUrl: "/tendermint.types.BlockID"; - value: Uint8Array; -} -/** BlockID */ -export interface BlockIDAmino { - hash: Uint8Array; - part_set_header?: PartSetHeaderAmino | undefined; -} -export interface BlockIDAminoMsg { - type: "/tendermint.types.BlockID"; - value: BlockIDAmino; -} -/** BlockID */ -export interface BlockIDSDKType { - hash: Uint8Array; - part_set_header: PartSetHeaderSDKType | undefined; -} -/** Header defines the structure of a Tendermint block header. */ -export interface Header { - /** basic block info */ - version: Consensus | undefined; - chainId: string; - height: bigint; - time: Date | undefined; - /** prev block info */ - lastBlockId: BlockID | undefined; - /** hashes of block data */ - lastCommitHash: Uint8Array; - dataHash: Uint8Array; - /** hashes from the app output from the prev block */ - validatorsHash: Uint8Array; - /** validators for the next block */ - nextValidatorsHash: Uint8Array; - /** consensus params for current block */ - consensusHash: Uint8Array; - /** state after txs from the previous block */ - appHash: Uint8Array; - lastResultsHash: Uint8Array; - /** consensus info */ - evidenceHash: Uint8Array; - /** original proposer of the block */ - proposerAddress: Uint8Array; -} -export interface HeaderProtoMsg { - typeUrl: "/tendermint.types.Header"; - value: Uint8Array; -} -/** Header defines the structure of a Tendermint block header. */ -export interface HeaderAmino { - /** basic block info */ - version?: ConsensusAmino | undefined; - chain_id: string; - height: string; - time?: Date | undefined; - /** prev block info */ - last_block_id?: BlockIDAmino | undefined; - /** hashes of block data */ - last_commit_hash: Uint8Array; - data_hash: Uint8Array; - /** hashes from the app output from the prev block */ - validators_hash: Uint8Array; - /** validators for the next block */ - next_validators_hash: Uint8Array; - /** consensus params for current block */ - consensus_hash: Uint8Array; - /** state after txs from the previous block */ - app_hash: Uint8Array; - last_results_hash: Uint8Array; - /** consensus info */ - evidence_hash: Uint8Array; - /** original proposer of the block */ - proposer_address: Uint8Array; -} -export interface HeaderAminoMsg { - type: "/tendermint.types.Header"; - value: HeaderAmino; -} -/** Header defines the structure of a Tendermint block header. */ -export interface HeaderSDKType { - version: ConsensusSDKType | undefined; - chain_id: string; - height: bigint; - time: Date | undefined; - last_block_id: BlockIDSDKType | undefined; - last_commit_hash: Uint8Array; - data_hash: Uint8Array; - validators_hash: Uint8Array; - next_validators_hash: Uint8Array; - consensus_hash: Uint8Array; - app_hash: Uint8Array; - last_results_hash: Uint8Array; - evidence_hash: Uint8Array; - proposer_address: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface Data { - /** - * Txs that will be applied by state @ block.Height+1. - * NOTE: not all txs here are valid. We're just agreeing on the order first. - * This means that block.AppHash does not include these txs. - */ - txs: Uint8Array[]; -} -export interface DataProtoMsg { - typeUrl: "/tendermint.types.Data"; - value: Uint8Array; -} -/** Data contains the set of transactions included in the block */ -export interface DataAmino { - /** - * Txs that will be applied by state @ block.Height+1. - * NOTE: not all txs here are valid. We're just agreeing on the order first. - * This means that block.AppHash does not include these txs. - */ - txs: Uint8Array[]; -} -export interface DataAminoMsg { - type: "/tendermint.types.Data"; - value: DataAmino; -} -/** Data contains the set of transactions included in the block */ -export interface DataSDKType { - txs: Uint8Array[]; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface Vote { - type: SignedMsgType; - height: bigint; - round: number; - /** zero if vote is nil. */ - blockId: BlockID | undefined; - timestamp: Date | undefined; - validatorAddress: Uint8Array; - validatorIndex: number; - signature: Uint8Array; -} -export interface VoteProtoMsg { - typeUrl: "/tendermint.types.Vote"; - value: Uint8Array; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface VoteAmino { - type: SignedMsgType; - height: string; - round: number; - /** zero if vote is nil. */ - block_id?: BlockIDAmino | undefined; - timestamp?: Date | undefined; - validator_address: Uint8Array; - validator_index: number; - signature: Uint8Array; -} -export interface VoteAminoMsg { - type: "/tendermint.types.Vote"; - value: VoteAmino; -} -/** - * Vote represents a prevote, precommit, or commit vote from validators for - * consensus. - */ -export interface VoteSDKType { - type: SignedMsgType; - height: bigint; - round: number; - block_id: BlockIDSDKType | undefined; - timestamp: Date | undefined; - validator_address: Uint8Array; - validator_index: number; - signature: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface Commit { - height: bigint; - round: number; - blockId: BlockID | undefined; - signatures: CommitSig[]; -} -export interface CommitProtoMsg { - typeUrl: "/tendermint.types.Commit"; - value: Uint8Array; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface CommitAmino { - height: string; - round: number; - block_id?: BlockIDAmino | undefined; - signatures: CommitSigAmino[]; -} -export interface CommitAminoMsg { - type: "/tendermint.types.Commit"; - value: CommitAmino; -} -/** Commit contains the evidence that a block was committed by a set of validators. */ -export interface CommitSDKType { - height: bigint; - round: number; - block_id: BlockIDSDKType | undefined; - signatures: CommitSigSDKType[]; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSig { - blockIdFlag: BlockIDFlag; - validatorAddress: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface CommitSigProtoMsg { - typeUrl: "/tendermint.types.CommitSig"; - value: Uint8Array; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSigAmino { - block_id_flag: BlockIDFlag; - validator_address: Uint8Array; - timestamp?: Date | undefined; - signature: Uint8Array; -} -export interface CommitSigAminoMsg { - type: "/tendermint.types.CommitSig"; - value: CommitSigAmino; -} -/** CommitSig is a part of the Vote included in a Commit. */ -export interface CommitSigSDKType { - block_id_flag: BlockIDFlag; - validator_address: Uint8Array; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface Proposal { - type: SignedMsgType; - height: bigint; - round: number; - polRound: number; - blockId: BlockID | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface ProposalProtoMsg { - typeUrl: "/tendermint.types.Proposal"; - value: Uint8Array; -} -export interface ProposalAmino { - type: SignedMsgType; - height: string; - round: number; - pol_round: number; - block_id?: BlockIDAmino | undefined; - timestamp?: Date | undefined; - signature: Uint8Array; -} -export interface ProposalAminoMsg { - type: "/tendermint.types.Proposal"; - value: ProposalAmino; -} -export interface ProposalSDKType { - type: SignedMsgType; - height: bigint; - round: number; - pol_round: number; - block_id: BlockIDSDKType | undefined; - timestamp: Date | undefined; - signature: Uint8Array; -} -export interface SignedHeader { - header: Header | undefined; - commit: Commit | undefined; -} -export interface SignedHeaderProtoMsg { - typeUrl: "/tendermint.types.SignedHeader"; - value: Uint8Array; -} -export interface SignedHeaderAmino { - header?: HeaderAmino | undefined; - commit?: CommitAmino | undefined; -} -export interface SignedHeaderAminoMsg { - type: "/tendermint.types.SignedHeader"; - value: SignedHeaderAmino; -} -export interface SignedHeaderSDKType { - header: HeaderSDKType | undefined; - commit: CommitSDKType | undefined; -} -export interface LightBlock { - signedHeader: SignedHeader | undefined; - validatorSet: ValidatorSet | undefined; -} -export interface LightBlockProtoMsg { - typeUrl: "/tendermint.types.LightBlock"; - value: Uint8Array; -} -export interface LightBlockAmino { - signed_header?: SignedHeaderAmino | undefined; - validator_set?: ValidatorSetAmino | undefined; -} -export interface LightBlockAminoMsg { - type: "/tendermint.types.LightBlock"; - value: LightBlockAmino; -} -export interface LightBlockSDKType { - signed_header: SignedHeaderSDKType | undefined; - validator_set: ValidatorSetSDKType | undefined; -} -export interface BlockMeta { - blockId: BlockID | undefined; - blockSize: bigint; - header: Header | undefined; - numTxs: bigint; -} -export interface BlockMetaProtoMsg { - typeUrl: "/tendermint.types.BlockMeta"; - value: Uint8Array; -} -export interface BlockMetaAmino { - block_id?: BlockIDAmino | undefined; - block_size: string; - header?: HeaderAmino | undefined; - num_txs: string; -} -export interface BlockMetaAminoMsg { - type: "/tendermint.types.BlockMeta"; - value: BlockMetaAmino; -} -export interface BlockMetaSDKType { - block_id: BlockIDSDKType | undefined; - block_size: bigint; - header: HeaderSDKType | undefined; - num_txs: bigint; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProof { - rootHash: Uint8Array; - data: Uint8Array; - proof: Proof | undefined; -} -export interface TxProofProtoMsg { - typeUrl: "/tendermint.types.TxProof"; - value: Uint8Array; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProofAmino { - root_hash: Uint8Array; - data: Uint8Array; - proof?: ProofAmino | undefined; -} -export interface TxProofAminoMsg { - type: "/tendermint.types.TxProof"; - value: TxProofAmino; -} -/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ -export interface TxProofSDKType { - root_hash: Uint8Array; - data: Uint8Array; - proof: ProofSDKType | undefined; -} -function createBasePartSetHeader(): PartSetHeader { - return { - total: 0, - hash: new Uint8Array() - }; -} -export const PartSetHeader = { - typeUrl: "/tendermint.types.PartSetHeader", - encode(message: PartSetHeader, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.total !== 0) { - writer.uint32(8).uint32(message.total); - } - if (message.hash.length !== 0) { - writer.uint32(18).bytes(message.hash); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): PartSetHeader { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePartSetHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - break; - case 2: - message.hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): PartSetHeader { - return { - total: isSet(object.total) ? Number(object.total) : 0, - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array() - }; - }, - toJSON(message: PartSetHeader): unknown { - const obj: any = {}; - message.total !== undefined && (obj.total = Math.round(message.total)); - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): PartSetHeader { - const message = createBasePartSetHeader(); - message.total = object.total ?? 0; - message.hash = object.hash ?? new Uint8Array(); - return message; - }, - fromSDK(object: PartSetHeaderSDKType): PartSetHeader { - return { - total: object?.total, - hash: object?.hash - }; - }, - toSDK(message: PartSetHeader): PartSetHeaderSDKType { - const obj: any = {}; - obj.total = message.total; - obj.hash = message.hash; - return obj; - }, - fromAmino(object: PartSetHeaderAmino): PartSetHeader { - return { - total: object.total, - hash: object.hash - }; - }, - toAmino(message: PartSetHeader): PartSetHeaderAmino { - const obj: any = {}; - obj.total = message.total; - obj.hash = message.hash; - return obj; - }, - fromAminoMsg(object: PartSetHeaderAminoMsg): PartSetHeader { - return PartSetHeader.fromAmino(object.value); - }, - fromProtoMsg(message: PartSetHeaderProtoMsg): PartSetHeader { - return PartSetHeader.decode(message.value); - }, - toProto(message: PartSetHeader): Uint8Array { - return PartSetHeader.encode(message).finish(); - }, - toProtoMsg(message: PartSetHeader): PartSetHeaderProtoMsg { - return { - typeUrl: "/tendermint.types.PartSetHeader", - value: PartSetHeader.encode(message).finish() - }; - } -}; -function createBasePart(): Part { - return { - index: 0, - bytes: new Uint8Array(), - proof: Proof.fromPartial({}) - }; -} -export const Part = { - typeUrl: "/tendermint.types.Part", - encode(message: Part, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.index !== 0) { - writer.uint32(8).uint32(message.index); - } - if (message.bytes.length !== 0) { - writer.uint32(18).bytes(message.bytes); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Part { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePart(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Part { - return { - index: isSet(object.index) ? Number(object.index) : 0, - bytes: isSet(object.bytes) ? bytesFromBase64(object.bytes) : new Uint8Array(), - proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined - }; - }, - toJSON(message: Part): unknown { - const obj: any = {}; - message.index !== undefined && (obj.index = Math.round(message.index)); - message.bytes !== undefined && (obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array())); - message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): Part { - const message = createBasePart(); - message.index = object.index ?? 0; - message.bytes = object.bytes ?? new Uint8Array(); - message.proof = object.proof !== undefined && object.proof !== null ? Proof.fromPartial(object.proof) : undefined; - return message; - }, - fromSDK(object: PartSDKType): Part { - return { - index: object?.index, - bytes: object?.bytes, - proof: object.proof ? Proof.fromSDK(object.proof) : undefined - }; - }, - toSDK(message: Part): PartSDKType { - const obj: any = {}; - obj.index = message.index; - obj.bytes = message.bytes; - message.proof !== undefined && (obj.proof = message.proof ? Proof.toSDK(message.proof) : undefined); - return obj; - }, - fromAmino(object: PartAmino): Part { - return { - index: object.index, - bytes: object.bytes, - proof: object?.proof ? Proof.fromAmino(object.proof) : undefined - }; - }, - toAmino(message: Part): PartAmino { - const obj: any = {}; - obj.index = message.index; - obj.bytes = message.bytes; - obj.proof = message.proof ? Proof.toAmino(message.proof) : undefined; - return obj; - }, - fromAminoMsg(object: PartAminoMsg): Part { - return Part.fromAmino(object.value); - }, - fromProtoMsg(message: PartProtoMsg): Part { - return Part.decode(message.value); - }, - toProto(message: Part): Uint8Array { - return Part.encode(message).finish(); - }, - toProtoMsg(message: Part): PartProtoMsg { - return { - typeUrl: "/tendermint.types.Part", - value: Part.encode(message).finish() - }; - } -}; -function createBaseBlockID(): BlockID { - return { - hash: new Uint8Array(), - partSetHeader: PartSetHeader.fromPartial({}) - }; -} -export const BlockID = { - typeUrl: "/tendermint.types.BlockID", - encode(message: BlockID, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.hash.length !== 0) { - writer.uint32(10).bytes(message.hash); - } - if (message.partSetHeader !== undefined) { - PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockID { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockID(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.partSetHeader = PartSetHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BlockID { - return { - hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), - partSetHeader: isSet(object.partSetHeader) ? PartSetHeader.fromJSON(object.partSetHeader) : undefined - }; - }, - toJSON(message: BlockID): unknown { - const obj: any = {}; - message.hash !== undefined && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array())); - message.partSetHeader !== undefined && (obj.partSetHeader = message.partSetHeader ? PartSetHeader.toJSON(message.partSetHeader) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): BlockID { - const message = createBaseBlockID(); - message.hash = object.hash ?? new Uint8Array(); - message.partSetHeader = object.partSetHeader !== undefined && object.partSetHeader !== null ? PartSetHeader.fromPartial(object.partSetHeader) : undefined; - return message; - }, - fromSDK(object: BlockIDSDKType): BlockID { - return { - hash: object?.hash, - partSetHeader: object.part_set_header ? PartSetHeader.fromSDK(object.part_set_header) : undefined - }; - }, - toSDK(message: BlockID): BlockIDSDKType { - const obj: any = {}; - obj.hash = message.hash; - message.partSetHeader !== undefined && (obj.part_set_header = message.partSetHeader ? PartSetHeader.toSDK(message.partSetHeader) : undefined); - return obj; - }, - fromAmino(object: BlockIDAmino): BlockID { - return { - hash: object.hash, - partSetHeader: object?.part_set_header ? PartSetHeader.fromAmino(object.part_set_header) : undefined - }; - }, - toAmino(message: BlockID): BlockIDAmino { - const obj: any = {}; - obj.hash = message.hash; - obj.part_set_header = message.partSetHeader ? PartSetHeader.toAmino(message.partSetHeader) : undefined; - return obj; - }, - fromAminoMsg(object: BlockIDAminoMsg): BlockID { - return BlockID.fromAmino(object.value); - }, - fromProtoMsg(message: BlockIDProtoMsg): BlockID { - return BlockID.decode(message.value); - }, - toProto(message: BlockID): Uint8Array { - return BlockID.encode(message).finish(); - }, - toProtoMsg(message: BlockID): BlockIDProtoMsg { - return { - typeUrl: "/tendermint.types.BlockID", - value: BlockID.encode(message).finish() - }; - } -}; -function createBaseHeader(): Header { - return { - version: Consensus.fromPartial({}), - chainId: "", - height: BigInt(0), - time: new Date(), - lastBlockId: BlockID.fromPartial({}), - lastCommitHash: new Uint8Array(), - dataHash: new Uint8Array(), - validatorsHash: new Uint8Array(), - nextValidatorsHash: new Uint8Array(), - consensusHash: new Uint8Array(), - appHash: new Uint8Array(), - lastResultsHash: new Uint8Array(), - evidenceHash: new Uint8Array(), - proposerAddress: new Uint8Array() - }; -} -export const Header = { - typeUrl: "/tendermint.types.Header", - encode(message: Header, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.version !== undefined) { - Consensus.encode(message.version, writer.uint32(10).fork()).ldelim(); - } - if (message.chainId !== "") { - writer.uint32(18).string(message.chainId); - } - if (message.height !== BigInt(0)) { - writer.uint32(24).int64(message.height); - } - if (message.time !== undefined) { - Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim(); - } - if (message.lastBlockId !== undefined) { - BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim(); - } - if (message.lastCommitHash.length !== 0) { - writer.uint32(50).bytes(message.lastCommitHash); - } - if (message.dataHash.length !== 0) { - writer.uint32(58).bytes(message.dataHash); - } - if (message.validatorsHash.length !== 0) { - writer.uint32(66).bytes(message.validatorsHash); - } - if (message.nextValidatorsHash.length !== 0) { - writer.uint32(74).bytes(message.nextValidatorsHash); - } - if (message.consensusHash.length !== 0) { - writer.uint32(82).bytes(message.consensusHash); - } - if (message.appHash.length !== 0) { - writer.uint32(90).bytes(message.appHash); - } - if (message.lastResultsHash.length !== 0) { - writer.uint32(98).bytes(message.lastResultsHash); - } - if (message.evidenceHash.length !== 0) { - writer.uint32(106).bytes(message.evidenceHash); - } - if (message.proposerAddress.length !== 0) { - writer.uint32(114).bytes(message.proposerAddress); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Header { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chainId = reader.string(); - break; - case 3: - message.height = reader.int64(); - break; - case 4: - message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 5: - message.lastBlockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.lastCommitHash = reader.bytes(); - break; - case 7: - message.dataHash = reader.bytes(); - break; - case 8: - message.validatorsHash = reader.bytes(); - break; - case 9: - message.nextValidatorsHash = reader.bytes(); - break; - case 10: - message.consensusHash = reader.bytes(); - break; - case 11: - message.appHash = reader.bytes(); - break; - case 12: - message.lastResultsHash = reader.bytes(); - break; - case 13: - message.evidenceHash = reader.bytes(); - break; - case 14: - message.proposerAddress = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Header { - return { - version: isSet(object.version) ? Consensus.fromJSON(object.version) : undefined, - chainId: isSet(object.chainId) ? String(object.chainId) : "", - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - time: isSet(object.time) ? new Date(object.time) : undefined, - lastBlockId: isSet(object.lastBlockId) ? BlockID.fromJSON(object.lastBlockId) : undefined, - lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(), - dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(), - validatorsHash: isSet(object.validatorsHash) ? bytesFromBase64(object.validatorsHash) : new Uint8Array(), - nextValidatorsHash: isSet(object.nextValidatorsHash) ? bytesFromBase64(object.nextValidatorsHash) : new Uint8Array(), - consensusHash: isSet(object.consensusHash) ? bytesFromBase64(object.consensusHash) : new Uint8Array(), - appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(), - lastResultsHash: isSet(object.lastResultsHash) ? bytesFromBase64(object.lastResultsHash) : new Uint8Array(), - evidenceHash: isSet(object.evidenceHash) ? bytesFromBase64(object.evidenceHash) : new Uint8Array(), - proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array() - }; - }, - toJSON(message: Header): unknown { - const obj: any = {}; - message.version !== undefined && (obj.version = message.version ? Consensus.toJSON(message.version) : undefined); - message.chainId !== undefined && (obj.chainId = message.chainId); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.time !== undefined && (obj.time = message.time.toISOString()); - message.lastBlockId !== undefined && (obj.lastBlockId = message.lastBlockId ? BlockID.toJSON(message.lastBlockId) : undefined); - message.lastCommitHash !== undefined && (obj.lastCommitHash = base64FromBytes(message.lastCommitHash !== undefined ? message.lastCommitHash : new Uint8Array())); - message.dataHash !== undefined && (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.validatorsHash !== undefined && (obj.validatorsHash = base64FromBytes(message.validatorsHash !== undefined ? message.validatorsHash : new Uint8Array())); - message.nextValidatorsHash !== undefined && (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined ? message.nextValidatorsHash : new Uint8Array())); - message.consensusHash !== undefined && (obj.consensusHash = base64FromBytes(message.consensusHash !== undefined ? message.consensusHash : new Uint8Array())); - message.appHash !== undefined && (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array())); - message.lastResultsHash !== undefined && (obj.lastResultsHash = base64FromBytes(message.lastResultsHash !== undefined ? message.lastResultsHash : new Uint8Array())); - message.evidenceHash !== undefined && (obj.evidenceHash = base64FromBytes(message.evidenceHash !== undefined ? message.evidenceHash : new Uint8Array())); - message.proposerAddress !== undefined && (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined ? message.proposerAddress : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial
): Header { - const message = createBaseHeader(); - message.version = object.version !== undefined && object.version !== null ? Consensus.fromPartial(object.version) : undefined; - message.chainId = object.chainId ?? ""; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.time = object.time ?? undefined; - message.lastBlockId = object.lastBlockId !== undefined && object.lastBlockId !== null ? BlockID.fromPartial(object.lastBlockId) : undefined; - message.lastCommitHash = object.lastCommitHash ?? new Uint8Array(); - message.dataHash = object.dataHash ?? new Uint8Array(); - message.validatorsHash = object.validatorsHash ?? new Uint8Array(); - message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(); - message.consensusHash = object.consensusHash ?? new Uint8Array(); - message.appHash = object.appHash ?? new Uint8Array(); - message.lastResultsHash = object.lastResultsHash ?? new Uint8Array(); - message.evidenceHash = object.evidenceHash ?? new Uint8Array(); - message.proposerAddress = object.proposerAddress ?? new Uint8Array(); - return message; - }, - fromSDK(object: HeaderSDKType): Header { - return { - version: object.version ? Consensus.fromSDK(object.version) : undefined, - chainId: object?.chain_id, - height: object?.height, - time: object.time ?? undefined, - lastBlockId: object.last_block_id ? BlockID.fromSDK(object.last_block_id) : undefined, - lastCommitHash: object?.last_commit_hash, - dataHash: object?.data_hash, - validatorsHash: object?.validators_hash, - nextValidatorsHash: object?.next_validators_hash, - consensusHash: object?.consensus_hash, - appHash: object?.app_hash, - lastResultsHash: object?.last_results_hash, - evidenceHash: object?.evidence_hash, - proposerAddress: object?.proposer_address - }; - }, - toSDK(message: Header): HeaderSDKType { - const obj: any = {}; - message.version !== undefined && (obj.version = message.version ? Consensus.toSDK(message.version) : undefined); - obj.chain_id = message.chainId; - obj.height = message.height; - message.time !== undefined && (obj.time = message.time ?? undefined); - message.lastBlockId !== undefined && (obj.last_block_id = message.lastBlockId ? BlockID.toSDK(message.lastBlockId) : undefined); - obj.last_commit_hash = message.lastCommitHash; - obj.data_hash = message.dataHash; - obj.validators_hash = message.validatorsHash; - obj.next_validators_hash = message.nextValidatorsHash; - obj.consensus_hash = message.consensusHash; - obj.app_hash = message.appHash; - obj.last_results_hash = message.lastResultsHash; - obj.evidence_hash = message.evidenceHash; - obj.proposer_address = message.proposerAddress; - return obj; - }, - fromAmino(object: HeaderAmino): Header { - return { - version: object?.version ? Consensus.fromAmino(object.version) : undefined, - chainId: object.chain_id, - height: BigInt(object.height), - time: object.time, - lastBlockId: object?.last_block_id ? BlockID.fromAmino(object.last_block_id) : undefined, - lastCommitHash: object.last_commit_hash, - dataHash: object.data_hash, - validatorsHash: object.validators_hash, - nextValidatorsHash: object.next_validators_hash, - consensusHash: object.consensus_hash, - appHash: object.app_hash, - lastResultsHash: object.last_results_hash, - evidenceHash: object.evidence_hash, - proposerAddress: object.proposer_address - }; - }, - toAmino(message: Header): HeaderAmino { - const obj: any = {}; - obj.version = message.version ? Consensus.toAmino(message.version) : undefined; - obj.chain_id = message.chainId; - obj.height = message.height ? message.height.toString() : undefined; - obj.time = message.time; - obj.last_block_id = message.lastBlockId ? BlockID.toAmino(message.lastBlockId) : undefined; - obj.last_commit_hash = message.lastCommitHash; - obj.data_hash = message.dataHash; - obj.validators_hash = message.validatorsHash; - obj.next_validators_hash = message.nextValidatorsHash; - obj.consensus_hash = message.consensusHash; - obj.app_hash = message.appHash; - obj.last_results_hash = message.lastResultsHash; - obj.evidence_hash = message.evidenceHash; - obj.proposer_address = message.proposerAddress; - return obj; - }, - fromAminoMsg(object: HeaderAminoMsg): Header { - return Header.fromAmino(object.value); - }, - fromProtoMsg(message: HeaderProtoMsg): Header { - return Header.decode(message.value); - }, - toProto(message: Header): Uint8Array { - return Header.encode(message).finish(); - }, - toProtoMsg(message: Header): HeaderProtoMsg { - return { - typeUrl: "/tendermint.types.Header", - value: Header.encode(message).finish() - }; - } -}; -function createBaseData(): Data { - return { - txs: [] - }; -} -export const Data = { - typeUrl: "/tendermint.types.Data", - encode(message: Data, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.txs) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Data { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Data { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => bytesFromBase64(e)) : [] - }; - }, - toJSON(message: Data): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); - } else { - obj.txs = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Data { - const message = createBaseData(); - message.txs = object.txs?.map(e => e) || []; - return message; - }, - fromSDK(object: DataSDKType): Data { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => e) : [] - }; - }, - toSDK(message: Data): DataSDKType { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e); - } else { - obj.txs = []; - } - return obj; - }, - fromAmino(object: DataAmino): Data { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => e) : [] - }; - }, - toAmino(message: Data): DataAmino { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map(e => e); - } else { - obj.txs = []; - } - return obj; - }, - fromAminoMsg(object: DataAminoMsg): Data { - return Data.fromAmino(object.value); - }, - fromProtoMsg(message: DataProtoMsg): Data { - return Data.decode(message.value); - }, - toProto(message: Data): Uint8Array { - return Data.encode(message).finish(); - }, - toProtoMsg(message: Data): DataProtoMsg { - return { - typeUrl: "/tendermint.types.Data", - value: Data.encode(message).finish() - }; - } -}; -function createBaseVote(): Vote { - return { - type: 0, - height: BigInt(0), - round: 0, - blockId: BlockID.fromPartial({}), - timestamp: new Date(), - validatorAddress: new Uint8Array(), - validatorIndex: 0, - signature: new Uint8Array() - }; -} -export const Vote = { - typeUrl: "/tendermint.types.Vote", - encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== BigInt(0)) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim(); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(50).bytes(message.validatorAddress); - } - if (message.validatorIndex !== 0) { - writer.uint32(56).int32(message.validatorIndex); - } - if (message.signature.length !== 0) { - writer.uint32(66).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Vote { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 6: - message.validatorAddress = reader.bytes(); - break; - case 7: - message.validatorIndex = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Vote { - return { - type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : -1, - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - round: isSet(object.round) ? Number(object.round) : 0, - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined, - validatorAddress: isSet(object.validatorAddress) ? bytesFromBase64(object.validatorAddress) : new Uint8Array(), - validatorIndex: isSet(object.validatorIndex) ? Number(object.validatorIndex) : 0, - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array() - }; - }, - toJSON(message: Vote): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.round !== undefined && (obj.round = Math.round(message.round)); - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - message.validatorAddress !== undefined && (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined ? message.validatorAddress : new Uint8Array())); - message.validatorIndex !== undefined && (obj.validatorIndex = Math.round(message.validatorIndex)); - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): Vote { - const message = createBaseVote(); - message.type = object.type ?? 0; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.round = object.round ?? 0; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.timestamp = object.timestamp ?? undefined; - message.validatorAddress = object.validatorAddress ?? new Uint8Array(); - message.validatorIndex = object.validatorIndex ?? 0; - message.signature = object.signature ?? new Uint8Array(); - return message; - }, - fromSDK(object: VoteSDKType): Vote { - return { - type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : -1, - height: object?.height, - round: object?.round, - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - timestamp: object.timestamp ?? undefined, - validatorAddress: object?.validator_address, - validatorIndex: object?.validator_index, - signature: object?.signature - }; - }, - toSDK(message: Vote): VoteSDKType { - const obj: any = {}; - message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type)); - obj.height = message.height; - obj.round = message.round; - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - obj.validator_address = message.validatorAddress; - obj.validator_index = message.validatorIndex; - obj.signature = message.signature; - return obj; - }, - fromAmino(object: VoteAmino): Vote { - return { - type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : -1, - height: BigInt(object.height), - round: object.round, - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - timestamp: object.timestamp, - validatorAddress: object.validator_address, - validatorIndex: object.validator_index, - signature: object.signature - }; - }, - toAmino(message: Vote): VoteAmino { - const obj: any = {}; - obj.type = message.type; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - obj.timestamp = message.timestamp; - obj.validator_address = message.validatorAddress; - obj.validator_index = message.validatorIndex; - obj.signature = message.signature; - return obj; - }, - fromAminoMsg(object: VoteAminoMsg): Vote { - return Vote.fromAmino(object.value); - }, - fromProtoMsg(message: VoteProtoMsg): Vote { - return Vote.decode(message.value); - }, - toProto(message: Vote): Uint8Array { - return Vote.encode(message).finish(); - }, - toProtoMsg(message: Vote): VoteProtoMsg { - return { - typeUrl: "/tendermint.types.Vote", - value: Vote.encode(message).finish() - }; - } -}; -function createBaseCommit(): Commit { - return { - height: BigInt(0), - round: 0, - blockId: BlockID.fromPartial({}), - signatures: [] - }; -} -export const Commit = { - typeUrl: "/tendermint.types.Commit", - encode(message: Commit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.height !== BigInt(0)) { - writer.uint32(8).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(16).int32(message.round); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.signatures) { - CommitSig.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Commit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommit(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 4: - message.signatures.push(CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Commit { - return { - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - round: isSet(object.round) ? Number(object.round) : 0, - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => CommitSig.fromJSON(e)) : [] - }; - }, - toJSON(message: Commit): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.round !== undefined && (obj.round = Math.round(message.round)); - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? CommitSig.toJSON(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromPartial(object: DeepPartial): Commit { - const message = createBaseCommit(); - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.round = object.round ?? 0; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.signatures = object.signatures?.map(e => CommitSig.fromPartial(e)) || []; - return message; - }, - fromSDK(object: CommitSDKType): Commit { - return { - height: object?.height, - round: object?.round, - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => CommitSig.fromSDK(e)) : [] - }; - }, - toSDK(message: Commit): CommitSDKType { - const obj: any = {}; - obj.height = message.height; - obj.round = message.round; - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? CommitSig.toSDK(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromAmino(object: CommitAmino): Commit { - return { - height: BigInt(object.height), - round: object.round, - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => CommitSig.fromAmino(e)) : [] - }; - }, - toAmino(message: Commit): CommitAmino { - const obj: any = {}; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - if (message.signatures) { - obj.signatures = message.signatures.map(e => e ? CommitSig.toAmino(e) : undefined); - } else { - obj.signatures = []; - } - return obj; - }, - fromAminoMsg(object: CommitAminoMsg): Commit { - return Commit.fromAmino(object.value); - }, - fromProtoMsg(message: CommitProtoMsg): Commit { - return Commit.decode(message.value); - }, - toProto(message: Commit): Uint8Array { - return Commit.encode(message).finish(); - }, - toProtoMsg(message: Commit): CommitProtoMsg { - return { - typeUrl: "/tendermint.types.Commit", - value: Commit.encode(message).finish() - }; - } -}; -function createBaseCommitSig(): CommitSig { - return { - blockIdFlag: 0, - validatorAddress: new Uint8Array(), - timestamp: new Date(), - signature: new Uint8Array() - }; -} -export const CommitSig = { - typeUrl: "/tendermint.types.CommitSig", - encode(message: CommitSig, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockIdFlag !== 0) { - writer.uint32(8).int32(message.blockIdFlag); - } - if (message.validatorAddress.length !== 0) { - writer.uint32(18).bytes(message.validatorAddress); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(34).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): CommitSig { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommitSig(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockIdFlag = (reader.int32() as any); - break; - case 2: - message.validatorAddress = reader.bytes(); - break; - case 3: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): CommitSig { - return { - blockIdFlag: isSet(object.blockIdFlag) ? blockIDFlagFromJSON(object.blockIdFlag) : -1, - validatorAddress: isSet(object.validatorAddress) ? bytesFromBase64(object.validatorAddress) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined, - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array() - }; - }, - toJSON(message: CommitSig): unknown { - const obj: any = {}; - message.blockIdFlag !== undefined && (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag)); - message.validatorAddress !== undefined && (obj.validatorAddress = base64FromBytes(message.validatorAddress !== undefined ? message.validatorAddress : new Uint8Array())); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): CommitSig { - const message = createBaseCommitSig(); - message.blockIdFlag = object.blockIdFlag ?? 0; - message.validatorAddress = object.validatorAddress ?? new Uint8Array(); - message.timestamp = object.timestamp ?? undefined; - message.signature = object.signature ?? new Uint8Array(); - return message; - }, - fromSDK(object: CommitSigSDKType): CommitSig { - return { - blockIdFlag: isSet(object.block_id_flag) ? blockIDFlagFromJSON(object.block_id_flag) : -1, - validatorAddress: object?.validator_address, - timestamp: object.timestamp ?? undefined, - signature: object?.signature - }; - }, - toSDK(message: CommitSig): CommitSigSDKType { - const obj: any = {}; - message.blockIdFlag !== undefined && (obj.block_id_flag = blockIDFlagToJSON(message.blockIdFlag)); - obj.validator_address = message.validatorAddress; - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - obj.signature = message.signature; - return obj; - }, - fromAmino(object: CommitSigAmino): CommitSig { - return { - blockIdFlag: isSet(object.block_id_flag) ? blockIDFlagFromJSON(object.block_id_flag) : -1, - validatorAddress: object.validator_address, - timestamp: object.timestamp, - signature: object.signature - }; - }, - toAmino(message: CommitSig): CommitSigAmino { - const obj: any = {}; - obj.block_id_flag = message.blockIdFlag; - obj.validator_address = message.validatorAddress; - obj.timestamp = message.timestamp; - obj.signature = message.signature; - return obj; - }, - fromAminoMsg(object: CommitSigAminoMsg): CommitSig { - return CommitSig.fromAmino(object.value); - }, - fromProtoMsg(message: CommitSigProtoMsg): CommitSig { - return CommitSig.decode(message.value); - }, - toProto(message: CommitSig): Uint8Array { - return CommitSig.encode(message).finish(); - }, - toProtoMsg(message: CommitSig): CommitSigProtoMsg { - return { - typeUrl: "/tendermint.types.CommitSig", - value: CommitSig.encode(message).finish() - }; - } -}; -function createBaseProposal(): Proposal { - return { - type: 0, - height: BigInt(0), - round: 0, - polRound: 0, - blockId: BlockID.fromPartial({}), - timestamp: new Date(), - signature: new Uint8Array() - }; -} -export const Proposal = { - typeUrl: "/tendermint.types.Proposal", - encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.height !== BigInt(0)) { - writer.uint32(16).int64(message.height); - } - if (message.round !== 0) { - writer.uint32(24).int32(message.round); - } - if (message.polRound !== 0) { - writer.uint32(32).int32(message.polRound); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim(); - } - if (message.timestamp !== undefined) { - Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); - } - if (message.signature.length !== 0) { - writer.uint32(58).bytes(message.signature); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Proposal { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = (reader.int32() as any); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.polRound = reader.int32(); - break; - case 5: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Proposal { - return { - type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : -1, - height: isSet(object.height) ? BigInt(object.height.toString()) : BigInt(0), - round: isSet(object.round) ? Number(object.round) : 0, - polRound: isSet(object.polRound) ? Number(object.polRound) : 0, - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - timestamp: isSet(object.timestamp) ? new Date(object.timestamp) : undefined, - signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array() - }; - }, - toJSON(message: Proposal): unknown { - const obj: any = {}; - message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type)); - message.height !== undefined && (obj.height = (message.height || BigInt(0)).toString()); - message.round !== undefined && (obj.round = Math.round(message.round)); - message.polRound !== undefined && (obj.polRound = Math.round(message.polRound)); - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString()); - message.signature !== undefined && (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array())); - return obj; - }, - fromPartial(object: DeepPartial): Proposal { - const message = createBaseProposal(); - message.type = object.type ?? 0; - message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0); - message.round = object.round ?? 0; - message.polRound = object.polRound ?? 0; - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.timestamp = object.timestamp ?? undefined; - message.signature = object.signature ?? new Uint8Array(); - return message; - }, - fromSDK(object: ProposalSDKType): Proposal { - return { - type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : -1, - height: object?.height, - round: object?.round, - polRound: object?.pol_round, - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - timestamp: object.timestamp ?? undefined, - signature: object?.signature - }; - }, - toSDK(message: Proposal): ProposalSDKType { - const obj: any = {}; - message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type)); - obj.height = message.height; - obj.round = message.round; - obj.pol_round = message.polRound; - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - message.timestamp !== undefined && (obj.timestamp = message.timestamp ?? undefined); - obj.signature = message.signature; - return obj; - }, - fromAmino(object: ProposalAmino): Proposal { - return { - type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : -1, - height: BigInt(object.height), - round: object.round, - polRound: object.pol_round, - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - timestamp: object.timestamp, - signature: object.signature - }; - }, - toAmino(message: Proposal): ProposalAmino { - const obj: any = {}; - obj.type = message.type; - obj.height = message.height ? message.height.toString() : undefined; - obj.round = message.round; - obj.pol_round = message.polRound; - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - obj.timestamp = message.timestamp; - obj.signature = message.signature; - return obj; - }, - fromAminoMsg(object: ProposalAminoMsg): Proposal { - return Proposal.fromAmino(object.value); - }, - fromProtoMsg(message: ProposalProtoMsg): Proposal { - return Proposal.decode(message.value); - }, - toProto(message: Proposal): Uint8Array { - return Proposal.encode(message).finish(); - }, - toProtoMsg(message: Proposal): ProposalProtoMsg { - return { - typeUrl: "/tendermint.types.Proposal", - value: Proposal.encode(message).finish() - }; - } -}; -function createBaseSignedHeader(): SignedHeader { - return { - header: Header.fromPartial({}), - commit: Commit.fromPartial({}) - }; -} -export const SignedHeader = { - typeUrl: "/tendermint.types.SignedHeader", - encode(message: SignedHeader, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(10).fork()).ldelim(); - } - if (message.commit !== undefined) { - Commit.encode(message.commit, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SignedHeader { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSignedHeader(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SignedHeader { - return { - header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - commit: isSet(object.commit) ? Commit.fromJSON(object.commit) : undefined - }; - }, - toJSON(message: SignedHeader): unknown { - const obj: any = {}; - message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.commit !== undefined && (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): SignedHeader { - const message = createBaseSignedHeader(); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.commit = object.commit !== undefined && object.commit !== null ? Commit.fromPartial(object.commit) : undefined; - return message; - }, - fromSDK(object: SignedHeaderSDKType): SignedHeader { - return { - header: object.header ? Header.fromSDK(object.header) : undefined, - commit: object.commit ? Commit.fromSDK(object.commit) : undefined - }; - }, - toSDK(message: SignedHeader): SignedHeaderSDKType { - const obj: any = {}; - message.header !== undefined && (obj.header = message.header ? Header.toSDK(message.header) : undefined); - message.commit !== undefined && (obj.commit = message.commit ? Commit.toSDK(message.commit) : undefined); - return obj; - }, - fromAmino(object: SignedHeaderAmino): SignedHeader { - return { - header: object?.header ? Header.fromAmino(object.header) : undefined, - commit: object?.commit ? Commit.fromAmino(object.commit) : undefined - }; - }, - toAmino(message: SignedHeader): SignedHeaderAmino { - const obj: any = {}; - obj.header = message.header ? Header.toAmino(message.header) : undefined; - obj.commit = message.commit ? Commit.toAmino(message.commit) : undefined; - return obj; - }, - fromAminoMsg(object: SignedHeaderAminoMsg): SignedHeader { - return SignedHeader.fromAmino(object.value); - }, - fromProtoMsg(message: SignedHeaderProtoMsg): SignedHeader { - return SignedHeader.decode(message.value); - }, - toProto(message: SignedHeader): Uint8Array { - return SignedHeader.encode(message).finish(); - }, - toProtoMsg(message: SignedHeader): SignedHeaderProtoMsg { - return { - typeUrl: "/tendermint.types.SignedHeader", - value: SignedHeader.encode(message).finish() - }; - } -}; -function createBaseLightBlock(): LightBlock { - return { - signedHeader: SignedHeader.fromPartial({}), - validatorSet: ValidatorSet.fromPartial({}) - }; -} -export const LightBlock = { - typeUrl: "/tendermint.types.LightBlock", - encode(message: LightBlock, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.signedHeader !== undefined) { - SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim(); - } - if (message.validatorSet !== undefined) { - ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): LightBlock { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLightBlock(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signedHeader = SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validatorSet = ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): LightBlock { - return { - signedHeader: isSet(object.signedHeader) ? SignedHeader.fromJSON(object.signedHeader) : undefined, - validatorSet: isSet(object.validatorSet) ? ValidatorSet.fromJSON(object.validatorSet) : undefined - }; - }, - toJSON(message: LightBlock): unknown { - const obj: any = {}; - message.signedHeader !== undefined && (obj.signedHeader = message.signedHeader ? SignedHeader.toJSON(message.signedHeader) : undefined); - message.validatorSet !== undefined && (obj.validatorSet = message.validatorSet ? ValidatorSet.toJSON(message.validatorSet) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): LightBlock { - const message = createBaseLightBlock(); - message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null ? SignedHeader.fromPartial(object.signedHeader) : undefined; - message.validatorSet = object.validatorSet !== undefined && object.validatorSet !== null ? ValidatorSet.fromPartial(object.validatorSet) : undefined; - return message; - }, - fromSDK(object: LightBlockSDKType): LightBlock { - return { - signedHeader: object.signed_header ? SignedHeader.fromSDK(object.signed_header) : undefined, - validatorSet: object.validator_set ? ValidatorSet.fromSDK(object.validator_set) : undefined - }; - }, - toSDK(message: LightBlock): LightBlockSDKType { - const obj: any = {}; - message.signedHeader !== undefined && (obj.signed_header = message.signedHeader ? SignedHeader.toSDK(message.signedHeader) : undefined); - message.validatorSet !== undefined && (obj.validator_set = message.validatorSet ? ValidatorSet.toSDK(message.validatorSet) : undefined); - return obj; - }, - fromAmino(object: LightBlockAmino): LightBlock { - return { - signedHeader: object?.signed_header ? SignedHeader.fromAmino(object.signed_header) : undefined, - validatorSet: object?.validator_set ? ValidatorSet.fromAmino(object.validator_set) : undefined - }; - }, - toAmino(message: LightBlock): LightBlockAmino { - const obj: any = {}; - obj.signed_header = message.signedHeader ? SignedHeader.toAmino(message.signedHeader) : undefined; - obj.validator_set = message.validatorSet ? ValidatorSet.toAmino(message.validatorSet) : undefined; - return obj; - }, - fromAminoMsg(object: LightBlockAminoMsg): LightBlock { - return LightBlock.fromAmino(object.value); - }, - fromProtoMsg(message: LightBlockProtoMsg): LightBlock { - return LightBlock.decode(message.value); - }, - toProto(message: LightBlock): Uint8Array { - return LightBlock.encode(message).finish(); - }, - toProtoMsg(message: LightBlock): LightBlockProtoMsg { - return { - typeUrl: "/tendermint.types.LightBlock", - value: LightBlock.encode(message).finish() - }; - } -}; -function createBaseBlockMeta(): BlockMeta { - return { - blockId: BlockID.fromPartial({}), - blockSize: BigInt(0), - header: Header.fromPartial({}), - numTxs: BigInt(0) - }; -} -export const BlockMeta = { - typeUrl: "/tendermint.types.BlockMeta", - encode(message: BlockMeta, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); - } - if (message.blockSize !== BigInt(0)) { - writer.uint32(16).int64(message.blockSize); - } - if (message.header !== undefined) { - Header.encode(message.header, writer.uint32(26).fork()).ldelim(); - } - if (message.numTxs !== BigInt(0)) { - writer.uint32(32).int64(message.numTxs); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): BlockMeta { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockMeta(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.blockSize = reader.int64(); - break; - case 3: - message.header = Header.decode(reader, reader.uint32()); - break; - case 4: - message.numTxs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): BlockMeta { - return { - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - blockSize: isSet(object.blockSize) ? BigInt(object.blockSize.toString()) : BigInt(0), - header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - numTxs: isSet(object.numTxs) ? BigInt(object.numTxs.toString()) : BigInt(0) - }; - }, - toJSON(message: BlockMeta): unknown { - const obj: any = {}; - message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.blockSize !== undefined && (obj.blockSize = (message.blockSize || BigInt(0)).toString()); - message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined); - message.numTxs !== undefined && (obj.numTxs = (message.numTxs || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): BlockMeta { - const message = createBaseBlockMeta(); - message.blockId = object.blockId !== undefined && object.blockId !== null ? BlockID.fromPartial(object.blockId) : undefined; - message.blockSize = object.blockSize !== undefined && object.blockSize !== null ? BigInt(object.blockSize.toString()) : BigInt(0); - message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; - message.numTxs = object.numTxs !== undefined && object.numTxs !== null ? BigInt(object.numTxs.toString()) : BigInt(0); - return message; - }, - fromSDK(object: BlockMetaSDKType): BlockMeta { - return { - blockId: object.block_id ? BlockID.fromSDK(object.block_id) : undefined, - blockSize: object?.block_size, - header: object.header ? Header.fromSDK(object.header) : undefined, - numTxs: object?.num_txs - }; - }, - toSDK(message: BlockMeta): BlockMetaSDKType { - const obj: any = {}; - message.blockId !== undefined && (obj.block_id = message.blockId ? BlockID.toSDK(message.blockId) : undefined); - obj.block_size = message.blockSize; - message.header !== undefined && (obj.header = message.header ? Header.toSDK(message.header) : undefined); - obj.num_txs = message.numTxs; - return obj; - }, - fromAmino(object: BlockMetaAmino): BlockMeta { - return { - blockId: object?.block_id ? BlockID.fromAmino(object.block_id) : undefined, - blockSize: BigInt(object.block_size), - header: object?.header ? Header.fromAmino(object.header) : undefined, - numTxs: BigInt(object.num_txs) - }; - }, - toAmino(message: BlockMeta): BlockMetaAmino { - const obj: any = {}; - obj.block_id = message.blockId ? BlockID.toAmino(message.blockId) : undefined; - obj.block_size = message.blockSize ? message.blockSize.toString() : undefined; - obj.header = message.header ? Header.toAmino(message.header) : undefined; - obj.num_txs = message.numTxs ? message.numTxs.toString() : undefined; - return obj; - }, - fromAminoMsg(object: BlockMetaAminoMsg): BlockMeta { - return BlockMeta.fromAmino(object.value); - }, - fromProtoMsg(message: BlockMetaProtoMsg): BlockMeta { - return BlockMeta.decode(message.value); - }, - toProto(message: BlockMeta): Uint8Array { - return BlockMeta.encode(message).finish(); - }, - toProtoMsg(message: BlockMeta): BlockMetaProtoMsg { - return { - typeUrl: "/tendermint.types.BlockMeta", - value: BlockMeta.encode(message).finish() - }; - } -}; -function createBaseTxProof(): TxProof { - return { - rootHash: new Uint8Array(), - data: new Uint8Array(), - proof: Proof.fromPartial({}) - }; -} -export const TxProof = { - typeUrl: "/tendermint.types.TxProof", - encode(message: TxProof, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.rootHash.length !== 0) { - writer.uint32(10).bytes(message.rootHash); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - if (message.proof !== undefined) { - Proof.encode(message.proof, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): TxProof { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTxProof(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rootHash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): TxProof { - return { - rootHash: isSet(object.rootHash) ? bytesFromBase64(object.rootHash) : new Uint8Array(), - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined - }; - }, - toJSON(message: TxProof): unknown { - const obj: any = {}; - message.rootHash !== undefined && (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array())); - message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined); - return obj; - }, - fromPartial(object: DeepPartial): TxProof { - const message = createBaseTxProof(); - message.rootHash = object.rootHash ?? new Uint8Array(); - message.data = object.data ?? new Uint8Array(); - message.proof = object.proof !== undefined && object.proof !== null ? Proof.fromPartial(object.proof) : undefined; - return message; - }, - fromSDK(object: TxProofSDKType): TxProof { - return { - rootHash: object?.root_hash, - data: object?.data, - proof: object.proof ? Proof.fromSDK(object.proof) : undefined - }; - }, - toSDK(message: TxProof): TxProofSDKType { - const obj: any = {}; - obj.root_hash = message.rootHash; - obj.data = message.data; - message.proof !== undefined && (obj.proof = message.proof ? Proof.toSDK(message.proof) : undefined); - return obj; - }, - fromAmino(object: TxProofAmino): TxProof { - return { - rootHash: object.root_hash, - data: object.data, - proof: object?.proof ? Proof.fromAmino(object.proof) : undefined - }; - }, - toAmino(message: TxProof): TxProofAmino { - const obj: any = {}; - obj.root_hash = message.rootHash; - obj.data = message.data; - obj.proof = message.proof ? Proof.toAmino(message.proof) : undefined; - return obj; - }, - fromAminoMsg(object: TxProofAminoMsg): TxProof { - return TxProof.fromAmino(object.value); - }, - fromProtoMsg(message: TxProofProtoMsg): TxProof { - return TxProof.decode(message.value); - }, - toProto(message: TxProof): Uint8Array { - return TxProof.encode(message).finish(); - }, - toProtoMsg(message: TxProof): TxProofProtoMsg { - return { - typeUrl: "/tendermint.types.TxProof", - value: TxProof.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/types/validator.ts b/examples/interchainjs/src/codegen/tendermint/types/validator.ts deleted file mode 100644 index f960a63f..00000000 --- a/examples/interchainjs/src/codegen/tendermint/types/validator.ts +++ /dev/null @@ -1,411 +0,0 @@ -import { PublicKey, PublicKeyAmino, PublicKeySDKType } from "../crypto/keys"; -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; -export interface ValidatorSet { - validators: Validator[]; - proposer: Validator | undefined; - totalVotingPower: bigint; -} -export interface ValidatorSetProtoMsg { - typeUrl: "/tendermint.types.ValidatorSet"; - value: Uint8Array; -} -export interface ValidatorSetAmino { - validators: ValidatorAmino[]; - proposer?: ValidatorAmino | undefined; - total_voting_power: string; -} -export interface ValidatorSetAminoMsg { - type: "/tendermint.types.ValidatorSet"; - value: ValidatorSetAmino; -} -export interface ValidatorSetSDKType { - validators: ValidatorSDKType[]; - proposer: ValidatorSDKType | undefined; - total_voting_power: bigint; -} -export interface Validator { - address: Uint8Array; - pubKey: PublicKey | undefined; - votingPower: bigint; - proposerPriority: bigint; -} -export interface ValidatorProtoMsg { - typeUrl: "/tendermint.types.Validator"; - value: Uint8Array; -} -export interface ValidatorAmino { - address: Uint8Array; - pub_key?: PublicKeyAmino | undefined; - voting_power: string; - proposer_priority: string; -} -export interface ValidatorAminoMsg { - type: "/tendermint.types.Validator"; - value: ValidatorAmino; -} -export interface ValidatorSDKType { - address: Uint8Array; - pub_key: PublicKeySDKType | undefined; - voting_power: bigint; - proposer_priority: bigint; -} -export interface SimpleValidator { - pubKey: PublicKey | undefined; - votingPower: bigint; -} -export interface SimpleValidatorProtoMsg { - typeUrl: "/tendermint.types.SimpleValidator"; - value: Uint8Array; -} -export interface SimpleValidatorAmino { - pub_key?: PublicKeyAmino | undefined; - voting_power: string; -} -export interface SimpleValidatorAminoMsg { - type: "/tendermint.types.SimpleValidator"; - value: SimpleValidatorAmino; -} -export interface SimpleValidatorSDKType { - pub_key: PublicKeySDKType | undefined; - voting_power: bigint; -} -function createBaseValidatorSet(): ValidatorSet { - return { - validators: [], - proposer: Validator.fromPartial({}), - totalVotingPower: BigInt(0) - }; -} -export const ValidatorSet = { - typeUrl: "/tendermint.types.ValidatorSet", - encode(message: ValidatorSet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - for (const v of message.validators) { - Validator.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.proposer !== undefined) { - Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim(); - } - if (message.totalVotingPower !== BigInt(0)) { - writer.uint32(24).int64(message.totalVotingPower); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): ValidatorSet { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidatorSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validators.push(Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = Validator.decode(reader, reader.uint32()); - break; - case 3: - message.totalVotingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): ValidatorSet { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], - proposer: isSet(object.proposer) ? Validator.fromJSON(object.proposer) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? BigInt(object.totalVotingPower.toString()) : BigInt(0) - }; - }, - toJSON(message: ValidatorSet): unknown { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined); - } else { - obj.validators = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer ? Validator.toJSON(message.proposer) : undefined); - message.totalVotingPower !== undefined && (obj.totalVotingPower = (message.totalVotingPower || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): ValidatorSet { - const message = createBaseValidatorSet(); - message.validators = object.validators?.map(e => Validator.fromPartial(e)) || []; - message.proposer = object.proposer !== undefined && object.proposer !== null ? Validator.fromPartial(object.proposer) : undefined; - message.totalVotingPower = object.totalVotingPower !== undefined && object.totalVotingPower !== null ? BigInt(object.totalVotingPower.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorSetSDKType): ValidatorSet { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromSDK(e)) : [], - proposer: object.proposer ? Validator.fromSDK(object.proposer) : undefined, - totalVotingPower: object?.total_voting_power - }; - }, - toSDK(message: ValidatorSet): ValidatorSetSDKType { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toSDK(e) : undefined); - } else { - obj.validators = []; - } - message.proposer !== undefined && (obj.proposer = message.proposer ? Validator.toSDK(message.proposer) : undefined); - obj.total_voting_power = message.totalVotingPower; - return obj; - }, - fromAmino(object: ValidatorSetAmino): ValidatorSet { - return { - validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromAmino(e)) : [], - proposer: object?.proposer ? Validator.fromAmino(object.proposer) : undefined, - totalVotingPower: BigInt(object.total_voting_power) - }; - }, - toAmino(message: ValidatorSet): ValidatorSetAmino { - const obj: any = {}; - if (message.validators) { - obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined); - } else { - obj.validators = []; - } - obj.proposer = message.proposer ? Validator.toAmino(message.proposer) : undefined; - obj.total_voting_power = message.totalVotingPower ? message.totalVotingPower.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorSetAminoMsg): ValidatorSet { - return ValidatorSet.fromAmino(object.value); - }, - fromProtoMsg(message: ValidatorSetProtoMsg): ValidatorSet { - return ValidatorSet.decode(message.value); - }, - toProto(message: ValidatorSet): Uint8Array { - return ValidatorSet.encode(message).finish(); - }, - toProtoMsg(message: ValidatorSet): ValidatorSetProtoMsg { - return { - typeUrl: "/tendermint.types.ValidatorSet", - value: ValidatorSet.encode(message).finish() - }; - } -}; -function createBaseValidator(): Validator { - return { - address: new Uint8Array(), - pubKey: PublicKey.fromPartial({}), - votingPower: BigInt(0), - proposerPriority: BigInt(0) - }; -} -export const Validator = { - typeUrl: "/tendermint.types.Validator", - encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.address.length !== 0) { - writer.uint32(10).bytes(message.address); - } - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); - } - if (message.votingPower !== BigInt(0)) { - writer.uint32(24).int64(message.votingPower); - } - if (message.proposerPriority !== BigInt(0)) { - writer.uint32(32).int64(message.proposerPriority); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Validator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.votingPower = reader.int64(); - break; - case 4: - message.proposerPriority = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Validator { - return { - address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(), - pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? BigInt(object.votingPower.toString()) : BigInt(0), - proposerPriority: isSet(object.proposerPriority) ? BigInt(object.proposerPriority.toString()) : BigInt(0) - }; - }, - toJSON(message: Validator): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array())); - message.pubKey !== undefined && (obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined); - message.votingPower !== undefined && (obj.votingPower = (message.votingPower || BigInt(0)).toString()); - message.proposerPriority !== undefined && (obj.proposerPriority = (message.proposerPriority || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Validator { - const message = createBaseValidator(); - message.address = object.address ?? new Uint8Array(); - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? PublicKey.fromPartial(object.pubKey) : undefined; - message.votingPower = object.votingPower !== undefined && object.votingPower !== null ? BigInt(object.votingPower.toString()) : BigInt(0); - message.proposerPriority = object.proposerPriority !== undefined && object.proposerPriority !== null ? BigInt(object.proposerPriority.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ValidatorSDKType): Validator { - return { - address: object?.address, - pubKey: object.pub_key ? PublicKey.fromSDK(object.pub_key) : undefined, - votingPower: object?.voting_power, - proposerPriority: object?.proposer_priority - }; - }, - toSDK(message: Validator): ValidatorSDKType { - const obj: any = {}; - obj.address = message.address; - message.pubKey !== undefined && (obj.pub_key = message.pubKey ? PublicKey.toSDK(message.pubKey) : undefined); - obj.voting_power = message.votingPower; - obj.proposer_priority = message.proposerPriority; - return obj; - }, - fromAmino(object: ValidatorAmino): Validator { - return { - address: object.address, - pubKey: object?.pub_key ? PublicKey.fromAmino(object.pub_key) : undefined, - votingPower: BigInt(object.voting_power), - proposerPriority: BigInt(object.proposer_priority) - }; - }, - toAmino(message: Validator): ValidatorAmino { - const obj: any = {}; - obj.address = message.address; - obj.pub_key = message.pubKey ? PublicKey.toAmino(message.pubKey) : undefined; - obj.voting_power = message.votingPower ? message.votingPower.toString() : undefined; - obj.proposer_priority = message.proposerPriority ? message.proposerPriority.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ValidatorAminoMsg): Validator { - return Validator.fromAmino(object.value); - }, - fromProtoMsg(message: ValidatorProtoMsg): Validator { - return Validator.decode(message.value); - }, - toProto(message: Validator): Uint8Array { - return Validator.encode(message).finish(); - }, - toProtoMsg(message: Validator): ValidatorProtoMsg { - return { - typeUrl: "/tendermint.types.Validator", - value: Validator.encode(message).finish() - }; - } -}; -function createBaseSimpleValidator(): SimpleValidator { - return { - pubKey: PublicKey.fromPartial({}), - votingPower: BigInt(0) - }; -} -export const SimpleValidator = { - typeUrl: "/tendermint.types.SimpleValidator", - encode(message: SimpleValidator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.pubKey !== undefined) { - PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); - } - if (message.votingPower !== BigInt(0)) { - writer.uint32(16).int64(message.votingPower); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): SimpleValidator { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSimpleValidator(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pubKey = PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.votingPower = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): SimpleValidator { - return { - pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? BigInt(object.votingPower.toString()) : BigInt(0) - }; - }, - toJSON(message: SimpleValidator): unknown { - const obj: any = {}; - message.pubKey !== undefined && (obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined); - message.votingPower !== undefined && (obj.votingPower = (message.votingPower || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): SimpleValidator { - const message = createBaseSimpleValidator(); - message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? PublicKey.fromPartial(object.pubKey) : undefined; - message.votingPower = object.votingPower !== undefined && object.votingPower !== null ? BigInt(object.votingPower.toString()) : BigInt(0); - return message; - }, - fromSDK(object: SimpleValidatorSDKType): SimpleValidator { - return { - pubKey: object.pub_key ? PublicKey.fromSDK(object.pub_key) : undefined, - votingPower: object?.voting_power - }; - }, - toSDK(message: SimpleValidator): SimpleValidatorSDKType { - const obj: any = {}; - message.pubKey !== undefined && (obj.pub_key = message.pubKey ? PublicKey.toSDK(message.pubKey) : undefined); - obj.voting_power = message.votingPower; - return obj; - }, - fromAmino(object: SimpleValidatorAmino): SimpleValidator { - return { - pubKey: object?.pub_key ? PublicKey.fromAmino(object.pub_key) : undefined, - votingPower: BigInt(object.voting_power) - }; - }, - toAmino(message: SimpleValidator): SimpleValidatorAmino { - const obj: any = {}; - obj.pub_key = message.pubKey ? PublicKey.toAmino(message.pubKey) : undefined; - obj.voting_power = message.votingPower ? message.votingPower.toString() : undefined; - return obj; - }, - fromAminoMsg(object: SimpleValidatorAminoMsg): SimpleValidator { - return SimpleValidator.fromAmino(object.value); - }, - fromProtoMsg(message: SimpleValidatorProtoMsg): SimpleValidator { - return SimpleValidator.decode(message.value); - }, - toProto(message: SimpleValidator): Uint8Array { - return SimpleValidator.encode(message).finish(); - }, - toProtoMsg(message: SimpleValidator): SimpleValidatorProtoMsg { - return { - typeUrl: "/tendermint.types.SimpleValidator", - value: SimpleValidator.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/tendermint/version/types.ts b/examples/interchainjs/src/codegen/tendermint/version/types.ts deleted file mode 100644 index 8fd026e7..00000000 --- a/examples/interchainjs/src/codegen/tendermint/version/types.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { BinaryReader, BinaryWriter } from "../../binary"; -import { isSet, DeepPartial } from "../../helpers"; -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface App { - protocol: bigint; - software: string; -} -export interface AppProtoMsg { - typeUrl: "/tendermint.version.App"; - value: Uint8Array; -} -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface AppAmino { - protocol: string; - software: string; -} -export interface AppAminoMsg { - type: "/tendermint.version.App"; - value: AppAmino; -} -/** - * App includes the protocol and software version for the application. - * This information is included in ResponseInfo. The App.Protocol can be - * updated in ResponseEndBlock. - */ -export interface AppSDKType { - protocol: bigint; - software: string; -} -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface Consensus { - block: bigint; - app: bigint; -} -export interface ConsensusProtoMsg { - typeUrl: "/tendermint.version.Consensus"; - value: Uint8Array; -} -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface ConsensusAmino { - block: string; - app: string; -} -export interface ConsensusAminoMsg { - type: "/tendermint.version.Consensus"; - value: ConsensusAmino; -} -/** - * Consensus captures the consensus rules for processing a block in the blockchain, - * including all blockchain data structures and the rules of the application's - * state transition machine. - */ -export interface ConsensusSDKType { - block: bigint; - app: bigint; -} -function createBaseApp(): App { - return { - protocol: BigInt(0), - software: "" - }; -} -export const App = { - typeUrl: "/tendermint.version.App", - encode(message: App, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.protocol !== BigInt(0)) { - writer.uint32(8).uint64(message.protocol); - } - if (message.software !== "") { - writer.uint32(18).string(message.software); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): App { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseApp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = reader.uint64(); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): App { - return { - protocol: isSet(object.protocol) ? BigInt(object.protocol.toString()) : BigInt(0), - software: isSet(object.software) ? String(object.software) : "" - }; - }, - toJSON(message: App): unknown { - const obj: any = {}; - message.protocol !== undefined && (obj.protocol = (message.protocol || BigInt(0)).toString()); - message.software !== undefined && (obj.software = message.software); - return obj; - }, - fromPartial(object: DeepPartial): App { - const message = createBaseApp(); - message.protocol = object.protocol !== undefined && object.protocol !== null ? BigInt(object.protocol.toString()) : BigInt(0); - message.software = object.software ?? ""; - return message; - }, - fromSDK(object: AppSDKType): App { - return { - protocol: object?.protocol, - software: object?.software - }; - }, - toSDK(message: App): AppSDKType { - const obj: any = {}; - obj.protocol = message.protocol; - obj.software = message.software; - return obj; - }, - fromAmino(object: AppAmino): App { - return { - protocol: BigInt(object.protocol), - software: object.software - }; - }, - toAmino(message: App): AppAmino { - const obj: any = {}; - obj.protocol = message.protocol ? message.protocol.toString() : undefined; - obj.software = message.software; - return obj; - }, - fromAminoMsg(object: AppAminoMsg): App { - return App.fromAmino(object.value); - }, - fromProtoMsg(message: AppProtoMsg): App { - return App.decode(message.value); - }, - toProto(message: App): Uint8Array { - return App.encode(message).finish(); - }, - toProtoMsg(message: App): AppProtoMsg { - return { - typeUrl: "/tendermint.version.App", - value: App.encode(message).finish() - }; - } -}; -function createBaseConsensus(): Consensus { - return { - block: BigInt(0), - app: BigInt(0) - }; -} -export const Consensus = { - typeUrl: "/tendermint.version.Consensus", - encode(message: Consensus, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { - if (message.block !== BigInt(0)) { - writer.uint32(8).uint64(message.block); - } - if (message.app !== BigInt(0)) { - writer.uint32(16).uint64(message.app); - } - return writer; - }, - decode(input: BinaryReader | Uint8Array, length?: number): Consensus { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensus(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = reader.uint64(); - break; - case 2: - message.app = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object: any): Consensus { - return { - block: isSet(object.block) ? BigInt(object.block.toString()) : BigInt(0), - app: isSet(object.app) ? BigInt(object.app.toString()) : BigInt(0) - }; - }, - toJSON(message: Consensus): unknown { - const obj: any = {}; - message.block !== undefined && (obj.block = (message.block || BigInt(0)).toString()); - message.app !== undefined && (obj.app = (message.app || BigInt(0)).toString()); - return obj; - }, - fromPartial(object: DeepPartial): Consensus { - const message = createBaseConsensus(); - message.block = object.block !== undefined && object.block !== null ? BigInt(object.block.toString()) : BigInt(0); - message.app = object.app !== undefined && object.app !== null ? BigInt(object.app.toString()) : BigInt(0); - return message; - }, - fromSDK(object: ConsensusSDKType): Consensus { - return { - block: object?.block, - app: object?.app - }; - }, - toSDK(message: Consensus): ConsensusSDKType { - const obj: any = {}; - obj.block = message.block; - obj.app = message.app; - return obj; - }, - fromAmino(object: ConsensusAmino): Consensus { - return { - block: BigInt(object.block), - app: BigInt(object.app) - }; - }, - toAmino(message: Consensus): ConsensusAmino { - const obj: any = {}; - obj.block = message.block ? message.block.toString() : undefined; - obj.app = message.app ? message.app.toString() : undefined; - return obj; - }, - fromAminoMsg(object: ConsensusAminoMsg): Consensus { - return Consensus.fromAmino(object.value); - }, - fromProtoMsg(message: ConsensusProtoMsg): Consensus { - return Consensus.decode(message.value); - }, - toProto(message: Consensus): Uint8Array { - return Consensus.encode(message).finish(); - }, - toProtoMsg(message: Consensus): ConsensusProtoMsg { - return { - typeUrl: "/tendermint.version.Consensus", - value: Consensus.encode(message).finish() - }; - } -}; \ No newline at end of file diff --git a/examples/interchainjs/src/codegen/utf8.ts b/examples/interchainjs/src/codegen/utf8.ts deleted file mode 100644 index 9e518f1e..00000000 --- a/examples/interchainjs/src/codegen/utf8.ts +++ /dev/null @@ -1,148 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -// Copyright (c) 2016, Daniel Wirtz All rights reserved. - -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: - -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of its author, nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. - -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"use strict"; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -export function utf8Length(str: string) { - let len = 0, - c = 0; - for (let i = 0; i < str.length; ++i) { - c = str.charCodeAt(i); - if (c < 128) len += 1; - else if (c < 2048) len += 2; - else if ( - (c & 0xfc00) === 0xd800 && - (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00 - ) { - ++i; - len += 4; - } else len += 3; - } - return len; -} - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -export function utf8Read( - buffer: ArrayLike, - start: number, - end: number -) { - const len = end - start; - if (len < 1) return ""; - const chunk = []; - let parts: string[] = [], - i = 0, // char offset - t; // temporary - while (start < end) { - t = buffer[start++]; - if (t < 128) chunk[i++] = t; - else if (t > 191 && t < 224) - chunk[i++] = ((t & 31) << 6) | (buffer[start++] & 63); - else if (t > 239 && t < 365) { - t = - (((t & 7) << 18) | - ((buffer[start++] & 63) << 12) | - ((buffer[start++] & 63) << 6) | - (buffer[start++] & 63)) - - 0x10000; - chunk[i++] = 0xd800 + (t >> 10); - chunk[i++] = 0xdc00 + (t & 1023); - } else - chunk[i++] = - ((t & 15) << 12) | - ((buffer[start++] & 63) << 6) | - (buffer[start++] & 63); - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode(...chunk)); - i = 0; - } - } - if (parts) { - if (i) parts.push(String.fromCharCode(...chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode(...chunk.slice(0, i)); -} - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -export function utf8Write( - str: string, - buffer: Uint8Array | Array, - offset: number -) { - const start = offset; - let c1, // character 1 - c2; // character 2 - for (let i = 0; i < str.length; ++i) { - c1 = str.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = (c1 >> 6) | 192; - buffer[offset++] = (c1 & 63) | 128; - } else if ( - (c1 & 0xfc00) === 0xd800 && - ((c2 = str.charCodeAt(i + 1)) & 0xfc00) === 0xdc00 - ) { - c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff); - ++i; - buffer[offset++] = (c1 >> 18) | 240; - buffer[offset++] = ((c1 >> 12) & 63) | 128; - buffer[offset++] = ((c1 >> 6) & 63) | 128; - buffer[offset++] = (c1 & 63) | 128; - } else { - buffer[offset++] = (c1 >> 12) | 224; - buffer[offset++] = ((c1 >> 6) & 63) | 128; - buffer[offset++] = (c1 & 63) | 128; - } - } - return offset - start; -} diff --git a/examples/interchainjs/src/codegen/varint.ts b/examples/interchainjs/src/codegen/varint.ts deleted file mode 100644 index ea730ab5..00000000 --- a/examples/interchainjs/src/codegen/varint.ts +++ /dev/null @@ -1,488 +0,0 @@ -/** -* This file and any referenced files were automatically generated by @cosmology/telescope@0.106.0 -* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain -* and run the transpile command or yarn proto command to regenerate this bundle. -*/ - - -// Copyright 2008 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Code generated by the Protocol Buffer compiler is owned by the owner -// of the input file used when generating it. This code is not -// standalone and requires a support library to be linked with it. This -// support library is itself covered by the above license. - - - -/** - * Read a 64 bit varint as two JS numbers. - * - * Returns tuple: - * [0]: low bits - * [1]: high bits - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175 - */ -export function varint64read(this: ReaderLike): [number, number] { - let lowBits = 0; - let highBits = 0; - - for (let shift = 0; shift < 28; shift += 7) { - let b = this.buf[this.pos++]; - lowBits |= (b & 0x7f) << shift; - if ((b & 0x80) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - - let middleByte = this.buf[this.pos++]; - - // last four bits of the first 32 bit number - lowBits |= (middleByte & 0x0f) << 28; - - // 3 upper bits are part of the next 32 bit number - highBits = (middleByte & 0x70) >> 4; - - if ((middleByte & 0x80) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - - for (let shift = 3; shift <= 31; shift += 7) { - let b = this.buf[this.pos++]; - highBits |= (b & 0x7f) << shift; - if ((b & 0x80) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - - throw new Error("invalid varint"); -} - -/** - * Write a 64 bit varint, given as two JS numbers, to the given bytes array. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344 - */ -export function varint64write(lo: number, hi: number, bytes: number[]): void { - for (let i = 0; i < 28; i = i + 7) { - const shift = lo >>> i; - const hasNext = !(shift >>> 7 == 0 && hi == 0); - const byte = (hasNext ? shift | 0x80 : shift) & 0xff; - bytes.push(byte); - if (!hasNext) { - return; - } - } - - const splitBits = ((lo >>> 28) & 0x0f) | ((hi & 0x07) << 4); - const hasMoreBits = !(hi >> 3 == 0); - bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xff); - - if (!hasMoreBits) { - return; - } - - for (let i = 3; i < 31; i = i + 7) { - const shift = hi >>> i; - const hasNext = !(shift >>> 7 == 0); - const byte = (hasNext ? shift | 0x80 : shift) & 0xff; - bytes.push(byte); - if (!hasNext) { - return; - } - } - - bytes.push((hi >>> 31) & 0x01); -} - -// constants for binary math -const TWO_PWR_32_DBL = 0x100000000; - -/** - * Parse decimal string of 64 bit integer value as two JS numbers. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10 - */ -export function int64FromString(dec: string): { lo: number; hi: number } { - // Check for minus sign. - const minus = dec[0] === "-"; - if (minus) { - dec = dec.slice(1); - } - - // Work 6 decimal digits at a time, acting like we're converting base 1e6 - // digits to binary. This is safe to do with floating point math because - // Number.isSafeInteger(ALL_32_BITS * 1e6) == true. - const base = 1e6; - let lowBits = 0; - let highBits = 0; - - function add1e6digit(begin: number, end?: number) { - // Note: Number('') is 0. - const digit1e6 = Number(dec.slice(begin, end)); - highBits *= base; - lowBits = lowBits * base + digit1e6; - // Carry bits from lowBits to - if (lowBits >= TWO_PWR_32_DBL) { - highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0); - lowBits = lowBits % TWO_PWR_32_DBL; - } - } - - add1e6digit(-24, -18); - add1e6digit(-18, -12); - add1e6digit(-12, -6); - add1e6digit(-6); - return minus ? negate(lowBits, highBits) : newBits(lowBits, highBits); -} - -/** - * Losslessly converts a 64-bit signed integer in 32:32 split representation - * into a decimal string. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10 - */ -export function int64ToString(lo: number, hi: number): string { - let bits = newBits(lo, hi); - // If we're treating the input as a signed value and the high bit is set, do - // a manual two's complement conversion before the decimal conversion. - const negative = bits.hi & 0x80000000; - if (negative) { - bits = negate(bits.lo, bits.hi); - } - const result = uInt64ToString(bits.lo, bits.hi); - return negative ? "-" + result : result; -} - -/** - * Losslessly converts a 64-bit unsigned integer in 32:32 split representation - * into a decimal string. - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10 - */ -export function uInt64ToString(lo: number, hi: number): string { - ({ lo, hi } = toUnsigned(lo, hi)); - // Skip the expensive conversion if the number is small enough to use the - // built-in conversions. - // Number.MAX_SAFE_INTEGER = 0x001FFFFF FFFFFFFF, thus any number with - // highBits <= 0x1FFFFF can be safely expressed with a double and retain - // integer precision. - // Proven by: Number.isSafeInteger(0x1FFFFF * 2**32 + 0xFFFFFFFF) == true. - if (hi <= 0x1fffff) { - return String(TWO_PWR_32_DBL * hi + lo); - } - - // What this code is doing is essentially converting the input number from - // base-2 to base-1e7, which allows us to represent the 64-bit range with - // only 3 (very large) digits. Those digits are then trivial to convert to - // a base-10 string. - - // The magic numbers used here are - - // 2^24 = 16777216 = (1,6777216) in base-1e7. - // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7. - - // Split 32:32 representation into 16:24:24 representation so our - // intermediate digits don't overflow. - const low = lo & 0xffffff; - const mid = ((lo >>> 24) | (hi << 8)) & 0xffffff; - const high = (hi >> 16) & 0xffff; - - // Assemble our three base-1e7 digits, ignoring carries. The maximum - // value in a digit at this step is representable as a 48-bit integer, which - // can be stored in a 64-bit floating point number. - let digitA = low + mid * 6777216 + high * 6710656; - let digitB = mid + high * 8147497; - let digitC = high * 2; - - // Apply carries from A to B and from B to C. - const base = 10000000; - if (digitA >= base) { - digitB += Math.floor(digitA / base); - digitA %= base; - } - - if (digitB >= base) { - digitC += Math.floor(digitB / base); - digitB %= base; - } - - // If digitC is 0, then we should have returned in the trivial code path - // at the top for non-safe integers. Given this, we can assume both digitB - // and digitA need leading zeros. - return ( - digitC.toString() + - decimalFrom1e7WithLeadingZeros(digitB) + - decimalFrom1e7WithLeadingZeros(digitA) - ); -} - -function toUnsigned(lo: number, hi: number): { lo: number; hi: number } { - return { lo: lo >>> 0, hi: hi >>> 0 }; -} - -function newBits(lo: number, hi: number): { lo: number; hi: number } { - return { lo: lo | 0, hi: hi | 0 }; -} - -/** - * Returns two's compliment negation of input. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Signed_32-bit_integers - */ -function negate(lowBits: number, highBits: number) { - highBits = ~highBits; - if (lowBits) { - lowBits = ~lowBits + 1; - } else { - // If lowBits is 0, then bitwise-not is 0xFFFFFFFF, - // adding 1 to that, results in 0x100000000, which leaves - // the low bits 0x0 and simply adds one to the high bits. - highBits += 1; - } - return newBits(lowBits, highBits); -} - -/** - * Returns decimal representation of digit1e7 with leading zeros. - */ -const decimalFrom1e7WithLeadingZeros = (digit1e7: number) => { - const partial = String(digit1e7); - return "0000000".slice(partial.length) + partial; -}; - -/** - * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)` - * - * Copyright 2008 Google Inc. All rights reserved. - * - * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144 - */ -export function varint32write(value: number, bytes: number[]): void { - if (value >= 0) { - // write value as varint 32 - while (value > 0x7f) { - bytes.push((value & 0x7f) | 0x80); - value = value >>> 7; - } - bytes.push(value); - } else { - for (let i = 0; i < 9; i++) { - bytes.push((value & 127) | 128); - value = value >> 7; - } - bytes.push(1); - } -} - -/** - * Read an unsigned 32 bit varint. - * - * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220 - */ -export function varint32read(this: ReaderLike): number { - let b = this.buf[this.pos++]; - let result = b & 0x7f; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - b = this.buf[this.pos++]; - result |= (b & 0x7f) << 7; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - b = this.buf[this.pos++]; - result |= (b & 0x7f) << 14; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - b = this.buf[this.pos++]; - result |= (b & 0x7f) << 21; - if ((b & 0x80) == 0) { - this.assertBounds(); - return result; - } - - // Extract only last 4 bits - b = this.buf[this.pos++]; - result |= (b & 0x0f) << 28; - - for (let readBytes = 5; (b & 0x80) !== 0 && readBytes < 10; readBytes++) - b = this.buf[this.pos++]; - - if ((b & 0x80) != 0) throw new Error("invalid varint"); - - this.assertBounds(); - - // Result can have 32 bits, convert it to unsigned - return result >>> 0; -} - -type ReaderLike = { - buf: Uint8Array; - pos: number; - len: number; - assertBounds(): void; -}; - -/** - * encode zig zag - */ -export function zzEncode(lo: number, hi: number) { - let mask = hi >> 31; - hi = (((hi << 1) | (lo >>> 31)) ^ mask) >>> 0; - lo = ((lo << 1) ^ mask) >>> 0; - return [lo, hi]; -} - -/** - * decode zig zag - */ -export function zzDecode(lo: number, hi: number) { - let mask = -(lo & 1); - lo = (((lo >>> 1) | (hi << 31)) ^ mask) >>> 0; - hi = ((hi >>> 1) ^ mask) >>> 0; - return [lo, hi]; -} - -/** - * unsigned int32 without moving pos. - */ -export function readUInt32(buf: Uint8Array, pos: number) { - return ( - (buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) + - buf[pos + 3] * 0x1000000 - ); -} - -/** - * signed int32 without moving pos. - */ -export function readInt32(buf: Uint8Array, pos: number) { - return ( - (buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) + - (buf[pos + 3] << 24) - ); -} - -/** - * writing varint32 to pos - */ -export function writeVarint32( - val: number, - buf: Uint8Array | number[], - pos: number -) { - while (val > 127) { - buf[pos++] = (val & 127) | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * writing varint64 to pos - */ -export function writeVarint64( - val: { lo: number; hi: number }, - buf: Uint8Array | number[], - pos: number -) { - while (val.hi) { - buf[pos++] = (val.lo & 127) | 128; - val.lo = ((val.lo >>> 7) | (val.hi << 25)) >>> 0; - val.hi >>>= 7; - } - while (val.lo > 127) { - buf[pos++] = (val.lo & 127) | 128; - val.lo = val.lo >>> 7; - } - buf[pos++] = val.lo; -} - -export function int64Length(lo: number, hi: number) { - let part0 = lo, - part1 = ((lo >>> 28) | (hi << 4)) >>> 0, - part2 = hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 - ? 1 - : 2 - : part0 < 2097152 - ? 3 - : 4 - : part1 < 16384 - ? part1 < 128 - ? 5 - : 6 - : part1 < 2097152 - ? 7 - : 8 - : part2 < 128 - ? 9 - : 10; -} - -export function writeFixed32( - val: number, - buf: Uint8Array | number[], - pos: number -) { - buf[pos] = val & 255; - buf[pos + 1] = (val >>> 8) & 255; - buf[pos + 2] = (val >>> 16) & 255; - buf[pos + 3] = val >>> 24; -} - -export function writeByte( - val: number, - buf: Uint8Array | number[], - pos: number -) { - buf[pos] = val & 255; -} diff --git a/examples/interchainjs/styles/Home.module.css b/examples/interchainjs/styles/Home.module.css deleted file mode 100644 index e7136f43..00000000 --- a/examples/interchainjs/styles/Home.module.css +++ /dev/null @@ -1,25 +0,0 @@ -.container { - padding: 0 2rem; -} - -.footer { - display: flex; - flex: 1; - padding: 2rem 0; - border-top: 1px solid #eaeaea; - justify-content: center; - align-items: center; -} - -.footer a { - display: flex; - justify-content: center; - align-items: center; - flex-grow: 1; -} - -@media (prefers-color-scheme: dark) { - .footer { - border-color: #222; - } -} \ No newline at end of file diff --git a/examples/interchainjs/styles/globals.css b/examples/interchainjs/styles/globals.css deleted file mode 100644 index 4f184216..00000000 --- a/examples/interchainjs/styles/globals.css +++ /dev/null @@ -1,26 +0,0 @@ -html, -body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; -} - -a { - color: inherit; - text-decoration: none; -} - -* { - box-sizing: border-box; -} - -@media (prefers-color-scheme: dark) { - html { - color-scheme: dark; - } - body { - color: white; - background: black; - } -} diff --git a/examples/interchainjs/tsconfig.json b/examples/interchainjs/tsconfig.json deleted file mode 100644 index e68bd5ae..00000000 --- a/examples/interchainjs/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/examples/interchainjs/utils.ts b/examples/interchainjs/utils.ts deleted file mode 100644 index 83e05bd1..00000000 --- a/examples/interchainjs/utils.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { WalletStatus } from "./components"; -import { CosmosWalletStatus } from "@cosmos-kit/types"; - -export const mapStatusFromCosmosWallet = (status: CosmosWalletStatus, error?: Error): WalletStatus => { - switch (status) { - case CosmosWalletStatus.Uninitialized || CosmosWalletStatus.Disconnected: - return WalletStatus.NotInit; - case CosmosWalletStatus.Connecting - || CosmosWalletStatus.ChoosingWallet - || CosmosWalletStatus.PendingWalletConnect - || CosmosWalletStatus.EnablingWallet: - return WalletStatus.Loading; - case CosmosWalletStatus.Connected: - return WalletStatus.Loaded; - case CosmosWalletStatus.Errored: - if (error && error.message === 'Request rejected') { - return WalletStatus.NotInit; - } else { - return WalletStatus.Rejected; - } - default: - return WalletStatus.NotInit; - } -} \ No newline at end of file diff --git a/examples/interchainjs/utils/liquidity/apr.ts b/examples/interchainjs/utils/liquidity/apr.ts deleted file mode 100644 index afd7d11f..00000000 --- a/examples/interchainjs/utils/liquidity/apr.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { CalcPoolAprsParams } from './types'; -import { Duration } from '../../src/codegen/google/protobuf/duration'; -import { - getSymbolForDenom, - calcPoolLiquidity, - getExponentByDenom, - dollarValueToDenomUnits, -} from './pool'; -import BigNumber from 'bignumber.js'; - -const DAYS_PER_YEAR = 365; -const YEARLY_PERCENT = DAYS_PER_YEAR * 100; - -const convertLockup = (lockup: string, durations: Duration[]) => { - switch (lockup) { - case '1': - return durations[0].seconds; - case '7': - return durations[1].seconds; - case '14': - return durations[2].seconds; - default: - return durations[2].seconds; - } -}; - -export const calcPoolAprs = ({ - activeGauges, - pool, - prices, - superfluidPools, - aprSuperfluid, - lockupDurations, - volume7d, - swapFee, - lockup = '14', - includeNonPerpetual = true, -}: CalcPoolAprsParams) => { - const hasAssetsPrices = pool.poolAssets.every((asset) => - Boolean(prices[asset.token!.denom]) - ); - if (!hasAssetsPrices) { - for (const asset of pool.poolAssets) { - if (!prices[asset.token!.denom]) { - console.log('price not found:', asset.token!.denom); - } - } - return { totalApr: '0' }; - } - - // superfluid staking apr - const isSuperfluidPool = superfluidPools.some( - (sfPool) => sfPool.denom === pool.totalShares?.denom - ); - const superfluidApr = - isSuperfluidPool && lockup === '14' ? aprSuperfluid : null; - - const liquidity = calcPoolLiquidity(pool, prices); - - // gauge aprs - const lockupDuration = convertLockup(lockup, lockupDurations); - const gauges = activeGauges.filter((gauge) => { - const isGaugeActive = - gauge.coins.length > 0 && - !new BigNumber(gauge.coins[0].amount) - .minus(gauge.distributedCoins[0].amount) - .isLessThan(100); - return ( - gauge.distributeTo?.duration?.seconds === lockupDuration && - (includeNonPerpetual || gauge.isPerpetual) && - isGaugeActive - ); - }); - const gaugeAprs = gauges.map((gauge) => { - const tokensRemaining = new BigNumber(gauge.coins[0].amount).minus( - gauge.distributedCoins[0].amount - ); - const symbol = getSymbolForDenom(gauge.coins[0].denom); - const daysRemaining = gauge.isPerpetual - ? 1 - : gauge.numEpochsPaidOver - gauge.filledEpochs; - - const totalValue = tokensRemaining - .shiftedBy(-getExponentByDenom(gauge.coins[0].denom)) - .multipliedBy(prices[gauge.coins[0].denom]); - - const distributedValuePerDay = totalValue - .dividedBy(gauge.isPerpetual ? 1 : Number( daysRemaining )) - .toString(); - - const distributedCoinPerDay = { - amount: dollarValueToDenomUnits(prices, symbol, distributedValuePerDay), - denom: gauge.coins[0].denom, - }; - - const apr = totalValue - .dividedBy(gauge.isPerpetual ? 1 : Number( daysRemaining )) - .dividedBy(liquidity) - .multipliedBy(YEARLY_PERCENT) - .toString(); - - return { - apr, - symbol, - daysRemaining, - distributedCoinPerDay, - isPerpetual: gauge.isPerpetual, - }; - }); - - // fees apr - // 7d avg trading vol * swap fee - const swapFeeValuePerDay = new BigNumber(volume7d) - .dividedBy(7) - .multipliedBy(swapFee); - const swapFeeApr = { - swapFeeValuePerDay: swapFeeValuePerDay.toString(), - apr: swapFeeValuePerDay - .dividedBy(liquidity) - .multipliedBy(YEARLY_PERCENT) - .toString(), - }; - - // total apr - const totalApr = [ - superfluidApr, - swapFeeApr.apr, - ...gaugeAprs.map(({ apr }) => apr), - ] - .filter(Boolean) - .reduce((prev, cur) => prev.plus(Number(cur)), new BigNumber(0)) - .toString(); - - return { - totalApr, - superfluidApr, - gaugeAprs, - swapFeeApr, - }; -}; diff --git a/examples/interchainjs/utils/liquidity/index.ts b/examples/interchainjs/utils/liquidity/index.ts deleted file mode 100644 index 08ed7833..00000000 --- a/examples/interchainjs/utils/liquidity/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./apr"; -export * from "./pool"; diff --git a/examples/interchainjs/utils/liquidity/pool.ts b/examples/interchainjs/utils/liquidity/pool.ts deleted file mode 100644 index 79d2ae99..00000000 --- a/examples/interchainjs/utils/liquidity/pool.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { asset_list, assets } from '@chain-registry/osmosis'; -import { Asset as OsmosisAsset } from '@chain-registry/types'; -import { Pool } from '../../src/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; -import { Coin } from 'osmojs/types/codegen/cosmos/base/v1beta1/coin'; -import { - CoinGeckoToken, - CoinDenom, - Exponent, - CoinSymbol, - PriceHash, - CoinGeckoUSDResponse, - CoinValue, - PoolPretty, - CoinBalance, - PoolAssetPretty, -} from './types'; -import BigNumber from 'bignumber.js'; - -export const osmosisAssets: OsmosisAsset[] = [ - ...assets.assets, - ...asset_list.assets, -]; - -export const getOsmoAssetByDenom = (denom: CoinDenom): OsmosisAsset => { - return osmosisAssets.find((asset) => asset.base === denom) as OsmosisAsset; -}; - -export const getDenomForCoinGeckoId = ( - coinGeckoId: CoinGeckoToken -): CoinDenom => { - return osmosisAssets.find((asset) => asset.coingecko_id === coinGeckoId).base; -}; - -export const getSymbolForDenom = (denom: CoinDenom): CoinSymbol => { - const asset = getOsmoAssetByDenom(denom); - const symbol = asset.symbol; - return symbol; -}; - -export const getExponentByDenom = (denom: CoinDenom): Exponent => { - const asset = getOsmoAssetByDenom(denom); - const unit = asset.denom_units.find(({ denom }) => denom === asset.display); - return unit?.exponent || 0; -}; - -export const convertGeckoPricesToDenomPriceHash = ( - prices: CoinGeckoUSDResponse -): PriceHash => { - return Object.keys(prices).reduce((res, geckoId) => { - const denom = getDenomForCoinGeckoId(geckoId); - res[denom] = prices[geckoId].usd; - return res; - }, {}); -}; - -export const calcPoolLiquidity = (pool: Pool, prices: PriceHash): string => { - return pool.poolAssets - .reduce((res, { token }) => { - const liquidity = new BigNumber(token.amount) - .shiftedBy(-getExponentByDenom(token.denom)) - .multipliedBy(prices[token.denom]); - return res.plus(liquidity); - }, new BigNumber(0)) - .toString(); -}; - -export const getPoolByGammName = (pools: Pool[], gammId: string): Pool => { - return pools.find(({ totalShares: { denom } }) => denom === gammId); -}; - -export const convertGammTokenToDollarValue = ( - coin: Coin, - pool: Pool, - prices: PriceHash -): string => { - const { amount } = coin; - const liquidity = calcPoolLiquidity(pool, prices); - - return new BigNumber(liquidity) - .multipliedBy(amount) - .dividedBy(pool.totalShares!.amount) - .toString(); -}; - -export const convertDollarValueToCoins = ( - value: string | number, - pool: Pool, - prices: PriceHash -): CoinValue[] => { - const tokens = pool.poolAssets.map(({ token: { denom }, weight }) => { - const ratio = new BigNumber(weight).dividedBy(pool.totalWeight); - const valueByRatio = new BigNumber(value).multipliedBy(ratio); - const displayAmount = valueByRatio.dividedBy(prices[denom]).toString(); - const amount = new BigNumber(displayAmount) - .shiftedBy(getExponentByDenom(denom)) - .toString(); - const symbol = getSymbolForDenom(denom); - - return { - denom, - symbol, - amount, - displayAmount, - value: valueByRatio.toString(), - }; - }); - return tokens; -}; - -export const convertDollarValueToShares = ( - value: string | number, - pool: Pool, - prices: PriceHash -) => { - const liquidity = calcPoolLiquidity(pool, prices); - - return new BigNumber(value) - .multipliedBy(pool.totalShares.amount) - .dividedBy(liquidity) - .shiftedBy(-18) - .toString(); -}; - -const assetHashMap = osmosisAssets.reduce((res, asset) => { - return { ...res, [asset.base]: asset }; -}, {}); - -export const prettyPool = ( - pool: Pool, - { includeDetails = false } = {} -): PoolPretty => { - const totalWeight = new BigNumber(pool.totalWeight); - const tokens = pool.poolAssets.map(({ token, weight }) => { - const asset = assetHashMap?.[token.denom]; - const symbol = asset?.symbol ?? token.denom; - const ratio = new BigNumber(weight).dividedBy(totalWeight).toString(); - const obj = { - symbol, - denom: token.denom, - amount: token.amount, - ratio, - info: undefined, - }; - if (includeDetails) { - obj.info = asset; - } - return obj; - }); - const value = { - nickname: tokens.map((t) => t.symbol).join('/'), - images: undefined, - }; - if (includeDetails) { - value.images = tokens - .map((t) => { - const imgs = t?.info?.logo_URIs; - if (imgs) { - return { - token: t.symbol, - images: imgs, - }; - } - }) - .filter(Boolean); - } - return { - ...value, - ...pool, - poolAssetsPretty: tokens, - }; -}; - -export const getOsmoDenomForSymbol = (token: CoinSymbol): CoinDenom => { - const asset = osmosisAssets.find(({ symbol }) => symbol === token); - const base = asset?.base; - if (!base) { - console.log(`cannot find base for token ${token}`); - return null; - } - return base; -}; - -export const noDecimals = (num: number | string) => { - return new BigNumber(num).decimalPlaces(0, BigNumber.ROUND_DOWN).toString(); -}; - -export const baseUnitsToDollarValue = ( - prices: PriceHash, - symbol: string, - amount: string | number -) => { - const denom = getOsmoDenomForSymbol(symbol); - return new BigNumber(amount) - .shiftedBy(-getExponentByDenom(denom)) - .multipliedBy(prices[denom]) - .toString(); -}; - -export const dollarValueToDenomUnits = ( - prices: PriceHash, - symbol: string, - value: string | number -) => { - const denom = getOsmoDenomForSymbol(symbol); - return new BigNumber(value) - .dividedBy(prices[denom]) - .shiftedBy(getExponentByDenom(denom)) - .toString(); -}; - -export const baseUnitsToDisplayUnits = ( - symbol: string, - amount: string | number -) => { - const denom = getOsmoDenomForSymbol(symbol); - return new BigNumber(amount).shiftedBy(-getExponentByDenom(denom)).toString(); -}; - -export const calcCoinsNeededForValue = ( - prices: PriceHash, - poolInfo: PoolPretty, - value: string | number -) => { - const val = new BigNumber(value); - const coinsNeeded = poolInfo.poolAssetsPretty.map( - ({ symbol, amount, denom, ratio }) => { - const valueByRatio = val.multipliedBy(ratio).toString(); - const amountNeeded = dollarValueToDenomUnits( - prices, - symbol, - valueByRatio - ); - const unitRatio = new BigNumber(amountNeeded) - .dividedBy(amount) - .toString(); - - return { - denom: denom, - symbol: symbol, - amount: noDecimals(amountNeeded), - shareTotalValue: valueByRatio, - displayAmount: baseUnitsToDisplayUnits(symbol, amountNeeded), - totalDollarValue: baseUnitsToDollarValue(prices, symbol, amount), - unitRatio, - }; - } - ); - return coinsNeeded; -}; - -export const getCoinBalance = ( - prices: PriceHash, - balances: Coin[], - prettyAsset: PoolAssetPretty -): CoinBalance => { - const coinBalance = balances.find((coin) => coin.denom == prettyAsset.denom); - - if (!coinBalance || !coinBalance.amount) { - // console.log({ coinBalance }); - // throw new Error("not enough " + prettyAsset.symbol); - return { ...coinBalance, displayValue: 0 }; - } - - const displayValue = baseUnitsToDollarValue( - prices, - prettyAsset.symbol, - coinBalance.amount - ); - - return { ...coinBalance, displayValue }; -}; - -export const calcMaxCoinsForPool = ( - prices: PriceHash, - poolInfo: PoolPretty, - balances: Coin[] -) => { - const smallestTotalDollarValue = poolInfo.poolAssetsPretty - .map((prettyAsset) => { - const { displayValue } = getCoinBalance(prices, balances, prettyAsset); - return new BigNumber(displayValue).dividedBy(prettyAsset.ratio); - }) - .sort((a, b) => a.minus(b).toNumber())[0] - .toString(); - - const coinsNeeded = poolInfo.poolAssetsPretty.map((asset) => { - const coinValue = new BigNumber(smallestTotalDollarValue) - .multipliedBy(asset.ratio) - .toString(); - const amount = dollarValueToDenomUnits(prices, asset.symbol, coinValue); - - return { - denom: asset.denom, - amount: noDecimals(amount), - }; - }); - - return coinsNeeded; -}; - -export const calcShareOutAmount = ( - poolInfo: Pool, - coinsNeeded: Coin[] -): string => { - return poolInfo.poolAssets - .map(({ token }, i) => { - const tokenInAmount = new BigNumber(coinsNeeded[i].amount); - const totalShare = new BigNumber(poolInfo.totalShares.amount); - const totalShareExp = totalShare.shiftedBy(-18); - const poolAssetAmount = new BigNumber(token.amount); - - return tokenInAmount - .multipliedBy(totalShareExp) - .dividedBy(poolAssetAmount) - .shiftedBy(18) - .decimalPlaces(0, BigNumber.ROUND_HALF_UP) - .toString(); - }) - .sort((a, b) => (new BigNumber(a).lt(b) ? -1 : 1))[0]; -}; diff --git a/examples/interchainjs/utils/liquidity/types.ts b/examples/interchainjs/utils/liquidity/types.ts deleted file mode 100644 index 1b89be4a..00000000 --- a/examples/interchainjs/utils/liquidity/types.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { AssetDenomUnit } from "@chain-registry/types"; -import { Pool } from "../../src/codegen/osmosis/gamm/pool-models/balancer/balancerPool"; -import { Coin } from "../../src/codegen/cosmos/base/v1beta1/coin"; -import { SuperfluidAsset } from "../../src/codegen/osmosis/superfluid/superfluid"; -import { Gauge } from "../../src/codegen/osmosis/incentives/gauge"; -import { Duration } from "../../src/codegen/google/protobuf/duration"; - -export type CoinDenom = AssetDenomUnit["denom"]; - -export type Exponent = AssetDenomUnit["exponent"]; - -export interface PriceHash { - [key: CoinDenom]: number; -} - -export interface CoinGeckoUSD { - usd: number; -} - -export type CoinSymbol = string; - -export type CoinGeckoToken = string; - -export type CoinGeckoUSDResponse = Record; - -export interface CoinValue { - amount: string; - denom: CoinDenom; - displayAmount: string; - value: string; - symbol: CoinSymbol; -} - -export type CoinBalance = Coin & { displayValue: string | number }; - -export interface Scenario { - token: CoinBalance; - ratio: string; - symbol: string; - amount: string; - enoughCoinsExist: boolean; - totalDollarValue?: string; -} - -export interface Scenarios { - [key: string]: Scenario[]; -} - -export interface PoolAssetPretty { - symbol: any; - denom: string; - amount: string; - ratio: string; - info: any; -} - -export interface PoolTokenImage { - token: CoinSymbol; - images: { - png: string; - svg: string; - }; -} - -export interface PoolPretty extends Pool { - nickname: string; - images: PoolTokenImage[] | null; - poolAssetsPretty: PoolAssetPretty[]; -} - -export interface CalcPoolAprsParams { - activeGauges: Gauge[]; - pool: Pool; - prices: PriceHash; - superfluidPools: SuperfluidAsset[]; - aprSuperfluid: string | number; - lockupDurations: Duration[]; - volume7d: string | number; - swapFee: string | number; - lockup?: string; - includeNonPerpetual?: boolean; -} diff --git a/examples/interchainjs/yarn.lock b/examples/interchainjs/yarn.lock deleted file mode 100644 index 12e41679..00000000 --- a/examples/interchainjs/yarn.lock +++ /dev/null @@ -1,17774 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"@adraffy/ens-normalize@npm:1.10.1": - version: 1.10.1 - resolution: "@adraffy/ens-normalize@npm:1.10.1" - checksum: 10c0/fdd647604e8fac6204921888aaf5a6bc65eabf0d2921bc5f93b64d01f4bc33ead167c1445f7de05468d05cd92ac31b74c68d2be840c62b79d73693308f885c06 - languageName: node - linkType: hard - -"@ampproject/remapping@npm:^2.1.0, @ampproject/remapping@npm:^2.2.0": - version: 2.3.0 - resolution: "@ampproject/remapping@npm:2.3.0" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/81d63cca5443e0f0c72ae18b544cc28c7c0ec2cea46e7cb888bb0e0f411a1191d0d6b7af798d54e30777d8d1488b2ec0732aac2be342d3d7d3ffd271c6f489ed - languageName: node - linkType: hard - -"@apidevtools/json-schema-ref-parser@npm:9.0.9": - version: 9.0.9 - resolution: "@apidevtools/json-schema-ref-parser@npm:9.0.9" - dependencies: - "@jsdevtools/ono": "npm:^7.1.3" - "@types/json-schema": "npm:^7.0.6" - call-me-maybe: "npm:^1.0.1" - js-yaml: "npm:^4.1.0" - checksum: 10c0/d1457e57ca12abcd3da25b9a2cb2982267102c65aefeaf284a3321b818090b9032d6b7a3ad9625abc00d07f5b1432d643f79aa6f515c1a787523d40563ef85e4 - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/code-frame@npm:7.24.7" - dependencies: - "@babel/highlight": "npm:^7.24.7" - picocolors: "npm:^1.0.0" - checksum: 10c0/ab0af539473a9f5aeaac7047e377cb4f4edd255a81d84a76058595f8540784cc3fbe8acf73f1e073981104562490aabfb23008cd66dc677a456a4ed5390fdde6 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.17.10, @babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.18.8, @babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.21.4, @babel/compat-data@npm:^7.25.2": - version: 7.25.4 - resolution: "@babel/compat-data@npm:7.25.4" - checksum: 10c0/50d79734d584a28c69d6f5b99adfaa064d0f41609a378aef04eb06accc5b44f8520e68549eba3a082478180957b7d5783f1bfb1672e4ae8574e797ce8bae79fa - languageName: node - linkType: hard - -"@babel/core@npm:7.18.10": - version: 7.18.10 - resolution: "@babel/core@npm:7.18.10" - dependencies: - "@ampproject/remapping": "npm:^2.1.0" - "@babel/code-frame": "npm:^7.18.6" - "@babel/generator": "npm:^7.18.10" - "@babel/helper-compilation-targets": "npm:^7.18.9" - "@babel/helper-module-transforms": "npm:^7.18.9" - "@babel/helpers": "npm:^7.18.9" - "@babel/parser": "npm:^7.18.10" - "@babel/template": "npm:^7.18.10" - "@babel/traverse": "npm:^7.18.10" - "@babel/types": "npm:^7.18.10" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.1" - semver: "npm:^6.3.0" - checksum: 10c0/94f749fb8bb844f5c5324513cac23edf781e24c15645a513eb54afc0e2f71d8c15c02e61f216a79f0f997deafc062b7c54bf2ebf31a2f62d0dd12bcbbc15dc97 - languageName: node - linkType: hard - -"@babel/core@npm:7.18.5": - version: 7.18.5 - resolution: "@babel/core@npm:7.18.5" - dependencies: - "@ampproject/remapping": "npm:^2.1.0" - "@babel/code-frame": "npm:^7.16.7" - "@babel/generator": "npm:^7.18.2" - "@babel/helper-compilation-targets": "npm:^7.18.2" - "@babel/helper-module-transforms": "npm:^7.18.0" - "@babel/helpers": "npm:^7.18.2" - "@babel/parser": "npm:^7.18.5" - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.18.5" - "@babel/types": "npm:^7.18.4" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.1" - semver: "npm:^6.3.0" - checksum: 10c0/03ab6eaf18d3e44e1fd6c1a41c60b13e3046919125c45554a32e416d812d6576d44cd0ee626dd7c166d6c3b6808264e7145e6cdc08ebab612d167527768078a1 - languageName: node - linkType: hard - -"@babel/core@npm:7.21.4": - version: 7.21.4 - resolution: "@babel/core@npm:7.21.4" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.21.4" - "@babel/generator": "npm:^7.21.4" - "@babel/helper-compilation-targets": "npm:^7.21.4" - "@babel/helper-module-transforms": "npm:^7.21.2" - "@babel/helpers": "npm:^7.21.0" - "@babel/parser": "npm:^7.21.4" - "@babel/template": "npm:^7.20.7" - "@babel/traverse": "npm:^7.21.4" - "@babel/types": "npm:^7.21.4" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.2" - semver: "npm:^6.3.0" - checksum: 10c0/0987cf87f277eb19c410ef3a03f9377efec40005a5dd2a67ddd0a5f6f429c9d88fefba25206ccf3378c93814b4c9c06a236bf8fcd3ed6ef1c8089fefaa76af24 - languageName: node - linkType: hard - -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3": - version: 7.25.2 - resolution: "@babel/core@npm:7.25.2" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.25.0" - "@babel/helper-compilation-targets": "npm:^7.25.2" - "@babel/helper-module-transforms": "npm:^7.25.2" - "@babel/helpers": "npm:^7.25.0" - "@babel/parser": "npm:^7.25.0" - "@babel/template": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.2" - "@babel/types": "npm:^7.25.2" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10c0/a425fa40e73cb72b6464063a57c478bc2de9dbcc19c280f1b55a3d88b35d572e87e8594e7d7b4880331addb6faef641bbeb701b91b41b8806cd4deae5d74f401 - languageName: node - linkType: hard - -"@babel/generator@npm:7.18.12": - version: 7.18.12 - resolution: "@babel/generator@npm:7.18.12" - dependencies: - "@babel/types": "npm:^7.18.10" - "@jridgewell/gen-mapping": "npm:^0.3.2" - jsesc: "npm:^2.5.1" - checksum: 10c0/0a81453f3d6f458b6eeac046cb47b897674ea12ac7c72068faed1762aedade2290fbd139fcb605c4ea8386014aa87a0c96e609d8c469b434ab5923189e075ad1 - languageName: node - linkType: hard - -"@babel/generator@npm:7.18.2": - version: 7.18.2 - resolution: "@babel/generator@npm:7.18.2" - dependencies: - "@babel/types": "npm:^7.18.2" - "@jridgewell/gen-mapping": "npm:^0.3.0" - jsesc: "npm:^2.5.1" - checksum: 10c0/96d8ddf60091ca7cb43df251451c8a56383f32ce02bcb26503d9b2c703922ccd8a993936a9d6798dede4f5e2a0c939f383abb888d27d6c5dca27afd323dc85f8 - languageName: node - linkType: hard - -"@babel/generator@npm:7.21.4": - version: 7.21.4 - resolution: "@babel/generator@npm:7.21.4" - dependencies: - "@babel/types": "npm:^7.21.4" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10c0/0eb142a5ca8a978981c11de9e0ab033659f7110bc21cd14eaeb80977835b895c3a97e5a1807a2f6e79003682141057f00b4bd5f69fe998b4cf99bf989c361277 - languageName: node - linkType: hard - -"@babel/generator@npm:^7.18.10, @babel/generator@npm:^7.21.4, @babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.4": - version: 7.25.5 - resolution: "@babel/generator@npm:7.25.5" - dependencies: - "@babel/types": "npm:^7.25.4" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/eb8af30c39476e4f4d6b953f355fcf092258291f78d65fb759b7d5e5e6fd521b5bfee64a4e2e4290279f0dcd25ccf8c49a61807828b99b5830d2b734506da1fd - languageName: node - linkType: hard - -"@babel/generator@npm:^7.18.2, @babel/generator@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/generator@npm:7.25.6" - dependencies: - "@babel/types": "npm:^7.25.6" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/f89282cce4ddc63654470b98086994d219407d025497f483eb03ba102086e11e2b685b27122f6ff2e1d93b5b5fa0c3a6b7e974fbf2e4a75b685041a746a4291e - languageName: node - linkType: hard - -"@babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/4679f7df4dffd5b3e26083ae65228116c3da34c3fff2c11ae11b259a61baec440f51e30fd236f7a0435b9d471acd93d0bc5a95df8213cbf02b1e083503d81b9a - languageName: node - linkType: hard - -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10c0/0ed84abf848c79fb1cd4c1ddac12c771d32c1904d87fc3087f33cfdeb0c2e0db4e7892b74b407d9d8d0c000044f3645a7391a781f788da8410c290bb123a1f13 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.17.10, @babel/helper-compilation-targets@npm:^7.17.7, @babel/helper-compilation-targets@npm:^7.18.2, @babel/helper-compilation-targets@npm:^7.18.9, @babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.21.4, @babel/helper-compilation-targets@npm:^7.24.8, @babel/helper-compilation-targets@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/helper-compilation-targets@npm:7.25.2" - dependencies: - "@babel/compat-data": "npm:^7.25.2" - "@babel/helper-validator-option": "npm:^7.24.8" - browserslist: "npm:^4.23.1" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10c0/de10e986b5322c9f807350467dc845ec59df9e596a5926a3b5edbb4710d8e3b8009d4396690e70b88c3844fe8ec4042d61436dd4b92d1f5f75655cf43ab07e99 - languageName: node - linkType: hard - -"@babel/helper-create-class-features-plugin@npm:^7.17.12, @babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.25.0": - version: 7.25.4 - resolution: "@babel/helper-create-class-features-plugin@npm:7.25.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.8" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.25.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.4" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/a765d9e0482e13cf96642fa8aa28e6f7d4d7d39f37840d6246e5e10a7c47f47c52d52522edd3073f229449d17ec0db6f9b7b5e398bff6bb0b4994d65957a164c - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.24.7": - version: 7.25.2 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.2" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/85a7e3639c118856fb1113f54fb7e3bf7698171ddfd0cd6fccccd5426b3727bc1434fe7f69090441dcde327feef9de917e00d35e47ab820047057518dd675317 - languageName: node - linkType: hard - -"@babel/helper-define-polyfill-provider@npm:^0.3.1, @babel/helper-define-polyfill-provider@npm:^0.3.2, @babel/helper-define-polyfill-provider@npm:^0.3.3": - version: 0.3.3 - resolution: "@babel/helper-define-polyfill-provider@npm:0.3.3" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.17.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - semver: "npm:^6.1.2" - peerDependencies: - "@babel/core": ^7.4.0-0 - checksum: 10c0/c3668f9ee2b76bfc08398756c504a8823e18bad05d0c2ee039b821c839e2b70f3b6ad8b7a3d3a6be434d981ed2af845a490aafecc50eaefb9b5099f2da156527 - languageName: node - linkType: hard - -"@babel/helper-environment-visitor@npm:^7.18.2, @babel/helper-environment-visitor@npm:^7.18.9": - version: 7.24.7 - resolution: "@babel/helper-environment-visitor@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/36ece78882b5960e2d26abf13cf15ff5689bf7c325b10a2895a74a499e712de0d305f8d78bb382dd3c05cfba7e47ec98fe28aab5674243e0625cd38438dd0b2d - languageName: node - linkType: hard - -"@babel/helper-function-name@npm:^7.17.9, @babel/helper-function-name@npm:^7.18.9, @babel/helper-function-name@npm:^7.21.0": - version: 7.24.7 - resolution: "@babel/helper-function-name@npm:7.24.7" - dependencies: - "@babel/template": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10c0/e5e41e6cf86bd0f8bf272cbb6e7c5ee0f3e9660414174435a46653efba4f2479ce03ce04abff2aa2ef9359cf057c79c06cb7b134a565ad9c0e8a50dcdc3b43c4 - languageName: node - linkType: hard - -"@babel/helper-hoist-variables@npm:^7.16.7, @babel/helper-hoist-variables@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/helper-hoist-variables@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/19ee37563bbd1219f9d98991ad0e9abef77803ee5945fd85aa7aa62a67c69efca9a801696a1b58dda27f211e878b3327789e6fd2a6f6c725ccefe36774b5ce95 - languageName: node - linkType: hard - -"@babel/helper-member-expression-to-functions@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-member-expression-to-functions@npm:7.24.8" - dependencies: - "@babel/traverse": "npm:^7.24.8" - "@babel/types": "npm:^7.24.8" - checksum: 10c0/7e14a5acc91f6cd26305a4441b82eb6f616bd70b096a4d2099a968f16b26d50207eec0b9ebfc466fefd62bd91587ac3be878117cdfec819b7151911183cb0e5a - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.18.6, @babel/helper-module-imports@npm:^7.21.4, @babel/helper-module-imports@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-module-imports@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10c0/97c57db6c3eeaea31564286e328a9fb52b0313c5cfcc7eee4bc226aebcf0418ea5b6fe78673c0e4a774512ec6c86e309d0f326e99d2b37bfc16a25a032498af0 - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.18.0, @babel/helper-module-transforms@npm:^7.18.9, @babel/helper-module-transforms@npm:^7.21.2, @babel/helper-module-transforms@npm:^7.24.7, @babel/helper-module-transforms@npm:^7.24.8, @babel/helper-module-transforms@npm:^7.25.0, @babel/helper-module-transforms@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/helper-module-transforms@npm:7.25.2" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-simple-access": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.2" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/adaa15970ace0aee5934b5a633789b5795b6229c6a9cf3e09a7e80aa33e478675eee807006a862aa9aa517935d81f88a6db8a9f5936e3a2a40ec75f8062bc329 - languageName: node - linkType: hard - -"@babel/helper-optimise-call-expression@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/ca6a9884705dea5c95a8b3ce132d1e3f2ae951ff74987d400d1d9c215dae9c0f9e29924d8f8e131e116533d182675bc261927be72f6a9a2968eaeeaa51eb1d0f - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.17.12, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.24.8 - resolution: "@babel/helper-plugin-utils@npm:7.24.8" - checksum: 10c0/0376037f94a3bfe6b820a39f81220ac04f243eaee7193774b983e956c1750883ff236b30785795abbcda43fac3ece74750566830c2daa4d6e3870bb0dff34c2d - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.24.7": - version: 7.25.0 - resolution: "@babel/helper-remap-async-to-generator@npm:7.25.0" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-wrap-function": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/0d17b5f7bb6a607edc9cc62fff8056dd9f341bf2f919884f97b99170d143022a5e7ae57922c4891e4fc360ad291e708d2f8cd8989f1d3cd7a17600159984f5a6 - languageName: node - linkType: hard - -"@babel/helper-replace-supers@npm:^7.24.7, @babel/helper-replace-supers@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helper-replace-supers@npm:7.25.0" - dependencies: - "@babel/helper-member-expression-to-functions": "npm:^7.24.8" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/b4b6650ab3d56c39a259367cd97f8df2f21c9cebb3716fea7bca40a150f8847bfb82f481e98927c7c6579b48a977b5a8f77318a1c6aeb497f41ecd6dbc3fdfef - languageName: node - linkType: hard - -"@babel/helper-simple-access@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-simple-access@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10c0/7230e419d59a85f93153415100a5faff23c133d7442c19e0cd070da1784d13cd29096ee6c5a5761065c44e8164f9f80e3a518c41a0256df39e38f7ad6744fed7 - languageName: node - linkType: hard - -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10c0/e3a9b8ac9c262ac976a1bcb5fe59694db5e6f0b4f9e7bdba5c7693b8b5e28113c23bdaa60fe8d3ec32a337091b67720b2053bcb3d5655f5406536c3d0584242b - languageName: node - linkType: hard - -"@babel/helper-split-export-declaration@npm:^7.16.7, @babel/helper-split-export-declaration@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/helper-split-export-declaration@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/0254577d7086bf09b01bbde98f731d4fcf4b7c3fa9634fdb87929801307c1f6202a1352e3faa5492450fa8da4420542d44de604daf540704ff349594a78184f6 - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.18.10, @babel/helper-string-parser@npm:^7.19.4, @babel/helper-string-parser@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-string-parser@npm:7.24.8" - checksum: 10c0/6361f72076c17fabf305e252bf6d580106429014b3ab3c1f5c4eb3e6d465536ea6b670cc0e9a637a77a9ad40454d3e41361a2909e70e305116a23d68ce094c08 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.19.1, @babel/helper-validator-identifier@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-validator-identifier@npm:7.24.7" - checksum: 10c0/87ad608694c9477814093ed5b5c080c2e06d44cb1924ae8320474a74415241223cc2a725eea2640dd783ff1e3390e5f95eede978bc540e870053152e58f1d651 - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.18.6, @babel/helper-validator-option@npm:^7.21.0, @babel/helper-validator-option@npm:^7.24.7, @babel/helper-validator-option@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-validator-option@npm:7.24.8" - checksum: 10c0/73db93a34ae89201351288bee7623eed81a54000779462a986105b54ffe82069e764afd15171a428b82e7c7a9b5fec10b5d5603b216317a414062edf5c67a21f - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helper-wrap-function@npm:7.25.0" - dependencies: - "@babel/template": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.0" - "@babel/types": "npm:^7.25.0" - checksum: 10c0/d54601a98384c191cbc1ff07b03a19e288ef8d5c6bfafe270b2a303d96e7304eb296002921ed464cc1b105a547d1db146eb86b0be617924dee1ba1b379cdc216 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.18.2": - version: 7.25.6 - resolution: "@babel/helpers@npm:7.25.6" - dependencies: - "@babel/template": "npm:^7.25.0" - "@babel/types": "npm:^7.25.6" - checksum: 10c0/448c1cdabccca42fd97a252f73f1e4bcd93776dbf24044f3b4f49b756bf2ece73ee6df05177473bb74ea7456dddd18d6f481e4d96d2cc7839d078900d48c696c - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.18.9, @babel/helpers@npm:^7.21.0, @babel/helpers@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helpers@npm:7.25.0" - dependencies: - "@babel/template": "npm:^7.25.0" - "@babel/types": "npm:^7.25.0" - checksum: 10c0/b7fe007fc4194268abf70aa3810365085e290e6528dcb9fbbf7a765d43c74b6369ce0f99c5ccd2d44c413853099daa449c9a0123f0b212ac8d18643f2e8174b8 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/highlight@npm:7.24.7" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.7" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/674334c571d2bb9d1c89bdd87566383f59231e16bcdcf5bb7835babdf03c9ae585ca0887a7b25bdf78f303984af028df52831c7989fecebb5101cc132da9393a - languageName: node - linkType: hard - -"@babel/parser@npm:7.18.11": - version: 7.18.11 - resolution: "@babel/parser@npm:7.18.11" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/babaa1a445681102f9d5e6dfae5155720eefe60e0b4f2623aa1a9454252e6ea840b5bce0e1f07fb880bf0a3f604d4b6220cf368a09dd6b77b462f9e2cb618e15 - languageName: node - linkType: hard - -"@babel/parser@npm:7.18.5": - version: 7.18.5 - resolution: "@babel/parser@npm:7.18.5" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/01af90216d4a530870434b87e51694375e60734a823ba70c927f4d7baee654a6e9041c73027a1677b98fe31ab6e910ec572774c33eca618e938e2623731eb1b2 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.11, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/parser@npm:7.25.4" - dependencies: - "@babel/types": "npm:^7.25.4" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/bdada5662f15d1df11a7266ec3bc9bb769bf3637ecf3d051eafcfc8f576dcf5a3ac1007c5e059db4a1e1387db9ae9caad239fc4f79e4c2200930ed610e779993 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.18.5, @babel/parser@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/parser@npm:7.25.6" - dependencies: - "@babel/types": "npm:^7.25.6" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/f88a0e895dbb096fd37c4527ea97d12b5fc013720602580a941ac3a339698872f0c911e318c292b184c36b5fbe23b612f05aff9d24071bc847c7b1c21552c41d - languageName: node - linkType: hard - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.17.12, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.18.6": - version: 7.25.0 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/ed1ce1c90cac46c01825339fd0f2a96fa071b016fb819d8dfaf8e96300eae30e74870cb47e4dc80d4ce2fb287869f102878b4f3b35bc927fec8b1d0d76bcf612 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.17.12, @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.18.9, @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.20.7": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10c0/aeb6e7aa363a47f815cf956ea1053c5dd8b786a17799f065c9688ba4b0051fe7565d258bbe9400bfcbfb3114cb9fda66983e10afe4d750bc70ff75403e15dd36 - languageName: node - linkType: hard - -"@babel/plugin-proposal-async-generator-functions@npm:^7.17.12, @babel/plugin-proposal-async-generator-functions@npm:^7.18.10, @babel/plugin-proposal-async-generator-functions@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.18.9" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/helper-remap-async-to-generator": "npm:^7.18.9" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0f4bc01805704ae4840536acc9888c50a32250e9188d025063bd17fe77ed171a12361c3dc83ce99664dcd73aec612accb8da95b0d8b825c854931b2860c0bfb5 - languageName: node - linkType: hard - -"@babel/plugin-proposal-class-properties@npm:7.17.12": - version: 7.17.12 - resolution: "@babel/plugin-proposal-class-properties@npm:7.17.12" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.17.12" - "@babel/helper-plugin-utils": "npm:^7.17.12" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/82b0d8be55729644b079414c7ba33a14e628449801ef8c466a374180c6b52400e4d312d50b953e6dda793edb442b9fcab5141eff98e26254f201ae0d208f56fb - languageName: node - linkType: hard - -"@babel/plugin-proposal-class-properties@npm:7.18.6, @babel/plugin-proposal-class-properties@npm:^7.17.12, @babel/plugin-proposal-class-properties@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d5172ac6c9948cdfc387e94f3493ad86cb04035cf7433f86b5d358270b1b9752dc25e176db0c5d65892a246aca7bdb4636672e15626d7a7de4bc0bd0040168d9 - languageName: node - linkType: hard - -"@babel/plugin-proposal-class-static-block@npm:^7.18.0, @babel/plugin-proposal-class-static-block@npm:^7.18.6, @babel/plugin-proposal-class-static-block@npm:^7.21.0": - version: 7.21.0 - resolution: "@babel/plugin-proposal-class-static-block@npm:7.21.0" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.21.0" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10c0/b46eb08badd7943c7bdf06fa6f1bb171e00f26d3c25e912205f735ccc321d1dbe8d023d97491320017e0e5d083b7aab3104f5a661535597d278a6c833c97eb79 - languageName: node - linkType: hard - -"@babel/plugin-proposal-dynamic-import@npm:^7.16.7, @babel/plugin-proposal-dynamic-import@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-dynamic-import@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/99be9865edfd65a46afb97d877ea247a8e881b4d0246a1ea0adf6db04c92f4f0959bd2f6f706d73248a2a7167c34f2464c4863137ddb94deadc5c7cc8bfc3e72 - languageName: node - linkType: hard - -"@babel/plugin-proposal-export-default-from@npm:7.17.12": - version: 7.17.12 - resolution: "@babel/plugin-proposal-export-default-from@npm:7.17.12" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.17.12" - "@babel/plugin-syntax-export-default-from": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/baba27fb307104580d317a62421377e63ec5e1c1133761285dc49187717e6a33aaf09ca4c04c912c345714a89a282c1716fe3dfc10aa39f39f14a8ca7ce9b2b8 - languageName: node - linkType: hard - -"@babel/plugin-proposal-export-default-from@npm:7.18.10": - version: 7.18.10 - resolution: "@babel/plugin-proposal-export-default-from@npm:7.18.10" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.9" - "@babel/plugin-syntax-export-default-from": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/9ac33f8784e7a6ad0e74dabc5f45ff3aff06b57154e83f3e7fa867c45653820ec4796bf87af886bfebbf4d0762fa9efa8bfa03f7485710bbdca1c595bf698a58 - languageName: node - linkType: hard - -"@babel/plugin-proposal-export-namespace-from@npm:^7.17.12, @babel/plugin-proposal-export-namespace-from@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-proposal-export-namespace-from@npm:7.18.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.9" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b90346bd3628ebd44138d0628a5aba1e6b11748893fb48e87008cac30f3bc7cd3161362e49433156737350318174164436357a66fbbfdbe952606b460bd8a0e4 - languageName: node - linkType: hard - -"@babel/plugin-proposal-json-strings@npm:^7.17.12, @babel/plugin-proposal-json-strings@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-json-strings@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/83f2ce41262a538ee43450044b9b0de320002473e4849421a7318c0500f9b0385c03d228f1be777ad71fd358aef13392e3551f0be52b5c423b0c34f7c9e5a06d - languageName: node - linkType: hard - -"@babel/plugin-proposal-logical-assignment-operators@npm:^7.17.12, @babel/plugin-proposal-logical-assignment-operators@npm:^7.18.9, @babel/plugin-proposal-logical-assignment-operators@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/plugin-proposal-logical-assignment-operators@npm:7.20.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/436c1ee9f983813fc52788980a7231414351bd34d80b16b83bddb09115386292fe4912cc6d172304eabbaf0c4813625331b9b5bc798acb0e8925cf0d2b394d4d - languageName: node - linkType: hard - -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.17.12, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f6629158196ee9f16295d16db75825092ef543f8b98f4dfdd516e642a0430c7b1d69319ee676d35485d9b86a53ade6de0b883490d44de6d4336d38cdeccbe0bf - languageName: node - linkType: hard - -"@babel/plugin-proposal-numeric-separator@npm:^7.16.7, @babel/plugin-proposal-numeric-separator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a83a65c6ec0d2293d830e9db61406d246f22d8ea03583d68460cb1b6330c6699320acce1b45f66ba3c357830720e49267e3d99f95088be457c66e6450fbfe3fa - languageName: node - linkType: hard - -"@babel/plugin-proposal-object-rest-spread@npm:7.18.0": - version: 7.18.0 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.18.0" - dependencies: - "@babel/compat-data": "npm:^7.17.10" - "@babel/helper-compilation-targets": "npm:^7.17.10" - "@babel/helper-plugin-utils": "npm:^7.17.12" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.17.12" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/18a44662434bbed0011c3cecdb9f3d0b2e549b8ff20532d50aa2eca467ce4caedb110c91a90814da4ded55631de444e94eee5bb3f28bf86fa1326a331942d60e - languageName: node - linkType: hard - -"@babel/plugin-proposal-object-rest-spread@npm:7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.18.9" - dependencies: - "@babel/compat-data": "npm:^7.18.8" - "@babel/helper-compilation-targets": "npm:^7.18.9" - "@babel/helper-plugin-utils": "npm:^7.18.9" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.18.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8e58aa40511897256f98dc558003ce3dd41073e30a9a63045eae1d5f4d9a599f5931670e19f3be62099b92be9381ccfa698c261101180dab2c257f23bde89e48 - languageName: node - linkType: hard - -"@babel/plugin-proposal-object-rest-spread@npm:7.20.7, @babel/plugin-proposal-object-rest-spread@npm:^7.18.0, @babel/plugin-proposal-object-rest-spread@npm:^7.18.9, @babel/plugin-proposal-object-rest-spread@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" - dependencies: - "@babel/compat-data": "npm:^7.20.5" - "@babel/helper-compilation-targets": "npm:^7.20.7" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.20.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b9818749bb49d8095df64c45db682448d04743d96722984cbfd375733b2585c26d807f84b4fdb28474f2d614be6a6ffe3d96ffb121840e9e5345b2ccc0438bd8 - languageName: node - linkType: hard - -"@babel/plugin-proposal-optional-catch-binding@npm:^7.16.7, @babel/plugin-proposal-optional-catch-binding@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ab20153d9e95e0b73004fdf86b6a2d219be2a0ace9ca76cd9eccddb680c913fec173bca54d761b1bc6044edde0a53811f3e515908c3b16d2d81cfec1e2e17391 - languageName: node - linkType: hard - -"@babel/plugin-proposal-optional-chaining@npm:^7.17.12, @babel/plugin-proposal-optional-chaining@npm:^7.18.9, @babel/plugin-proposal-optional-chaining@npm:^7.21.0": - version: 7.21.0 - resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.20.0" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b524a61b1de3f3ad287cd1e98c2a7f662178d21cd02205b0d615512e475f0159fa1b569fa7e34c8ed67baef689c0136fa20ba7d1bf058d186d30736a581a723f - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-methods@npm:^7.17.12, @babel/plugin-proposal-private-methods@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/1c273d0ec3d49d0fe80bd754ec0191016e5b3ab4fb1e162ac0c014e9d3c1517a5d973afbf8b6dc9f9c98a8605c79e5f9e8b5ee158a4313fa68d1ff7b02084b6a - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:^7.17.12, @babel/plugin-proposal-private-property-in-object@npm:^7.18.6, @babel/plugin-proposal-private-property-in-object@npm:^7.21.0": - version: 7.21.11 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.11" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.18.6" - "@babel/helper-create-class-features-plugin": "npm:^7.21.0" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3c8c9ea175101b1cbb2b0e8fee20fcbdd03eb0700d3581aa826ac3573c9b002f39b1512c2af9fd1903ff921bcc864da95ad3cdeba53c9fbcfb3dc23916eacf47 - languageName: node - linkType: hard - -"@babel/plugin-proposal-unicode-property-regex@npm:^7.17.12, @babel/plugin-proposal-unicode-property-regex@npm:^7.18.6, @babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": - version: 7.18.6 - resolution: "@babel/plugin-proposal-unicode-property-regex@npm:7.18.6" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c68feae57d9b1f4d98ecc2da63bda1993980deb509ccb08f6eace712ece8081032eb6532c304524b544c2dd577e2f9c2fe5c5bfd73d1955c946300def6fc7493 - languageName: node - linkType: hard - -"@babel/plugin-syntax-async-generators@npm:^7.8.4": - version: 7.8.4 - resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d13efb282838481348c71073b6be6245b35d4f2f964a8f71e4174f235009f929ef7613df25f8d2338e2d3e44bc4265a9f8638c6aaa136d7a61fe95985f9725c8 - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-properties@npm:^7.12.13": - version: 7.12.13 - resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.12.13" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/95168fa186416195280b1264fb18afcdcdcea780b3515537b766cb90de6ce042d42dd6a204a39002f794ae5845b02afb0fd4861a3308a861204a55e68310a120 - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-static-block@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/4464bf9115f4a2d02ce1454411baf9cfb665af1da53709c5c56953e5e2913745b0fcce82982a00463d6facbdd93445c691024e310b91431a1e2f024b158f6371 - languageName: node - linkType: hard - -"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/9c50927bf71adf63f60c75370e2335879402648f468d0172bc912e303c6a3876927d8eb35807331b57f415392732ed05ab9b42c68ac30a936813ab549e0246c5 - languageName: node - linkType: hard - -"@babel/plugin-syntax-export-default-from@npm:^7.16.7, @babel/plugin-syntax-export-default-from@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-syntax-export-default-from@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2748bcd6777d1ef29d568815915df5db043744364a4bc746e8b27f2f461de89a4bdf332764339146ef91b8474440edf04c745e97ef0360effb4ac35e750379a4 - languageName: node - linkType: hard - -"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5100d658ba563829700cd8d001ddc09f4c0187b1a13de300d729c5b3e87503f75a6d6c99c1794182f7f1a9f546ee009df4f15a0ce36376e206ed0012fa7cdc24 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.17.12": - version: 7.25.6 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.25.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/55afa63b1b1355bcc1d85a9ad9d2c78983e27beee38e232d5c1ab59eac39127ce3c3817d6686e3ab1d0aff5edd8e38a6852885c65d3e518accdd183a445ef411 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.18.6, @babel/plugin-syntax-import-assertions@npm:^7.20.0": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b82c53e095274ee71c248551352d73441cf65b3b3fc0107258ba4e9aef7090772a425442b3ed1c396fa207d0efafde8929c87a17d3c885b3ca2021316e87e246 - languageName: node - linkType: hard - -"@babel/plugin-syntax-json-strings@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e98f31b2ec406c57757d115aac81d0336e8434101c224edd9a5c93cefa53faf63eacc69f3138960c8b25401315af03df37f68d316c151c4b933136716ed6906e - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-syntax-jsx@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f44d927a9ae8d5ef016ff5b450e1671e56629ddc12e56b938e41fd46e141170d9dfc9a53d6cb2b9a20a7dd266a938885e6a3981c60c052a2e1daed602ac80e51 - languageName: node - linkType: hard - -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2594cfbe29411ad5bc2ad4058de7b2f6a8c5b86eda525a993959438615479e59c012c14aec979e538d60a584a1a799b60d1b8942c3b18468cb9d99b8fd34cd0b - languageName: node - linkType: hard - -"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2024fbb1162899094cfc81152449b12bd0cc7053c6d4bda8ac2852545c87d0a851b1b72ed9560673cbf3ef6248257262c3c04aabf73117215c1b9cc7dd2542ce - languageName: node - linkType: hard - -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c55a82b3113480942c6aa2fcbe976ff9caa74b7b1109ff4369641dfbc88d1da348aceb3c31b6ed311c84d1e7c479440b961906c735d0ab494f688bf2fd5b9bb9 - languageName: node - linkType: hard - -"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ee1eab52ea6437e3101a0a7018b0da698545230015fc8ab129d292980ec6dff94d265e9e90070e8ae5fed42f08f1622c14c94552c77bcac784b37f503a82ff26 - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/27e2493ab67a8ea6d693af1287f7e9acec206d1213ff107a928e85e173741e1d594196f99fec50e9dde404b09164f39dec5864c767212154ffe1caa6af0bc5af - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/46edddf2faa6ebf94147b8e8540dfc60a5ab718e2de4d01b2c0bdf250a4d642c2bd47cbcbb739febcb2bf75514dbcefad3c52208787994b8d0f8822490f55e81 - languageName: node - linkType: hard - -"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/69822772561706c87f0a65bc92d0772cea74d6bc0911537904a676d5ff496a6d3ac4e05a166d8125fce4a16605bace141afc3611074e170a994e66e5397787f3 - languageName: node - linkType: hard - -"@babel/plugin-syntax-top-level-await@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.24.7": - version: 7.25.4 - resolution: "@babel/plugin-syntax-typescript@npm:7.25.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/199919d44c73e5edee9ffd311cf638f88d26a810189e32d338c46c7600441fd5c4a2e431f9be377707cbf318410895304e90b83bf8d9011d205150fa7f260e63 - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.17.12, @babel/plugin-transform-arrow-functions@npm:^7.18.6, @babel/plugin-transform-arrow-functions@npm:^7.20.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6ac05a54e5582f34ac6d5dc26499e227227ec1c7fa6fc8de1f3d40c275f140d3907f79bbbd49304da2d7008a5ecafb219d0b71d78ee3290ca22020d878041245 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:^7.17.12, @babel/plugin-transform-async-to-generator@npm:^7.18.6, @babel/plugin-transform-async-to-generator@npm:^7.20.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-remap-async-to-generator": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/83c82e243898875af8457972a26ab29baf8a2078768ee9f35141eb3edff0f84b165582a2ff73e90a9e08f5922bf813dbf15a85c1213654385198f4591c0dc45d - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.16.7, @babel/plugin-transform-block-scoped-functions@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/113e86de4612ae91773ff5cb6b980f01e1da7e26ae6f6012127415d7ae144e74987bc23feb97f63ba4bc699331490ddea36eac004d76a20d5369e4cc6a7f61cd - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.17.12, @babel/plugin-transform-block-scoping@npm:^7.18.9, @babel/plugin-transform-block-scoping@npm:^7.21.0": - version: 7.25.0 - resolution: "@babel/plugin-transform-block-scoping@npm:7.25.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/382931c75a5d0ea560387e76cb57b03461300527e4784efcb2fb62f36c1eb0ab331327b6034def256baa0cad9050925a61f9c0d56261b6afd6a29c3065fb0bd4 - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.17.12, @babel/plugin-transform-classes@npm:^7.18.9, @babel/plugin-transform-classes@npm:^7.21.0": - version: 7.25.4 - resolution: "@babel/plugin-transform-classes@npm:7.25.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-compilation-targets": "npm:^7.25.2" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-replace-supers": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.4" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c68424d9dd64860825111aa4a4ed5caf29494b7a02ddb9c36351d768c41e8e05127d89274795cdfcade032d9d299e6c677418259df58c71e68f1741583dcf467 - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.17.12, @babel/plugin-transform-computed-properties@npm:^7.18.9, @babel/plugin-transform-computed-properties@npm:^7.20.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-computed-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/25636dbc1f605c0b8bc60aa58628a916b689473d11551c9864a855142e36742fe62d4a70400ba3b74902338e77fb3d940376c0a0ba154b6b7ec5367175233b49 - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.18.0, @babel/plugin-transform-destructuring@npm:^7.18.9, @babel/plugin-transform-destructuring@npm:^7.21.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-destructuring@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/804968c1d5f5072c717505296c1e5d5ec33e90550423de66de82bbcb78157156e8470bbe77a04ab8c710a88a06360a30103cf223ac7eff4829adedd6150de5ce - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.16.7, @babel/plugin-transform-dotall-regex@npm:^7.18.6, @babel/plugin-transform-dotall-regex@npm:^7.4.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/793f14c9494972d294b7e7b97b747f47874b6d57d7804d3443c701becf5db192c9311be6a1835c07664486df1f5c60d33196c36fb7e11a53015e476b4c145b33 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.17.12, @babel/plugin-transform-duplicate-keys@npm:^7.18.9": - version: 7.24.7 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/75ff7ec1117ac500e77bf20a144411d39c0fdd038f108eec061724123ce6d1bb8d5bd27968e466573ee70014f8be0043361cdb0ef388f8a182d1d97ad67e51b9 - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.16.7, @babel/plugin-transform-exponentiation-operator@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ace3e11c94041b88848552ba8feb39ae4d6cad3696d439ff51445bd2882d8b8775d85a26c2c0edb9b5e38c9e6013cc11b0dea89ec8f93c7d9d7ee95e3645078c - languageName: node - linkType: hard - -"@babel/plugin-transform-for-of@npm:^7.18.1, @babel/plugin-transform-for-of@npm:^7.18.8, @babel/plugin-transform-for-of@npm:^7.21.0": - version: 7.24.7 - resolution: "@babel/plugin-transform-for-of@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/77629b1173e55d07416f05ba7353caa09d2c2149da2ca26721ab812209b63689d1be45116b68eadc011c49ced59daf5320835b15245eb7ae93ae0c5e8277cfc0 - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.16.7, @babel/plugin-transform-function-name@npm:^7.18.9": - version: 7.25.1 - resolution: "@babel/plugin-transform-function-name@npm:7.25.1" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.8" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/traverse": "npm:^7.25.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e74912174d5e33d1418b840443c2e226a7b76cc017c1ed20ee30a566e4f1794d4a123be03180da046241576e8b692731807ba1f52608922acf1cb2cb6957593f - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.17.12, @babel/plugin-transform-literals@npm:^7.18.9": - version: 7.25.2 - resolution: "@babel/plugin-transform-literals@npm:7.25.2" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0796883217b0885d37e7f6d350773be349e469a812b6bf11ccf862a6edf65103d3e7c849529d65381b441685c12e756751d8c2489a0fd3f8139bb5ef93185f58 - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.16.7, @babel/plugin-transform-member-expression-literals@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e789ae359bdf2d20e90bedef18dfdbd965c9ebae1cee398474a0c349590fda7c8b874e1a2ceee62e47e5e6ec1730e76b0f24e502164357571854271fc12cc684 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-amd@npm:^7.18.0, @babel/plugin-transform-modules-amd@npm:^7.18.6, @babel/plugin-transform-modules-amd@npm:^7.20.11": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-amd@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6df7de7fce34117ca4b2fa07949b12274c03668cbfe21481c4037b6300796d50ae40f4f170527b61b70a67f26db906747797e30dbd0d9809a441b6e220b5728f - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.18.2, @babel/plugin-transform-modules-commonjs@npm:^7.18.6, @babel/plugin-transform-modules-commonjs@npm:^7.21.2, @babel/plugin-transform-modules-commonjs@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.8" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.8" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-simple-access": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f1cf552307ebfced20d3907c1dd8be941b277f0364aa655e2b5fee828c84c54065745183104dae86f1f93ea0406db970a463ef7ceaaed897623748e99640e5a7 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.18.0, @babel/plugin-transform-modules-systemjs@npm:^7.18.9, @babel/plugin-transform-modules-systemjs@npm:^7.20.11": - version: 7.25.0 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.0" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.0" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/fca6198da71237e4bb1274b3b67a0c81d56013c9535361242b6bfa87d70a9597854aadb45d4d8203369be4a655e158be2a5d20af0040b1f8d1bfc47db3ad7b68 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.18.0, @babel/plugin-transform-modules-umd@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-umd@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7791d290121db210e4338b94b4a069a1a79e4c7a8d7638d8159a97b281851bbed3048dac87a4ae718ad963005e6c14a5d28e6db2eeb2b04e031cee92fb312f85 - languageName: node - linkType: hard - -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.17.12, @babel/plugin-transform-named-capturing-groups-regex@npm:^7.18.6, @babel/plugin-transform-named-capturing-groups-regex@npm:^7.20.5": - version: 7.24.7 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/41a0b0f2d0886318237440aa3b489f6d0305361d8671121777d9ff89f9f6de9d0c02ce93625049061426c8994064ef64deae8b819d1b14c00374a6a2336fb5d9 - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.17.12, @babel/plugin-transform-new-target@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-new-target@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2540808a35e1a978e537334c43dab439cf24c93e7beb213a2e71902f6710e60e0184316643790c0a6644e7a8021e52f7ab8165e6b3e2d6651be07bdf517b67df - languageName: node - linkType: hard - -"@babel/plugin-transform-object-super@npm:^7.16.7, @babel/plugin-transform-object-super@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-super@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/770cebb4b4e1872c216b17069db9a13b87dfee747d359dc56d9fcdd66e7544f92dc6ab1861a4e7e0528196aaff2444e4f17dc84efd8eaf162d542b4ba0943869 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/4ffbe1aad7dec7c9aa2bf6ceb4b2f91f96815b2784f2879bde80e46934f59d64a12cb2c6262e40897c4754d77d2c35d8a5cfed63044fdebf94978b1ed3d14b17 - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.17.12, @babel/plugin-transform-parameters@npm:^7.18.8, @babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.21.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-parameters@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/53bf190d6926771545d5184f1f5f3f5144d0f04f170799ad46a43f683a01fab8d5fe4d2196cf246774530990c31fe1f2b9f0def39f0a5ddbb2340b924f5edf01 - languageName: node - linkType: hard - -"@babel/plugin-transform-property-literals@npm:^7.16.7, @babel/plugin-transform-property-literals@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-property-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/52564b58f3d111dc02d241d5892a4b01512e98dfdf6ef11b0ed62f8b11b0acacccef0fc229b44114fe8d1a57a8b70780b11bdd18b807d3754a781a07d8f57433 - languageName: node - linkType: hard - -"@babel/plugin-transform-regenerator@npm:^7.18.0, @babel/plugin-transform-regenerator@npm:^7.18.6, @babel/plugin-transform-regenerator@npm:^7.20.5": - version: 7.24.7 - resolution: "@babel/plugin-transform-regenerator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d2dc2c788fdae9d97217e70d46ba8ca9db0035c398dc3e161552b0c437113719a75c04f201f9c91ddc8d28a1da60d0b0853f616dead98a396abb9c845c44892b - languageName: node - linkType: hard - -"@babel/plugin-transform-reserved-words@npm:^7.17.12, @babel/plugin-transform-reserved-words@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-reserved-words@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2229de2768615e7f5dc0bbc55bc121b5678fd6d2febd46c74a58e42bb894d74cd5955c805880f4e02d0e1cf94f6886270eda7fafc1be9305a1ec3b9fd1d063f5 - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:7.18.10": - version: 7.18.10 - resolution: "@babel/plugin-transform-runtime@npm:7.18.10" - dependencies: - "@babel/helper-module-imports": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.9" - babel-plugin-polyfill-corejs2: "npm:^0.3.2" - babel-plugin-polyfill-corejs3: "npm:^0.5.3" - babel-plugin-polyfill-regenerator: "npm:^0.4.0" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/156410efc22ca5105bafad83d257758d25da80d3820eaa73ae2d9db4dfaf66bed308479c88ebff795bd5a963dd50572ca5857fe4adc04fbabb2d9abbfb6f8dcf - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:7.18.5": - version: 7.18.5 - resolution: "@babel/plugin-transform-runtime@npm:7.18.5" - dependencies: - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.17.12" - babel-plugin-polyfill-corejs2: "npm:^0.3.0" - babel-plugin-polyfill-corejs3: "npm:^0.5.0" - babel-plugin-polyfill-regenerator: "npm:^0.3.0" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6468b98baaca276d212ad0e3ff56ece3280f0fc1a0470a4d722db43064842a34c6e3c6f52df79a8c36b760609717ccbd15270915c77721a4730987c39fba99e8 - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:7.21.4": - version: 7.21.4 - resolution: "@babel/plugin-transform-runtime@npm:7.21.4" - dependencies: - "@babel/helper-module-imports": "npm:^7.21.4" - "@babel/helper-plugin-utils": "npm:^7.20.2" - babel-plugin-polyfill-corejs2: "npm:^0.3.3" - babel-plugin-polyfill-corejs3: "npm:^0.6.0" - babel-plugin-polyfill-regenerator: "npm:^0.4.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0e94e9f0c383a606b9422f3644b06258780b81d1bc5c0d46621de312d46f2601ad864a6801bc04da21a8b8208c10454d152f2e91ad0b92fac80bfa5dab25e167 - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.16.7, @babel/plugin-transform-shorthand-properties@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/41b155bdbb3be66618358488bf7731b3b2e8fff2de3dbfd541847720a9debfcec14db06a117abedd03c9cd786db20a79e2a86509a4f19513f6e1b610520905cf - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.17.12, @babel/plugin-transform-spread@npm:^7.18.9, @babel/plugin-transform-spread@npm:^7.20.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-spread@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/facba1553035f76b0d2930d4ada89a8cd0f45b79579afd35baefbfaf12e3b86096995f4b0c402cf9ee23b3f2ea0a4460c3b1ec0c192d340962c948bb223d4e66 - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.16.7, @babel/plugin-transform-sticky-regex@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5a74ed2ed0a3ab51c3d15fcaf09d9e2fe915823535c7a4d7b019813177d559b69677090e189ec3d5d08b619483eb5ad371fbcfbbff5ace2a76ba33ee566a1109 - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.18.2, @babel/plugin-transform-template-literals@npm:^7.18.9": - version: 7.24.7 - resolution: "@babel/plugin-transform-template-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3630f966257bcace122f04d3157416a09d40768c44c3a800855da81146b009187daa21859d1c3b7d13f4e19e8888e60613964b175b2275d451200fb6d8d6cfe6 - languageName: node - linkType: hard - -"@babel/plugin-transform-typeof-symbol@npm:^7.17.12, @babel/plugin-transform-typeof-symbol@npm:^7.18.9": - version: 7.24.8 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2f570a4fbbdc5fd85f48165a97452826560051e3b8efb48c3bb0a0a33ee8485633439e7b71bfe3ef705583a1df43f854f49125bd759abdedc195b2cf7e60012a - languageName: node - linkType: hard - -"@babel/plugin-transform-typescript@npm:^7.24.7": - version: 7.25.2 - resolution: "@babel/plugin-transform-typescript@npm:7.25.2" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-create-class-features-plugin": "npm:^7.25.0" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-syntax-typescript": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b3c941da39ee7ecf72df1b78a01d4108160438245f2ab61befe182f51d17fd0034733c6d079b7efad81e03a66438aa3881a671cd68c5eb0fc775df86b88df996 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-escapes@npm:^7.16.7, @babel/plugin-transform-unicode-escapes@npm:^7.18.10": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8b18e2e66af33471a6971289492beff5c240e56727331db1d34c4338a6a368a82a7ed6d57ec911001b6d65643aed76531e1e7cac93265fb3fb2717f54d845e69 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-regex@npm:^7.16.7, @babel/plugin-transform-unicode-regex@npm:^7.18.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/83f72a345b751566b601dc4d07e9f2c8f1bc0e0c6f7abb56ceb3095b3c9d304de73f85f2f477a09f8cc7edd5e65afd0ff9e376cdbcbea33bc0c28f3705b38fd9 - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.18.10": - version: 7.18.10 - resolution: "@babel/preset-env@npm:7.18.10" - dependencies: - "@babel/compat-data": "npm:^7.18.8" - "@babel/helper-compilation-targets": "npm:^7.18.9" - "@babel/helper-plugin-utils": "npm:^7.18.9" - "@babel/helper-validator-option": "npm:^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.18.9" - "@babel/plugin-proposal-async-generator-functions": "npm:^7.18.10" - "@babel/plugin-proposal-class-properties": "npm:^7.18.6" - "@babel/plugin-proposal-class-static-block": "npm:^7.18.6" - "@babel/plugin-proposal-dynamic-import": "npm:^7.18.6" - "@babel/plugin-proposal-export-namespace-from": "npm:^7.18.9" - "@babel/plugin-proposal-json-strings": "npm:^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators": "npm:^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator": "npm:^7.18.6" - "@babel/plugin-proposal-numeric-separator": "npm:^7.18.6" - "@babel/plugin-proposal-object-rest-spread": "npm:^7.18.9" - "@babel/plugin-proposal-optional-catch-binding": "npm:^7.18.6" - "@babel/plugin-proposal-optional-chaining": "npm:^7.18.9" - "@babel/plugin-proposal-private-methods": "npm:^7.18.6" - "@babel/plugin-proposal-private-property-in-object": "npm:^7.18.6" - "@babel/plugin-proposal-unicode-property-regex": "npm:^7.18.6" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.18.6" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-transform-arrow-functions": "npm:^7.18.6" - "@babel/plugin-transform-async-to-generator": "npm:^7.18.6" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.18.6" - "@babel/plugin-transform-block-scoping": "npm:^7.18.9" - "@babel/plugin-transform-classes": "npm:^7.18.9" - "@babel/plugin-transform-computed-properties": "npm:^7.18.9" - "@babel/plugin-transform-destructuring": "npm:^7.18.9" - "@babel/plugin-transform-dotall-regex": "npm:^7.18.6" - "@babel/plugin-transform-duplicate-keys": "npm:^7.18.9" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.18.6" - "@babel/plugin-transform-for-of": "npm:^7.18.8" - "@babel/plugin-transform-function-name": "npm:^7.18.9" - "@babel/plugin-transform-literals": "npm:^7.18.9" - "@babel/plugin-transform-member-expression-literals": "npm:^7.18.6" - "@babel/plugin-transform-modules-amd": "npm:^7.18.6" - "@babel/plugin-transform-modules-commonjs": "npm:^7.18.6" - "@babel/plugin-transform-modules-systemjs": "npm:^7.18.9" - "@babel/plugin-transform-modules-umd": "npm:^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.18.6" - "@babel/plugin-transform-new-target": "npm:^7.18.6" - "@babel/plugin-transform-object-super": "npm:^7.18.6" - "@babel/plugin-transform-parameters": "npm:^7.18.8" - "@babel/plugin-transform-property-literals": "npm:^7.18.6" - "@babel/plugin-transform-regenerator": "npm:^7.18.6" - "@babel/plugin-transform-reserved-words": "npm:^7.18.6" - "@babel/plugin-transform-shorthand-properties": "npm:^7.18.6" - "@babel/plugin-transform-spread": "npm:^7.18.9" - "@babel/plugin-transform-sticky-regex": "npm:^7.18.6" - "@babel/plugin-transform-template-literals": "npm:^7.18.9" - "@babel/plugin-transform-typeof-symbol": "npm:^7.18.9" - "@babel/plugin-transform-unicode-escapes": "npm:^7.18.10" - "@babel/plugin-transform-unicode-regex": "npm:^7.18.6" - "@babel/preset-modules": "npm:^0.1.5" - "@babel/types": "npm:^7.18.10" - babel-plugin-polyfill-corejs2: "npm:^0.3.2" - babel-plugin-polyfill-corejs3: "npm:^0.5.3" - babel-plugin-polyfill-regenerator: "npm:^0.4.0" - core-js-compat: "npm:^3.22.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/4b7ef515702e8c91aa223f60f8a4c8e28ca202fcc090db5c62135e3af16980d7059ba8dc7faf01ba4b818837187d609fdb4d44a56fffa261aa81bfc3d1fa10c3 - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.18.2": - version: 7.18.2 - resolution: "@babel/preset-env@npm:7.18.2" - dependencies: - "@babel/compat-data": "npm:^7.17.10" - "@babel/helper-compilation-targets": "npm:^7.18.2" - "@babel/helper-plugin-utils": "npm:^7.17.12" - "@babel/helper-validator-option": "npm:^7.16.7" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.17.12" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.17.12" - "@babel/plugin-proposal-async-generator-functions": "npm:^7.17.12" - "@babel/plugin-proposal-class-properties": "npm:^7.17.12" - "@babel/plugin-proposal-class-static-block": "npm:^7.18.0" - "@babel/plugin-proposal-dynamic-import": "npm:^7.16.7" - "@babel/plugin-proposal-export-namespace-from": "npm:^7.17.12" - "@babel/plugin-proposal-json-strings": "npm:^7.17.12" - "@babel/plugin-proposal-logical-assignment-operators": "npm:^7.17.12" - "@babel/plugin-proposal-nullish-coalescing-operator": "npm:^7.17.12" - "@babel/plugin-proposal-numeric-separator": "npm:^7.16.7" - "@babel/plugin-proposal-object-rest-spread": "npm:^7.18.0" - "@babel/plugin-proposal-optional-catch-binding": "npm:^7.16.7" - "@babel/plugin-proposal-optional-chaining": "npm:^7.17.12" - "@babel/plugin-proposal-private-methods": "npm:^7.17.12" - "@babel/plugin-proposal-private-property-in-object": "npm:^7.17.12" - "@babel/plugin-proposal-unicode-property-regex": "npm:^7.17.12" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.17.12" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-transform-arrow-functions": "npm:^7.17.12" - "@babel/plugin-transform-async-to-generator": "npm:^7.17.12" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.16.7" - "@babel/plugin-transform-block-scoping": "npm:^7.17.12" - "@babel/plugin-transform-classes": "npm:^7.17.12" - "@babel/plugin-transform-computed-properties": "npm:^7.17.12" - "@babel/plugin-transform-destructuring": "npm:^7.18.0" - "@babel/plugin-transform-dotall-regex": "npm:^7.16.7" - "@babel/plugin-transform-duplicate-keys": "npm:^7.17.12" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.16.7" - "@babel/plugin-transform-for-of": "npm:^7.18.1" - "@babel/plugin-transform-function-name": "npm:^7.16.7" - "@babel/plugin-transform-literals": "npm:^7.17.12" - "@babel/plugin-transform-member-expression-literals": "npm:^7.16.7" - "@babel/plugin-transform-modules-amd": "npm:^7.18.0" - "@babel/plugin-transform-modules-commonjs": "npm:^7.18.2" - "@babel/plugin-transform-modules-systemjs": "npm:^7.18.0" - "@babel/plugin-transform-modules-umd": "npm:^7.18.0" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.17.12" - "@babel/plugin-transform-new-target": "npm:^7.17.12" - "@babel/plugin-transform-object-super": "npm:^7.16.7" - "@babel/plugin-transform-parameters": "npm:^7.17.12" - "@babel/plugin-transform-property-literals": "npm:^7.16.7" - "@babel/plugin-transform-regenerator": "npm:^7.18.0" - "@babel/plugin-transform-reserved-words": "npm:^7.17.12" - "@babel/plugin-transform-shorthand-properties": "npm:^7.16.7" - "@babel/plugin-transform-spread": "npm:^7.17.12" - "@babel/plugin-transform-sticky-regex": "npm:^7.16.7" - "@babel/plugin-transform-template-literals": "npm:^7.18.2" - "@babel/plugin-transform-typeof-symbol": "npm:^7.17.12" - "@babel/plugin-transform-unicode-escapes": "npm:^7.16.7" - "@babel/plugin-transform-unicode-regex": "npm:^7.16.7" - "@babel/preset-modules": "npm:^0.1.5" - "@babel/types": "npm:^7.18.2" - babel-plugin-polyfill-corejs2: "npm:^0.3.0" - babel-plugin-polyfill-corejs3: "npm:^0.5.0" - babel-plugin-polyfill-regenerator: "npm:^0.3.0" - core-js-compat: "npm:^3.22.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/21f903fec9b1fab90a9d25a07a6e06939d6b730ce9202ec92a608c0c65457063e7d0ce8a51952b77360d1c51c5412c46f4b26ad5d0879de2e62ecce41496175a - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.21.4": - version: 7.21.4 - resolution: "@babel/preset-env@npm:7.21.4" - dependencies: - "@babel/compat-data": "npm:^7.21.4" - "@babel/helper-compilation-targets": "npm:^7.21.4" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/helper-validator-option": "npm:^7.21.0" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.20.7" - "@babel/plugin-proposal-async-generator-functions": "npm:^7.20.7" - "@babel/plugin-proposal-class-properties": "npm:^7.18.6" - "@babel/plugin-proposal-class-static-block": "npm:^7.21.0" - "@babel/plugin-proposal-dynamic-import": "npm:^7.18.6" - "@babel/plugin-proposal-export-namespace-from": "npm:^7.18.9" - "@babel/plugin-proposal-json-strings": "npm:^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators": "npm:^7.20.7" - "@babel/plugin-proposal-nullish-coalescing-operator": "npm:^7.18.6" - "@babel/plugin-proposal-numeric-separator": "npm:^7.18.6" - "@babel/plugin-proposal-object-rest-spread": "npm:^7.20.7" - "@babel/plugin-proposal-optional-catch-binding": "npm:^7.18.6" - "@babel/plugin-proposal-optional-chaining": "npm:^7.21.0" - "@babel/plugin-proposal-private-methods": "npm:^7.18.6" - "@babel/plugin-proposal-private-property-in-object": "npm:^7.21.0" - "@babel/plugin-proposal-unicode-property-regex": "npm:^7.18.6" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.20.0" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-transform-arrow-functions": "npm:^7.20.7" - "@babel/plugin-transform-async-to-generator": "npm:^7.20.7" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.18.6" - "@babel/plugin-transform-block-scoping": "npm:^7.21.0" - "@babel/plugin-transform-classes": "npm:^7.21.0" - "@babel/plugin-transform-computed-properties": "npm:^7.20.7" - "@babel/plugin-transform-destructuring": "npm:^7.21.3" - "@babel/plugin-transform-dotall-regex": "npm:^7.18.6" - "@babel/plugin-transform-duplicate-keys": "npm:^7.18.9" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.18.6" - "@babel/plugin-transform-for-of": "npm:^7.21.0" - "@babel/plugin-transform-function-name": "npm:^7.18.9" - "@babel/plugin-transform-literals": "npm:^7.18.9" - "@babel/plugin-transform-member-expression-literals": "npm:^7.18.6" - "@babel/plugin-transform-modules-amd": "npm:^7.20.11" - "@babel/plugin-transform-modules-commonjs": "npm:^7.21.2" - "@babel/plugin-transform-modules-systemjs": "npm:^7.20.11" - "@babel/plugin-transform-modules-umd": "npm:^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.20.5" - "@babel/plugin-transform-new-target": "npm:^7.18.6" - "@babel/plugin-transform-object-super": "npm:^7.18.6" - "@babel/plugin-transform-parameters": "npm:^7.21.3" - "@babel/plugin-transform-property-literals": "npm:^7.18.6" - "@babel/plugin-transform-regenerator": "npm:^7.20.5" - "@babel/plugin-transform-reserved-words": "npm:^7.18.6" - "@babel/plugin-transform-shorthand-properties": "npm:^7.18.6" - "@babel/plugin-transform-spread": "npm:^7.20.7" - "@babel/plugin-transform-sticky-regex": "npm:^7.18.6" - "@babel/plugin-transform-template-literals": "npm:^7.18.9" - "@babel/plugin-transform-typeof-symbol": "npm:^7.18.9" - "@babel/plugin-transform-unicode-escapes": "npm:^7.18.10" - "@babel/plugin-transform-unicode-regex": "npm:^7.18.6" - "@babel/preset-modules": "npm:^0.1.5" - "@babel/types": "npm:^7.21.4" - babel-plugin-polyfill-corejs2: "npm:^0.3.3" - babel-plugin-polyfill-corejs3: "npm:^0.6.0" - babel-plugin-polyfill-regenerator: "npm:^0.4.1" - core-js-compat: "npm:^3.25.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/20995d58969c4e20fcfd5d80a204008e3312325e002dd353d53811b288b45f9e07d741c9c8935e0298b1ed31b9e6dc1078fdacf78caacda0ebeebf8a50038926 - languageName: node - linkType: hard - -"@babel/preset-modules@npm:^0.1.5": - version: 0.1.6 - resolution: "@babel/preset-modules@npm:0.1.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@babel/plugin-proposal-unicode-property-regex": "npm:^7.4.4" - "@babel/plugin-transform-dotall-regex": "npm:^7.4.4" - "@babel/types": "npm:^7.4.4" - esutils: "npm:^2.0.2" - peerDependencies: - "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/6397d196dec1ca91f0f28ea4fbd0e599e5724b7f783f27979e1e9de30a4693f8c1fa98495d542fe5a774b5d0d9b52c6effd2ed15900e879ebcb0488c4bf0eed9 - languageName: node - linkType: hard - -"@babel/preset-typescript@npm:^7.17.12, @babel/preset-typescript@npm:^7.18.6, @babel/preset-typescript@npm:^7.21.4": - version: 7.24.7 - resolution: "@babel/preset-typescript@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-validator-option": "npm:^7.24.7" - "@babel/plugin-syntax-jsx": "npm:^7.24.7" - "@babel/plugin-transform-modules-commonjs": "npm:^7.24.7" - "@babel/plugin-transform-typescript": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/986bc0978eedb4da33aba8e1e13a3426dd1829515313b7e8f4ba5d8c18aff1663b468939d471814e7acf4045d326ae6cff37239878d169ac3fe53a8fde71f8ee - languageName: node - linkType: hard - -"@babel/regjsgen@npm:^0.8.0": - version: 0.8.0 - resolution: "@babel/regjsgen@npm:0.8.0" - checksum: 10c0/4f3ddd8c7c96d447e05c8304c1d5ba3a83fcabd8a716bc1091c2f31595cdd43a3a055fff7cb5d3042b8cb7d402d78820fcb4e05d896c605a7d8bcf30f2424c4a - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7": - version: 7.25.4 - resolution: "@babel/runtime@npm:7.25.4" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/33e937e685f0bfc2d40c219261e2e50d0df7381a6e7cbf56b770e0c5d77cb0c21bf4d97da566cf0164317ed7508e992082c7b6cce7aaa3b17da5794f93fbfb46 - languageName: node - linkType: hard - -"@babel/template@npm:^7.16.7, @babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.24.7, @babel/template@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/template@npm:7.25.0" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/parser": "npm:^7.25.0" - "@babel/types": "npm:^7.25.0" - checksum: 10c0/4e31afd873215744c016e02b04f43b9fa23205d6d0766fb2e93eb4091c60c1b88897936adb895fb04e3c23de98dfdcbe31bc98daaa1a4e0133f78bb948e1209b - languageName: node - linkType: hard - -"@babel/traverse@npm:7.18.11": - version: 7.18.11 - resolution: "@babel/traverse@npm:7.18.11" - dependencies: - "@babel/code-frame": "npm:^7.18.6" - "@babel/generator": "npm:^7.18.10" - "@babel/helper-environment-visitor": "npm:^7.18.9" - "@babel/helper-function-name": "npm:^7.18.9" - "@babel/helper-hoist-variables": "npm:^7.18.6" - "@babel/helper-split-export-declaration": "npm:^7.18.6" - "@babel/parser": "npm:^7.18.11" - "@babel/types": "npm:^7.18.10" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: 10c0/04d5342190a2699ac314767a2af2e67e1a3f77e15c02c1801834e77eb50d2fa633dbc30dc64dccf0eabd40b1e7a4b1c04b67d0664030e54902e90e5c1b773f75 - languageName: node - linkType: hard - -"@babel/traverse@npm:7.18.5": - version: 7.18.5 - resolution: "@babel/traverse@npm:7.18.5" - dependencies: - "@babel/code-frame": "npm:^7.16.7" - "@babel/generator": "npm:^7.18.2" - "@babel/helper-environment-visitor": "npm:^7.18.2" - "@babel/helper-function-name": "npm:^7.17.9" - "@babel/helper-hoist-variables": "npm:^7.16.7" - "@babel/helper-split-export-declaration": "npm:^7.16.7" - "@babel/parser": "npm:^7.18.5" - "@babel/types": "npm:^7.18.4" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: 10c0/8ee1ac19f276305dd20b7040162edb82e23934ba3d95d3e4e7ec367c6f6a71ad7c9d40a9a105845ec7bcd83c32e9de4e02115e8e48c62af9d15304e30f847436 - languageName: node - linkType: hard - -"@babel/traverse@npm:7.21.4": - version: 7.21.4 - resolution: "@babel/traverse@npm:7.21.4" - dependencies: - "@babel/code-frame": "npm:^7.21.4" - "@babel/generator": "npm:^7.21.4" - "@babel/helper-environment-visitor": "npm:^7.18.9" - "@babel/helper-function-name": "npm:^7.21.0" - "@babel/helper-hoist-variables": "npm:^7.18.6" - "@babel/helper-split-export-declaration": "npm:^7.18.6" - "@babel/parser": "npm:^7.21.4" - "@babel/types": "npm:^7.21.4" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: 10c0/3b2e7e80ef088881ad1f30a032f71ba63d734c270cd240dc229f26bfdeabcd661cf40d2c083f250812b08bb04985f77fb038b7b1ee629b3378ee867dff163878 - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.18.10, @babel/traverse@npm:^7.21.4, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.1, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/traverse@npm:7.25.4" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.25.4" - "@babel/parser": "npm:^7.25.4" - "@babel/template": "npm:^7.25.0" - "@babel/types": "npm:^7.25.4" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/37c9b49b277e051fe499ef5f6f217370c4f648d6370564d70b5e6beb2da75bfda6d7dab1d39504d89e9245448f8959bc1a5880d2238840cdc3979b35338ed0f5 - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.18.5": - version: 7.25.6 - resolution: "@babel/traverse@npm:7.25.6" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.25.6" - "@babel/parser": "npm:^7.25.6" - "@babel/template": "npm:^7.25.0" - "@babel/types": "npm:^7.25.6" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/964304c6fa46bd705428ba380bf73177eeb481c3f26d82ea3d0661242b59e0dd4329d23886035e9ca9a4ceb565c03a76fd615109830687a27bcd350059d6377e - languageName: node - linkType: hard - -"@babel/types@npm:7.18.10": - version: 7.18.10 - resolution: "@babel/types@npm:7.18.10" - dependencies: - "@babel/helper-string-parser": "npm:^7.18.10" - "@babel/helper-validator-identifier": "npm:^7.18.6" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/62f50bc10967cff9cb9f1b46ba38946a6d084bdfba4587ad80898fc2a3812e51895f65fe21dcaa7d78e494d7e319acf0e4445492a3a9ae1331a806d660754f47 - languageName: node - linkType: hard - -"@babel/types@npm:7.18.4": - version: 7.18.4 - resolution: "@babel/types@npm:7.18.4" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/7aa66a0b95bd1a9c196c8287de60fe692ed07a3fa9edd969181b634de89ee3c52709bd14a8b653b5ec43c80d1b530f896aa08557b68335434fcccff630185546 - languageName: node - linkType: hard - -"@babel/types@npm:7.21.4": - version: 7.21.4 - resolution: "@babel/types@npm:7.21.4" - dependencies: - "@babel/helper-string-parser": "npm:^7.19.4" - "@babel/helper-validator-identifier": "npm:^7.19.1" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/3820dc7b32706241ff3c0d02d034108f94586c7e8fa39cf3e2f0f0c46645f554d3c23f72c91ba7c62290ea33e21c3296dbacc40fd9fbf6cd22c3fa939e711d01 - languageName: node - linkType: hard - -"@babel/types@npm:^7.18.10, @babel/types@npm:^7.21.4, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.4, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.25.4 - resolution: "@babel/types@npm:7.25.4" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/9aa25dfcd89cc4e4dde3188091c34398a005a49e2c2b069d0367b41e1122c91e80fd92998c52a90f2fb500f7e897b6090ec8be263d9cb53d0d75c756f44419f2 - languageName: node - linkType: hard - -"@babel/types@npm:^7.18.2, @babel/types@npm:^7.18.4, @babel/types@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/types@npm:7.25.6" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/89d45fbee24e27a05dca2d08300a26b905bd384a480448823f6723c72d3a30327c517476389b7280ce8cb9a2c48ef8f47da7f9f6d326faf6f53fd6b68237bdc4 - languageName: node - linkType: hard - -"@chain-registry/client@npm:^1.48.1": - version: 1.48.59 - resolution: "@chain-registry/client@npm:1.48.59" - dependencies: - "@chain-registry/types": "npm:^0.45.59" - "@chain-registry/utils": "npm:^1.46.59" - bfs-path: "npm:^1.0.2" - cross-fetch: "npm:^3.1.5" - checksum: 10c0/ee0612701469456d96593786ac5f4afa9709145922b4aad25d06722398dda7459bc3606c1702ae97e9ecb05b2aa9ca4fa048059f488a770d2a32cf5bd7abc1b9 - languageName: node - linkType: hard - -"@chain-registry/cosmostation@npm:1.66.2": - version: 1.66.2 - resolution: "@chain-registry/cosmostation@npm:1.66.2" - dependencies: - "@chain-registry/types": "npm:^0.45.1" - "@chain-registry/utils": "npm:^1.46.1" - "@cosmostation/extension-client": "npm:0.1.15" - checksum: 10c0/6ec2bdfd32b05e93bfef23ee72dd65c2c0a539ae70c5cf22fc7e73602e0172bda1a8343352cf4025e410dfec88aa3abe2a59a76e88fc69f2fe5d867eca9408f9 - languageName: node - linkType: hard - -"@chain-registry/cosmostation@npm:^1.66.2": - version: 1.66.73 - resolution: "@chain-registry/cosmostation@npm:1.66.73" - dependencies: - "@chain-registry/types": "npm:^0.45.59" - "@chain-registry/utils": "npm:^1.46.59" - "@cosmostation/extension-client": "npm:0.1.15" - checksum: 10c0/e127ab09bb01ca99ca374043a6245d10460aa07a22ac934ca36bef2dcca5a93228b070b3d3c20c3c71b216b5a5a5bdc16523e8f85ade6b8b7d425a0445b057be - languageName: node - linkType: hard - -"@chain-registry/keplr@npm:1.68.2": - version: 1.68.2 - resolution: "@chain-registry/keplr@npm:1.68.2" - dependencies: - "@chain-registry/types": "npm:^0.45.1" - "@keplr-wallet/cosmos": "npm:0.12.28" - "@keplr-wallet/crypto": "npm:0.12.28" - semver: "npm:^7.5.0" - checksum: 10c0/a155f2029f7fb366b6aa6169b8774d01a57150af0ca6925024a77d401e9c0302860208520a7dd5fead08a47b65025b1eddd65c77f10d73cbd7be71b2cda8132d - languageName: node - linkType: hard - -"@chain-registry/keplr@npm:^1.68.2": - version: 1.68.73 - resolution: "@chain-registry/keplr@npm:1.68.73" - dependencies: - "@chain-registry/types": "npm:^0.45.59" - "@keplr-wallet/cosmos": "npm:0.12.28" - "@keplr-wallet/crypto": "npm:0.12.28" - semver: "npm:^7.5.0" - checksum: 10c0/6dbf9ca0c50e7c40140990568ebdf3671e8dc17a1a45ba76552be817425aaedddfa0ab7fb0106afac112e935a6f745e34449e5680048464d181a11fb63f69fe6 - languageName: node - linkType: hard - -"@chain-registry/osmosis@npm:^1.21.0": - version: 1.62.59 - resolution: "@chain-registry/osmosis@npm:1.62.59" - dependencies: - "@chain-registry/types": "npm:^0.45.59" - checksum: 10c0/9673178ed614d1af37cf0d909148943e77fd175329d01bda18d46ebbc20680c95a30af7103304699cf4c7d0d5003e8dd2f2fc4c2cf2b17d174abbe7ea9238ccd - languageName: node - linkType: hard - -"@chain-registry/types@npm:0.17.0": - version: 0.17.0 - resolution: "@chain-registry/types@npm:0.17.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - checksum: 10c0/e4a32546e350240560b1339a3dcb6426eede1569ba9d17b0d6b5eeacd79fb643f347c21ea7f5ba147185c9ad2e19eea44dff248d8e1bf27e882511398812bfe4 - languageName: node - linkType: hard - -"@chain-registry/types@npm:0.45.1": - version: 0.45.1 - resolution: "@chain-registry/types@npm:0.45.1" - checksum: 10c0/d2008c36e2b9d5b4dfbeae2e4038b956789cf7a70bff85d936fdb76a34a16609952b8b233bd09c3e93eeb9ccde26a5492230d1f3e450b2a7a7b8474df76835a5 - languageName: node - linkType: hard - -"@chain-registry/types@npm:^0.17.0": - version: 0.17.1 - resolution: "@chain-registry/types@npm:0.17.1" - dependencies: - "@babel/runtime": "npm:^7.21.0" - checksum: 10c0/00400f2994c838dbf0a4a6aa01af397d72badbeee82e13095e1ae1e5853a9405f802f0e5629f3aab0cfaa7ec9eae78eb0976001d5a24a7f33d138e2b02edb547 - languageName: node - linkType: hard - -"@chain-registry/types@npm:^0.45.1, @chain-registry/types@npm:^0.45.59": - version: 0.45.59 - resolution: "@chain-registry/types@npm:0.45.59" - checksum: 10c0/952b580cb8efeff87a3ae00d7caf2be2c4f2f8cbb19f4a523d49007e734152cfa0019183d8dd3b4636e3f82a0ebe18c5c627df2712a2b5d11f0869ba8be72ec8 - languageName: node - linkType: hard - -"@chain-registry/utils@npm:^1.46.1, @chain-registry/utils@npm:^1.46.59": - version: 1.46.59 - resolution: "@chain-registry/utils@npm:1.46.59" - dependencies: - "@chain-registry/types": "npm:^0.45.59" - bignumber.js: "npm:9.1.2" - sha.js: "npm:^2.4.11" - checksum: 10c0/918fc0cb41c9a18d67a791e942ee359f48ad6ea90a7bf4c26f1415ce2ace2cda16b57da83072454ddf0e3ff700bd3e592fb421bb6b93e618eb2f7cdd6768ad5e - languageName: node - linkType: hard - -"@chain-registry/v2-types@npm:^0.49.6": - version: 0.49.59 - resolution: "@chain-registry/v2-types@npm:0.49.59" - checksum: 10c0/89c22e88e035835f4a823960cb3fc6e9ca59708994d20fe606ba793c85e8b277113f5ee4b6882cc1e7ecdc0338ff849799c011c567c8469f437ab4ac9c4a8d72 - languageName: node - linkType: hard - -"@chain-registry/v2-types@npm:^0.49.61": - version: 0.49.61 - resolution: "@chain-registry/v2-types@npm:0.49.61" - checksum: 10c0/21cdb248dc9d89ff6f36d24361b13380b1df01cf82f98313cf64edc58af87c2e89163ad0b79d2fcd8eaf40a66b7932a624d77c242d06c07cb498121a7e6f45ce - languageName: node - linkType: hard - -"@chain-registry/v2-types@npm:^0.49.67": - version: 0.49.67 - resolution: "@chain-registry/v2-types@npm:0.49.67" - checksum: 10c0/e3c18cd23bcb91e5039afb8299f85fe94a5fd42c00cc7b97530ae60f973197b75bb611e1d8aacd569c08020ef1a446eb3dd9d27068d742144f181003e6b5aec7 - languageName: node - linkType: hard - -"@chain-registry/v2@npm:^1.65.20": - version: 1.65.61 - resolution: "@chain-registry/v2@npm:1.65.61" - dependencies: - "@chain-registry/v2-types": "npm:^0.49.61" - checksum: 10c0/b1ee851191624aef781c457af7cc2e30e00cc4886bfe23fbf324ecbe7515ad8e92a8988123b994dba07420c92413c04373532a9b9c9e526a532f543af2eb142b - languageName: node - linkType: hard - -"@chain-registry/v2@npm:^1.65.6": - version: 1.65.67 - resolution: "@chain-registry/v2@npm:1.65.67" - dependencies: - "@chain-registry/v2-types": "npm:^0.49.67" - checksum: 10c0/e16b8877dbf49c80198ae4c0e2b076cd987d663fbc7418639c34de61a0df9b413015c5690f4bcee98f3aaf394d3ab711fc95c02722f3adf7ec5e69b79a2286c9 - languageName: node - linkType: hard - -"@chakra-ui/accordion@npm:2.1.9": - version: 2.1.9 - resolution: "@chakra-ui/accordion@npm:2.1.9" - dependencies: - "@chakra-ui/descendant": "npm:3.0.13" - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/transition": "npm:2.0.15" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - framer-motion: ">=4.0.0" - react: ">=18" - checksum: 10c0/eced2e9f5220705006e6c578b59f29c8c685a881273dc553ea018210c72f5677c732a8c1ee819178d56eab29846bd097cd7c080154904040c8dcd86329824e91 - languageName: node - linkType: hard - -"@chakra-ui/alert@npm:2.0.17": - version: 2.0.17 - resolution: "@chakra-ui/alert@npm:2.0.17" - dependencies: - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/spinner": "npm:2.0.13" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/264c150bf4bba854a8607b1c122bf1a1c3e0403d18b69fdc4e076822ff6c0a824b4df2afac88fff7f084651c5c33cbccf01e072cbf7ba8752d8e72f06d9a737b - languageName: node - linkType: hard - -"@chakra-ui/anatomy@npm:2.1.2": - version: 2.1.2 - resolution: "@chakra-ui/anatomy@npm:2.1.2" - checksum: 10c0/6f45051a4f8cf8827a0aa6e636e494173f5e9171b51285b549af71d649b24d96700119c566eb2daa45ffc69ae1c18bb524a9474048aa2b38622faa7443f46cda - languageName: node - linkType: hard - -"@chakra-ui/avatar@npm:2.2.5": - version: 2.2.5 - resolution: "@chakra-ui/avatar@npm:2.2.5" - dependencies: - "@chakra-ui/image": "npm:2.0.15" - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/803644a72b888ab44b0e808a9d28ec1ea8d62f7e9614a19522edd0e54e10d51940beff9f51f3dadf6fffecbe7f0aa386023ef71a6362472ffcdf7a97b1fb2c6e - languageName: node - linkType: hard - -"@chakra-ui/breadcrumb@npm:2.1.4": - version: 2.1.4 - resolution: "@chakra-ui/breadcrumb@npm:2.1.4" - dependencies: - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/ffd3f4b6bf285442f76a8117d9015cab0ed888b931975f6bfa5e5fd9d0b3b8fb50db6688c31a9d251d27784cc93b67b9044beec48922d4ee4bacd80a49843b6c - languageName: node - linkType: hard - -"@chakra-ui/breakpoint-utils@npm:2.0.8": - version: 2.0.8 - resolution: "@chakra-ui/breakpoint-utils@npm:2.0.8" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - checksum: 10c0/72876156c5f6dacdd761539c37a7261422eac6fe3ffb3de70b053f6c058f1cff78b4339fb65041c31cde98e9cf5384b3a2e3e650db92f9d51582db9b9cde8008 - languageName: node - linkType: hard - -"@chakra-ui/button@npm:2.0.16": - version: 2.0.16 - resolution: "@chakra-ui/button@npm:2.0.16" - dependencies: - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/spinner": "npm:2.0.13" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/8a061f436e09cfd2346ee26a16762201892a68dfc3af4ffa21ccf48d556834c1f5587c4f2682d2765f1ec81674e673462a679ea05b21c37b477d876683852953 - languageName: node - linkType: hard - -"@chakra-ui/card@npm:2.1.6": - version: 2.1.6 - resolution: "@chakra-ui/card@npm:2.1.6" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/276ec7f0a37f1cccda37c528432659bc2ba876a18f0c5dc64aadb07ba767346f646a55562126bb394ca1129a9644ab98bd423169bea80cc28ba8c70f5c0d7c24 - languageName: node - linkType: hard - -"@chakra-ui/checkbox@npm:2.2.10": - version: 2.2.10 - resolution: "@chakra-ui/checkbox@npm:2.2.10" - dependencies: - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/visually-hidden": "npm:2.0.15" - "@zag-js/focus-visible": "npm:0.2.1" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/3c0e893ba81a0faaaabba4773f07bf0364bf2e1df0781fa7fbb0a83f57c7c5ced2f30be4df8ad97fb869e6d3cdc9ae92af259cdc43e36c3a882e1b21f36e9683 - languageName: node - linkType: hard - -"@chakra-ui/clickable@npm:2.0.14": - version: 2.0.14 - resolution: "@chakra-ui/clickable@npm:2.0.14" - dependencies: - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/07e98ecd49a02f9253d91a3c07317c55357280a80fe54bb046de9c659ce1d0b1e74a580528ec5dbbd43660495bca984ecdd200eb146fb8535236968e5ade1d22 - languageName: node - linkType: hard - -"@chakra-ui/close-button@npm:2.0.17": - version: 2.0.17 - resolution: "@chakra-ui/close-button@npm:2.0.17" - dependencies: - "@chakra-ui/icon": "npm:3.0.16" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/6ae8c8501cba68ddb271b5fa9918cabb33a709b602926c536140c0045998ef93e0d9253a792b2637d5cabfe2e16e2ebe08c34c5fc93802eff7bf92d6b20533cb - languageName: node - linkType: hard - -"@chakra-ui/color-mode@npm:2.1.12": - version: 2.1.12 - resolution: "@chakra-ui/color-mode@npm:2.1.12" - dependencies: - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/5ae45069baede0ab9ef6de1dc8986e6449a2b7d032dcf8e41471e33c4ade0ee4840fac71a03750e7efcab5e16ba34043ef706fcb042368d9c7edcc76601ece3d - languageName: node - linkType: hard - -"@chakra-ui/control-box@npm:2.0.13": - version: 2.0.13 - resolution: "@chakra-ui/control-box@npm:2.0.13" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/033081a42150a1cd32e296412459cae0a0253ef8df75262194ac36473caa168d7beae9c557027c7e98e393bfe09f12cd7addd3cccac3238bfff43b6579706119 - languageName: node - linkType: hard - -"@chakra-ui/counter@npm:2.0.14": - version: 2.0.14 - resolution: "@chakra-ui/counter@npm:2.0.14" - dependencies: - "@chakra-ui/number-utils": "npm:2.0.7" - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/a043aa49b7523a925906242d2e6e805281533e1e5e71f7d543062f6579cdfc69b7cf526debb514983ca480aaaa953c370e23970e8d03decba4c15b77a5848204 - languageName: node - linkType: hard - -"@chakra-ui/css-reset@npm:2.0.12": - version: 2.0.12 - resolution: "@chakra-ui/css-reset@npm:2.0.12" - peerDependencies: - "@emotion/react": ">=10.0.35" - react: ">=18" - checksum: 10c0/126415053b71ab088847d6a596e0bd3ab8aebc79abf51025e8e846cd970ebd8cd6d1f707332195e8221ce6b648ddb692fce172fd5b9fea5c80b8a4092f226546 - languageName: node - linkType: hard - -"@chakra-ui/descendant@npm:3.0.13": - version: 3.0.13 - resolution: "@chakra-ui/descendant@npm:3.0.13" - dependencies: - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/5aafc33bfbf471a43df257ec831b49ed081b3714627d24d1f30c45801cb7290ec420e7932e9e781414da8298f2f0ec7753c0d70d29b3b922824ebc61ea9074d9 - languageName: node - linkType: hard - -"@chakra-ui/dom-utils@npm:2.0.6": - version: 2.0.6 - resolution: "@chakra-ui/dom-utils@npm:2.0.6" - checksum: 10c0/f3f416f7cea2cae738ccc709afae665ef6c71d500dca0c3a0eaee4478db329148b77abdf6934c5cdb9f3f57824842e4a23d34361ed49dee1c07a24befc09c5c8 - languageName: node - linkType: hard - -"@chakra-ui/editable@npm:2.0.19": - version: 2.0.19 - resolution: "@chakra-ui/editable@npm:2.0.19" - dependencies: - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-focus-on-pointer-down": "npm:2.0.6" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/32c00c4ea23c8840c6866e4f9397e2b15b3b1c53e855ab66d83344cff47369ad10299581cf55affb2f53f2481a7c22caff0c1b81c3e0afbc24503d6b9aef512b - languageName: node - linkType: hard - -"@chakra-ui/event-utils@npm:2.0.8": - version: 2.0.8 - resolution: "@chakra-ui/event-utils@npm:2.0.8" - checksum: 10c0/2e7cb5f1de15c87cfcc7034e17bc3640cccdde70a85683220d66bc5dcca551fb82275187e7b51ca399ef6ce9a040007711490e5381186e925744743f4efd9aab - languageName: node - linkType: hard - -"@chakra-ui/focus-lock@npm:2.0.16": - version: 2.0.16 - resolution: "@chakra-ui/focus-lock@npm:2.0.16" - dependencies: - "@chakra-ui/dom-utils": "npm:2.0.6" - react-focus-lock: "npm:^2.9.2" - peerDependencies: - react: ">=18" - checksum: 10c0/544f87c16afb3ec77c5520b537ee1113d5579fcb8808adf1635a813b952ededd42cf1db065798c5a8c7308fbfe748593e743949ff308d54314f46edf00d3ab2d - languageName: node - linkType: hard - -"@chakra-ui/form-control@npm:2.0.17": - version: 2.0.17 - resolution: "@chakra-ui/form-control@npm:2.0.17" - dependencies: - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/4378131aa653283273e3bbc6d74b4c82108276b186be7545ccff8c8b49cfcc6e526d13bfb980b47be1dc3b405834704d7e1a60941b7cf026fb2bc636bd178319 - languageName: node - linkType: hard - -"@chakra-ui/hooks@npm:2.1.6": - version: 2.1.6 - resolution: "@chakra-ui/hooks@npm:2.1.6" - dependencies: - "@chakra-ui/react-utils": "npm:2.0.12" - "@chakra-ui/utils": "npm:2.0.15" - compute-scroll-into-view: "npm:1.0.20" - copy-to-clipboard: "npm:3.3.3" - peerDependencies: - react: ">=18" - checksum: 10c0/281ee1426f1e9c672377f63046f08609a35d9e3a2376065f5668178747eb9a61a07954fd8258c67e5100bc549c3d02a46e54c315fee0524ee238e6976da6b503 - languageName: node - linkType: hard - -"@chakra-ui/icon@npm:3.0.12": - version: 3.0.12 - resolution: "@chakra-ui/icon@npm:3.0.12" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.3" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/dc5043d669d6f0a0a60bffbc90b691e678f11ecd459d789c7106f4370ff7aa3af497fb89dbeb4b0a13116b35869c79334e3d824c76c9619ebd375d988843a33b - languageName: node - linkType: hard - -"@chakra-ui/icon@npm:3.0.16": - version: 3.0.16 - resolution: "@chakra-ui/icon@npm:3.0.16" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/fd69910c8e148cb2b2d053aa691d4486d79ae37aa63af8d00fa93adcebf070bbd49d81268fe5f7678c319acd46b6a59f517c587f647a34810ea3bb1ea8714d6e - languageName: node - linkType: hard - -"@chakra-ui/icons@npm:2.0.12": - version: 2.0.12 - resolution: "@chakra-ui/icons@npm:2.0.12" - dependencies: - "@chakra-ui/icon": "npm:3.0.12" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/8fe854e4ec1ba754930cdc34fc1e1836c4b3a41971e1f698949f26b42a9222b77cecad2e79c6541ea7328bac1381ef1cad7a8713e13fe9879027aa6a7cc16556 - languageName: node - linkType: hard - -"@chakra-ui/image@npm:2.0.15": - version: 2.0.15 - resolution: "@chakra-ui/image@npm:2.0.15" - dependencies: - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/84626b33e3ed43474d20b98bd4c15341a8dc3619b3178f27daa5ab72eb8fcdb5965f2a72b632300f9fb59590f5c0e8f4fce3ff0f3c8173254887ebfc8af7e098 - languageName: node - linkType: hard - -"@chakra-ui/input@npm:2.0.20": - version: 2.0.20 - resolution: "@chakra-ui/input@npm:2.0.20" - dependencies: - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/object-utils": "npm:2.0.8" - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/9dd043e0a616dac1ff0b0b0da9a8a0a22ebb56c5e3dee8a1ae2ffefc8a61960c3cc755380050309d622571595ee2ff7c6ba5410c90ae983793c67796dea87626 - languageName: node - linkType: hard - -"@chakra-ui/layout@npm:2.1.16": - version: 2.1.16 - resolution: "@chakra-ui/layout@npm:2.1.16" - dependencies: - "@chakra-ui/breakpoint-utils": "npm:2.0.8" - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/object-utils": "npm:2.0.8" - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/a1d726c3a3daf4d792f30c20da287e31c2bd4e4737fe2f3427bb5e93fa729a45e82cec6e0311305cb3d959f15f863cdbaff50054aeca750961694cce3374986d - languageName: node - linkType: hard - -"@chakra-ui/lazy-utils@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/lazy-utils@npm:2.0.5" - checksum: 10c0/be66046af926bf6ee43bd8f2eacc386a788a582797391c1ebbc44b600be9a1a1d4eb208245785de05c9232ada2f83d82faa4c611fc8ee06fc57e81c6a213aac2 - languageName: node - linkType: hard - -"@chakra-ui/live-region@npm:2.0.13": - version: 2.0.13 - resolution: "@chakra-ui/live-region@npm:2.0.13" - peerDependencies: - react: ">=18" - checksum: 10c0/a288c84872882fc428d5364cf933352d5a3dff9e6cf713971b4b752fe09d76dd1ee287d796ccec9d542b3961ef5fd6154304ad4099ca41c79bf75c20361fb966 - languageName: node - linkType: hard - -"@chakra-ui/media-query@npm:3.2.12": - version: 3.2.12 - resolution: "@chakra-ui/media-query@npm:3.2.12" - dependencies: - "@chakra-ui/breakpoint-utils": "npm:2.0.8" - "@chakra-ui/react-env": "npm:3.0.0" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/5d23730e266bb8794b81d63ab8c259b162a0c049777dd0517ced4267c53d2e845cd8a6eb0c8e66c9d6e35ee23a627c85480ebe22c2f4aa4adb9799eedf84fda1 - languageName: node - linkType: hard - -"@chakra-ui/menu@npm:2.1.9": - version: 2.1.9 - resolution: "@chakra-ui/menu@npm:2.1.9" - dependencies: - "@chakra-ui/clickable": "npm:2.0.14" - "@chakra-ui/descendant": "npm:3.0.13" - "@chakra-ui/lazy-utils": "npm:2.0.5" - "@chakra-ui/popper": "npm:3.0.13" - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-animation-state": "npm:2.0.8" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-disclosure": "npm:2.0.8" - "@chakra-ui/react-use-focus-effect": "npm:2.0.9" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/react-use-outside-click": "npm:2.0.7" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/transition": "npm:2.0.15" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - framer-motion: ">=4.0.0" - react: ">=18" - checksum: 10c0/4c2c519c38a2e25ac093089ff3b757164aac96f90fda0ef7b935a4234226a60814bc886b528c504bc4f6d27f3cbf9b75798a0e0cb7a3ce68c00c1b145365b08f - languageName: node - linkType: hard - -"@chakra-ui/modal@npm:2.2.9": - version: 2.2.9 - resolution: "@chakra-ui/modal@npm:2.2.9" - dependencies: - "@chakra-ui/close-button": "npm:2.0.17" - "@chakra-ui/focus-lock": "npm:2.0.16" - "@chakra-ui/portal": "npm:2.0.15" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/transition": "npm:2.0.15" - aria-hidden: "npm:^1.2.2" - react-remove-scroll: "npm:^2.5.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - framer-motion: ">=4.0.0" - react: ">=18" - react-dom: ">=18" - checksum: 10c0/f89ba7ad1d4cbe19b7ef3dc194476d7cb7e0dd35902df020914cd422166bd30b733eec95518c0960e419825fb3dd2a891dc78818299e52e9ebeae44ee5d2f2c7 - languageName: node - linkType: hard - -"@chakra-ui/number-input@npm:2.0.18": - version: 2.0.18 - resolution: "@chakra-ui/number-input@npm:2.0.18" - dependencies: - "@chakra-ui/counter": "npm:2.0.14" - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - "@chakra-ui/react-use-event-listener": "npm:2.0.7" - "@chakra-ui/react-use-interval": "npm:2.0.5" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/841f874b003978d3312bd9dd680d974abc85ede0dc2fc163520133ea5f43dd2a6824830c54e9573b44e0e9f51866d0244cda4fab09c6e0dab4610fbabf3675ea - languageName: node - linkType: hard - -"@chakra-ui/number-utils@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/number-utils@npm:2.0.7" - checksum: 10c0/0e4492e7f3b036069e79035ab241bccfaab91634660fcc57eba041f5eded4048bf8085e050e8b067fe3899df9208512fd61643b07536db942a952c8151132acb - languageName: node - linkType: hard - -"@chakra-ui/object-utils@npm:2.0.8": - version: 2.0.8 - resolution: "@chakra-ui/object-utils@npm:2.0.8" - checksum: 10c0/62c7570d21d35494ef50d991adadf6e4619db51dfdb391e72467bdedf4293f80303599830b9633938eaf1c2c78dfb554d3ca41c024a9fc0529341228f796cc98 - languageName: node - linkType: hard - -"@chakra-ui/pin-input@npm:2.0.19": - version: 2.0.19 - resolution: "@chakra-ui/pin-input@npm:2.0.19" - dependencies: - "@chakra-ui/descendant": "npm:3.0.13" - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/465085667b161bf39840bd8f708f190c782092ee9ef2151a0066e4674f770a7595091d51f1aa961df035f03bf710b849fe00d6e754ed32dd4cda070defccdbe1 - languageName: node - linkType: hard - -"@chakra-ui/popover@npm:2.1.8": - version: 2.1.8 - resolution: "@chakra-ui/popover@npm:2.1.8" - dependencies: - "@chakra-ui/close-button": "npm:2.0.17" - "@chakra-ui/lazy-utils": "npm:2.0.5" - "@chakra-ui/popper": "npm:3.0.13" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-animation-state": "npm:2.0.8" - "@chakra-ui/react-use-disclosure": "npm:2.0.8" - "@chakra-ui/react-use-focus-effect": "npm:2.0.9" - "@chakra-ui/react-use-focus-on-pointer-down": "npm:2.0.6" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - framer-motion: ">=4.0.0" - react: ">=18" - checksum: 10c0/8d8037c9c35bd6c2a60b24ac65a7145fbb84721875ad62cf0d8f6e56ffb06710c03abf94a9c7334ee8edb25ac8e1a59b53c03e493c037a634b3df0e1cf583c80 - languageName: node - linkType: hard - -"@chakra-ui/popper@npm:3.0.13": - version: 3.0.13 - resolution: "@chakra-ui/popper@npm:3.0.13" - dependencies: - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@popperjs/core": "npm:^2.9.3" - peerDependencies: - react: ">=18" - checksum: 10c0/a4bc362b51bbad12017aa6db0b0fdb4d3268116861d12834fb3a9e8ee4d4a9399e2046ad5a8aada80219617d966225119b9060b68f1665006e9b0a40166e02c7 - languageName: node - linkType: hard - -"@chakra-ui/portal@npm:2.0.15": - version: 2.0.15 - resolution: "@chakra-ui/portal@npm:2.0.15" - dependencies: - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - peerDependencies: - react: ">=18" - react-dom: ">=18" - checksum: 10c0/f912c3616b7b10b4936f1b90a090d90c11ead7a0d511d886f44e890043b6e2b70a7e52d297a46c8c9728fb48ce35ba4ffeac9c108adfb0c45f3960a587d0b2e3 - languageName: node - linkType: hard - -"@chakra-ui/progress@npm:2.1.5": - version: 2.1.5 - resolution: "@chakra-ui/progress@npm:2.1.5" - dependencies: - "@chakra-ui/react-context": "npm:2.0.7" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/745fcf9573e9862b36e211a7b0414033714ee4735abb6b9348d6aeab6f4e026131c31ae7bb681bbb56d7b73831041fb37e967e06227b601177e8607978d909f3 - languageName: node - linkType: hard - -"@chakra-ui/provider@npm:2.1.2": - version: 2.1.2 - resolution: "@chakra-ui/provider@npm:2.1.2" - dependencies: - "@chakra-ui/css-reset": "npm:2.0.12" - "@chakra-ui/portal": "npm:2.0.15" - "@chakra-ui/react-env": "npm:3.0.0" - "@chakra-ui/system": "npm:2.5.1" - "@chakra-ui/utils": "npm:2.0.15" - peerDependencies: - "@emotion/react": ^11.0.0 - "@emotion/styled": ^11.0.0 - react: ">=18" - react-dom: ">=18" - checksum: 10c0/b31d84ad7970f032419c5a72e65c7c33784c79bd16638caa6cf2a638425b7081305fcf8d1079d5ee3bd9220d1195fd49fee67412df29793924a44293cdef8881 - languageName: node - linkType: hard - -"@chakra-ui/radio@npm:2.0.19": - version: 2.0.19 - resolution: "@chakra-ui/radio@npm:2.0.19" - dependencies: - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@zag-js/focus-visible": "npm:0.2.1" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/bd3239d59a208b0094ac20fb3a01610045892e2b6d847d0999359ff2d06922a38b23043f0c3e352248c9ebe727be74d60d545809edc78181e5f09e256be0f97c - languageName: node - linkType: hard - -"@chakra-ui/react-children-utils@npm:2.0.6": - version: 2.0.6 - resolution: "@chakra-ui/react-children-utils@npm:2.0.6" - peerDependencies: - react: ">=18" - checksum: 10c0/6f61f4f976e207971c5017cca9072cce2f495c7d79a1470d9ebbcbadacff5fa853a43084ac89423b2916cac0ae08791fdaa456a27e854b54efa6ad7694d84ba5 - languageName: node - linkType: hard - -"@chakra-ui/react-context@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-context@npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/6dfccb38ba33fc6cec02f0dbe37f7e24eb40758b8ba2d3e2cac84676ef2cd0e606b16b23573b6994ae7f2b2ca012179ffadb96253b06a8332b25f64f99c4d261 - languageName: node - linkType: hard - -"@chakra-ui/react-env@npm:3.0.0": - version: 3.0.0 - resolution: "@chakra-ui/react-env@npm:3.0.0" - dependencies: - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/e4729ce4c3d21fe97a81a0ff5fe16cadcb96f2c86980b201ac18a7c53f05fe98a43ca752c4bb3a4de69943d6ecc390514d4cdff1698ba15d67908210f1d53944 - languageName: node - linkType: hard - -"@chakra-ui/react-types@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-types@npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/af77ea9c169ff7f3226f8fa54c006c844c40415e844de47fe3c4675d8fb31072e44fb66d3de78977ddd9a19cddeecf5c2f9d5289e603e81a1f71659ad62a0f49 - languageName: node - linkType: hard - -"@chakra-ui/react-use-animation-state@npm:2.0.8": - version: 2.0.8 - resolution: "@chakra-ui/react-use-animation-state@npm:2.0.8" - dependencies: - "@chakra-ui/dom-utils": "npm:2.0.6" - "@chakra-ui/react-use-event-listener": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/de735d01e1f04847ddd64c75c8dac74a61500febd3e28cd68c3c285eadec44bc8838adcb844c5e035488bbeda4f26df751f55df8b3d49327b0c147ee6eab7f31 - languageName: node - linkType: hard - -"@chakra-ui/react-use-callback-ref@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-use-callback-ref@npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/a4c247c7b8b0c6b26f145c7744ca246134618e6c1dddc1d15ade0ea2fc4a26f661cccd9ad7e3ce529e35c666ff0b43ca1212ab8de0cc6bfaa9a3aac3a76b9cbd - languageName: node - linkType: hard - -"@chakra-ui/react-use-controllable-state@npm:2.0.8": - version: 2.0.8 - resolution: "@chakra-ui/react-use-controllable-state@npm:2.0.8" - dependencies: - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/412063308089ef06847ce67b2db3da1c494bb02554405081cd39c0e4b10ef86f203caf934079da605d548c583b3da1dee6dea973f7f70b69bd77e0012303231f - languageName: node - linkType: hard - -"@chakra-ui/react-use-disclosure@npm:2.0.8": - version: 2.0.8 - resolution: "@chakra-ui/react-use-disclosure@npm:2.0.8" - dependencies: - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/821872987846ed2a19303c856b29f02331830787b866cc7f6b612555d97a547f44862e66f54264ee4b09c62e2084a11d8000b1b6d46501bb7c87d8420ea6e350 - languageName: node - linkType: hard - -"@chakra-ui/react-use-event-listener@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-use-event-listener@npm:2.0.7" - dependencies: - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/553621086316622874e3a415e542e357fae091b57d9a5629160dd57e7907e9239986b134fa7b4ff163c3268210f08c4309ea34c31decf85efc9475b55e28c6ca - languageName: node - linkType: hard - -"@chakra-ui/react-use-focus-effect@npm:2.0.9": - version: 2.0.9 - resolution: "@chakra-ui/react-use-focus-effect@npm:2.0.9" - dependencies: - "@chakra-ui/dom-utils": "npm:2.0.6" - "@chakra-ui/react-use-event-listener": "npm:2.0.7" - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/568c1ce2c8bfc4687dbabb6b9c206942a4ef6156f61c44fc32ba79b08b73e3536b8937083b3490a96831630cf937b1b3501c9d49d3c40191f3256666f891238f - languageName: node - linkType: hard - -"@chakra-ui/react-use-focus-on-pointer-down@npm:2.0.6": - version: 2.0.6 - resolution: "@chakra-ui/react-use-focus-on-pointer-down@npm:2.0.6" - dependencies: - "@chakra-ui/react-use-event-listener": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/18b572b7a2a886ea49060108666f42f8d3a4385629d1579e11a10953d489f02c0f0eae5ff7d3eef13962bc05ddaba3f30a09454f8706fa55358b136a9a5ddff4 - languageName: node - linkType: hard - -"@chakra-ui/react-use-interval@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/react-use-interval@npm:2.0.5" - dependencies: - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/823db7036dac2b30f7b536079a540d61db1ea6a069582a5451aee16a3df6ff0a8b8ea4f77ff3c3da2a1c5f081861d09277818f4e1b44058f012c6fd54bb5bbe7 - languageName: node - linkType: hard - -"@chakra-ui/react-use-latest-ref@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/react-use-latest-ref@npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/3bdafec1756c20d5f7ed9c7e179b832d93615fb76260689cc046828a19c8be170a8804519d721b0b6b078ca2b9983ddafee682b3625d2e3250d9a4328b77c93f - languageName: node - linkType: hard - -"@chakra-ui/react-use-merge-refs@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-use-merge-refs@npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/304fc9da8b5b2053576d06cdcac440b7ca67fd7aad125040e851291fcc3ed27985a6867404c8d5c8186f38025449f238a9eff20d68176da82b6c527eba8d8c46 - languageName: node - linkType: hard - -"@chakra-ui/react-use-outside-click@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-use-outside-click@npm:2.0.7" - dependencies: - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/c23a798fb604331025ffe4ee97b792a61c89285f91048fcadbddd5709d2f2078ea3d3aa08bcab01569dad42caf036534a8028571e4e2f42226613f2510c21d20 - languageName: node - linkType: hard - -"@chakra-ui/react-use-pan-event@npm:2.0.9": - version: 2.0.9 - resolution: "@chakra-ui/react-use-pan-event@npm:2.0.9" - dependencies: - "@chakra-ui/event-utils": "npm:2.0.8" - "@chakra-ui/react-use-latest-ref": "npm:2.0.5" - framesync: "npm:6.1.2" - peerDependencies: - react: ">=18" - checksum: 10c0/f10c96aaa5ff3d1bb382e460d3c303f7054c154b941ec797da9b09290ce256a3f5f10b6fc215865d5e267eb52dd6633b58b7df32112774dd4bb0ff5e1db4ade3 - languageName: node - linkType: hard - -"@chakra-ui/react-use-previous@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/react-use-previous@npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/d75bd61ff05272bd1459cb9d5adc35e447ead97217d45282ea7c62f9732b0701cefb3c38f0f343a17d9fd97894c351f0ae6cd205db427046cf814b8798f5a716 - languageName: node - linkType: hard - -"@chakra-ui/react-use-safe-layout-effect@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/react-use-safe-layout-effect@npm:2.0.5" - peerDependencies: - react: ">=18" - checksum: 10c0/0681ccbfb231c44f0d877b88babe5665e4169ab26bf29b6c1c588e6e4af7f251aac17045f1cc12c97e412093495ed073009ae4bbb097ab6513b3d282c2d99d03 - languageName: node - linkType: hard - -"@chakra-ui/react-use-size@npm:2.0.9": - version: 2.0.9 - resolution: "@chakra-ui/react-use-size@npm:2.0.9" - dependencies: - "@zag-js/element-size": "npm:0.3.1" - peerDependencies: - react: ">=18" - checksum: 10c0/b906b8887ed6215f0d1291ff7197636c93b94a8c60b4ce8385a169e8b17fc6489452704c8a801511a5568102a97e9a299c5ba2e7b746be5dd1158dd8c5dd86ae - languageName: node - linkType: hard - -"@chakra-ui/react-use-timeout@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/react-use-timeout@npm:2.0.5" - dependencies: - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/4b6bc96dbab9d5c0367a3c20f90b7f00b530a8e27834ecb6a8191a379ae59bef3c60207a83c5a67ed216171fe5f541c5e64a7c88e3f768ebebd5a3d13e6c5304 - languageName: node - linkType: hard - -"@chakra-ui/react-use-update-effect@npm:2.0.7": - version: 2.0.7 - resolution: "@chakra-ui/react-use-update-effect@npm:2.0.7" - peerDependencies: - react: ">=18" - checksum: 10c0/3651d7bd99d5d142b60af52af4d6a14da81c284da82ce7d75b47013c4291f1545fa614c1e68c064be40a580a5edd5a56e97ba3d03ea533073797e477a253d4f0 - languageName: node - linkType: hard - -"@chakra-ui/react-utils@npm:2.0.12": - version: 2.0.12 - resolution: "@chakra-ui/react-utils@npm:2.0.12" - dependencies: - "@chakra-ui/utils": "npm:2.0.15" - peerDependencies: - react: ">=18" - checksum: 10c0/2bfa8626b6da77a666896da3be80a85f90808db27f8fbbcbdce89ad0ce1ffe688c352d0ef7e07f3c048c9d73f345fd05dfa803f9d1f75d7876f3568f4e81a0c5 - languageName: node - linkType: hard - -"@chakra-ui/react@npm:2.5.1": - version: 2.5.1 - resolution: "@chakra-ui/react@npm:2.5.1" - dependencies: - "@chakra-ui/accordion": "npm:2.1.9" - "@chakra-ui/alert": "npm:2.0.17" - "@chakra-ui/avatar": "npm:2.2.5" - "@chakra-ui/breadcrumb": "npm:2.1.4" - "@chakra-ui/button": "npm:2.0.16" - "@chakra-ui/card": "npm:2.1.6" - "@chakra-ui/checkbox": "npm:2.2.10" - "@chakra-ui/close-button": "npm:2.0.17" - "@chakra-ui/control-box": "npm:2.0.13" - "@chakra-ui/counter": "npm:2.0.14" - "@chakra-ui/css-reset": "npm:2.0.12" - "@chakra-ui/editable": "npm:2.0.19" - "@chakra-ui/focus-lock": "npm:2.0.16" - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/hooks": "npm:2.1.6" - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/image": "npm:2.0.15" - "@chakra-ui/input": "npm:2.0.20" - "@chakra-ui/layout": "npm:2.1.16" - "@chakra-ui/live-region": "npm:2.0.13" - "@chakra-ui/media-query": "npm:3.2.12" - "@chakra-ui/menu": "npm:2.1.9" - "@chakra-ui/modal": "npm:2.2.9" - "@chakra-ui/number-input": "npm:2.0.18" - "@chakra-ui/pin-input": "npm:2.0.19" - "@chakra-ui/popover": "npm:2.1.8" - "@chakra-ui/popper": "npm:3.0.13" - "@chakra-ui/portal": "npm:2.0.15" - "@chakra-ui/progress": "npm:2.1.5" - "@chakra-ui/provider": "npm:2.1.2" - "@chakra-ui/radio": "npm:2.0.19" - "@chakra-ui/react-env": "npm:3.0.0" - "@chakra-ui/select": "npm:2.0.18" - "@chakra-ui/skeleton": "npm:2.0.24" - "@chakra-ui/slider": "npm:2.0.21" - "@chakra-ui/spinner": "npm:2.0.13" - "@chakra-ui/stat": "npm:2.0.17" - "@chakra-ui/styled-system": "npm:2.6.1" - "@chakra-ui/switch": "npm:2.0.22" - "@chakra-ui/system": "npm:2.5.1" - "@chakra-ui/table": "npm:2.0.16" - "@chakra-ui/tabs": "npm:2.1.8" - "@chakra-ui/tag": "npm:2.0.17" - "@chakra-ui/textarea": "npm:2.0.18" - "@chakra-ui/theme": "npm:2.2.5" - "@chakra-ui/theme-utils": "npm:2.0.11" - "@chakra-ui/toast": "npm:6.0.1" - "@chakra-ui/tooltip": "npm:2.2.6" - "@chakra-ui/transition": "npm:2.0.15" - "@chakra-ui/utils": "npm:2.0.15" - "@chakra-ui/visually-hidden": "npm:2.0.15" - peerDependencies: - "@emotion/react": ^11.0.0 - "@emotion/styled": ^11.0.0 - framer-motion: ">=4.0.0" - react: ">=18" - react-dom: ">=18" - checksum: 10c0/f32acdf5ecc5e8aeb39547662e6692174a0cfd60add5a7c2e7566b40fb841f7cab27f708ca5289d8365b93365b13e25db9ad2bdd764814b75ef9cf13b54965a7 - languageName: node - linkType: hard - -"@chakra-ui/select@npm:2.0.18": - version: 2.0.18 - resolution: "@chakra-ui/select@npm:2.0.18" - dependencies: - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/da1c41b386e9201d4ca33d76dcdfcaa29c219450cb9f934d38cec64ff34749b40e13db5e174d1d1b72d51d62478401ce83d31105895456be094cd3b8eeb7fdee - languageName: node - linkType: hard - -"@chakra-ui/shared-utils@npm:2.0.3": - version: 2.0.3 - resolution: "@chakra-ui/shared-utils@npm:2.0.3" - checksum: 10c0/89b843871a0c1128903590132d105e46153d158182391619b975de805b66dcf2dabc76fab6c4bcb506d941bf78fcc601302a5217baa74845fad265ae64c566dd - languageName: node - linkType: hard - -"@chakra-ui/shared-utils@npm:2.0.5": - version: 2.0.5 - resolution: "@chakra-ui/shared-utils@npm:2.0.5" - checksum: 10c0/d9095a4abb678e382f8fdf882a2e50fde5789267b9bf7165bd06babcbd0afcb0c8c319b78922b7ea9fdbf22659623fa8604cd76bcfec8750304fa4614c73a3f0 - languageName: node - linkType: hard - -"@chakra-ui/skeleton@npm:2.0.24": - version: 2.0.24 - resolution: "@chakra-ui/skeleton@npm:2.0.24" - dependencies: - "@chakra-ui/media-query": "npm:3.2.12" - "@chakra-ui/react-use-previous": "npm:2.0.5" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/cce3fdf6304313566af57bd2c234295e855e994248d15f121f33ce01513496178a173e6bc366ce35ee3e896f1f26fd11d6339e3a02649f61d66281aac6e9d064 - languageName: node - linkType: hard - -"@chakra-ui/slider@npm:2.0.21": - version: 2.0.21 - resolution: "@chakra-ui/slider@npm:2.0.21" - dependencies: - "@chakra-ui/number-utils": "npm:2.0.7" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-callback-ref": "npm:2.0.7" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-latest-ref": "npm:2.0.5" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/react-use-pan-event": "npm:2.0.9" - "@chakra-ui/react-use-size": "npm:2.0.9" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/188f040269143a95d0688010df5b989b2fa7bd5c47d060a33fb375dbadf5d88861093724445ad36515253ed825f90030e97194111489cbd8ab58075a8fc4dc3c - languageName: node - linkType: hard - -"@chakra-ui/spinner@npm:2.0.13": - version: 2.0.13 - resolution: "@chakra-ui/spinner@npm:2.0.13" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/77d33d63f8466d55c8e6e7880be82ec79f60e4bb2f78dbda3677eddb5528f8429e0b549a40e82ae0feed6e4a4d4de861fc00844c5c4bc3f71ce26c56815d22e4 - languageName: node - linkType: hard - -"@chakra-ui/stat@npm:2.0.17": - version: 2.0.17 - resolution: "@chakra-ui/stat@npm:2.0.17" - dependencies: - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/290842088e0fd9895879d9fa52eac63f3452f462fe8ff3bbad8c3e3f72ab65587b01ec28cedb0052f973b6be244dd5338985415846a25401623e414c7f454c61 - languageName: node - linkType: hard - -"@chakra-ui/styled-system@npm:2.6.1": - version: 2.6.1 - resolution: "@chakra-ui/styled-system@npm:2.6.1" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - csstype: "npm:^3.0.11" - lodash.mergewith: "npm:4.6.2" - checksum: 10c0/099490e55ae7b3b6dc15f7e873b56e699a17510c872a555907b680128decb7b3f7f6051664c02c78b13b7fb7f64c571ad6b787a6999ba9653e96b1c09e12a484 - languageName: node - linkType: hard - -"@chakra-ui/switch@npm:2.0.22": - version: 2.0.22 - resolution: "@chakra-ui/switch@npm:2.0.22" - dependencies: - "@chakra-ui/checkbox": "npm:2.2.10" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - framer-motion: ">=4.0.0" - react: ">=18" - checksum: 10c0/0f90af13a060e0ce97fcb0198b459165e382f9b3dd1ff2afce3286b5be1002cb7e55e5a9b774e2923b7f8e18d4bca8a20624b0ef4649838e32641e53d23e4b72 - languageName: node - linkType: hard - -"@chakra-ui/system@npm:2.5.1": - version: 2.5.1 - resolution: "@chakra-ui/system@npm:2.5.1" - dependencies: - "@chakra-ui/color-mode": "npm:2.1.12" - "@chakra-ui/object-utils": "npm:2.0.8" - "@chakra-ui/react-utils": "npm:2.0.12" - "@chakra-ui/styled-system": "npm:2.6.1" - "@chakra-ui/theme-utils": "npm:2.0.11" - "@chakra-ui/utils": "npm:2.0.15" - react-fast-compare: "npm:3.2.0" - peerDependencies: - "@emotion/react": ^11.0.0 - "@emotion/styled": ^11.0.0 - react: ">=18" - checksum: 10c0/4b3421894d6d7fab8b323f51121e564b9340e1be57701cf24d006ab66fdc29668f1874a03a40111fdf5f1d827d1d908d8e8865ef571dccf1a6794efb2fd79daa - languageName: node - linkType: hard - -"@chakra-ui/table@npm:2.0.16": - version: 2.0.16 - resolution: "@chakra-ui/table@npm:2.0.16" - dependencies: - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/6797dbd8072ada0d9aaadde823e848345f7ab82020866b3c677c76bfe3647af76a0c7bb766c08cc493cd144bf943b1fb6fe24c46b44e5ed316ae3d3e059bdf13 - languageName: node - linkType: hard - -"@chakra-ui/tabs@npm:2.1.8": - version: 2.1.8 - resolution: "@chakra-ui/tabs@npm:2.1.8" - dependencies: - "@chakra-ui/clickable": "npm:2.0.14" - "@chakra-ui/descendant": "npm:3.0.13" - "@chakra-ui/lazy-utils": "npm:2.0.5" - "@chakra-ui/react-children-utils": "npm:2.0.6" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-controllable-state": "npm:2.0.8" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/react-use-safe-layout-effect": "npm:2.0.5" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/786c095cdf15f603041bd0a4b7c3c555d85b2fe24cf4d17f4b17e0cddaefbfde36f8d4b945e31e6ae9204dbeaf1c0ad81a610fa15cc6887818021fc36e3d2298 - languageName: node - linkType: hard - -"@chakra-ui/tag@npm:2.0.17": - version: 2.0.17 - resolution: "@chakra-ui/tag@npm:2.0.17" - dependencies: - "@chakra-ui/icon": "npm:3.0.16" - "@chakra-ui/react-context": "npm:2.0.7" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/45ce1ef800788985879b56f239a6aaf57a3268fd5f3fcacf9ba67fca787e4f94dc542419e626574d842754da1c2a4d42aa9fc3abac56310c8b54be89b781f008 - languageName: node - linkType: hard - -"@chakra-ui/textarea@npm:2.0.18": - version: 2.0.18 - resolution: "@chakra-ui/textarea@npm:2.0.18" - dependencies: - "@chakra-ui/form-control": "npm:2.0.17" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/99a806faa21ba3f506c3a48bc70656a0571be4361ff4277da8329851cdc01994b1ab947e394d3fdc60e3a5b13402b4382158315cb2a0ba13a46824edf73efdb0 - languageName: node - linkType: hard - -"@chakra-ui/theme-tools@npm:2.0.17": - version: 2.0.17 - resolution: "@chakra-ui/theme-tools@npm:2.0.17" - dependencies: - "@chakra-ui/anatomy": "npm:2.1.2" - "@chakra-ui/shared-utils": "npm:2.0.5" - color2k: "npm:^2.0.0" - peerDependencies: - "@chakra-ui/styled-system": ">=2.0.0" - checksum: 10c0/e08b4a6d59f2fd7daeb3b31e96a22379b75c97cf41c593b64917cb74b5b48da6c55a413102c6d3ccf34583ff983e1ae4a4bd80a051debf73aa8618bd817525ae - languageName: node - linkType: hard - -"@chakra-ui/theme-utils@npm:2.0.11": - version: 2.0.11 - resolution: "@chakra-ui/theme-utils@npm:2.0.11" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/styled-system": "npm:2.6.1" - "@chakra-ui/theme": "npm:2.2.5" - lodash.mergewith: "npm:4.6.2" - checksum: 10c0/dcb4cd07a941f74b1dc6d74a418b9faf46be339449af46dec8c613a7d0339a093cf8f6837e3c131a8e52b7ba271c9934a2333b75ee5a7890a4a3c3e4ff8bdc7d - languageName: node - linkType: hard - -"@chakra-ui/theme@npm:2.2.5": - version: 2.2.5 - resolution: "@chakra-ui/theme@npm:2.2.5" - dependencies: - "@chakra-ui/anatomy": "npm:2.1.2" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/theme-tools": "npm:2.0.17" - peerDependencies: - "@chakra-ui/styled-system": ">=2.0.0" - checksum: 10c0/1b804afd21e67c95debc59db212b2e91e309a79876c54f934331959c12fa2a7e2ca11e6495378d089cd342f1c251cebfda5979265b7bc4146fcf166f15e7ad36 - languageName: node - linkType: hard - -"@chakra-ui/toast@npm:6.0.1": - version: 6.0.1 - resolution: "@chakra-ui/toast@npm:6.0.1" - dependencies: - "@chakra-ui/alert": "npm:2.0.17" - "@chakra-ui/close-button": "npm:2.0.17" - "@chakra-ui/portal": "npm:2.0.15" - "@chakra-ui/react-context": "npm:2.0.7" - "@chakra-ui/react-use-timeout": "npm:2.0.5" - "@chakra-ui/react-use-update-effect": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - "@chakra-ui/styled-system": "npm:2.6.1" - "@chakra-ui/theme": "npm:2.2.5" - peerDependencies: - "@chakra-ui/system": 2.5.1 - framer-motion: ">=4.0.0" - react: ">=18" - react-dom: ">=18" - checksum: 10c0/244788817d9a6d21b10bc91b6af8d6c6f6978ba0aec45bff74ee01b4d4c38c38380a62443b1bfd86543f4d5dd245e9d1696b94b42ef8f151c76e0b33e85dd458 - languageName: node - linkType: hard - -"@chakra-ui/tooltip@npm:2.2.6": - version: 2.2.6 - resolution: "@chakra-ui/tooltip@npm:2.2.6" - dependencies: - "@chakra-ui/popper": "npm:3.0.13" - "@chakra-ui/portal": "npm:2.0.15" - "@chakra-ui/react-types": "npm:2.0.7" - "@chakra-ui/react-use-disclosure": "npm:2.0.8" - "@chakra-ui/react-use-event-listener": "npm:2.0.7" - "@chakra-ui/react-use-merge-refs": "npm:2.0.7" - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - framer-motion: ">=4.0.0" - react: ">=18" - react-dom: ">=18" - checksum: 10c0/691f70a539cbbf1781325ac549c8769036dcf0ed8412e5ab67591baa9d3d5553cf1295338380e676e864becf2427fa04e6ec34c4e79f3ac743e28f1d972812ab - languageName: node - linkType: hard - -"@chakra-ui/transition@npm:2.0.15": - version: 2.0.15 - resolution: "@chakra-ui/transition@npm:2.0.15" - dependencies: - "@chakra-ui/shared-utils": "npm:2.0.5" - peerDependencies: - framer-motion: ">=4.0.0" - react: ">=18" - checksum: 10c0/4d740c7328bb0e02a334447cde2ab32be8361ff0e1961b84f25a7a67f0e093de4a2ee39dc716c4214fad8a961cffa9c46d1e1b3c8edc90e7250669d3daeefc5d - languageName: node - linkType: hard - -"@chakra-ui/utils@npm:2.0.15": - version: 2.0.15 - resolution: "@chakra-ui/utils@npm:2.0.15" - dependencies: - "@types/lodash.mergewith": "npm:4.6.7" - css-box-model: "npm:1.2.1" - framesync: "npm:6.1.2" - lodash.mergewith: "npm:4.6.2" - checksum: 10c0/5dea8094bddfeb0e6809c1110c04dc8e975c741e0ba71bef4b640fab69218436fa16509706716af2c5d326fd33c2a32f6f30870397f8eaff0a5757fe0e18a6df - languageName: node - linkType: hard - -"@chakra-ui/visually-hidden@npm:2.0.15": - version: 2.0.15 - resolution: "@chakra-ui/visually-hidden@npm:2.0.15" - peerDependencies: - "@chakra-ui/system": ">=2.0.0" - react: ">=18" - checksum: 10c0/70a04442f3866c09d2875f0986bf521f476dc4ca690c1b9947a8b201643b963bb8569b9c0e80f0ad90bb6a51668e9c3d3e4387dde40e40c2bafe7c2cf69b426d - languageName: node - linkType: hard - -"@classic-terra/terra.proto@npm:^1.1.0": - version: 1.1.0 - resolution: "@classic-terra/terra.proto@npm:1.1.0" - dependencies: - "@improbable-eng/grpc-web": "npm:^0.14.1" - google-protobuf: "npm:^3.17.3" - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.2" - checksum: 10c0/b285534bf7242286a9780a484d10d901af491bbfad1b3697f7b3439dc824ae7658ad8d2a8c3af179ef772c66a2c3c5d6118b055b0a087bea29e5a98abdfd6072 - languageName: node - linkType: hard - -"@confio/ics23@npm:^0.6.8": - version: 0.6.8 - resolution: "@confio/ics23@npm:0.6.8" - dependencies: - "@noble/hashes": "npm:^1.0.0" - protobufjs: "npm:^6.8.8" - checksum: 10c0/2f3f5032cd6a34c9b2fbd64bbf7e1cdec75ca71f348a770f7b5474b5027b12202bfbcd404eca931efddb5901f769af035a87cb8bddbf3f23d7e5d93c9d3d7f6f - languageName: node - linkType: hard - -"@cosmjs/amino@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/amino@npm:0.28.11" - dependencies: - "@cosmjs/crypto": "npm:0.28.11" - "@cosmjs/encoding": "npm:0.28.11" - "@cosmjs/math": "npm:0.28.11" - "@cosmjs/utils": "npm:0.28.11" - checksum: 10c0/902343a33e5de5b225e7cce08543001c60c89244bd8e6b0bcbac9982a67d060e38afd32cc8f3b903477703c34725cc2a55e2bb1d75fafa623d89dde57029dca5 - languageName: node - linkType: hard - -"@cosmjs/amino@npm:0.32.3": - version: 0.32.3 - resolution: "@cosmjs/amino@npm:0.32.3" - dependencies: - "@cosmjs/crypto": "npm:^0.32.3" - "@cosmjs/encoding": "npm:^0.32.3" - "@cosmjs/math": "npm:^0.32.3" - "@cosmjs/utils": "npm:^0.32.3" - checksum: 10c0/6f3da2ba6d88257d6717898af798aad9f2a51bb2c0d0b61cd40cf103c86a1431f4fa5086df350f81371d3282b8a28bcbc4f97c6d9eb83a9831fad473ae1ab492 - languageName: node - linkType: hard - -"@cosmjs/amino@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/amino@npm:0.31.3" - dependencies: - "@cosmjs/crypto": "npm:^0.31.3" - "@cosmjs/encoding": "npm:^0.31.3" - "@cosmjs/math": "npm:^0.31.3" - "@cosmjs/utils": "npm:^0.31.3" - checksum: 10c0/2f5f866df043bef072ef8802844beacd282027dcc32f69428fe98e256d5fec0dd4a45a4c7d6c45c8a7d7f4387893ef02c8b471a32d6450215f56157d6eaa467e - languageName: node - linkType: hard - -"@cosmjs/amino@npm:^0.32.0, @cosmjs/amino@npm:^0.32.3, @cosmjs/amino@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/amino@npm:0.32.4" - dependencies: - "@cosmjs/crypto": "npm:^0.32.4" - "@cosmjs/encoding": "npm:^0.32.4" - "@cosmjs/math": "npm:^0.32.4" - "@cosmjs/utils": "npm:^0.32.4" - checksum: 10c0/cd8e215b0406f5c7b73ab0a21106d06b6f76b1da12f1ab7b612884e1dd8bc626966dc67d4e7580090ade131546cbec70000f854e6596935299d054b788929a7e - languageName: node - linkType: hard - -"@cosmjs/cosmwasm-stargate@npm:0.31.3": - version: 0.31.3 - resolution: "@cosmjs/cosmwasm-stargate@npm:0.31.3" - dependencies: - "@cosmjs/amino": "npm:^0.31.3" - "@cosmjs/crypto": "npm:^0.31.3" - "@cosmjs/encoding": "npm:^0.31.3" - "@cosmjs/math": "npm:^0.31.3" - "@cosmjs/proto-signing": "npm:^0.31.3" - "@cosmjs/stargate": "npm:^0.31.3" - "@cosmjs/tendermint-rpc": "npm:^0.31.3" - "@cosmjs/utils": "npm:^0.31.3" - cosmjs-types: "npm:^0.8.0" - long: "npm:^4.0.0" - pako: "npm:^2.0.2" - checksum: 10c0/905b2139672d6ac947e19daad86b46cb1a0ff62781344e8514d41a4935911bdd75b833b4fe88fc602502358cad7cf231b40f68e5825e3e8da7852415e23991cc - languageName: node - linkType: hard - -"@cosmjs/cosmwasm-stargate@npm:^0.32.3, @cosmjs/cosmwasm-stargate@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/cosmwasm-stargate@npm:0.32.4" - dependencies: - "@cosmjs/amino": "npm:^0.32.4" - "@cosmjs/crypto": "npm:^0.32.4" - "@cosmjs/encoding": "npm:^0.32.4" - "@cosmjs/math": "npm:^0.32.4" - "@cosmjs/proto-signing": "npm:^0.32.4" - "@cosmjs/stargate": "npm:^0.32.4" - "@cosmjs/tendermint-rpc": "npm:^0.32.4" - "@cosmjs/utils": "npm:^0.32.4" - cosmjs-types: "npm:^0.9.0" - pako: "npm:^2.0.2" - checksum: 10c0/f7e285c51ef8b1098a9ea5ca2546a1e226b4fa0a990d95faa6f3b752f3638b6c55f36a56b6f4b11f0a66fd61e3ae8772921d8e99418218df0b2205efe1c82f37 - languageName: node - linkType: hard - -"@cosmjs/crypto@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/crypto@npm:0.28.11" - dependencies: - "@cosmjs/encoding": "npm:0.28.11" - "@cosmjs/math": "npm:0.28.11" - "@cosmjs/utils": "npm:0.28.11" - "@noble/hashes": "npm:^1" - bn.js: "npm:^5.2.0" - elliptic: "npm:^6.5.3" - libsodium-wrappers: "npm:^0.7.6" - checksum: 10c0/a48430f00376e730710dc353c5e134933a00cc5e40192826ec8f508afe1363ff7c8f38fe5da6f11911bd7562a511125ae960416cef21958a6a84bd8a8b07f3fd - languageName: node - linkType: hard - -"@cosmjs/crypto@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/crypto@npm:0.28.13" - dependencies: - "@cosmjs/encoding": "npm:0.28.13" - "@cosmjs/math": "npm:0.28.13" - "@cosmjs/utils": "npm:0.28.13" - "@noble/hashes": "npm:^1" - bn.js: "npm:^5.2.0" - elliptic: "npm:^6.5.3" - libsodium-wrappers: "npm:^0.7.6" - checksum: 10c0/3115567145fab289fe172ccb2db2bf4bac0113fc981ea56ddf371e6ecdbbf746c4f423b8b45adc1ef6d596429ec80aaf9976c3a985243e6d80df1bdc49026223 - languageName: node - linkType: hard - -"@cosmjs/crypto@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/crypto@npm:0.31.3" - dependencies: - "@cosmjs/encoding": "npm:^0.31.3" - "@cosmjs/math": "npm:^0.31.3" - "@cosmjs/utils": "npm:^0.31.3" - "@noble/hashes": "npm:^1" - bn.js: "npm:^5.2.0" - elliptic: "npm:^6.5.4" - libsodium-wrappers-sumo: "npm:^0.7.11" - checksum: 10c0/595de61be8832c0f012e80343427efc5f7dec6157f31410908edefcae710f31bed723b50d0979b66d961765854e76d89e6942b5430a727f458b8d7e67fc7b174 - languageName: node - linkType: hard - -"@cosmjs/crypto@npm:^0.32.3, @cosmjs/crypto@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/crypto@npm:0.32.4" - dependencies: - "@cosmjs/encoding": "npm:^0.32.4" - "@cosmjs/math": "npm:^0.32.4" - "@cosmjs/utils": "npm:^0.32.4" - "@noble/hashes": "npm:^1" - bn.js: "npm:^5.2.0" - elliptic: "npm:^6.5.4" - libsodium-wrappers-sumo: "npm:^0.7.11" - checksum: 10c0/94e742285eb8c7c5393055ba0635f10c06bf87710e953aedc71e3edc2b8e21a12a0d9b5e8eff37e326765f57c9eb3c7fd358f24f639efad4f1a6624eb8189534 - languageName: node - linkType: hard - -"@cosmjs/encoding@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/encoding@npm:0.28.11" - dependencies: - base64-js: "npm:^1.3.0" - bech32: "npm:^1.1.4" - readonly-date: "npm:^1.0.0" - checksum: 10c0/40b96cd39cb911d6ea96d74637b2ea786eeeb931eb51b0d1e68a778f1dc7611b3e63b5ca707e4bb7962d31f085efa015221b650428a2090634ac87ae9a6e45f8 - languageName: node - linkType: hard - -"@cosmjs/encoding@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/encoding@npm:0.28.13" - dependencies: - base64-js: "npm:^1.3.0" - bech32: "npm:^1.1.4" - readonly-date: "npm:^1.0.0" - checksum: 10c0/cc2256a853b2aa8dc50ffdb4214824d5eb1a055ab1512ea9492dc5b793f79ed1317a97c81e82e4cda6a17db4b1bde9d1633d5ca401afafdd218ab0b4806832f1 - languageName: node - linkType: hard - -"@cosmjs/encoding@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/encoding@npm:0.31.3" - dependencies: - base64-js: "npm:^1.3.0" - bech32: "npm:^1.1.4" - readonly-date: "npm:^1.0.0" - checksum: 10c0/48eb9f9259bdfd88db280b6b5ea970fd1b3b0f81a8f4253f315ff2c736b27dbe0fdf74405c52ad35fcd4b16f1fde4250c4de936997b9d92e79cb97d98cc538c7 - languageName: node - linkType: hard - -"@cosmjs/encoding@npm:^0.32.3, @cosmjs/encoding@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/encoding@npm:0.32.4" - dependencies: - base64-js: "npm:^1.3.0" - bech32: "npm:^1.1.4" - readonly-date: "npm:^1.0.0" - checksum: 10c0/4a30d5ae1a2d1247d44bda46101ce208c7666d8801ca9a33de94edc35cc22460c16b4834ec84d5a65ffef5e2a4b58605e0a0a056c46bc0a042979ec84acf20cd - languageName: node - linkType: hard - -"@cosmjs/json-rpc@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/json-rpc@npm:0.28.11" - dependencies: - "@cosmjs/stream": "npm:0.28.11" - xstream: "npm:^11.14.0" - checksum: 10c0/1745a07bd203f64d685460e4440ca5a64b58d2eb9624649b315eea80f54c70661c3bb61aceaf12be3eea8dfbc8ffcccc1aa67bf01afa47e3eb9497982efcab03 - languageName: node - linkType: hard - -"@cosmjs/json-rpc@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/json-rpc@npm:0.28.13" - dependencies: - "@cosmjs/stream": "npm:0.28.13" - xstream: "npm:^11.14.0" - checksum: 10c0/003c192bcdfef499234728839af433cc3bf1a0d771a497c2d0c300b87c85c7e9426ad74c9ffe9a18c6c5d894d4a8d39a4320006bcfab07f5fb4c87a4cbbfcaed - languageName: node - linkType: hard - -"@cosmjs/json-rpc@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/json-rpc@npm:0.31.3" - dependencies: - "@cosmjs/stream": "npm:^0.31.3" - xstream: "npm:^11.14.0" - checksum: 10c0/8cc8fa9490e512a2865e888b162e2cc38477a6a5b6261fce885579712c880087c8bb2733717eb5fe03c131f31064e1f9060f87ae2a4d1d01d6c465761ab1a32d - languageName: node - linkType: hard - -"@cosmjs/json-rpc@npm:^0.32.3, @cosmjs/json-rpc@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/json-rpc@npm:0.32.4" - dependencies: - "@cosmjs/stream": "npm:^0.32.4" - xstream: "npm:^11.14.0" - checksum: 10c0/b3ebd240f4fb21260e284d2e503ecc61bac898842187ab717f0efb9a5f21272f161f267cc145629caeb9735f80946844384e2bd410275a4744147a44518c0fa0 - languageName: node - linkType: hard - -"@cosmjs/math@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/math@npm:0.28.11" - dependencies: - bn.js: "npm:^5.2.0" - checksum: 10c0/7c48553f84ffba0c4cd68703d9f50ec9de0b9f8adb6801bf50341a7ef0f72a23c036159393e9c3dd47ad56631190edf77ccbe83c93d2627dbeda4c2d5791ea30 - languageName: node - linkType: hard - -"@cosmjs/math@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/math@npm:0.28.13" - dependencies: - bn.js: "npm:^5.2.0" - checksum: 10c0/81c2093ee53f7e8e2c18bebf6ce2e62ca8d509f7c7b1baa887bfe09248c703d3d0b29f0bc3c97cfeb5d0c68672eab3585a50bcdacd9e3b3b2e05de1c5021384e - languageName: node - linkType: hard - -"@cosmjs/math@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/math@npm:0.31.3" - dependencies: - bn.js: "npm:^5.2.0" - checksum: 10c0/7dd742ee6ff52bc322d3cd43b9ab0e15d70b41b74a487f64c23609ffe5abce9a02cbec46a729155608a1abb3bc0067ac97361f0af23453fb0b4c438b17e37a99 - languageName: node - linkType: hard - -"@cosmjs/math@npm:^0.32.3, @cosmjs/math@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/math@npm:0.32.4" - dependencies: - bn.js: "npm:^5.2.0" - checksum: 10c0/91e47015be5634d27d71d14c5a05899fb4992b69db02cab1558376dedf8254f96d5e24f097c5601804ae18ed33c7c25d023653ac2bf9d20250fd3e5637f6b101 - languageName: node - linkType: hard - -"@cosmjs/proto-signing@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/proto-signing@npm:0.28.11" - dependencies: - "@cosmjs/amino": "npm:0.28.11" - "@cosmjs/crypto": "npm:0.28.11" - "@cosmjs/encoding": "npm:0.28.11" - "@cosmjs/math": "npm:0.28.11" - "@cosmjs/utils": "npm:0.28.11" - cosmjs-types: "npm:^0.4.0" - long: "npm:^4.0.0" - checksum: 10c0/9569b3cf6d20c25523d5e64e551136debc52a5cbcd0cae0ae0281b88fa778df75d12a98ba0237e37fb30293ebfa3622eec3d4217c9072e7a031ec50654dda976 - languageName: node - linkType: hard - -"@cosmjs/proto-signing@npm:0.32.3": - version: 0.32.3 - resolution: "@cosmjs/proto-signing@npm:0.32.3" - dependencies: - "@cosmjs/amino": "npm:^0.32.3" - "@cosmjs/crypto": "npm:^0.32.3" - "@cosmjs/encoding": "npm:^0.32.3" - "@cosmjs/math": "npm:^0.32.3" - "@cosmjs/utils": "npm:^0.32.3" - cosmjs-types: "npm:^0.9.0" - checksum: 10c0/d44511d3a50489c1a3f61f28f68ca8cac87d6bdbb69e434cb0916dfc1d79e6a68ca0c09e074d4be73624f26fbb215024848225b862201b7f8d1d6a44014fd819 - languageName: node - linkType: hard - -"@cosmjs/proto-signing@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/proto-signing@npm:0.31.3" - dependencies: - "@cosmjs/amino": "npm:^0.31.3" - "@cosmjs/crypto": "npm:^0.31.3" - "@cosmjs/encoding": "npm:^0.31.3" - "@cosmjs/math": "npm:^0.31.3" - "@cosmjs/utils": "npm:^0.31.3" - cosmjs-types: "npm:^0.8.0" - long: "npm:^4.0.0" - checksum: 10c0/91bc6c0d03462b16e85fd6acfd3d28ab56a8de9a199f97601aac30aace75b64250bf0efcdda0aa5e3ea9e6defa46844b5f8e4358aabaeeb16d439480f55bbff7 - languageName: node - linkType: hard - -"@cosmjs/proto-signing@npm:^0.32.0, @cosmjs/proto-signing@npm:^0.32.3, @cosmjs/proto-signing@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/proto-signing@npm:0.32.4" - dependencies: - "@cosmjs/amino": "npm:^0.32.4" - "@cosmjs/crypto": "npm:^0.32.4" - "@cosmjs/encoding": "npm:^0.32.4" - "@cosmjs/math": "npm:^0.32.4" - "@cosmjs/utils": "npm:^0.32.4" - cosmjs-types: "npm:^0.9.0" - checksum: 10c0/6915059d2e6dbe1abda4a747c3b1abd47a9eff4f8cb2cf9a5545f939b656b4a15bbde2bfc1364357f9b2a081a066280c3b469f6d13dd5fc51b429b0f90a54913 - languageName: node - linkType: hard - -"@cosmjs/socket@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/socket@npm:0.28.11" - dependencies: - "@cosmjs/stream": "npm:0.28.11" - isomorphic-ws: "npm:^4.0.1" - ws: "npm:^7" - xstream: "npm:^11.14.0" - checksum: 10c0/dc108bfb47752047df1407c3813b113e17b75cf55c6920860bbe4d14be46cf868ca3843e48f796c32370c5512313d3c822857c813220cc6cad79ac1d6958efb5 - languageName: node - linkType: hard - -"@cosmjs/socket@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/socket@npm:0.28.13" - dependencies: - "@cosmjs/stream": "npm:0.28.13" - isomorphic-ws: "npm:^4.0.1" - ws: "npm:^7" - xstream: "npm:^11.14.0" - checksum: 10c0/3f522a62d8a53c3a921a8a64fdcca57352cfe7fa6083bf243aeda19e3fc4b1e7f07217f4cffbf082e50d188ec6a9732ae88bb25935903a6e7049c299861f930f - languageName: node - linkType: hard - -"@cosmjs/socket@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/socket@npm:0.31.3" - dependencies: - "@cosmjs/stream": "npm:^0.31.3" - isomorphic-ws: "npm:^4.0.1" - ws: "npm:^7" - xstream: "npm:^11.14.0" - checksum: 10c0/35ce93726f1c5c7d4cdf49c68d754b5587ac94fa65fd66f3db625c4794413359e225ddcaa55ee0bb17806a0b9cc13f884a7ec780503267addc6d03aacee1770c - languageName: node - linkType: hard - -"@cosmjs/socket@npm:^0.32.3, @cosmjs/socket@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/socket@npm:0.32.4" - dependencies: - "@cosmjs/stream": "npm:^0.32.4" - isomorphic-ws: "npm:^4.0.1" - ws: "npm:^7" - xstream: "npm:^11.14.0" - checksum: 10c0/2d94c1fb39016bea3c7c145f4565c8a0fed20c805ac569ea604cd3646c15147b82b8db18a4e3c832d6ae0c3dd14363d4db3d91bcacac922679efba164ed49386 - languageName: node - linkType: hard - -"@cosmjs/stargate@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/stargate@npm:0.28.11" - dependencies: - "@confio/ics23": "npm:^0.6.8" - "@cosmjs/amino": "npm:0.28.11" - "@cosmjs/encoding": "npm:0.28.11" - "@cosmjs/math": "npm:0.28.11" - "@cosmjs/proto-signing": "npm:0.28.11" - "@cosmjs/stream": "npm:0.28.11" - "@cosmjs/tendermint-rpc": "npm:0.28.11" - "@cosmjs/utils": "npm:0.28.11" - cosmjs-types: "npm:^0.4.0" - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.3" - xstream: "npm:^11.14.0" - checksum: 10c0/fce6291a5d436bb08592ca7041966aabf98020a5822c35835f9520b77014b9434d53155c9f8b215eda613611fae973d0116a8da72bf9c225833e6a3b7ead6d5a - languageName: node - linkType: hard - -"@cosmjs/stargate@npm:0.32.3": - version: 0.32.3 - resolution: "@cosmjs/stargate@npm:0.32.3" - dependencies: - "@confio/ics23": "npm:^0.6.8" - "@cosmjs/amino": "npm:^0.32.3" - "@cosmjs/encoding": "npm:^0.32.3" - "@cosmjs/math": "npm:^0.32.3" - "@cosmjs/proto-signing": "npm:^0.32.3" - "@cosmjs/stream": "npm:^0.32.3" - "@cosmjs/tendermint-rpc": "npm:^0.32.3" - "@cosmjs/utils": "npm:^0.32.3" - cosmjs-types: "npm:^0.9.0" - xstream: "npm:^11.14.0" - checksum: 10c0/c82db0355f4b15ca988f0452f8142102b44840319fe48d44c8dc9c1a316cbe3c9e765eb90970348bd5b5fddd6d9452d5a556e14dbbbd93eda6a6c92ceb616241 - languageName: node - linkType: hard - -"@cosmjs/stargate@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/stargate@npm:0.31.3" - dependencies: - "@confio/ics23": "npm:^0.6.8" - "@cosmjs/amino": "npm:^0.31.3" - "@cosmjs/encoding": "npm:^0.31.3" - "@cosmjs/math": "npm:^0.31.3" - "@cosmjs/proto-signing": "npm:^0.31.3" - "@cosmjs/stream": "npm:^0.31.3" - "@cosmjs/tendermint-rpc": "npm:^0.31.3" - "@cosmjs/utils": "npm:^0.31.3" - cosmjs-types: "npm:^0.8.0" - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.3" - xstream: "npm:^11.14.0" - checksum: 10c0/85ce69ac6314f5194206c01f6ef346dd3e1fbfbe4489adf5926badfabcc61913ef97e5f6d155bd2370e4e5cdedfcfb951248321b37fdfaf8e866fa0711c5cfbd - languageName: node - linkType: hard - -"@cosmjs/stargate@npm:^0.32.3, @cosmjs/stargate@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/stargate@npm:0.32.4" - dependencies: - "@confio/ics23": "npm:^0.6.8" - "@cosmjs/amino": "npm:^0.32.4" - "@cosmjs/encoding": "npm:^0.32.4" - "@cosmjs/math": "npm:^0.32.4" - "@cosmjs/proto-signing": "npm:^0.32.4" - "@cosmjs/stream": "npm:^0.32.4" - "@cosmjs/tendermint-rpc": "npm:^0.32.4" - "@cosmjs/utils": "npm:^0.32.4" - cosmjs-types: "npm:^0.9.0" - xstream: "npm:^11.14.0" - checksum: 10c0/c30a3519516aaa7eae58ba827c80fcf74c7fe7a9d3aa5cc8138c3a2768f5f241f59c2f5cec27e9037b4df12b1c6605b4fac9eadb4de97bd84edddc3a80a02e24 - languageName: node - linkType: hard - -"@cosmjs/stream@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/stream@npm:0.28.11" - dependencies: - xstream: "npm:^11.14.0" - checksum: 10c0/d32018ef4f73fb204177a5b59641a1c392fb12470ca172d821d34992bc12ecf87c7bcd2084c01bf315ea6c86cf8aa86ccb8d427e383929bb0e2109fdfaadfefd - languageName: node - linkType: hard - -"@cosmjs/stream@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/stream@npm:0.28.13" - dependencies: - xstream: "npm:^11.14.0" - checksum: 10c0/2e328871cab4e504c75645f8a087a3125c7593c1a0ff88c0c527efac79fd53e8ed7ba3bf1a094c69b16c963ce731cfb93379cb32993c37ddb4db29a4a032753b - languageName: node - linkType: hard - -"@cosmjs/stream@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/stream@npm:0.31.3" - dependencies: - xstream: "npm:^11.14.0" - checksum: 10c0/e0279b925c4f02535ba9b1f6f9563a1db4fb53ed1396e4e3958fcad887e047a78b431a227dd7c159aadb6e0e054db9dfb34b7a9128f2082ff3114bcfd74516c3 - languageName: node - linkType: hard - -"@cosmjs/stream@npm:^0.32.3, @cosmjs/stream@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/stream@npm:0.32.4" - dependencies: - xstream: "npm:^11.14.0" - checksum: 10c0/c677c53f9101c2a36fa03a475d92dea2fa69c475f896751b5e18a5d07087eeecbf6bca2e62a8940003da53fa235a9b2dd78c8257bf19c3f96e3f69fa8d5f183d - languageName: node - linkType: hard - -"@cosmjs/tendermint-rpc@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/tendermint-rpc@npm:0.28.11" - dependencies: - "@cosmjs/crypto": "npm:0.28.11" - "@cosmjs/encoding": "npm:0.28.11" - "@cosmjs/json-rpc": "npm:0.28.11" - "@cosmjs/math": "npm:0.28.11" - "@cosmjs/socket": "npm:0.28.11" - "@cosmjs/stream": "npm:0.28.11" - "@cosmjs/utils": "npm:0.28.11" - axios: "npm:^0.21.2" - readonly-date: "npm:^1.0.0" - xstream: "npm:^11.14.0" - checksum: 10c0/5356e9b90ac8e358f452d7e8aea026e8d2d506af864efc26eafcbbc3c57717575710302b45d94f0e7e3d004e9a827c616a61f06e8faa5dc1ea36c8b82a41a39a - languageName: node - linkType: hard - -"@cosmjs/tendermint-rpc@npm:0.32.3": - version: 0.32.3 - resolution: "@cosmjs/tendermint-rpc@npm:0.32.3" - dependencies: - "@cosmjs/crypto": "npm:^0.32.3" - "@cosmjs/encoding": "npm:^0.32.3" - "@cosmjs/json-rpc": "npm:^0.32.3" - "@cosmjs/math": "npm:^0.32.3" - "@cosmjs/socket": "npm:^0.32.3" - "@cosmjs/stream": "npm:^0.32.3" - "@cosmjs/utils": "npm:^0.32.3" - axios: "npm:^1.6.0" - readonly-date: "npm:^1.0.0" - xstream: "npm:^11.14.0" - checksum: 10c0/9ccde526456e9c4be7a2562c3def25a016267404a057e807ecc0f520aeb0cbfc5bf04bfca58ceecd6f7bf61b7089924c7949c13a7d685efc7ad946b71388c3df - languageName: node - linkType: hard - -"@cosmjs/tendermint-rpc@npm:^0.28.11": - version: 0.28.13 - resolution: "@cosmjs/tendermint-rpc@npm:0.28.13" - dependencies: - "@cosmjs/crypto": "npm:0.28.13" - "@cosmjs/encoding": "npm:0.28.13" - "@cosmjs/json-rpc": "npm:0.28.13" - "@cosmjs/math": "npm:0.28.13" - "@cosmjs/socket": "npm:0.28.13" - "@cosmjs/stream": "npm:0.28.13" - "@cosmjs/utils": "npm:0.28.13" - axios: "npm:^0.21.2" - readonly-date: "npm:^1.0.0" - xstream: "npm:^11.14.0" - checksum: 10c0/3bea33ad9eefe1be9edc0040b78bd30c242297e9f8f54c5418cc6739351e545983853131a5e66668c6875accfbc2535be317a921a3f78963fea72e53df69cf40 - languageName: node - linkType: hard - -"@cosmjs/tendermint-rpc@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/tendermint-rpc@npm:0.31.3" - dependencies: - "@cosmjs/crypto": "npm:^0.31.3" - "@cosmjs/encoding": "npm:^0.31.3" - "@cosmjs/json-rpc": "npm:^0.31.3" - "@cosmjs/math": "npm:^0.31.3" - "@cosmjs/socket": "npm:^0.31.3" - "@cosmjs/stream": "npm:^0.31.3" - "@cosmjs/utils": "npm:^0.31.3" - axios: "npm:^0.21.2" - readonly-date: "npm:^1.0.0" - xstream: "npm:^11.14.0" - checksum: 10c0/1d8d8a78cc1dc54884c0916e709c98d533215f2235ce48f2079cbd8b3a9edf7aa14f216b815d727cacabfead54c0b15ca622fd43243260d8d311bc408edd0f11 - languageName: node - linkType: hard - -"@cosmjs/tendermint-rpc@npm:^0.32.3, @cosmjs/tendermint-rpc@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/tendermint-rpc@npm:0.32.4" - dependencies: - "@cosmjs/crypto": "npm:^0.32.4" - "@cosmjs/encoding": "npm:^0.32.4" - "@cosmjs/json-rpc": "npm:^0.32.4" - "@cosmjs/math": "npm:^0.32.4" - "@cosmjs/socket": "npm:^0.32.4" - "@cosmjs/stream": "npm:^0.32.4" - "@cosmjs/utils": "npm:^0.32.4" - axios: "npm:^1.6.0" - readonly-date: "npm:^1.0.0" - xstream: "npm:^11.14.0" - checksum: 10c0/5fae7afcdf98cc7dd36922aa1586254cc8c202cf8fe66804e61d793d31dcff816f40d33f7a0eb72c1b9226c7c361d4848e4ff12d0489f6fa66f47f0c86ae18dd - languageName: node - linkType: hard - -"@cosmjs/utils@npm:0.28.11": - version: 0.28.11 - resolution: "@cosmjs/utils@npm:0.28.11" - checksum: 10c0/e894607e1118184459d4a8d4a2c900b0c284cd3a463b13c4a725324fc58ceda849cdc75041590daa86dd65245cb2287958a3af9ca4c5fa4223a63dd59aa89701 - languageName: node - linkType: hard - -"@cosmjs/utils@npm:0.28.13": - version: 0.28.13 - resolution: "@cosmjs/utils@npm:0.28.13" - checksum: 10c0/e77211f9c1133ac2ffaee6f61d71f35fe5ac2114d56f10eedd98c0323dda2d9f7f84c1becdb05d2dfff3bed6707871d5c32d81d5c681e4e6d69159536b737e01 - languageName: node - linkType: hard - -"@cosmjs/utils@npm:^0.31.3": - version: 0.31.3 - resolution: "@cosmjs/utils@npm:0.31.3" - checksum: 10c0/26266e1206ed8c7c4e744db1e97fc7a341ffee383ca9f43e6c9e8ff596039a90068c39aadc4f6524b6f2b5b6d581318657f3eb272f98b9e430f2d0df79382b6a - languageName: node - linkType: hard - -"@cosmjs/utils@npm:^0.32.3, @cosmjs/utils@npm:^0.32.4": - version: 0.32.4 - resolution: "@cosmjs/utils@npm:0.32.4" - checksum: 10c0/d5ff8b235094be1150853a715116049f73eb5cdfeea8ce8e22ecccc61ec99792db457404d4307782b1a2f935dcf438f5c485beabfcfbc1dc5df26eb6e6da9062 - languageName: node - linkType: hard - -"@cosmjson/wasmswap@npm:^0.0.9": - version: 0.0.9 - resolution: "@cosmjson/wasmswap@npm:0.0.9" - checksum: 10c0/008797b5a917ba3b8907ea7faa2f40d14fc4ad6b59f422e94d4e9395dbda3f3d902e9a811845b3d942cbc60f9f0c20af5fbf7fe5133ef4eaa9275c559e5a9203 - languageName: node - linkType: hard - -"@cosmology/ast@npm:^0.92.0": - version: 0.92.0 - resolution: "@cosmology/ast@npm:0.92.0" - dependencies: - "@babel/parser": "npm:^7.21.4" - "@babel/runtime": "npm:^7.21.0" - "@babel/types": "npm:7.21.4" - "@cosmology/types": "npm:^0.39.0" - "@cosmology/utils": "npm:^0.14.0" - case: "npm:1.6.3" - dotty: "npm:0.1.2" - checksum: 10c0/77281ee54e2c61a08f3e92e5e00edb00320a30553ffd204654329523c40ceb7d624a007da802b2eee5f7728fd624860a5df265c046466853dccd7ae5eb1ad794 - languageName: node - linkType: hard - -"@cosmology/connect-chain-with-telescope@workspace:.": - version: 0.0.0-use.local - resolution: "@cosmology/connect-chain-with-telescope@workspace:." - dependencies: - "@chain-registry/osmosis": "npm:^1.21.0" - "@chain-registry/types": "npm:0.17.0" - "@chakra-ui/icons": "npm:2.0.12" - "@chakra-ui/react": "npm:2.5.1" - "@cosmjs/amino": "npm:0.32.3" - "@cosmjs/cosmwasm-stargate": "npm:0.31.3" - "@cosmjs/proto-signing": "npm:0.32.3" - "@cosmjs/stargate": "npm:0.32.3" - "@cosmjson/wasmswap": "npm:^0.0.9" - "@cosmology/lcd": "npm:^0.12.0" - "@cosmology/telescope": "npm:^0.106.0" - "@cosmos-kit/react": "npm:2.17.0" - "@emotion/react": "npm:11.10.6" - "@emotion/styled": "npm:11.10.6" - "@interchain-kit/core": "npm:0.0.1-beta.8" - "@interchain-kit/keplr-extension": "npm:0.0.1-beta.8" - "@interchain-kit/react": "npm:0.0.1-beta.8" - "@interchain-ui/react": "npm:^1.23.29" - "@interchain-ui/react-no-ssr": "npm:^0.1.6" - "@protobufs/cosmos": "npm:^0.1.0" - "@protobufs/cosmwasm": "npm:^0.1.1" - "@protobufs/ibc": "npm:^0.1.0" - "@tanstack/react-query": "npm:4.32.0" - "@types/node": "npm:^20.14.6" - "@types/react": "npm:^18.3.3" - "@types/react-dom": "npm:^18.3.0" - bignumber.js: "npm:9.1.0" - chain-registry: "npm:1.20.0" - chakra-react-select: "npm:^4.7.0" - cosmos-kit: "npm:2.18.0" - dayjs: "npm:^1.11.11" - eslint: "npm:8.28.0" - eslint-config-next: "npm:13.0.5" - fast-fuzzy: "npm:^1.12.0" - framer-motion: "npm:9.0.7" - generate-lockfile: "npm:0.0.12" - interchainjs: "npm:0.0.1-beta.12" - mobx: "npm:^6.7.0" - mobx-react: "npm:^7.6.0" - next: "npm:^13" - osmojs: "npm:^16.5.1" - react: "npm:^18.2" - react-dom: "npm:^18.2" - react-icons: "npm:^4.12.0" - react-markdown: "npm:^8.0.7" - react-minimal-pie-chart: "npm:^8.4.0" - typescript: "npm:^5.1.6" - languageName: unknown - linkType: soft - -"@cosmology/lcd@npm:^0.12.0": - version: 0.12.0 - resolution: "@cosmology/lcd@npm:0.12.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - axios: "npm:0.27.2" - checksum: 10c0/28fbc26cd4c7cf693ae5be7aab637d1f5420f407dbc7a588d67bf5e5bb5e8f0b58e1c428993ca54dbe1dbac8c9dbd9d2713dffad76dfbc727d7bb77b5fb9b041 - languageName: node - linkType: hard - -"@cosmology/lcd@npm:^0.13.3": - version: 0.13.4 - resolution: "@cosmology/lcd@npm:0.13.4" - dependencies: - axios: "npm:1.6.0" - checksum: 10c0/9d8642747b1badc74da743dd5d65c81294d277c1a140400a604158b4e1e003a7abab6c0cdcebe93e39a762e3f0576a2072eaf6862321005e98283815a4a246ec - languageName: node - linkType: hard - -"@cosmology/proto-parser@npm:^0.48.0": - version: 0.48.0 - resolution: "@cosmology/proto-parser@npm:0.48.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - "@cosmology/protobufjs": "npm:6.11.6" - "@cosmology/types": "npm:^0.39.0" - "@cosmology/utils": "npm:^0.14.0" - dotty: "npm:0.1.2" - glob: "npm:8.0.3" - minimatch: "npm:5.1.0" - mkdirp: "npm:3.0.0" - checksum: 10c0/d31bbb5e699bc9400de4d8e168de4399ec3cfe00c92a8f1227feb19d5bbee8ae7f6a9ba07c74cd903dc373139e4d81a0e117ce33b8b0ff451b8f2af49abc02de - languageName: node - linkType: hard - -"@cosmology/protobufjs@npm:6.11.6": - version: 6.11.6 - resolution: "@cosmology/protobufjs@npm:6.11.6" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.4" - "@protobufjs/eventemitter": "npm:^1.1.0" - "@protobufjs/fetch": "npm:^1.1.0" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/inquire": "npm:^1.1.0" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.0" - "@types/long": "npm:^4.0.1" - "@types/node": "npm:>=13.7.0" - long: "npm:^4.0.0" - bin: - pbjs: bin/pbjs - pbts: bin/pbts - checksum: 10c0/1663f4dde8dbf1e652291c4fe28b52a81e7b271eda4904483045444e3a18e32342ab008fe763c71a941d39fde915a627cd76018c235118b1ea9446197259eb1f - languageName: node - linkType: hard - -"@cosmology/telescope@npm:^0.106.0": - version: 0.106.0 - resolution: "@cosmology/telescope@npm:0.106.0" - dependencies: - "@babel/core": "npm:7.21.4" - "@babel/generator": "npm:7.21.4" - "@babel/parser": "npm:^7.21.4" - "@babel/plugin-proposal-class-properties": "npm:7.18.6" - "@babel/plugin-proposal-export-default-from": "npm:7.18.10" - "@babel/plugin-proposal-object-rest-spread": "npm:7.20.7" - "@babel/plugin-transform-runtime": "npm:7.21.4" - "@babel/preset-env": "npm:7.21.4" - "@babel/preset-typescript": "npm:^7.21.4" - "@babel/runtime": "npm:^7.21.0" - "@babel/traverse": "npm:7.21.4" - "@babel/types": "npm:7.21.4" - "@cosmology/ast": "npm:^0.92.0" - "@cosmology/proto-parser": "npm:^0.48.0" - "@cosmology/types": "npm:^0.39.0" - "@cosmology/utils": "npm:^0.14.0" - "@cosmwasm/ts-codegen": "npm:0.34.0" - "@types/parse-package-name": "npm:0.1.0" - case: "npm:1.6.3" - dargs: "npm:7.0.0" - deepmerge: "npm:4.3.1" - dotty: "npm:0.1.2" - fuzzy: "npm:0.1.3" - glob: "npm:8.0.3" - inquirerer: "npm:0.1.3" - long: "npm:^5.2.1" - minimatch: "npm:5.1.0" - minimist: "npm:1.2.8" - mkdirp: "npm:3.0.0" - parse-package-name: "npm:1.0.0" - rimraf: "npm:5.0.0" - shelljs: "npm:0.8.5" - bin: - telescope: main/telescope.js - checksum: 10c0/707b7ae3ed1604d15fcc3387470b23fb0e1fb0ad233550b4dd0b9c759395d81b3066447eb24b1ff9c1d51b1590b7f021b8e4080a16148f74c5617049614b5c35 - languageName: node - linkType: hard - -"@cosmology/types@npm:^0.39.0": - version: 0.39.0 - resolution: "@cosmology/types@npm:0.39.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - case: "npm:1.6.3" - checksum: 10c0/d3da18ba3b5d78ba326748e39a033187e0c48d39ce33a00dcfe7a129e89be4c886e1fc03632cceb4ffedd8d4168990aa376b8d821cafd41dc500447396b038c6 - languageName: node - linkType: hard - -"@cosmology/utils@npm:^0.14.0": - version: 0.14.0 - resolution: "@cosmology/utils@npm:0.14.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - "@cosmology/types": "npm:^0.39.0" - dotty: "npm:0.1.2" - checksum: 10c0/d5ea131cade4b41f6bfd44b801f24d4ce2a443f869ac83fd570b4d8fda19cb2d60ab61261348588d0f08c5d7ff5b47bcf17010d5eb969f2fbdb3129607278333 - languageName: node - linkType: hard - -"@cosmos-kit/cdcwallet-extension@npm:^2.13.2": - version: 2.13.2 - resolution: "@cosmos-kit/cdcwallet-extension@npm:2.13.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/2c159f90a568ed1a94495950ddc9d5674249276e803eff784143c2b35986933b95a8a8735d6fcd670070651e8bf3c8de67013cd5f58e62dae95f488bfd1a85d9 - languageName: node - linkType: hard - -"@cosmos-kit/cdcwallet@npm:^2.13.0": - version: 2.13.2 - resolution: "@cosmos-kit/cdcwallet@npm:2.13.2" - dependencies: - "@cosmos-kit/cdcwallet-extension": "npm:^2.13.2" - checksum: 10c0/d9d0d888a771810356154bc4fbfb1b4530cb97831ce7ff1e35c46a2b388864660dc9e0a7c7b76dff720c0a922645a519877e3f0e69180633f48e06ac0f8a5bf5 - languageName: node - linkType: hard - -"@cosmos-kit/coin98-extension@npm:^2.12.2": - version: 2.12.2 - resolution: "@cosmos-kit/coin98-extension@npm:2.12.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - cosmjs-types: "npm:>=0.9.0" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/1a1423dd45288f77b7cb615342fa9750a11cfd741d5047ef6737d258d6af115f5e2ef6eac4cc41b5ed7599db7d21d02fb7682e02b0f1b533625714a8316794da - languageName: node - linkType: hard - -"@cosmos-kit/coin98@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/coin98@npm:2.11.2" - dependencies: - "@cosmos-kit/coin98-extension": "npm:^2.12.2" - checksum: 10c0/7b9cf76b26e816743e17011eb3f1780bf9b49cbcdb7a8d2534322189c4e8e785212fe20794903ffbcfd11c532ab1828463d2527bba85b4a27f921bb8f63e1c9a - languageName: node - linkType: hard - -"@cosmos-kit/compass-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/compass-extension@npm:2.11.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/663087e375619b271e0a0c41e45679c5e45ba17d0c6bd12a354316471ad186454583d15ff5076c106660b9becd723ed6ad3645a502352309a453053955cea8cf - languageName: node - linkType: hard - -"@cosmos-kit/compass@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/compass@npm:2.11.2" - dependencies: - "@cosmos-kit/compass-extension": "npm:^2.11.2" - checksum: 10c0/35fe8f1cfe889425cfd85ed41e8299839677a12a4fe3228b78cf2cf5e9389990aeb737b7cea3c9fb7b316a72abfa4bcd441fe07a4065f14e7f59b96d108b7ffe - languageName: node - linkType: hard - -"@cosmos-kit/core@npm:^2.13.0, @cosmos-kit/core@npm:^2.13.1": - version: 2.13.1 - resolution: "@cosmos-kit/core@npm:2.13.1" - dependencies: - "@chain-registry/client": "npm:^1.48.1" - "@chain-registry/keplr": "npm:^1.68.2" - "@chain-registry/types": "npm:^0.45.1" - "@cosmjs/amino": "npm:^0.32.3" - "@cosmjs/cosmwasm-stargate": "npm:^0.32.3" - "@cosmjs/proto-signing": "npm:^0.32.3" - "@cosmjs/stargate": "npm:^0.32.3" - "@dao-dao/cosmiframe": "npm:^0.1.0" - "@walletconnect/types": "npm:2.11.0" - bowser: "npm:2.11.0" - cosmjs-types: "npm:^0.9.0" - events: "npm:3.3.0" - nock: "npm:13.5.4" - uuid: "npm:^9.0.1" - checksum: 10c0/5295440b213fed8d1853023253888652dd57624ea7dee86720c04964f00209078fafc843359686daffac78fc8e52b68078fbbdf4552dd2e8903315f2ab0e22d5 - languageName: node - linkType: hard - -"@cosmos-kit/cosmostation-extension@npm:^2.13.0": - version: 2.13.0 - resolution: "@cosmos-kit/cosmostation-extension@npm:2.13.0" - dependencies: - "@chain-registry/cosmostation": "npm:^1.66.2" - "@cosmos-kit/core": "npm:^2.13.1" - cosmjs-types: "npm:^0.9.0" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/af0e4e250041a6ea75c208c791f20a2d8d78bd5d11fe6f3264ae03c340a2d1ef3133dff9fd997c0f08e8402f4b658c3b22c73a36f2fe48119b7329617ec1919f - languageName: node - linkType: hard - -"@cosmos-kit/cosmostation-mobile@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/cosmostation-mobile@npm:2.11.2" - dependencies: - "@chain-registry/cosmostation": "npm:1.66.2" - "@cosmos-kit/core": "npm:^2.13.1" - "@cosmos-kit/walletconnect": "npm:^2.10.1" - checksum: 10c0/a52d1ae62b1797b809251715e3c88c74646053e34f9e9b96d9d170c252ecf18118bf55e58ca59a8fd50fa7503cd5aebd5a59546de1dabfa618f09733ff3c5439 - languageName: node - linkType: hard - -"@cosmos-kit/cosmostation@npm:^2.11.0": - version: 2.12.0 - resolution: "@cosmos-kit/cosmostation@npm:2.12.0" - dependencies: - "@cosmos-kit/cosmostation-extension": "npm:^2.13.0" - "@cosmos-kit/cosmostation-mobile": "npm:^2.11.2" - checksum: 10c0/dd1ae4a8968557c16fc2c07c8e58df7d8ed22e68a3ae728f06d18eddb72eafccae00896fd574eb839ef44e0fcae159d0b5c75b3941b71013c4b372e57dc9e2e2 - languageName: node - linkType: hard - -"@cosmos-kit/exodus-extension@npm:^2.10.2": - version: 2.10.2 - resolution: "@cosmos-kit/exodus-extension@npm:2.10.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - react-icons: "npm:4.4.0" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/a6b7716472fd28a3172a99471d8e8f9c557344f0c9ea36e5e031f2424e9674ba5de16998fcb2bd0b72d5037a93bfae662f687d83f04268647042462707de3c6c - languageName: node - linkType: hard - -"@cosmos-kit/exodus@npm:^2.10.0": - version: 2.10.2 - resolution: "@cosmos-kit/exodus@npm:2.10.2" - dependencies: - "@cosmos-kit/exodus-extension": "npm:^2.10.2" - checksum: 10c0/5733c78fbf176824881124b97a0404d95faf366d39b13fa4e3eecc1119edc9932f7f1469bd2c66d7f7c41d28d70392bf66deaebc76ba3c0a6f353f6e7d557502 - languageName: node - linkType: hard - -"@cosmos-kit/fin-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/fin-extension@npm:2.11.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/314968c6c2c637fbc4d7785dd3fb2e12203ea9566583f7b8bc101833c59497d9ce3bd0216236b5dbcbb787d0492b80f9e501bd54d898f5a150b8f76fa46d4537 - languageName: node - linkType: hard - -"@cosmos-kit/fin@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/fin@npm:2.11.2" - dependencies: - "@cosmos-kit/fin-extension": "npm:^2.11.2" - checksum: 10c0/f24e13e27baf5caf37f1bd18474dad022f4b987fd0213974c7fdd4510cfce3eab428d69ed73ed134115f3b91aa208ec29451ab92f71146660a510ea92f08a025 - languageName: node - linkType: hard - -"@cosmos-kit/frontier-extension@npm:^2.10.2": - version: 2.10.2 - resolution: "@cosmos-kit/frontier-extension@npm:2.10.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/ae6ceeaaded9367d0a46932d534c051c0ec8d49a76dd80144c61f8de5d9ddbf3cdfe03b682a2ea66756ce93e46e2e1142251a31174ffbc45f688a1aff9cc3155 - languageName: node - linkType: hard - -"@cosmos-kit/frontier@npm:^2.10.0": - version: 2.10.2 - resolution: "@cosmos-kit/frontier@npm:2.10.2" - dependencies: - "@cosmos-kit/frontier-extension": "npm:^2.10.2" - checksum: 10c0/617ed26dd6cecf960b511180f9a15b4a1360ae7293467ea165b25a4ce89e192d98dc47d77d4086af79abd7ca682a26d2311ac61c3c3cf164b0007a87bca994f5 - languageName: node - linkType: hard - -"@cosmos-kit/galaxy-station-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/galaxy-station-extension@npm:2.11.2" - dependencies: - "@chain-registry/types": "npm:0.45.1" - "@cosmos-kit/core": "npm:^2.13.1" - "@hexxagon/feather.js": "npm:^1.0.9-beta.8" - "@hexxagon/station-connector": "npm:^1.0.17" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/6c481b17504935ed589583d18cda708a9d81efde41e66c589b16ee401b8ae72a887b016a106a3a0f2ce9afd12560244474ccd11f818143d342169cea769ca073 - languageName: node - linkType: hard - -"@cosmos-kit/galaxy-station@npm:^2.10.0": - version: 2.10.2 - resolution: "@cosmos-kit/galaxy-station@npm:2.10.2" - dependencies: - "@cosmos-kit/galaxy-station-extension": "npm:^2.11.2" - checksum: 10c0/86721b41a710dae0c8ec22c0466def90ef8b61cd09505e648d145bcd48997413e996cda4330bfce96e2e788cfcd572bbed556ad1d4d8ef693a1e7a6a3cb765d4 - languageName: node - linkType: hard - -"@cosmos-kit/keplr-extension@npm:^2.12.2": - version: 2.12.2 - resolution: "@cosmos-kit/keplr-extension@npm:2.12.2" - dependencies: - "@chain-registry/keplr": "npm:^1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - "@keplr-wallet/provider-extension": "npm:^0.12.95" - "@keplr-wallet/types": "npm:^0.12.95" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/679a71402b31a520dfe4a14ac18b7d3bc2aec75132760f4d3ad67ae91170a52e5c33587fb8208126ffec8ac911fe07413d37edf2d99c4637fec8d836d6338753 - languageName: node - linkType: hard - -"@cosmos-kit/keplr-mobile@npm:^2.12.2": - version: 2.12.2 - resolution: "@cosmos-kit/keplr-mobile@npm:2.12.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - "@cosmos-kit/keplr-extension": "npm:^2.12.2" - "@cosmos-kit/walletconnect": "npm:^2.10.1" - "@keplr-wallet/provider-extension": "npm:^0.12.95" - "@keplr-wallet/wc-client": "npm:^0.12.95" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/9e8ece5399bd206089e796812018e36ba76be39282e6b397316cb8c102512ee3e866d7b297530067f1705aa808095e016ae785295f0f8cc5d3ae2b780c943090 - languageName: node - linkType: hard - -"@cosmos-kit/keplr@npm:^2.12.0": - version: 2.12.2 - resolution: "@cosmos-kit/keplr@npm:2.12.2" - dependencies: - "@cosmos-kit/keplr-extension": "npm:^2.12.2" - "@cosmos-kit/keplr-mobile": "npm:^2.12.2" - checksum: 10c0/7bc3c2f6b8c360ab0d8fedc02353341d2ad64351d4f309e2a8374484170975e2cdb1a6866af58a2edb1957cc5e4e28012b43f283d23e4e3e9f0478d2db2770ae - languageName: node - linkType: hard - -"@cosmos-kit/leap-extension@npm:^2.12.2": - version: 2.12.2 - resolution: "@cosmos-kit/leap-extension@npm:2.12.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/5d7130cefbf5d29e05f7b792ac8f4d31ffd962088a25531d5be7cae5221309755a8a978982baf627d069d9ff315a6de592c527539657ee3dcf6f6957d205d223 - languageName: node - linkType: hard - -"@cosmos-kit/leap-metamask-cosmos-snap@npm:^0.12.2": - version: 0.12.2 - resolution: "@cosmos-kit/leap-metamask-cosmos-snap@npm:0.12.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - "@leapwallet/cosmos-snap-provider": "npm:0.1.26" - "@metamask/providers": "npm:^11.1.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - cosmjs-types: ">=0.9.0" - checksum: 10c0/123838d21fb83fce13f4635bf34c6484dd8f5e9f6d24d5ce674afd196e0a67c9f6e3e6068c873160060377c8c231d3089a40e5d93a51c9526eed1bd91d8a0080 - languageName: node - linkType: hard - -"@cosmos-kit/leap-mobile@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/leap-mobile@npm:2.11.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - "@cosmos-kit/walletconnect": "npm:^2.10.1" - checksum: 10c0/b00131dcdf4155dd6fde16afc3233accf64b31a1dbfbc854b95d7b89642fe95c39d182477cbd102b335b59a59f659072238a29f84e970f3e126694ee22d74596 - languageName: node - linkType: hard - -"@cosmos-kit/leap@npm:^2.12.0": - version: 2.12.2 - resolution: "@cosmos-kit/leap@npm:2.12.2" - dependencies: - "@cosmos-kit/leap-extension": "npm:^2.12.2" - "@cosmos-kit/leap-metamask-cosmos-snap": "npm:^0.12.2" - "@cosmos-kit/leap-mobile": "npm:^2.11.2" - checksum: 10c0/cf146378bfd82c7ca84ed4dbd95371ab02b496cd98aa041e5047dfa529f7c9723aae57cc74811f810ebbd737902ea84ea4677d82d9099ab7b2d5c1df19c3a104 - languageName: node - linkType: hard - -"@cosmos-kit/ledger@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/ledger@npm:2.11.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - "@ledgerhq/hw-app-cosmos": "npm:^6.28.1" - "@ledgerhq/hw-transport-webhid": "npm:^6.27.15" - "@ledgerhq/hw-transport-webusb": "npm:^6.27.15" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/96bacf4e41569bb274d10871e1974d156bc2a58e2e3bdf7ae7ee1b73630d2267f6a852c114e9ee30cda03ddda9f7e3d74ed2b937e9c575f84f87919804f985ec - languageName: node - linkType: hard - -"@cosmos-kit/okxwallet-extension@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/okxwallet-extension@npm:2.11.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/f2b2bd0067eed702f6a16cf8ef716e1c6a7aa42d8f263b90f4fb8e2346c41a275221a544c4fd42bb50a83d13c254de90d428e1f0b22c3591075e0daf37d069eb - languageName: node - linkType: hard - -"@cosmos-kit/omni-mobile@npm:^2.10.2": - version: 2.10.2 - resolution: "@cosmos-kit/omni-mobile@npm:2.10.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - "@cosmos-kit/walletconnect": "npm:^2.10.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/71a780a4f7a9ffa60be8c35c0515123c4e657a4f4495df23c0343d870838ebac64a65678a15748774b166f60cde5894075534213e354f54d4e12d09cbada3cf3 - languageName: node - linkType: hard - -"@cosmos-kit/omni@npm:^2.10.0": - version: 2.10.2 - resolution: "@cosmos-kit/omni@npm:2.10.2" - dependencies: - "@cosmos-kit/omni-mobile": "npm:^2.10.2" - checksum: 10c0/d33c64f53f740cf4c50bbdf04a195c8f676d1acfb94aac82b996cd183afdd405602904ac1ff11c41daddcde2a56691f959d528259e7d26d0a57b18ce61d4807e - languageName: node - linkType: hard - -"@cosmos-kit/owallet-extension@npm:^2.12.2": - version: 2.12.2 - resolution: "@cosmos-kit/owallet-extension@npm:2.12.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - "@keplr-wallet/types": "npm:^0.12.90" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/c6e10fa9caff33c3a8788ec1be4a12ee2c25d906a4fb24b0b08c387d6ea6c6b6b3d0e2a77e980c0839513a42ef790db897a310327ba0354a0ed79987f98ca285 - languageName: node - linkType: hard - -"@cosmos-kit/owallet@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/owallet@npm:2.11.2" - dependencies: - "@cosmos-kit/owallet-extension": "npm:^2.12.2" - checksum: 10c0/06d2a2b086d932ac18824a926674e6f102c99e4cd8ebfb79e5e0254d594c2ef82b2e44da550144ce56bd685c44a84b6c4cecc421b062b7a1ed07a07ae9f0e52a - languageName: node - linkType: hard - -"@cosmos-kit/react-lite@npm:^2.12.0": - version: 2.13.0 - resolution: "@cosmos-kit/react-lite@npm:2.13.0" - dependencies: - "@chain-registry/types": "npm:^0.45.1" - "@cosmos-kit/core": "npm:^2.13.1" - "@dao-dao/cosmiframe": "npm:^0.1.0" - peerDependencies: - "@types/react": ">= 17" - "@types/react-dom": ">= 17" - react: ^18 - react-dom: ^18 - checksum: 10c0/8eae200d14fdd74cfad691a56ae3cd87e4d84f3b0483669adc4cc0228782bd630959b13e0cd1276ad3b297aa21b56bbd93867e9644daa25bd4ea95cbafa682a6 - languageName: node - linkType: hard - -"@cosmos-kit/react@npm:2.17.0": - version: 2.17.0 - resolution: "@cosmos-kit/react@npm:2.17.0" - dependencies: - "@chain-registry/types": "npm:^0.45.1" - "@cosmos-kit/core": "npm:^2.13.0" - "@cosmos-kit/react-lite": "npm:^2.12.0" - "@react-icons/all-files": "npm:^4.1.0" - peerDependencies: - "@interchain-ui/react": ^1.23.9 - "@types/react": ">= 17" - "@types/react-dom": ">= 17" - react: ^18 - react-dom: ^18 - checksum: 10c0/aa5ab2f2aed555233382b5c8ae59ac382b7f11f247d6cb89713a609867755ebf8b66a6fd590ec9a5599771816ae8275c393b764d6d7375a406d9885c7b9babbd - languageName: node - linkType: hard - -"@cosmos-kit/shell-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/shell-extension@npm:2.11.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/c708c603aab2c7c289f8decfc8cb7b833595734e147f8905f8cd30a4bf288391f0c3366f2a8e4855041b12495ed70a40cb98470edd446a495277d00b4e91518c - languageName: node - linkType: hard - -"@cosmos-kit/shell@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/shell@npm:2.11.2" - dependencies: - "@cosmos-kit/shell-extension": "npm:^2.11.2" - checksum: 10c0/cc531070a980b4fa57a34ee96b54d070fe9782e4477ff9da997ae37e6f30d3ea5921ea523768bd70f72e0eddf46f67ba592e4b7fe75b99679bc7da562797ccf0 - languageName: node - linkType: hard - -"@cosmos-kit/station-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/station-extension@npm:2.11.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - "@terra-money/feather.js": "npm:^1.0.8" - "@terra-money/station-connector": "npm:^1.1.0" - "@terra-money/wallet-types": "npm:^3.11.2" - peerDependencies: - "@chain-registry/types": ">= 0.17" - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/0532961a303ab7cad2319f27c71c80f9662ec9f7a5d957f27dc49c8753417dbc94c4ec175010b9b616af1512e42dc09144a12c5c143a5ab64bb2015d0fc6768e - languageName: node - linkType: hard - -"@cosmos-kit/station@npm:^2.10.0": - version: 2.10.2 - resolution: "@cosmos-kit/station@npm:2.10.2" - dependencies: - "@cosmos-kit/station-extension": "npm:^2.11.2" - checksum: 10c0/1d0e1a05e9fd2528d1c105fba340244adff25460b536d75fcc2454f56f317efd6edced3eddee9cc8b9d897338114f9469af272fd1a5f7f1c317273acfc5f29b4 - languageName: node - linkType: hard - -"@cosmos-kit/tailwind-extension@npm:^1.5.2": - version: 1.5.2 - resolution: "@cosmos-kit/tailwind-extension@npm:1.5.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - checksum: 10c0/a8facdddc4df41814ae5048423b3c9da8c223503f16fb6728038238790fd143a2ebda727c813f9ae2c1190c0d0da07e942a8c0181ea2e1268f9580435550d2ed - languageName: node - linkType: hard - -"@cosmos-kit/tailwind@npm:^1.5.0": - version: 1.5.2 - resolution: "@cosmos-kit/tailwind@npm:1.5.2" - dependencies: - "@cosmos-kit/tailwind-extension": "npm:^1.5.2" - checksum: 10c0/79d9ce43765e90c990f52d72049d4705322d3fc9175214f80aec7d24cbce24460cf37aaab9baf424aa965ff2b9398e3c84c32f8ac2bb5c4a35370ebddefc4733 - languageName: node - linkType: hard - -"@cosmos-kit/trust-extension@npm:^2.10.2": - version: 2.10.2 - resolution: "@cosmos-kit/trust-extension@npm:2.10.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/4a56176642f984aa07a3b46f4dfed59113e4012350c45b854c4ea96cedd2dbf8cbf07e7c9a943ffaf85d624c0f8612d3eb6dd2518926ce82289a48a208859f13 - languageName: node - linkType: hard - -"@cosmos-kit/trust-mobile@npm:^2.10.2": - version: 2.10.2 - resolution: "@cosmos-kit/trust-mobile@npm:2.10.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - "@cosmos-kit/walletconnect": "npm:^2.10.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/6ed367a52d75355add3bddcbefc47e589110da9e1d42f7b65fdd7e02398786d083403f685539ea03a0b65f9a9813e1703d2c53a67aa834c091170e488b77205c - languageName: node - linkType: hard - -"@cosmos-kit/trust@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/trust@npm:2.11.2" - dependencies: - "@cosmos-kit/trust-extension": "npm:^2.10.2" - "@cosmos-kit/trust-mobile": "npm:^2.10.2" - checksum: 10c0/68824bdab267de17b5ed0689a6b2a4881b06d5ec292bc1d12d9890552039229f6768eaf0e0ac8017633f67e9140a56da62df514f13f9aa6de09e7a55cc350132 - languageName: node - linkType: hard - -"@cosmos-kit/vectis-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/vectis-extension@npm:2.11.2" - dependencies: - "@chain-registry/keplr": "npm:1.68.2" - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/d150dd1f8845073b98d4ebf1d59f8459881cfc3e7b954fe0cd1932852bc7cb1986da6c44cbea7d06ce57c971fd8a1d5b7daa7c27fb0d31abfb4b1fdc786bd2b4 - languageName: node - linkType: hard - -"@cosmos-kit/vectis@npm:^2.11.0": - version: 2.11.2 - resolution: "@cosmos-kit/vectis@npm:2.11.2" - dependencies: - "@cosmos-kit/vectis-extension": "npm:^2.11.2" - checksum: 10c0/e9baa032280d35fc6da13a771bb7e4180decede89f052d9297e702d9ea3aaed7ce92d98865e2bb3b60f8a86ae7770add714db8072d64c89fd8d00449887ddee7 - languageName: node - linkType: hard - -"@cosmos-kit/walletconnect@npm:^2.10.1": - version: 2.10.1 - resolution: "@cosmos-kit/walletconnect@npm:2.10.1" - dependencies: - "@cosmjs/proto-signing": "npm:^0.32.3" - "@cosmos-kit/core": "npm:^2.13.1" - "@walletconnect/sign-client": "npm:^2.9.0" - "@walletconnect/utils": "npm:^2.9.0" - events: "npm:3.3.0" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@walletconnect/types": 2.11.0 - checksum: 10c0/5940d33dfebb75f029b57cfa1de9206d2fc3c36e406cef29786ac5c0cd749cd0f5c06e5953d096bc522f45d8c1903cb1aa4429ee07425f261cc3167dcb6b35b6 - languageName: node - linkType: hard - -"@cosmos-kit/xdefi-extension@npm:^2.11.2": - version: 2.11.2 - resolution: "@cosmos-kit/xdefi-extension@npm:2.11.2" - dependencies: - "@cosmos-kit/core": "npm:^2.13.1" - peerDependencies: - "@cosmjs/amino": ">=0.32.3" - "@cosmjs/proto-signing": ">=0.32.3" - checksum: 10c0/73afc1fb1ed406c5fa44081baf2c0b3d0fd90e6d162427e66040f8319a10ef72c756bd180861400f0f1b51cdd8d54c4a4fdb56fb71eda1aef2003d3131a7404a - languageName: node - linkType: hard - -"@cosmos-kit/xdefi@npm:^2.10.0": - version: 2.10.2 - resolution: "@cosmos-kit/xdefi@npm:2.10.2" - dependencies: - "@cosmos-kit/xdefi-extension": "npm:^2.11.2" - checksum: 10c0/a7dcb2a6234d4828f60fa835247627a6183fe000f4e2106f8c6a1e2bff5c2c842a887a5ddae188e2d500b807e1d4580fddfb318499683914f0abf6ffa2f72faa - languageName: node - linkType: hard - -"@cosmostation/extension-client@npm:0.1.15": - version: 0.1.15 - resolution: "@cosmostation/extension-client@npm:0.1.15" - checksum: 10c0/4afc033a6f0c894a632b5b6806c9588daab2aeb0afd3004429be2b6ec96636b9103f3097b86c606de3df239451dce4efdc930acdb0835919cc3f6727755871c3 - languageName: node - linkType: hard - -"@cosmwasm/ts-codegen@npm:0.34.0": - version: 0.34.0 - resolution: "@cosmwasm/ts-codegen@npm:0.34.0" - dependencies: - "@babel/core": "npm:7.18.10" - "@babel/generator": "npm:7.18.12" - "@babel/parser": "npm:7.18.11" - "@babel/plugin-proposal-class-properties": "npm:7.18.6" - "@babel/plugin-proposal-export-default-from": "npm:7.18.10" - "@babel/plugin-proposal-object-rest-spread": "npm:7.18.9" - "@babel/plugin-transform-runtime": "npm:7.18.10" - "@babel/preset-env": "npm:7.18.10" - "@babel/preset-typescript": "npm:^7.18.6" - "@babel/runtime": "npm:^7.18.9" - "@babel/traverse": "npm:7.18.11" - "@babel/types": "npm:7.18.10" - "@pyramation/json-schema-to-typescript": "npm: 11.0.4" - case: "npm:1.6.3" - dargs: "npm:7.0.0" - deepmerge: "npm:4.2.2" - dotty: "npm:0.1.2" - fuzzy: "npm:0.1.3" - glob: "npm:8.0.3" - inquirerer: "npm:0.1.3" - long: "npm:^5.2.0" - minimist: "npm:1.2.6" - mkdirp: "npm:1.0.4" - parse-package-name: "npm:1.0.0" - rimraf: "npm:3.0.2" - shelljs: "npm:0.8.5" - wasm-ast-types: "npm:^0.25.0" - bin: - cosmwasm-ts-codegen: main/ts-codegen.js - checksum: 10c0/691d3a986da9c8dfe57a04871c41b0a2389c0f28a1d7baa3f593cc5519cf0615c8a540e2b67a81f589e3ea211f3b9bf7e53a5f08c81b74f5aa296ed06ffa7b51 - languageName: node - linkType: hard - -"@cosmwasm/ts-codegen@npm:0.4.2": - version: 0.4.2 - resolution: "@cosmwasm/ts-codegen@npm:0.4.2" - dependencies: - "@babel/core": "npm:7.18.5" - "@babel/generator": "npm:7.18.2" - "@babel/parser": "npm:7.18.5" - "@babel/plugin-proposal-class-properties": "npm:7.17.12" - "@babel/plugin-proposal-export-default-from": "npm:7.17.12" - "@babel/plugin-proposal-object-rest-spread": "npm:7.18.0" - "@babel/plugin-transform-runtime": "npm:7.18.5" - "@babel/preset-env": "npm:7.18.2" - "@babel/preset-typescript": "npm:^7.17.12" - "@babel/runtime": "npm:^7.18.3" - "@babel/traverse": "npm:7.18.5" - "@babel/types": "npm:7.18.4" - case: "npm:1.6.3" - dargs: "npm:7.0.0" - fuzzy: "npm:0.1.3" - glob: "npm:8.0.3" - inquirerer: "npm:0.1.3" - json-schema-to-typescript: "npm:10.1.5" - long: "npm:^5.2.0" - minimist: "npm:1.2.6" - mkdirp: "npm:1.0.4" - shelljs: "npm:0.8.5" - wasm-ast-types: "npm:^0.3.7" - bin: - cosmwasm-ts-codegen: main/cosmwasm-typescript-gen.js - checksum: 10c0/d77cbcb562a67d2ec96c080c88afbfb40f3ddc11d9ec22318f2d9b8f25212f559a84e69d331fcaf4b160c5c7b26b070dd1f38d4dcd224ee99728fbaedd49c568 - languageName: node - linkType: hard - -"@dao-dao/cosmiframe@npm:^0.1.0": - version: 0.1.0 - resolution: "@dao-dao/cosmiframe@npm:0.1.0" - dependencies: - uuid: "npm:^9.0.1" - peerDependencies: - "@cosmjs/amino": "*" - "@cosmjs/proto-signing": "*" - checksum: 10c0/e65a64a8ce67063585c2f21c07a7443358cfcbd2153c432b2e882a0549e37edb8d5a375ef49d279d2ec7cb46dfce6d728ccc872cdf89a444602319d11e44ccc8 - languageName: node - linkType: hard - -"@emotion/babel-plugin@npm:^11.10.6, @emotion/babel-plugin@npm:^11.12.0": - version: 11.12.0 - resolution: "@emotion/babel-plugin@npm:11.12.0" - dependencies: - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/runtime": "npm:^7.18.3" - "@emotion/hash": "npm:^0.9.2" - "@emotion/memoize": "npm:^0.9.0" - "@emotion/serialize": "npm:^1.2.0" - babel-plugin-macros: "npm:^3.1.0" - convert-source-map: "npm:^1.5.0" - escape-string-regexp: "npm:^4.0.0" - find-root: "npm:^1.1.0" - source-map: "npm:^0.5.7" - stylis: "npm:4.2.0" - checksum: 10c0/930ff6f8768b0c24d05896ad696be20e1c65f32ed61fb5c1488f571120a947ef0a2cf69187b17114cc76e7886f771fac150876ed7b5341324fec2377185d6573 - languageName: node - linkType: hard - -"@emotion/cache@npm:^11.10.5, @emotion/cache@npm:^11.13.0, @emotion/cache@npm:^11.4.0": - version: 11.13.1 - resolution: "@emotion/cache@npm:11.13.1" - dependencies: - "@emotion/memoize": "npm:^0.9.0" - "@emotion/sheet": "npm:^1.4.0" - "@emotion/utils": "npm:^1.4.0" - "@emotion/weak-memoize": "npm:^0.4.0" - stylis: "npm:4.2.0" - checksum: 10c0/321e97d8980885737de13b47e41fd4febfbd83086f10c620f865fcbddb29b8fe198adec7e1c69cc7b137638ea9242d7c475c57f954f7ca229157fa92e368f473 - languageName: node - linkType: hard - -"@emotion/hash@npm:^0.9.0, @emotion/hash@npm:^0.9.2": - version: 0.9.2 - resolution: "@emotion/hash@npm:0.9.2" - checksum: 10c0/0dc254561a3cc0a06a10bbce7f6a997883fd240c8c1928b93713f803a2e9153a257a488537012efe89dbe1246f2abfe2add62cdb3471a13d67137fcb808e81c2 - languageName: node - linkType: hard - -"@emotion/is-prop-valid@npm:^0.8.2": - version: 0.8.8 - resolution: "@emotion/is-prop-valid@npm:0.8.8" - dependencies: - "@emotion/memoize": "npm:0.7.4" - checksum: 10c0/f6be625f067c7fa56a12a4edaf090715616dc4fc7803c87212831f38c969350107b9709b1be54100e53153b18d9fa068eb4bf4f9ac66a37a8edf1bac9b64e279 - languageName: node - linkType: hard - -"@emotion/is-prop-valid@npm:^1.2.0": - version: 1.3.0 - resolution: "@emotion/is-prop-valid@npm:1.3.0" - dependencies: - "@emotion/memoize": "npm:^0.9.0" - checksum: 10c0/4620b62aaca4b3b610202513652872756d7f4a8b84b2cea6b798dd6e8ccdfe43944b956c6a6a8cb5da0b0fe61bef6caca273d198ba32b5c658df22a6c7371b1b - languageName: node - linkType: hard - -"@emotion/memoize@npm:0.7.4": - version: 0.7.4 - resolution: "@emotion/memoize@npm:0.7.4" - checksum: 10c0/b2376548fc147b43afd1ff005a80a1a025bd7eb4fb759fdb23e96e5ff290ee8ba16628a332848d600fb91c3cdc319eee5395fa33d8875e5d5a8c4ce18cddc18e - languageName: node - linkType: hard - -"@emotion/memoize@npm:^0.9.0": - version: 0.9.0 - resolution: "@emotion/memoize@npm:0.9.0" - checksum: 10c0/13f474a9201c7f88b543e6ea42f55c04fb2fdc05e6c5a3108aced2f7e7aa7eda7794c56bba02985a46d8aaa914fcdde238727a98341a96e2aec750d372dadd15 - languageName: node - linkType: hard - -"@emotion/react@npm:11.10.6": - version: 11.10.6 - resolution: "@emotion/react@npm:11.10.6" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.10.6" - "@emotion/cache": "npm:^11.10.5" - "@emotion/serialize": "npm:^1.1.1" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.0" - "@emotion/utils": "npm:^1.2.0" - "@emotion/weak-memoize": "npm:^0.3.0" - hoist-non-react-statics: "npm:^3.3.1" - peerDependencies: - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/4c5ce8ef279a8ce0d371414720d9b2b195ce6b30abf82d99a856ef3b7dc8643f8a32b9b01fded35d94ab9159e4982f7eb0ffa3c4b1aabb102180383e56232bcf - languageName: node - linkType: hard - -"@emotion/react@npm:^11.8.1": - version: 11.13.3 - resolution: "@emotion/react@npm:11.13.3" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.12.0" - "@emotion/cache": "npm:^11.13.0" - "@emotion/serialize": "npm:^1.3.1" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.1.0" - "@emotion/utils": "npm:^1.4.0" - "@emotion/weak-memoize": "npm:^0.4.0" - hoist-non-react-statics: "npm:^3.3.1" - peerDependencies: - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/a55e770b9ea35de5d35db05a7ad40a4a3f442809fa8e4fabaf56da63ac9444f09aaf691c4e75a1455dc388991ab0c0ab4e253ce67c5836f27513e45ebd01b673 - languageName: node - linkType: hard - -"@emotion/serialize@npm:^1.1.1, @emotion/serialize@npm:^1.2.0, @emotion/serialize@npm:^1.3.1": - version: 1.3.1 - resolution: "@emotion/serialize@npm:1.3.1" - dependencies: - "@emotion/hash": "npm:^0.9.2" - "@emotion/memoize": "npm:^0.9.0" - "@emotion/unitless": "npm:^0.10.0" - "@emotion/utils": "npm:^1.4.0" - csstype: "npm:^3.0.2" - checksum: 10c0/ac7158e2881b5f3f9ca1e4d865186d38623f997de888675297e0928b202d16273e43b0a19aa021c0b706edefae31118bc97c5fab095820109d09d502dbcf2092 - languageName: node - linkType: hard - -"@emotion/sheet@npm:^1.4.0": - version: 1.4.0 - resolution: "@emotion/sheet@npm:1.4.0" - checksum: 10c0/3ca72d1650a07d2fbb7e382761b130b4a887dcd04e6574b2d51ce578791240150d7072a9bcb4161933abbcd1e38b243a6fb4464a7fe991d700c17aa66bb5acc7 - languageName: node - linkType: hard - -"@emotion/styled@npm:11.10.6": - version: 11.10.6 - resolution: "@emotion/styled@npm:11.10.6" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.10.6" - "@emotion/is-prop-valid": "npm:^1.2.0" - "@emotion/serialize": "npm:^1.1.1" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.0" - "@emotion/utils": "npm:^1.2.0" - peerDependencies: - "@emotion/react": ^11.0.0-rc.0 - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/69e968bb359758ec454c547d6f1d5b1a50a8c149c13274119f63d81fbb76db46b2df53c236ecbc9cb15696f9834647156d715e5e6ccc84ff7b1852617e367386 - languageName: node - linkType: hard - -"@emotion/unitless@npm:^0.10.0": - version: 0.10.0 - resolution: "@emotion/unitless@npm:0.10.0" - checksum: 10c0/150943192727b7650eb9a6851a98034ddb58a8b6958b37546080f794696141c3760966ac695ab9af97efe10178690987aee4791f9f0ad1ff76783cdca83c1d49 - languageName: node - linkType: hard - -"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.0, @emotion/use-insertion-effect-with-fallbacks@npm:^1.1.0": - version: 1.1.0 - resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.1.0" - peerDependencies: - react: ">=16.8.0" - checksum: 10c0/a883480f3a7139fb4a43e71d3114ca57e2b7ae5ff204e05cd9e59251a113773b8f64eb75d3997726250aca85eb73447638c8f51930734bdd16b96762b65e58c3 - languageName: node - linkType: hard - -"@emotion/utils@npm:^1.2.0, @emotion/utils@npm:^1.4.0": - version: 1.4.0 - resolution: "@emotion/utils@npm:1.4.0" - checksum: 10c0/b2ae698d6e935f4961a8349286b5b0a6117a16e179459cbf9c8d97d5daa7d96c99876b950f09b1a793d6b295713b2c8f89544bd8c3f26b8e4db60a218a0d4c42 - languageName: node - linkType: hard - -"@emotion/weak-memoize@npm:^0.3.0": - version: 0.3.1 - resolution: "@emotion/weak-memoize@npm:0.3.1" - checksum: 10c0/ed514b3cb94bbacece4ac2450d98898066c0a0698bdeda256e312405ca53634cb83c75889b25cd8bbbe185c80f4c05a1f0a0091e1875460ba6be61d0334f0b8a - languageName: node - linkType: hard - -"@emotion/weak-memoize@npm:^0.4.0": - version: 0.4.0 - resolution: "@emotion/weak-memoize@npm:0.4.0" - checksum: 10c0/64376af11f1266042d03b3305c30b7502e6084868e33327e944b539091a472f089db307af69240f7188f8bc6b319276fd7b141a36613f1160d73d12a60f6ca1a - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^1.3.3": - version: 1.4.1 - resolution: "@eslint/eslintrc@npm:1.4.1" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.4.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/1030e1a4a355f8e4629e19d3d45448a05a8e65ecf49154bebc66599d038f155e830498437cbfc7246e8084adc1f814904f696c2461707cc8c73be961e2e8ae5a - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abi@npm:5.7.0" - dependencies: - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10c0/7de51bf52ff03df2526546dacea6e74f15d4c5ef762d931552082b9600dcefd8e333599f02d7906ba89f7b7f48c45ab72cee76f397212b4f17fa9d9ff5615916 - languageName: node - linkType: hard - -"@ethersproject/abstract-provider@npm:5.7.0, @ethersproject/abstract-provider@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abstract-provider@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/networks": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/web": "npm:^5.7.0" - checksum: 10c0/a5708e2811b90ddc53d9318ce152511a32dd4771aa2fb59dbe9e90468bb75ca6e695d958bf44d13da684dc3b6aab03f63d425ff7591332cb5d7ddaf68dff7224 - languageName: node - linkType: hard - -"@ethersproject/abstract-signer@npm:5.7.0, @ethersproject/abstract-signer@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abstract-signer@npm:5.7.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - checksum: 10c0/e174966b3be17269a5974a3ae5eef6d15ac62ee8c300ceace26767f218f6bbf3de66f29d9a9c9ca300fa8551aab4c92e28d2cc772f5475fdeaa78d9b5be0e745 - languageName: node - linkType: hard - -"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5.6.0, @ethersproject/address@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/address@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - checksum: 10c0/db5da50abeaae8f6cf17678323e8d01cad697f9a184b0593c62b71b0faa8d7e5c2ba14da78a998d691773ed6a8eb06701f65757218e0eaaeb134e5c5f3e5a908 - languageName: node - linkType: hard - -"@ethersproject/base64@npm:5.7.0, @ethersproject/base64@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/base64@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - checksum: 10c0/4f748cd82af60ff1866db699fbf2bf057feff774ea0a30d1f03ea26426f53293ea10cc8265cda1695301da61093bedb8cc0d38887f43ed9dad96b78f19d7337e - languageName: node - linkType: hard - -"@ethersproject/basex@npm:5.7.0, @ethersproject/basex@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/basex@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - checksum: 10c0/02304de77477506ad798eb5c68077efd2531624380d770ef4a823e631a288fb680107a0f9dc4a6339b2a0b0f5b06ee77f53429afdad8f950cde0f3e40d30167d - languageName: node - linkType: hard - -"@ethersproject/bignumber@npm:5.7.0, @ethersproject/bignumber@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/bignumber@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - bn.js: "npm:^5.2.1" - checksum: 10c0/14263cdc91a7884b141d9300f018f76f69839c47e95718ef7161b11d2c7563163096fee69724c5fa8ef6f536d3e60f1c605819edbc478383a2b98abcde3d37b2 - languageName: node - linkType: hard - -"@ethersproject/bytes@npm:5.7.0, @ethersproject/bytes@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/bytes@npm:5.7.0" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/07dd1f0341b3de584ef26c8696674ff2bb032f4e99073856fc9cd7b4c54d1d846cabe149e864be267934658c3ce799e5ea26babe01f83af0e1f06c51e5ac791f - languageName: node - linkType: hard - -"@ethersproject/constants@npm:5.7.0, @ethersproject/constants@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/constants@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - checksum: 10c0/6df63ab753e152726b84595250ea722165a5744c046e317df40a6401f38556385a37c84dadf5b11ca651c4fb60f967046125369c57ac84829f6b30e69a096273 - languageName: node - linkType: hard - -"@ethersproject/contracts@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/contracts@npm:5.7.0" - dependencies: - "@ethersproject/abi": "npm:^5.7.0" - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - checksum: 10c0/97a10361dddaccfb3e9e20e24d071cfa570050adcb964d3452c5f7c9eaaddb4e145ec9cf928e14417948701b89e81d4907800e799a6083123e4d13a576842f41 - languageName: node - linkType: hard - -"@ethersproject/hash@npm:5.7.0, @ethersproject/hash@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/hash@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10c0/1a631dae34c4cf340dde21d6940dd1715fc7ae483d576f7b8ef9e8cb1d0e30bd7e8d30d4a7d8dc531c14164602323af2c3d51eb2204af18b2e15167e70c9a5ef - languageName: node - linkType: hard - -"@ethersproject/hdnode@npm:5.7.0, @ethersproject/hdnode@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/hdnode@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/basex": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/pbkdf2": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/wordlists": "npm:^5.7.0" - checksum: 10c0/36d5c13fe69b1e0a18ea98537bc560d8ba166e012d63faac92522a0b5f405eb67d8848c5aca69e2470f62743aaef2ac36638d9e27fd8c68f51506eb61479d51d - languageName: node - linkType: hard - -"@ethersproject/json-wallets@npm:5.7.0, @ethersproject/json-wallets@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/json-wallets@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/hdnode": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/pbkdf2": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/random": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - aes-js: "npm:3.0.0" - scrypt-js: "npm:3.0.1" - checksum: 10c0/f1a84d19ff38d3506f453abc4702107cbc96a43c000efcd273a056371363767a06a8d746f84263b1300266eb0c329fe3b49a9b39a37aadd016433faf9e15a4bb - languageName: node - linkType: hard - -"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.5.0, @ethersproject/keccak256@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/keccak256@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - js-sha3: "npm:0.8.0" - checksum: 10c0/3b1a91706ff11f5ab5496840b9c36cedca27db443186d28b94847149fd16baecdc13f6fc5efb8359506392f2aba559d07e7f9c1e17a63f9d5de9f8053cfcb033 - languageName: node - linkType: hard - -"@ethersproject/logger@npm:5.7.0, @ethersproject/logger@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/logger@npm:5.7.0" - checksum: 10c0/d03d460fb2d4a5e71c627b7986fb9e50e1b59a6f55e8b42a545b8b92398b961e7fd294bd9c3d8f92b35d0f6ff9d15aa14c95eab378f8ea194e943c8ace343501 - languageName: node - linkType: hard - -"@ethersproject/networks@npm:5.7.1, @ethersproject/networks@npm:^5.7.0": - version: 5.7.1 - resolution: "@ethersproject/networks@npm:5.7.1" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/9efcdce27f150459e85d74af3f72d5c32898823a99f5410e26bf26cca2d21fb14e403377314a93aea248e57fb2964e19cee2c3f7bfc586ceba4c803a8f1b75c0 - languageName: node - linkType: hard - -"@ethersproject/pbkdf2@npm:5.7.0, @ethersproject/pbkdf2@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/pbkdf2@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - checksum: 10c0/e5a29cf28b4f4ca1def94d37cfb6a9c05c896106ed64881707813de01c1e7ded613f1e95febcccda4de96aae929068831d72b9d06beef1377b5a1a13a0eb3ff5 - languageName: node - linkType: hard - -"@ethersproject/properties@npm:5.7.0, @ethersproject/properties@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/properties@npm:5.7.0" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/4fe5d36e5550b8e23a305aa236a93e8f04d891d8198eecdc8273914c761b0e198fd6f757877406ee3eb05033ec271132a3e5998c7bd7b9a187964fb4f67b1373 - languageName: node - linkType: hard - -"@ethersproject/providers@npm:5.7.2": - version: 5.7.2 - resolution: "@ethersproject/providers@npm:5.7.2" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/basex": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/networks": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/random": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/web": "npm:^5.7.0" - bech32: "npm:1.1.4" - ws: "npm:7.4.6" - checksum: 10c0/4c8d19e6b31f769c24042fb2d02e483a4ee60dcbfca9e3291f0a029b24337c47d1ea719a390be856f8fd02997125819e834415e77da4fb2023369712348dae4c - languageName: node - linkType: hard - -"@ethersproject/random@npm:5.7.0, @ethersproject/random@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/random@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/23e572fc55372653c22062f6a153a68c2e2d3200db734cd0d39621fbfd0ca999585bed2d5682e3ac65d87a2893048375682e49d1473d9965631ff56d2808580b - languageName: node - linkType: hard - -"@ethersproject/rlp@npm:5.7.0, @ethersproject/rlp@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/rlp@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/bc863d21dcf7adf6a99ae75c41c4a3fb99698cfdcfc6d5d82021530f3d3551c6305bc7b6f0475ad6de6f69e91802b7e872bee48c0596d98969aefcf121c2a044 - languageName: node - linkType: hard - -"@ethersproject/sha2@npm:5.7.0, @ethersproject/sha2@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/sha2@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - hash.js: "npm:1.1.7" - checksum: 10c0/0e7f9ce6b1640817b921b9c6dd9dab8d5bf5a0ce7634d6a7d129b7366a576c2f90dcf4bcb15a0aa9310dde67028f3a44e4fcc2f26b565abcd2a0f465116ff3b1 - languageName: node - linkType: hard - -"@ethersproject/signing-key@npm:5.7.0, @ethersproject/signing-key@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/signing-key@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - bn.js: "npm:^5.2.1" - elliptic: "npm:6.5.4" - hash.js: "npm:1.1.7" - checksum: 10c0/fe2ca55bcdb6e370d81372191d4e04671234a2da872af20b03c34e6e26b97dc07c1ee67e91b673680fb13344c9d5d7eae52f1fa6117733a3d68652b778843e09 - languageName: node - linkType: hard - -"@ethersproject/solidity@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/solidity@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10c0/bedf9918911144b0ec352b8aa7fa44abf63f0b131629c625672794ee196ba7d3992b0e0d3741935ca176813da25b9bcbc81aec454652c63113bdc3a1706beac6 - languageName: node - linkType: hard - -"@ethersproject/strings@npm:5.7.0, @ethersproject/strings@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/strings@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/570d87040ccc7d94de9861f76fc2fba6c0b84c5d6104a99a5c60b8a2401df2e4f24bf9c30afa536163b10a564a109a96f02e6290b80e8f0c610426f56ad704d1 - languageName: node - linkType: hard - -"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/transactions@npm:5.7.0" - dependencies: - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - checksum: 10c0/aa4d51379caab35b9c468ed1692a23ae47ce0de121890b4f7093c982ee57e30bd2df0c743faed0f44936d7e59c55fffd80479f2c28ec6777b8de06bfb638c239 - languageName: node - linkType: hard - -"@ethersproject/units@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/units@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10c0/4da2fdefe2a506cc9f8b408b2c8638ab35b843ec413d52713143f08501a55ff67a808897f9a91874774fb526423a0821090ba294f93e8bf4933a57af9677ac5e - languageName: node - linkType: hard - -"@ethersproject/wallet@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/wallet@npm:5.7.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/hdnode": "npm:^5.7.0" - "@ethersproject/json-wallets": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/random": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/wordlists": "npm:^5.7.0" - checksum: 10c0/f872b957db46f9de247d39a398538622b6c7a12f93d69bec5f47f9abf0701ef1edc10497924dd1c14a68109284c39a1686fa85586d89b3ee65df49002c40ba4c - languageName: node - linkType: hard - -"@ethersproject/web@npm:5.7.1, @ethersproject/web@npm:^5.7.0": - version: 5.7.1 - resolution: "@ethersproject/web@npm:5.7.1" - dependencies: - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10c0/c82d6745c7f133980e8dab203955260e07da22fa544ccafdd0f21c79fae127bd6ef30957319e37b1cc80cddeb04d6bfb60f291bb14a97c9093d81ce50672f453 - languageName: node - linkType: hard - -"@ethersproject/wordlists@npm:5.7.0, @ethersproject/wordlists@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/wordlists@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10c0/da4f3eca6d691ebf4f578e6b2ec3a76dedba791be558f6cf7e10cd0bfbaeab5a6753164201bb72ced745fb02b6ef7ef34edcb7e6065ce2b624c6556a461c3f70 - languageName: node - linkType: hard - -"@floating-ui/core@npm:^1.6.0, @floating-ui/core@npm:^1.6.4": - version: 1.6.7 - resolution: "@floating-ui/core@npm:1.6.7" - dependencies: - "@floating-ui/utils": "npm:^0.2.7" - checksum: 10c0/5c9ae274854f87ed09a61de758377d444c2b13ade7fd1067d74287b3e66de5340ae1281e48604b631c540855a2595cfc717adf9a2331eaadc4fa6d28e8571f64 - languageName: node - linkType: hard - -"@floating-ui/dom@npm:^1.0.0, @floating-ui/dom@npm:^1.0.1, @floating-ui/dom@npm:^1.6.7": - version: 1.6.10 - resolution: "@floating-ui/dom@npm:1.6.10" - dependencies: - "@floating-ui/core": "npm:^1.6.0" - "@floating-ui/utils": "npm:^0.2.7" - checksum: 10c0/ed7d7b400e00b2f31f1b8f11863af2cb95d0d3cd84635186ca31b41d8d9fe7fe12c85e4985617d7df7ed365abad48b327d0bae35934842007b4e1052d9780576 - languageName: node - linkType: hard - -"@floating-ui/react-dom@npm:^2.1.1": - version: 2.1.1 - resolution: "@floating-ui/react-dom@npm:2.1.1" - dependencies: - "@floating-ui/dom": "npm:^1.0.0" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - checksum: 10c0/732ab64600c511ceb0563b87bc557aa61789fec4f416a3f092bab89e508fa1d3ee5ade0f42051cc56eb5e4db867b87ab7fd48ce82db9fd4c01d94ffa08f60115 - languageName: node - linkType: hard - -"@floating-ui/react@npm:^0.26.19": - version: 0.26.23 - resolution: "@floating-ui/react@npm:0.26.23" - dependencies: - "@floating-ui/react-dom": "npm:^2.1.1" - "@floating-ui/utils": "npm:^0.2.7" - tabbable: "npm:^6.0.0" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - checksum: 10c0/d339c3d760e83c8384a16c8a38fb47f7f855a3db4d19117fd54cccbf871a27b089887202074e9871ffc19ad769bed709ecdd69445a39d2ea9406c84814427f3b - languageName: node - linkType: hard - -"@floating-ui/utils@npm:^0.2.4, @floating-ui/utils@npm:^0.2.7": - version: 0.2.7 - resolution: "@floating-ui/utils@npm:0.2.7" - checksum: 10c0/0559ea5df2dc82219bad26e3509e9d2b70f6987e552dc8ddf7d7f5923cfeb7c44bf884567125b1f9cdb122a4c7e6e7ddbc666740bc30b0e4091ccbca63c6fb1c - languageName: node - linkType: hard - -"@formatjs/ecma402-abstract@npm:2.0.0": - version: 2.0.0 - resolution: "@formatjs/ecma402-abstract@npm:2.0.0" - dependencies: - "@formatjs/intl-localematcher": "npm:0.5.4" - tslib: "npm:^2.4.0" - checksum: 10c0/94cba291aeadffa3ca416087c2c2352c8a741bb4dcb7f47f15c247b1f043ffcef1af5b20a1b7578fbba9e704fc5f1c079923f3537a273d50162be62f8037625c - languageName: node - linkType: hard - -"@formatjs/fast-memoize@npm:2.2.0": - version: 2.2.0 - resolution: "@formatjs/fast-memoize@npm:2.2.0" - dependencies: - tslib: "npm:^2.4.0" - checksum: 10c0/ae88c5a93b96235aba4bd9b947d0310d2ec013687a99133413361b24122b5cdea8c9bf2e04a4a2a8b61f1f4ee5419ef6416ca4796554226b5050e05a9ce6ef49 - languageName: node - linkType: hard - -"@formatjs/icu-messageformat-parser@npm:2.7.8": - version: 2.7.8 - resolution: "@formatjs/icu-messageformat-parser@npm:2.7.8" - dependencies: - "@formatjs/ecma402-abstract": "npm:2.0.0" - "@formatjs/icu-skeleton-parser": "npm:1.8.2" - tslib: "npm:^2.4.0" - checksum: 10c0/a3b759a825fb22ffd7b906f6a07b1a079bbc34f72c745de2c2514e439c4bb75bc1a9442eba1bac7ff3ea3010e12076374cd755ad12116b1d066cc90da5fbcbc9 - languageName: node - linkType: hard - -"@formatjs/icu-skeleton-parser@npm:1.8.2": - version: 1.8.2 - resolution: "@formatjs/icu-skeleton-parser@npm:1.8.2" - dependencies: - "@formatjs/ecma402-abstract": "npm:2.0.0" - tslib: "npm:^2.4.0" - checksum: 10c0/9b15013acc47b8d560b52942e3dab2abaaa9c5a4410bbd1d490a4b22bf5ca36fdd88b71f241d05479bddf856d0d1d57b7ecc9e79738497ac518616aa6d4d0015 - languageName: node - linkType: hard - -"@formatjs/intl-localematcher@npm:0.5.4": - version: 0.5.4 - resolution: "@formatjs/intl-localematcher@npm:0.5.4" - dependencies: - tslib: "npm:^2.4.0" - checksum: 10c0/c9ff5d34ca8b6fe59f8f303a3cc31a92d343e095a6987e273e5cc23f0fe99feb557a392a05da95931c7d24106acb6988e588d00ddd05b0934005aafd7fdbafe6 - languageName: node - linkType: hard - -"@formkit/auto-animate@npm:^0.8.2": - version: 0.8.2 - resolution: "@formkit/auto-animate@npm:0.8.2" - checksum: 10c0/0b24af241c229f37643cd62ea78fd7fddf621c06516cf62452035ea0bf489b6b53068eea47abb40b6bb3653bb91c1efad8b7257014a3559d26ad77b47b5337cb - languageName: node - linkType: hard - -"@hexxagon/feather.js@npm:^1.0.9-beta.8": - version: 1.0.11 - resolution: "@hexxagon/feather.js@npm:1.0.11" - dependencies: - "@classic-terra/terra.proto": "npm:^1.1.0" - "@terra-money/legacy.proto": "npm:@terra-money/terra.proto@^0.1.7" - "@terra-money/terra.proto": "npm:3.0.5" - axios: "npm:^0.27.2" - bech32: "npm:^2.0.0" - bip32: "npm:^2.0.6" - bip39: "npm:^3.0.3" - bufferutil: "npm:^4.0.3" - decimal.js: "npm:^10.2.1" - jscrypto: "npm:^1.0.1" - readable-stream: "npm:^3.6.0" - secp256k1: "npm:^4.0.2" - tmp: "npm:^0.2.1" - utf-8-validate: "npm:^5.0.5" - ws: "npm:^7.5.9" - checksum: 10c0/912e3133e059b73eb587a47774db29d0299750f762bd7ef8a10a6b7ccd3ba05100d8c9d31c04b67097522ea64883ff864970d69875fb68652f239c54b0ad424b - languageName: node - linkType: hard - -"@hexxagon/station-connector@npm:^1.0.17": - version: 1.0.19 - resolution: "@hexxagon/station-connector@npm:1.0.19" - dependencies: - bech32: "npm:^2.0.0" - peerDependencies: - "@cosmjs/amino": ^0.31.0 - "@hexxagon/feather.js": ^2.1.0-beta.5 - axios: ^0.27.2 - checksum: 10c0/32d1eb7d20b941c199ebbf68022b9caa94ecdbee6983d7b66d64868362c03a684befb6c7432990afb28a4540ea304e7d5ed2d7823f204165345018ff71644417 - languageName: node - linkType: hard - -"@humanwhocodes/config-array@npm:^0.11.6": - version: 0.11.14 - resolution: "@humanwhocodes/config-array@npm:0.11.14" - dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.2" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10c0/66f725b4ee5fdd8322c737cb5013e19fac72d4d69c8bf4b7feb192fcb83442b035b92186f8e9497c220e58b2d51a080f28a73f7899bc1ab288c3be172c467541 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/object-schema@npm:^2.0.2": - version: 2.0.3 - resolution: "@humanwhocodes/object-schema@npm:2.0.3" - checksum: 10c0/80520eabbfc2d32fe195a93557cef50dfe8c8905de447f022675aaf66abc33ae54098f5ea78548d925aa671cd4ab7c7daa5ad704fe42358c9b5e7db60f80696c - languageName: node - linkType: hard - -"@improbable-eng/grpc-web@npm:^0.14.1": - version: 0.14.1 - resolution: "@improbable-eng/grpc-web@npm:0.14.1" - dependencies: - browser-headers: "npm:^0.4.1" - peerDependencies: - google-protobuf: ^3.14.0 - checksum: 10c0/972f20d97970b3c7239ef8f26866e417e3079faec5a66e86755cc49b1dc3c56ed50a8f04dbb9d23d2f12ffb5719e39500d5e513d0087d576bc0844d2034491c1 - languageName: node - linkType: hard - -"@interchain-kit/core@npm:0.0.1-beta.8": - version: 0.0.1-beta.8 - resolution: "@interchain-kit/core@npm:0.0.1-beta.8" - dependencies: - "@chain-registry/v2": "npm:^1.65.20" - "@chain-registry/v2-types": "npm:^0.49.6" - "@cosmjs/amino": "npm:^0.32.3" - "@cosmjs/cosmwasm-stargate": "npm:^0.32.4" - "@cosmjs/proto-signing": "npm:^0.32.3" - "@cosmjs/stargate": "npm:^0.32.4" - "@interchainjs/cosmos-types": "npm:^0.0.1-beta.7" - "@ledgerhq/hw-app-cosmos": "npm:^6.30.0" - "@ledgerhq/hw-transport": "npm:^6.31.0" - "@ledgerhq/hw-transport-webhid": "npm:^6.29.0" - "@ledgerhq/hw-transport-webusb": "npm:^6.29.0" - "@walletconnect/sign-client": "npm:^2.13.3" - "@walletconnect/types": "npm:^2.13.3" - buffer: "npm:^6.0.3" - interchainjs: "npm:^0.0.1-beta.12" - long: "npm:^5.2.3" - checksum: 10c0/429619dde43cd5aa9d27efdf59080bc185ac5c0b3c1afb976f498f25caa9213377e85e476862757cc2eb23b958d29bd90cb42db880071af01b1addbbfec6e0b5 - languageName: node - linkType: hard - -"@interchain-kit/keplr-extension@npm:0.0.1-beta.8": - version: 0.0.1-beta.8 - resolution: "@interchain-kit/keplr-extension@npm:0.0.1-beta.8" - dependencies: - "@interchain-kit/core": "npm:0.0.1-beta.8" - "@keplr-wallet/provider-extension": "npm:^0.12.102" - checksum: 10c0/9c5b848789835a3854bc109d3fcf2bef219710bfbea2050fcba6541d257e77ca225942b807a84299f23bc0b02fdbf8e08d2656f404cb2129964300c0f23aff2d - languageName: node - linkType: hard - -"@interchain-kit/react@npm:0.0.1-beta.8": - version: 0.0.1-beta.8 - resolution: "@interchain-kit/react@npm:0.0.1-beta.8" - dependencies: - "@chain-registry/v2-types": "npm:^0.49.6" - "@interchain-kit/core": "npm:0.0.1-beta.8" - "@interchain-ui/react": "npm:^1.23.31" - "@types/react": "npm:^18.3.3" - "@types/react-dom": "npm:^18.3.0" - react: "npm:^18.3.1" - react-dom: "npm:^18.3.1" - checksum: 10c0/0f05471a7595786dcc1e57e37192ddd376401718324b97deb9198398f0fa25a5b2fb21665bfe0272bf00f1d95d6faaae072ae5da882a8b6482064599bb3bf390 - languageName: node - linkType: hard - -"@interchain-ui/react-no-ssr@npm:^0.1.6": - version: 0.1.9 - resolution: "@interchain-ui/react-no-ssr@npm:0.1.9" - peerDependencies: - react: ^16.14.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/97a44f4f7d863659ce729e296811662598157ff864c53e754d1051bd0d813f997ae55a9e8bda45304bdfee912a8a6d50da12322af3114b332864c4b74006b6da - languageName: node - linkType: hard - -"@interchain-ui/react@npm:^1.23.29, @interchain-ui/react@npm:^1.23.31": - version: 1.23.31 - resolution: "@interchain-ui/react@npm:1.23.31" - dependencies: - "@floating-ui/core": "npm:^1.6.4" - "@floating-ui/dom": "npm:^1.6.7" - "@floating-ui/react": "npm:^0.26.19" - "@floating-ui/react-dom": "npm:^2.1.1" - "@floating-ui/utils": "npm:^0.2.4" - "@formkit/auto-animate": "npm:^0.8.2" - "@react-aria/listbox": "npm:^3.12.1" - "@react-aria/overlays": "npm:^3.22.1" - "@react-aria/utils": "npm:^3.24.1" - "@tanstack/react-virtual": "npm:^3.8.3" - "@vanilla-extract/css": "npm:^1.15.3" - "@vanilla-extract/dynamic": "npm:^2.1.1" - "@vanilla-extract/recipes": "npm:^0.5.3" - animejs: "npm:^3.2.2" - bignumber.js: "npm:^9.1.2" - client-only: "npm:^0.0.1" - clsx: "npm:^2.1.1" - copy-to-clipboard: "npm:^3.3.3" - immer: "npm:^10.1.1" - lodash: "npm:^4.17.21" - rainbow-sprinkles: "npm:^0.17.2" - react-aria: "npm:^3.33.1" - react-stately: "npm:^3.31.1" - zustand: "npm:^4.5.4" - peerDependencies: - react: ^16.14.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/b8ec3c81035651de08958aeb1497e423e02643f2b1e3fc1fc80b09396f017b2769e94de3b1f6cb44ef9852d8fa8ac890d82e86c23291a029961332000cccc2de - languageName: node - linkType: hard - -"@interchainjs/auth@npm:^0.0.1-beta.9": - version: 0.0.1-beta.9 - resolution: "@interchainjs/auth@npm:0.0.1-beta.9" - dependencies: - "@interchainjs/types": "npm:^0.0.1-beta.8" - "@interchainjs/utils": "npm:^0.0.1-beta.8" - "@noble/curves": "npm:^1.1.0" - "@noble/hashes": "npm:^1.3.1" - ethers: "npm:^6.5.1" - checksum: 10c0/6e7ffa9e24ef533a832db5a601fbeb2c7859df99542fdde9aa21b711122c592c56c9102147b1a7227d10a9ea77b0c87076c2196dde754ae42d0579c72e082ec5 - languageName: node - linkType: hard - -"@interchainjs/cosmos-types@npm:^0.0.1-beta.7": - version: 0.0.1-beta.7 - resolution: "@interchainjs/cosmos-types@npm:0.0.1-beta.7" - dependencies: - "@interchainjs/types": "npm:^0.0.1-beta.7" - "@interchainjs/utils": "npm:^0.0.1-beta.7" - checksum: 10c0/5e0e86a543f8fe91e6a0d331762f6e773c8cbb66c47d9aa49190d3ee4ad70ac4d0c92dfe2902a0f2c2b4e84d952c67d60fd04c59340d5bd7e1f52691f3d203ed - languageName: node - linkType: hard - -"@interchainjs/cosmos-types@npm:^0.0.1-beta.8": - version: 0.0.1-beta.8 - resolution: "@interchainjs/cosmos-types@npm:0.0.1-beta.8" - dependencies: - "@interchainjs/types": "npm:^0.0.1-beta.8" - "@interchainjs/utils": "npm:^0.0.1-beta.8" - checksum: 10c0/fe5178fe18e9bf05e082361a3983e02cc17ab48a9aa3b0ec0da6920e28ea6e24df49b3d4999892056133062e7ed6b7f1394a8671cde1f2462d184d5a29aab1cb - languageName: node - linkType: hard - -"@interchainjs/cosmos@npm:^0.0.1-beta.11": - version: 0.0.1-beta.11 - resolution: "@interchainjs/cosmos@npm:0.0.1-beta.11" - dependencies: - "@chain-registry/v2": "npm:^1.65.6" - "@chain-registry/v2-types": "npm:^0.49.6" - "@interchainjs/auth": "npm:^0.0.1-beta.9" - "@interchainjs/cosmos-types": "npm:^0.0.1-beta.8" - "@interchainjs/types": "npm:^0.0.1-beta.8" - "@interchainjs/utils": "npm:^0.0.1-beta.8" - "@noble/curves": "npm:^1.1.0" - "@noble/hashes": "npm:^1.3.1" - decimal.js: "npm:^10.4.3" - checksum: 10c0/f428ba9834cb511a78840f5767a4a6db21c158aa441f4b94c4ad086c4d1a1fc31849880ea986767102e8063624cde895d13d85288509491594cd35b410ba6f6b - languageName: node - linkType: hard - -"@interchainjs/types@npm:^0.0.1-beta.7": - version: 0.0.1-beta.7 - resolution: "@interchainjs/types@npm:0.0.1-beta.7" - dependencies: - decimal.js: "npm:^10.4.3" - checksum: 10c0/002a9e4e29851c74426acfb2c50542960db708ee1e5e8785d144b5fc6bd2fd4ab074875e852c80bc010544dbe0a8eab1d0b1d26a0779d7de67e3af93e60c3912 - languageName: node - linkType: hard - -"@interchainjs/types@npm:^0.0.1-beta.8": - version: 0.0.1-beta.8 - resolution: "@interchainjs/types@npm:0.0.1-beta.8" - dependencies: - decimal.js: "npm:^10.4.3" - checksum: 10c0/116bd83ba1792e97d665e02985405e4e1dfe991338d4bf1609f94948dee12517352c1c26e83bc8d45403a84767f690a46a9c9c118601897924eb5e6b37c051e3 - languageName: node - linkType: hard - -"@interchainjs/utils@npm:^0.0.1-beta.7": - version: 0.0.1-beta.7 - resolution: "@interchainjs/utils@npm:0.0.1-beta.7" - dependencies: - "@interchainjs/types": "npm:^0.0.1-beta.7" - bech32: "npm:^2.0.0" - checksum: 10c0/6dad74396a0e725394b62af45509831860a90131f87748fbd7f1fae9fbf2380f2bdfc91436e0d64c0d1407a5f745267ea9ddee4cf8943d7a8a262d5f492bdca8 - languageName: node - linkType: hard - -"@interchainjs/utils@npm:^0.0.1-beta.8": - version: 0.0.1-beta.8 - resolution: "@interchainjs/utils@npm:0.0.1-beta.8" - dependencies: - "@interchainjs/types": "npm:^0.0.1-beta.8" - bech32: "npm:^2.0.0" - checksum: 10c0/62916ca321388238c26d1f88b9af2fab7c39b768840a76fe43d7be8e20ae473df400c9f5fd6d22f6f322bca1c21a02e2305b94954d7dc2cd2a7992ef54884a03 - languageName: node - linkType: hard - -"@internationalized/date@npm:^3.5.5": - version: 3.5.5 - resolution: "@internationalized/date@npm:3.5.5" - dependencies: - "@swc/helpers": "npm:^0.5.0" - checksum: 10c0/fc17291c8923eaf413e4cb1c74570a8f78269d8b6a5ad74de6f4f45b4e9a84f4243a9c3f224526c36b024f77e4a2fae34df6b34b022ae1b068384e04ad32560e - languageName: node - linkType: hard - -"@internationalized/message@npm:^3.1.4": - version: 3.1.4 - resolution: "@internationalized/message@npm:3.1.4" - dependencies: - "@swc/helpers": "npm:^0.5.0" - intl-messageformat: "npm:^10.1.0" - checksum: 10c0/29d2a2117381a2e50377a13cdc4379981403992b917997c477bc7bc82b59fcdd1252addf36d001edd4d30b2f496ad9c5a982732b52032e5559f0703e27521a9c - languageName: node - linkType: hard - -"@internationalized/number@npm:^3.5.3": - version: 3.5.3 - resolution: "@internationalized/number@npm:3.5.3" - dependencies: - "@swc/helpers": "npm:^0.5.0" - checksum: 10c0/dd1bb4e89c6468b97e8357e1ba0a60234bd2c8226f3241c4c7499e5b1791ba0574127ea6de0fd6c4158e2ceef564bba6531a8f5589e58b820df669e312500f99 - languageName: node - linkType: hard - -"@internationalized/string@npm:^3.2.3": - version: 3.2.3 - resolution: "@internationalized/string@npm:3.2.3" - dependencies: - "@swc/helpers": "npm:^0.5.0" - checksum: 10c0/824d2972951823d0421babb7e03003228fcbd9966028264838b2dad1032d4142f159c82f730a0b8026b8c8c10f06afe7df634c8d0cc8a9b6362909c6f653440a - languageName: node - linkType: hard - -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - -"@istanbuljs/load-nyc-config@npm:^1.0.0": - version: 1.1.0 - resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" - dependencies: - camelcase: "npm:^5.3.1" - find-up: "npm:^4.1.0" - get-package-type: "npm:^0.1.0" - js-yaml: "npm:^3.13.1" - resolve-from: "npm:^5.0.0" - checksum: 10c0/dd2a8b094887da5a1a2339543a4933d06db2e63cbbc2e288eb6431bd832065df0c099d091b6a67436e71b7d6bf85f01ce7c15f9253b4cbebcc3b9a496165ba42 - languageName: node - linkType: hard - -"@istanbuljs/schema@npm:^0.1.2": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 10c0/61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a - languageName: node - linkType: hard - -"@jest/schemas@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/schemas@npm:28.1.3" - dependencies: - "@sinclair/typebox": "npm:^0.24.1" - checksum: 10c0/8c325918f3e1b83e687987b05c2e5143d171f372b091f891fe17835f06fadd864ddae3c7e221a704bdd7e2ea28c4b337124c02023d8affcbdd51eca2879162ac - languageName: node - linkType: hard - -"@jest/transform@npm:28.1.3": - version: 28.1.3 - resolution: "@jest/transform@npm:28.1.3" - dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/types": "npm:^28.1.3" - "@jridgewell/trace-mapping": "npm:^0.3.13" - babel-plugin-istanbul: "npm:^6.1.1" - chalk: "npm:^4.0.0" - convert-source-map: "npm:^1.4.0" - fast-json-stable-stringify: "npm:^2.0.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^28.1.3" - jest-regex-util: "npm:^28.0.2" - jest-util: "npm:^28.1.3" - micromatch: "npm:^4.0.4" - pirates: "npm:^4.0.4" - slash: "npm:^3.0.0" - write-file-atomic: "npm:^4.0.1" - checksum: 10c0/d4211fb30ad17a450a86ab1af488762742b00480c4f76684ba0ad9b2ffc34a0d309a922514775de36a5b74aa8e22ec833e38600565dbbd0596a041fbe9ecf44c - languageName: node - linkType: hard - -"@jest/types@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/types@npm:28.1.3" - dependencies: - "@jest/schemas": "npm:^28.1.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10c0/3cffae7d1133aa7952a6b5c4806f89ed78cb0dfe3ec4e8c5a6e704d7bab3cff86c714abb5f0f637540da22776900a33b3bad79c5ed5fc5b5535fb24e3006e3cb - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5": - version: 0.3.5 - resolution: "@jridgewell/gen-mapping@npm:0.3.5" - dependencies: - "@jridgewell/set-array": "npm:^1.2.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/1be4fd4a6b0f41337c4f5fdf4afc3bd19e39c3691924817108b82ffcb9c9e609c273f936932b9fba4b3a298ce2eb06d9bff4eb1cc3bd81c4f4ee1b4917e25feb - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.2 - resolution: "@jridgewell/resolve-uri@npm:3.1.2" - checksum: 10c0/d502e6fb516b35032331406d4e962c21fe77cdf1cbdb49c6142bcbd9e30507094b18972778a6e27cbad756209cfe34b1a27729e6fa08a2eb92b33943f680cf1e - languageName: node - linkType: hard - -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 10c0/2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": - version: 1.5.0 - resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" - checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.13, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.1.0" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10c0/3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 - languageName: node - linkType: hard - -"@jsdevtools/ono@npm:^7.1.3": - version: 7.1.3 - resolution: "@jsdevtools/ono@npm:7.1.3" - checksum: 10c0/a9f7e3e8e3bc315a34959934a5e2f874c423cf4eae64377d3fc9de0400ed9f36cb5fd5ebce3300d2e8f4085f557c4a8b591427a583729a87841fda46e6c216b9 - languageName: node - linkType: hard - -"@keplr-wallet/common@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/common@npm:0.12.28" - dependencies: - "@keplr-wallet/crypto": "npm:0.12.28" - "@keplr-wallet/types": "npm:0.12.28" - buffer: "npm:^6.0.3" - delay: "npm:^4.4.0" - mobx: "npm:^6.1.7" - checksum: 10c0/6207dac075aad13af4cd78efe5f79b3abfc445cb42cef6c6bf0c06b32c6e570dd1f4f93a4c64214bd03b77a669b308c30c09d041f51e25f14544305bc7f7f6a2 - languageName: node - linkType: hard - -"@keplr-wallet/cosmos@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/cosmos@npm:0.12.28" - dependencies: - "@ethersproject/address": "npm:^5.6.0" - "@keplr-wallet/common": "npm:0.12.28" - "@keplr-wallet/crypto": "npm:0.12.28" - "@keplr-wallet/proto-types": "npm:0.12.28" - "@keplr-wallet/simple-fetch": "npm:0.12.28" - "@keplr-wallet/types": "npm:0.12.28" - "@keplr-wallet/unit": "npm:0.12.28" - bech32: "npm:^1.1.4" - buffer: "npm:^6.0.3" - long: "npm:^4.0.0" - protobufjs: "npm:^6.11.2" - checksum: 10c0/b062eb75c03a1285aba7e5398191961e7e9d01ec53e1094a6c3858817e4e41d9c571f09961289b07fb3175d9648eeb3587744efb563be9c379b79e2ed0fc207c - languageName: node - linkType: hard - -"@keplr-wallet/crypto@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/crypto@npm:0.12.28" - dependencies: - "@ethersproject/keccak256": "npm:^5.5.0" - bip32: "npm:^2.0.6" - bip39: "npm:^3.0.3" - bs58check: "npm:^2.1.2" - buffer: "npm:^6.0.3" - crypto-js: "npm:^4.0.0" - elliptic: "npm:^6.5.3" - sha.js: "npm:^2.4.11" - checksum: 10c0/90bb3ec875c1dbaceb5fa31c2bce201d4556b293e9bc8173e0959bd04f47690a65567ad2c6e8a49f597d7b5b81bf4f02c36fe12e1fa0ee4e5c4447d50101f228 - languageName: node - linkType: hard - -"@keplr-wallet/proto-types@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/proto-types@npm:0.12.28" - dependencies: - long: "npm:^4.0.0" - protobufjs: "npm:^6.11.2" - checksum: 10c0/c3b05d4788040dfcbb8e6ea1516aaa1e375f73fc1099476f880771ae410ec69985ccbf22056a37c8c715446c0e829912fa8061cfbfdd8bdeca74c58a6a153afc - languageName: node - linkType: hard - -"@keplr-wallet/provider-extension@npm:^0.12.102": - version: 0.12.125 - resolution: "@keplr-wallet/provider-extension@npm:0.12.125" - dependencies: - "@keplr-wallet/types": "npm:0.12.125" - deepmerge: "npm:^4.2.2" - long: "npm:^4.0.0" - checksum: 10c0/66064ff80661573a3951ccddaaed50247f949c9cd6a470163c114a1e5c059ec8e3f7f9ee610f21c3f159bffada831f1651bac990447491dd784c0f06876046c7 - languageName: node - linkType: hard - -"@keplr-wallet/provider-extension@npm:^0.12.95": - version: 0.12.124 - resolution: "@keplr-wallet/provider-extension@npm:0.12.124" - dependencies: - "@keplr-wallet/types": "npm:0.12.124" - deepmerge: "npm:^4.2.2" - long: "npm:^4.0.0" - checksum: 10c0/9a3e931253a5c7ebb191930db0442053ec56734d703a1f71e8f4cddcbad6b4d1b92653f03496fda33eed51f6fdbaa0bb24bc4705e08aceafa4cca79a7111c314 - languageName: node - linkType: hard - -"@keplr-wallet/provider@npm:0.12.124": - version: 0.12.124 - resolution: "@keplr-wallet/provider@npm:0.12.124" - dependencies: - "@keplr-wallet/router": "npm:0.12.124" - "@keplr-wallet/types": "npm:0.12.124" - buffer: "npm:^6.0.3" - deepmerge: "npm:^4.2.2" - long: "npm:^4.0.0" - checksum: 10c0/cae63165eed2102a79c7daca0dd8a9eb407a73f4b61166a9454f12686279092c20fbaea1ca6ae01c763b7175e918f4bd6b9e4cca2d044cc9018126da33512cb3 - languageName: node - linkType: hard - -"@keplr-wallet/router@npm:0.12.124": - version: 0.12.124 - resolution: "@keplr-wallet/router@npm:0.12.124" - checksum: 10c0/b7eefbd8c90406e740737adb1a04fd2f98aab8189dcb09f6df88264e9405b81969e44e57e639154e96047167a9941074092613a9b87036924aa55a4b4ac67b5e - languageName: node - linkType: hard - -"@keplr-wallet/simple-fetch@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/simple-fetch@npm:0.12.28" - checksum: 10c0/a5f7b9df3555f1d6b1fb0c72560302a62f6482ce7417c4218724e97827cad3ec8c71ea0dea2929571a9db9236d55ece7df15326944c5e1e64df0d55eab871882 - languageName: node - linkType: hard - -"@keplr-wallet/types@npm:0.12.124, @keplr-wallet/types@npm:^0.12.90, @keplr-wallet/types@npm:^0.12.95": - version: 0.12.124 - resolution: "@keplr-wallet/types@npm:0.12.124" - dependencies: - long: "npm:^4.0.0" - checksum: 10c0/94735f42f0d31c1158d7817e9fd3b6abb700c8d88ebc46d48ef9952ee88bcf3a89436c9578901b00039d2cfe2a30fb856605c93e33f021dcf06abcbb6281300d - languageName: node - linkType: hard - -"@keplr-wallet/types@npm:0.12.125": - version: 0.12.125 - resolution: "@keplr-wallet/types@npm:0.12.125" - dependencies: - long: "npm:^4.0.0" - checksum: 10c0/4f4ce042e7750c49958e2e1d2070e62031f6973a23cccefe27df8c78b4bb4a4a73a651ad687e24c0e358a318d3de820f42f894e3196b228bd634a11b1e2442b6 - languageName: node - linkType: hard - -"@keplr-wallet/types@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/types@npm:0.12.28" - dependencies: - long: "npm:^4.0.0" - checksum: 10c0/a541088e55ee0a57ac0e5a9c56e8b788d6325f438fcb4f0a478ba4ce76e336660774d8373a2c3dc6b53e4c6d7b5d91be3128102f340728c71a25448d35245980 - languageName: node - linkType: hard - -"@keplr-wallet/unit@npm:0.12.28": - version: 0.12.28 - resolution: "@keplr-wallet/unit@npm:0.12.28" - dependencies: - "@keplr-wallet/types": "npm:0.12.28" - big-integer: "npm:^1.6.48" - utility-types: "npm:^3.10.0" - checksum: 10c0/08d86d9ba01a11fcf2acd6a8a8b2252381eda8dc7613e3c3a50d7ebf73433fcece862b437f4118410e8c968983535e0aa5c4f2747eef9fd9785635eff836f7a7 - languageName: node - linkType: hard - -"@keplr-wallet/wc-client@npm:^0.12.95": - version: 0.12.124 - resolution: "@keplr-wallet/wc-client@npm:0.12.124" - dependencies: - "@keplr-wallet/provider": "npm:0.12.124" - "@keplr-wallet/types": "npm:0.12.124" - buffer: "npm:^6.0.3" - deepmerge: "npm:^4.2.2" - long: "npm:^3 || ^4 || ^5" - peerDependencies: - "@walletconnect/sign-client": ^2 - "@walletconnect/types": ^2 - checksum: 10c0/174274d9f171e881dfffe1deb8a1469042aab22e5a4f7d1244dd3cc93abc60769882565c88595d7d6607da93c40f4205c511e3310684817c7e82f1796eb4aac0 - languageName: node - linkType: hard - -"@leapwallet/cosmos-snap-provider@npm:0.1.26": - version: 0.1.26 - resolution: "@leapwallet/cosmos-snap-provider@npm:0.1.26" - dependencies: - "@cosmjs/amino": "npm:^0.32.0" - "@cosmjs/proto-signing": "npm:^0.32.0" - bignumber.js: "npm:^9.1.2" - long: "npm:^5.2.3" - checksum: 10c0/e6a74773eed4754b37777bfbd946fbfd902213774eabb047c3c4a9aec82728be42196d79aee735cefe6e03bd77be4548805a5fd373eba741dd9667004f43523a - languageName: node - linkType: hard - -"@ledgerhq/devices@npm:^8.4.2": - version: 8.4.2 - resolution: "@ledgerhq/devices@npm:8.4.2" - dependencies: - "@ledgerhq/errors": "npm:^6.18.0" - "@ledgerhq/logs": "npm:^6.12.0" - rxjs: "npm:^7.8.1" - semver: "npm:^7.3.5" - checksum: 10c0/b7149c6302d23928fd2d3622d9018af10a56f6960732de0d72e881d19b75b0036f6248ca0845cfe9dfeda32ecb52c352423e79e109c7decf8437948fed7843cd - languageName: node - linkType: hard - -"@ledgerhq/errors@npm:^6.18.0": - version: 6.18.0 - resolution: "@ledgerhq/errors@npm:6.18.0" - checksum: 10c0/0dad36bd049c1eb346b83d2b99c1dde0445c53ae3a2f73d4f9a7f5e278ef61d1e589cc0b30bb81dd3082ad9a751f7d82b662214088e19b09769bded45447fb54 - languageName: node - linkType: hard - -"@ledgerhq/hw-app-cosmos@npm:^6.28.1, @ledgerhq/hw-app-cosmos@npm:^6.30.0": - version: 6.30.2 - resolution: "@ledgerhq/hw-app-cosmos@npm:6.30.2" - dependencies: - "@ledgerhq/errors": "npm:^6.18.0" - "@ledgerhq/hw-transport": "npm:^6.31.2" - bip32-path: "npm:^0.4.2" - checksum: 10c0/b97050851eee114ca62c6cd2ef3020c73e502d5bf8cb8161fb79ac1a4d2949fb555ed4f1db91bdeb1d57375ed2fae56c816f460e2d9739dada0b1285f82e21c2 - languageName: node - linkType: hard - -"@ledgerhq/hw-transport-webhid@npm:^6.27.15, @ledgerhq/hw-transport-webhid@npm:^6.29.0": - version: 6.29.2 - resolution: "@ledgerhq/hw-transport-webhid@npm:6.29.2" - dependencies: - "@ledgerhq/devices": "npm:^8.4.2" - "@ledgerhq/errors": "npm:^6.18.0" - "@ledgerhq/hw-transport": "npm:^6.31.2" - "@ledgerhq/logs": "npm:^6.12.0" - checksum: 10c0/86a610bf99eb44fbd93a7d0afc621f13a5f43e63fc86c64f686f88cc528d0ea62a51f674b8a6148aaa4330cc8ef2c2b2e461bbea5a71ae39305f82124a83377b - languageName: node - linkType: hard - -"@ledgerhq/hw-transport-webusb@npm:^6.27.15, @ledgerhq/hw-transport-webusb@npm:^6.29.0": - version: 6.29.2 - resolution: "@ledgerhq/hw-transport-webusb@npm:6.29.2" - dependencies: - "@ledgerhq/devices": "npm:^8.4.2" - "@ledgerhq/errors": "npm:^6.18.0" - "@ledgerhq/hw-transport": "npm:^6.31.2" - "@ledgerhq/logs": "npm:^6.12.0" - checksum: 10c0/6499398c90ccd1210d9a6b91846df49001b0de7b74a97a8df0020fc35f22b90f3b886499c5237cdf198e914a616f310ccd22238f5136df46699561f6dd2412ed - languageName: node - linkType: hard - -"@ledgerhq/hw-transport@npm:^6.31.0, @ledgerhq/hw-transport@npm:^6.31.2": - version: 6.31.2 - resolution: "@ledgerhq/hw-transport@npm:6.31.2" - dependencies: - "@ledgerhq/devices": "npm:^8.4.2" - "@ledgerhq/errors": "npm:^6.18.0" - "@ledgerhq/logs": "npm:^6.12.0" - events: "npm:^3.3.0" - checksum: 10c0/3fc61c2e844639b7ec73e5eaec2f34235a414ec802df2491ea3d32d854f5f53c592b35b874a9ce899a6087a74a5a750b20c91aae19aaa44eea2faa390edf593f - languageName: node - linkType: hard - -"@ledgerhq/logs@npm:^6.12.0": - version: 6.12.0 - resolution: "@ledgerhq/logs@npm:6.12.0" - checksum: 10c0/573122867ae807a60c3218234019ba7c4b35c14551b90c291fd589d7c2e7f002c2e84151868e67801c9f89a33d8a5569da77aef83b5f5e03b5faa2811cab6a86 - languageName: node - linkType: hard - -"@metamask/object-multiplex@npm:^1.1.0": - version: 1.3.0 - resolution: "@metamask/object-multiplex@npm:1.3.0" - dependencies: - end-of-stream: "npm:^1.4.4" - once: "npm:^1.4.0" - readable-stream: "npm:^2.3.3" - checksum: 10c0/24d80303b545da4c6de77a4f6adf46b3a498e15024f6b40b6e3594cbc7b77248b86b83716f343c24fc62379486b47ab4e5b0a4103552354f08e9fb68ecb01c7c - languageName: node - linkType: hard - -"@metamask/providers@npm:^11.1.1": - version: 11.1.2 - resolution: "@metamask/providers@npm:11.1.2" - dependencies: - "@metamask/object-multiplex": "npm:^1.1.0" - "@metamask/safe-event-emitter": "npm:^3.0.0" - detect-browser: "npm:^5.2.0" - eth-rpc-errors: "npm:^4.0.2" - extension-port-stream: "npm:^2.1.1" - fast-deep-equal: "npm:^3.1.3" - is-stream: "npm:^2.0.0" - json-rpc-engine: "npm:^6.1.0" - json-rpc-middleware-stream: "npm:^4.2.1" - pump: "npm:^3.0.0" - webextension-polyfill: "npm:^0.10.0" - checksum: 10c0/0c0da8735be8943b1801f98115a87554076e97d5ff00fad83bb707992bb35fb8a849ff0f04aecb1ff54ebeba47ba61326e39c5b9b6de373839e18607e2ee7c7b - languageName: node - linkType: hard - -"@metamask/safe-event-emitter@npm:^2.0.0": - version: 2.0.0 - resolution: "@metamask/safe-event-emitter@npm:2.0.0" - checksum: 10c0/a86b91f909834dc14de7eadd38b22d4975f6529001d265cd0f5c894351f69f39447f1ef41b690b9849c86dd2a25a39515ef5f316545d36aea7b3fc50ee930933 - languageName: node - linkType: hard - -"@metamask/safe-event-emitter@npm:^3.0.0": - version: 3.1.1 - resolution: "@metamask/safe-event-emitter@npm:3.1.1" - checksum: 10c0/4dd51651fa69adf65952449b20410acac7edad06f176dc6f0a5d449207527a2e85d5a21a864566e3d8446fb259f8840bd69fdb65932007a882f771f473a2b682 - languageName: node - linkType: hard - -"@motionone/animation@npm:^10.18.0": - version: 10.18.0 - resolution: "@motionone/animation@npm:10.18.0" - dependencies: - "@motionone/easing": "npm:^10.18.0" - "@motionone/types": "npm:^10.17.1" - "@motionone/utils": "npm:^10.18.0" - tslib: "npm:^2.3.1" - checksum: 10c0/83c01ab8ecf5fae221e5012116c4c49d4473ba88ba22197e1d8c1e39364c5c6b9c5271e57ae716fd21f92314d15c63788c48d0a30872ee8d72337e1d98b46834 - languageName: node - linkType: hard - -"@motionone/dom@npm:^10.15.3": - version: 10.18.0 - resolution: "@motionone/dom@npm:10.18.0" - dependencies: - "@motionone/animation": "npm:^10.18.0" - "@motionone/generators": "npm:^10.18.0" - "@motionone/types": "npm:^10.17.1" - "@motionone/utils": "npm:^10.18.0" - hey-listen: "npm:^1.0.8" - tslib: "npm:^2.3.1" - checksum: 10c0/3bd4b1015e88464c9effc170c23bc63bbc910cbb9ca84986ec19ca82e0e13335e63a1f0d12e265fbe93616fe864fc2aec4e952d51e07932894e148de6fac2111 - languageName: node - linkType: hard - -"@motionone/easing@npm:^10.18.0": - version: 10.18.0 - resolution: "@motionone/easing@npm:10.18.0" - dependencies: - "@motionone/utils": "npm:^10.18.0" - tslib: "npm:^2.3.1" - checksum: 10c0/0adf9b7086b0f569d28886890cc0725a489285f2debfcaf27c1c15dfef5736c9f4207cfda14c71b3275f8163777320cb7ff48ad263c7f4ccd31e12a5afc1a952 - languageName: node - linkType: hard - -"@motionone/generators@npm:^10.18.0": - version: 10.18.0 - resolution: "@motionone/generators@npm:10.18.0" - dependencies: - "@motionone/types": "npm:^10.17.1" - "@motionone/utils": "npm:^10.18.0" - tslib: "npm:^2.3.1" - checksum: 10c0/7ed7dda5ac58cd3e8dd347b5539d242d96e02ee16fef921c8d14295a806e6bc429a15291461ec078977bd5f6162677225addd707ca79f808e65bc3599c45c0e9 - languageName: node - linkType: hard - -"@motionone/types@npm:^10.17.1": - version: 10.17.1 - resolution: "@motionone/types@npm:10.17.1" - checksum: 10c0/f7b16cd4f0feda0beac10173afa6de7384722f9f24767f78b7aa90f15b8a89d584073a64387b015a8e015a962fa4b47a8ce23621f47708a08676b12bb0d43bbb - languageName: node - linkType: hard - -"@motionone/utils@npm:^10.18.0": - version: 10.18.0 - resolution: "@motionone/utils@npm:10.18.0" - dependencies: - "@motionone/types": "npm:^10.17.1" - hey-listen: "npm:^1.0.8" - tslib: "npm:^2.3.1" - checksum: 10c0/db57dbb6a131fab36dc1eb4e1f3a4575ca97563221663adce54c138de1e1a9eaf4a4a51ddf99fdab0341112159e0190b35cdeddfdbd08ba3ad1e35886a5324bb - languageName: node - linkType: hard - -"@next/env@npm:13.5.6": - version: 13.5.6 - resolution: "@next/env@npm:13.5.6" - checksum: 10c0/b1fefa21b698397a2f922ee53a5ecb91ff858f042b2a198652b9de49c031fc5e00d79da92ba7d84ef205e95368d5afbb0f104abaf00e9dde7985d9eae63bb4fb - languageName: node - linkType: hard - -"@next/eslint-plugin-next@npm:13.0.5": - version: 13.0.5 - resolution: "@next/eslint-plugin-next@npm:13.0.5" - dependencies: - glob: "npm:7.1.7" - checksum: 10c0/cee469f5484a9da000089ac9dd3169a904f61ab198b575efdaace086fa773aa6cc634a975b4ed567e97b8f8087983b59d133abd83cd51bd86a2213481d2672f8 - languageName: node - linkType: hard - -"@next/swc-darwin-arm64@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-darwin-arm64@npm:13.5.6" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@next/swc-darwin-x64@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-darwin-x64@npm:13.5.6" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@next/swc-linux-arm64-gnu@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-linux-arm64-gnu@npm:13.5.6" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@next/swc-linux-arm64-musl@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-linux-arm64-musl@npm:13.5.6" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@next/swc-linux-x64-gnu@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-linux-x64-gnu@npm:13.5.6" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@next/swc-linux-x64-musl@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-linux-x64-musl@npm:13.5.6" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@next/swc-win32-arm64-msvc@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-win32-arm64-msvc@npm:13.5.6" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@next/swc-win32-ia32-msvc@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-win32-ia32-msvc@npm:13.5.6" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@next/swc-win32-x64-msvc@npm:13.5.6": - version: 13.5.6 - resolution: "@next/swc-win32-x64-msvc@npm:13.5.6" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@noble/curves@npm:1.2.0": - version: 1.2.0 - resolution: "@noble/curves@npm:1.2.0" - dependencies: - "@noble/hashes": "npm:1.3.2" - checksum: 10c0/0bac7d1bbfb3c2286910b02598addd33243cb97c3f36f987ecc927a4be8d7d88e0fcb12b0f0ef8a044e7307d1844dd5c49bb724bfa0a79c8ec50ba60768c97f6 - languageName: node - linkType: hard - -"@noble/curves@npm:^1.1.0": - version: 1.6.0 - resolution: "@noble/curves@npm:1.6.0" - dependencies: - "@noble/hashes": "npm:1.5.0" - checksum: 10c0/f3262aa4d39148e627cd82b5ac1c93f88c5bb46dd2566b5e8e52ffac3a0fc381ad30c2111656fd2bd3b0d37d43d540543e0d93a5ff96a6cb184bc3bfe10d1cd9 - languageName: node - linkType: hard - -"@noble/hashes@npm:1.3.2": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: 10c0/2482cce3bce6a596626f94ca296e21378e7a5d4c09597cbc46e65ffacc3d64c8df73111f2265444e36a3168208628258bbbaccba2ef24f65f58b2417638a20e7 - languageName: node - linkType: hard - -"@noble/hashes@npm:1.5.0, @noble/hashes@npm:^1.3.1": - version: 1.5.0 - resolution: "@noble/hashes@npm:1.5.0" - checksum: 10c0/1b46539695fbfe4477c0822d90c881a04d4fa2921c08c552375b444a48cac9930cb1ee68de0a3c7859e676554d0f3771999716606dc4d8f826e414c11692cdd9 - languageName: node - linkType: hard - -"@noble/hashes@npm:^1, @noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.2.0": - version: 1.4.0 - resolution: "@noble/hashes@npm:1.4.0" - checksum: 10c0/8c3f005ee72e7b8f9cff756dfae1241485187254e3f743873e22073d63906863df5d4f13d441b7530ea614b7a093f0d889309f28b59850f33b66cb26a779a4a5 - languageName: node - linkType: hard - -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - -"@nolyfill/is-core-module@npm:1.0.39": - version: 1.0.39 - resolution: "@nolyfill/is-core-module@npm:1.0.39" - checksum: 10c0/34ab85fdc2e0250879518841f74a30c276bca4f6c3e13526d2d1fe515e1adf6d46c25fcd5989d22ea056d76f7c39210945180b4859fc83b050e2da411aa86289 - languageName: node - linkType: hard - -"@npmcli/agent@npm:^2.0.0": - version: 2.2.2 - resolution: "@npmcli/agent@npm:2.2.2" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/325e0db7b287d4154ecd164c0815c08007abfb07653cc57bceded17bb7fd240998a3cbdbe87d700e30bef494885eccc725ab73b668020811d56623d145b524ae - languageName: node - linkType: hard - -"@npmcli/fs@npm:^3.1.0": - version: 3.1.1 - resolution: "@npmcli/fs@npm:3.1.1" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c37a5b4842bfdece3d14dfdb054f73fe15ed2d3da61b34ff76629fb5b1731647c49166fd2a8bf8b56fcfa51200382385ea8909a3cbecdad612310c114d3f6c99 - languageName: node - linkType: hard - -"@osmonauts/ast@npm:^0.7.2": - version: 0.7.2 - resolution: "@osmonauts/ast@npm:0.7.2" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@babel/types": "npm:7.18.4" - "@osmonauts/proto-parser": "npm:^0.8.2" - "@osmonauts/types": "npm:^0.6.2" - "@osmonauts/utils": "npm:^0.3.11" - case: "npm:1.6.3" - checksum: 10c0/bc22554cadd28acaa210ec79ecbb54a0642225eb5cd8284b669e1008a9aedee4fc16b0c2a782154cc85fd1a07f2cb309eb421fa90dc93afbd025c5ffef6f0910 - languageName: node - linkType: hard - -"@osmonauts/helpers@npm:^0.3.12": - version: 0.3.12 - resolution: "@osmonauts/helpers@npm:0.3.12" - dependencies: - "@babel/runtime": "npm:^7.18.3" - long: "npm:^5.2.0" - protobufjs: "npm:^6.11.3" - checksum: 10c0/60082b95011108af8491c72046137f9b4dfe98ef1695513f52a70178d0012a97c58b370930243a32fdfbfd6837abc821d5b47abef1a9f7114d332f9ad4c2a514 - languageName: node - linkType: hard - -"@osmonauts/proto-parser@npm:^0.8.2": - version: 0.8.2 - resolution: "@osmonauts/proto-parser@npm:0.8.2" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@osmonauts/types": "npm:^0.6.2" - "@pyramation/protobufjs": "npm:6.11.3" - dotty: "npm:0.1.2" - glob: "npm:8.0.3" - mkdirp: "npm:1.0.4" - checksum: 10c0/a91878bc73086f58b24d6d3be77a0a9613c4f345611ba52310dc6634ffc17983604844958318d6aec06295c93c7f484f6addd7dc444f87dc8c8d57a515fef357 - languageName: node - linkType: hard - -"@osmonauts/telescope@npm:^0.9.2": - version: 0.9.3 - resolution: "@osmonauts/telescope@npm:0.9.3" - dependencies: - "@babel/core": "npm:7.18.5" - "@babel/generator": "npm:7.18.2" - "@babel/parser": "npm:^7.18.5" - "@babel/plugin-proposal-class-properties": "npm:7.17.12" - "@babel/plugin-proposal-export-default-from": "npm:7.17.12" - "@babel/plugin-proposal-object-rest-spread": "npm:7.18.0" - "@babel/plugin-transform-runtime": "npm:7.18.5" - "@babel/preset-env": "npm:7.18.2" - "@babel/preset-typescript": "npm:^7.17.12" - "@babel/runtime": "npm:^7.18.3" - "@babel/traverse": "npm:7.18.5" - "@babel/types": "npm:7.18.4" - "@cosmwasm/ts-codegen": "npm:0.4.2" - "@osmonauts/ast": "npm:^0.7.2" - "@osmonauts/proto-parser": "npm:^0.8.2" - "@osmonauts/types": "npm:^0.6.2" - "@osmonauts/utils": "npm:^0.3.11" - "@types/parse-package-name": "npm:0.1.0" - case: "npm:1.6.3" - dargs: "npm:7.0.0" - deepmerge: "npm:4.2.2" - dotty: "npm:0.1.2" - fuzzy: "npm:0.1.3" - glob: "npm:8.0.3" - inquirerer: "npm:0.1.3" - long: "npm:^5.2.0" - minimist: "npm:1.2.6" - mkdirp: "npm:1.0.4" - parse-package-name: "npm:1.0.0" - rimraf: "npm:3.0.2" - shelljs: "npm:0.8.5" - bin: - telescope: main/telescope.js - checksum: 10c0/a55e9ef0afc9506797944ca680697eec1310674d3816d481a738d1476fc56d49ea3dfb45c8d77c409df5143adfeb16d72840da05ca618fdea112fc5644c10fed - languageName: node - linkType: hard - -"@osmonauts/types@npm:^0.6.2": - version: 0.6.2 - resolution: "@osmonauts/types@npm:0.6.2" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@osmonauts/utils": "npm:^0.3.11" - case: "npm:1.6.3" - checksum: 10c0/682743ad77eef91e2690019161157bee09c53bb30d95d32cf1d33e526ab2fde56533625e4c68b84584be23e48953db1f5cfecc614d8fb7b709513d9c52253283 - languageName: node - linkType: hard - -"@osmonauts/utils@npm:^0.3.11": - version: 0.3.13 - resolution: "@osmonauts/utils@npm:0.3.13" - dependencies: - "@babel/runtime": "npm:^7.18.9" - checksum: 10c0/abc987b5f4b138348f0c98e45f882a5a96b5dfe2ba5b84672aab53fc50c2ac4626631db3658a716ef90556b0cc153adff83e1f74098c95810781eb46ccbbcc17 - languageName: node - linkType: hard - -"@parcel/watcher-android-arm64@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-android-arm64@npm:2.4.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@parcel/watcher-darwin-arm64@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-darwin-arm64@npm:2.4.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@parcel/watcher-darwin-x64@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-darwin-x64@npm:2.4.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@parcel/watcher-freebsd-x64@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-freebsd-x64@npm:2.4.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm-glibc@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-linux-arm-glibc@npm:2.4.1" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm64-glibc@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-linux-arm64-glibc@npm:2.4.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm64-musl@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-linux-arm64-musl@npm:2.4.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@parcel/watcher-linux-x64-glibc@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-linux-x64-glibc@npm:2.4.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@parcel/watcher-linux-x64-musl@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-linux-x64-musl@npm:2.4.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@parcel/watcher-wasm@npm:^2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-wasm@npm:2.4.1" - dependencies: - is-glob: "npm:^4.0.3" - micromatch: "npm:^4.0.5" - napi-wasm: "npm:^1.1.0" - checksum: 10c0/30a0d4e618c4867a5990025df56dff3a31a01f78b2d108b31e6ed7fabf123a13fd79ee292f547b572e439d272a6157c2ba9fb8e527456951c14283f872bdc16f - languageName: node - linkType: hard - -"@parcel/watcher-win32-arm64@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-win32-arm64@npm:2.4.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@parcel/watcher-win32-ia32@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-win32-ia32@npm:2.4.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@parcel/watcher-win32-x64@npm:2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher-win32-x64@npm:2.4.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@parcel/watcher@npm:^2.4.1": - version: 2.4.1 - resolution: "@parcel/watcher@npm:2.4.1" - dependencies: - "@parcel/watcher-android-arm64": "npm:2.4.1" - "@parcel/watcher-darwin-arm64": "npm:2.4.1" - "@parcel/watcher-darwin-x64": "npm:2.4.1" - "@parcel/watcher-freebsd-x64": "npm:2.4.1" - "@parcel/watcher-linux-arm-glibc": "npm:2.4.1" - "@parcel/watcher-linux-arm64-glibc": "npm:2.4.1" - "@parcel/watcher-linux-arm64-musl": "npm:2.4.1" - "@parcel/watcher-linux-x64-glibc": "npm:2.4.1" - "@parcel/watcher-linux-x64-musl": "npm:2.4.1" - "@parcel/watcher-win32-arm64": "npm:2.4.1" - "@parcel/watcher-win32-ia32": "npm:2.4.1" - "@parcel/watcher-win32-x64": "npm:2.4.1" - detect-libc: "npm:^1.0.3" - is-glob: "npm:^4.0.3" - micromatch: "npm:^4.0.5" - node-addon-api: "npm:^7.0.0" - node-gyp: "npm:latest" - dependenciesMeta: - "@parcel/watcher-android-arm64": - optional: true - "@parcel/watcher-darwin-arm64": - optional: true - "@parcel/watcher-darwin-x64": - optional: true - "@parcel/watcher-freebsd-x64": - optional: true - "@parcel/watcher-linux-arm-glibc": - optional: true - "@parcel/watcher-linux-arm64-glibc": - optional: true - "@parcel/watcher-linux-arm64-musl": - optional: true - "@parcel/watcher-linux-x64-glibc": - optional: true - "@parcel/watcher-linux-x64-musl": - optional: true - "@parcel/watcher-win32-arm64": - optional: true - "@parcel/watcher-win32-ia32": - optional: true - "@parcel/watcher-win32-x64": - optional: true - checksum: 10c0/33b7112094b9eb46c234d824953967435b628d3d93a0553255e9910829b84cab3da870153c3a870c31db186dc58f3b2db81382fcaee3451438aeec4d786a6211 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - -"@popperjs/core@npm:^2.9.3": - version: 2.11.8 - resolution: "@popperjs/core@npm:2.11.8" - checksum: 10c0/4681e682abc006d25eb380d0cf3efc7557043f53b6aea7a5057d0d1e7df849a00e281cd8ea79c902a35a414d7919621fc2ba293ecec05f413598e0b23d5a1e63 - languageName: node - linkType: hard - -"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/aspromise@npm:1.1.2" - checksum: 10c0/a83343a468ff5b5ec6bff36fd788a64c839e48a07ff9f4f813564f58caf44d011cd6504ed2147bf34835bd7a7dd2107052af755961c6b098fd8902b4f6500d0f - languageName: node - linkType: hard - -"@protobufjs/base64@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/base64@npm:1.1.2" - checksum: 10c0/eec925e681081af190b8ee231f9bad3101e189abbc182ff279da6b531e7dbd2a56f1f306f37a80b1be9e00aa2d271690d08dcc5f326f71c9eed8546675c8caf6 - languageName: node - linkType: hard - -"@protobufjs/codegen@npm:^2.0.4": - version: 2.0.4 - resolution: "@protobufjs/codegen@npm:2.0.4" - checksum: 10c0/26ae337c5659e41f091606d16465bbcc1df1f37cc1ed462438b1f67be0c1e28dfb2ca9f294f39100c52161aef82edf758c95d6d75650a1ddf31f7ddee1440b43 - languageName: node - linkType: hard - -"@protobufjs/eventemitter@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/eventemitter@npm:1.1.0" - checksum: 10c0/1eb0a75180e5206d1033e4138212a8c7089a3d418c6dfa5a6ce42e593a4ae2e5892c4ef7421f38092badba4040ea6a45f0928869989411001d8c1018ea9a6e70 - languageName: node - linkType: hard - -"@protobufjs/fetch@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/fetch@npm:1.1.0" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.1" - "@protobufjs/inquire": "npm:^1.1.0" - checksum: 10c0/cda6a3dc2d50a182c5865b160f72077aac197046600091dbb005dd0a66db9cce3c5eaed6d470ac8ed49d7bcbeef6ee5f0bc288db5ff9a70cbd003e5909065233 - languageName: node - linkType: hard - -"@protobufjs/float@npm:^1.0.2": - version: 1.0.2 - resolution: "@protobufjs/float@npm:1.0.2" - checksum: 10c0/18f2bdede76ffcf0170708af15c9c9db6259b771e6b84c51b06df34a9c339dbbeec267d14ce0bddd20acc142b1d980d983d31434398df7f98eb0c94a0eb79069 - languageName: node - linkType: hard - -"@protobufjs/inquire@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/inquire@npm:1.1.0" - checksum: 10c0/64372482efcba1fb4d166a2664a6395fa978b557803857c9c03500e0ac1013eb4b1aacc9ed851dd5fc22f81583670b4f4431bae186f3373fedcfde863ef5921a - languageName: node - linkType: hard - -"@protobufjs/path@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/path@npm:1.1.2" - checksum: 10c0/cece0a938e7f5dfd2fa03f8c14f2f1cf8b0d6e13ac7326ff4c96ea311effd5fb7ae0bba754fbf505312af2e38500250c90e68506b97c02360a43793d88a0d8b4 - languageName: node - linkType: hard - -"@protobufjs/pool@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/pool@npm:1.1.0" - checksum: 10c0/eda2718b7f222ac6e6ad36f758a92ef90d26526026a19f4f17f668f45e0306a5bd734def3f48f51f8134ae0978b6262a5c517c08b115a551756d1a3aadfcf038 - languageName: node - linkType: hard - -"@protobufjs/utf8@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/utf8@npm:1.1.0" - checksum: 10c0/a3fe31fe3fa29aa3349e2e04ee13dc170cc6af7c23d92ad49e3eeaf79b9766264544d3da824dba93b7855bd6a2982fb40032ef40693da98a136d835752beb487 - languageName: node - linkType: hard - -"@protobufs/amino@npm:^0.0.11": - version: 0.0.11 - resolution: "@protobufs/amino@npm:0.0.11" - dependencies: - "@protobufs/google": "npm:^0.0.10" - checksum: 10c0/c5174c9b86496c0662d12546a97e20eeb78e7cb9c6013ffcb02e30095b266b5b09f3a86fd430a21010a05d8a98882caeab921781ad6a03e68fed70ed046a2c04 - languageName: node - linkType: hard - -"@protobufs/confio@npm:^0.0.6": - version: 0.0.6 - resolution: "@protobufs/confio@npm:0.0.6" - checksum: 10c0/b8d2012e8b415d7e3321eaf47399de2a555d1fcd0df4adeb13618de9cb9058a800f1541e3e2b80ff6e53601c549b0b4d2f4b69798f2ddbca8afd4339f4a485a3 - languageName: node - linkType: hard - -"@protobufs/cosmos@npm:^0.1.0": - version: 0.1.0 - resolution: "@protobufs/cosmos@npm:0.1.0" - dependencies: - "@protobufs/amino": "npm:^0.0.11" - "@protobufs/cosmos_proto": "npm:^0.0.10" - "@protobufs/gogoproto": "npm:^0.0.10" - "@protobufs/google": "npm:^0.0.10" - "@protobufs/tendermint": "npm:^0.0.10" - checksum: 10c0/3e796bd6508338d8ac54a794c669ea3ee429d2d4ee0918c7c2d02e126dd8f5ee02f98716e66c3552de3233c2abcded6bf3d76cdb792b662cd76c289dd715d052 - languageName: node - linkType: hard - -"@protobufs/cosmos_proto@npm:^0.0.10": - version: 0.0.10 - resolution: "@protobufs/cosmos_proto@npm:0.0.10" - dependencies: - "@protobufs/google": "npm:^0.0.10" - checksum: 10c0/78b898b869d9664496ec45d3a9922cae40e1426f2b1629b7d6bf1a5b1c2f94befb5285436db423ef661fde0a8ef9b2e0e19d400c02af26d32d4d535bef32c296 - languageName: node - linkType: hard - -"@protobufs/cosmwasm@npm:^0.1.1": - version: 0.1.1 - resolution: "@protobufs/cosmwasm@npm:0.1.1" - dependencies: - "@protobufs/cosmos": "npm:^0.1.0" - "@protobufs/cosmos_proto": "npm:^0.0.10" - "@protobufs/gogoproto": "npm:^0.0.10" - "@protobufs/google": "npm:^0.0.10" - checksum: 10c0/43596923aef16a33fb5b27d2cf8a034583986f2e37022b268c5fa1e140f0e11c43117ee3f0d8201d3c70bf085ea617ad1c8cabbaa97f790e6bedcd81f5d27862 - languageName: node - linkType: hard - -"@protobufs/gogoproto@npm:^0.0.10": - version: 0.0.10 - resolution: "@protobufs/gogoproto@npm:0.0.10" - dependencies: - "@protobufs/google": "npm:^0.0.10" - checksum: 10c0/4788db77238b81568f76d99b20217829154d0603c74a464aae689d0f7982226aeba285fe20adf194bdbf9556b969b6ba732a9dba7984ede12febda15ce3a5c7e - languageName: node - linkType: hard - -"@protobufs/google@npm:^0.0.10": - version: 0.0.10 - resolution: "@protobufs/google@npm:0.0.10" - checksum: 10c0/a7a91f884b81754e7350694519e817936598f0d271ef4cc64008d6a61a06b998c83f69d17948ee4c96607c31738d4507320e734aa42823ed33a8bea14d34686b - languageName: node - linkType: hard - -"@protobufs/ibc@npm:^0.1.0": - version: 0.1.0 - resolution: "@protobufs/ibc@npm:0.1.0" - dependencies: - "@protobufs/amino": "npm:^0.0.11" - "@protobufs/confio": "npm:^0.0.6" - "@protobufs/cosmos": "npm:^0.1.0" - "@protobufs/gogoproto": "npm:^0.0.10" - "@protobufs/google": "npm:^0.0.10" - "@protobufs/tendermint": "npm:^0.0.10" - checksum: 10c0/312e85f4819c24e812541d7031b933d4443bfe3e662b774db550ac30de1b0d4924f499aaef7b3d10d8963253da159d7e4a84041d2ccb24e1dbaa22e3637d4f69 - languageName: node - linkType: hard - -"@protobufs/tendermint@npm:^0.0.10": - version: 0.0.10 - resolution: "@protobufs/tendermint@npm:0.0.10" - dependencies: - "@protobufs/gogoproto": "npm:^0.0.10" - "@protobufs/google": "npm:^0.0.10" - checksum: 10c0/1d8293259e9c9d54e35c4964829b4a3187af2b5c8350f58f2b01157bcda05d5f39849f8f25f4f14458ff31a0619a5460761200b477ab2a322dd8796b780d9ef7 - languageName: node - linkType: hard - -"@pyramation/json-schema-ref-parser@npm:9.0.6": - version: 9.0.6 - resolution: "@pyramation/json-schema-ref-parser@npm:9.0.6" - dependencies: - "@jsdevtools/ono": "npm:^7.1.3" - call-me-maybe: "npm:^1.0.1" - js-yaml: "npm:^3.13.1" - checksum: 10c0/b30545f2a198101bc15a7cd035d91c23ed8e58485a1fe2d2e2e2a424925d9ff331d2743f418ba086eea994906fa3865fad78f237e805454e7ba52f8b17491d21 - languageName: node - linkType: hard - -"@pyramation/json-schema-to-typescript@npm: 11.0.4": - version: 11.0.4 - resolution: "@pyramation/json-schema-to-typescript@npm:11.0.4" - dependencies: - "@pyramation/json-schema-ref-parser": "npm:9.0.6" - "@types/json-schema": "npm:^7.0.11" - "@types/lodash": "npm:^4.14.182" - "@types/prettier": "npm:^2.6.1" - cli-color: "npm:^2.0.2" - get-stdin: "npm:^8.0.0" - glob: "npm:^7.1.6" - glob-promise: "npm:^4.2.2" - is-glob: "npm:^4.0.3" - lodash: "npm:^4.17.21" - minimist: "npm:^1.2.6" - mkdirp: "npm:^1.0.4" - mz: "npm:^2.7.0" - prettier: "npm:^2.6.2" - bin: - json2ts: dist/src/cli.js - checksum: 10c0/a531d0058f1e9b86850f11804858afcf5203c575439d074b52a8f7229f7e356ac783517272538c24f2efa00df9671941ab7b1251fe6f2ea23384314ef92c88d0 - languageName: node - linkType: hard - -"@pyramation/protobufjs@npm:6.11.3": - version: 6.11.3 - resolution: "@pyramation/protobufjs@npm:6.11.3" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.4" - "@protobufjs/eventemitter": "npm:^1.1.0" - "@protobufjs/fetch": "npm:^1.1.0" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/inquire": "npm:^1.1.0" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.0" - "@types/long": "npm:^4.0.1" - "@types/node": "npm:>=13.7.0" - long: "npm:^4.0.0" - bin: - pbjs: bin/pbjs - pbts: bin/pbts - checksum: 10c0/3961984895f15711e0390d434172d3017e44b32fb4a64b66cc177532501e0c15474f38bb27592f673f55dafe80989f06b1d7ccfed5d041265207dfd09308ea58 - languageName: node - linkType: hard - -"@react-aria/breadcrumbs@npm:^3.5.16": - version: 3.5.16 - resolution: "@react-aria/breadcrumbs@npm:3.5.16" - dependencies: - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/link": "npm:^3.7.4" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/breadcrumbs": "npm:^3.7.7" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/d1a13954ce9760dbba2d9e2d02269ffff5823c473014c57c6c558c43bc826fff75b0313fd51fc491e45c2688c9a1d7ad5b9760fc15db2a3e7dbb7c07a5d14a09 - languageName: node - linkType: hard - -"@react-aria/button@npm:^3.9.8": - version: 3.9.8 - resolution: "@react-aria/button@npm:3.9.8" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/toggle": "npm:^3.7.7" - "@react-types/button": "npm:^3.9.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/759027e13f00d3c3c1ccf06f72b9a2f7f100177f48495539de4db6dd47435bba2d3c3274c811e67875b3e19cbc36dd765c75c7684812c4840dc784710cb7b68a - languageName: node - linkType: hard - -"@react-aria/calendar@npm:^3.5.11": - version: 3.5.11 - resolution: "@react-aria/calendar@npm:3.5.11" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/live-announcer": "npm:^3.3.4" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/calendar": "npm:^3.5.4" - "@react-types/button": "npm:^3.9.6" - "@react-types/calendar": "npm:^3.4.9" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/c6261e9cae5bfc8a6f727bfd125ada9cacdd1f7b51e4049d37017981765ac4ea9e1764fd7cb3611ed4ec0258f7f7a9a8ac81462d65f37ca4fd1612bbfd07c742 - languageName: node - linkType: hard - -"@react-aria/checkbox@npm:^3.14.6": - version: 3.14.6 - resolution: "@react-aria/checkbox@npm:3.14.6" - dependencies: - "@react-aria/form": "npm:^3.0.8" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/toggle": "npm:^3.10.7" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/checkbox": "npm:^3.6.8" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/toggle": "npm:^3.7.7" - "@react-types/checkbox": "npm:^3.8.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/fafef71bb96a121060616f098e0195a0f1b723c6aecb5fe7b0dff4bf6c6ce740eb61dc6617a5cc06c6dfa14af33f4c0b2c21de36497d432c63af2f3526637ab1 - languageName: node - linkType: hard - -"@react-aria/combobox@npm:^3.10.3": - version: 3.10.3 - resolution: "@react-aria/combobox@npm:3.10.3" - dependencies: - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/listbox": "npm:^3.13.3" - "@react-aria/live-announcer": "npm:^3.3.4" - "@react-aria/menu": "npm:^3.15.3" - "@react-aria/overlays": "npm:^3.23.2" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/textfield": "npm:^3.14.8" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/combobox": "npm:^3.9.2" - "@react-stately/form": "npm:^3.0.5" - "@react-types/button": "npm:^3.9.6" - "@react-types/combobox": "npm:^3.12.1" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/7f05b21d84e4587e570563002efb9a0b13bfef78559ee243d6ff50359871191ebb24e88113c127037ca4e4fa6cf7f8d7981e62eb0de2304bcd266cacde68b866 - languageName: node - linkType: hard - -"@react-aria/datepicker@npm:^3.11.2": - version: 3.11.2 - resolution: "@react-aria/datepicker@npm:3.11.2" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@internationalized/number": "npm:^3.5.3" - "@internationalized/string": "npm:^3.2.3" - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/form": "npm:^3.0.8" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/spinbutton": "npm:^3.6.8" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/datepicker": "npm:^3.10.2" - "@react-stately/form": "npm:^3.0.5" - "@react-types/button": "npm:^3.9.6" - "@react-types/calendar": "npm:^3.4.9" - "@react-types/datepicker": "npm:^3.8.2" - "@react-types/dialog": "npm:^3.5.12" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/2bd8971c5bae8cafa3b4dce3aa6f6482436b31073f5f6f1ebbe88dbf2ac6abcb49efde12f485160cfbc6f0ac56b84e012a50d7820a6108bf072355a26b7244ff - languageName: node - linkType: hard - -"@react-aria/dialog@npm:^3.5.17": - version: 3.5.17 - resolution: "@react-aria/dialog@npm:3.5.17" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/overlays": "npm:^3.23.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/dialog": "npm:^3.5.12" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/46d30780c080c6e7c564ede769e9ccda763c54051501bc7149383f26f74e0162a0a46003d558bf30e56aabaa958333a158fd41c2dbc691f5fe17b68365c7bf5f - languageName: node - linkType: hard - -"@react-aria/dnd@npm:^3.7.2": - version: 3.7.2 - resolution: "@react-aria/dnd@npm:3.7.2" - dependencies: - "@internationalized/string": "npm:^3.2.3" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/live-announcer": "npm:^3.3.4" - "@react-aria/overlays": "npm:^3.23.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/dnd": "npm:^3.4.2" - "@react-types/button": "npm:^3.9.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/2cfa3072bed8b26a6bcb128d537b64ff6f7b8ad2837476b9d35722bda8c36d5d3ee74bcfef0d9496ce921396c63e08b9811d8ca736cca25b2ebe57f486f0b5f1 - languageName: node - linkType: hard - -"@react-aria/focus@npm:^3.18.2": - version: 3.18.2 - resolution: "@react-aria/focus@npm:3.18.2" - dependencies: - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - clsx: "npm:^2.0.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/378178278effdc8342ac08a198f7479fb6955e8b6c85ff238e1cb47b81fcae88e8fa9b6c14cb00f1e6cc8952a01eff9581b32022e5e631aceaa8dd63d59706a3 - languageName: node - linkType: hard - -"@react-aria/form@npm:^3.0.8": - version: 3.0.8 - resolution: "@react-aria/form@npm:3.0.8" - dependencies: - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/form": "npm:^3.0.5" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/a4e442505de7bcc41d6f3683f430521b2643b42ec54ca998ad5475ff88d1729712357990757fc5722c7622f61b484190b82a2764dda35feda2fd3ba99a67e5e1 - languageName: node - linkType: hard - -"@react-aria/grid@npm:^3.10.3": - version: 3.10.3 - resolution: "@react-aria/grid@npm:3.10.3" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/live-announcer": "npm:^3.3.4" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/grid": "npm:^3.9.2" - "@react-stately/selection": "npm:^3.16.2" - "@react-types/checkbox": "npm:^3.8.3" - "@react-types/grid": "npm:^3.2.8" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/351dd76078278f805c48f97b5249cdebd85cc428bc3a751fb33034d46bb8d9b1ad3b81cd9782944afd22063c91057b63882a07badc4f1f0170b5077b29aa06ec - languageName: node - linkType: hard - -"@react-aria/gridlist@npm:^3.9.3": - version: 3.9.3 - resolution: "@react-aria/gridlist@npm:3.9.3" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/grid": "npm:^3.10.3" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/list": "npm:^3.10.8" - "@react-stately/tree": "npm:^3.8.4" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/ff5c7af71025de816a3f064af89520454e893ff224003f1b8e22cddaefa56ca8c09020411eed19eb11212d7b20810d1addb1c6dba2b75854d8b306228331ed79 - languageName: node - linkType: hard - -"@react-aria/i18n@npm:^3.12.2": - version: 3.12.2 - resolution: "@react-aria/i18n@npm:3.12.2" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@internationalized/message": "npm:^3.1.4" - "@internationalized/number": "npm:^3.5.3" - "@internationalized/string": "npm:^3.2.3" - "@react-aria/ssr": "npm:^3.9.5" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/6969cdafa899fa66b8a88eb80335e90d9ff31505d9814d3120e981c1ce5ccb6422be321ecab214d42b1ba935bef0172cbc71e639e47436e37899af84426feb15 - languageName: node - linkType: hard - -"@react-aria/interactions@npm:^3.22.2": - version: 3.22.2 - resolution: "@react-aria/interactions@npm:3.22.2" - dependencies: - "@react-aria/ssr": "npm:^3.9.5" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/f5e1b3e8ea040cc2d32b35fcd749ba32d63069a31d407ac4fe08808d32a458a4a76ed7d630e88a38f0ba7cbea315908c020059ea21284b6003b106417da40e7a - languageName: node - linkType: hard - -"@react-aria/label@npm:^3.7.11": - version: 3.7.11 - resolution: "@react-aria/label@npm:3.7.11" - dependencies: - "@react-aria/utils": "npm:^3.25.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/1072a6b0f4a0f9f594aea1bddf44ac6ea99b63ba1049b55de851c7a6692e5ed0cc8df0a05dae2c781dcb71fb10bf49c2fb4c0a2e6b4fb6e5c19d633f13607f0d - languageName: node - linkType: hard - -"@react-aria/link@npm:^3.7.4": - version: 3.7.4 - resolution: "@react-aria/link@npm:3.7.4" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/link": "npm:^3.5.7" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/f3d5133967194e237c16ba9568bb6c85cb2114dba0d779f9ee51e46a2ed327c3d357f8bdf7d1062f11be6ea928c105a48549785cbdbe729659682fcc6abe4c70 - languageName: node - linkType: hard - -"@react-aria/listbox@npm:^3.12.1, @react-aria/listbox@npm:^3.13.3": - version: 3.13.3 - resolution: "@react-aria/listbox@npm:3.13.3" - dependencies: - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/list": "npm:^3.10.8" - "@react-types/listbox": "npm:^3.5.1" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b4c48310ede8905cab5a4705c3514870f29ddad79a634a450f3ad00469efdead42b6e25f2bf433ea12a56290ed70531646fb7bd2fd3c5e9a6a5e8ec5f831e369 - languageName: node - linkType: hard - -"@react-aria/live-announcer@npm:^3.3.4": - version: 3.3.4 - resolution: "@react-aria/live-announcer@npm:3.3.4" - dependencies: - "@swc/helpers": "npm:^0.5.0" - checksum: 10c0/69c86b75686a2c4108da3f959da4c5739b0130ff370468c6d8ea3aaf594315c6ac1577c5b7bdb56629073ad19852d2bef18e412fd7acfd6c390201291ac9dcf9 - languageName: node - linkType: hard - -"@react-aria/menu@npm:^3.15.3": - version: 3.15.3 - resolution: "@react-aria/menu@npm:3.15.3" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/overlays": "npm:^3.23.2" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/menu": "npm:^3.8.2" - "@react-stately/tree": "npm:^3.8.4" - "@react-types/button": "npm:^3.9.6" - "@react-types/menu": "npm:^3.9.11" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b61b9fe943e47ad4db30c38b12b5c5529c3d460c357ffd7a26452b99751d53f9600d6bf1e87231342363f615f70296a0858d36ae82ab5c7e52945b54056f213b - languageName: node - linkType: hard - -"@react-aria/meter@npm:^3.4.16": - version: 3.4.16 - resolution: "@react-aria/meter@npm:3.4.16" - dependencies: - "@react-aria/progress": "npm:^3.4.16" - "@react-types/meter": "npm:^3.4.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/ced05ef75d5731323ff22e50449ef3625b726200d942f3cb46664ac4f03f2221bc9f3f46db2696941728a49b3127cee1167353d4217f368ebbfbaa96bf4a5e57 - languageName: node - linkType: hard - -"@react-aria/numberfield@npm:^3.11.6": - version: 3.11.6 - resolution: "@react-aria/numberfield@npm:3.11.6" - dependencies: - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/spinbutton": "npm:^3.6.8" - "@react-aria/textfield": "npm:^3.14.8" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/numberfield": "npm:^3.9.6" - "@react-types/button": "npm:^3.9.6" - "@react-types/numberfield": "npm:^3.8.5" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/d3eee1334e96311e9c4ae8205c4a004c0d58b99a750524e0a768add6073ff042096d92dcd69df03fb184eb3613b49c60b2f1e533127fb01c5d3cf40435f9abbc - languageName: node - linkType: hard - -"@react-aria/overlays@npm:^3.22.1, @react-aria/overlays@npm:^3.23.2": - version: 3.23.2 - resolution: "@react-aria/overlays@npm:3.23.2" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/ssr": "npm:^3.9.5" - "@react-aria/utils": "npm:^3.25.2" - "@react-aria/visually-hidden": "npm:^3.8.15" - "@react-stately/overlays": "npm:^3.6.10" - "@react-types/button": "npm:^3.9.6" - "@react-types/overlays": "npm:^3.8.9" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/4ec179c1074183ba553d235387ef1ee9aef1463dcef41cd45f48410c9a46aa148b83f562dce78a5d0767060a4b7362ae9e2b2877886931c41a2385b9d249b722 - languageName: node - linkType: hard - -"@react-aria/progress@npm:^3.4.16": - version: 3.4.16 - resolution: "@react-aria/progress@npm:3.4.16" - dependencies: - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/progress": "npm:^3.5.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/9cfa814a67c08f902b3b8fe6df0df0fb9a740298c2183bff3c0a6c937292e8317713f9a3c27c6a8247736be629ce734ab87c7541c109439285fa2e598f4735f7 - languageName: node - linkType: hard - -"@react-aria/radio@npm:^3.10.7": - version: 3.10.7 - resolution: "@react-aria/radio@npm:3.10.7" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/form": "npm:^3.0.8" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/radio": "npm:^3.10.7" - "@react-types/radio": "npm:^3.8.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/a852e7d7fcadbe24ee6cdca5309171e0e67893804494bb512e47329b1e1ef0d77fb9530b7d05fe485c6282aff6a59b7565a1c5bb075c559567a6f0e2ad49a47d - languageName: node - linkType: hard - -"@react-aria/searchfield@npm:^3.7.8": - version: 3.7.8 - resolution: "@react-aria/searchfield@npm:3.7.8" - dependencies: - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/textfield": "npm:^3.14.8" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/searchfield": "npm:^3.5.6" - "@react-types/button": "npm:^3.9.6" - "@react-types/searchfield": "npm:^3.5.8" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e2038d9dcc921447f3c2e481bce569666acd56e2174206f94f26e499c2dd4d381e1cad5edb5c3adbb47dbbb7c50e79996931c60cdb2e34601b1a6713d903aab0 - languageName: node - linkType: hard - -"@react-aria/select@npm:^3.14.9": - version: 3.14.9 - resolution: "@react-aria/select@npm:3.14.9" - dependencies: - "@react-aria/form": "npm:^3.0.8" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/listbox": "npm:^3.13.3" - "@react-aria/menu": "npm:^3.15.3" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-aria/visually-hidden": "npm:^3.8.15" - "@react-stately/select": "npm:^3.6.7" - "@react-types/button": "npm:^3.9.6" - "@react-types/select": "npm:^3.9.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/80c69f8cde15ca86d89e84ab222ba0ff34da13fb29b2966e3278ac8984bfc3511c1c6100410369a7f82c6fe226924f9b49d4deb42d93572dabb853c175c53c19 - languageName: node - linkType: hard - -"@react-aria/selection@npm:^3.19.3": - version: 3.19.3 - resolution: "@react-aria/selection@npm:3.19.3" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/selection": "npm:^3.16.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/8642ac94780b580ade6f8571b97fdeba7ab28203a86f5d6170f69ea39c0b8c1553c6e4648a0666c2819e5a6f9d5475685a12c61df2463ae5524434c8186cc08d - languageName: node - linkType: hard - -"@react-aria/separator@npm:^3.4.2": - version: 3.4.2 - resolution: "@react-aria/separator@npm:3.4.2" - dependencies: - "@react-aria/utils": "npm:^3.25.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/6914fc36e40e7313a21e479db6a51dac02dfa261b3e3f133c469900bdbab3c1731ccc8694f42ba76fb97c0a12bf700100ab5ca0e2e0db27e27739777da23ec5c - languageName: node - linkType: hard - -"@react-aria/slider@npm:^3.7.11": - version: 3.7.11 - resolution: "@react-aria/slider@npm:3.7.11" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/slider": "npm:^3.5.7" - "@react-types/shared": "npm:^3.24.1" - "@react-types/slider": "npm:^3.7.5" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/dbfe7bc712aeb5e9172571e639be63d232e8d3ffdf92687146c81b695c7f971ee39d7af89bdc1e1e0a685f279a3d918b0c9b256998dd98a7a263d8d709342be1 - languageName: node - linkType: hard - -"@react-aria/spinbutton@npm:^3.6.8": - version: 3.6.8 - resolution: "@react-aria/spinbutton@npm:3.6.8" - dependencies: - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/live-announcer": "npm:^3.3.4" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/button": "npm:^3.9.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/a910eca9755929e73975a266595f4dca5a6e11de877fa5e70b7a0ee042848a3005db50344fe4ea559f811a9203cea3b3d69e7bbdb76d7aa380e87e5ccbf3ad4d - languageName: node - linkType: hard - -"@react-aria/ssr@npm:^3.9.5": - version: 3.9.5 - resolution: "@react-aria/ssr@npm:3.9.5" - dependencies: - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e28d3e366b77c77276bd74c8d906ccccc9a5f72c00e65c82c9f35584c3bb2467513429e87facc4e6ede756a2870dddb1645073a6b9afb00b3f28f20a1b0f2d36 - languageName: node - linkType: hard - -"@react-aria/switch@npm:^3.6.7": - version: 3.6.7 - resolution: "@react-aria/switch@npm:3.6.7" - dependencies: - "@react-aria/toggle": "npm:^3.10.7" - "@react-stately/toggle": "npm:^3.7.7" - "@react-types/shared": "npm:^3.24.1" - "@react-types/switch": "npm:^3.5.5" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/0c8fd8efacfc1be66ecff7c570493bd54dfff0b99e1c1cc4533d8ed793dc619b33e4dc14da28c64201b2248e3c0dc48af4c7ef144968d0d4a33146b8cc42c7f7 - languageName: node - linkType: hard - -"@react-aria/table@npm:^3.15.3": - version: 3.15.3 - resolution: "@react-aria/table@npm:3.15.3" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/grid": "npm:^3.10.3" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/live-announcer": "npm:^3.3.4" - "@react-aria/utils": "npm:^3.25.2" - "@react-aria/visually-hidden": "npm:^3.8.15" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/flags": "npm:^3.0.3" - "@react-stately/table": "npm:^3.12.2" - "@react-types/checkbox": "npm:^3.8.3" - "@react-types/grid": "npm:^3.2.8" - "@react-types/shared": "npm:^3.24.1" - "@react-types/table": "npm:^3.10.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/6f482f0b299bdcdc3ace6f7eb37bdf3c3c0bcc7a52d6e2c6f5701af0a4d661e800b6384932e0c236be45b7cbdbfcf20ea2870e2208e3964ace1872b24e2c999e - languageName: node - linkType: hard - -"@react-aria/tabs@npm:^3.9.5": - version: 3.9.5 - resolution: "@react-aria/tabs@npm:3.9.5" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/tabs": "npm:^3.6.9" - "@react-types/shared": "npm:^3.24.1" - "@react-types/tabs": "npm:^3.3.9" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/4e2b994c3093cc996a7eb052815b95dc9715f93ad1bff8be186dd75d2a10a08a04c73377e20cda8ffce6c0134b9ce60b104d6eca0c4d392ca61a83b595609691 - languageName: node - linkType: hard - -"@react-aria/tag@npm:^3.4.5": - version: 3.4.5 - resolution: "@react-aria/tag@npm:3.4.5" - dependencies: - "@react-aria/gridlist": "npm:^3.9.3" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/list": "npm:^3.10.8" - "@react-types/button": "npm:^3.9.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/595fb4eb9fae91b77d53b98a806d4de5e98c0d691960a5fbeec7ff332ca975d2ff461497f69dad74f417f41418c318461cf098ba2ea52652136cb7e2a60e41c2 - languageName: node - linkType: hard - -"@react-aria/textfield@npm:^3.14.8": - version: 3.14.8 - resolution: "@react-aria/textfield@npm:3.14.8" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/form": "npm:^3.0.8" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/shared": "npm:^3.24.1" - "@react-types/textfield": "npm:^3.9.6" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e74cf7cfa2f791472e7603b323f9c75d08bbadc5ddd9dd705b13be305e787f5e3021c1bc03c8e6a0d11ae9e900c05a27bcff032ebefb9ece0028fc4e16796757 - languageName: node - linkType: hard - -"@react-aria/toggle@npm:^3.10.7": - version: 3.10.7 - resolution: "@react-aria/toggle@npm:3.10.7" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/toggle": "npm:^3.7.7" - "@react-types/checkbox": "npm:^3.8.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/4db82eaa7ec69e313e313b39dfa39c2bd8ec2222e6534f7fca05e1184e5c1124335d07507bdb227058aac2712b84a0f5b3c62d9dd17f40a90acc03b467648f44 - languageName: node - linkType: hard - -"@react-aria/tooltip@npm:^3.7.7": - version: 3.7.7 - resolution: "@react-aria/tooltip@npm:3.7.7" - dependencies: - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-stately/tooltip": "npm:^3.4.12" - "@react-types/shared": "npm:^3.24.1" - "@react-types/tooltip": "npm:^3.4.11" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/858b95d3d0ec905e96314d8a554a192c520842a350d7791204374bb97caadfa9f8b5d0fe09070bf492be562003055881d9cd5cb412e563ae44cc9619076fdaf6 - languageName: node - linkType: hard - -"@react-aria/utils@npm:^3.24.1, @react-aria/utils@npm:^3.25.2": - version: 3.25.2 - resolution: "@react-aria/utils@npm:3.25.2" - dependencies: - "@react-aria/ssr": "npm:^3.9.5" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - clsx: "npm:^2.0.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/9e190a954d6e068439b90ef29ebd95193f8f50b9326b626985b6cb2ed72dd0d85b63c91505ddfc179a58b66940c598d2d9ef047e2dfd81b38c0878e550b2e22e - languageName: node - linkType: hard - -"@react-aria/visually-hidden@npm:^3.8.15": - version: 3.8.15 - resolution: "@react-aria/visually-hidden@npm:3.8.15" - dependencies: - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/utils": "npm:^3.25.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/f274fd3142997f3841e1a33b4057c024f53cebd3ec1398cbf2a3212df247704f3b38eb4d6276785ac0820ea9908cb129a6cd5150368a7640e537a298083daeca - languageName: node - linkType: hard - -"@react-icons/all-files@npm:^4.1.0": - version: 4.1.0 - resolution: "@react-icons/all-files@npm:4.1.0" - peerDependencies: - react: "*" - checksum: 10c0/6327623b857ba2a9fdf835f2e7029feec7acdd53dc14163085789518d7e1323deb7db649b660d3bad3991285e8408238ad4d09c37b9a0ba7d2601dd74ac0ae56 - languageName: node - linkType: hard - -"@react-stately/calendar@npm:^3.5.4": - version: 3.5.4 - resolution: "@react-stately/calendar@npm:3.5.4" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/calendar": "npm:^3.4.9" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e5b5e8cda088fb46c6073e2330b7e9fcd4c0fa834a1a8cdb954036b5c405a7d88b81907da37be43f6e58a7d79609072c4b0cc3b0fe19bf45df175d42def772de - languageName: node - linkType: hard - -"@react-stately/checkbox@npm:^3.6.8": - version: 3.6.8 - resolution: "@react-stately/checkbox@npm:3.6.8" - dependencies: - "@react-stately/form": "npm:^3.0.5" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/checkbox": "npm:^3.8.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/87e93c2259ea490cc968aab51e5cf21d1df2d7db8b7b2d0bc09dd3a3964946c5b912deca86483f61d49a8a8f2d6220d31d5ef1f3948b86ff12de7b275d0584af - languageName: node - linkType: hard - -"@react-stately/collections@npm:^3.10.9": - version: 3.10.9 - resolution: "@react-stately/collections@npm:3.10.9" - dependencies: - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/726fb28ee15b3c115caef3b39513b70672c9a6c6e4de88d0c13572d449e95f5bd188bc2eac0ebd147fef78b4e008eefb20149e63c37b3c9bdf126dc98a237d2b - languageName: node - linkType: hard - -"@react-stately/combobox@npm:^3.9.2": - version: 3.9.2 - resolution: "@react-stately/combobox@npm:3.9.2" - dependencies: - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/list": "npm:^3.10.8" - "@react-stately/overlays": "npm:^3.6.10" - "@react-stately/select": "npm:^3.6.7" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/combobox": "npm:^3.12.1" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/600f4d2fba00478ef6e7f9ac04b45bebff1ddca9eb2d60838c0048136d084c2e4db79e46575231fda8f42bab9126dcef394520529268f2a4dec7b38ecab9a54e - languageName: node - linkType: hard - -"@react-stately/data@npm:^3.11.6": - version: 3.11.6 - resolution: "@react-stately/data@npm:3.11.6" - dependencies: - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b81e229ef2ca8b0bc80a35a47695a1fbf1dd1c15f1728411e2440b398439024ce405cba963cbff267bf0a6235650f06744b719e6764fa21f6f490307c98783e1 - languageName: node - linkType: hard - -"@react-stately/datepicker@npm:^3.10.2": - version: 3.10.2 - resolution: "@react-stately/datepicker@npm:3.10.2" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@internationalized/string": "npm:^3.2.3" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/overlays": "npm:^3.6.10" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/datepicker": "npm:^3.8.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/49583dfb0f5ca1f9208f132fd951ea828cf411f06321dd25ffdc892314d14269108c22c0efdeea5bbdbae6dc361ff9b39a9e5aefd045e5f6146d458d906ef750 - languageName: node - linkType: hard - -"@react-stately/dnd@npm:^3.4.2": - version: 3.4.2 - resolution: "@react-stately/dnd@npm:3.4.2" - dependencies: - "@react-stately/selection": "npm:^3.16.2" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/91b8e21844faa7db1ed51c0f2d1372c8a2b1f7720e19ea968be828ea261aa91ee9d12692856a2fa62b2783a7f10233b3ee363bb252d8cfcbe70fa10604539a87 - languageName: node - linkType: hard - -"@react-stately/flags@npm:^3.0.3": - version: 3.0.3 - resolution: "@react-stately/flags@npm:3.0.3" - dependencies: - "@swc/helpers": "npm:^0.5.0" - checksum: 10c0/314a5885e2060dc56a32d1bae892af1f7644e14e66aa3ae3f6c0b1b4a6a1a8ded0e03adcea24bcfb9df3b87cd77f2139fde8a3d1098a0e3ba3604c3c8916385e - languageName: node - linkType: hard - -"@react-stately/form@npm:^3.0.5": - version: 3.0.5 - resolution: "@react-stately/form@npm:3.0.5" - dependencies: - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e85c2e4635b56b29d0aaf636e6c4d9df9c8a2877db2cfb3a0d0a4ecb4fa54f028a24a606a495152d83c8b350a97dda199c572f1413a2d49ce9dd8ebcf577a51f - languageName: node - linkType: hard - -"@react-stately/grid@npm:^3.9.2": - version: 3.9.2 - resolution: "@react-stately/grid@npm:3.9.2" - dependencies: - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/selection": "npm:^3.16.2" - "@react-types/grid": "npm:^3.2.8" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/04806e5cf9d66440f374c1bf12445ba5c7d271583083ecb2675a236c77883909b12118205188f97f5b39dcf2c78c9d89544f57f6f70c283484d1627b610b7ab5 - languageName: node - linkType: hard - -"@react-stately/list@npm:^3.10.8": - version: 3.10.8 - resolution: "@react-stately/list@npm:3.10.8" - dependencies: - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/selection": "npm:^3.16.2" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/cf4754f9eaac86785720fa05c93972387247ed62226ce3580c10a820e75e173594f215d949747569ae52d4ce055b047ac854946368dbed94f1ac236be9010431 - languageName: node - linkType: hard - -"@react-stately/menu@npm:^3.8.2": - version: 3.8.2 - resolution: "@react-stately/menu@npm:3.8.2" - dependencies: - "@react-stately/overlays": "npm:^3.6.10" - "@react-types/menu": "npm:^3.9.11" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/52713bfbf6343d459be80a4fb7949ea3b25db125412a1ddc3775e64aa7d2af22f0362000104fa35a12b142ca3b631368859b85d1171161e77d4b01493f223a47 - languageName: node - linkType: hard - -"@react-stately/numberfield@npm:^3.9.6": - version: 3.9.6 - resolution: "@react-stately/numberfield@npm:3.9.6" - dependencies: - "@internationalized/number": "npm:^3.5.3" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/numberfield": "npm:^3.8.5" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/5f9f45d6d1056769b2b4b08a418852bb5e302ebdc638af596415a87e50fb4d2cc6112e0831d69bedfb014d109a7c0f6fecd792518e69c4e92ca3d3ea2a341754 - languageName: node - linkType: hard - -"@react-stately/overlays@npm:^3.6.10": - version: 3.6.10 - resolution: "@react-stately/overlays@npm:3.6.10" - dependencies: - "@react-stately/utils": "npm:^3.10.3" - "@react-types/overlays": "npm:^3.8.9" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/3bc5a97fe34a53cacd7fdf73e6dec30abf961c9ab8bf83af8fe1c8df8ccc2f39dacceb4834bd08b77cb823d83e213e855d5ebaa50f2c77a98eeecdb422bede28 - languageName: node - linkType: hard - -"@react-stately/radio@npm:^3.10.7": - version: 3.10.7 - resolution: "@react-stately/radio@npm:3.10.7" - dependencies: - "@react-stately/form": "npm:^3.0.5" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/radio": "npm:^3.8.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/908f0c5eb6a0726b279ab365f7062dea90efd68e4f187a2c151235b10cc5ebfdc8d43a6b835839d0d9816461eefa2fd37e1a6a295b48f25f0afdf15f95ee2369 - languageName: node - linkType: hard - -"@react-stately/searchfield@npm:^3.5.6": - version: 3.5.6 - resolution: "@react-stately/searchfield@npm:3.5.6" - dependencies: - "@react-stately/utils": "npm:^3.10.3" - "@react-types/searchfield": "npm:^3.5.8" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e7ea3bb886c9b043bc473a74e164419c5cecb3d416ecdd0232e152d61300bc87ed6a5356baf3c0a11af212400f3c27799e917f1641dbe0954e90c52861ba7a8f - languageName: node - linkType: hard - -"@react-stately/select@npm:^3.6.7": - version: 3.6.7 - resolution: "@react-stately/select@npm:3.6.7" - dependencies: - "@react-stately/form": "npm:^3.0.5" - "@react-stately/list": "npm:^3.10.8" - "@react-stately/overlays": "npm:^3.6.10" - "@react-types/select": "npm:^3.9.6" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/6fb434004996bb15f85172f2ad571f5a6cfe82e48f29405da515fbe4d36e0903966daaad8d055e9be8dfb358bcb530fd81c15866c451c28645f7a5b83c2ca48c - languageName: node - linkType: hard - -"@react-stately/selection@npm:^3.16.2": - version: 3.16.2 - resolution: "@react-stately/selection@npm:3.16.2" - dependencies: - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/4928bec77ab6f51f79948f2f19f6177d16def6c509e5a142eccc3406fec6e16832a50fd157aff1005f313a815c95dd3a0fa1503443c8fbff8dc1982c57f56297 - languageName: node - linkType: hard - -"@react-stately/slider@npm:^3.5.7": - version: 3.5.7 - resolution: "@react-stately/slider@npm:3.5.7" - dependencies: - "@react-stately/utils": "npm:^3.10.3" - "@react-types/shared": "npm:^3.24.1" - "@react-types/slider": "npm:^3.7.5" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e895a4c942cfbe6e07532c9e482b55d3d61fb59e4e9a0832ec9f51b84fd09c3d26b83e17827520ee45bdcfa81f412b13e662ef77ac0b1ff21619b5824d91087f - languageName: node - linkType: hard - -"@react-stately/table@npm:^3.12.2": - version: 3.12.2 - resolution: "@react-stately/table@npm:3.12.2" - dependencies: - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/flags": "npm:^3.0.3" - "@react-stately/grid": "npm:^3.9.2" - "@react-stately/selection": "npm:^3.16.2" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/grid": "npm:^3.2.8" - "@react-types/shared": "npm:^3.24.1" - "@react-types/table": "npm:^3.10.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/3c46d4b02eb948e40a83d50e5a51614d00970db261ef046c4061e2a12f3784bd41e0c9598d4ed663104c377fb110aaffbe954439864448e956761e589a709b6e - languageName: node - linkType: hard - -"@react-stately/tabs@npm:^3.6.9": - version: 3.6.9 - resolution: "@react-stately/tabs@npm:3.6.9" - dependencies: - "@react-stately/list": "npm:^3.10.8" - "@react-types/shared": "npm:^3.24.1" - "@react-types/tabs": "npm:^3.3.9" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/f36a930e4900e4aecd49fbffb9bd013ba34c310188501ccb61a914d0cfe2291f198ea02ee8c12968afea77ad0c8e98b5015d8e0eac84b8b2d9cb6cfdb68fb055 - languageName: node - linkType: hard - -"@react-stately/toggle@npm:^3.7.7": - version: 3.7.7 - resolution: "@react-stately/toggle@npm:3.7.7" - dependencies: - "@react-stately/utils": "npm:^3.10.3" - "@react-types/checkbox": "npm:^3.8.3" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/eb7757e5df8f442229c857b9d8da9bf29f22f1fc197273473360433ee4cf5321a4137a3967b934eaf5ddf211ef7f48918eecbcafee76da0f997e9729973c544e - languageName: node - linkType: hard - -"@react-stately/tooltip@npm:^3.4.12": - version: 3.4.12 - resolution: "@react-stately/tooltip@npm:3.4.12" - dependencies: - "@react-stately/overlays": "npm:^3.6.10" - "@react-types/tooltip": "npm:^3.4.11" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/370be423cfca5e4e24991f0d3626a51e715683c1bbaa99151c422ea24c0641f26f3241885a650173c46cf7ce0be1d532363f2b78cd65a0cfc446277a6ef76b8b - languageName: node - linkType: hard - -"@react-stately/tree@npm:^3.8.4": - version: 3.8.4 - resolution: "@react-stately/tree@npm:3.8.4" - dependencies: - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/selection": "npm:^3.16.2" - "@react-stately/utils": "npm:^3.10.3" - "@react-types/shared": "npm:^3.24.1" - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/58cfc6bd6d5b989e344fae04d735b9f7d0fd9b1c22f76a00d84d02ed4aaaf7056e3f5b77a3860e097d425803332b4757e71e0f7c5ef43079015a62d26cff9a3f - languageName: node - linkType: hard - -"@react-stately/utils@npm:^3.10.3": - version: 3.10.3 - resolution: "@react-stately/utils@npm:3.10.3" - dependencies: - "@swc/helpers": "npm:^0.5.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/5ab34ed32c49281e01b08d87d1564bae880b68b8d25faf2b3babf825eb75e7029b73fd6469a9567e03a0e152bfaf130700e1c9fb4949d1db62fac5cd33af951e - languageName: node - linkType: hard - -"@react-types/breadcrumbs@npm:^3.7.7": - version: 3.7.7 - resolution: "@react-types/breadcrumbs@npm:3.7.7" - dependencies: - "@react-types/link": "npm:^3.5.7" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/9deaac78acfd4ccf9d821bdf3bed8701e933b1e106f9ff55ca890cb6e75eaf5e3432d631ac61f02829078305c00bc54123c82d0405511b83b171ca1f64d8e48c - languageName: node - linkType: hard - -"@react-types/button@npm:^3.9.6": - version: 3.9.6 - resolution: "@react-types/button@npm:3.9.6" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b041a3922d8fa0a41ae4ca4f1e229b8ded70397057b1d6c6cd62e619978530c04cb283578a0c21afb83246169bfa0a71fb065071d12b58fa5d8c5e36c39abf1c - languageName: node - linkType: hard - -"@react-types/calendar@npm:^3.4.9": - version: 3.4.9 - resolution: "@react-types/calendar@npm:3.4.9" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/611a5890464de326d5f8e7f97c442d81d8d7da0f792cab1ee1819d4230f5444ee3c38d2bf524152c3cad19904a4f5795c0e1a6776812c039d339f30eeb88722e - languageName: node - linkType: hard - -"@react-types/checkbox@npm:^3.8.3": - version: 3.8.3 - resolution: "@react-types/checkbox@npm:3.8.3" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/cc968b449857022a3b6a51ca7882ba6a7bc17a4878457c94eec93fcaf482cb02611b471c4fdb2c5060422bc6a2e6f4a10db011e48eb64bcece8d17934707cde6 - languageName: node - linkType: hard - -"@react-types/combobox@npm:^3.12.1": - version: 3.12.1 - resolution: "@react-types/combobox@npm:3.12.1" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/714dde84ce0effba879744bb4ae914a13215621d8b46692b09fbe71238143067163f9d07bcf2ea252aeb893118db57ceb32994746523852dd8d216a28ce3384b - languageName: node - linkType: hard - -"@react-types/datepicker@npm:^3.8.2": - version: 3.8.2 - resolution: "@react-types/datepicker@npm:3.8.2" - dependencies: - "@internationalized/date": "npm:^3.5.5" - "@react-types/calendar": "npm:^3.4.9" - "@react-types/overlays": "npm:^3.8.9" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b8da4a90df3e3ecb5494e97c4b40abe74c5f8b3565c50cac3775a85e5268d04846d86e504a71d57943fc92bf3068c5499a4b273d269a441cba75dca77ee83eeb - languageName: node - linkType: hard - -"@react-types/dialog@npm:^3.5.12": - version: 3.5.12 - resolution: "@react-types/dialog@npm:3.5.12" - dependencies: - "@react-types/overlays": "npm:^3.8.9" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/75991c5be8a28323936baa2461db4cb4dc877a9f210a9d4f11f667d7b0e1eca2f90090fbaf335bb4be71c905216286177721fd7e9ba3ae084b1a272b2e8da6cb - languageName: node - linkType: hard - -"@react-types/grid@npm:^3.2.8": - version: 3.2.8 - resolution: "@react-types/grid@npm:3.2.8" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/1c2c456f89b2984fc330f9ddacd4d45c8aaf1afbaec8444e753a84dceea4381325c07d153b28942959b369ad7667575ae9bae08bd7c11a1ee22e908dd658498c - languageName: node - linkType: hard - -"@react-types/link@npm:^3.5.7": - version: 3.5.7 - resolution: "@react-types/link@npm:3.5.7" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/cc8c526ff1fcacab28647f7355a96ba21b858444d53ff5eb236636fc88da9e3fb91e784aa5cf2d112cdbf7be8fdea5067a975be6c1c113cd7e5dc3bf4fc8499c - languageName: node - linkType: hard - -"@react-types/listbox@npm:^3.5.1": - version: 3.5.1 - resolution: "@react-types/listbox@npm:3.5.1" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/fa1d0ec7e70a4b9a2a2e379899016dd81d9172f9065f6626436ab956f166f73e0062c2c73f8122b993096d8936f8433e85d6ecebeae67b54980e571ec30d688e - languageName: node - linkType: hard - -"@react-types/menu@npm:^3.9.11": - version: 3.9.11 - resolution: "@react-types/menu@npm:3.9.11" - dependencies: - "@react-types/overlays": "npm:^3.8.9" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e0bae8eb7c19900512a32d0d4d2909b7537c28be30cb58c9c8ff0de621828bdf14030fbe17cd8addf919844aa3d462182b2c81a0b3eba864f7144c9edbec3add - languageName: node - linkType: hard - -"@react-types/meter@npm:^3.4.3": - version: 3.4.3 - resolution: "@react-types/meter@npm:3.4.3" - dependencies: - "@react-types/progress": "npm:^3.5.6" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e06d845e33b6cd0d3dee783ea68927187409896db963be1b7356e6ab63f909fbb3deaed6f95ce8f2b8855cd2d4f8138b4c54a5ab7e6fb8898d324a177302e16d - languageName: node - linkType: hard - -"@react-types/numberfield@npm:^3.8.5": - version: 3.8.5 - resolution: "@react-types/numberfield@npm:3.8.5" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/842c6cbb6c68c48764b1498103b1c40e940285366a8b342c3e259c48b518e9c986d9e358e7f0f6af0aaddbb48d709681c4fd4dcd3bb9b553a5be20d7548ce068 - languageName: node - linkType: hard - -"@react-types/overlays@npm:^3.8.9": - version: 3.8.9 - resolution: "@react-types/overlays@npm:3.8.9" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/8719684bd606e119f3a20db73cecf1e36e7c2d8158b996e9308495e5b78252689c459ce394a798f03ebb0c7303eac67093ce9345eb45e5bb4e1ae55451dcf4b3 - languageName: node - linkType: hard - -"@react-types/progress@npm:^3.5.6": - version: 3.5.6 - resolution: "@react-types/progress@npm:3.5.6" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/dfd6e957148fef5014e3b3ca761f38ef9927dfad78bdbe194eb08fa747718903397d973170f91a4f98c6c703217996e60c76217c0601f71015c43a6332dc6aae - languageName: node - linkType: hard - -"@react-types/radio@npm:^3.8.3": - version: 3.8.3 - resolution: "@react-types/radio@npm:3.8.3" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b110d915a11747897781bf635fc1f1b86be892f8bd01ce38e2e8e229d9ab82e46b37980540bd930e71124ccc02081d143c513440994da127f9ed2d34a75912ee - languageName: node - linkType: hard - -"@react-types/searchfield@npm:^3.5.8": - version: 3.5.8 - resolution: "@react-types/searchfield@npm:3.5.8" - dependencies: - "@react-types/shared": "npm:^3.24.1" - "@react-types/textfield": "npm:^3.9.6" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/7ddf33358f76b8652aecdd6fec95c891890dcdf97a9c8bafa19f67e049f308ce3aefa0f230c8b3276bba1dd52a1c49f4dbbb03d7cb0ab01bf72308cb117bb85b - languageName: node - linkType: hard - -"@react-types/select@npm:^3.9.6": - version: 3.9.6 - resolution: "@react-types/select@npm:3.9.6" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/10495da46af019a1f2a5473740f4dcf84cd03c4aee9aa19dba2a8867f521efc33d4587c02ef762619c903ef8426cd887b89957efe3c91c96acd9e07a60f19af8 - languageName: node - linkType: hard - -"@react-types/shared@npm:^3.24.1": - version: 3.24.1 - resolution: "@react-types/shared@npm:3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/34ef83cf5d945963208beb724d54468e5371fd7361024f6f42a29cdc6d4a9516aa4d82804cdecbcf01c16d82c96aacb511418d7c839e1ea4579b20411e565ed4 - languageName: node - linkType: hard - -"@react-types/slider@npm:^3.7.5": - version: 3.7.5 - resolution: "@react-types/slider@npm:3.7.5" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/7566c726c2b4a0639130c4bb0730dc66bb17cacdfba39af95fbe64ef30544805ac2eb00af69d2689fc86529a0b7beea544e4c2d7f6fc91f1e3633921d0e9feff - languageName: node - linkType: hard - -"@react-types/switch@npm:^3.5.5": - version: 3.5.5 - resolution: "@react-types/switch@npm:3.5.5" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b7d865c49d213af0048fd36d29991779021c3a6bc9a8e57eabe10f05be42b122c49fc3d2ba287bf3fd33b65fc00442905c9f3784d2524a333c931c782c55e2eb - languageName: node - linkType: hard - -"@react-types/table@npm:^3.10.1": - version: 3.10.1 - resolution: "@react-types/table@npm:3.10.1" - dependencies: - "@react-types/grid": "npm:^3.2.8" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/1f3d2390f421ed9053816ba40b41744c5168d8f3b926c29d565e5588420a133315f1d2301db16c33ffff5d0689fad014b388385fd5876a7c365873e21b02189d - languageName: node - linkType: hard - -"@react-types/tabs@npm:^3.3.9": - version: 3.3.9 - resolution: "@react-types/tabs@npm:3.3.9" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/53416d3060c911e3c1416e5fe749cffff5eca30ed1a101bb012b9c89726cea818fd1f16650230410bec0dd7d2626dc1581c53106d7a0660101174a242f6ae458 - languageName: node - linkType: hard - -"@react-types/textfield@npm:^3.9.6": - version: 3.9.6 - resolution: "@react-types/textfield@npm:3.9.6" - dependencies: - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/3d3744eae4efe7138151373c74df38aecb143a1c745e1ac1479af54273024ed35b55306852b32a941daf6f2b549680cd3f5bdf5fe05086791c2e11d28996a73e - languageName: node - linkType: hard - -"@react-types/tooltip@npm:^3.4.11": - version: 3.4.11 - resolution: "@react-types/tooltip@npm:3.4.11" - dependencies: - "@react-types/overlays": "npm:^3.8.9" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/76bfaeb25c9c06668e85e451bd527e0e15249f025a12fe4c710e8cb4d6ae2643f9fad065729646205c87b7be571c5d8baadb43ab7bc44946dc7e73402aae7f98 - languageName: node - linkType: hard - -"@rushstack/eslint-patch@npm:^1.1.3": - version: 1.10.4 - resolution: "@rushstack/eslint-patch@npm:1.10.4" - checksum: 10c0/de312bd7a3cb0f313c9720029eb719d8762fe54946cce2d33ac142b1cbb5817c4a5a92518dfa476c26311602d37f5a8f7caa90a0c73e3d6a56f9a05d2799c172 - languageName: node - linkType: hard - -"@sinclair/typebox@npm:^0.24.1": - version: 0.24.51 - resolution: "@sinclair/typebox@npm:0.24.51" - checksum: 10c0/458131e83ca59ad3721f0abeef2aa5220aff2083767e1143d75c67c85d55ef7a212f48f394471ee6bdd2e860ba30f09a489cdd2a28a2824d5b0d1014bdfb2552 - languageName: node - linkType: hard - -"@stablelib/aead@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/aead@npm:1.0.1" - checksum: 10c0/8ec16795a6f94264f93514661e024c5b0434d75000ea133923c57f0db30eab8ddc74fa35f5ff1ae4886803a8b92e169b828512c9e6bc02c818688d0f5b9f5aef - languageName: node - linkType: hard - -"@stablelib/binary@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/binary@npm:1.0.1" - dependencies: - "@stablelib/int": "npm:^1.0.1" - checksum: 10c0/154cb558d8b7c20ca5dc2e38abca2a3716ce36429bf1b9c298939cea0929766ed954feb8a9c59245ac64c923d5d3466bb7d99f281debd3a9d561e1279b11cd35 - languageName: node - linkType: hard - -"@stablelib/bytes@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/bytes@npm:1.0.1" - checksum: 10c0/ee99bb15dac2f4ae1aa4e7a571e76483617a441feff422442f293993bc8b2c7ef021285c98f91a043bc05fb70502457799e28ffd43a8564a17913ee5ce889237 - languageName: node - linkType: hard - -"@stablelib/chacha20poly1305@npm:1.0.1": - version: 1.0.1 - resolution: "@stablelib/chacha20poly1305@npm:1.0.1" - dependencies: - "@stablelib/aead": "npm:^1.0.1" - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/chacha": "npm:^1.0.1" - "@stablelib/constant-time": "npm:^1.0.1" - "@stablelib/poly1305": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/fe202aa8aface111c72bc9ec099f9c36a7b1470eda9834e436bb228618a704929f095b937f04e867fe4d5c40216ff089cbfeb2eeb092ab33af39ff333eb2c1e6 - languageName: node - linkType: hard - -"@stablelib/chacha@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/chacha@npm:1.0.1" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/4d70b484ae89416d21504024f977f5517bf16b344b10fb98382c9e3e52fe8ca77ac65f5d6a358d8b152f2c9ffed101a1eb15ed1707cdf906e1b6624db78d2d16 - languageName: node - linkType: hard - -"@stablelib/constant-time@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/constant-time@npm:1.0.1" - checksum: 10c0/694a282441215735a1fdfa3d06db5a28ba92423890967a154514ef28e0d0298ce7b6a2bc65ebc4273573d6669a6b601d330614747aa2e69078c1d523d7069e12 - languageName: node - linkType: hard - -"@stablelib/ed25519@npm:^1.0.2": - version: 1.0.3 - resolution: "@stablelib/ed25519@npm:1.0.3" - dependencies: - "@stablelib/random": "npm:^1.0.2" - "@stablelib/sha512": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/b4a05e3c24dabd8a9e0b5bd72dea761bfb4b5c66404308e9f0529ef898e75d6f588234920762d5372cb920d9d47811250160109f02d04b6eed53835fb6916eb9 - languageName: node - linkType: hard - -"@stablelib/hash@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/hash@npm:1.0.1" - checksum: 10c0/58b5572a4067820b77a1606ed2d4a6dc4068c5475f68ba0918860a5f45adf60b33024a0cea9532dcd8b7345c53b3c9636a23723f5f8ae83e0c3648f91fb5b5cc - languageName: node - linkType: hard - -"@stablelib/hkdf@npm:1.0.1": - version: 1.0.1 - resolution: "@stablelib/hkdf@npm:1.0.1" - dependencies: - "@stablelib/hash": "npm:^1.0.1" - "@stablelib/hmac": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/722d30e36afa8029fda2a9e8c65ad753deff92a234e708820f9fd39309d2494e1c035a4185f29ae8d7fbf8a74862b27128c66a1fb4bd7a792bd300190080dbe9 - languageName: node - linkType: hard - -"@stablelib/hmac@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/hmac@npm:1.0.1" - dependencies: - "@stablelib/constant-time": "npm:^1.0.1" - "@stablelib/hash": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/a111d5e687966b62c81f7dbd390f13582b027edee9bd39df6474a6472e5ad89d705e735af32bae2c9280a205806649f54b5ff8c4e8c8a7b484083a35b257e9e6 - languageName: node - linkType: hard - -"@stablelib/int@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/int@npm:1.0.1" - checksum: 10c0/e1a6a7792fc2146d65de56e4ef42e8bc385dd5157eff27019b84476f564a1a6c43413235ed0e9f7c9bb8907dbdab24679467aeb10f44c92e6b944bcd864a7ee0 - languageName: node - linkType: hard - -"@stablelib/keyagreement@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/keyagreement@npm:1.0.1" - dependencies: - "@stablelib/bytes": "npm:^1.0.1" - checksum: 10c0/18c9e09772a058edee265c65992ec37abe4ab5118171958972e28f3bbac7f2a0afa6aaf152ec1d785452477bdab5366b3f5b750e8982ae9ad090f5fa2e5269ba - languageName: node - linkType: hard - -"@stablelib/poly1305@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/poly1305@npm:1.0.1" - dependencies: - "@stablelib/constant-time": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/080185ffa92f5111e6ecfeab7919368b9984c26d048b9c09a111fbc657ea62bb5dfe6b56245e1804ce692a445cc93ab6625936515fa0e7518b8f2d86feda9630 - languageName: node - linkType: hard - -"@stablelib/random@npm:1.0.2, @stablelib/random@npm:^1.0.1, @stablelib/random@npm:^1.0.2": - version: 1.0.2 - resolution: "@stablelib/random@npm:1.0.2" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/ebb217cfb76db97d98ec07bd7ce03a650fa194b91f0cb12382738161adff1830f405de0e9bad22bbc352422339ff85f531873b6a874c26ea9b59cfcc7ea787e0 - languageName: node - linkType: hard - -"@stablelib/sha256@npm:1.0.1": - version: 1.0.1 - resolution: "@stablelib/sha256@npm:1.0.1" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/hash": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/e29ee9bc76eece4345e9155ce4bdeeb1df8652296be72bd2760523ad565e3b99dca85b81db3b75ee20b34837077eb8542ca88f153f162154c62ba1f75aecc24a - languageName: node - linkType: hard - -"@stablelib/sha512@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/sha512@npm:1.0.1" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/hash": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/84549070a383f4daf23d9065230eb81bc8f590c68bf5f7968f1b78901236b3bb387c14f63773dc6c3dc78e823b1c15470d2a04d398a2506391f466c16ba29b58 - languageName: node - linkType: hard - -"@stablelib/wipe@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/wipe@npm:1.0.1" - checksum: 10c0/c5a54f769c286a5b3ecff979471dfccd4311f2e84a959908e8c0e3aa4eed1364bd9707f7b69d1384b757e62cc295c221fa27286c7f782410eb8a690f30cfd796 - languageName: node - linkType: hard - -"@stablelib/x25519@npm:1.0.3": - version: 1.0.3 - resolution: "@stablelib/x25519@npm:1.0.3" - dependencies: - "@stablelib/keyagreement": "npm:^1.0.1" - "@stablelib/random": "npm:^1.0.2" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10c0/d8afe8a120923a434359d7d1c6759780426fed117a84a6c0f84d1a4878834cb4c2d7da78a1fa7cf227ce3924fdc300cd6ed6e46cf2508bf17b1545c319ab8418 - languageName: node - linkType: hard - -"@swc/helpers@npm:0.5.2": - version: 0.5.2 - resolution: "@swc/helpers@npm:0.5.2" - dependencies: - tslib: "npm:^2.4.0" - checksum: 10c0/b6fa49bcf6c00571d0eb7837b163f8609960d4d77538160585e27ed167361e9776bd6e5eb9646ffac2fb4d43c58df9ca50dab9d96ab097e6591bc82a75fd1164 - languageName: node - linkType: hard - -"@swc/helpers@npm:^0.5.0": - version: 0.5.12 - resolution: "@swc/helpers@npm:0.5.12" - dependencies: - tslib: "npm:^2.4.0" - checksum: 10c0/44693c0f34d772d63f3a6fb461964ec583055549a96df9790afec125b2ba06929a63cf9a165a9aaf22317779f460f8caafa94458b70d5cb2bc057b6ba9b5d02c - languageName: node - linkType: hard - -"@tanstack/query-core@npm:4.32.0": - version: 4.32.0 - resolution: "@tanstack/query-core@npm:4.32.0" - checksum: 10c0/e897d1d294d79f6d3d522db2d64977e71d99f5f74e22314bd0bbbf6c31df3deac5d19516fc2513be4ad1c545fd031d4355ee0a47dec7211e70e80c9cd5feb25e - languageName: node - linkType: hard - -"@tanstack/react-query@npm:4.32.0": - version: 4.32.0 - resolution: "@tanstack/react-query@npm:4.32.0" - dependencies: - "@tanstack/query-core": "npm:4.32.0" - use-sync-external-store: "npm:^1.2.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-native: "*" - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - checksum: 10c0/761f0c48fba41d0296ac76d42d92128d6ca55fca261d819252753fb38988a6c1dc9442344bdccba946a8db243ebcd3f259c61ac1957933493db0605e1a0a0e77 - languageName: node - linkType: hard - -"@tanstack/react-virtual@npm:^3.8.3": - version: 3.10.5 - resolution: "@tanstack/react-virtual@npm:3.10.5" - dependencies: - "@tanstack/virtual-core": "npm:3.10.5" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/e1407b6b53abed97376fb3b30fa706bbb5797da0ad34f7c13182f808ff63a04add7f4b5001e85e3a33302a12823752c1cb4f40d166b2ee808bcaa3329201c50e - languageName: node - linkType: hard - -"@tanstack/virtual-core@npm:3.10.5": - version: 3.10.5 - resolution: "@tanstack/virtual-core@npm:3.10.5" - checksum: 10c0/844d0a30923636b8fd454688eaf4714375d6fa252baaf5494ec5fd6786183cae6267861b54ca693284c1ab935e2cc142d8f3684e89316dfe0472c5b8c3bf71c8 - languageName: node - linkType: hard - -"@terra-money/feather.js@npm:^1.0.8": - version: 1.2.1 - resolution: "@terra-money/feather.js@npm:1.2.1" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@terra-money/legacy.proto": "npm:@terra-money/terra.proto@^0.1.7" - "@terra-money/terra.proto": "npm:^4.0.3" - assert: "npm:^2.0.0" - axios: "npm:^0.27.2" - bech32: "npm:^2.0.0" - bip32: "npm:^2.0.6" - bip39: "npm:^3.0.3" - bufferutil: "npm:^4.0.3" - crypto-browserify: "npm:^3.12.0" - decimal.js: "npm:^10.2.1" - ethers: "npm:^5.7.2" - jscrypto: "npm:^1.0.1" - keccak256: "npm:^1.0.6" - long: "npm:^5.2.3" - readable-stream: "npm:^3.6.0" - secp256k1: "npm:^4.0.2" - tmp: "npm:^0.2.1" - utf-8-validate: "npm:^5.0.5" - ws: "npm:^7.5.9" - checksum: 10c0/bf1c952bf6e6531f663727c5793bfc4a9fb1a6025eed0b8f68f994bedced184a11d961a4ae42620690108171428933fc48e68ea078b53c2375b938b791eb4ff0 - languageName: node - linkType: hard - -"@terra-money/legacy.proto@npm:@terra-money/terra.proto@^0.1.7": - version: 0.1.7 - resolution: "@terra-money/terra.proto@npm:0.1.7" - dependencies: - google-protobuf: "npm:^3.17.3" - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.2" - checksum: 10c0/3ae54002eac9b8fa7dcc90e167ca50134fd5d36549a336e1aa02c9deb6133441d755e6681a6a272e51c70e27610e1566ee5ccf1e2174f239f81b631cb7a8eead - languageName: node - linkType: hard - -"@terra-money/station-connector@npm:^1.1.0": - version: 1.1.4 - resolution: "@terra-money/station-connector@npm:1.1.4" - dependencies: - bech32: "npm:^2.0.0" - peerDependencies: - "@cosmjs/amino": ^0.31.0 - axios: ^0.27.2 - checksum: 10c0/34c3b5ed099ca79394d4f37fbf4275b3b3c047420f005a3999b685a1c2ba985947713a9a91a0dbe2cafd32d205491074ad6610c6cf6aa88beb0c0ae63c25b3b4 - languageName: node - linkType: hard - -"@terra-money/terra.proto@npm:3.0.5": - version: 3.0.5 - resolution: "@terra-money/terra.proto@npm:3.0.5" - dependencies: - "@improbable-eng/grpc-web": "npm:^0.14.1" - google-protobuf: "npm:^3.17.3" - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.2" - checksum: 10c0/f057cbf49dd8dc9effce875f2e60b7c0f17b375b160f08887a3007998584be834141f221dad642c68aac5324583f6e95d06fecc1fc8ee18374960bdd58808538 - languageName: node - linkType: hard - -"@terra-money/terra.proto@npm:^4.0.3": - version: 4.0.10 - resolution: "@terra-money/terra.proto@npm:4.0.10" - dependencies: - "@improbable-eng/grpc-web": "npm:^0.14.1" - browser-headers: "npm:^0.4.1" - google-protobuf: "npm:^3.17.3" - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.2" - checksum: 10c0/80e701fe8ff5420c896acda16682cc8ad3aa4a317bbfcae89c5576a2ad800f349b0cb1d9bba82c1770829e083bbfbbf82ba2d6124ea06c8b64a17d386126c71e - languageName: node - linkType: hard - -"@terra-money/wallet-types@npm:^3.11.2": - version: 3.11.2 - resolution: "@terra-money/wallet-types@npm:3.11.2" - peerDependencies: - "@terra-money/terra.js": ^3.1.6 - checksum: 10c0/3fe1d475bb02655b4d4817dfbddf52f6ecbb87c8731a0c2077f4a5c36c88c730e9d167e802294b04fd6f25f841f68ab12f159f69164375c00dac2a9b6e6f32f5 - languageName: node - linkType: hard - -"@types/debug@npm:^4.0.0": - version: 4.1.12 - resolution: "@types/debug@npm:4.1.12" - dependencies: - "@types/ms": "npm:*" - checksum: 10c0/5dcd465edbb5a7f226e9a5efd1f399c6172407ef5840686b73e3608ce135eeca54ae8037dcd9f16bdb2768ac74925b820a8b9ecc588a58ca09eca6acabe33e2f - languageName: node - linkType: hard - -"@types/glob@npm:*": - version: 8.1.0 - resolution: "@types/glob@npm:8.1.0" - dependencies: - "@types/minimatch": "npm:^5.1.2" - "@types/node": "npm:*" - checksum: 10c0/ded07aa0d7a1caf3c47b85e262be82989ccd7933b4a14712b79c82fd45a239249811d9fc3a135b3e9457afa163e74a297033d7245b0dc63cd3d032f3906b053f - languageName: node - linkType: hard - -"@types/glob@npm:^7.1.3": - version: 7.2.0 - resolution: "@types/glob@npm:7.2.0" - dependencies: - "@types/minimatch": "npm:*" - "@types/node": "npm:*" - checksum: 10c0/a8eb5d5cb5c48fc58c7ca3ff1e1ddf771ee07ca5043da6e4871e6757b4472e2e73b4cfef2644c38983174a4bc728c73f8da02845c28a1212f98cabd293ecae98 - languageName: node - linkType: hard - -"@types/graceful-fs@npm:^4.1.3": - version: 4.1.9 - resolution: "@types/graceful-fs@npm:4.1.9" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/235d2fc69741448e853333b7c3d1180a966dd2b8972c8cbcd6b2a0c6cd7f8d582ab2b8e58219dbc62cce8f1b40aa317ff78ea2201cdd8249da5025adebed6f0b - languageName: node - linkType: hard - -"@types/hast@npm:^2.0.0": - version: 2.3.10 - resolution: "@types/hast@npm:2.3.10" - dependencies: - "@types/unist": "npm:^2" - checksum: 10c0/16daac35d032e656defe1f103f9c09c341a6dc553c7ec17b388274076fa26e904a71ea5ea41fd368a6d5f1e9e53be275c80af7942b9c466d8511d261c9529c7e - languageName: node - linkType: hard - -"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0": - version: 2.0.6 - resolution: "@types/istanbul-lib-coverage@npm:2.0.6" - checksum: 10c0/3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7 - languageName: node - linkType: hard - -"@types/istanbul-lib-report@npm:*": - version: 3.0.3 - resolution: "@types/istanbul-lib-report@npm:3.0.3" - dependencies: - "@types/istanbul-lib-coverage": "npm:*" - checksum: 10c0/247e477bbc1a77248f3c6de5dadaae85ff86ac2d76c5fc6ab1776f54512a745ff2a5f791d22b942e3990ddbd40f3ef5289317c4fca5741bedfaa4f01df89051c - languageName: node - linkType: hard - -"@types/istanbul-reports@npm:^3.0.0": - version: 3.0.4 - resolution: "@types/istanbul-reports@npm:3.0.4" - dependencies: - "@types/istanbul-lib-report": "npm:*" - checksum: 10c0/1647fd402aced5b6edac87274af14ebd6b3a85447ef9ad11853a70fd92a98d35f81a5d3ea9fcb5dbb5834e800c6e35b64475e33fcae6bfa9acc70d61497c54ee - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.11, @types/json-schema@npm:^7.0.6": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10c0/6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac - languageName: node - linkType: hard - -"@types/lodash.mergewith@npm:4.6.7": - version: 4.6.7 - resolution: "@types/lodash.mergewith@npm:4.6.7" - dependencies: - "@types/lodash": "npm:*" - checksum: 10c0/d3945227d2e08034eaec1eb15abb204af841215f55b9deb8173ac3bcb24e40c98181033652ad4bc46951afc04fe0de1021677d4036f0e5cff4c05e238e76abee - languageName: node - linkType: hard - -"@types/lodash@npm:*, @types/lodash@npm:^4.14.168, @types/lodash@npm:^4.14.182": - version: 4.17.7 - resolution: "@types/lodash@npm:4.17.7" - checksum: 10c0/40c965b5ffdcf7ff5c9105307ee08b782da228c01b5c0529122c554c64f6b7168fc8f11dc79aa7bae4e67e17efafaba685dc3a47e294dbf52a65ed2b67100561 - languageName: node - linkType: hard - -"@types/long@npm:^4.0.1": - version: 4.0.2 - resolution: "@types/long@npm:4.0.2" - checksum: 10c0/42ec66ade1f72ff9d143c5a519a65efc7c1c77be7b1ac5455c530ae9acd87baba065542f8847522af2e3ace2cc999f3ad464ef86e6b7352eece34daf88f8c924 - languageName: node - linkType: hard - -"@types/mdast@npm:^3.0.0": - version: 3.0.15 - resolution: "@types/mdast@npm:3.0.15" - dependencies: - "@types/unist": "npm:^2" - checksum: 10c0/fcbf716c03d1ed5465deca60862e9691414f9c43597c288c7d2aefbe274552e1bbd7aeee91b88a02597e88a28c139c57863d0126fcf8416a95fdc681d054ee3d - languageName: node - linkType: hard - -"@types/minimatch@npm:*, @types/minimatch@npm:^5.1.2": - version: 5.1.2 - resolution: "@types/minimatch@npm:5.1.2" - checksum: 10c0/83cf1c11748891b714e129de0585af4c55dd4c2cafb1f1d5233d79246e5e1e19d1b5ad9e8db449667b3ffa2b6c80125c429dbee1054e9efb45758dbc4e118562 - languageName: node - linkType: hard - -"@types/ms@npm:*": - version: 0.7.34 - resolution: "@types/ms@npm:0.7.34" - checksum: 10c0/ac80bd90012116ceb2d188fde62d96830ca847823e8ca71255616bc73991aa7d9f057b8bfab79e8ee44ffefb031ddd1bcce63ea82f9e66f7c31ec02d2d823ccc - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:>=13.7.0": - version: 22.5.1 - resolution: "@types/node@npm:22.5.1" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/35373176d8a1d4e16004a1ed303e68d39e4c6341024dc056f2577982df98c1a045a6b677f12ed557796f09bbf7d621f428f6874cc37ed28f7b336fa604b5f6a6 - languageName: node - linkType: hard - -"@types/node@npm:10.12.18": - version: 10.12.18 - resolution: "@types/node@npm:10.12.18" - checksum: 10c0/7c2f966f59bff476ea9bf6bbe2d4b03d583899cb4fd7eb4d4daf49bab3475a9c68601ed8e40f57f89a860f46ab4e6c0216ad428506abac17182e888675b265f8 - languageName: node - linkType: hard - -"@types/node@npm:18.15.13": - version: 18.15.13 - resolution: "@types/node@npm:18.15.13" - checksum: 10c0/6e5f61c559e60670a7a8fb88e31226ecc18a21be103297ca4cf9848f0a99049dae77f04b7ae677205f2af494f3701b113ba8734f4b636b355477a6534dbb8ada - languageName: node - linkType: hard - -"@types/node@npm:^20.14.6": - version: 20.16.2 - resolution: "@types/node@npm:20.16.2" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/74fac185dbd2c6b301cde75747c1cd6c9ca1ad7266147ea107a798837f40b8a05991177ebd7925fc7450d51334096259d186afad6e0d22864b7c97f8afef6ba7 - languageName: node - linkType: hard - -"@types/parse-json@npm:^4.0.0": - version: 4.0.2 - resolution: "@types/parse-json@npm:4.0.2" - checksum: 10c0/b1b863ac34a2c2172fbe0807a1ec4d5cb684e48d422d15ec95980b81475fac4fdb3768a8b13eef39130203a7c04340fc167bae057c7ebcafd7dec9fe6c36aeb1 - languageName: node - linkType: hard - -"@types/parse-package-name@npm:0.1.0": - version: 0.1.0 - resolution: "@types/parse-package-name@npm:0.1.0" - checksum: 10c0/909c072fd1b2bc1b5bbfca9c182220988803b004e996d72f26336214f34d01b9ceb09cf6feadd40e2cddde1cd329e5abbc21f4ca63794e2a0200b1f3f5842074 - languageName: node - linkType: hard - -"@types/prettier@npm:^2.1.5, @types/prettier@npm:^2.6.1": - version: 2.7.3 - resolution: "@types/prettier@npm:2.7.3" - checksum: 10c0/0960b5c1115bb25e979009d0b44c42cf3d792accf24085e4bfce15aef5794ea042e04e70c2139a2c3387f781f18c89b5706f000ddb089e9a4a2ccb7536a2c5f0 - languageName: node - linkType: hard - -"@types/prop-types@npm:*, @types/prop-types@npm:^15.0.0": - version: 15.7.12 - resolution: "@types/prop-types@npm:15.7.12" - checksum: 10c0/1babcc7db6a1177779f8fde0ccc78d64d459906e6ef69a4ed4dd6339c920c2e05b074ee5a92120fe4e9d9f1a01c952f843ebd550bee2332fc2ef81d1706878f8 - languageName: node - linkType: hard - -"@types/react-dom@npm:18.0.9": - version: 18.0.9 - resolution: "@types/react-dom@npm:18.0.9" - dependencies: - "@types/react": "npm:*" - checksum: 10c0/1c85b0889f15631132816fba93bf3aaa7b11cd0ce6f4a825d3c863a46b1b8d0b7fcdf03d7fcdf761f4a2e38312e5f26fc9b9ba34b486ee9f160477b9103625af - languageName: node - linkType: hard - -"@types/react-transition-group@npm:^4.4.0": - version: 4.4.11 - resolution: "@types/react-transition-group@npm:4.4.11" - dependencies: - "@types/react": "npm:*" - checksum: 10c0/8fbf0dcc1b81985cdcebe3c59d769fe2ea3f4525f12c3a10a7429a59f93e303c82b2abb744d21cb762879f4514969d70a7ab11b9bf486f92213e8fe70e04098d - languageName: node - linkType: hard - -"@types/react@npm:18.0.25": - version: 18.0.25 - resolution: "@types/react@npm:18.0.25" - dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10c0/5d30dbf46124a63ee832864bf38ce42de2e8924dc53470f14742343503a2cf1851b6b4f8b892ef661e1a670561f4c9052d782e419d314912e54626f3296e49b6 - languageName: node - linkType: hard - -"@types/scheduler@npm:*": - version: 0.23.0 - resolution: "@types/scheduler@npm:0.23.0" - checksum: 10c0/5cf7f2ba3732b74877559eb20b19f95fcd0a20c17dcb20e75a7ca7c7369cd455aeb2d406b3ff5a38168a9750da3bad78dd20d96d11118468b78f4959b8e56090 - languageName: node - linkType: hard - -"@types/svg-path-parser@npm:^1.1.3": - version: 1.1.6 - resolution: "@types/svg-path-parser@npm:1.1.6" - checksum: 10c0/128ea1028229d5bfc88f2a821df1dd5ac032501ca9d3f771ddeea8566750d4dd43576c3d6389b45b50d87bcaf58f6bcf327830233e46cf1b069d1b4c54a56160 - languageName: node - linkType: hard - -"@types/unist@npm:^2, @types/unist@npm:^2.0.0": - version: 2.0.11 - resolution: "@types/unist@npm:2.0.11" - checksum: 10c0/24dcdf25a168f453bb70298145eb043cfdbb82472db0bc0b56d6d51cd2e484b9ed8271d4ac93000a80da568f2402e9339723db262d0869e2bf13bc58e081768d - languageName: node - linkType: hard - -"@types/yargs-parser@npm:*": - version: 21.0.3 - resolution: "@types/yargs-parser@npm:21.0.3" - checksum: 10c0/e71c3bd9d0b73ca82e10bee2064c384ab70f61034bbfb78e74f5206283fc16a6d85267b606b5c22cb2a3338373586786fed595b2009825d6a9115afba36560a0 - languageName: node - linkType: hard - -"@types/yargs@npm:^17.0.8": - version: 17.0.33 - resolution: "@types/yargs@npm:17.0.33" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10c0/d16937d7ac30dff697801c3d6f235be2166df42e4a88bf730fa6dc09201de3727c0a9500c59a672122313341de5f24e45ee0ff579c08ce91928e519090b7906b - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^5.42.0": - version: 5.62.0 - resolution: "@typescript-eslint/parser@npm:5.62.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/315194b3bf39beb9bd16c190956c46beec64b8371e18d6bb72002108b250983eb1e186a01d34b77eb4045f4941acbb243b16155fbb46881105f65e37dc9e24d4 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/scope-manager@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - checksum: 10c0/861253235576c1c5c1772d23cdce1418c2da2618a479a7de4f6114a12a7ca853011a1e530525d0931c355a8fd237b9cd828fac560f85f9623e24054fd024726f - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/types@npm:5.62.0" - checksum: 10c0/7febd3a7f0701c0b927e094f02e82d8ee2cada2b186fcb938bc2b94ff6fbad88237afc304cbaf33e82797078bbbb1baf91475f6400912f8b64c89be79bfa4ddf - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/d7984a3e9d56897b2481940ec803cb8e7ead03df8d9cfd9797350be82ff765dfcf3cfec04e7355e1779e948da8f02bc5e11719d07a596eb1cb995c48a95e38cf - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - eslint-visitor-keys: "npm:^3.3.0" - checksum: 10c0/7c3b8e4148e9b94d9b7162a596a1260d7a3efc4e65199693b8025c71c4652b8042501c0bc9f57654c1e2943c26da98c0f77884a746c6ae81389fcb0b513d995d - languageName: node - linkType: hard - -"@vanilla-extract/css@npm:^1.15.3": - version: 1.15.5 - resolution: "@vanilla-extract/css@npm:1.15.5" - dependencies: - "@emotion/hash": "npm:^0.9.0" - "@vanilla-extract/private": "npm:^1.0.6" - css-what: "npm:^6.1.0" - cssesc: "npm:^3.0.0" - csstype: "npm:^3.0.7" - dedent: "npm:^1.5.3" - deep-object-diff: "npm:^1.1.9" - deepmerge: "npm:^4.2.2" - lru-cache: "npm:^10.4.3" - media-query-parser: "npm:^2.0.2" - modern-ahocorasick: "npm:^1.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/85b8c710b5fbc7ac73494e97be152327ff52a81397ca424622df126cd664638127ba67ada9cddb9a80a57be3f732da382d538a346675e9c497d6b71d60c57555 - languageName: node - linkType: hard - -"@vanilla-extract/dynamic@npm:^2.1.1": - version: 2.1.2 - resolution: "@vanilla-extract/dynamic@npm:2.1.2" - dependencies: - "@vanilla-extract/private": "npm:^1.0.6" - checksum: 10c0/7361863bbc1260fda447be80e888e3ad5dea09957651288d7aba81ba7f59594d11476a840c9162adc452f9a43dbc379b58621b5b500a49f537b0efc7737aac9c - languageName: node - linkType: hard - -"@vanilla-extract/private@npm:^1.0.6": - version: 1.0.6 - resolution: "@vanilla-extract/private@npm:1.0.6" - checksum: 10c0/f1c4d9f32f509f664b2d073ea114ff0a83f154bd3cdae429cade64ad1ca0fdc1ba745f2811496cc6a6f8e5513a9a0fa3798ffc41e6ff8868aa7f06c825f615ef - languageName: node - linkType: hard - -"@vanilla-extract/recipes@npm:^0.5.3": - version: 0.5.5 - resolution: "@vanilla-extract/recipes@npm:0.5.5" - peerDependencies: - "@vanilla-extract/css": ^1.0.0 - checksum: 10c0/5e032bc3f7873b1deb39fc64e2ab6871ac3d70dd527309b4e08310def142180fd346df48ca33306ac0ea7626673856e3995fab03f56f54a967c48a3e5e4545d3 - languageName: node - linkType: hard - -"@walletconnect/core@npm:2.15.1": - version: 2.15.1 - resolution: "@walletconnect/core@npm:2.15.1" - dependencies: - "@walletconnect/heartbeat": "npm:1.2.2" - "@walletconnect/jsonrpc-provider": "npm:1.0.14" - "@walletconnect/jsonrpc-types": "npm:1.0.4" - "@walletconnect/jsonrpc-utils": "npm:1.0.8" - "@walletconnect/jsonrpc-ws-connection": "npm:1.0.14" - "@walletconnect/keyvaluestorage": "npm:1.1.1" - "@walletconnect/logger": "npm:2.1.2" - "@walletconnect/relay-api": "npm:1.0.11" - "@walletconnect/relay-auth": "npm:1.0.4" - "@walletconnect/safe-json": "npm:1.0.2" - "@walletconnect/time": "npm:1.0.2" - "@walletconnect/types": "npm:2.15.1" - "@walletconnect/utils": "npm:2.15.1" - events: "npm:3.3.0" - lodash.isequal: "npm:4.5.0" - uint8arrays: "npm:3.1.0" - checksum: 10c0/3c831303bffcc360bb7d2f6e71b9928e73039e34e582e8da3f03dbc67e7876cf3ff89491ec9bad7ae31c3c3706ea6e44d2cd1be501349e882739a5184e917797 - languageName: node - linkType: hard - -"@walletconnect/environment@npm:^1.0.1": - version: 1.0.1 - resolution: "@walletconnect/environment@npm:1.0.1" - dependencies: - tslib: "npm:1.14.1" - checksum: 10c0/08eacce6452950a17f4209c443bd4db6bf7bddfc860593bdbd49edda9d08821696dee79e5617a954fbe90ff32c1d1f1691ef0c77455ed3e4201b328856a5e2f7 - languageName: node - linkType: hard - -"@walletconnect/events@npm:1.0.1, @walletconnect/events@npm:^1.0.1": - version: 1.0.1 - resolution: "@walletconnect/events@npm:1.0.1" - dependencies: - keyvaluestorage-interface: "npm:^1.0.0" - tslib: "npm:1.14.1" - checksum: 10c0/919a97e1dacf7096aefe07af810362cfc190533a576dcfa21387295d825a3c3d5f90bedee73235b1b343f5c696f242d7bffc5ea3359d3833541349ca23f50df8 - languageName: node - linkType: hard - -"@walletconnect/heartbeat@npm:1.2.1": - version: 1.2.1 - resolution: "@walletconnect/heartbeat@npm:1.2.1" - dependencies: - "@walletconnect/events": "npm:^1.0.1" - "@walletconnect/time": "npm:^1.0.2" - tslib: "npm:1.14.1" - checksum: 10c0/5ad46f26dcb7b9b3227f004cd74b18741d4cd32c21825a036eb03985c67a0cf859c285bc5635401966a99129e854d72de3458ff592370575ef7e52f5dd12ebbc - languageName: node - linkType: hard - -"@walletconnect/heartbeat@npm:1.2.2": - version: 1.2.2 - resolution: "@walletconnect/heartbeat@npm:1.2.2" - dependencies: - "@walletconnect/events": "npm:^1.0.1" - "@walletconnect/time": "npm:^1.0.2" - events: "npm:^3.3.0" - checksum: 10c0/a97b07764c397fe3cd26e8ea4233ecc8a26049624df7edc05290d286266bc5ba1de740d12c50dc1b7e8605198c5974e34e2d5318087bd4e9db246e7b273f4592 - languageName: node - linkType: hard - -"@walletconnect/jsonrpc-provider@npm:1.0.14": - version: 1.0.14 - resolution: "@walletconnect/jsonrpc-provider@npm:1.0.14" - dependencies: - "@walletconnect/jsonrpc-utils": "npm:^1.0.8" - "@walletconnect/safe-json": "npm:^1.0.2" - events: "npm:^3.3.0" - checksum: 10c0/9801bd516d81e92977b6add213da91e0e4a7a5915ad22685a4d2a733bab6199e9053485b76340cd724c7faa17a1b0eb842696247944fd57fb581488a2e1bed75 - languageName: node - linkType: hard - -"@walletconnect/jsonrpc-types@npm:1.0.3": - version: 1.0.3 - resolution: "@walletconnect/jsonrpc-types@npm:1.0.3" - dependencies: - keyvaluestorage-interface: "npm:^1.0.0" - tslib: "npm:1.14.1" - checksum: 10c0/a0fc8a88c62795bf4bf83d4e98a4e2cdd659ef70c73642582089fdf0994c54fd8050aa6cca85cfdcca6b77994e71334895e7a19649c325a8c822b059c2003884 - languageName: node - linkType: hard - -"@walletconnect/jsonrpc-types@npm:1.0.4, @walletconnect/jsonrpc-types@npm:^1.0.2, @walletconnect/jsonrpc-types@npm:^1.0.3": - version: 1.0.4 - resolution: "@walletconnect/jsonrpc-types@npm:1.0.4" - dependencies: - events: "npm:^3.3.0" - keyvaluestorage-interface: "npm:^1.0.0" - checksum: 10c0/752978685b0596a4ba02e1b689d23873e464460e4f376c97ef63e6b3ab273658ca062de2bfcaa8a498d31db0c98be98c8bbfbe5142b256a4b3ef425e1707f353 - languageName: node - linkType: hard - -"@walletconnect/jsonrpc-utils@npm:1.0.8, @walletconnect/jsonrpc-utils@npm:^1.0.6, @walletconnect/jsonrpc-utils@npm:^1.0.8": - version: 1.0.8 - resolution: "@walletconnect/jsonrpc-utils@npm:1.0.8" - dependencies: - "@walletconnect/environment": "npm:^1.0.1" - "@walletconnect/jsonrpc-types": "npm:^1.0.3" - tslib: "npm:1.14.1" - checksum: 10c0/e4a6bd801cf555bca775e03d961d1fe5ad0a22838e3496adda43ab4020a73d1b38de7096c06940e51f00fccccc734cd422fe4f1f7a8682302467b9c4d2a93d5d - languageName: node - linkType: hard - -"@walletconnect/jsonrpc-ws-connection@npm:1.0.14": - version: 1.0.14 - resolution: "@walletconnect/jsonrpc-ws-connection@npm:1.0.14" - dependencies: - "@walletconnect/jsonrpc-utils": "npm:^1.0.6" - "@walletconnect/safe-json": "npm:^1.0.2" - events: "npm:^3.3.0" - ws: "npm:^7.5.1" - checksum: 10c0/a710ecc51f8d3ed819ba6d6e53151ef274473aa8746ffdeaffaa3d4c020405bc694b0d179649fc2510a556eb4daf02f4a9e3dacef69ff95f673939bd67be649e - languageName: node - linkType: hard - -"@walletconnect/keyvaluestorage@npm:1.1.1, @walletconnect/keyvaluestorage@npm:^1.1.1": - version: 1.1.1 - resolution: "@walletconnect/keyvaluestorage@npm:1.1.1" - dependencies: - "@walletconnect/safe-json": "npm:^1.0.1" - idb-keyval: "npm:^6.2.1" - unstorage: "npm:^1.9.0" - peerDependencies: - "@react-native-async-storage/async-storage": 1.x - peerDependenciesMeta: - "@react-native-async-storage/async-storage": - optional: true - checksum: 10c0/de2ec39d09ce99370865f7d7235b93c42b3e4fd3406bdbc644329eff7faea2722618aa88ffc4ee7d20b1d6806a8331261b65568187494cbbcceeedbe79dc30e8 - languageName: node - linkType: hard - -"@walletconnect/logger@npm:2.1.2, @walletconnect/logger@npm:^2.0.1": - version: 2.1.2 - resolution: "@walletconnect/logger@npm:2.1.2" - dependencies: - "@walletconnect/safe-json": "npm:^1.0.2" - pino: "npm:7.11.0" - checksum: 10c0/c66e835d33f737f48d6269f151650f6d7bb85bd8b59580fb8116f94d460773820968026e666ddf4a1753f28fceb3c54aae8230a445108a116077cb13a293842f - languageName: node - linkType: hard - -"@walletconnect/relay-api@npm:1.0.11": - version: 1.0.11 - resolution: "@walletconnect/relay-api@npm:1.0.11" - dependencies: - "@walletconnect/jsonrpc-types": "npm:^1.0.2" - checksum: 10c0/2595d7e68d3a93e7735e0b6204811762898b0ce1466e811d78be5bcec7ac1cde5381637615a99104099165bf63695da5ef9381d6ded29924a57a71b10712a91d - languageName: node - linkType: hard - -"@walletconnect/relay-auth@npm:1.0.4": - version: 1.0.4 - resolution: "@walletconnect/relay-auth@npm:1.0.4" - dependencies: - "@stablelib/ed25519": "npm:^1.0.2" - "@stablelib/random": "npm:^1.0.1" - "@walletconnect/safe-json": "npm:^1.0.1" - "@walletconnect/time": "npm:^1.0.2" - tslib: "npm:1.14.1" - uint8arrays: "npm:^3.0.0" - checksum: 10c0/e90294ff718c5c1e49751a28916aaac45dd07d694f117052506309eb05b68cc2c72d9b302366e40d79ef952c22bd0bbea731d09633a6663b0ab8e18b4804a832 - languageName: node - linkType: hard - -"@walletconnect/safe-json@npm:1.0.2, @walletconnect/safe-json@npm:^1.0.1, @walletconnect/safe-json@npm:^1.0.2": - version: 1.0.2 - resolution: "@walletconnect/safe-json@npm:1.0.2" - dependencies: - tslib: "npm:1.14.1" - checksum: 10c0/8689072018c1ff7ab58eca67bd6f06b53702738d8183d67bfe6ed220aeac804e41901b8ee0fb14299e83c70093fafb90a90992202d128d53b2832bb01b591752 - languageName: node - linkType: hard - -"@walletconnect/sign-client@npm:^2.13.3, @walletconnect/sign-client@npm:^2.9.0": - version: 2.15.1 - resolution: "@walletconnect/sign-client@npm:2.15.1" - dependencies: - "@walletconnect/core": "npm:2.15.1" - "@walletconnect/events": "npm:1.0.1" - "@walletconnect/heartbeat": "npm:1.2.2" - "@walletconnect/jsonrpc-utils": "npm:1.0.8" - "@walletconnect/logger": "npm:2.1.2" - "@walletconnect/time": "npm:1.0.2" - "@walletconnect/types": "npm:2.15.1" - "@walletconnect/utils": "npm:2.15.1" - events: "npm:3.3.0" - checksum: 10c0/4ff66239c2994cb501cd1830b2cbc2ecf854799cfc4d100cc6af3523f8524daead7c08daa7dba944def79640515ccabe2250f700e0be1a07dfee5c3668aa2dee - languageName: node - linkType: hard - -"@walletconnect/time@npm:1.0.2, @walletconnect/time@npm:^1.0.2": - version: 1.0.2 - resolution: "@walletconnect/time@npm:1.0.2" - dependencies: - tslib: "npm:1.14.1" - checksum: 10c0/6317f93086e36daa3383cab4a8579c7d0bed665fb0f8e9016575200314e9ba5e61468f66142a7bb5b8489bb4c9250196576d90a60b6b00e0e856b5d0ab6ba474 - languageName: node - linkType: hard - -"@walletconnect/types@npm:2.11.0": - version: 2.11.0 - resolution: "@walletconnect/types@npm:2.11.0" - dependencies: - "@walletconnect/events": "npm:^1.0.1" - "@walletconnect/heartbeat": "npm:1.2.1" - "@walletconnect/jsonrpc-types": "npm:1.0.3" - "@walletconnect/keyvaluestorage": "npm:^1.1.1" - "@walletconnect/logger": "npm:^2.0.1" - events: "npm:^3.3.0" - checksum: 10c0/7fa2493d8a9c938821f5234b4d2a087f903359875925a7abea3a0640aa765886c01b4846bbe5e39923b48883f7fd92c3f4ff8e643c4c894c50e9f715b3a881d8 - languageName: node - linkType: hard - -"@walletconnect/types@npm:2.15.1, @walletconnect/types@npm:^2.13.3": - version: 2.15.1 - resolution: "@walletconnect/types@npm:2.15.1" - dependencies: - "@walletconnect/events": "npm:1.0.1" - "@walletconnect/heartbeat": "npm:1.2.2" - "@walletconnect/jsonrpc-types": "npm:1.0.4" - "@walletconnect/keyvaluestorage": "npm:1.1.1" - "@walletconnect/logger": "npm:2.1.2" - events: "npm:3.3.0" - checksum: 10c0/0666874a4acd9326f2554542936a88f6df50ca958440254ab605dca81d57cdaf839b05cac983ad194f4ed44734d07d564f4277156556cadac07302e8dd86aa4d - languageName: node - linkType: hard - -"@walletconnect/utils@npm:2.15.1, @walletconnect/utils@npm:^2.9.0": - version: 2.15.1 - resolution: "@walletconnect/utils@npm:2.15.1" - dependencies: - "@stablelib/chacha20poly1305": "npm:1.0.1" - "@stablelib/hkdf": "npm:1.0.1" - "@stablelib/random": "npm:1.0.2" - "@stablelib/sha256": "npm:1.0.1" - "@stablelib/x25519": "npm:1.0.3" - "@walletconnect/relay-api": "npm:1.0.11" - "@walletconnect/safe-json": "npm:1.0.2" - "@walletconnect/time": "npm:1.0.2" - "@walletconnect/types": "npm:2.15.1" - "@walletconnect/window-getters": "npm:1.0.1" - "@walletconnect/window-metadata": "npm:1.0.1" - detect-browser: "npm:5.3.0" - query-string: "npm:7.1.3" - uint8arrays: "npm:3.1.0" - checksum: 10c0/bde087f530f91502ba26c9553abd464234adb5738c7e10cfbdd275699d630a81601b5928abeeb77abe29e88238a4067a1bd1c5159f04b49178452066c82d99ae - languageName: node - linkType: hard - -"@walletconnect/window-getters@npm:1.0.1, @walletconnect/window-getters@npm:^1.0.1": - version: 1.0.1 - resolution: "@walletconnect/window-getters@npm:1.0.1" - dependencies: - tslib: "npm:1.14.1" - checksum: 10c0/c3aedba77aa9274b8277c4189ec992a0a6000377e95656443b3872ca5b5fe77dd91170b1695027fc524dc20362ce89605d277569a0d9a5bedc841cdaf14c95df - languageName: node - linkType: hard - -"@walletconnect/window-metadata@npm:1.0.1": - version: 1.0.1 - resolution: "@walletconnect/window-metadata@npm:1.0.1" - dependencies: - "@walletconnect/window-getters": "npm:^1.0.1" - tslib: "npm:1.14.1" - checksum: 10c0/f190e9bed77282d8ba868a4895f4d813e135f9bbecb8dd4aed988ab1b06992f78128ac19d7d073cf41d8a6a74d0c055cd725908ce0a894649fd25443ad934cf4 - languageName: node - linkType: hard - -"@yarnpkg/lockfile@npm:^1.1.0": - version: 1.1.0 - resolution: "@yarnpkg/lockfile@npm:1.1.0" - checksum: 10c0/0bfa50a3d756623d1f3409bc23f225a1d069424dbc77c6fd2f14fb377390cd57ec703dc70286e081c564be9051ead9ba85d81d66a3e68eeb6eb506d4e0c0fbda - languageName: node - linkType: hard - -"@zag-js/element-size@npm:0.3.1": - version: 0.3.1 - resolution: "@zag-js/element-size@npm:0.3.1" - checksum: 10c0/c5b5bc995398a97f46f06e4835b19ceb321af7d914fc1a4650ac803e0fdcddf0ef6d5de55c48b0a30c01e2490a6288404975699410ff24e33a46e0251a3f7558 - languageName: node - linkType: hard - -"@zag-js/focus-visible@npm:0.2.1": - version: 0.2.1 - resolution: "@zag-js/focus-visible@npm:0.2.1" - checksum: 10c0/ed728c8d450d6f521d7284fdcaaeec2aab93399595fc01963a273d03d7dfb7f2fe8456285cc23fde0205c3c64c5d149f0f390f8af5e62b37426b0c870330385c - languageName: node - linkType: hard - -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 - languageName: node - linkType: hard - -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1 - languageName: node - linkType: hard - -"acorn@npm:^8.11.3, acorn@npm:^8.9.0": - version: 8.12.1 - resolution: "acorn@npm:8.12.1" - bin: - acorn: bin/acorn - checksum: 10c0/51fb26cd678f914e13287e886da2d7021f8c2bc0ccc95e03d3e0447ee278dd3b40b9c57dc222acd5881adcf26f3edc40901a4953403232129e3876793cd17386 - languageName: node - linkType: hard - -"aes-js@npm:3.0.0": - version: 3.0.0 - resolution: "aes-js@npm:3.0.0" - checksum: 10c0/87dd5b2363534b867db7cef8bc85a90c355460783744877b2db7c8be09740aac5750714f9e00902822f692662bda74cdf40e03fbb5214ffec75c2666666288b8 - languageName: node - linkType: hard - -"aes-js@npm:4.0.0-beta.5": - version: 4.0.0-beta.5 - resolution: "aes-js@npm:4.0.0-beta.5" - checksum: 10c0/444f4eefa1e602cbc4f2a3c644bc990f93fd982b148425fee17634da510586fc09da940dcf8ace1b2d001453c07ff042e55f7a0482b3cc9372bf1ef75479090c - languageName: node - linkType: hard - -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": - version: 7.1.1 - resolution: "agent-base@npm:7.1.1" - dependencies: - debug: "npm:^4.3.4" - checksum: 10c0/e59ce7bed9c63bf071a30cc471f2933862044c97fd9958967bfe22521d7a0f601ce4ed5a8c011799d0c726ca70312142ae193bbebb60f576b52be19d4a363b50 - languageName: node - linkType: hard - -"aggregate-error@npm:^3.0.0": - version: 3.1.0 - resolution: "aggregate-error@npm:3.1.0" - dependencies: - clean-stack: "npm:^2.0.0" - indent-string: "npm:^4.0.0" - checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039 - languageName: node - linkType: hard - -"ajv@npm:^6.10.0, ajv@npm:^6.12.4": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - -"animejs@npm:^3.2.2": - version: 3.2.2 - resolution: "animejs@npm:3.2.2" - checksum: 10c0/f43dfcc0c743a2774e76fbfcb16a22350da7104f413d9d1b85c48128b0c078090642809deb631e21dfa0a40651111be39d9d7f694c9c1b70d8637ce8b6d63116 - languageName: node - linkType: hard - -"ansi-escapes@npm:^2.0.0": - version: 2.0.0 - resolution: "ansi-escapes@npm:2.0.0" - checksum: 10c0/e7ecfceb220167e7745ccd0f37a74be4ff5de2b03ab7832a9a2b0bb6bfe8b4c63f6fe18672f122c9f3c1a928ac44c9d1fa8c2d6665dbe56b67682607203d2be8 - languageName: node - linkType: hard - -"ansi-escapes@npm:^3.2.0": - version: 3.2.0 - resolution: "ansi-escapes@npm:3.2.0" - checksum: 10c0/084e1ce38139ad2406f18a8e7efe2b850ddd06ce3c00f633392d1ce67756dab44fe290e573d09ef3c9a0cb13c12881e0e35a8f77a017d39a0a4ab85ae2fae04f - languageName: node - linkType: hard - -"ansi-regex@npm:^2.0.0": - version: 2.1.1 - resolution: "ansi-regex@npm:2.1.1" - checksum: 10c0/78cebaf50bce2cb96341a7230adf28d804611da3ce6bf338efa7b72f06cc6ff648e29f80cd95e582617ba58d5fdbec38abfeed3500a98bce8381a9daec7c548b - languageName: node - linkType: hard - -"ansi-regex@npm:^3.0.0": - version: 3.0.1 - resolution: "ansi-regex@npm:3.0.1" - checksum: 10c0/d108a7498b8568caf4a46eea4f1784ab4e0dfb2e3f3938c697dee21443d622d765c958f2b7e2b9f6b9e55e2e2af0584eaa9915d51782b89a841c28e744e7a167 - languageName: node - linkType: hard - -"ansi-regex@npm:^4.1.0": - version: 4.1.1 - resolution: "ansi-regex@npm:4.1.1" - checksum: 10c0/d36d34234d077e8770169d980fed7b2f3724bfa2a01da150ccd75ef9707c80e883d27cdf7a0eac2f145ac1d10a785a8a855cffd05b85f778629a0db62e7033da - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.0.1 - resolution: "ansi-regex@npm:6.0.1" - checksum: 10c0/cbe16dbd2c6b2735d1df7976a7070dd277326434f0212f43abf6d87674095d247968209babdaad31bb00882fa68807256ba9be340eec2f1004de14ca75f52a08 - languageName: node - linkType: hard - -"ansi-styles@npm:^2.2.1": - version: 2.2.1 - resolution: "ansi-styles@npm:2.2.1" - checksum: 10c0/7c68aed4f1857389e7a12f85537ea5b40d832656babbf511cc7ecd9efc52889b9c3e5653a71a6aade783c3c5e0aa223ad4ff8e83c27ac8a666514e6c79068cab - languageName: node - linkType: hard - -"ansi-styles@npm:^3.2.1": - version: 3.2.1 - resolution: "ansi-styles@npm:3.2.1" - dependencies: - color-convert: "npm:^1.9.0" - checksum: 10c0/ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.1.0": - version: 6.2.1 - resolution: "ansi-styles@npm:6.2.1" - checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c - languageName: node - linkType: hard - -"any-promise@npm:^1.0.0": - version: 1.3.0 - resolution: "any-promise@npm:1.3.0" - checksum: 10c0/60f0298ed34c74fef50daab88e8dab786036ed5a7fad02e012ab57e376e0a0b4b29e83b95ea9b5e7d89df762f5f25119b83e00706ecaccb22cfbacee98d74889 - languageName: node - linkType: hard - -"anymatch@npm:^3.0.3, anymatch@npm:^3.1.3, anymatch@npm:~3.1.2": - version: 3.1.3 - resolution: "anymatch@npm:3.1.3" - dependencies: - normalize-path: "npm:^3.0.0" - picomatch: "npm:^2.0.4" - checksum: 10c0/57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac - languageName: node - linkType: hard - -"argparse@npm:^1.0.7": - version: 1.0.10 - resolution: "argparse@npm:1.0.10" - dependencies: - sprintf-js: "npm:~1.0.2" - checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de - languageName: node - linkType: hard - -"argparse@npm:^2.0.1": - version: 2.0.1 - resolution: "argparse@npm:2.0.1" - checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e - languageName: node - linkType: hard - -"aria-hidden@npm:^1.2.2": - version: 1.2.4 - resolution: "aria-hidden@npm:1.2.4" - dependencies: - tslib: "npm:^2.0.0" - checksum: 10c0/8abcab2e1432efc4db415e97cb3959649ddf52c8fc815d7384f43f3d3abf56f1c12852575d00df9a8927f421d7e0712652dd5f8db244ea57634344e29ecfc74a - languageName: node - linkType: hard - -"aria-query@npm:~5.1.3": - version: 5.1.3 - resolution: "aria-query@npm:5.1.3" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10c0/edcbc8044c4663d6f88f785e983e6784f98cb62b4ba1e9dd8d61b725d0203e4cfca38d676aee984c31f354103461102a3d583aa4fbe4fd0a89b679744f4e5faf - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "array-buffer-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.4" - checksum: 10c0/f5cdf54527cd18a3d2852ddf73df79efec03829e7373a8322ef5df2b4ef546fb365c19c71d6b42d641cb6bfe0f1a2f19bc0ece5b533295f86d7c3d522f228917 - languageName: node - linkType: hard - -"array-includes@npm:^3.1.6, array-includes@npm:^3.1.7, array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 - languageName: node - linkType: hard - -"array-union@npm:^2.1.0": - version: 2.1.0 - resolution: "array-union@npm:2.1.0" - checksum: 10c0/429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962 - languageName: node - linkType: hard - -"array.prototype.findlast@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlast@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/ddc952b829145ab45411b9d6adcb51a8c17c76bf89c9dd64b52d5dffa65d033da8c076ed2e17091779e83bc892b9848188d7b4b33453c5565e65a92863cb2775 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/a578ed836a786efbb6c2db0899ae80781b476200617f65a44846cb1ed8bd8b24c8821b83703375d8af639c689497b7b07277060024b9919db94ac3e10dc8a49b - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flatmap@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/67b3f1d602bb73713265145853128b1ad77cc0f9b833c7e1e056b323fbeac41a4ff1c9c99c7b9445903caea924d9ca2450578d9011913191aa88cc3c3a4b54f4 - languageName: node - linkType: hard - -"array.prototype.tosorted@npm:^1.1.4": - version: 1.1.4 - resolution: "array.prototype.tosorted@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/eb3c4c4fc0381b0bf6dba2ea4d48d367c2827a0d4236a5718d97caaccc6b78f11f4cadf090736e86301d295a6aa4967ed45568f92ced51be8cbbacd9ca410943 - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.3": - version: 1.0.3 - resolution: "arraybuffer.prototype.slice@npm:1.0.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.3" - is-array-buffer: "npm:^3.0.4" - is-shared-array-buffer: "npm:^1.0.2" - checksum: 10c0/d32754045bcb2294ade881d45140a5e52bda2321b9e98fa514797b7f0d252c4c5ab0d1edb34112652c62fa6a9398def568da63a4d7544672229afea283358c36 - languageName: node - linkType: hard - -"asn1.js@npm:^4.10.1": - version: 4.10.1 - resolution: "asn1.js@npm:4.10.1" - dependencies: - bn.js: "npm:^4.0.0" - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - checksum: 10c0/afa7f3ab9e31566c80175a75b182e5dba50589dcc738aa485be42bdd787e2a07246a4b034d481861123cbe646a7656f318f4f1cad2e9e5e808a210d5d6feaa88 - languageName: node - linkType: hard - -"assert@npm:^2.0.0": - version: 2.1.0 - resolution: "assert@npm:2.1.0" - dependencies: - call-bind: "npm:^1.0.2" - is-nan: "npm:^1.3.2" - object-is: "npm:^1.1.5" - object.assign: "npm:^4.1.4" - util: "npm:^0.12.5" - checksum: 10c0/7271a5da883c256a1fa690677bf1dd9d6aa882139f2bed1cd15da4f9e7459683e1da8e32a203d6cc6767e5e0f730c77a9532a87b896b4b0af0dd535f668775f0 - languageName: node - linkType: hard - -"ast-stringify@npm:0.1.0": - version: 0.1.0 - resolution: "ast-stringify@npm:0.1.0" - dependencies: - "@babel/runtime": "npm:^7.11.2" - checksum: 10c0/a463e979207ca7eeb21e2d4ed0591bcd51d5573c3d2a201f0d887a981c31be8079d7d25442163ac3b38f159c834a219c0286190432e5581894426379fca3ea4a - languageName: node - linkType: hard - -"ast-types-flow@npm:^0.0.8": - version: 0.0.8 - resolution: "ast-types-flow@npm:0.0.8" - checksum: 10c0/f2a0ba8055353b743c41431974521e5e852a9824870cd6fce2db0e538ac7bf4da406bbd018d109af29ff3f8f0993f6a730c9eddbd0abd031fbcb29ca75c1014e - languageName: node - linkType: hard - -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d - languageName: node - linkType: hard - -"atomic-sleep@npm:^1.0.0": - version: 1.0.0 - resolution: "atomic-sleep@npm:1.0.0" - checksum: 10c0/e329a6665512736a9bbb073e1761b4ec102f7926cce35037753146a9db9c8104f5044c1662e4a863576ce544fb8be27cd2be6bc8c1a40147d03f31eb1cfb6e8a - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 - languageName: node - linkType: hard - -"axe-core@npm:^4.9.1": - version: 4.10.0 - resolution: "axe-core@npm:4.10.0" - checksum: 10c0/732c171d48caaace5e784895c4dacb8ca6155e9d98045138ebe3952f78457dd05b92c57d05b41ce2a570aff87dbd0471e8398d2c0f6ebe79617b746c8f658998 - languageName: node - linkType: hard - -"axios@npm:0.27.2, axios@npm:^0.27.2": - version: 0.27.2 - resolution: "axios@npm:0.27.2" - dependencies: - follow-redirects: "npm:^1.14.9" - form-data: "npm:^4.0.0" - checksum: 10c0/76d673d2a90629944b44d6f345f01e58e9174690f635115d5ffd4aca495d99bcd8f95c590d5ccb473513f5ebc1d1a6e8934580d0c57cdd0498c3a101313ef771 - languageName: node - linkType: hard - -"axios@npm:1.6.0": - version: 1.6.0 - resolution: "axios@npm:1.6.0" - dependencies: - follow-redirects: "npm:^1.15.0" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10c0/2879e17b96cbca7e2096d231a44e2d0f03e657d79f8928ea38ec5fbaf5a5b7bf952d580cdb58a66ba328c26eb3528b89d5a32da57cc5cf89813786c044f7e9d6 - languageName: node - linkType: hard - -"axios@npm:^0.21.2": - version: 0.21.4 - resolution: "axios@npm:0.21.4" - dependencies: - follow-redirects: "npm:^1.14.0" - checksum: 10c0/fbcff55ec68f71f02d3773d467db2fcecdf04e749826c82c2427a232f9eba63242150a05f15af9ef15818352b814257541155de0281f8fb2b7e8a5b79f7f2142 - languageName: node - linkType: hard - -"axios@npm:^1.6.0": - version: 1.7.5 - resolution: "axios@npm:1.7.5" - dependencies: - follow-redirects: "npm:^1.15.6" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10c0/1d5daeb28b3d1bb2a7b9f0743433c4bfbeaddc15461e50ebde487eec6c009af2515749d5261096dd430c90cd891bd310bcba5ec3967bae2033c4a307f58a6ad3 - languageName: node - linkType: hard - -"axobject-query@npm:~3.1.1": - version: 3.1.1 - resolution: "axobject-query@npm:3.1.1" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10c0/fff3175a22fd1f41fceb7ae0cd25f6594a0d7fba28c2335dd904538b80eb4e1040432564a3c643025cd2bb748f68d35aaabffb780b794da97ecfc748810b25ad - languageName: node - linkType: hard - -"babel-plugin-istanbul@npm:^6.1.1": - version: 6.1.1 - resolution: "babel-plugin-istanbul@npm:6.1.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@istanbuljs/load-nyc-config": "npm:^1.0.0" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-instrument: "npm:^5.0.4" - test-exclude: "npm:^6.0.0" - checksum: 10c0/1075657feb705e00fd9463b329921856d3775d9867c5054b449317d39153f8fbcebd3e02ebf00432824e647faff3683a9ca0a941325ef1afe9b3c4dd51b24beb - languageName: node - linkType: hard - -"babel-plugin-macros@npm:^3.1.0": - version: 3.1.0 - resolution: "babel-plugin-macros@npm:3.1.0" - dependencies: - "@babel/runtime": "npm:^7.12.5" - cosmiconfig: "npm:^7.0.0" - resolve: "npm:^1.19.0" - checksum: 10c0/c6dfb15de96f67871d95bd2e8c58b0c81edc08b9b087dc16755e7157f357dc1090a8dc60ebab955e92587a9101f02eba07e730adc253a1e4cf593ca3ebd3839c - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.3.0, babel-plugin-polyfill-corejs2@npm:^0.3.2, babel-plugin-polyfill-corejs2@npm:^0.3.3": - version: 0.3.3 - resolution: "babel-plugin-polyfill-corejs2@npm:0.3.3" - dependencies: - "@babel/compat-data": "npm:^7.17.7" - "@babel/helper-define-polyfill-provider": "npm:^0.3.3" - semver: "npm:^6.1.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/21e34d4ba961de66d3fe31f3fecca5612d5db99638949766a445d37de72c1f736552fe436f3bd3792e5cc307f48e8f78a498a01e858c84946627ddb662415cc4 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.5.0, babel-plugin-polyfill-corejs3@npm:^0.5.3": - version: 0.5.3 - resolution: "babel-plugin-polyfill-corejs3@npm:0.5.3" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.3.2" - core-js-compat: "npm:^3.21.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/87f9eb8be5e8e115b930624c8e3e91b5396eca8d563120b0cd03853960addf587fd4cab8776ecf3a59ec94a774f214f2321a96c354a667a62fa2dc5eb122eaa0 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.6.0": - version: 0.6.0 - resolution: "babel-plugin-polyfill-corejs3@npm:0.6.0" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.3.3" - core-js-compat: "npm:^3.25.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/58f7d16c1fbc5e4a68cc58126039cb997edc9b9d29adf1bc4124eb6a12ec31eb9e1da8df769b7219714748af7916cfbb194b2f15bd55571b3b43cdcd7839fe8f - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.3.0": - version: 0.3.1 - resolution: "babel-plugin-polyfill-regenerator@npm:0.3.1" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/88f7b488bbb29636370954c048f08bdf61c5f1ffbee0b627817bf80e99a46b06660f54266cff93affb8ab5831d8edcaab271f9a80b8a090d4fd409a13023a61d - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.4.0, babel-plugin-polyfill-regenerator@npm:^0.4.1": - version: 0.4.1 - resolution: "babel-plugin-polyfill-regenerator@npm:0.4.1" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.3.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/bd915d51e30259201b289a58dfa46c8c1bc8827a38c275ff3134c8194d27e634d5c32ec62137d489d81c7dd5f6ea46b04057eb44b7180d06c19388e3a5f4f8c6 - languageName: node - linkType: hard - -"bail@npm:^2.0.0": - version: 2.0.2 - resolution: "bail@npm:2.0.2" - checksum: 10c0/25cbea309ef6a1f56214187004e8f34014eb015713ea01fa5b9b7e9e776ca88d0fdffd64143ac42dc91966c915a4b7b683411b56e14929fad16153fc026ffb8b - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - -"base-x@npm:^3.0.2": - version: 3.0.10 - resolution: "base-x@npm:3.0.10" - dependencies: - safe-buffer: "npm:^5.0.1" - checksum: 10c0/a13a34b71439ee5381667efa630b3bf640cf17f632c5ba01990483367592e72f247d7fb4f8c6d0e3ff8c0fb7224b3ac682ff5be09b87063a45b3968f0457e563 - languageName: node - linkType: hard - -"base64-js@npm:^1.3.0, base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"bech32@npm:1.1.4, bech32@npm:^1.1.4": - version: 1.1.4 - resolution: "bech32@npm:1.1.4" - checksum: 10c0/5f62ca47b8df99ace9c0e0d8deb36a919d91bf40066700aaa9920a45f86bb10eb56d537d559416fd8703aa0fb60dddb642e58f049701e7291df678b2033e5ee5 - languageName: node - linkType: hard - -"bech32@npm:^2.0.0": - version: 2.0.0 - resolution: "bech32@npm:2.0.0" - checksum: 10c0/45e7cc62758c9b26c05161b4483f40ea534437cf68ef785abadc5b62a2611319b878fef4f86ddc14854f183b645917a19addebc9573ab890e19194bc8f521942 - languageName: node - linkType: hard - -"bfs-path@npm:^1.0.2": - version: 1.0.2 - resolution: "bfs-path@npm:1.0.2" - checksum: 10c0/776cd5cf823d0767bab64d9c029bcf3336a5ee3a3e15f8ef9186772885fa2a3dd2bf4e3a5a5e7a96d02805a85d983a51d0aff76712a5b5c0b331db37578d0b79 - languageName: node - linkType: hard - -"big-integer@npm:^1.6.48": - version: 1.6.52 - resolution: "big-integer@npm:1.6.52" - checksum: 10c0/9604224b4c2ab3c43c075d92da15863077a9f59e5d4205f4e7e76acd0cd47e8d469ec5e5dba8d9b32aa233951893b29329ca56ac80c20ce094b4a647a66abae0 - languageName: node - linkType: hard - -"bignumber.js@npm:9.1.0": - version: 9.1.0 - resolution: "bignumber.js@npm:9.1.0" - checksum: 10c0/82b7314c9b1480e0471c21ac154342b910bd00807050e4ae248e291168eb23140456191c3f9b522da822c87a7730e8e18524db4db836d4455d821222c0acdfac - languageName: node - linkType: hard - -"bignumber.js@npm:9.1.2, bignumber.js@npm:^9.1.2": - version: 9.1.2 - resolution: "bignumber.js@npm:9.1.2" - checksum: 10c0/e17786545433f3110b868725c449fa9625366a6e675cd70eb39b60938d6adbd0158cb4b3ad4f306ce817165d37e63f4aa3098ba4110db1d9a3b9f66abfbaf10d - languageName: node - linkType: hard - -"binary-extensions@npm:^2.0.0": - version: 2.3.0 - resolution: "binary-extensions@npm:2.3.0" - checksum: 10c0/75a59cafc10fb12a11d510e77110c6c7ae3f4ca22463d52487709ca7f18f69d886aa387557cc9864fbdb10153d0bdb4caacabf11541f55e89ed6e18d12ece2b5 - languageName: node - linkType: hard - -"bindings@npm:^1.3.0": - version: 1.5.0 - resolution: "bindings@npm:1.5.0" - dependencies: - file-uri-to-path: "npm:1.0.0" - checksum: 10c0/3dab2491b4bb24124252a91e656803eac24292473e56554e35bbfe3cc1875332cfa77600c3bac7564049dc95075bf6fcc63a4609920ff2d64d0fe405fcf0d4ba - languageName: node - linkType: hard - -"bip32-path@npm:^0.4.2": - version: 0.4.2 - resolution: "bip32-path@npm:0.4.2" - checksum: 10c0/7d4123a5393fc5b70a20d0997c2b5a77feb789b49bdc3485ff7db02f916acf0f8c5eccf659f3d5dff5e0b34f22f5681babba86eb9ad7fa1287daf31d69982d75 - languageName: node - linkType: hard - -"bip32@npm:^2.0.6": - version: 2.0.6 - resolution: "bip32@npm:2.0.6" - dependencies: - "@types/node": "npm:10.12.18" - bs58check: "npm:^2.1.1" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - tiny-secp256k1: "npm:^1.1.3" - typeforce: "npm:^1.11.5" - wif: "npm:^2.0.6" - checksum: 10c0/65005eec40786767842665d68ba37e9be789570516256b7419dad9cc1160a7bb0a5db51cc441ff57d10461506ae150c2dfcfb22e83076a3d566fbbd7420006c6 - languageName: node - linkType: hard - -"bip39@npm:^3.0.3": - version: 3.1.0 - resolution: "bip39@npm:3.1.0" - dependencies: - "@noble/hashes": "npm:^1.2.0" - checksum: 10c0/68f9673a0d6a851e9635f3af8a85f2a1ecef9066c76d77e6f0d58d274b5bf22a67f429da3997e07c0d2cf153a4d7321f9273e656cac0526f667575ddee28ef71 - languageName: node - linkType: hard - -"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": - version: 4.12.0 - resolution: "bn.js@npm:4.12.0" - checksum: 10c0/9736aaa317421b6b3ed038ff3d4491935a01419ac2d83ddcfebc5717385295fcfcf0c57311d90fe49926d0abbd7a9dbefdd8861e6129939177f7e67ebc645b21 - languageName: node - linkType: hard - -"bn.js@npm:^5.0.0, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": - version: 5.2.1 - resolution: "bn.js@npm:5.2.1" - checksum: 10c0/bed3d8bd34ec89dbcf9f20f88bd7d4a49c160fda3b561c7bb227501f974d3e435a48fb9b61bc3de304acab9215a3bda0803f7017ffb4d0016a0c3a740a283caa - languageName: node - linkType: hard - -"bowser@npm:2.11.0": - version: 2.11.0 - resolution: "bowser@npm:2.11.0" - checksum: 10c0/04efeecc7927a9ec33c667fa0965dea19f4ac60b3fea60793c2e6cf06c1dcd2f7ae1dbc656f450c5f50783b1c75cf9dc173ba6f3b7db2feee01f8c4b793e1bd3 - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - -"braces@npm:^3.0.3, braces@npm:~3.0.2": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - -"brorand@npm:^1.0.1, brorand@npm:^1.1.0": - version: 1.1.0 - resolution: "brorand@npm:1.1.0" - checksum: 10c0/6f366d7c4990f82c366e3878492ba9a372a73163c09871e80d82fb4ae0d23f9f8924cb8a662330308206e6b3b76ba1d528b4601c9ef73c2166b440b2ea3b7571 - languageName: node - linkType: hard - -"browser-headers@npm:^0.4.1": - version: 0.4.1 - resolution: "browser-headers@npm:0.4.1" - checksum: 10c0/3b08864bb955b295ab3dd6ab775c7798096c2e85486571803b4070ec484de83ccceebe531a8b00d5daf4463fada5e7ca18cd1a71cc1ee0dfdbab705332318cef - languageName: node - linkType: hard - -"browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": - version: 1.2.0 - resolution: "browserify-aes@npm:1.2.0" - dependencies: - buffer-xor: "npm:^1.0.3" - cipher-base: "npm:^1.0.0" - create-hash: "npm:^1.1.0" - evp_bytestokey: "npm:^1.0.3" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10c0/967f2ae60d610b7b252a4cbb55a7a3331c78293c94b4dd9c264d384ca93354c089b3af9c0dd023534efdc74ffbc82510f7ad4399cf82bc37bc07052eea485f18 - languageName: node - linkType: hard - -"browserify-cipher@npm:^1.0.0": - version: 1.0.1 - resolution: "browserify-cipher@npm:1.0.1" - dependencies: - browserify-aes: "npm:^1.0.4" - browserify-des: "npm:^1.0.0" - evp_bytestokey: "npm:^1.0.0" - checksum: 10c0/aa256dcb42bc53a67168bbc94ab85d243b0a3b56109dee3b51230b7d010d9b78985ffc1fb36e145c6e4db151f888076c1cfc207baf1525d3e375cbe8187fe27d - languageName: node - linkType: hard - -"browserify-des@npm:^1.0.0": - version: 1.0.2 - resolution: "browserify-des@npm:1.0.2" - dependencies: - cipher-base: "npm:^1.0.1" - des.js: "npm:^1.0.0" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/943eb5d4045eff80a6cde5be4e5fbb1f2d5002126b5a4789c3c1aae3cdddb1eb92b00fb92277f512288e5c6af330730b1dbabcf7ce0923e749e151fcee5a074d - languageName: node - linkType: hard - -"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": - version: 4.1.0 - resolution: "browserify-rsa@npm:4.1.0" - dependencies: - bn.js: "npm:^5.0.0" - randombytes: "npm:^2.0.1" - checksum: 10c0/fb2b5a8279d8a567a28d8ee03fb62e448428a906bab5c3dc9e9c3253ace551b5ea271db15e566ac78f1b1d71b243559031446604168b9235c351a32cae99d02a - languageName: node - linkType: hard - -"browserify-sign@npm:^4.0.0": - version: 4.2.3 - resolution: "browserify-sign@npm:4.2.3" - dependencies: - bn.js: "npm:^5.2.1" - browserify-rsa: "npm:^4.1.0" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - elliptic: "npm:^6.5.5" - hash-base: "npm:~3.0" - inherits: "npm:^2.0.4" - parse-asn1: "npm:^5.1.7" - readable-stream: "npm:^2.3.8" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/30c0eba3f5970a20866a4d3fbba2c5bd1928cd24f47faf995f913f1499214c6f3be14bb4d6ec1ab5c6cafb1eca9cb76ba1c2e1c04ed018370634d4e659c77216 - languageName: node - linkType: hard - -"browserslist@npm:^4.23.1, browserslist@npm:^4.23.3": - version: 4.23.3 - resolution: "browserslist@npm:4.23.3" - dependencies: - caniuse-lite: "npm:^1.0.30001646" - electron-to-chromium: "npm:^1.5.4" - node-releases: "npm:^2.0.18" - update-browserslist-db: "npm:^1.1.0" - bin: - browserslist: cli.js - checksum: 10c0/3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642 - languageName: node - linkType: hard - -"bs58@npm:^4.0.0": - version: 4.0.1 - resolution: "bs58@npm:4.0.1" - dependencies: - base-x: "npm:^3.0.2" - checksum: 10c0/613a1b1441e754279a0e3f44d1faeb8c8e838feef81e550efe174ff021dd2e08a4c9ae5805b52dfdde79f97b5c0918c78dd24a0eb726c4a94365f0984a0ffc65 - languageName: node - linkType: hard - -"bs58check@npm:<3.0.0, bs58check@npm:^2.1.1, bs58check@npm:^2.1.2": - version: 2.1.2 - resolution: "bs58check@npm:2.1.2" - dependencies: - bs58: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/5d33f319f0d7abbe1db786f13f4256c62a076bc8d184965444cb62ca4206b2c92bee58c93bce57150ffbbbe00c48838ac02e6f384e0da8215cac219c0556baa9 - languageName: node - linkType: hard - -"bser@npm:2.1.1": - version: 2.1.1 - resolution: "bser@npm:2.1.1" - dependencies: - node-int64: "npm:^0.4.0" - checksum: 10c0/24d8dfb7b6d457d73f32744e678a60cc553e4ec0e9e1a01cf614b44d85c3c87e188d3cc78ef0442ce5032ee6818de20a0162ba1074725c0d08908f62ea979227 - languageName: node - linkType: hard - -"buffer-xor@npm:^1.0.3": - version: 1.0.3 - resolution: "buffer-xor@npm:1.0.3" - checksum: 10c0/fd269d0e0bf71ecac3146187cfc79edc9dbb054e2ee69b4d97dfb857c6d997c33de391696d04bdd669272751fa48e7872a22f3a6c7b07d6c0bc31dbe02a4075c - languageName: node - linkType: hard - -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.2.1" - checksum: 10c0/2a905fbbcde73cc5d8bd18d1caa23715d5f83a5935867c2329f0ac06104204ba7947be098fe1317fbd8830e26090ff8e764f08cd14fefc977bb248c3487bcbd0 - languageName: node - linkType: hard - -"bufferutil@npm:^4.0.3": - version: 4.0.8 - resolution: "bufferutil@npm:4.0.8" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10c0/36cdc5b53a38d9f61f89fdbe62029a2ebcd020599862253fefebe31566155726df9ff961f41b8c97b02b4c12b391ef97faf94e2383392654cf8f0ed68f76e47c - languageName: node - linkType: hard - -"busboy@npm:1.6.0": - version: 1.6.0 - resolution: "busboy@npm:1.6.0" - dependencies: - streamsearch: "npm:^1.1.0" - checksum: 10c0/fa7e836a2b82699b6e074393428b91ae579d4f9e21f5ac468e1b459a244341d722d2d22d10920cdd849743dbece6dca11d72de939fb75a7448825cf2babfba1f - languageName: node - linkType: hard - -"cacache@npm:^18.0.0": - version: 18.0.4 - resolution: "cacache@npm:18.0.4" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10c0/6c055bafed9de4f3dcc64ac3dc7dd24e863210902b7c470eb9ce55a806309b3efff78033e3d8b4f7dcc5d467f2db43c6a2857aaaf26f0094b8a351d44c42179f - languageName: node - linkType: hard - -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": - version: 1.0.7 - resolution: "call-bind@npm:1.0.7" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.1" - checksum: 10c0/a3ded2e423b8e2a265983dba81c27e125b48eefb2655e7dfab6be597088da3d47c47976c24bc51b8fd9af1061f8f87b4ab78a314f3c77784b2ae2ba535ad8b8d - languageName: node - linkType: hard - -"call-me-maybe@npm:^1.0.1": - version: 1.0.2 - resolution: "call-me-maybe@npm:1.0.2" - checksum: 10c0/8eff5dbb61141ebb236ed71b4e9549e488bcb5451c48c11e5667d5c75b0532303788a1101e6978cafa2d0c8c1a727805599c2741e3e0982855c9f1d78cd06c9f - languageName: node - linkType: hard - -"callsites@npm:^3.0.0": - version: 3.1.0 - resolution: "callsites@npm:3.1.0" - checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 - languageName: node - linkType: hard - -"camelcase@npm:^5.3.1": - version: 5.3.1 - resolution: "camelcase@npm:5.3.1" - checksum: 10c0/92ff9b443bfe8abb15f2b1513ca182d16126359ad4f955ebc83dc4ddcc4ef3fdd2c078bc223f2673dc223488e75c99b16cc4d056624374b799e6a1555cf61b23 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001646": - version: 1.0.30001653 - resolution: "caniuse-lite@npm:1.0.30001653" - checksum: 10c0/7aedf037541c93744148f599daea93d46d1f93ab4347997189efa2d1f003af8eadd7e1e05347ef09261ac1dc635ce375b8c6c00796245fffb4120a124824a14f - languageName: node - linkType: hard - -"case@npm:1.6.3": - version: 1.6.3 - resolution: "case@npm:1.6.3" - checksum: 10c0/43fcbb1dff1c4add94dd2bc98bd923d6616f10bff6959adf686d192c3db7d7ced35410761e1ac94cc4a1f5c41c86406ad79d390805539e421e8a77e553f67223 - languageName: node - linkType: hard - -"chain-registry@npm:1.20.0": - version: 1.20.0 - resolution: "chain-registry@npm:1.20.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - "@chain-registry/types": "npm:^0.17.0" - checksum: 10c0/f2d4b23bc2b8607fc4de05fa34949eaa183a563afb07f718c039c2be151fa6fbd86e9a3c998dc6ca1b7ab9440bfbc1e1218aff51f0e681f9915788269e95a9da - languageName: node - linkType: hard - -"chakra-react-select@npm:^4.7.0": - version: 4.9.1 - resolution: "chakra-react-select@npm:4.9.1" - dependencies: - react-select: "npm:5.8.0" - peerDependencies: - "@chakra-ui/form-control": ^2.0.0 - "@chakra-ui/icon": ^3.0.0 - "@chakra-ui/layout": ^2.0.0 - "@chakra-ui/media-query": ^3.0.0 - "@chakra-ui/menu": ^2.0.0 - "@chakra-ui/spinner": ^2.0.0 - "@chakra-ui/system": ^2.0.0 - "@emotion/react": ^11.8.1 - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 10c0/5f6116b6e0ba25c44c1bea0bf871af84150d685ae98e8e07fde8e8b9c8d3b8e508f1c2d0d3593f2b42a1a219867865927fdaad728ed048dcb6a54caf872c8167 - languageName: node - linkType: hard - -"chalk@npm:^1.0.0, chalk@npm:^1.1.3": - version: 1.1.3 - resolution: "chalk@npm:1.1.3" - dependencies: - ansi-styles: "npm:^2.2.1" - escape-string-regexp: "npm:^1.0.2" - has-ansi: "npm:^2.0.0" - strip-ansi: "npm:^3.0.0" - supports-color: "npm:^2.0.0" - checksum: 10c0/28c3e399ec286bb3a7111fd4225ebedb0d7b813aef38a37bca7c498d032459c265ef43404201d5fbb8d888d29090899c95335b4c0cda13e8b126ff15c541cef8 - languageName: node - linkType: hard - -"chalk@npm:^2.4.2": - version: 2.4.2 - resolution: "chalk@npm:2.4.2" - dependencies: - ansi-styles: "npm:^3.2.1" - escape-string-regexp: "npm:^1.0.5" - supports-color: "npm:^5.3.0" - checksum: 10c0/e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.1.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - -"character-entities@npm:^2.0.0": - version: 2.0.2 - resolution: "character-entities@npm:2.0.2" - checksum: 10c0/b0c645a45bcc90ff24f0e0140f4875a8436b8ef13b6bcd31ec02cfb2ca502b680362aa95386f7815bdc04b6464d48cf191210b3840d7c04241a149ede591a308 - languageName: node - linkType: hard - -"chardet@npm:^0.4.0": - version: 0.4.2 - resolution: "chardet@npm:0.4.2" - checksum: 10c0/287fff1609301b1a9e8dc9730271af7aa24187a8e224d23b8c3eb88cb7c0e8ceb962905377e36947bc07edb69afd188903f4924cc6bd0bd4e7703d498505b70d - languageName: node - linkType: hard - -"chardet@npm:^0.7.0": - version: 0.7.0 - resolution: "chardet@npm:0.7.0" - checksum: 10c0/96e4731b9ec8050cbb56ab684e8c48d6c33f7826b755802d14e3ebfdc51c57afeece3ea39bc6b09acc359e4363525388b915e16640c1378053820f5e70d0f27d - languageName: node - linkType: hard - -"chokidar@npm:^3.6.0": - version: 3.6.0 - resolution: "chokidar@npm:3.6.0" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 - languageName: node - linkType: hard - -"chownr@npm:^2.0.0": - version: 2.0.0 - resolution: "chownr@npm:2.0.0" - checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 - languageName: node - linkType: hard - -"ci-info@npm:^3.2.0": - version: 3.9.0 - resolution: "ci-info@npm:3.9.0" - checksum: 10c0/6f0109e36e111684291d46123d491bc4e7b7a1934c3a20dea28cba89f1d4a03acd892f5f6a81ed3855c38647e285a150e3c9ba062e38943bef57fee6c1554c3a - languageName: node - linkType: hard - -"cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": - version: 1.0.4 - resolution: "cipher-base@npm:1.0.4" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10c0/d8d005f8b64d8a77b3d3ce531301ae7b45902c9cab4ec8b66bdbd2bf2a1d9fceb9a2133c293eb3c060b2d964da0f14c47fb740366081338aa3795dd1faa8984b - languageName: node - linkType: hard - -"citty@npm:^0.1.5, citty@npm:^0.1.6": - version: 0.1.6 - resolution: "citty@npm:0.1.6" - dependencies: - consola: "npm:^3.2.3" - checksum: 10c0/d26ad82a9a4a8858c7e149d90b878a3eceecd4cfd3e2ed3cd5f9a06212e451fb4f8cbe0fa39a3acb1b3e8f18e22db8ee5def5829384bad50e823d4b301609b48 - languageName: node - linkType: hard - -"clean-stack@npm:^2.0.0": - version: 2.2.0 - resolution: "clean-stack@npm:2.2.0" - checksum: 10c0/1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1 - languageName: node - linkType: hard - -"cli-color@npm:^2.0.0, cli-color@npm:^2.0.2": - version: 2.0.4 - resolution: "cli-color@npm:2.0.4" - dependencies: - d: "npm:^1.0.1" - es5-ext: "npm:^0.10.64" - es6-iterator: "npm:^2.0.3" - memoizee: "npm:^0.4.15" - timers-ext: "npm:^0.1.7" - checksum: 10c0/49a0078fa3517cdfb3ad919a05ab2fe7352d9c9f0617937c38fc6245a38101632d9a23f40a53b2818773d2694b8ae814ff760801a702a26d76b297990ce8d399 - languageName: node - linkType: hard - -"cli-cursor@npm:^2.1.0": - version: 2.1.0 - resolution: "cli-cursor@npm:2.1.0" - dependencies: - restore-cursor: "npm:^2.0.0" - checksum: 10c0/09ee6d8b5b818d840bf80ec9561eaf696672197d3a02a7daee2def96d5f52ce6e0bbe7afca754ccf14f04830b5a1b4556273e983507d5029f95bba3016618eda - languageName: node - linkType: hard - -"cli-width@npm:^2.0.0": - version: 2.2.1 - resolution: "cli-width@npm:2.2.1" - checksum: 10c0/e3a6d422d657ca111c630f69ee0f1a499e8f114eea158ccb2cdbedd19711edffa217093bbd43dafb34b68d1b1a3b5334126e51d059b9ec1d19afa53b42b3ef86 - languageName: node - linkType: hard - -"client-only@npm:0.0.1, client-only@npm:^0.0.1": - version: 0.0.1 - resolution: "client-only@npm:0.0.1" - checksum: 10c0/9d6cfd0c19e1c96a434605added99dff48482152af791ec4172fb912a71cff9027ff174efd8cdb2160cc7f377543e0537ffc462d4f279bc4701de3f2a3c4b358 - languageName: node - linkType: hard - -"clipboardy@npm:^4.0.0": - version: 4.0.0 - resolution: "clipboardy@npm:4.0.0" - dependencies: - execa: "npm:^8.0.1" - is-wsl: "npm:^3.1.0" - is64bit: "npm:^2.0.0" - checksum: 10c0/02bb5f3d0a772bd84ec26a3566c72c2319a9f3b4cb8338370c3bffcf0073c80b834abe1a6945bea4f2cbea28e1627a975aaac577e3f61a868d924ce79138b041 - languageName: node - linkType: hard - -"clsx@npm:^2.0.0, clsx@npm:^2.1.1": - version: 2.1.1 - resolution: "clsx@npm:2.1.1" - checksum: 10c0/c4c8eb865f8c82baab07e71bfa8897c73454881c4f99d6bc81585aecd7c441746c1399d08363dc096c550cceaf97bd4ce1e8854e1771e9998d9f94c4fe075839 - languageName: node - linkType: hard - -"color-convert@npm:^1.9.0": - version: 1.9.3 - resolution: "color-convert@npm:1.9.3" - dependencies: - color-name: "npm:1.1.3" - checksum: 10c0/5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:1.1.3": - version: 1.1.3 - resolution: "color-name@npm:1.1.3" - checksum: 10c0/566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - -"color2k@npm:^2.0.0": - version: 2.0.3 - resolution: "color2k@npm:2.0.3" - checksum: 10c0/e7c13d212c9d1abb1690e378bbc0a6fb1751e4b02e9a73ba3b2ade9d54da673834597d342791d577d1ce400ec486c7f92c5098f9fa85cd113bcfde57420a2bb9 - languageName: node - linkType: hard - -"colors@npm:^1.1.2": - version: 1.4.0 - resolution: "colors@npm:1.4.0" - checksum: 10c0/9af357c019da3c5a098a301cf64e3799d27549d8f185d86f79af23069e4f4303110d115da98483519331f6fb71c8568d5688fa1c6523600044fd4a54e97c4efb - languageName: node - linkType: hard - -"combined-stream@npm:^1.0.8": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: "npm:~1.0.0" - checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 - languageName: node - linkType: hard - -"comma-separated-tokens@npm:^2.0.0": - version: 2.0.3 - resolution: "comma-separated-tokens@npm:2.0.3" - checksum: 10c0/91f90f1aae320f1755d6957ef0b864fe4f54737f3313bd95e0802686ee2ca38bff1dd381964d00ae5db42912dd1f4ae5c2709644e82706ffc6f6842a813cdd67 - languageName: node - linkType: hard - -"commander-plus@npm:^0.0.6": - version: 0.0.6 - resolution: "commander-plus@npm:0.0.6" - dependencies: - keypress: "npm:0.1.x" - checksum: 10c0/c20cb3e27c220f101e354c9c916dacd80de4363cb5a1b1b94dd6b81a675e2cabc92d182a3a041a6bea418300e2955077607da1a07dabf383813007963c01533b - languageName: node - linkType: hard - -"compute-scroll-into-view@npm:1.0.20": - version: 1.0.20 - resolution: "compute-scroll-into-view@npm:1.0.20" - checksum: 10c0/19034322590bfce59cb6939b3603e7aaf6f0d4128b8627bbc136e71c8714905e2f8bf2ba0cb7f153c6e8cdb8ad907ffd6d0188ccc7625dc05790a59ae6a81f01 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - -"confbox@npm:^0.1.7": - version: 0.1.7 - resolution: "confbox@npm:0.1.7" - checksum: 10c0/18b40c2f652196a833f3f1a5db2326a8a579cd14eacabfe637e4fc8cb9b68d7cf296139a38c5e7c688ce5041bf46f9adce05932d43fde44cf7e012840b5da111 - languageName: node - linkType: hard - -"consola@npm:^3.2.3": - version: 3.2.3 - resolution: "consola@npm:3.2.3" - checksum: 10c0/c606220524ec88a05bb1baf557e9e0e04a0c08a9c35d7a08652d99de195c4ddcb6572040a7df57a18ff38bbc13ce9880ad032d56630cef27bef72768ef0ac078 - languageName: node - linkType: hard - -"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.7.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: 10c0/281da55454bf8126cbc6625385928c43479f2060984180c42f3a86c8b8c12720a24eac260624a7d1e090004028d2dee78602330578ceec1a08e27cb8bb0a8a5b - languageName: node - linkType: hard - -"convert-source-map@npm:^2.0.0": - version: 2.0.0 - resolution: "convert-source-map@npm:2.0.0" - checksum: 10c0/8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b - languageName: node - linkType: hard - -"cookie-es@npm:^1.1.0": - version: 1.2.2 - resolution: "cookie-es@npm:1.2.2" - checksum: 10c0/210eb67cd40a53986fda99d6f47118cfc45a69c4abc03490d15ab1b83ac978d5518356aecdd7a7a4969292445e3063c2302deda4c73706a67edc008127608638 - languageName: node - linkType: hard - -"copy-to-clipboard@npm:3.3.3, copy-to-clipboard@npm:^3.3.3": - version: 3.3.3 - resolution: "copy-to-clipboard@npm:3.3.3" - dependencies: - toggle-selection: "npm:^1.0.6" - checksum: 10c0/3ebf5e8ee00601f8c440b83ec08d838e8eabb068c1fae94a9cda6b42f288f7e1b552f3463635f419af44bf7675afc8d0390d30876cf5c2d5d35f86d9c56a3e5f - languageName: node - linkType: hard - -"core-js-compat@npm:^3.21.0, core-js-compat@npm:^3.22.1, core-js-compat@npm:^3.25.1": - version: 3.38.1 - resolution: "core-js-compat@npm:3.38.1" - dependencies: - browserslist: "npm:^4.23.3" - checksum: 10c0/d8bc8a35591fc5fbf3e376d793f298ec41eb452619c7ef9de4ea59b74be06e9fda799e0dcbf9ba59880dae87e3b41fb191d744ffc988315642a1272bb9442b31 - languageName: node - linkType: hard - -"core-util-is@npm:~1.0.0": - version: 1.0.3 - resolution: "core-util-is@npm:1.0.3" - checksum: 10c0/90a0e40abbddfd7618f8ccd63a74d88deea94e77d0e8dbbea059fa7ebebb8fbb4e2909667fe26f3a467073de1a542ebe6ae4c73a73745ac5833786759cd906c9 - languageName: node - linkType: hard - -"cosmiconfig@npm:^7.0.0": - version: 7.1.0 - resolution: "cosmiconfig@npm:7.1.0" - dependencies: - "@types/parse-json": "npm:^4.0.0" - import-fresh: "npm:^3.2.1" - parse-json: "npm:^5.0.0" - path-type: "npm:^4.0.0" - yaml: "npm:^1.10.0" - checksum: 10c0/b923ff6af581638128e5f074a5450ba12c0300b71302398ea38dbeabd33bbcaa0245ca9adbedfcf284a07da50f99ede5658c80bb3e39e2ce770a99d28a21ef03 - languageName: node - linkType: hard - -"cosmjs-types@npm:>=0.9.0, cosmjs-types@npm:^0.9.0": - version: 0.9.0 - resolution: "cosmjs-types@npm:0.9.0" - checksum: 10c0/bc20f4293fb34629d7c5f96bafe533987f753df957ff68eb078d0128ae5a418320cb945024441769a07bb9bc5dde9d22b972fd40d485933e5706ea191c43727b - languageName: node - linkType: hard - -"cosmjs-types@npm:^0.4.0": - version: 0.4.1 - resolution: "cosmjs-types@npm:0.4.1" - dependencies: - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.2" - checksum: 10c0/eb4cb612505415850691e05cb537e11b438f907d5cee78ce1effd101441fa854b85a250d9623d64a6c87fd1a47623cdd92dcb62ceea066b42f53ddc3c054bf99 - languageName: node - linkType: hard - -"cosmjs-types@npm:^0.8.0": - version: 0.8.0 - resolution: "cosmjs-types@npm:0.8.0" - dependencies: - long: "npm:^4.0.0" - protobufjs: "npm:~6.11.2" - checksum: 10c0/910a84d04d17c3a32120bda52063a582325b900e9bb2f5ddffee621c1d053bc562bedc0d39d20e12736445b66d897bdae085247f51c6ffd1ca0154f99b938214 - languageName: node - linkType: hard - -"cosmos-kit@npm:2.18.0": - version: 2.18.0 - resolution: "cosmos-kit@npm:2.18.0" - dependencies: - "@cosmos-kit/cdcwallet": "npm:^2.13.0" - "@cosmos-kit/coin98": "npm:^2.11.0" - "@cosmos-kit/compass": "npm:^2.11.0" - "@cosmos-kit/cosmostation": "npm:^2.11.0" - "@cosmos-kit/exodus": "npm:^2.10.0" - "@cosmos-kit/fin": "npm:^2.11.0" - "@cosmos-kit/frontier": "npm:^2.10.0" - "@cosmos-kit/galaxy-station": "npm:^2.10.0" - "@cosmos-kit/keplr": "npm:^2.12.0" - "@cosmos-kit/leap": "npm:^2.12.0" - "@cosmos-kit/ledger": "npm:^2.11.0" - "@cosmos-kit/okxwallet-extension": "npm:^2.11.0" - "@cosmos-kit/omni": "npm:^2.10.0" - "@cosmos-kit/owallet": "npm:^2.11.0" - "@cosmos-kit/shell": "npm:^2.11.0" - "@cosmos-kit/station": "npm:^2.10.0" - "@cosmos-kit/tailwind": "npm:^1.5.0" - "@cosmos-kit/trust": "npm:^2.11.0" - "@cosmos-kit/vectis": "npm:^2.11.0" - "@cosmos-kit/xdefi": "npm:^2.10.0" - checksum: 10c0/7395b105fe94d117d59971f128c55f104a172b02c56882543437974cb280527779de5dd8c26428372c85e1db8d6de5dac269ed5d56f735456768d20e4683a824 - languageName: node - linkType: hard - -"create-ecdh@npm:^4.0.0": - version: 4.0.4 - resolution: "create-ecdh@npm:4.0.4" - dependencies: - bn.js: "npm:^4.1.0" - elliptic: "npm:^6.5.3" - checksum: 10c0/77b11a51360fec9c3bce7a76288fc0deba4b9c838d5fb354b3e40c59194d23d66efe6355fd4b81df7580da0661e1334a235a2a5c040b7569ba97db428d466e7f - languageName: node - linkType: hard - -"create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": - version: 1.2.0 - resolution: "create-hash@npm:1.2.0" - dependencies: - cipher-base: "npm:^1.0.1" - inherits: "npm:^2.0.1" - md5.js: "npm:^1.3.4" - ripemd160: "npm:^2.0.1" - sha.js: "npm:^2.4.0" - checksum: 10c0/d402e60e65e70e5083cb57af96d89567954d0669e90550d7cec58b56d49c4b193d35c43cec8338bc72358198b8cbf2f0cac14775b651e99238e1cf411490f915 - languageName: node - linkType: hard - -"create-hmac@npm:^1.1.0, create-hmac@npm:^1.1.4, create-hmac@npm:^1.1.7": - version: 1.1.7 - resolution: "create-hmac@npm:1.1.7" - dependencies: - cipher-base: "npm:^1.0.3" - create-hash: "npm:^1.1.0" - inherits: "npm:^2.0.1" - ripemd160: "npm:^2.0.0" - safe-buffer: "npm:^5.0.1" - sha.js: "npm:^2.4.8" - checksum: 10c0/24332bab51011652a9a0a6d160eed1e8caa091b802335324ae056b0dcb5acbc9fcf173cf10d128eba8548c3ce98dfa4eadaa01bd02f44a34414baee26b651835 - languageName: node - linkType: hard - -"cross-fetch@npm:^3.1.5": - version: 3.1.8 - resolution: "cross-fetch@npm:3.1.8" - dependencies: - node-fetch: "npm:^2.6.12" - checksum: 10c0/4c5e022ffe6abdf380faa6e2373c0c4ed7ef75e105c95c972b6f627c3f083170b6886f19fb488a7fa93971f4f69dcc890f122b0d97f0bf5f41ca1d9a8f58c8af - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 - languageName: node - linkType: hard - -"crossws@npm:^0.2.0, crossws@npm:^0.2.4": - version: 0.2.4 - resolution: "crossws@npm:0.2.4" - peerDependencies: - uWebSockets.js: "*" - peerDependenciesMeta: - uWebSockets.js: - optional: true - checksum: 10c0/b950c64d36f3f11fdb8e0faf3107598660d89d77eb860e68b535fe6acba9f0f2f0507cc7250bd219a3ef2fe08718db91b591e6912b7324fcfc8fd1b8d9f78c96 - languageName: node - linkType: hard - -"crypto-browserify@npm:^3.12.0": - version: 3.12.0 - resolution: "crypto-browserify@npm:3.12.0" - dependencies: - browserify-cipher: "npm:^1.0.0" - browserify-sign: "npm:^4.0.0" - create-ecdh: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - create-hmac: "npm:^1.1.0" - diffie-hellman: "npm:^5.0.0" - inherits: "npm:^2.0.1" - pbkdf2: "npm:^3.0.3" - public-encrypt: "npm:^4.0.0" - randombytes: "npm:^2.0.0" - randomfill: "npm:^1.0.3" - checksum: 10c0/0c20198886576050a6aa5ba6ae42f2b82778bfba1753d80c5e7a090836890dc372bdc780986b2568b4fb8ed2a91c958e61db1f0b6b1cc96af4bd03ffc298ba92 - languageName: node - linkType: hard - -"crypto-js@npm:^4.0.0": - version: 4.2.0 - resolution: "crypto-js@npm:4.2.0" - checksum: 10c0/8fbdf9d56f47aea0794ab87b0eb9833baf80b01a7c5c1b0edc7faf25f662fb69ab18dc2199e2afcac54670ff0cd9607a9045a3f7a80336cccd18d77a55b9fdf0 - languageName: node - linkType: hard - -"css-box-model@npm:1.2.1": - version: 1.2.1 - resolution: "css-box-model@npm:1.2.1" - dependencies: - tiny-invariant: "npm:^1.0.6" - checksum: 10c0/611e56d76b16e4e21956ed9fa53f1936fbbfaccd378659587e9c929f342037fc6c062f8af9447226e11fe7c95e31e6c007a37e592f9bff4c2d40e6915553104a - languageName: node - linkType: hard - -"css-what@npm:^6.1.0": - version: 6.1.0 - resolution: "css-what@npm:6.1.0" - checksum: 10c0/a09f5a6b14ba8dcf57ae9a59474722e80f20406c53a61e9aedb0eedc693b135113ffe2983f4efc4b5065ae639442e9ae88df24941ef159c218b231011d733746 - languageName: node - linkType: hard - -"cssesc@npm:^3.0.0": - version: 3.0.0 - resolution: "cssesc@npm:3.0.0" - bin: - cssesc: bin/cssesc - checksum: 10c0/6bcfd898662671be15ae7827120472c5667afb3d7429f1f917737f3bf84c4176003228131b643ae74543f17a394446247df090c597bb9a728cce298606ed0aa7 - languageName: node - linkType: hard - -"csstype@npm:^3.0.11, csstype@npm:^3.0.2, csstype@npm:^3.0.7": - version: 3.1.3 - resolution: "csstype@npm:3.1.3" - checksum: 10c0/80c089d6f7e0c5b2bd83cf0539ab41474198579584fa10d86d0cafe0642202343cbc119e076a0b1aece191989477081415d66c9fefbf3c957fc2fc4b7009f248 - languageName: node - linkType: hard - -"d@npm:1, d@npm:^1.0.1, d@npm:^1.0.2": - version: 1.0.2 - resolution: "d@npm:1.0.2" - dependencies: - es5-ext: "npm:^0.10.64" - type: "npm:^2.7.2" - checksum: 10c0/3e6ede10cd3b77586c47da48423b62bed161bf1a48bdbcc94d87263522e22f5dfb0e678a6dba5323fdc14c5d8612b7f7eb9e7d9e37b2e2d67a7bf9f116dabe5a - languageName: node - linkType: hard - -"damerau-levenshtein@npm:^1.0.8": - version: 1.0.8 - resolution: "damerau-levenshtein@npm:1.0.8" - checksum: 10c0/4c2647e0f42acaee7d068756c1d396e296c3556f9c8314bac1ac63ffb236217ef0e7e58602b18bb2173deec7ec8e0cac8e27cccf8f5526666b4ff11a13ad54a3 - languageName: node - linkType: hard - -"dargs@npm:7.0.0": - version: 7.0.0 - resolution: "dargs@npm:7.0.0" - checksum: 10c0/ec7f6a8315a8fa2f8b12d39207615bdf62b4d01f631b96fbe536c8ad5469ab9ed710d55811e564d0d5c1d548fc8cb6cc70bf0939f2415790159f5a75e0f96c92 - languageName: node - linkType: hard - -"data-view-buffer@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-buffer@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/8984119e59dbed906a11fcfb417d7d861936f16697a0e7216fe2c6c810f6b5e8f4a5281e73f2c28e8e9259027190ac4a33e2a65fdd7fa86ac06b76e838918583 - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/b7d9e48a0cf5aefed9ab7d123559917b2d7e0d65531f43b2fd95b9d3a6b46042dd3fca597c42bba384e66b70d7ad66ff23932f8367b241f53d93af42cfe04ec2 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "data-view-byte-offset@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/21b0d2e53fd6e20cc4257c873bf6d36d77bd6185624b84076c0a1ddaa757b49aaf076254006341d35568e89f52eecd1ccb1a502cfb620f2beca04f48a6a62a8f - languageName: node - linkType: hard - -"dayjs@npm:^1.11.11": - version: 1.11.13 - resolution: "dayjs@npm:1.11.13" - checksum: 10c0/a3caf6ac8363c7dade9d1ee797848ddcf25c1ace68d9fe8678ecf8ba0675825430de5d793672ec87b24a69bf04a1544b176547b2539982275d5542a7955f35b7 - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5": - version: 4.3.6 - resolution: "debug@npm:4.3.6" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/3293416bff072389c101697d4611c402a6bacd1900ac20c0492f61a9cdd6b3b29750fc7f5e299f8058469ef60ff8fb79b86395a30374fbd2490113c1c7112285 - languageName: node - linkType: hard - -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10c0/37d96ae42cbc71c14844d2ae3ba55adf462ec89fd3a999459dec3833944cd999af6007ff29c780f1c61153bcaaf2c842d1e4ce1ec621e4fc4923244942e4a02a - languageName: node - linkType: hard - -"decimal.js@npm:^10.2.1, decimal.js@npm:^10.4.3": - version: 10.4.3 - resolution: "decimal.js@npm:10.4.3" - checksum: 10c0/6d60206689ff0911f0ce968d40f163304a6c1bc739927758e6efc7921cfa630130388966f16bf6ef6b838cb33679fbe8e7a78a2f3c478afce841fd55ac8fb8ee - languageName: node - linkType: hard - -"decode-named-character-reference@npm:^1.0.0": - version: 1.0.2 - resolution: "decode-named-character-reference@npm:1.0.2" - dependencies: - character-entities: "npm:^2.0.0" - checksum: 10c0/66a9fc5d9b5385a2b3675c69ba0d8e893393d64057f7dbbb585265bb4fc05ec513d76943b8e5aac7d8016d20eea4499322cbf4cd6d54b466976b78f3a7587a4c - languageName: node - linkType: hard - -"decode-uri-component@npm:^0.2.2": - version: 0.2.2 - resolution: "decode-uri-component@npm:0.2.2" - checksum: 10c0/1f4fa54eb740414a816b3f6c24818fbfcabd74ac478391e9f4e2282c994127db02010ce804f3d08e38255493cfe68608b3f5c8e09fd6efc4ae46c807691f7a31 - languageName: node - linkType: hard - -"dedent@npm:^1.5.3": - version: 1.5.3 - resolution: "dedent@npm:1.5.3" - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - checksum: 10c0/d94bde6e6f780be4da4fd760288fcf755ec368872f4ac5218197200d86430aeb8d90a003a840bff1c20221188e3f23adced0119cb811c6873c70d0ac66d12832 - languageName: node - linkType: hard - -"deep-equal@npm:^2.0.5": - version: 2.2.3 - resolution: "deep-equal@npm:2.2.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.5" - es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.2" - is-arguments: "npm:^1.1.1" - is-array-buffer: "npm:^3.0.2" - is-date-object: "npm:^1.0.5" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - isarray: "npm:^2.0.5" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.1" - side-channel: "npm:^1.0.4" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.13" - checksum: 10c0/a48244f90fa989f63ff5ef0cc6de1e4916b48ea0220a9c89a378561960814794a5800c600254482a2c8fd2e49d6c2e196131dc983976adb024c94a42dfe4949f - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - -"deep-object-diff@npm:^1.1.9": - version: 1.1.9 - resolution: "deep-object-diff@npm:1.1.9" - checksum: 10c0/12cfd1b000d16c9192fc649923c972f8aac2ddca4f71a292f8f2c1e2d5cf3c9c16c85e73ab3e7d8a89a5ec6918d6460677d0b05bd160f7bd50bb4816d496dc24 - languageName: node - linkType: hard - -"deepmerge@npm:4.2.2": - version: 4.2.2 - resolution: "deepmerge@npm:4.2.2" - checksum: 10c0/d6136eee869057fea7a829aa2d10073ed49db5216e42a77cc737dd385334aab9b68dae22020a00c24c073d5f79cbbdd3f11b8d4fc87700d112ddaa0e1f968ef2 - languageName: node - linkType: hard - -"deepmerge@npm:4.3.1, deepmerge@npm:^4.2.2": - version: 4.3.1 - resolution: "deepmerge@npm:4.3.1" - checksum: 10c0/e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044 - languageName: node - linkType: hard - -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 - languageName: node - linkType: hard - -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 - languageName: node - linkType: hard - -"defu@npm:^6.1.4": - version: 6.1.4 - resolution: "defu@npm:6.1.4" - checksum: 10c0/2d6cc366262dc0cb8096e429368e44052fdf43ed48e53ad84cc7c9407f890301aa5fcb80d0995abaaf842b3949f154d060be4160f7a46cb2bc2f7726c81526f5 - languageName: node - linkType: hard - -"delay@npm:^4.4.0": - version: 4.4.1 - resolution: "delay@npm:4.4.1" - checksum: 10c0/9b3aa8c4cc88ee5e18a92c2e53f3912ed2930d4279c7d16d913813de6c2214eaf8bc5704b7357c72bf0f2f28f4507f9ab37599c3f84dc7d99ac178ae91dea3f9 - languageName: node - linkType: hard - -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 - languageName: node - linkType: hard - -"dequal@npm:^2.0.0": - version: 2.0.3 - resolution: "dequal@npm:2.0.3" - checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888 - languageName: node - linkType: hard - -"des.js@npm:^1.0.0": - version: 1.1.0 - resolution: "des.js@npm:1.1.0" - dependencies: - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - checksum: 10c0/671354943ad67493e49eb4c555480ab153edd7cee3a51c658082fcde539d2690ed2a4a0b5d1f401f9cde822edf3939a6afb2585f32c091f2d3a1b1665cd45236 - languageName: node - linkType: hard - -"destr@npm:^2.0.3": - version: 2.0.3 - resolution: "destr@npm:2.0.3" - checksum: 10c0/10e7eff5149e2839a4dd29a1e9617c3c675a3b53608d78d74fc6f4abc31daa977e6de08e0eea78965527a0d5a35467ae2f9624e0a4646d54aa1162caa094473e - languageName: node - linkType: hard - -"detect-browser@npm:5.3.0, detect-browser@npm:^5.2.0": - version: 5.3.0 - resolution: "detect-browser@npm:5.3.0" - checksum: 10c0/88d49b70ce3836e7971345b2ebdd486ad0d457d1e4f066540d0c12f9210c8f731ccbed955fcc9af2f048f5d4629702a8e46bedf5bcad42ad49a3a0927bfd5a76 - languageName: node - linkType: hard - -"detect-libc@npm:^1.0.3": - version: 1.0.3 - resolution: "detect-libc@npm:1.0.3" - bin: - detect-libc: ./bin/detect-libc.js - checksum: 10c0/4da0deae9f69e13bc37a0902d78bf7169480004b1fed3c19722d56cff578d16f0e11633b7fbf5fb6249181236c72e90024cbd68f0b9558ae06e281f47326d50d - languageName: node - linkType: hard - -"detect-node-es@npm:^1.1.0": - version: 1.1.0 - resolution: "detect-node-es@npm:1.1.0" - checksum: 10c0/e562f00de23f10c27d7119e1af0e7388407eb4b06596a25f6d79a360094a109ff285de317f02b090faae093d314cf6e73ac3214f8a5bb3a0def5bece94557fbe - languageName: node - linkType: hard - -"diff@npm:^5.0.0": - version: 5.2.0 - resolution: "diff@npm:5.2.0" - checksum: 10c0/aed0941f206fe261ecb258dc8d0ceea8abbde3ace5827518ff8d302f0fc9cc81ce116c4d8f379151171336caf0516b79e01abdc1ed1201b6440d895a66689eb4 - languageName: node - linkType: hard - -"diffie-hellman@npm:^5.0.0": - version: 5.0.3 - resolution: "diffie-hellman@npm:5.0.3" - dependencies: - bn.js: "npm:^4.1.0" - miller-rabin: "npm:^4.0.0" - randombytes: "npm:^2.0.0" - checksum: 10c0/ce53ccafa9ca544b7fc29b08a626e23a9b6562efc2a98559a0c97b4718937cebaa9b5d7d0a05032cc9c1435e9b3c1532b9e9bf2e0ede868525922807ad6e1ecf - languageName: node - linkType: hard - -"dir-glob@npm:^3.0.1": - version: 3.0.1 - resolution: "dir-glob@npm:3.0.1" - dependencies: - path-type: "npm:^4.0.0" - checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c - languageName: node - linkType: hard - -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac - languageName: node - linkType: hard - -"doctrine@npm:^3.0.0": - version: 3.0.0 - resolution: "doctrine@npm:3.0.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/c96bdccabe9d62ab6fea9399fdff04a66e6563c1d6fb3a3a063e8d53c3bb136ba63e84250bbf63d00086a769ad53aef92d2bd483f03f837fc97b71cbee6b2520 - languageName: node - linkType: hard - -"dom-helpers@npm:^5.0.1": - version: 5.2.1 - resolution: "dom-helpers@npm:5.2.1" - dependencies: - "@babel/runtime": "npm:^7.8.7" - csstype: "npm:^3.0.2" - checksum: 10c0/f735074d66dd759b36b158fa26e9d00c9388ee0e8c9b16af941c38f014a37fc80782de83afefd621681b19ac0501034b4f1c4a3bff5caa1b8667f0212b5e124c - languageName: node - linkType: hard - -"dotty@npm:0.1.2": - version: 0.1.2 - resolution: "dotty@npm:0.1.2" - checksum: 10c0/5fbcbd29c7451508a54764e5f7792d3252a8daeb9956969191698e31d7b7e73dd5d590b1609c1413ef845511d428262a50460554322cf41d23b018656527c131 - languageName: node - linkType: hard - -"duplexify@npm:^4.1.2": - version: 4.1.3 - resolution: "duplexify@npm:4.1.3" - dependencies: - end-of-stream: "npm:^1.4.1" - inherits: "npm:^2.0.3" - readable-stream: "npm:^3.1.1" - stream-shift: "npm:^1.0.2" - checksum: 10c0/8a7621ae95c89f3937f982fe36d72ea997836a708471a75bb2a0eecde3330311b1e128a6dad510e0fd64ace0c56bff3484ed2e82af0e465600c82117eadfbda5 - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.5.4": - version: 1.5.13 - resolution: "electron-to-chromium@npm:1.5.13" - checksum: 10c0/1d88ac39447e1d718c4296f92fe89836df4688daf2d362d6c49108136795f05a56dd9c950f1c6715e0395fa037c3b5f5ea686c543fdc90e6d74a005877c45022 - languageName: node - linkType: hard - -"elliptic@npm:6.5.4": - version: 6.5.4 - resolution: "elliptic@npm:6.5.4" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/5f361270292c3b27cf0843e84526d11dec31652f03c2763c6c2b8178548175ff5eba95341dd62baff92b2265d1af076526915d8af6cc9cb7559c44a62f8ca6e2 - languageName: node - linkType: hard - -"elliptic@npm:^6.4.0, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4, elliptic@npm:^6.5.5": - version: 6.5.7 - resolution: "elliptic@npm:6.5.7" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/799959b6c54ea3564e8961f35abdf8c77e37617f3051614b05ab1fb6a04ddb65bd1caa75ed1bae375b15dda312a0f79fed26ebe76ecf05c5a7af244152a601b8 - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - -"encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 - languageName: node - linkType: hard - -"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1, end-of-stream@npm:^1.4.4": - version: 1.4.4 - resolution: "end-of-stream@npm:1.4.4" - dependencies: - once: "npm:^1.4.0" - checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.15.0": - version: 5.17.1 - resolution: "enhanced-resolve@npm:5.17.1" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10c0/81a0515675eca17efdba2cf5bad87abc91a528fc1191aad50e275e74f045b41506167d420099022da7181c8d787170ea41e4a11a0b10b7a16f6237daecb15370 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 - languageName: node - linkType: hard - -"error-ex@npm:^1.3.1": - version: 1.3.2 - resolution: "error-ex@npm:1.3.2" - dependencies: - is-arrayish: "npm:^0.2.1" - checksum: 10c0/ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce - languageName: node - linkType: hard - -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": - version: 1.23.3 - resolution: "es-abstract@npm:1.23.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - arraybuffer.prototype.slice: "npm:^1.0.3" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - data-view-buffer: "npm:^1.0.1" - data-view-byte-length: "npm:^1.0.1" - data-view-byte-offset: "npm:^1.0.0" - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-set-tostringtag: "npm:^2.0.3" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.6" - get-intrinsic: "npm:^1.2.4" - get-symbol-description: "npm:^1.0.2" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.2" - internal-slot: "npm:^1.0.7" - is-array-buffer: "npm:^3.0.4" - is-callable: "npm:^1.2.7" - is-data-view: "npm:^1.0.1" - is-negative-zero: "npm:^2.0.3" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.3" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.13" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.13.1" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.5" - regexp.prototype.flags: "npm:^1.5.2" - safe-array-concat: "npm:^1.1.2" - safe-regex-test: "npm:^1.0.3" - string.prototype.trim: "npm:^1.2.9" - string.prototype.trimend: "npm:^1.0.8" - string.prototype.trimstart: "npm:^1.0.8" - typed-array-buffer: "npm:^1.0.2" - typed-array-byte-length: "npm:^1.0.1" - typed-array-byte-offset: "npm:^1.0.2" - typed-array-length: "npm:^1.0.6" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.15" - checksum: 10c0/d27e9afafb225c6924bee9971a7f25f20c314f2d6cb93a63cada4ac11dcf42040896a6c22e5fb8f2a10767055ed4ddf400be3b1eb12297d281726de470b75666 - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0": - version: 1.0.0 - resolution: "es-define-property@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.2.4" - checksum: 10c0/6bf3191feb7ea2ebda48b577f69bdfac7a2b3c9bcf97307f55fd6ef1bbca0b49f0c219a935aca506c993d8c5d8bddd937766cb760cd5e5a1071351f2df9f9aa4 - languageName: node - linkType: hard - -"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-get-iterator@npm:^1.1.3": - version: 1.1.3 - resolution: "es-get-iterator@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - has-symbols: "npm:^1.0.3" - is-arguments: "npm:^1.1.1" - is-map: "npm:^2.0.2" - is-set: "npm:^2.0.2" - is-string: "npm:^1.0.7" - isarray: "npm:^2.0.5" - stop-iteration-iterator: "npm:^1.0.0" - checksum: 10c0/ebd11effa79851ea75d7f079405f9d0dc185559fd65d986c6afea59a0ff2d46c2ed8675f19f03dce7429d7f6c14ff9aede8d121fbab78d75cfda6a263030bac0 - languageName: node - linkType: hard - -"es-iterator-helpers@npm:^1.0.19": - version: 1.0.19 - resolution: "es-iterator-helpers@npm:1.0.19" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - iterator.prototype: "npm:^1.1.2" - safe-array-concat: "npm:^1.1.2" - checksum: 10c0/ae8f0241e383b3d197383b9842c48def7fce0255fb6ed049311b686ce295595d9e389b466f6a1b7d4e7bb92d82f5e716d6fae55e20c1040249bf976743b038c5 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/1fed3d102eb27ab8d983337bb7c8b159dd2a1e63ff833ec54eea1311c96d5b08223b433060ba240541ca8adba9eee6b0a60cdbf2f80634b784febc9cc8b687b4 - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.0.3": - version: 2.0.3 - resolution: "es-set-tostringtag@npm:2.0.3" - dependencies: - get-intrinsic: "npm:^1.2.4" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.1" - checksum: 10c0/f22aff1585eb33569c326323f0b0d175844a1f11618b86e193b386f8be0ea9474cfbe46df39c45d959f7aa8f6c06985dc51dd6bce5401645ec5a74c4ceaa836a - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 - languageName: node - linkType: hard - -"es-to-primitive@npm:^1.2.1": - version: 1.2.1 - resolution: "es-to-primitive@npm:1.2.1" - dependencies: - is-callable: "npm:^1.1.4" - is-date-object: "npm:^1.0.1" - is-symbol: "npm:^1.0.2" - checksum: 10c0/0886572b8dc075cb10e50c0af62a03d03a68e1e69c388bd4f10c0649ee41b1fbb24840a1b7e590b393011b5cdbe0144b776da316762653685432df37d6de60f1 - languageName: node - linkType: hard - -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.62, es5-ext@npm:^0.10.64, es5-ext@npm:~0.10.14, es5-ext@npm:~0.10.2": - version: 0.10.64 - resolution: "es5-ext@npm:0.10.64" - dependencies: - es6-iterator: "npm:^2.0.3" - es6-symbol: "npm:^3.1.3" - esniff: "npm:^2.0.1" - next-tick: "npm:^1.1.0" - checksum: 10c0/4459b6ae216f3c615db086e02437bdfde851515a101577fd61b19f9b3c1ad924bab4d197981eb7f0ccb915f643f2fc10ff76b97a680e96cbb572d15a27acd9a3 - languageName: node - linkType: hard - -"es6-iterator@npm:^2.0.3": - version: 2.0.3 - resolution: "es6-iterator@npm:2.0.3" - dependencies: - d: "npm:1" - es5-ext: "npm:^0.10.35" - es6-symbol: "npm:^3.1.1" - checksum: 10c0/91f20b799dba28fb05bf623c31857fc1524a0f1c444903beccaf8929ad196c8c9ded233e5ac7214fc63a92b3f25b64b7f2737fcca8b1f92d2d96cf3ac902f5d8 - languageName: node - linkType: hard - -"es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": - version: 3.1.4 - resolution: "es6-symbol@npm:3.1.4" - dependencies: - d: "npm:^1.0.2" - ext: "npm:^1.7.0" - checksum: 10c0/777bf3388db5d7919e09a0fd175aa5b8a62385b17cb2227b7a137680cba62b4d9f6193319a102642aa23d5840d38a62e4784f19cfa5be4a2210a3f0e9b23d15d - languageName: node - linkType: hard - -"es6-weak-map@npm:^2.0.3": - version: 2.0.3 - resolution: "es6-weak-map@npm:2.0.3" - dependencies: - d: "npm:1" - es5-ext: "npm:^0.10.46" - es6-iterator: "npm:^2.0.3" - es6-symbol: "npm:^3.1.1" - checksum: 10c0/460932be9542473dbbddd183e21c15a66cfec1b2c17dae2b514e190d6fb2896b7eb683783d4b36da036609d2e1c93d2815f21b374dfccaf02a8978694c2f7b67 - languageName: node - linkType: hard - -"escalade@npm:^3.1.2": - version: 3.1.2 - resolution: "escalade@npm:3.1.2" - checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5": - version: 1.0.5 - resolution: "escape-string-regexp@npm:1.0.5" - checksum: 10c0/a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - -"eslint-config-next@npm:13.0.5": - version: 13.0.5 - resolution: "eslint-config-next@npm:13.0.5" - dependencies: - "@next/eslint-plugin-next": "npm:13.0.5" - "@rushstack/eslint-patch": "npm:^1.1.3" - "@typescript-eslint/parser": "npm:^5.42.0" - eslint-import-resolver-node: "npm:^0.3.6" - eslint-import-resolver-typescript: "npm:^3.5.2" - eslint-plugin-import: "npm:^2.26.0" - eslint-plugin-jsx-a11y: "npm:^6.5.1" - eslint-plugin-react: "npm:^7.31.7" - eslint-plugin-react-hooks: "npm:^4.5.0" - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 - typescript: ">=3.3.1" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/3f04508d00bb7a68fb52baae3e96734170bf040422cb9f2516fce145f0ce72b63c4683b29a6958373fde0f47d3f1b3c8d36a9dab89be535e7642dc99c726e38f - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.6, eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10c0/0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61 - languageName: node - linkType: hard - -"eslint-import-resolver-typescript@npm:^3.5.2": - version: 3.6.3 - resolution: "eslint-import-resolver-typescript@npm:3.6.3" - dependencies: - "@nolyfill/is-core-module": "npm:1.0.39" - debug: "npm:^4.3.5" - enhanced-resolve: "npm:^5.15.0" - eslint-module-utils: "npm:^2.8.1" - fast-glob: "npm:^3.3.2" - get-tsconfig: "npm:^4.7.5" - is-bun-module: "npm:^1.0.2" - is-glob: "npm:^4.0.3" - peerDependencies: - eslint: "*" - eslint-plugin-import: "*" - eslint-plugin-import-x: "*" - peerDependenciesMeta: - eslint-plugin-import: - optional: true - eslint-plugin-import-x: - optional: true - checksum: 10c0/5933b00791b7b077725b9ba9a85327d2e2dc7c8944c18a868feb317a0bf0e1e77aed2254c9c5e24dcc49360d119331d2c15281837f4269592965ace380a75111 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.8.0, eslint-module-utils@npm:^2.8.1": - version: 2.8.2 - resolution: "eslint-module-utils@npm:2.8.2" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/98c5ca95db75507b148c05d157b287116c677bfc9ca6bef4d5455c8b199eb2c35b9204a15ca7a3497085daef8ca3a3f579bd9e753ad4ad4df6256e4ef1107c51 - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.26.0": - version: 2.29.1 - resolution: "eslint-plugin-import@npm:2.29.1" - dependencies: - array-includes: "npm:^3.1.7" - array.prototype.findlastindex: "npm:^1.2.3" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.8.0" - hasown: "npm:^2.0.0" - is-core-module: "npm:^2.13.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.7" - object.groupby: "npm:^1.0.1" - object.values: "npm:^1.1.7" - semver: "npm:^6.3.1" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10c0/5f35dfbf4e8e67f741f396987de9504ad125c49f4144508a93282b4ea0127e052bde65ab6def1f31b6ace6d5d430be698333f75bdd7dca3bc14226c92a083196 - languageName: node - linkType: hard - -"eslint-plugin-jsx-a11y@npm:^6.5.1": - version: 6.9.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.9.0" - dependencies: - aria-query: "npm:~5.1.3" - array-includes: "npm:^3.1.8" - array.prototype.flatmap: "npm:^1.3.2" - ast-types-flow: "npm:^0.0.8" - axe-core: "npm:^4.9.1" - axobject-query: "npm:~3.1.1" - damerau-levenshtein: "npm:^1.0.8" - emoji-regex: "npm:^9.2.2" - es-iterator-helpers: "npm:^1.0.19" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^3.3.5" - language-tags: "npm:^1.0.9" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - safe-regex-test: "npm:^1.0.3" - string.prototype.includes: "npm:^2.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10c0/72ac719ca90b6149c8f3c708ac5b1177f6757668b6e174d72a78512d4ac10329331b9c666c21e9561237a96a45d7f147f6a5d270dadbb99eb4ee093f127792c3 - languageName: node - linkType: hard - -"eslint-plugin-react-hooks@npm:^4.5.0": - version: 4.6.2 - resolution: "eslint-plugin-react-hooks@npm:4.6.2" - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 10c0/4844e58c929bc05157fb70ba1e462e34f1f4abcbc8dd5bbe5b04513d33e2699effb8bca668297976ceea8e7ebee4e8fc29b9af9d131bcef52886feaa2308b2cc - languageName: node - linkType: hard - -"eslint-plugin-react@npm:^7.31.7": - version: 7.35.0 - resolution: "eslint-plugin-react@npm:7.35.0" - dependencies: - array-includes: "npm:^3.1.8" - array.prototype.findlast: "npm:^1.2.5" - array.prototype.flatmap: "npm:^1.3.2" - array.prototype.tosorted: "npm:^1.1.4" - doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.19" - estraverse: "npm:^5.3.0" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.8" - object.fromentries: "npm:^2.0.8" - object.values: "npm:^1.2.0" - prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.5" - semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.11" - string.prototype.repeat: "npm:^1.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - checksum: 10c0/eedcc33de4b2cda91d56ae517a4f771a0c76da9c1e26c95543969012871381e11d4d6cffdf6fa8423036585c289eb3500f3f93fb1d314fb2624e0aa1e463305e - languageName: node - linkType: hard - -"eslint-scope@npm:^7.1.1": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/613c267aea34b5a6d6c00514e8545ef1f1433108097e857225fed40d397dd6b1809dffd11c2fde23b37ca53d7bf935fe04d2a18e6fc932b31837b6ad67e1c116 - languageName: node - linkType: hard - -"eslint-utils@npm:^3.0.0": - version: 3.0.0 - resolution: "eslint-utils@npm:3.0.0" - dependencies: - eslint-visitor-keys: "npm:^2.0.0" - peerDependencies: - eslint: ">=5" - checksum: 10c0/45aa2b63667a8d9b474c98c28af908d0a592bed1a4568f3145cd49fb5d9510f545327ec95561625290313fe126e6d7bdfe3fdbdb6f432689fab6b9497d3bfb52 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-visitor-keys@npm:2.1.0" - checksum: 10c0/9f0e3a2db751d84067d15977ac4b4472efd6b303e369e6ff241a99feac04da758f46d5add022c33d06b53596038dbae4b4aceb27c7e68b8dfc1055b35e495787 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint@npm:8.28.0": - version: 8.28.0 - resolution: "eslint@npm:8.28.0" - dependencies: - "@eslint/eslintrc": "npm:^1.3.3" - "@humanwhocodes/config-array": "npm:^0.11.6" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - ajv: "npm:^6.10.0" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.1.1" - eslint-utils: "npm:^3.0.0" - eslint-visitor-keys: "npm:^3.3.0" - espree: "npm:^9.4.0" - esquery: "npm:^1.4.0" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.15.0" - grapheme-splitter: "npm:^1.0.4" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.0.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-sdsl: "npm:^4.1.4" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.1" - regexpp: "npm:^3.2.0" - strip-ansi: "npm:^6.0.1" - strip-json-comments: "npm:^3.1.0" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10c0/5378ee96346cf0c59e9a1de002f7bd19c2c0642ad8010f18254936563fa3cfd1d34fd420de5a31866aab1fa586875d39e4cef6b9367c2a361f2106723f900db2 - languageName: node - linkType: hard - -"esniff@npm:^2.0.1": - version: 2.0.1 - resolution: "esniff@npm:2.0.1" - dependencies: - d: "npm:^1.0.1" - es5-ext: "npm:^0.10.62" - event-emitter: "npm:^0.3.5" - type: "npm:^2.7.2" - checksum: 10c0/7efd8d44ac20e5db8cb0ca77eb65eca60628b2d0f3a1030bcb05e71cc40e6e2935c47b87dba3c733db12925aa5b897f8e0e7a567a2c274206f184da676ea2e65 - languageName: node - linkType: hard - -"espree@npm:^9.4.0": - version: 9.6.1 - resolution: "espree@npm:9.6.1" - dependencies: - acorn: "npm:^8.9.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10c0/1a2e9b4699b715347f62330bcc76aee224390c28bb02b31a3752e9d07549c473f5f986720483c6469cf3cfb3c9d05df612ffc69eb1ee94b54b739e67de9bb460 - languageName: node - linkType: hard - -"esprima@npm:^4.0.0": - version: 4.0.1 - resolution: "esprima@npm:4.0.1" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 - languageName: node - linkType: hard - -"esquery@npm:^1.4.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"eth-rpc-errors@npm:^4.0.2": - version: 4.0.3 - resolution: "eth-rpc-errors@npm:4.0.3" - dependencies: - fast-safe-stringify: "npm:^2.0.6" - checksum: 10c0/332cbc5a957b62bb66ea01da2a467da65026df47e6516a286a969cad74d6002f2b481335510c93f12ca29c46ebc8354e39e2240769d86184f9b4c30832cf5466 - languageName: node - linkType: hard - -"ethers@npm:^5.7.2": - version: 5.7.2 - resolution: "ethers@npm:5.7.2" - dependencies: - "@ethersproject/abi": "npm:5.7.0" - "@ethersproject/abstract-provider": "npm:5.7.0" - "@ethersproject/abstract-signer": "npm:5.7.0" - "@ethersproject/address": "npm:5.7.0" - "@ethersproject/base64": "npm:5.7.0" - "@ethersproject/basex": "npm:5.7.0" - "@ethersproject/bignumber": "npm:5.7.0" - "@ethersproject/bytes": "npm:5.7.0" - "@ethersproject/constants": "npm:5.7.0" - "@ethersproject/contracts": "npm:5.7.0" - "@ethersproject/hash": "npm:5.7.0" - "@ethersproject/hdnode": "npm:5.7.0" - "@ethersproject/json-wallets": "npm:5.7.0" - "@ethersproject/keccak256": "npm:5.7.0" - "@ethersproject/logger": "npm:5.7.0" - "@ethersproject/networks": "npm:5.7.1" - "@ethersproject/pbkdf2": "npm:5.7.0" - "@ethersproject/properties": "npm:5.7.0" - "@ethersproject/providers": "npm:5.7.2" - "@ethersproject/random": "npm:5.7.0" - "@ethersproject/rlp": "npm:5.7.0" - "@ethersproject/sha2": "npm:5.7.0" - "@ethersproject/signing-key": "npm:5.7.0" - "@ethersproject/solidity": "npm:5.7.0" - "@ethersproject/strings": "npm:5.7.0" - "@ethersproject/transactions": "npm:5.7.0" - "@ethersproject/units": "npm:5.7.0" - "@ethersproject/wallet": "npm:5.7.0" - "@ethersproject/web": "npm:5.7.1" - "@ethersproject/wordlists": "npm:5.7.0" - checksum: 10c0/90629a4cdb88cde7a7694f5610a83eb00d7fbbaea687446b15631397988f591c554dd68dfa752ddf00aabefd6285e5b298be44187e960f5e4962684e10b39962 - languageName: node - linkType: hard - -"ethers@npm:^6.5.1": - version: 6.13.2 - resolution: "ethers@npm:6.13.2" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.1" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:18.15.13" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.4.0" - ws: "npm:8.17.1" - checksum: 10c0/5956389a180992f8b6d90bc21b2e0f28619a098513d3aeb7a350a0b7c5852d635a9d7fd4ced1af50c985dd88398716f66dfd4a2de96c5c3a67150b93543d92af - languageName: node - linkType: hard - -"event-emitter@npm:^0.3.5": - version: 0.3.5 - resolution: "event-emitter@npm:0.3.5" - dependencies: - d: "npm:1" - es5-ext: "npm:~0.10.14" - checksum: 10c0/75082fa8ffb3929766d0f0a063bfd6046bd2a80bea2666ebaa0cfd6f4a9116be6647c15667bea77222afc12f5b4071b68d393cf39fdaa0e8e81eda006160aff0 - languageName: node - linkType: hard - -"events@npm:3.3.0, events@npm:^3.3.0": - version: 3.3.0 - resolution: "events@npm:3.3.0" - checksum: 10c0/d6b6f2adbccbcda74ddbab52ed07db727ef52e31a61ed26db9feb7dc62af7fc8e060defa65e5f8af9449b86b52cc1a1f6a79f2eafcf4e62add2b7a1fa4a432f6 - languageName: node - linkType: hard - -"evp_bytestokey@npm:^1.0.0, evp_bytestokey@npm:^1.0.3": - version: 1.0.3 - resolution: "evp_bytestokey@npm:1.0.3" - dependencies: - md5.js: "npm:^1.3.4" - node-gyp: "npm:latest" - safe-buffer: "npm:^5.1.1" - checksum: 10c0/77fbe2d94a902a80e9b8f5a73dcd695d9c14899c5e82967a61b1fc6cbbb28c46552d9b127cff47c45fcf684748bdbcfa0a50410349109de87ceb4b199ef6ee99 - languageName: node - linkType: hard - -"execa@npm:^8.0.1": - version: 8.0.1 - resolution: "execa@npm:8.0.1" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^8.0.1" - human-signals: "npm:^5.0.0" - is-stream: "npm:^3.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^5.1.0" - onetime: "npm:^6.0.0" - signal-exit: "npm:^4.1.0" - strip-final-newline: "npm:^3.0.0" - checksum: 10c0/2c52d8775f5bf103ce8eec9c7ab3059909ba350a5164744e9947ed14a53f51687c040a250bda833f906d1283aa8803975b84e6c8f7a7c42f99dc8ef80250d1af - languageName: node - linkType: hard - -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 - languageName: node - linkType: hard - -"ext@npm:^1.7.0": - version: 1.7.0 - resolution: "ext@npm:1.7.0" - dependencies: - type: "npm:^2.7.2" - checksum: 10c0/a8e5f34e12214e9eee3a4af3b5c9d05ba048f28996450975b369fc86e5d0ef13b6df0615f892f5396a9c65d616213c25ec5b0ad17ef42eac4a500512a19da6c7 - languageName: node - linkType: hard - -"extend@npm:^3.0.0": - version: 3.0.2 - resolution: "extend@npm:3.0.2" - checksum: 10c0/73bf6e27406e80aa3e85b0d1c4fd987261e628064e170ca781125c0b635a3dabad5e05adbf07595ea0cf1e6c5396cacb214af933da7cbaf24fe75ff14818e8f9 - languageName: node - linkType: hard - -"extension-port-stream@npm:^2.1.1": - version: 2.1.1 - resolution: "extension-port-stream@npm:2.1.1" - dependencies: - webextension-polyfill: "npm:>=0.10.0 <1.0" - checksum: 10c0/e3fb183669fee8adbb0fecdd0aa604feb976dc9d54c42da6c838c97c10be7f7f33c5341f198401e21216e1dd536fadd7b3f4bdf8e1bb38bbe3f135ecc3f6fda4 - languageName: node - linkType: hard - -"external-editor@npm:^2.0.4": - version: 2.2.0 - resolution: "external-editor@npm:2.2.0" - dependencies: - chardet: "npm:^0.4.0" - iconv-lite: "npm:^0.4.17" - tmp: "npm:^0.0.33" - checksum: 10c0/5440df6ab809467485b3b15557d301e9fa3dda2892d6eaddd036ea337e0ced3e369c319507a123e34749cfce89c51f891848d249c713f54bcfaf95296663ff49 - languageName: node - linkType: hard - -"external-editor@npm:^3.0.3": - version: 3.1.0 - resolution: "external-editor@npm:3.1.0" - dependencies: - chardet: "npm:^0.7.0" - iconv-lite: "npm:^0.4.24" - tmp: "npm:^0.0.33" - checksum: 10c0/c98f1ba3efdfa3c561db4447ff366a6adb5c1e2581462522c56a18bf90dfe4da382f9cd1feee3e330108c3595a854b218272539f311ba1b3298f841eb0fbf339 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-fuzzy@npm:^1.12.0": - version: 1.12.0 - resolution: "fast-fuzzy@npm:1.12.0" - dependencies: - graphemesplit: "npm:^2.4.1" - checksum: 10c0/c4adb03b21472b655414c9cb4680f217790ae641a9974148f55f7778da9a2cac26325996073b1082f76da5ab0f11f845122a6f717a5a99329c17e12ba625f3d6 - languageName: node - linkType: hard - -"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": - version: 3.3.2 - resolution: "fast-glob@npm:3.3.2" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10c0/42baad7b9cd40b63e42039132bde27ca2cb3a4950d0a0f9abe4639ea1aa9d3e3b40f98b1fe31cbc0cc17b664c9ea7447d911a152fa34ec5b72977b125a6fc845 - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:^2.0.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b - languageName: node - linkType: hard - -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - -"fast-redact@npm:^3.0.0": - version: 3.5.0 - resolution: "fast-redact@npm:3.5.0" - checksum: 10c0/7e2ce4aad6e7535e0775bf12bd3e4f2e53d8051d8b630e0fa9e67f68cb0b0e6070d2f7a94b1d0522ef07e32f7c7cda5755e2b677a6538f1e9070ca053c42343a - languageName: node - linkType: hard - -"fast-safe-stringify@npm:^2.0.6": - version: 2.1.1 - resolution: "fast-safe-stringify@npm:2.1.1" - checksum: 10c0/d90ec1c963394919828872f21edaa3ad6f1dddd288d2bd4e977027afff09f5db40f94e39536d4646f7e01761d704d72d51dce5af1b93717f3489ef808f5f4e4d - languageName: node - linkType: hard - -"fastq@npm:^1.6.0": - version: 1.17.1 - resolution: "fastq@npm:1.17.1" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/1095f16cea45fb3beff558bb3afa74ca7a9250f5a670b65db7ed585f92b4b48381445cd328b3d87323da81e43232b5d5978a8201bde84e0cd514310f1ea6da34 - languageName: node - linkType: hard - -"fb-watchman@npm:^2.0.0": - version: 2.0.2 - resolution: "fb-watchman@npm:2.0.2" - dependencies: - bser: "npm:2.1.1" - checksum: 10c0/feae89ac148adb8f6ae8ccd87632e62b13563e6fb114cacb5265c51f585b17e2e268084519fb2edd133872f1d47a18e6bfd7e5e08625c0d41b93149694187581 - languageName: node - linkType: hard - -"figures@npm:^2.0.0": - version: 2.0.0 - resolution: "figures@npm:2.0.0" - dependencies: - escape-string-regexp: "npm:^1.0.5" - checksum: 10c0/5dc5a75fec3e7e04ae65d6ce51d28b3e70d4656c51b06996b6fdb2cb5b542df512e3b3c04482f5193a964edddafa5521479ff948fa84e12ff556e53e094ab4ce - languageName: node - linkType: hard - -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" - dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10c0/58473e8a82794d01b38e5e435f6feaf648e3f36fdb3a56e98f417f4efae71ad1c0d4ebd8a9a7c50c3ad085820a93fc7494ad721e0e4ebc1da3573f4e1c3c7cdd - languageName: node - linkType: hard - -"file-uri-to-path@npm:1.0.0": - version: 1.0.0 - resolution: "file-uri-to-path@npm:1.0.0" - checksum: 10c0/3b545e3a341d322d368e880e1c204ef55f1d45cdea65f7efc6c6ce9e0c4d22d802d5629320eb779d006fe59624ac17b0e848d83cc5af7cd101f206cb704f5519 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"filter-obj@npm:^1.1.0": - version: 1.1.0 - resolution: "filter-obj@npm:1.1.0" - checksum: 10c0/071e0886b2b50238ca5026c5bbf58c26a7c1a1f720773b8c7813d16ba93d0200de977af14ac143c5ac18f666b2cfc83073f3a5fe6a4e996c49e0863d5500fccf - languageName: node - linkType: hard - -"find-root@npm:^1.1.0": - version: 1.1.0 - resolution: "find-root@npm:1.1.0" - checksum: 10c0/1abc7f3bf2f8d78ff26d9e00ce9d0f7b32e5ff6d1da2857bcdf4746134c422282b091c672cde0572cac3840713487e0a7a636af9aa1b74cb11894b447a521efa - languageName: node - linkType: hard - -"find-up@npm:^4.1.0": - version: 4.1.0 - resolution: "find-up@npm:4.1.0" - dependencies: - locate-path: "npm:^5.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/0406ee89ebeefa2d507feb07ec366bebd8a6167ae74aa4e34fb4c4abd06cf782a3ce26ae4194d70706f72182841733f00551c209fe575cb00bd92104056e78c1 - languageName: node - linkType: hard - -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a - languageName: node - linkType: hard - -"flat-cache@npm:^3.0.4": - version: 3.2.0 - resolution: "flat-cache@npm:3.2.0" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.3" - rimraf: "npm:^3.0.2" - checksum: 10c0/b76f611bd5f5d68f7ae632e3ae503e678d205cf97a17c6ab5b12f6ca61188b5f1f7464503efae6dc18683ed8f0b41460beb48ac4b9ac63fe6201296a91ba2f75 - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.1 - resolution: "flatted@npm:3.3.1" - checksum: 10c0/324166b125ee07d4ca9bcf3a5f98d915d5db4f39d711fba640a3178b959919aae1f7cfd8aabcfef5826ed8aa8a2aa14cc85b2d7d18ff638ddf4ae3df39573eaf - languageName: node - linkType: hard - -"focus-lock@npm:^1.3.5": - version: 1.3.5 - resolution: "focus-lock@npm:1.3.5" - dependencies: - tslib: "npm:^2.0.3" - checksum: 10c0/240fe013c2945200d3391856789d381bf3e09f488342a7965e00d0933de93ac2e8b0ccfa7da6353c11a30e369035f3b7e54cac9b0ebaf6825252a9ffc6445978 - languageName: node - linkType: hard - -"follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0, follow-redirects@npm:^1.15.6": - version: 1.15.6 - resolution: "follow-redirects@npm:1.15.6" - peerDependenciesMeta: - debug: - optional: true - checksum: 10c0/9ff767f0d7be6aa6870c82ac79cf0368cd73e01bbc00e9eb1c2a16fbb198ec105e3c9b6628bb98e9f3ac66fe29a957b9645bcb9a490bb7aa0d35f908b6b85071 - languageName: node - linkType: hard - -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.3.0 - resolution: "foreground-child@npm:3.3.0" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10c0/028f1d41000553fcfa6c4bb5c372963bf3d9bf0b1f25a87d1a6253014343fb69dfb1b42d9625d7cf44c8ba429940f3d0ff718b62105d4d4a4f6ef8ca0a53faa2 - languageName: node - linkType: hard - -"form-data@npm:^4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - mime-types: "npm:^2.1.12" - checksum: 10c0/cb6f3ac49180be03ff07ba3ff125f9eba2ff0b277fb33c7fc47569fc5e616882c5b1c69b9904c4c4187e97dd0419dd03b134174756f296dec62041e6527e2c6e - languageName: node - linkType: hard - -"framer-motion@npm:9.0.7": - version: 9.0.7 - resolution: "framer-motion@npm:9.0.7" - dependencies: - "@emotion/is-prop-valid": "npm:^0.8.2" - "@motionone/dom": "npm:^10.15.3" - hey-listen: "npm:^1.0.8" - tslib: "npm:^2.4.0" - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - dependenciesMeta: - "@emotion/is-prop-valid": - optional: true - checksum: 10c0/da4e83c391dd992aae3e130af4faa1097c68fc35d08439e08ce497f036d4cf50f50c5285cc6c17cc7c0785921bb661ce4e7903a0c0c3ab6dc7521acebe33fa08 - languageName: node - linkType: hard - -"framesync@npm:6.1.2": - version: 6.1.2 - resolution: "framesync@npm:6.1.2" - dependencies: - tslib: "npm:2.4.0" - checksum: 10c0/9e7d240ddf0bbe062bc9b71ffffd889b9923ee5d9c638ed84f2fe31aaa42e25e624eaf0b28ccca1d08f5ae170b8d083a6dabe5983f5dabea6bbbe6d4a9f8d27a - languageName: node - linkType: hard - -"fs-minipass@npm:^2.0.0": - version: 2.1.0 - resolution: "fs-minipass@npm:2.1.0" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 - languageName: node - linkType: hard - -"fs-minipass@npm:^3.0.0": - version: 3.0.3 - resolution: "fs-minipass@npm:3.0.3" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 - languageName: node - linkType: hard - -"fs.realpath@npm:^1.0.0": - version: 1.0.0 - resolution: "fs.realpath@npm:1.0.0" - checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 - languageName: node - linkType: hard - -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": - version: 2.3.3 - resolution: "fsevents@npm:2.3.3" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": - version: 2.3.3 - resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - -"function.prototype.name@npm:^1.1.6": - version: 1.1.6 - resolution: "function.prototype.name@npm:1.1.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - functions-have-names: "npm:^1.2.3" - checksum: 10c0/9eae11294905b62cb16874adb4fc687927cda3162285e0ad9612e6a1d04934005d46907362ea9cdb7428edce05a2f2c3dabc3b2d21e9fd343e9bb278230ad94b - languageName: node - linkType: hard - -"functions-have-names@npm:^1.2.3": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca - languageName: node - linkType: hard - -"fuzzy@npm:0.1.3": - version: 0.1.3 - resolution: "fuzzy@npm:0.1.3" - checksum: 10c0/584fcd57a03431707a6d0c1c4a41f17368cdb23d37dcb176d6cbbeeaecaac51be15dec229b3547acfb7db052cb066fcd86db907d40112ac4a3d3a368f88e7105 - languageName: node - linkType: hard - -"generate-lockfile@npm:0.0.12": - version: 0.0.12 - resolution: "generate-lockfile@npm:0.0.12" - dependencies: - "@yarnpkg/lockfile": "npm:^1.1.0" - chalk: "npm:^4.1.0" - commander-plus: "npm:^0.0.6" - bin: - generate-lockfile: bin/index.js - checksum: 10c0/c573e6a9137cb82c57022587dcb0d4024b2ffcaf8c87a95cb7c17c41d3303a0dd414c06ceb905f48f7bb653da13a490ba324d12350a5bd945289206170b02d99 - languageName: node - linkType: hard - -"gensync@npm:^1.0.0-beta.2": - version: 1.0.0-beta.2 - resolution: "gensync@npm:1.0.0-beta.2" - checksum: 10c0/782aba6cba65b1bb5af3b095d96249d20edbe8df32dbf4696fd49be2583faf676173bf4809386588828e4dd76a3354fcbeb577bab1c833ccd9fc4577f26103f8 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": - version: 1.2.4 - resolution: "get-intrinsic@npm:1.2.4" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.0" - checksum: 10c0/0a9b82c16696ed6da5e39b1267104475c47e3a9bdbe8b509dfe1710946e38a87be70d759f4bb3cda042d76a41ef47fe769660f3b7c0d1f68750299344ffb15b7 - languageName: node - linkType: hard - -"get-nonce@npm:^1.0.0": - version: 1.0.1 - resolution: "get-nonce@npm:1.0.1" - checksum: 10c0/2d7df55279060bf0568549e1ffc9b84bc32a32b7541675ca092dce56317cdd1a59a98dcc4072c9f6a980779440139a3221d7486f52c488e69dc0fd27b1efb162 - languageName: node - linkType: hard - -"get-package-type@npm:^0.1.0": - version: 0.1.0 - resolution: "get-package-type@npm:0.1.0" - checksum: 10c0/e34cdf447fdf1902a1f6d5af737eaadf606d2ee3518287abde8910e04159368c268568174b2e71102b87b26c2020486f126bfca9c4fb1ceb986ff99b52ecd1be - languageName: node - linkType: hard - -"get-port-please@npm:^3.1.2": - version: 3.1.2 - resolution: "get-port-please@npm:3.1.2" - checksum: 10c0/61237342fe035967e5ad1b67a2dee347a64de093bf1222b7cd50072568d73c48dad5cc5cd4fa44635b7cfdcd14d6c47554edb9891c2ec70ab33ecb831683e257 - languageName: node - linkType: hard - -"get-stdin@npm:^8.0.0": - version: 8.0.0 - resolution: "get-stdin@npm:8.0.0" - checksum: 10c0/b71b72b83928221052f713b3b6247ebf1ceaeb4ef76937778557537fd51ad3f586c9e6a7476865022d9394b39b74eed1dc7514052fa74d80625276253571b76f - languageName: node - linkType: hard - -"get-stream@npm:^8.0.1": - version: 8.0.1 - resolution: "get-stream@npm:8.0.1" - checksum: 10c0/5c2181e98202b9dae0bb4a849979291043e5892eb40312b47f0c22b9414fc9b28a3b6063d2375705eb24abc41ecf97894d9a51f64ff021511b504477b27b4290 - languageName: node - linkType: hard - -"get-symbol-description@npm:^1.0.2": - version: 1.0.2 - resolution: "get-symbol-description@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.5" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - checksum: 10c0/867be6d63f5e0eb026cb3b0ef695ec9ecf9310febb041072d2e142f260bd91ced9eeb426b3af98791d1064e324e653424afa6fd1af17dee373bea48ae03162bc - languageName: node - linkType: hard - -"get-tsconfig@npm:^4.7.5": - version: 4.7.6 - resolution: "get-tsconfig@npm:4.7.6" - dependencies: - resolve-pkg-maps: "npm:^1.0.0" - checksum: 10c0/2240e1b13e996dfbb947d177f422f83d09d1f93c9ce16959ebb3c2bdf8bdf4f04f98eba043859172da1685f9c7071091f0acfa964ebbe4780394d83b7dc3f58a - languageName: node - linkType: hard - -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob-parent@npm:^6.0.2": - version: 6.0.2 - resolution: "glob-parent@npm:6.0.2" - dependencies: - is-glob: "npm:^4.0.3" - checksum: 10c0/317034d88654730230b3f43bb7ad4f7c90257a426e872ea0bf157473ac61c99bf5d205fad8f0185f989be8d2fa6d3c7dce1645d99d545b6ea9089c39f838e7f8 - languageName: node - linkType: hard - -"glob-promise@npm:^3.4.0": - version: 3.4.0 - resolution: "glob-promise@npm:3.4.0" - dependencies: - "@types/glob": "npm:*" - peerDependencies: - glob: "*" - checksum: 10c0/8862e309f46a97c9491d35900257c9174f72b8358a8f485cdba88eb2d5b0f9cf496dfe635711bbd871e89165f50ec3acd435cbef5bfc5efbc14508abced778ac - languageName: node - linkType: hard - -"glob-promise@npm:^4.2.2": - version: 4.2.2 - resolution: "glob-promise@npm:4.2.2" - dependencies: - "@types/glob": "npm:^7.1.3" - peerDependencies: - glob: ^7.1.6 - checksum: 10c0/3eb01bed2901539365df6a4d27800afb8788840647d01f9bf3500b3de756597f2ff4b8c823971ace34db228c83159beca459dc42a70968d4e9c8200ed2cc96bd - languageName: node - linkType: hard - -"glob-to-regexp@npm:^0.4.1": - version: 0.4.1 - resolution: "glob-to-regexp@npm:0.4.1" - checksum: 10c0/0486925072d7a916f052842772b61c3e86247f0a80cc0deb9b5a3e8a1a9faad5b04fb6f58986a09f34d3e96cd2a22a24b7e9882fb1cf904c31e9a310de96c429 - languageName: node - linkType: hard - -"glob@npm:7.1.7": - version: 7.1.7 - resolution: "glob@npm:7.1.7" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.0.4" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10c0/173245e6f9ccf904309eb7ef4a44a11f3bf68e9e341dff5a28b5db0dd7123b7506daf41497f3437a0710f57198187b758c2351eeaabce4d16935e956920da6a4 - languageName: node - linkType: hard - -"glob@npm:8.0.3": - version: 8.0.3 - resolution: "glob@npm:8.0.3" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^5.0.1" - once: "npm:^1.3.0" - checksum: 10c0/07ebaf2ed83e76b10901ec4982040ebd85458b787b4386f751a0514f6c8e416ed6c9eec5a892571eb0ef00b09d1bd451f72b5d9fb7b63770efd400532486e731 - languageName: node - linkType: hard - -"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e - languageName: node - linkType: hard - -"glob@npm:^7.0.0, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": - version: 7.2.3 - resolution: "glob@npm:7.2.3" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.1.1" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10c0/65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe - languageName: node - linkType: hard - -"globals@npm:^11.1.0": - version: 11.12.0 - resolution: "globals@npm:11.12.0" - checksum: 10c0/758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 - languageName: node - linkType: hard - -"globals@npm:^13.15.0, globals@npm:^13.19.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10c0/d3c11aeea898eb83d5ec7a99508600fbe8f83d2cf00cbb77f873dbf2bcb39428eff1b538e4915c993d8a3b3473fa71eeebfe22c9bb3a3003d1e26b1f2c8a42cd - languageName: node - linkType: hard - -"globalthis@npm:^1.0.1, globalthis@npm:^1.0.3": - version: 1.0.4 - resolution: "globalthis@npm:1.0.4" - dependencies: - define-properties: "npm:^1.2.1" - gopd: "npm:^1.0.1" - checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 - languageName: node - linkType: hard - -"globby@npm:^11.1.0": - version: 11.1.0 - resolution: "globby@npm:11.1.0" - dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.9" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^3.0.0" - checksum: 10c0/b39511b4afe4bd8a7aead3a27c4ade2b9968649abab0a6c28b1a90141b96ca68ca5db1302f7c7bd29eab66bf51e13916b8e0a3d0ac08f75e1e84a39b35691189 - languageName: node - linkType: hard - -"google-protobuf@npm:^3.17.3": - version: 3.21.4 - resolution: "google-protobuf@npm:3.21.4" - checksum: 10c0/28f2800f7fe1a8fc55eb58ba76e158268407bfb3b90646eaf8a177dd92a2e522459b773f8132ae546e60ac3b6f5947557a1cf3d963a05bb594f43bcde640f54f - languageName: node - linkType: hard - -"gopd@npm:^1.0.1": - version: 1.0.1 - resolution: "gopd@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.1.3" - checksum: 10c0/505c05487f7944c552cee72087bf1567debb470d4355b1335f2c262d218ebbff805cd3715448fe29b4b380bae6912561d0467233e4165830efd28da241418c63 - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": - version: 4.2.11 - resolution: "graceful-fs@npm:4.2.11" - checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 - languageName: node - linkType: hard - -"grapheme-splitter@npm:^1.0.4": - version: 1.0.4 - resolution: "grapheme-splitter@npm:1.0.4" - checksum: 10c0/108415fb07ac913f17040dc336607772fcea68c7f495ef91887edddb0b0f5ff7bc1d1ab181b125ecb2f0505669ef12c9a178a3bbd2dd8e042d8c5f1d7c90331a - languageName: node - linkType: hard - -"graphemesplit@npm:^2.4.1": - version: 2.4.4 - resolution: "graphemesplit@npm:2.4.4" - dependencies: - js-base64: "npm:^3.6.0" - unicode-trie: "npm:^2.0.0" - checksum: 10c0/8c1ba90b97b5a71ded869bfa0282013ff8c182f679706aaac90c111bcd7d504ed3867ce7f11221496ec18ea71e793976e66b16f9e988ac22652e928a9e8e5890 - languageName: node - linkType: hard - -"h3@npm:^1.10.2, h3@npm:^1.11.1": - version: 1.12.0 - resolution: "h3@npm:1.12.0" - dependencies: - cookie-es: "npm:^1.1.0" - crossws: "npm:^0.2.4" - defu: "npm:^6.1.4" - destr: "npm:^2.0.3" - iron-webcrypto: "npm:^1.1.1" - ohash: "npm:^1.1.3" - radix3: "npm:^1.1.2" - ufo: "npm:^1.5.3" - uncrypto: "npm:^0.1.3" - unenv: "npm:^1.9.0" - checksum: 10c0/21ac3ee2451e96a74d6a4ec3a6e589c4725590dc4e675816436ae9d041556fc1b64052ba3775a48912f4ae98977031e1be4c57ac8a80bb4297117506b6ec7a6f - languageName: node - linkType: hard - -"has-ansi@npm:^2.0.0": - version: 2.0.0 - resolution: "has-ansi@npm:2.0.0" - dependencies: - ansi-regex: "npm:^2.0.0" - checksum: 10c0/f54e4887b9f8f3c4bfefd649c48825b3c093987c92c27880ee9898539e6f01aed261e82e73153c3f920fde0db5bf6ebd58deb498ed1debabcb4bc40113ccdf05 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": - version: 1.0.2 - resolution: "has-bigints@npm:1.0.2" - checksum: 10c0/724eb1485bfa3cdff6f18d95130aa190561f00b3fcf9f19dc640baf8176b5917c143b81ec2123f8cddb6c05164a198c94b13e1377c497705ccc8e1a80306e83b - languageName: node - linkType: hard - -"has-flag@npm:^3.0.0": - version: 3.0.0 - resolution: "has-flag@npm:3.0.0" - checksum: 10c0/1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 - languageName: node - linkType: hard - -"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": - version: 1.0.3 - resolution: "has-proto@npm:1.0.3" - checksum: 10c0/35a6989f81e9f8022c2f4027f8b48a552de714938765d019dbea6bb547bd49ce5010a3c7c32ec6ddac6e48fc546166a3583b128f5a7add8b058a6d8b4afec205 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": - version: 1.0.3 - resolution: "has-symbols@npm:1.0.3" - checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - -"hash-base@npm:^3.0.0": - version: 3.1.0 - resolution: "hash-base@npm:3.1.0" - dependencies: - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.6.0" - safe-buffer: "npm:^5.2.0" - checksum: 10c0/663eabcf4173326fbb65a1918a509045590a26cc7e0964b754eef248d281305c6ec9f6b31cb508d02ffca383ab50028180ce5aefe013e942b44a903ac8dc80d0 - languageName: node - linkType: hard - -"hash-base@npm:~3.0": - version: 3.0.4 - resolution: "hash-base@npm:3.0.4" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10c0/a13357dccb3827f0bb0b56bf928da85c428dc8670f6e4a1c7265e4f1653ce02d69030b40fd01b0f1d218a995a066eea279cded9cec72d207b593bcdfe309c2f0 - languageName: node - linkType: hard - -"hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": - version: 1.1.7 - resolution: "hash.js@npm:1.1.7" - dependencies: - inherits: "npm:^2.0.3" - minimalistic-assert: "npm:^1.0.1" - checksum: 10c0/41ada59494eac5332cfc1ce6b7ebdd7b88a3864a6d6b08a3ea8ef261332ed60f37f10877e0c825aaa4bddebf164fbffa618286aeeec5296675e2671cbfa746c4 - languageName: node - linkType: hard - -"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - -"hast-util-whitespace@npm:^2.0.0": - version: 2.0.1 - resolution: "hast-util-whitespace@npm:2.0.1" - checksum: 10c0/dcf6ebab091c802ffa7bb3112305c7631c15adb6c07a258f5528aefbddf82b4e162c8310ef426c48dc1dc623982cc33920e6dde5a50015d307f2778dcf6c2487 - languageName: node - linkType: hard - -"hey-listen@npm:^1.0.8": - version: 1.0.8 - resolution: "hey-listen@npm:1.0.8" - checksum: 10c0/38db3028b4756f3d536c0f6a92da53bad577ab649b06dddfd0a4d953f9a46bbc6a7f693c8c5b466a538d6d23dbc469260c848427f0de14198a2bbecbac37b39e - languageName: node - linkType: hard - -"hmac-drbg@npm:^1.0.1": - version: 1.0.1 - resolution: "hmac-drbg@npm:1.0.1" - dependencies: - hash.js: "npm:^1.0.3" - minimalistic-assert: "npm:^1.0.0" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/f3d9ba31b40257a573f162176ac5930109816036c59a09f901eb2ffd7e5e705c6832bedfff507957125f2086a0ab8f853c0df225642a88bf1fcaea945f20600d - languageName: node - linkType: hard - -"hoist-non-react-statics@npm:^3.3.1": - version: 3.3.2 - resolution: "hoist-non-react-statics@npm:3.3.2" - dependencies: - react-is: "npm:^16.7.0" - checksum: 10c0/fe0889169e845d738b59b64badf5e55fa3cf20454f9203d1eb088df322d49d4318df774828e789898dcb280e8a5521bb59b3203385662ca5e9218a6ca5820e74 - languageName: node - linkType: hard - -"http-cache-semantics@npm:^4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 - languageName: node - linkType: hard - -"http-shutdown@npm:^1.2.2": - version: 1.2.2 - resolution: "http-shutdown@npm:1.2.2" - checksum: 10c0/1ea04d50d9a84ad6e7d9ee621160ce9515936e32e7f5ba445db48a5d72681858002c934c7f3ae5f474b301c1cd6b418aee3f6a2f109822109e606cc1a6c17c03 - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.1": - version: 7.0.5 - resolution: "https-proxy-agent@npm:7.0.5" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10c0/2490e3acec397abeb88807db52cac59102d5ed758feee6df6112ab3ccd8325e8a1ce8bce6f4b66e5470eca102d31e425ace904242e4fa28dbe0c59c4bafa7b2c - languageName: node - linkType: hard - -"human-signals@npm:^5.0.0": - version: 5.0.0 - resolution: "human-signals@npm:5.0.0" - checksum: 10c0/5a9359073fe17a8b58e5a085e9a39a950366d9f00217c4ff5878bd312e09d80f460536ea6a3f260b5943a01fe55c158d1cea3fc7bee3d0520aeef04f6d915c82 - languageName: node - linkType: hard - -"iconv-lite@npm:^0.4.17, iconv-lite@npm:^0.4.24": - version: 0.4.24 - resolution: "iconv-lite@npm:0.4.24" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3" - checksum: 10c0/c6886a24cc00f2a059767440ec1bc00d334a89f250db8e0f7feb4961c8727118457e27c495ba94d082e51d3baca378726cd110aaf7ded8b9bbfd6a44760cf1d4 - languageName: node - linkType: hard - -"iconv-lite@npm:^0.6.2": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 - languageName: node - linkType: hard - -"idb-keyval@npm:^6.2.1": - version: 6.2.1 - resolution: "idb-keyval@npm:6.2.1" - checksum: 10c0/9f0c83703a365e00bd0b4ed6380ce509a06dedfc6ec39b2ba5740085069fd2f2ff5c14ba19356488e3612a2f9c49985971982d836460a982a5d0b4019eeba48a - languageName: node - linkType: hard - -"ieee754@npm:^1.2.1": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - -"ignore@npm:^5.2.0": - version: 5.3.2 - resolution: "ignore@npm:5.3.2" - checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 - languageName: node - linkType: hard - -"immer@npm:^10.1.1": - version: 10.1.1 - resolution: "immer@npm:10.1.1" - checksum: 10c0/b749e10d137ccae91788f41bd57e9387f32ea6d6ea8fd7eb47b23fd7766681575efc7f86ceef7fe24c3bc9d61e38ff5d2f49c2663b2b0c056e280a4510923653 - languageName: node - linkType: hard - -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" - dependencies: - parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10c0/7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 - languageName: node - linkType: hard - -"indent-string@npm:^4.0.0": - version: 4.0.0 - resolution: "indent-string@npm:4.0.0" - checksum: 10c0/1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f - languageName: node - linkType: hard - -"inflight@npm:^1.0.4": - version: 1.0.6 - resolution: "inflight@npm:1.0.6" - dependencies: - once: "npm:^1.3.0" - wrappy: "npm:1" - checksum: 10c0/7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 - languageName: node - linkType: hard - -"inherits@npm:2, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": - version: 2.0.4 - resolution: "inherits@npm:2.0.4" - checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 - languageName: node - linkType: hard - -"inherits@npm:2.0.3": - version: 2.0.3 - resolution: "inherits@npm:2.0.3" - checksum: 10c0/6e56402373149ea076a434072671f9982f5fad030c7662be0332122fe6c0fa490acb3cc1010d90b6eff8d640b1167d77674add52dfd1bb85d545cf29e80e73e7 - languageName: node - linkType: hard - -"inline-style-parser@npm:0.1.1": - version: 0.1.1 - resolution: "inline-style-parser@npm:0.1.1" - checksum: 10c0/08832a533f51a1e17619f2eabf2f5ec5e956d6dcba1896351285c65df022c9420de61d73256e1dca8015a52abf96cc84ddc3b73b898b22de6589d3962b5e501b - languageName: node - linkType: hard - -"inquirer-autocomplete-prompt@npm:^0.11.1": - version: 0.11.1 - resolution: "inquirer-autocomplete-prompt@npm:0.11.1" - dependencies: - ansi-escapes: "npm:^2.0.0" - chalk: "npm:^1.1.3" - figures: "npm:^2.0.0" - inquirer: "npm:3.1.1" - lodash: "npm:^4.17.4" - run-async: "npm:^2.3.0" - util: "npm:^0.10.3" - checksum: 10c0/ea02159215083800be247b3b31bb9a32c868acbae3fa0f4ac1f819e88245b19dc34b2aa5f7d17679cf37072eaff9a0ef03ea65e9d33dc3d920efb1ecdc382d72 - languageName: node - linkType: hard - -"inquirer@npm:3.1.1": - version: 3.1.1 - resolution: "inquirer@npm:3.1.1" - dependencies: - ansi-escapes: "npm:^2.0.0" - chalk: "npm:^1.0.0" - cli-cursor: "npm:^2.1.0" - cli-width: "npm:^2.0.0" - external-editor: "npm:^2.0.4" - figures: "npm:^2.0.0" - lodash: "npm:^4.3.0" - mute-stream: "npm:0.0.7" - run-async: "npm:^2.2.0" - rx-lite: "npm:^4.0.8" - rx-lite-aggregates: "npm:^4.0.8" - string-width: "npm:^2.0.0" - strip-ansi: "npm:^3.0.0" - through: "npm:^2.3.6" - checksum: 10c0/866549b59c664113fb20fcc1b73349c238b3674ed66234e8f8fe50574f8be36d81eb42c14e6675c1e6a1fadc03a7f851a2245efda32409f680fc65ca52331475 - languageName: node - linkType: hard - -"inquirer@npm:^6.0.0": - version: 6.5.2 - resolution: "inquirer@npm:6.5.2" - dependencies: - ansi-escapes: "npm:^3.2.0" - chalk: "npm:^2.4.2" - cli-cursor: "npm:^2.1.0" - cli-width: "npm:^2.0.0" - external-editor: "npm:^3.0.3" - figures: "npm:^2.0.0" - lodash: "npm:^4.17.12" - mute-stream: "npm:0.0.7" - run-async: "npm:^2.2.0" - rxjs: "npm:^6.4.0" - string-width: "npm:^2.1.0" - strip-ansi: "npm:^5.1.0" - through: "npm:^2.3.6" - checksum: 10c0/a5aa53a8f88405cf1cff63111493f87a5b3b5deb5ea4a0dbcd73ccc06a51a6bba0c3f1a0747f8880e9e3ec2437c69f90417be16368abf636b1d29eebe35db0ac - languageName: node - linkType: hard - -"inquirerer@npm:0.1.3": - version: 0.1.3 - resolution: "inquirerer@npm:0.1.3" - dependencies: - colors: "npm:^1.1.2" - inquirer: "npm:^6.0.0" - inquirer-autocomplete-prompt: "npm:^0.11.1" - checksum: 10c0/da61f9c797c1b7d4455b1be8c5c431bac278297a0758cb758e027829b40629c0facb76b479d48a7db7a56b534278085c4e95be621cb161c607c432890c46194e - languageName: node - linkType: hard - -"interchainjs@npm:0.0.1-beta.12": - version: 0.0.1-beta.12 - resolution: "interchainjs@npm:0.0.1-beta.12" - dependencies: - "@interchainjs/cosmos": "npm:^0.0.1-beta.11" - "@interchainjs/cosmos-types": "npm:^0.0.1-beta.8" - "@interchainjs/types": "npm:^0.0.1-beta.8" - "@interchainjs/utils": "npm:^0.0.1-beta.8" - "@noble/hashes": "npm:^1.3.1" - decimal.js: "npm:^10.4.3" - checksum: 10c0/d2aa8969c9ebe445147546e3b4103988f4d2c3fe764dc8b313c2a0c446c3b792630e2dd643e8b866104b4e4866bcb66e85487e12c439041d62a2e597a342e0e5 - languageName: node - linkType: hard - -"interchainjs@npm:^0.0.1-beta.12": - version: 0.0.1 - resolution: "interchainjs@npm:0.0.1" - dependencies: - "@babel/runtime": "npm:^7.18.9" - "@cosmjs/amino": "npm:0.28.11" - "@cosmjs/proto-signing": "npm:0.28.11" - "@cosmjs/stargate": "npm:0.28.11" - "@cosmjs/tendermint-rpc": "npm:^0.28.11" - "@osmonauts/helpers": "npm:^0.3.12" - "@osmonauts/telescope": "npm:^0.9.2" - protobufjs: "npm:^6.11.2" - checksum: 10c0/ea125294e7cf28e4776494bb0a859a3ba89802259efd5652f31ce076f64c01e59bc833a10bdf33af3cbda137fc09b2e680ea50dddb7e0f66da22aa97a4c8f984 - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": - version: 1.0.7 - resolution: "internal-slot@npm:1.0.7" - dependencies: - es-errors: "npm:^1.3.0" - hasown: "npm:^2.0.0" - side-channel: "npm:^1.0.4" - checksum: 10c0/f8b294a4e6ea3855fc59551bbf35f2b832cf01fd5e6e2a97f5c201a071cc09b49048f856e484b67a6c721da5e55736c5b6ddafaf19e2dbeb4a3ff1821680de6c - languageName: node - linkType: hard - -"interpret@npm:^1.0.0": - version: 1.4.0 - resolution: "interpret@npm:1.4.0" - checksum: 10c0/08c5ad30032edeec638485bc3f6db7d0094d9b3e85e0f950866600af3c52e9fd69715416d29564731c479d9f4d43ff3e4d302a178196bdc0e6837ec147640450 - languageName: node - linkType: hard - -"intl-messageformat@npm:^10.1.0": - version: 10.5.14 - resolution: "intl-messageformat@npm:10.5.14" - dependencies: - "@formatjs/ecma402-abstract": "npm:2.0.0" - "@formatjs/fast-memoize": "npm:2.2.0" - "@formatjs/icu-messageformat-parser": "npm:2.7.8" - tslib: "npm:^2.4.0" - checksum: 10c0/8ec0a60539f67039356e211bcc8d81cf1bd9d62190a72ab0e94504da92f0242fe2f94ffb512b97cc6f63782b7891874d4038536ce04631e59d762c3441c60b4b - languageName: node - linkType: hard - -"invariant@npm:^2.2.4": - version: 2.2.4 - resolution: "invariant@npm:2.2.4" - dependencies: - loose-envify: "npm:^1.0.0" - checksum: 10c0/5af133a917c0bcf65e84e7f23e779e7abc1cd49cb7fdc62d00d1de74b0d8c1b5ee74ac7766099fb3be1b05b26dfc67bab76a17030d2fe7ea2eef867434362dfc - languageName: node - linkType: hard - -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc - languageName: node - linkType: hard - -"iron-webcrypto@npm:^1.1.1": - version: 1.2.1 - resolution: "iron-webcrypto@npm:1.2.1" - checksum: 10c0/5cf27c6e2bd3ef3b4970e486235fd82491ab8229e2ed0ac23307c28d6c80d721772a86ed4e9fe2a5cabadd710c2f024b706843b40561fb83f15afee58f809f66 - languageName: node - linkType: hard - -"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": - version: 1.1.1 - resolution: "is-arguments@npm:1.1.1" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/5ff1f341ee4475350adfc14b2328b38962564b7c2076be2f5bac7bd9b61779efba99b9f844a7b82ba7654adccf8e8eb19d1bb0cc6d1c1a085e498f6793d4328f - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": - version: 3.0.4 - resolution: "is-array-buffer@npm:3.0.4" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - checksum: 10c0/42a49d006cc6130bc5424eae113e948c146f31f9d24460fc0958f855d9d810e6fd2e4519bf19aab75179af9c298ea6092459d8cafdec523cd19e529b26eab860 - languageName: node - linkType: hard - -"is-arrayish@npm:^0.2.1": - version: 0.2.1 - resolution: "is-arrayish@npm:0.2.1" - checksum: 10c0/e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729 - languageName: node - linkType: hard - -"is-async-function@npm:^2.0.0": - version: 2.0.0 - resolution: "is-async-function@npm:2.0.0" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/787bc931576aad525d751fc5ce211960fe91e49ac84a5c22d6ae0bc9541945fbc3f686dc590c3175722ce4f6d7b798a93f6f8ff4847fdb2199aea6f4baf5d668 - languageName: node - linkType: hard - -"is-bigint@npm:^1.0.1": - version: 1.0.4 - resolution: "is-bigint@npm:1.0.4" - dependencies: - has-bigints: "npm:^1.0.1" - checksum: 10c0/eb9c88e418a0d195ca545aff2b715c9903d9b0a5033bc5922fec600eb0c3d7b1ee7f882dbf2e0d5a6e694e42391be3683e4368737bd3c4a77f8ac293e7773696 - languageName: node - linkType: hard - -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 - languageName: node - linkType: hard - -"is-boolean-object@npm:^1.1.0": - version: 1.1.2 - resolution: "is-boolean-object@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/6090587f8a8a8534c0f816da868bc94f32810f08807aa72fa7e79f7e11c466d281486ffe7a788178809c2aa71fe3e700b167fe80dd96dad68026bfff8ebf39f7 - languageName: node - linkType: hard - -"is-buffer@npm:^2.0.0": - version: 2.0.5 - resolution: "is-buffer@npm:2.0.5" - checksum: 10c0/e603f6fced83cf94c53399cff3bda1a9f08e391b872b64a73793b0928be3e5f047f2bcece230edb7632eaea2acdbfcb56c23b33d8a20c820023b230f1485679a - languageName: node - linkType: hard - -"is-bun-module@npm:^1.0.2": - version: 1.1.0 - resolution: "is-bun-module@npm:1.1.0" - dependencies: - semver: "npm:^7.6.3" - checksum: 10c0/17cae968c3fe08e2bd66f8477e4d5a166d6299b5e7ce5c7558355551c50267f77dd386297fada6b68e4a32f01ce8920b0423e4d258242ea463b45901ec474beb - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": - version: 2.15.1 - resolution: "is-core-module@npm:2.15.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/53432f10c69c40bfd2fa8914133a68709ff9498c86c3bf5fca3cdf3145a56fd2168cbf4a43b29843a6202a120a5f9c5ffba0a4322e1e3441739bc0b641682612 - languageName: node - linkType: hard - -"is-data-view@npm:^1.0.1": - version: 1.0.1 - resolution: "is-data-view@npm:1.0.1" - dependencies: - is-typed-array: "npm:^1.1.13" - checksum: 10c0/a3e6ec84efe303da859107aed9b970e018e2bee7ffcb48e2f8096921a493608134240e672a2072577e5f23a729846241d9634806e8a0e51d9129c56d5f65442d - languageName: node - linkType: hard - -"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": - version: 1.0.5 - resolution: "is-date-object@npm:1.0.5" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/eed21e5dcc619c48ccef804dfc83a739dbb2abee6ca202838ee1bd5f760fe8d8a93444f0d49012ad19bb7c006186e2884a1b92f6e1c056da7fd23d0a9ad5992e - languageName: node - linkType: hard - -"is-docker@npm:^3.0.0": - version: 3.0.0 - resolution: "is-docker@npm:3.0.0" - bin: - is-docker: cli.js - checksum: 10c0/d2c4f8e6d3e34df75a5defd44991b6068afad4835bb783b902fa12d13ebdb8f41b2a199dcb0b5ed2cb78bfee9e4c0bbdb69c2d9646f4106464674d3e697a5856 - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-finalizationregistry@npm:^1.0.2": - version: 1.0.2 - resolution: "is-finalizationregistry@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/81caecc984d27b1a35c68741156fc651fb1fa5e3e6710d21410abc527eb226d400c0943a167922b2e920f6b3e58b0dede9aa795882b038b85f50b3a4b877db86 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^2.0.0": - version: 2.0.0 - resolution: "is-fullwidth-code-point@npm:2.0.0" - checksum: 10c0/e58f3e4a601fc0500d8b2677e26e9fe0cd450980e66adb29d85b6addf7969731e38f8e43ed2ec868a09c101a55ac3d8b78902209269f38c5286bc98f5bc1b4d9 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc - languageName: node - linkType: hard - -"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": - version: 1.0.10 - resolution: "is-generator-function@npm:1.0.10" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/df03514df01a6098945b5a0cfa1abff715807c8e72f57c49a0686ad54b3b74d394e2d8714e6f709a71eb00c9630d48e73ca1796c1ccc84ac95092c1fecc0d98b - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-inside-container@npm:^1.0.0": - version: 1.0.0 - resolution: "is-inside-container@npm:1.0.0" - dependencies: - is-docker: "npm:^3.0.0" - bin: - is-inside-container: cli.js - checksum: 10c0/a8efb0e84f6197e6ff5c64c52890fa9acb49b7b74fed4da7c95383965da6f0fa592b4dbd5e38a79f87fc108196937acdbcd758fcefc9b140e479b39ce1fcd1cd - languageName: node - linkType: hard - -"is-lambda@npm:^1.0.1": - version: 1.0.1 - resolution: "is-lambda@npm:1.0.1" - checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d - languageName: node - linkType: hard - -"is-map@npm:^2.0.2, is-map@npm:^2.0.3": - version: 2.0.3 - resolution: "is-map@npm:2.0.3" - checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc - languageName: node - linkType: hard - -"is-nan@npm:^1.3.2": - version: 1.3.2 - resolution: "is-nan@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.0" - define-properties: "npm:^1.1.3" - checksum: 10c0/8bfb286f85763f9c2e28ea32e9127702fe980ffd15fa5d63ade3be7786559e6e21355d3625dd364c769c033c5aedf0a2ed3d4025d336abf1b9241e3d9eddc5b0 - languageName: node - linkType: hard - -"is-negative-zero@npm:^2.0.3": - version: 2.0.3 - resolution: "is-negative-zero@npm:2.0.3" - checksum: 10c0/bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e - languageName: node - linkType: hard - -"is-number-object@npm:^1.0.4": - version: 1.0.7 - resolution: "is-number-object@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/aad266da1e530f1804a2b7bd2e874b4869f71c98590b3964f9d06cc9869b18f8d1f4778f838ecd2a11011bce20aeecb53cb269ba916209b79c24580416b74b1b - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-path-inside@npm:^3.0.3": - version: 3.0.3 - resolution: "is-path-inside@npm:3.0.3" - checksum: 10c0/cf7d4ac35fb96bab6a1d2c3598fe5ebb29aafb52c0aaa482b5a3ed9d8ba3edc11631e3ec2637660c44b3ce0e61a08d54946e8af30dec0b60a7c27296c68ffd05 - languageName: node - linkType: hard - -"is-plain-obj@npm:^4.0.0": - version: 4.1.0 - resolution: "is-plain-obj@npm:4.1.0" - checksum: 10c0/32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e - languageName: node - linkType: hard - -"is-promise@npm:^2.2.2": - version: 2.2.2 - resolution: "is-promise@npm:2.2.2" - checksum: 10c0/2dba959812380e45b3df0fb12e7cb4d4528c989c7abb03ececb1d1fd6ab1cbfee956ca9daa587b9db1d8ac3c1e5738cf217bdb3dfd99df8c691be4c00ae09069 - languageName: node - linkType: hard - -"is-regex@npm:^1.1.4": - version: 1.1.4 - resolution: "is-regex@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/bb72aae604a69eafd4a82a93002058c416ace8cde95873589a97fc5dac96a6c6c78a9977d487b7b95426a8f5073969124dd228f043f9f604f041f32fcc465fc1 - languageName: node - linkType: hard - -"is-set@npm:^2.0.2, is-set@npm:^2.0.3": - version: 2.0.3 - resolution: "is-set@npm:2.0.3" - checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "is-shared-array-buffer@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - checksum: 10c0/adc11ab0acbc934a7b9e5e9d6c588d4ec6682f6fea8cda5180721704fa32927582ede5b123349e32517fdadd07958973d24716c80e7ab198970c47acc09e59c7 - languageName: node - linkType: hard - -"is-stream@npm:^2.0.0": - version: 2.0.1 - resolution: "is-stream@npm:2.0.1" - checksum: 10c0/7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5 - languageName: node - linkType: hard - -"is-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "is-stream@npm:3.0.0" - checksum: 10c0/eb2f7127af02ee9aa2a0237b730e47ac2de0d4e76a4a905a50a11557f2339df5765eaea4ceb8029f1efa978586abe776908720bfcb1900c20c6ec5145f6f29d8 - languageName: node - linkType: hard - -"is-string@npm:^1.0.5, is-string@npm:^1.0.7": - version: 1.0.7 - resolution: "is-string@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/905f805cbc6eedfa678aaa103ab7f626aac9ebbdc8737abb5243acaa61d9820f8edc5819106b8fcd1839e33db21de9f0116ae20de380c8382d16dc2a601921f6 - languageName: node - linkType: hard - -"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": - version: 1.0.4 - resolution: "is-symbol@npm:1.0.4" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10c0/9381dd015f7c8906154dbcbf93fad769de16b4b961edc94f88d26eb8c555935caa23af88bda0c93a18e65560f6d7cca0fd5a3f8a8e1df6f1abbb9bead4502ef7 - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.3": - version: 1.1.13 - resolution: "is-typed-array@npm:1.1.13" - dependencies: - which-typed-array: "npm:^1.1.14" - checksum: 10c0/fa5cb97d4a80e52c2cc8ed3778e39f175a1a2ae4ddf3adae3187d69586a1fd57cfa0b095db31f66aa90331e9e3da79184cea9c6abdcd1abc722dc3c3edd51cca - languageName: node - linkType: hard - -"is-weakmap@npm:^2.0.2": - version: 2.0.2 - resolution: "is-weakmap@npm:2.0.2" - checksum: 10c0/443c35bb86d5e6cc5929cd9c75a4024bb0fff9586ed50b092f94e700b89c43a33b186b76dbc6d54f3d3d09ece689ab38dcdc1af6a482cbe79c0f2da0a17f1299 - languageName: node - linkType: hard - -"is-weakref@npm:^1.0.2": - version: 1.0.2 - resolution: "is-weakref@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/1545c5d172cb690c392f2136c23eec07d8d78a7f57d0e41f10078aa4f5daf5d7f57b6513a67514ab4f073275ad00c9822fc8935e00229d0a2089e1c02685d4b1 - languageName: node - linkType: hard - -"is-weakset@npm:^2.0.3": - version: 2.0.3 - resolution: "is-weakset@npm:2.0.3" - dependencies: - call-bind: "npm:^1.0.7" - get-intrinsic: "npm:^1.2.4" - checksum: 10c0/8ad6141b6a400e7ce7c7442a13928c676d07b1f315ab77d9912920bf5f4170622f43126f111615788f26c3b1871158a6797c862233124507db0bcc33a9537d1a - languageName: node - linkType: hard - -"is-wsl@npm:^3.1.0": - version: 3.1.0 - resolution: "is-wsl@npm:3.1.0" - dependencies: - is-inside-container: "npm:^1.0.0" - checksum: 10c0/d3317c11995690a32c362100225e22ba793678fe8732660c6de511ae71a0ff05b06980cf21f98a6bf40d7be0e9e9506f859abe00a1118287d63e53d0a3d06947 - languageName: node - linkType: hard - -"is64bit@npm:^2.0.0": - version: 2.0.0 - resolution: "is64bit@npm:2.0.0" - dependencies: - system-architecture: "npm:^0.1.0" - checksum: 10c0/9f3741d4b7560e2a30b9ce0c79bb30c7bdcc5df77c897bd59bb68f0fd882ae698015e8da81d48331def66c778d430c1ae3cb8c1fcc34e96c576b66198395faa7 - languageName: node - linkType: hard - -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd - languageName: node - linkType: hard - -"isarray@npm:~1.0.0": - version: 1.0.0 - resolution: "isarray@npm:1.0.0" - checksum: 10c0/18b5be6669be53425f0b84098732670ed4e727e3af33bc7f948aac01782110eb9a18b3b329c5323bcdd3acdaae547ee077d3951317e7f133bff7105264b3003d - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - -"isomorphic-ws@npm:^4.0.1": - version: 4.0.1 - resolution: "isomorphic-ws@npm:4.0.1" - peerDependencies: - ws: "*" - checksum: 10c0/7cb90dc2f0eb409825558982fb15d7c1d757a88595efbab879592f9d2b63820d6bbfb5571ab8abe36c715946e165a413a99f6aafd9f40ab1f514d73487bc9996 - languageName: node - linkType: hard - -"istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.2 - resolution: "istanbul-lib-coverage@npm:3.2.2" - checksum: 10c0/6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^5.0.4": - version: 5.2.1 - resolution: "istanbul-lib-instrument@npm:5.2.1" - dependencies: - "@babel/core": "npm:^7.12.3" - "@babel/parser": "npm:^7.14.7" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.2.0" - semver: "npm:^6.3.0" - checksum: 10c0/8a1bdf3e377dcc0d33ec32fe2b6ecacdb1e4358fd0eb923d4326bb11c67622c0ceb99600a680f3dad5d29c66fc1991306081e339b4d43d0b8a2ab2e1d910a6ee - languageName: node - linkType: hard - -"iterator.prototype@npm:^1.1.2": - version: 1.1.2 - resolution: "iterator.prototype@npm:1.1.2" - dependencies: - define-properties: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - reflect.getprototypeof: "npm:^1.0.4" - set-function-name: "npm:^2.0.1" - checksum: 10c0/a32151326095e916f306990d909f6bbf23e3221999a18ba686419535dcd1749b10ded505e89334b77dc4c7a58a8508978f0eb16c2c8573e6d412eb7eb894ea79 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 - languageName: node - linkType: hard - -"jest-haste-map@npm:^28.1.3": - version: 28.1.3 - resolution: "jest-haste-map@npm:28.1.3" - dependencies: - "@jest/types": "npm:^28.1.3" - "@types/graceful-fs": "npm:^4.1.3" - "@types/node": "npm:*" - anymatch: "npm:^3.0.3" - fb-watchman: "npm:^2.0.0" - fsevents: "npm:^2.3.2" - graceful-fs: "npm:^4.2.9" - jest-regex-util: "npm:^28.0.2" - jest-util: "npm:^28.1.3" - jest-worker: "npm:^28.1.3" - micromatch: "npm:^4.0.4" - walker: "npm:^1.0.8" - dependenciesMeta: - fsevents: - optional: true - checksum: 10c0/6a2beedd31f5d67b508d57fbfdd8858cfbd2f59a61737fc74cac4b9f60120faeda8c40189afba331324b08e10bc2281521292cdb6713fb3cab7770828f4e83d9 - languageName: node - linkType: hard - -"jest-regex-util@npm:^28.0.2": - version: 28.0.2 - resolution: "jest-regex-util@npm:28.0.2" - checksum: 10c0/d79d255b8a2217bdb0b638cbb5e61a41ab788e62a6217fce5276ab9763c1327b9e0a4f10ebdb230c76848125aa9cc97c8751cfad15db7ec0441d44acfbaf5084 - languageName: node - linkType: hard - -"jest-util@npm:^28.1.3": - version: 28.1.3 - resolution: "jest-util@npm:28.1.3" - dependencies: - "@jest/types": "npm:^28.1.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10c0/7d4946424032a2ccb2ad669905debb44b0bf040dff7a1fe82d283c679ae4638a86ca48d6a276d65a76451252338ad84e76ef2cfde03f577f091fe2b3102aedc9 - languageName: node - linkType: hard - -"jest-worker@npm:^28.1.3": - version: 28.1.3 - resolution: "jest-worker@npm:28.1.3" - dependencies: - "@types/node": "npm:*" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10c0/d6715268fd6c9fd8431987d42e4ae0981dc6352fd7a5c90aadb9c67562dc6161486a98960f5d1bd36dbafb202d8d98a6fdb181711acbc5e55ee6ab85fa94c931 - languageName: node - linkType: hard - -"jiti@npm:^1.21.0": - version: 1.21.6 - resolution: "jiti@npm:1.21.6" - bin: - jiti: bin/jiti.js - checksum: 10c0/05b9ed58cd30d0c3ccd3c98209339e74f50abd9a17e716f65db46b6a35812103f6bde6e134be7124d01745586bca8cc5dae1d0d952267c3ebe55171949c32e56 - languageName: node - linkType: hard - -"js-base64@npm:^3.6.0": - version: 3.7.7 - resolution: "js-base64@npm:3.7.7" - checksum: 10c0/3c905a7e78b601e4751b5e710edd0d6d045ce2d23eb84c9df03515371e1b291edc72808dc91e081cb9855aef6758292a2407006f4608ec3705373dd8baf2f80f - languageName: node - linkType: hard - -"js-sdsl@npm:^4.1.4": - version: 4.4.2 - resolution: "js-sdsl@npm:4.4.2" - checksum: 10c0/50707728fc31642164f4d83c8087f3750aaa99c450b008b19e236a1f190c9e48f9fc799615c341f9ca2c0803b15ab6f48d92a9cc3e6ffd20065cba7d7e742b92 - languageName: node - linkType: hard - -"js-sha3@npm:0.8.0": - version: 0.8.0 - resolution: "js-sha3@npm:0.8.0" - checksum: 10c0/43a21dc7967c871bd2c46cb1c2ae97441a97169f324e509f382d43330d8f75cf2c96dba7c806ab08a425765a9c847efdd4bffbac2d99c3a4f3de6c0218f40533 - languageName: node - linkType: hard - -"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": - version: 4.0.0 - resolution: "js-tokens@npm:4.0.0" - checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed - languageName: node - linkType: hard - -"js-yaml@npm:^3.13.1": - version: 3.14.1 - resolution: "js-yaml@npm:3.14.1" - dependencies: - argparse: "npm:^1.0.7" - esprima: "npm:^4.0.0" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b - languageName: node - linkType: hard - -"js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f - languageName: node - linkType: hard - -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 - languageName: node - linkType: hard - -"jscrypto@npm:^1.0.1": - version: 1.0.3 - resolution: "jscrypto@npm:1.0.3" - bin: - jscrypto: bin/cli.js - checksum: 10c0/9af6d4db4284d27a43b1228d2d510582fc650f53f6732a16a27d624c9fe28e87e68a7fde5ea2ca12c5d5748ba828715785dea75682f16781ee1e061f1faa505d - languageName: node - linkType: hard - -"jsesc@npm:^2.5.1": - version: 2.5.2 - resolution: "jsesc@npm:2.5.2" - bin: - jsesc: bin/jsesc - checksum: 10c0/dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 - languageName: node - linkType: hard - -"jsesc@npm:~0.5.0": - version: 0.5.0 - resolution: "jsesc@npm:0.5.0" - bin: - jsesc: bin/jsesc - checksum: 10c0/f93792440ae1d80f091b65f8ceddf8e55c4bb7f1a09dee5dcbdb0db5612c55c0f6045625aa6b7e8edb2e0a4feabd80ee48616dbe2d37055573a84db3d24f96d9 - languageName: node - linkType: hard - -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^2.3.0": - version: 2.3.1 - resolution: "json-parse-even-better-errors@npm:2.3.1" - checksum: 10c0/140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 - languageName: node - linkType: hard - -"json-rpc-engine@npm:^6.1.0": - version: 6.1.0 - resolution: "json-rpc-engine@npm:6.1.0" - dependencies: - "@metamask/safe-event-emitter": "npm:^2.0.0" - eth-rpc-errors: "npm:^4.0.2" - checksum: 10c0/29c480f88152b1987ab0f58f9242ee163d5a7e95cd0d8ae876c08b21657022b82f6008f5eecd048842fb7f6fc3b4e364fde99ca620458772b6abd1d2c1e020d5 - languageName: node - linkType: hard - -"json-rpc-middleware-stream@npm:^4.2.1": - version: 4.2.3 - resolution: "json-rpc-middleware-stream@npm:4.2.3" - dependencies: - "@metamask/safe-event-emitter": "npm:^3.0.0" - json-rpc-engine: "npm:^6.1.0" - readable-stream: "npm:^2.3.3" - checksum: 10c0/d21b86e79b5711c99f4211a4f129c9c24817ea372945cae8ea1425285680e71ff8d0638d4d8738fe480a56baa7f8cd7f9a8330b43b81a0719e522bd5d80567c7 - languageName: node - linkType: hard - -"json-schema-ref-parser@npm:^9.0.6": - version: 9.0.9 - resolution: "json-schema-ref-parser@npm:9.0.9" - dependencies: - "@apidevtools/json-schema-ref-parser": "npm:9.0.9" - checksum: 10c0/c6602a4e4f003629819a83540520850f3a06cb49a738d273854e4e2d8ebabb51b80cfc17d66cfc00ccadcb3a4c33eedf85b26b0af3b2c142f68f9f9dd5531a9c - languageName: node - linkType: hard - -"json-schema-to-typescript@npm:10.1.5": - version: 10.1.5 - resolution: "json-schema-to-typescript@npm:10.1.5" - dependencies: - "@types/json-schema": "npm:^7.0.6" - "@types/lodash": "npm:^4.14.168" - "@types/prettier": "npm:^2.1.5" - cli-color: "npm:^2.0.0" - get-stdin: "npm:^8.0.0" - glob: "npm:^7.1.6" - glob-promise: "npm:^3.4.0" - is-glob: "npm:^4.0.1" - json-schema-ref-parser: "npm:^9.0.6" - json-stringify-safe: "npm:^5.0.1" - lodash: "npm:^4.17.20" - minimist: "npm:^1.2.5" - mkdirp: "npm:^1.0.4" - mz: "npm:^2.7.0" - prettier: "npm:^2.2.0" - bin: - json2ts: dist/src/cli.js - checksum: 10c0/948e450a9f495d399cc2999247c32e6446c1a7987f987339e5b3fa07bca6eaecb005837ac05820b27245cd1d2078049de6512cb5d4f4293f8c74c02ff439569d - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - -"json-stringify-safe@npm:^5.0.1": - version: 5.0.1 - resolution: "json-stringify-safe@npm:5.0.1" - checksum: 10c0/7dbf35cd0411d1d648dceb6d59ce5857ec939e52e4afc37601aa3da611f0987d5cee5b38d58329ceddf3ed48bd7215229c8d52059ab01f2444a338bf24ed0f37 - languageName: node - linkType: hard - -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10c0/9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f - languageName: node - linkType: hard - -"json5@npm:^2.2.1, json5@npm:^2.2.2, json5@npm:^2.2.3": - version: 2.2.3 - resolution: "json5@npm:2.2.3" - bin: - json5: lib/cli.js - checksum: 10c0/5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c - languageName: node - linkType: hard - -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": - version: 3.3.5 - resolution: "jsx-ast-utils@npm:3.3.5" - dependencies: - array-includes: "npm:^3.1.6" - array.prototype.flat: "npm:^1.3.1" - object.assign: "npm:^4.1.4" - object.values: "npm:^1.1.6" - checksum: 10c0/a32679e9cb55469cb6d8bbc863f7d631b2c98b7fc7bf172629261751a6e7bc8da6ae374ddb74d5fbd8b06cf0eb4572287b259813d92b36e384024ed35e4c13e1 - languageName: node - linkType: hard - -"keccak256@npm:^1.0.6": - version: 1.0.6 - resolution: "keccak256@npm:1.0.6" - dependencies: - bn.js: "npm:^5.2.0" - buffer: "npm:^6.0.3" - keccak: "npm:^3.0.2" - checksum: 10c0/2a3f1e281ffd65bcbbae2ee8d62e27f0336efe6f16b7ed9932ad642ed398da62ccbc3d38dcdf43bd2fad9885f02df501dc77a900c358644df296396ed194056f - languageName: node - linkType: hard - -"keccak@npm:^3.0.2": - version: 3.0.4 - resolution: "keccak@npm:3.0.4" - dependencies: - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - readable-stream: "npm:^3.6.0" - checksum: 10c0/153525c1c1f770beadb8f8897dec2f1d2dcbee11d063fe5f61957a5b236bfd3d2a111ae2727e443aa6a848df5edb98b9ef237c78d56df49087b0ca8a232ca9cd - languageName: node - linkType: hard - -"keypress@npm:0.1.x": - version: 0.1.0 - resolution: "keypress@npm:0.1.0" - checksum: 10c0/0d6c1921fc92a8b0c1f8dd4845f7b764579a9ac69aa489b9eba60c4fb83f2f7983749534b37f1052b5244a3956d027d8b170aea5c4f24c8dda67b74fa9049a11 - languageName: node - linkType: hard - -"keyv@npm:^4.5.3": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - -"keyvaluestorage-interface@npm:^1.0.0": - version: 1.0.0 - resolution: "keyvaluestorage-interface@npm:1.0.0" - checksum: 10c0/0e028ebeda79a4e48c7e36708dbe7ced233c7a1f1bc925e506f150dd2ce43178bee8d20361c445bd915569709d9dc9ea80063b4d3c3cf5d615ab43aa31d3ec3d - languageName: node - linkType: hard - -"kleur@npm:^4.0.3": - version: 4.1.5 - resolution: "kleur@npm:4.1.5" - checksum: 10c0/e9de6cb49657b6fa70ba2d1448fd3d691a5c4370d8f7bbf1c2f64c24d461270f2117e1b0afe8cb3114f13bbd8e51de158c2a224953960331904e636a5e4c0f2a - languageName: node - linkType: hard - -"language-subtag-registry@npm:^0.3.20": - version: 0.3.23 - resolution: "language-subtag-registry@npm:0.3.23" - checksum: 10c0/e9b05190421d2cd36dd6c95c28673019c927947cb6d94f40ba7e77a838629ee9675c94accf897fbebb07923187deb843b8fbb8935762df6edafe6c28dcb0b86c - languageName: node - linkType: hard - -"language-tags@npm:^1.0.9": - version: 1.0.9 - resolution: "language-tags@npm:1.0.9" - dependencies: - language-subtag-registry: "npm:^0.3.20" - checksum: 10c0/9ab911213c4bd8bd583c850201c17794e52cb0660d1ab6e32558aadc8324abebf6844e46f92b80a5d600d0fbba7eface2c207bfaf270a1c7fd539e4c3a880bff - languageName: node - linkType: hard - -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - -"libsodium-sumo@npm:^0.7.15": - version: 0.7.15 - resolution: "libsodium-sumo@npm:0.7.15" - checksum: 10c0/5a1437ccff03c72669e7b49da702034e171df9ff6a4e65698297ab63ad0bf8f889d3dd51494e29418c643143526d8d7f08cbba3929d220334cddbe3e74a1560e - languageName: node - linkType: hard - -"libsodium-wrappers-sumo@npm:^0.7.11": - version: 0.7.15 - resolution: "libsodium-wrappers-sumo@npm:0.7.15" - dependencies: - libsodium-sumo: "npm:^0.7.15" - checksum: 10c0/6da919a13395346d54f2ce4841adda8feb3fbb8a8c378ec5c93b7e6dc6353b379289349e659f3e017a9f1995ef396bf43f89c7ab4aab4e3b5ed85df62407d810 - languageName: node - linkType: hard - -"libsodium-wrappers@npm:^0.7.6": - version: 0.7.15 - resolution: "libsodium-wrappers@npm:0.7.15" - dependencies: - libsodium: "npm:^0.7.15" - checksum: 10c0/852c4879f3b3c48332fe704454c4dfc2a1387f9f3930faf84d8626c9670f93365e56aa186d14e2995e5d352f08af07c99c06a2c26d5f44818039f1014d404171 - languageName: node - linkType: hard - -"libsodium@npm:^0.7.15": - version: 0.7.15 - resolution: "libsodium@npm:0.7.15" - checksum: 10c0/7bdb529681f30be0533f33921509c36823d18f6fc158d66842e50d33cd9635ebb0dd02eb1fe3b51e192996ff173949f846793e10103371c8b179e5c29525556c - languageName: node - linkType: hard - -"lines-and-columns@npm:^1.1.6": - version: 1.2.4 - resolution: "lines-and-columns@npm:1.2.4" - checksum: 10c0/3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d - languageName: node - linkType: hard - -"listhen@npm:^1.7.2": - version: 1.7.2 - resolution: "listhen@npm:1.7.2" - dependencies: - "@parcel/watcher": "npm:^2.4.1" - "@parcel/watcher-wasm": "npm:^2.4.1" - citty: "npm:^0.1.6" - clipboardy: "npm:^4.0.0" - consola: "npm:^3.2.3" - crossws: "npm:^0.2.0" - defu: "npm:^6.1.4" - get-port-please: "npm:^3.1.2" - h3: "npm:^1.10.2" - http-shutdown: "npm:^1.2.2" - jiti: "npm:^1.21.0" - mlly: "npm:^1.6.1" - node-forge: "npm:^1.3.1" - pathe: "npm:^1.1.2" - std-env: "npm:^3.7.0" - ufo: "npm:^1.4.0" - untun: "npm:^0.1.3" - uqr: "npm:^0.1.2" - bin: - listen: bin/listhen.mjs - listhen: bin/listhen.mjs - checksum: 10c0/cd4d0651686b88c61a5bd5d5afc03feb99e352eb7862260112010655cf7997fb3356e61317f09555e2b7412175ae05265fc9e97458aa014586bf9fa4ab22bd5a - languageName: node - linkType: hard - -"locate-path@npm:^5.0.0": - version: 5.0.0 - resolution: "locate-path@npm:5.0.0" - dependencies: - p-locate: "npm:^4.1.0" - checksum: 10c0/33a1c5247e87e022f9713e6213a744557a3e9ec32c5d0b5efb10aa3a38177615bf90221a5592674857039c1a0fd2063b82f285702d37b792d973e9e72ace6c59 - languageName: node - linkType: hard - -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" - dependencies: - p-locate: "npm:^5.0.0" - checksum: 10c0/d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3 - languageName: node - linkType: hard - -"lodash.debounce@npm:^4.0.8": - version: 4.0.8 - resolution: "lodash.debounce@npm:4.0.8" - checksum: 10c0/762998a63e095412b6099b8290903e0a8ddcb353ac6e2e0f2d7e7d03abd4275fe3c689d88960eb90b0dde4f177554d51a690f22a343932ecbc50a5d111849987 - languageName: node - linkType: hard - -"lodash.isequal@npm:4.5.0": - version: 4.5.0 - resolution: "lodash.isequal@npm:4.5.0" - checksum: 10c0/dfdb2356db19631a4b445d5f37868a095e2402292d59539a987f134a8778c62a2810c2452d11ae9e6dcac71fc9de40a6fedcb20e2952a15b431ad8b29e50e28f - languageName: node - linkType: hard - -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - -"lodash.mergewith@npm:4.6.2": - version: 4.6.2 - resolution: "lodash.mergewith@npm:4.6.2" - checksum: 10c0/4adbed65ff96fd65b0b3861f6899f98304f90fd71e7f1eb36c1270e05d500ee7f5ec44c02ef979b5ddbf75c0a0b9b99c35f0ad58f4011934c4d4e99e5200b3b5 - languageName: node - linkType: hard - -"lodash@npm:^4.17.12, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.3.0": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c - languageName: node - linkType: hard - -"long@npm:^3 || ^4 || ^5, long@npm:^5.2.0, long@npm:^5.2.1, long@npm:^5.2.3": - version: 5.2.3 - resolution: "long@npm:5.2.3" - checksum: 10c0/6a0da658f5ef683b90330b1af76f06790c623e148222da9d75b60e266bbf88f803232dd21464575681638894a84091616e7f89557aa087fd14116c0f4e0e43d9 - languageName: node - linkType: hard - -"long@npm:^4.0.0": - version: 4.0.0 - resolution: "long@npm:4.0.0" - checksum: 10c0/50a6417d15b06104dbe4e3d4a667c39b137f130a9108ea8752b352a4cfae047531a3ac351c181792f3f8768fe17cca6b0f406674a541a86fb638aaac560d83ed - languageName: node - linkType: hard - -"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": - version: 1.4.0 - resolution: "loose-envify@npm:1.4.0" - dependencies: - js-tokens: "npm:^3.0.0 || ^4.0.0" - bin: - loose-envify: cli.js - checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e - languageName: node - linkType: hard - -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0, lru-cache@npm:^10.4.3": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - -"lru-cache@npm:^5.1.1": - version: 5.1.1 - resolution: "lru-cache@npm:5.1.1" - dependencies: - yallist: "npm:^3.0.2" - checksum: 10c0/89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482 - languageName: node - linkType: hard - -"lru-queue@npm:^0.1.0": - version: 0.1.0 - resolution: "lru-queue@npm:0.1.0" - dependencies: - es5-ext: "npm:~0.10.2" - checksum: 10c0/83517032b46843601c4528be65e8aaf85f5a7860a9cfa3e4f2b5591da436e7cd748d95b450c91434c4ffb75d3ae4c069ddbdd9f71ada56a99a00c03088c51b4d - languageName: node - linkType: hard - -"make-fetch-happen@npm:^13.0.0": - version: 13.0.1 - resolution: "make-fetch-happen@npm:13.0.1" - dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" - http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - proc-log: "npm:^4.2.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10c0/df5f4dbb6d98153b751bccf4dc4cc500de85a96a9331db9805596c46aa9f99d9555983954e6c1266d9f981ae37a9e4647f42b9a4bb5466f867f4012e582c9e7e - languageName: node - linkType: hard - -"makeerror@npm:1.0.12": - version: 1.0.12 - resolution: "makeerror@npm:1.0.12" - dependencies: - tmpl: "npm:1.0.5" - checksum: 10c0/b0e6e599780ce6bab49cc413eba822f7d1f0dfebd1c103eaa3785c59e43e22c59018323cf9e1708f0ef5329e94a745d163fcbb6bff8e4c6742f9be9e86f3500c - languageName: node - linkType: hard - -"md5.js@npm:^1.3.4": - version: 1.3.5 - resolution: "md5.js@npm:1.3.5" - dependencies: - hash-base: "npm:^3.0.0" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/b7bd75077f419c8e013fc4d4dada48be71882e37d69a44af65a2f2804b91e253441eb43a0614423a1c91bb830b8140b0dc906bc797245e2e275759584f4efcc5 - languageName: node - linkType: hard - -"mdast-util-definitions@npm:^5.0.0": - version: 5.1.2 - resolution: "mdast-util-definitions@npm:5.1.2" - dependencies: - "@types/mdast": "npm:^3.0.0" - "@types/unist": "npm:^2.0.0" - unist-util-visit: "npm:^4.0.0" - checksum: 10c0/da9049c15562e44ee4ea4a36113d98c6c9eaa3d8a17d6da2aef6a0626376dcd01d9ec007d77a8dfcad6d0cbd5c32a4abbad72a3f48c3172a55934c7d9a916480 - languageName: node - linkType: hard - -"mdast-util-from-markdown@npm:^1.0.0": - version: 1.3.1 - resolution: "mdast-util-from-markdown@npm:1.3.1" - dependencies: - "@types/mdast": "npm:^3.0.0" - "@types/unist": "npm:^2.0.0" - decode-named-character-reference: "npm:^1.0.0" - mdast-util-to-string: "npm:^3.1.0" - micromark: "npm:^3.0.0" - micromark-util-decode-numeric-character-reference: "npm:^1.0.0" - micromark-util-decode-string: "npm:^1.0.0" - micromark-util-normalize-identifier: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - unist-util-stringify-position: "npm:^3.0.0" - uvu: "npm:^0.5.0" - checksum: 10c0/f4e901bf2a2e93fe35a339e0cff581efacce2f7117cd5652e9a270847bd7e2508b3e717b7b4156af54d4f896d63033e06ff9fafbf59a1d46fe17dd5e2a3f7846 - languageName: node - linkType: hard - -"mdast-util-to-hast@npm:^12.1.0": - version: 12.3.0 - resolution: "mdast-util-to-hast@npm:12.3.0" - dependencies: - "@types/hast": "npm:^2.0.0" - "@types/mdast": "npm:^3.0.0" - mdast-util-definitions: "npm:^5.0.0" - micromark-util-sanitize-uri: "npm:^1.1.0" - trim-lines: "npm:^3.0.0" - unist-util-generated: "npm:^2.0.0" - unist-util-position: "npm:^4.0.0" - unist-util-visit: "npm:^4.0.0" - checksum: 10c0/0753e45bfcce423f7a13979ac720a23ed8d6bafed174c387f43bbe8baf3838f3a043cd8006975b71e5c4068b7948f83f1348acea79801101af31eaec4e7a499a - languageName: node - linkType: hard - -"mdast-util-to-string@npm:^3.1.0": - version: 3.2.0 - resolution: "mdast-util-to-string@npm:3.2.0" - dependencies: - "@types/mdast": "npm:^3.0.0" - checksum: 10c0/112f4bf0f6758dcb95deffdcf37afba7eaecdfe2ee13252de031723094d4d55220e147326690a8b91244758e2d678e7aeb1fdd0fa6ef3317c979bc42effd9a21 - languageName: node - linkType: hard - -"media-query-parser@npm:^2.0.2": - version: 2.0.2 - resolution: "media-query-parser@npm:2.0.2" - dependencies: - "@babel/runtime": "npm:^7.12.5" - checksum: 10c0/91a987e9f6620f5c7d0fcf22bd0a106bbaccdef96aba62c461656ee656e141dd2b60f2f1d99411799183c2ea993bd177ca92c26c08bf321fbc0c846ab391d79c - languageName: node - linkType: hard - -"memoize-one@npm:^6.0.0": - version: 6.0.0 - resolution: "memoize-one@npm:6.0.0" - checksum: 10c0/45c88e064fd715166619af72e8cf8a7a17224d6edf61f7a8633d740ed8c8c0558a4373876c9b8ffc5518c2b65a960266adf403cc215cb1e90f7e262b58991f54 - languageName: node - linkType: hard - -"memoizee@npm:^0.4.15": - version: 0.4.17 - resolution: "memoizee@npm:0.4.17" - dependencies: - d: "npm:^1.0.2" - es5-ext: "npm:^0.10.64" - es6-weak-map: "npm:^2.0.3" - event-emitter: "npm:^0.3.5" - is-promise: "npm:^2.2.2" - lru-queue: "npm:^0.1.0" - next-tick: "npm:^1.1.0" - timers-ext: "npm:^0.1.7" - checksum: 10c0/19821d055f0f641e79b718f91d6d89a6c92840643234a6f4e91d42aa330e8406f06c47d3828931e177c38830aa9b959710e5b7f0013be452af46d0f9eae4baf4 - languageName: node - linkType: hard - -"merge-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "merge-stream@npm:2.0.0" - checksum: 10c0/867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 - languageName: node - linkType: hard - -"merge2@npm:^1.3.0, merge2@npm:^1.4.1": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"micromark-core-commonmark@npm:^1.0.1": - version: 1.1.0 - resolution: "micromark-core-commonmark@npm:1.1.0" - dependencies: - decode-named-character-reference: "npm:^1.0.0" - micromark-factory-destination: "npm:^1.0.0" - micromark-factory-label: "npm:^1.0.0" - micromark-factory-space: "npm:^1.0.0" - micromark-factory-title: "npm:^1.0.0" - micromark-factory-whitespace: "npm:^1.0.0" - micromark-util-character: "npm:^1.0.0" - micromark-util-chunked: "npm:^1.0.0" - micromark-util-classify-character: "npm:^1.0.0" - micromark-util-html-tag-name: "npm:^1.0.0" - micromark-util-normalize-identifier: "npm:^1.0.0" - micromark-util-resolve-all: "npm:^1.0.0" - micromark-util-subtokenize: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.1" - uvu: "npm:^0.5.0" - checksum: 10c0/b3bf7b7004ce7dbb3ae151dcca4db1d12546f1b943affb2418da4b90b9ce59357373c433ee2eea4c868aee0791dafa355aeed19f5ef2b0acaf271f32f1ecbe6a - languageName: node - linkType: hard - -"micromark-factory-destination@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-factory-destination@npm:1.1.0" - dependencies: - micromark-util-character: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/71ebd9089bf0c9689b98ef42215c04032ae2701ae08c3546b663628553255dca18e5310dbdacddad3acd8de4f12a789835fff30dadc4da3c4e30387a75e6b488 - languageName: node - linkType: hard - -"micromark-factory-label@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-factory-label@npm:1.1.0" - dependencies: - micromark-util-character: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - uvu: "npm:^0.5.0" - checksum: 10c0/5e2cd2d8214bb92a34dfcedf9c7aecf565e3648650a3a6a0495ededf15f2318dd214dc069e3026402792cd5839d395313f8ef9c2e86ca34a8facaa0f75a77753 - languageName: node - linkType: hard - -"micromark-factory-space@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-factory-space@npm:1.1.0" - dependencies: - micromark-util-character: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/3da81187ce003dd4178c7adc4674052fb8befc8f1a700ae4c8227755f38581a4ae963866dc4857488d62d1dc9837606c9f2f435fa1332f62a0f1c49b83c6a822 - languageName: node - linkType: hard - -"micromark-factory-title@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-factory-title@npm:1.1.0" - dependencies: - micromark-factory-space: "npm:^1.0.0" - micromark-util-character: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/cf8c687d1d5c3928846a4791d4a7e2f1d7bdd2397051e20d60f06b7565a48bf85198ab6f85735e997ab3f0cbb80b8b6391f4f7ebc0aae2f2f8c3a08541257bf6 - languageName: node - linkType: hard - -"micromark-factory-whitespace@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-factory-whitespace@npm:1.1.0" - dependencies: - micromark-factory-space: "npm:^1.0.0" - micromark-util-character: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/7248cc4534f9befb38c6f398b6e38efd3199f1428fc214c9cb7ed5b6e9fa7a82c0d8cdfa9bcacde62887c9a7c8c46baf5c318b2ae8f701afbccc8ad702e92dce - languageName: node - linkType: hard - -"micromark-util-character@npm:^1.0.0": - version: 1.2.0 - resolution: "micromark-util-character@npm:1.2.0" - dependencies: - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/3390a675a50731b58a8e5493cd802e190427f10fa782079b455b00f6b54e406e36882df7d4a3bd32b709f7a2c3735b4912597ebc1c0a99566a8d8d0b816e2cd4 - languageName: node - linkType: hard - -"micromark-util-chunked@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-chunked@npm:1.1.0" - dependencies: - micromark-util-symbol: "npm:^1.0.0" - checksum: 10c0/59534cf4aaf481ed58d65478d00eae0080df9b5816673f79b5ddb0cea263e5a9ee9cbb6cc565daf1eb3c8c4ff86fc4e25d38a0577539655cda823a4249efd358 - languageName: node - linkType: hard - -"micromark-util-classify-character@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-classify-character@npm:1.1.0" - dependencies: - micromark-util-character: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/3266453dc0fdaf584e24c9b3c91d1ed180f76b5856699c51fd2549305814fcab7ec52afb4d3e83d002a9115cd2d2b2ffdc9c0b38ed85120822bf515cc00636ec - languageName: node - linkType: hard - -"micromark-util-combine-extensions@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-combine-extensions@npm:1.1.0" - dependencies: - micromark-util-chunked: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/0bc572fab3fe77f533c29aa1b75cb847b9fc9455f67a98623ef9740b925c0b0426ad9f09bbb56f1e844ea9ebada7873d1f06d27f7c979a917692b273c4b69e31 - languageName: node - linkType: hard - -"micromark-util-decode-numeric-character-reference@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-decode-numeric-character-reference@npm:1.1.0" - dependencies: - micromark-util-symbol: "npm:^1.0.0" - checksum: 10c0/64ef2575e3fc2426976c19e16973348f20b59ddd5543f1467ac2e251f29e0a91f12089703d29ae985b0b9a408ee0d72f06d04ed3920811aa2402aabca3bdf9e4 - languageName: node - linkType: hard - -"micromark-util-decode-string@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-decode-string@npm:1.1.0" - dependencies: - decode-named-character-reference: "npm:^1.0.0" - micromark-util-character: "npm:^1.0.0" - micromark-util-decode-numeric-character-reference: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - checksum: 10c0/757a0aaa5ad6c50c7480bd75371d407ac75f5022cd4404aba07adadf1448189502aea9bb7b2d09d25e18745e0abf72b95506b6beb184bcccabe919e48e3a5df7 - languageName: node - linkType: hard - -"micromark-util-encode@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-encode@npm:1.1.0" - checksum: 10c0/9878c9bc96999d45626a7597fffac85348ea842dce75d2417345cbf070a9941c62477bd0963bef37d4f0fd29f2982be6ddf416d62806f00ccb334af9d6ee87e7 - languageName: node - linkType: hard - -"micromark-util-html-tag-name@npm:^1.0.0": - version: 1.2.0 - resolution: "micromark-util-html-tag-name@npm:1.2.0" - checksum: 10c0/15421869678d36b4fe51df453921e8186bff514a14e9f79f32b7e1cdd67874e22a66ad34a7f048dd132cbbbfc7c382ae2f777a2bfd1f245a47705dc1c6d4f199 - languageName: node - linkType: hard - -"micromark-util-normalize-identifier@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-normalize-identifier@npm:1.1.0" - dependencies: - micromark-util-symbol: "npm:^1.0.0" - checksum: 10c0/a9657321a2392584e4d978061882117a84db7d2c2c1c052c0f5d25da089d463edb9f956d5beaf7f5768984b6f72d046d59b5972951ec7bf25397687a62b8278a - languageName: node - linkType: hard - -"micromark-util-resolve-all@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-resolve-all@npm:1.1.0" - dependencies: - micromark-util-types: "npm:^1.0.0" - checksum: 10c0/b5c95484c06e87bbbb60d8430eb030a458733a5270409f4c67892d1274737087ca6a7ca888987430e57cf1dcd44bb16390d3b3936a2bf07f7534ec8f52ce43c9 - languageName: node - linkType: hard - -"micromark-util-sanitize-uri@npm:^1.0.0, micromark-util-sanitize-uri@npm:^1.1.0": - version: 1.2.0 - resolution: "micromark-util-sanitize-uri@npm:1.2.0" - dependencies: - micromark-util-character: "npm:^1.0.0" - micromark-util-encode: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - checksum: 10c0/dbdb98248e9f0408c7a00f1c1cd805775b41d213defd659533835f34b38da38e8f990bf7b3f782e96bffbc549aec9c3ecdab197d4ad5adbfe08f814a70327b6e - languageName: node - linkType: hard - -"micromark-util-subtokenize@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-subtokenize@npm:1.1.0" - dependencies: - micromark-util-chunked: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.0" - uvu: "npm:^0.5.0" - checksum: 10c0/f292b1b162845db50d36255c9d4c4c6d47931fbca3ac98a80c7e536d2163233fd662f8ca0479ee2b80f145c66a1394c7ed17dfce801439741211015e77e3901e - languageName: node - linkType: hard - -"micromark-util-symbol@npm:^1.0.0": - version: 1.1.0 - resolution: "micromark-util-symbol@npm:1.1.0" - checksum: 10c0/10ceaed33a90e6bfd3a5d57053dbb53f437d4809cc11430b5a09479c0ba601577059be9286df4a7eae6e350a60a2575dc9fa9d9872b5b8d058c875e075c33803 - languageName: node - linkType: hard - -"micromark-util-types@npm:^1.0.0, micromark-util-types@npm:^1.0.1": - version: 1.1.0 - resolution: "micromark-util-types@npm:1.1.0" - checksum: 10c0/a9749cb0a12a252ff536baabcb7012421b6fad4d91a5fdd80d7b33dc7b4c22e2d0c4637dfe5b902d00247fe6c9b01f4a24fce6b572b16ccaa4da90e6ce2a11e4 - languageName: node - linkType: hard - -"micromark@npm:^3.0.0": - version: 3.2.0 - resolution: "micromark@npm:3.2.0" - dependencies: - "@types/debug": "npm:^4.0.0" - debug: "npm:^4.0.0" - decode-named-character-reference: "npm:^1.0.0" - micromark-core-commonmark: "npm:^1.0.1" - micromark-factory-space: "npm:^1.0.0" - micromark-util-character: "npm:^1.0.0" - micromark-util-chunked: "npm:^1.0.0" - micromark-util-combine-extensions: "npm:^1.0.0" - micromark-util-decode-numeric-character-reference: "npm:^1.0.0" - micromark-util-encode: "npm:^1.0.0" - micromark-util-normalize-identifier: "npm:^1.0.0" - micromark-util-resolve-all: "npm:^1.0.0" - micromark-util-sanitize-uri: "npm:^1.0.0" - micromark-util-subtokenize: "npm:^1.0.0" - micromark-util-symbol: "npm:^1.0.0" - micromark-util-types: "npm:^1.0.1" - uvu: "npm:^0.5.0" - checksum: 10c0/f243e805d1b3cc699fddae2de0b1492bc82462f1a709d7ae5c82039f88b1e009c959100184717e748be057b5f88603289d5681679a4e6fbabcd037beb34bc744 - languageName: node - linkType: hard - -"micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"miller-rabin@npm:^4.0.0": - version: 4.0.1 - resolution: "miller-rabin@npm:4.0.1" - dependencies: - bn.js: "npm:^4.0.0" - brorand: "npm:^1.0.1" - bin: - miller-rabin: bin/miller-rabin - checksum: 10c0/26b2b96f6e49dbcff7faebb78708ed2f5f9ae27ac8cbbf1d7c08f83cf39bed3d418c0c11034dce997da70d135cc0ff6f3a4c15dc452f8e114c11986388a64346 - languageName: node - linkType: hard - -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - -"mime-types@npm:^2.1.12": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - -"mime@npm:^3.0.0": - version: 3.0.0 - resolution: "mime@npm:3.0.0" - bin: - mime: cli.js - checksum: 10c0/402e792a8df1b2cc41cb77f0dcc46472b7944b7ec29cb5bbcd398624b6b97096728f1239766d3fdeb20551dd8d94738344c195a6ea10c4f906eb0356323b0531 - languageName: node - linkType: hard - -"mimic-fn@npm:^1.0.0": - version: 1.2.0 - resolution: "mimic-fn@npm:1.2.0" - checksum: 10c0/ad55214aec6094c0af4c0beec1a13787556f8116ed88807cf3f05828500f21f93a9482326bcd5a077ae91e3e8795b4e76b5b4c8bb12237ff0e4043a365516cba - languageName: node - linkType: hard - -"mimic-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-fn@npm:4.0.0" - checksum: 10c0/de9cc32be9996fd941e512248338e43407f63f6d497abe8441fa33447d922e927de54d4cc3c1a3c6d652857acd770389d5a3823f311a744132760ce2be15ccbf - languageName: node - linkType: hard - -"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-assert@npm:1.0.1" - checksum: 10c0/96730e5601cd31457f81a296f521eb56036e6f69133c0b18c13fe941109d53ad23a4204d946a0d638d7f3099482a0cec8c9bb6d642604612ce43ee536be3dddd - languageName: node - linkType: hard - -"minimalistic-crypto-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-crypto-utils@npm:1.0.1" - checksum: 10c0/790ecec8c5c73973a4fbf2c663d911033e8494d5fb0960a4500634766ab05d6107d20af896ca2132e7031741f19888154d44b2408ada0852446705441383e9f8 - languageName: node - linkType: hard - -"minimatch@npm:5.1.0": - version: 5.1.0 - resolution: "minimatch@npm:5.1.0" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/21c4877438068da0728eeb678107ea716fd3c76fcde713c9d11b01d7d15c276071aa2fecfcd353b970a290cffd572c3ed43e0a64804470ab9ae97717ed13fb18 - languageName: node - linkType: hard - -"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - -"minimatch@npm:^5.0.1": - version: 5.1.6 - resolution: "minimatch@npm:5.1.6" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/3defdfd230914f22a8da203747c42ee3c405c39d4d37ffda284dac5e45b7e1f6c49aa8be606509002898e73091ff2a3bbfc59c2c6c71d4660609f63aa92f98e3 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - -"minimist@npm:1.2.6": - version: 1.2.6 - resolution: "minimist@npm:1.2.6" - checksum: 10c0/d0b566204044481c4401abbd24cc75814e753b37268e7fe7ccc78612bf3e37bf1e45a6c43fb0b119445ea1c413c000bde013f320b7211974f2f49bcbec1d0dbf - languageName: node - linkType: hard - -"minimist@npm:1.2.8, minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 - languageName: node - linkType: hard - -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e - languageName: node - linkType: hard - -"minipass-fetch@npm:^3.0.0": - version: 3.0.5 - resolution: "minipass-fetch@npm:3.0.5" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/9d702d57f556274286fdd97e406fc38a2f5c8d15e158b498d7393b1105974b21249289ec571fa2b51e038a4872bfc82710111cf75fae98c662f3d6f95e72152b - languageName: node - linkType: hard - -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd - languageName: node - linkType: hard - -"minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 - languageName: node - linkType: hard - -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb - languageName: node - linkType: hard - -"minipass@npm:^3.0.0": - version: 3.3.6 - resolution: "minipass@npm:3.3.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c - languageName: node - linkType: hard - -"minipass@npm:^5.0.0": - version: 5.0.0 - resolution: "minipass@npm:5.0.0" - checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - -"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": - version: 2.1.2 - resolution: "minizlib@npm:2.1.2" - dependencies: - minipass: "npm:^3.0.0" - yallist: "npm:^4.0.0" - checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 - languageName: node - linkType: hard - -"mkdirp@npm:1.0.4, mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" - bin: - mkdirp: bin/cmd.js - checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf - languageName: node - linkType: hard - -"mkdirp@npm:3.0.0": - version: 3.0.0 - resolution: "mkdirp@npm:3.0.0" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/67eb134e74f12cb947cd89feef299291fd815359e276c14f96471fdb1f92a2707731d96e5c8482fba47b5f7935066e552d7594cc974bbb9edf2bb49ebc199e64 - languageName: node - linkType: hard - -"mlly@npm:^1.6.1, mlly@npm:^1.7.1": - version: 1.7.1 - resolution: "mlly@npm:1.7.1" - dependencies: - acorn: "npm:^8.11.3" - pathe: "npm:^1.1.2" - pkg-types: "npm:^1.1.1" - ufo: "npm:^1.5.3" - checksum: 10c0/d836a7b0adff4d118af41fb93ad4d9e57f80e694a681185280ba220a4607603c19e86c80f9a6c57512b04280567f2599e3386081705c5b5fd74c9ddfd571d0fa - languageName: node - linkType: hard - -"mobx-react-lite@npm:^3.4.0": - version: 3.4.3 - resolution: "mobx-react-lite@npm:3.4.3" - peerDependencies: - mobx: ^6.1.0 - react: ^16.8.0 || ^17 || ^18 - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - checksum: 10c0/c58692751ac69b4e9fcf840c43b3aac99869b0268aa8ba06189de5737a8ad27b1d3a2ec20699554e7e5a670e6957d22e3cb0f451448491a640240d7b9e98325a - languageName: node - linkType: hard - -"mobx-react@npm:^7.6.0": - version: 7.6.0 - resolution: "mobx-react@npm:7.6.0" - dependencies: - mobx-react-lite: "npm:^3.4.0" - peerDependencies: - mobx: ^6.1.0 - react: ^16.8.0 || ^17 || ^18 - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - checksum: 10c0/60f619edb999b9c66a86baa7ab5cf8b1f3651c85c16f2aa8adf3c0c553d52bc0ec083bbd42e8fe0c785f2435a7b1afdf20f103553b80bbf6d28616f160baa144 - languageName: node - linkType: hard - -"mobx@npm:^6.1.7, mobx@npm:^6.7.0": - version: 6.13.1 - resolution: "mobx@npm:6.13.1" - checksum: 10c0/5c1933b6d36bab9f253ec252f42ec3ff4b76d8b3d416a2a3948d097d7aca1eea773a4fa483437409754e60fbed9903432e1f26cc69aae74151750b0052d55cc5 - languageName: node - linkType: hard - -"modern-ahocorasick@npm:^1.0.0": - version: 1.0.1 - resolution: "modern-ahocorasick@npm:1.0.1" - checksum: 10c0/90ef4516ba8eef136d0cd4949faacdadee02217b8e25deda2881054ca8fcc32b985ef159b6e794c40e11c51040303c8e2975b20b23b86ec8a2a63516bbf93add - languageName: node - linkType: hard - -"mri@npm:^1.1.0, mri@npm:^1.2.0": - version: 1.2.0 - resolution: "mri@npm:1.2.0" - checksum: 10c0/a3d32379c2554cf7351db6237ddc18dc9e54e4214953f3da105b97dc3babe0deb3ffe99cf409b38ea47cc29f9430561ba6b53b24ab8f9ce97a4b50409e4a50e7 - languageName: node - linkType: hard - -"ms@npm:2.1.2": - version: 2.1.2 - resolution: "ms@npm:2.1.2" - checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc - languageName: node - linkType: hard - -"ms@npm:^2.1.1": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 - languageName: node - linkType: hard - -"multiformats@npm:^9.4.2": - version: 9.9.0 - resolution: "multiformats@npm:9.9.0" - checksum: 10c0/1fdb34fd2fb085142665e8bd402570659b50a5fae5994027e1df3add9e1ce1283ed1e0c2584a5c63ac0a58e871b8ee9665c4a99ca36ce71032617449d48aa975 - languageName: node - linkType: hard - -"mute-stream@npm:0.0.7": - version: 0.0.7 - resolution: "mute-stream@npm:0.0.7" - checksum: 10c0/c687cfe99289166fe17dcbd0cf49612c5d267410a7819b654a82df45016967d7b2b0b18b35410edef86de6bb089a00413557dc0182c5e78a4af50ba5d61edb42 - languageName: node - linkType: hard - -"mz@npm:^2.7.0": - version: 2.7.0 - resolution: "mz@npm:2.7.0" - dependencies: - any-promise: "npm:^1.0.0" - object-assign: "npm:^4.0.1" - thenify-all: "npm:^1.0.0" - checksum: 10c0/103114e93f87362f0b56ab5b2e7245051ad0276b646e3902c98397d18bb8f4a77f2ea4a2c9d3ad516034ea3a56553b60d3f5f78220001ca4c404bd711bd0af39 - languageName: node - linkType: hard - -"nan@npm:^2.13.2": - version: 2.20.0 - resolution: "nan@npm:2.20.0" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/75775309a21ad179a55250d62ce47322c33ca03d8ddb5ad4c555bd820dd72484b3c59253dd9f41cc68dd63453ef04017407fbd081a549bc030d977079bb798b7 - languageName: node - linkType: hard - -"nanoid@npm:^3.3.6": - version: 3.3.7 - resolution: "nanoid@npm:3.3.7" - bin: - nanoid: bin/nanoid.cjs - checksum: 10c0/e3fb661aa083454f40500473bb69eedb85dc160e763150b9a2c567c7e9ff560ce028a9f833123b618a6ea742e311138b591910e795614a629029e86e180660f3 - languageName: node - linkType: hard - -"napi-wasm@npm:^1.1.0": - version: 1.1.0 - resolution: "napi-wasm@npm:1.1.0" - checksum: 10c0/074df6b5b72698f07b39ca3c448a3fcbaf8e6e78521f0cb3aefd8c2f059d69eae0e3bfe367b4aa3df1976c25e351e4e52a359f22fb2c379eb6781bfa042f582b - languageName: node - linkType: hard - -"natural-compare@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare@npm:1.4.0" - checksum: 10c0/f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 - languageName: node - linkType: hard - -"negotiator@npm:^0.6.3": - version: 0.6.3 - resolution: "negotiator@npm:0.6.3" - checksum: 10c0/3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 - languageName: node - linkType: hard - -"next-tick@npm:^1.1.0": - version: 1.1.0 - resolution: "next-tick@npm:1.1.0" - checksum: 10c0/3ba80dd805fcb336b4f52e010992f3e6175869c8d88bf4ff0a81d5d66e6049f89993463b28211613e58a6b7fe93ff5ccbba0da18d4fa574b96289e8f0b577f28 - languageName: node - linkType: hard - -"next@npm:^13": - version: 13.5.6 - resolution: "next@npm:13.5.6" - dependencies: - "@next/env": "npm:13.5.6" - "@next/swc-darwin-arm64": "npm:13.5.6" - "@next/swc-darwin-x64": "npm:13.5.6" - "@next/swc-linux-arm64-gnu": "npm:13.5.6" - "@next/swc-linux-arm64-musl": "npm:13.5.6" - "@next/swc-linux-x64-gnu": "npm:13.5.6" - "@next/swc-linux-x64-musl": "npm:13.5.6" - "@next/swc-win32-arm64-msvc": "npm:13.5.6" - "@next/swc-win32-ia32-msvc": "npm:13.5.6" - "@next/swc-win32-x64-msvc": "npm:13.5.6" - "@swc/helpers": "npm:0.5.2" - busboy: "npm:1.6.0" - caniuse-lite: "npm:^1.0.30001406" - postcss: "npm:8.4.31" - styled-jsx: "npm:5.1.1" - watchpack: "npm:2.4.0" - peerDependencies: - "@opentelemetry/api": ^1.1.0 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - dependenciesMeta: - "@next/swc-darwin-arm64": - optional: true - "@next/swc-darwin-x64": - optional: true - "@next/swc-linux-arm64-gnu": - optional: true - "@next/swc-linux-arm64-musl": - optional: true - "@next/swc-linux-x64-gnu": - optional: true - "@next/swc-linux-x64-musl": - optional: true - "@next/swc-win32-arm64-msvc": - optional: true - "@next/swc-win32-ia32-msvc": - optional: true - "@next/swc-win32-x64-msvc": - optional: true - peerDependenciesMeta: - "@opentelemetry/api": - optional: true - sass: - optional: true - bin: - next: dist/bin/next - checksum: 10c0/ef141d7708a432aff8bf080d285c466a83b0c1d008d1c66bbd49652a598f9ac15ef2e69a045f21ba44a5543b595cb945468b5f33e25deae2cc48b4d32be5bcec - languageName: node - linkType: hard - -"nock@npm:13.5.4": - version: 13.5.4 - resolution: "nock@npm:13.5.4" - dependencies: - debug: "npm:^4.1.0" - json-stringify-safe: "npm:^5.0.1" - propagate: "npm:^2.0.0" - checksum: 10c0/9ca47d9d7e4b1f4adf871d7ca12722f8ef1dc7d2b9610b2568f5d9264eae9f424baa24fd9d91da9920b360d641b4243e89de198bd22c061813254a99cc6252af - languageName: node - linkType: hard - -"node-addon-api@npm:^2.0.0": - version: 2.0.2 - resolution: "node-addon-api@npm:2.0.2" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/ade6c097ba829fa4aee1ca340117bb7f8f29fdae7b777e343a9d5cbd548481d1f0894b7b907d23ce615c70d932e8f96154caed95c3fa935cfe8cf87546510f64 - languageName: node - linkType: hard - -"node-addon-api@npm:^7.0.0": - version: 7.1.1 - resolution: "node-addon-api@npm:7.1.1" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/fb32a206276d608037fa1bcd7e9921e177fe992fc610d098aa3128baca3c0050fc1e014fa007e9b3874cf865ddb4f5bd9f43ccb7cbbbe4efaff6a83e920b17e9 - languageName: node - linkType: hard - -"node-fetch-native@npm:^1.6.2, node-fetch-native@npm:^1.6.3, node-fetch-native@npm:^1.6.4": - version: 1.6.4 - resolution: "node-fetch-native@npm:1.6.4" - checksum: 10c0/78334dc6def5d1d95cfe87b33ac76c4833592c5eb84779ad2b0c23c689f9dd5d1cfc827035ada72d6b8b218f717798968c5a99aeff0a1a8bf06657e80592f9c3 - languageName: node - linkType: hard - -"node-fetch@npm:^2.6.12": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" - dependencies: - whatwg-url: "npm:^5.0.0" - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 - languageName: node - linkType: hard - -"node-forge@npm:^1.3.1": - version: 1.3.1 - resolution: "node-forge@npm:1.3.1" - checksum: 10c0/e882819b251a4321f9fc1d67c85d1501d3004b4ee889af822fd07f64de3d1a8e272ff00b689570af0465d65d6bf5074df9c76e900e0aff23e60b847f2a46fbe8 - languageName: node - linkType: hard - -"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": - version: 4.8.1 - resolution: "node-gyp-build@npm:4.8.1" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10c0/e36ca3d2adf2b9cca316695d7687207c19ac6ed326d6d7c68d7112cebe0de4f82d6733dff139132539fcc01cf5761f6c9082a21864ab9172edf84282bc849ce7 - languageName: node - linkType: hard - -"node-gyp@npm:latest": - version: 10.2.0 - resolution: "node-gyp@npm:10.2.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^13.0.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^4.1.0" - semver: "npm:^7.3.5" - tar: "npm:^6.2.1" - which: "npm:^4.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/00630d67dbd09a45aee0a5d55c05e3916ca9e6d427ee4f7bc392d2d3dc5fad7449b21fc098dd38260a53d9dcc9c879b36704a1994235d4707e7271af7e9a835b - languageName: node - linkType: hard - -"node-int64@npm:^0.4.0": - version: 0.4.0 - resolution: "node-int64@npm:0.4.0" - checksum: 10c0/a6a4d8369e2f2720e9c645255ffde909c0fbd41c92ea92a5607fc17055955daac99c1ff589d421eee12a0d24e99f7bfc2aabfeb1a4c14742f6c099a51863f31a - languageName: node - linkType: hard - -"node-releases@npm:^2.0.18": - version: 2.0.18 - resolution: "node-releases@npm:2.0.18" - checksum: 10c0/786ac9db9d7226339e1dc84bbb42007cb054a346bd9257e6aa154d294f01bc6a6cddb1348fa099f079be6580acbb470e3c048effd5f719325abd0179e566fd27 - languageName: node - linkType: hard - -"nopt@npm:^7.0.0": - version: 7.2.1 - resolution: "nopt@npm:7.2.1" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 - languageName: node - linkType: hard - -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": - version: 3.0.0 - resolution: "normalize-path@npm:3.0.0" - checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 - languageName: node - linkType: hard - -"npm-run-path@npm:^5.1.0": - version: 5.3.0 - resolution: "npm-run-path@npm:5.3.0" - dependencies: - path-key: "npm:^4.0.0" - checksum: 10c0/124df74820c40c2eb9a8612a254ea1d557ddfab1581c3e751f825e3e366d9f00b0d76a3c94ecd8398e7f3eee193018622677e95816e8491f0797b21e30b2deba - languageName: node - linkType: hard - -"object-assign@npm:^4.0.1, object-assign@npm:^4.1.1": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.1": - version: 1.13.2 - resolution: "object-inspect@npm:1.13.2" - checksum: 10c0/b97835b4c91ec37b5fd71add84f21c3f1047d1d155d00c0fcd6699516c256d4fcc6ff17a1aced873197fe447f91a3964178fd2a67a1ee2120cdaf60e81a050b4 - languageName: node - linkType: hard - -"object-is@npm:^1.1.5": - version: 1.1.6 - resolution: "object-is@npm:1.1.6" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - checksum: 10c0/506af444c4dce7f8e31f34fc549e2fb8152d6b9c4a30c6e62852badd7f520b579c679af433e7a072f9d78eb7808d230dc12e1cf58da9154dfbf8813099ea0fe0 - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d - languageName: node - linkType: hard - -"object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": - version: 4.1.5 - resolution: "object.assign@npm:4.1.5" - dependencies: - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10c0/60108e1fa2706f22554a4648299b0955236c62b3685c52abf4988d14fffb0e7731e00aa8c6448397e3eb63d087dcc124a9f21e1980f36d0b2667f3c18bacd469 - languageName: node - linkType: hard - -"object.entries@npm:^1.1.8": - version: 1.1.8 - resolution: "object.entries@npm:1.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/db9ea979d2956a3bc26c262da4a4d212d36f374652cc4c13efdd069c1a519c16571c137e2893d1c46e1cb0e15c88fd6419eaf410c945f329f09835487d7e65d3 - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.7, object.fromentries@npm:^2.0.8": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b - languageName: node - linkType: hard - -"object.groupby@npm:^1.0.1": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c - languageName: node - linkType: hard - -"object.values@npm:^1.1.6, object.values@npm:^1.1.7, object.values@npm:^1.2.0": - version: 1.2.0 - resolution: "object.values@npm:1.2.0" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/15809dc40fd6c5529501324fec5ff08570b7d70fb5ebbe8e2b3901afec35cf2b3dc484d1210c6c642cd3e7e0a5e18dd1d6850115337fef46bdae14ab0cb18ac3 - languageName: node - linkType: hard - -"ofetch@npm:^1.3.3": - version: 1.3.4 - resolution: "ofetch@npm:1.3.4" - dependencies: - destr: "npm:^2.0.3" - node-fetch-native: "npm:^1.6.3" - ufo: "npm:^1.5.3" - checksum: 10c0/39855005c3f8aa11c11d3a3b0c4366b67d316da58633f4cf5d4a5af0a61495fd68699f355e70deda70355ead25f27b41c3bde2fdd1d24ce3f85ac79608dd8677 - languageName: node - linkType: hard - -"ohash@npm:^1.1.3": - version: 1.1.3 - resolution: "ohash@npm:1.1.3" - checksum: 10c0/928f5bdbd8cd73f90cf544c0533dbda8e0a42d9b8c7454ab89e64e4d11bc85f85242830b4e107426ce13dc4dd3013286f8f5e0c84abd8942a014b907d9692540 - languageName: node - linkType: hard - -"on-exit-leak-free@npm:^0.2.0": - version: 0.2.0 - resolution: "on-exit-leak-free@npm:0.2.0" - checksum: 10c0/d4e1f0bea59f39aa435baaee7d76955527e245538cffc1d7bb0c165ae85e37f67690aa9272247ced17bad76052afdb45faf5ea304a2248e070202d4554c4e30c - languageName: node - linkType: hard - -"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": - version: 1.4.0 - resolution: "once@npm:1.4.0" - dependencies: - wrappy: "npm:1" - checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 - languageName: node - linkType: hard - -"onetime@npm:^2.0.0": - version: 2.0.1 - resolution: "onetime@npm:2.0.1" - dependencies: - mimic-fn: "npm:^1.0.0" - checksum: 10c0/b4e44a8c34e70e02251bfb578a6e26d6de6eedbed106cd78211d2fd64d28b6281d54924696554e4e966559644243753ac5df73c87f283b0927533d3315696215 - languageName: node - linkType: hard - -"onetime@npm:^6.0.0": - version: 6.0.0 - resolution: "onetime@npm:6.0.0" - dependencies: - mimic-fn: "npm:^4.0.0" - checksum: 10c0/4eef7c6abfef697dd4479345a4100c382d73c149d2d56170a54a07418c50816937ad09500e1ed1e79d235989d073a9bade8557122aee24f0576ecde0f392bb6c - languageName: node - linkType: hard - -"optionator@npm:^0.9.1": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - -"os-tmpdir@npm:~1.0.2": - version: 1.0.2 - resolution: "os-tmpdir@npm:1.0.2" - checksum: 10c0/f438450224f8e2687605a8dd318f0db694b6293c5d835ae509a69e97c8de38b6994645337e5577f5001115470414638978cc49da1cdcc25106dad8738dc69990 - languageName: node - linkType: hard - -"osmojs@npm:^16.5.1": - version: 16.14.0 - resolution: "osmojs@npm:16.14.0" - dependencies: - "@cosmjs/amino": "npm:0.32.3" - "@cosmjs/proto-signing": "npm:0.32.3" - "@cosmjs/stargate": "npm:0.32.3" - "@cosmjs/tendermint-rpc": "npm:0.32.3" - "@cosmology/lcd": "npm:^0.13.3" - checksum: 10c0/c434d1d290677c8e1b8f5ad4bcd617e6a47bbbe87e2cbc43310a3562c474b3266cde6dd03d3bd2058ec33e7153e72059ef1a626c158b9cae1dbc427b7d0eec4f - languageName: node - linkType: hard - -"p-limit@npm:^2.2.0": - version: 2.3.0 - resolution: "p-limit@npm:2.3.0" - dependencies: - p-try: "npm:^2.0.0" - checksum: 10c0/8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 - languageName: node - linkType: hard - -"p-limit@npm:^3.0.2": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: "npm:^0.1.0" - checksum: 10c0/9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a - languageName: node - linkType: hard - -"p-locate@npm:^4.1.0": - version: 4.1.0 - resolution: "p-locate@npm:4.1.0" - dependencies: - p-limit: "npm:^2.2.0" - checksum: 10c0/1b476ad69ad7f6059744f343b26d51ce091508935c1dbb80c4e0a2f397ffce0ca3a1f9f5cd3c7ce19d7929a09719d5c65fe70d8ee289c3f267cd36f2881813e9 - languageName: node - linkType: hard - -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10c0/2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a - languageName: node - linkType: hard - -"p-map@npm:^4.0.0": - version: 4.0.0 - resolution: "p-map@npm:4.0.0" - dependencies: - aggregate-error: "npm:^3.0.0" - checksum: 10c0/592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75 - languageName: node - linkType: hard - -"p-try@npm:^2.0.0": - version: 2.2.0 - resolution: "p-try@npm:2.2.0" - checksum: 10c0/c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f - languageName: node - linkType: hard - -"package-json-from-dist@npm:^1.0.0": - version: 1.0.0 - resolution: "package-json-from-dist@npm:1.0.0" - checksum: 10c0/e3ffaf6ac1040ab6082a658230c041ad14e72fabe99076a2081bb1d5d41210f11872403fc09082daf4387fc0baa6577f96c9c0e94c90c394fd57794b66aa4033 - languageName: node - linkType: hard - -"pako@npm:^0.2.5": - version: 0.2.9 - resolution: "pako@npm:0.2.9" - checksum: 10c0/79c1806ebcf325b60ae599e4d7227c2e346d7b829dc20f5cf24cef07c934079dc3a61c5b3c8278a2f7a190c4a613e343ea11e5302dbe252efd11712df4b6b041 - languageName: node - linkType: hard - -"pako@npm:^2.0.2": - version: 2.1.0 - resolution: "pako@npm:2.1.0" - checksum: 10c0/8e8646581410654b50eb22a5dfd71159cae98145bd5086c9a7a816ec0370b5f72b4648d08674624b3870a521e6a3daffd6c2f7bc00fdefc7063c9d8232ff5116 - languageName: node - linkType: hard - -"parent-module@npm:^1.0.0": - version: 1.0.1 - resolution: "parent-module@npm:1.0.1" - dependencies: - callsites: "npm:^3.0.0" - checksum: 10c0/c63d6e80000d4babd11978e0d3fee386ca7752a02b035fd2435960ffaa7219dc42146f07069fb65e6e8bf1caef89daf9af7535a39bddf354d78bf50d8294f556 - languageName: node - linkType: hard - -"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.7": - version: 5.1.7 - resolution: "parse-asn1@npm:5.1.7" - dependencies: - asn1.js: "npm:^4.10.1" - browserify-aes: "npm:^1.2.0" - evp_bytestokey: "npm:^1.0.3" - hash-base: "npm:~3.0" - pbkdf2: "npm:^3.1.2" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/05eb5937405c904eb5a7f3633bab1acc11f4ae3478a07ef5c6d81ce88c3c0e505ff51f9c7b935ebc1265c868343793698fc91025755a895d0276f620f95e8a82 - languageName: node - linkType: hard - -"parse-json@npm:^5.0.0": - version: 5.2.0 - resolution: "parse-json@npm:5.2.0" - dependencies: - "@babel/code-frame": "npm:^7.0.0" - error-ex: "npm:^1.3.1" - json-parse-even-better-errors: "npm:^2.3.0" - lines-and-columns: "npm:^1.1.6" - checksum: 10c0/77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585 - languageName: node - linkType: hard - -"parse-package-name@npm:1.0.0": - version: 1.0.0 - resolution: "parse-package-name@npm:1.0.0" - checksum: 10c0/ccbe57b6589784d9485cf18f1e1b2803da95df2df80d2cf91de4ccbe54af6bae18aa6f59b826bf50aa6051d439a905c7e800c5340341edc5374558e418e6defa - languageName: node - linkType: hard - -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b - languageName: node - linkType: hard - -"path-is-absolute@npm:^1.0.0": - version: 1.0.1 - resolution: "path-is-absolute@npm:1.0.1" - checksum: 10c0/127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-key@npm:^4.0.0": - version: 4.0.0 - resolution: "path-key@npm:4.0.0" - checksum: 10c0/794efeef32863a65ac312f3c0b0a99f921f3e827ff63afa5cb09a377e202c262b671f7b3832a4e64731003fa94af0263713962d317b9887bd1e0c48a342efba3 - languageName: node - linkType: hard - -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 - languageName: node - linkType: hard - -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - -"path-type@npm:^4.0.0": - version: 4.0.0 - resolution: "path-type@npm:4.0.0" - checksum: 10c0/666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c - languageName: node - linkType: hard - -"pathe@npm:^1.1.1, pathe@npm:^1.1.2": - version: 1.1.2 - resolution: "pathe@npm:1.1.2" - checksum: 10c0/64ee0a4e587fb0f208d9777a6c56e4f9050039268faaaaecd50e959ef01bf847b7872785c36483fa5cdcdbdfdb31fef2ff222684d4fc21c330ab60395c681897 - languageName: node - linkType: hard - -"pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.1.2": - version: 3.1.2 - resolution: "pbkdf2@npm:3.1.2" - dependencies: - create-hash: "npm:^1.1.2" - create-hmac: "npm:^1.1.4" - ripemd160: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - sha.js: "npm:^2.4.8" - checksum: 10c0/5a30374e87d33fa080a92734d778cf172542cc7e41b96198c4c88763997b62d7850de3fbda5c3111ddf79805ee7c1da7046881c90ac4920b5e324204518b05fd - languageName: node - linkType: hard - -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 - languageName: node - linkType: hard - -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"pino-abstract-transport@npm:v0.5.0": - version: 0.5.0 - resolution: "pino-abstract-transport@npm:0.5.0" - dependencies: - duplexify: "npm:^4.1.2" - split2: "npm:^4.0.0" - checksum: 10c0/0d0e30399028ec156642b4cdfe1a040b9022befdc38e8f85935d1837c3da6050691888038433f88190d1a1eff5d90abe17ff7e6edffc09baa2f96e51b6808183 - languageName: node - linkType: hard - -"pino-std-serializers@npm:^4.0.0": - version: 4.0.0 - resolution: "pino-std-serializers@npm:4.0.0" - checksum: 10c0/9e8ccac9ce04a27ccc7aa26481d431b9e037d866b101b89d895c60b925baffb82685e84d5c29b05d8e3d7c146d766a9b08949cb24ab1ec526a16134c9962d649 - languageName: node - linkType: hard - -"pino@npm:7.11.0": - version: 7.11.0 - resolution: "pino@npm:7.11.0" - dependencies: - atomic-sleep: "npm:^1.0.0" - fast-redact: "npm:^3.0.0" - on-exit-leak-free: "npm:^0.2.0" - pino-abstract-transport: "npm:v0.5.0" - pino-std-serializers: "npm:^4.0.0" - process-warning: "npm:^1.0.0" - quick-format-unescaped: "npm:^4.0.3" - real-require: "npm:^0.1.0" - safe-stable-stringify: "npm:^2.1.0" - sonic-boom: "npm:^2.2.1" - thread-stream: "npm:^0.15.1" - bin: - pino: bin.js - checksum: 10c0/4cc1ed9d25a4bc5d61c836a861279fa0039159b8f2f37ec337e50b0a61f3980dab5d2b1393daec26f68a19c423262649f0818654c9ad102c35310544a202c62c - languageName: node - linkType: hard - -"pirates@npm:^4.0.4": - version: 4.0.6 - resolution: "pirates@npm:4.0.6" - checksum: 10c0/00d5fa51f8dded94d7429700fb91a0c1ead00ae2c7fd27089f0c5b63e6eca36197fe46384631872690a66f390c5e27198e99006ab77ae472692ab9c2ca903f36 - languageName: node - linkType: hard - -"pkg-types@npm:^1.1.1": - version: 1.2.0 - resolution: "pkg-types@npm:1.2.0" - dependencies: - confbox: "npm:^0.1.7" - mlly: "npm:^1.7.1" - pathe: "npm:^1.1.2" - checksum: 10c0/111cf6ad4235438821ea195a0d70570b1bd36a71d094d258349027c9c304dea8b4f9669c9f7ce813f9a48a02942fb0d7fe9809127dbe7bb4b18a8de71583a081 - languageName: node - linkType: hard - -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd - languageName: node - linkType: hard - -"postcss@npm:8.4.31": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" - dependencies: - nanoid: "npm:^3.3.6" - picocolors: "npm:^1.0.0" - source-map-js: "npm:^1.0.2" - checksum: 10c0/748b82e6e5fc34034dcf2ae88ea3d11fd09f69b6c50ecdd3b4a875cfc7cdca435c958b211e2cb52355422ab6fccb7d8f2f2923161d7a1b281029e4a913d59acf - languageName: node - linkType: hard - -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - -"prettier@npm:^2.2.0, prettier@npm:^2.6.2": - version: 2.8.8 - resolution: "prettier@npm:2.8.8" - bin: - prettier: bin-prettier.js - checksum: 10c0/463ea8f9a0946cd5b828d8cf27bd8b567345cf02f56562d5ecde198b91f47a76b7ac9eae0facd247ace70e927143af6135e8cf411986b8cb8478784a4d6d724a - languageName: node - linkType: hard - -"proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": - version: 4.2.0 - resolution: "proc-log@npm:4.2.0" - checksum: 10c0/17db4757c2a5c44c1e545170e6c70a26f7de58feb985091fb1763f5081cab3d01b181fb2dd240c9f4a4255a1d9227d163d5771b7e69c9e49a561692db865efb9 - languageName: node - linkType: hard - -"process-nextick-args@npm:~2.0.0": - version: 2.0.1 - resolution: "process-nextick-args@npm:2.0.1" - checksum: 10c0/bec089239487833d46b59d80327a1605e1c5287eaad770a291add7f45fda1bb5e28b38e0e061add0a1d0ee0984788ce74fa394d345eed1c420cacf392c554367 - languageName: node - linkType: hard - -"process-warning@npm:^1.0.0": - version: 1.0.0 - resolution: "process-warning@npm:1.0.0" - checksum: 10c0/43ec4229d64eb5c58340c8aacade49eb5f6fd513eae54140abf365929ca20987f0a35c5868125e2b583cad4de8cd257beb5667d9cc539d9190a7a4c3014adf22 - languageName: node - linkType: hard - -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" - dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 - languageName: node - linkType: hard - -"prop-types@npm:^15.0.0, prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.8.1": - version: 15.8.1 - resolution: "prop-types@npm:15.8.1" - dependencies: - loose-envify: "npm:^1.4.0" - object-assign: "npm:^4.1.1" - react-is: "npm:^16.13.1" - checksum: 10c0/59ece7ca2fb9838031d73a48d4becb9a7cc1ed10e610517c7d8f19a1e02fa47f7c27d557d8a5702bec3cfeccddc853579832b43f449e54635803f277b1c78077 - languageName: node - linkType: hard - -"propagate@npm:^2.0.0": - version: 2.0.1 - resolution: "propagate@npm:2.0.1" - checksum: 10c0/01e1023b60ae4050d1a2783f976d7db702022dbdb70dba797cceedad8cfc01b3939c41e77032f8c32aa9d93192fe937ebba1345e8604e5ce61fd3b62ee3003b8 - languageName: node - linkType: hard - -"property-information@npm:^6.0.0": - version: 6.5.0 - resolution: "property-information@npm:6.5.0" - checksum: 10c0/981e0f9cc2e5acdb414a6fd48a99dd0fd3a4079e7a91ab41cf97a8534cf43e0e0bc1ffada6602a1b3d047a33db8b5fc2ef46d863507eda712d5ceedac443f0ef - languageName: node - linkType: hard - -"protobufjs@npm:^6.11.2, protobufjs@npm:^6.11.3, protobufjs@npm:^6.8.8, protobufjs@npm:~6.11.2, protobufjs@npm:~6.11.3": - version: 6.11.4 - resolution: "protobufjs@npm:6.11.4" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.4" - "@protobufjs/eventemitter": "npm:^1.1.0" - "@protobufjs/fetch": "npm:^1.1.0" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/inquire": "npm:^1.1.0" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.0" - "@types/long": "npm:^4.0.1" - "@types/node": "npm:>=13.7.0" - long: "npm:^4.0.0" - bin: - pbjs: bin/pbjs - pbts: bin/pbts - checksum: 10c0/c244d7b9b6d3258193da5c0d1e558dfb47f208ae345e209f90ec45c9dca911b90fa17e937892a9a39a4136ab9886981aae9efdf6039f7baff4f7225f5eeb9812 - languageName: node - linkType: hard - -"proxy-from-env@npm:^1.1.0": - version: 1.1.0 - resolution: "proxy-from-env@npm:1.1.0" - checksum: 10c0/fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b - languageName: node - linkType: hard - -"public-encrypt@npm:^4.0.0": - version: 4.0.3 - resolution: "public-encrypt@npm:4.0.3" - dependencies: - bn.js: "npm:^4.1.0" - browserify-rsa: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - parse-asn1: "npm:^5.0.0" - randombytes: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/6c2cc19fbb554449e47f2175065d6b32f828f9b3badbee4c76585ac28ae8641aafb9bb107afc430c33c5edd6b05dbe318df4f7d6d7712b1093407b11c4280700 - languageName: node - linkType: hard - -"pump@npm:^3.0.0": - version: 3.0.0 - resolution: "pump@npm:3.0.0" - dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: 10c0/bbdeda4f747cdf47db97428f3a135728669e56a0ae5f354a9ac5b74556556f5446a46f720a8f14ca2ece5be9b4d5d23c346db02b555f46739934cc6c093a5478 - languageName: node - linkType: hard - -"punycode@npm:^2.1.0": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - -"query-string@npm:7.1.3": - version: 7.1.3 - resolution: "query-string@npm:7.1.3" - dependencies: - decode-uri-component: "npm:^0.2.2" - filter-obj: "npm:^1.1.0" - split-on-first: "npm:^1.0.0" - strict-uri-encode: "npm:^2.0.0" - checksum: 10c0/a896c08e9e0d4f8ffd89a572d11f668c8d0f7df9c27c6f49b92ab31366d3ba0e9c331b9a620ee747893436cd1f2f821a6327e2bc9776bde2402ac6c270b801b2 - languageName: node - linkType: hard - -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - -"quick-format-unescaped@npm:^4.0.3": - version: 4.0.4 - resolution: "quick-format-unescaped@npm:4.0.4" - checksum: 10c0/fe5acc6f775b172ca5b4373df26f7e4fd347975578199e7d74b2ae4077f0af05baa27d231de1e80e8f72d88275ccc6028568a7a8c9ee5e7368ace0e18eff93a4 - languageName: node - linkType: hard - -"radix3@npm:^1.1.2": - version: 1.1.2 - resolution: "radix3@npm:1.1.2" - checksum: 10c0/d4a295547f71af079868d2c2ed3814a9296ee026c5488212d58c106e6b4797c6eaec1259b46c9728913622f2240c9a944bfc8e2b3b5f6e4a5045338b1609f1e4 - languageName: node - linkType: hard - -"rainbow-sprinkles@npm:^0.17.2": - version: 0.17.2 - resolution: "rainbow-sprinkles@npm:0.17.2" - peerDependencies: - "@vanilla-extract/css": ^1 - "@vanilla-extract/dynamic": ^2 - checksum: 10c0/c7ab7955592860afaab023f75b20c82d5f6242c766a8b2c42cd5794082ef51b25411c6c2f22f46525791ef8104c95dc13d72772904d37382564aed3a229684ef - languageName: node - linkType: hard - -"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5": - version: 2.1.0 - resolution: "randombytes@npm:2.1.0" - dependencies: - safe-buffer: "npm:^5.1.0" - checksum: 10c0/50395efda7a8c94f5dffab564f9ff89736064d32addf0cc7e8bf5e4166f09f8ded7a0849ca6c2d2a59478f7d90f78f20d8048bca3cdf8be09d8e8a10790388f3 - languageName: node - linkType: hard - -"randomfill@npm:^1.0.3": - version: 1.0.4 - resolution: "randomfill@npm:1.0.4" - dependencies: - randombytes: "npm:^2.0.5" - safe-buffer: "npm:^5.1.0" - checksum: 10c0/11aeed35515872e8f8a2edec306734e6b74c39c46653607f03c68385ab8030e2adcc4215f76b5e4598e028c4750d820afd5c65202527d831d2a5f207fe2bc87c - languageName: node - linkType: hard - -"react-aria@npm:^3.33.1": - version: 3.34.3 - resolution: "react-aria@npm:3.34.3" - dependencies: - "@internationalized/string": "npm:^3.2.3" - "@react-aria/breadcrumbs": "npm:^3.5.16" - "@react-aria/button": "npm:^3.9.8" - "@react-aria/calendar": "npm:^3.5.11" - "@react-aria/checkbox": "npm:^3.14.6" - "@react-aria/combobox": "npm:^3.10.3" - "@react-aria/datepicker": "npm:^3.11.2" - "@react-aria/dialog": "npm:^3.5.17" - "@react-aria/dnd": "npm:^3.7.2" - "@react-aria/focus": "npm:^3.18.2" - "@react-aria/gridlist": "npm:^3.9.3" - "@react-aria/i18n": "npm:^3.12.2" - "@react-aria/interactions": "npm:^3.22.2" - "@react-aria/label": "npm:^3.7.11" - "@react-aria/link": "npm:^3.7.4" - "@react-aria/listbox": "npm:^3.13.3" - "@react-aria/menu": "npm:^3.15.3" - "@react-aria/meter": "npm:^3.4.16" - "@react-aria/numberfield": "npm:^3.11.6" - "@react-aria/overlays": "npm:^3.23.2" - "@react-aria/progress": "npm:^3.4.16" - "@react-aria/radio": "npm:^3.10.7" - "@react-aria/searchfield": "npm:^3.7.8" - "@react-aria/select": "npm:^3.14.9" - "@react-aria/selection": "npm:^3.19.3" - "@react-aria/separator": "npm:^3.4.2" - "@react-aria/slider": "npm:^3.7.11" - "@react-aria/ssr": "npm:^3.9.5" - "@react-aria/switch": "npm:^3.6.7" - "@react-aria/table": "npm:^3.15.3" - "@react-aria/tabs": "npm:^3.9.5" - "@react-aria/tag": "npm:^3.4.5" - "@react-aria/textfield": "npm:^3.14.8" - "@react-aria/tooltip": "npm:^3.7.7" - "@react-aria/utils": "npm:^3.25.2" - "@react-aria/visually-hidden": "npm:^3.8.15" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/69f801d70d93a0da399723c86f3c67259896bc42062ef838a51f467154b907e11376f508d8ccb63286761fb37f22a28b090c9cb4f384c6de9ba48dbd9751d6b0 - languageName: node - linkType: hard - -"react-clientside-effect@npm:^1.2.6": - version: 1.2.6 - resolution: "react-clientside-effect@npm:1.2.6" - dependencies: - "@babel/runtime": "npm:^7.12.13" - peerDependencies: - react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/aba0adb666018e5c64657c31f4914a8558be73f71d6e2210fa871ebfcab94d786c83082868d7c7fa66feddc2aec19e375745cf0903e0619f2efffef08b92d941 - languageName: node - linkType: hard - -"react-dom@npm:18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" - dependencies: - loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.0" - peerDependencies: - react: ^18.2.0 - checksum: 10c0/66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a - languageName: node - linkType: hard - -"react-fast-compare@npm:3.2.0": - version: 3.2.0 - resolution: "react-fast-compare@npm:3.2.0" - checksum: 10c0/2a7d75ce9fb5da1e3c01f74a5cd592f3369a8cc8d44e93654bf147ab221f430238e8be70677e896f2bfcb96a1cb7a47a8d05d84633de764a9d57d27005a4bb9e - languageName: node - linkType: hard - -"react-focus-lock@npm:^2.9.2": - version: 2.13.2 - resolution: "react-focus-lock@npm:2.13.2" - dependencies: - "@babel/runtime": "npm:^7.0.0" - focus-lock: "npm:^1.3.5" - prop-types: "npm:^15.6.2" - react-clientside-effect: "npm:^1.2.6" - use-callback-ref: "npm:^1.3.2" - use-sidecar: "npm:^1.1.2" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/6d4539e9ec5943de8a7eb856df7ab97c3da751ce6515512ca337dfb2bd06499ebc1051f8c96b142ad093637825a0ddcceb884282c1ec246dd02f293a8aafa688 - languageName: node - linkType: hard - -"react-icons@npm:4.4.0": - version: 4.4.0 - resolution: "react-icons@npm:4.4.0" - peerDependencies: - react: "*" - checksum: 10c0/8daeae11e4b989eebcb97b9fdf3a743607b76b637d2eece309f6274f3a85b9c720313956cfabe220628324abf50b9b01823f65ac9cf71b8a816e440d2fca5293 - languageName: node - linkType: hard - -"react-icons@npm:^4.12.0": - version: 4.12.0 - resolution: "react-icons@npm:4.12.0" - peerDependencies: - react: "*" - checksum: 10c0/2170f43031ee7365539f72d4075cbe6c7fbf9a66d6cf4494aa9393b194272da0564f5b19d1b24dbfc567c0ac89f5fe5b8974d92dd83f61e252388dde6a226fb8 - languageName: node - linkType: hard - -"react-is@npm:^16.13.1, react-is@npm:^16.7.0": - version: 16.13.1 - resolution: "react-is@npm:16.13.1" - checksum: 10c0/33977da7a5f1a287936a0c85639fec6ca74f4f15ef1e59a6bc20338fc73dc69555381e211f7a3529b8150a1f71e4225525b41b60b52965bda53ce7d47377ada1 - languageName: node - linkType: hard - -"react-is@npm:^18.0.0": - version: 18.3.1 - resolution: "react-is@npm:18.3.1" - checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072 - languageName: node - linkType: hard - -"react-markdown@npm:^8.0.7": - version: 8.0.7 - resolution: "react-markdown@npm:8.0.7" - dependencies: - "@types/hast": "npm:^2.0.0" - "@types/prop-types": "npm:^15.0.0" - "@types/unist": "npm:^2.0.0" - comma-separated-tokens: "npm:^2.0.0" - hast-util-whitespace: "npm:^2.0.0" - prop-types: "npm:^15.0.0" - property-information: "npm:^6.0.0" - react-is: "npm:^18.0.0" - remark-parse: "npm:^10.0.0" - remark-rehype: "npm:^10.0.0" - space-separated-tokens: "npm:^2.0.0" - style-to-object: "npm:^0.4.0" - unified: "npm:^10.0.0" - unist-util-visit: "npm:^4.0.0" - vfile: "npm:^5.0.0" - peerDependencies: - "@types/react": ">=16" - react: ">=16" - checksum: 10c0/016617fbd2f4c03c5ae017fe39e89202f2ff536b4921dc1a5f7283d4b9d5157f20797adda75a8c59a06787ad0bc8841e2e437915aec645ce528e0a04a6d450ac - languageName: node - linkType: hard - -"react-minimal-pie-chart@npm:^8.4.0": - version: 8.4.0 - resolution: "react-minimal-pie-chart@npm:8.4.0" - dependencies: - "@types/svg-path-parser": "npm:^1.1.3" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18 - react-dom: ^16.8.0 || ^17.0.0 || ^18 - checksum: 10c0/022167b557911b88785e5770170979041cca87c445fa167935b0a3d56e5cca26240d357bfb3f574e6acf726be2312ad8763ab374ddc7cae01ba00ca22ced2a98 - languageName: node - linkType: hard - -"react-remove-scroll-bar@npm:^2.3.6": - version: 2.3.6 - resolution: "react-remove-scroll-bar@npm:2.3.6" - dependencies: - react-style-singleton: "npm:^2.2.1" - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/4e32ee04bf655a8bd3b4aacf6ffc596ae9eb1b9ba27eef83f7002632ee75371f61516ae62250634a9eae4b2c8fc6f6982d9b182de260f6c11841841e6e2e7515 - languageName: node - linkType: hard - -"react-remove-scroll@npm:^2.5.5": - version: 2.5.10 - resolution: "react-remove-scroll@npm:2.5.10" - dependencies: - react-remove-scroll-bar: "npm:^2.3.6" - react-style-singleton: "npm:^2.2.1" - tslib: "npm:^2.1.0" - use-callback-ref: "npm:^1.3.0" - use-sidecar: "npm:^1.1.2" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/5057ebf11cf6b7a9126087c37be56f08bb96065906d871e7715f94caf74d980e01df8ad074e049d9d2f40d2946e50c14bd3c77966bcf4bf1d53ca303ecc64955 - languageName: node - linkType: hard - -"react-select@npm:5.8.0": - version: 5.8.0 - resolution: "react-select@npm:5.8.0" - dependencies: - "@babel/runtime": "npm:^7.12.0" - "@emotion/cache": "npm:^11.4.0" - "@emotion/react": "npm:^11.8.1" - "@floating-ui/dom": "npm:^1.0.1" - "@types/react-transition-group": "npm:^4.4.0" - memoize-one: "npm:^6.0.0" - prop-types: "npm:^15.6.0" - react-transition-group: "npm:^4.3.0" - use-isomorphic-layout-effect: "npm:^1.1.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/b4b98aaf117ee5cc4642871b7bd51fd0e2697988d0b880f30b21e933ca90258959147117d8aada36713b622e0e4cb06bd18ec02069f3f108896e0d31e69e3c16 - languageName: node - linkType: hard - -"react-stately@npm:^3.31.1": - version: 3.32.2 - resolution: "react-stately@npm:3.32.2" - dependencies: - "@react-stately/calendar": "npm:^3.5.4" - "@react-stately/checkbox": "npm:^3.6.8" - "@react-stately/collections": "npm:^3.10.9" - "@react-stately/combobox": "npm:^3.9.2" - "@react-stately/data": "npm:^3.11.6" - "@react-stately/datepicker": "npm:^3.10.2" - "@react-stately/dnd": "npm:^3.4.2" - "@react-stately/form": "npm:^3.0.5" - "@react-stately/list": "npm:^3.10.8" - "@react-stately/menu": "npm:^3.8.2" - "@react-stately/numberfield": "npm:^3.9.6" - "@react-stately/overlays": "npm:^3.6.10" - "@react-stately/radio": "npm:^3.10.7" - "@react-stately/searchfield": "npm:^3.5.6" - "@react-stately/select": "npm:^3.6.7" - "@react-stately/selection": "npm:^3.16.2" - "@react-stately/slider": "npm:^3.5.7" - "@react-stately/table": "npm:^3.12.2" - "@react-stately/tabs": "npm:^3.6.9" - "@react-stately/toggle": "npm:^3.7.7" - "@react-stately/tooltip": "npm:^3.4.12" - "@react-stately/tree": "npm:^3.8.4" - "@react-types/shared": "npm:^3.24.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - checksum: 10c0/e331c0391115438623b1f9890634882b47436a69fbcfd453a2e2e37c992bd0e8339c470356ed66a3457d57c45f0437c3b53c497084041dbc3cf930e83f09437e - languageName: node - linkType: hard - -"react-style-singleton@npm:^2.2.1": - version: 2.2.1 - resolution: "react-style-singleton@npm:2.2.1" - dependencies: - get-nonce: "npm:^1.0.0" - invariant: "npm:^2.2.4" - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/6d66f3bdb65e1ec79089f80314da97c9a005087a04ee034255a5de129a4c0d9fd0bf99fa7bf642781ac2dc745ca687aae3de082bd8afdd0d117bc953241e15ad - languageName: node - linkType: hard - -"react-transition-group@npm:^4.3.0": - version: 4.4.5 - resolution: "react-transition-group@npm:4.4.5" - dependencies: - "@babel/runtime": "npm:^7.5.5" - dom-helpers: "npm:^5.0.1" - loose-envify: "npm:^1.4.0" - prop-types: "npm:^15.6.2" - peerDependencies: - react: ">=16.6.0" - react-dom: ">=16.6.0" - checksum: 10c0/2ba754ba748faefa15f87c96dfa700d5525054a0141de8c75763aae6734af0740e77e11261a1e8f4ffc08fd9ab78510122e05c21c2d79066c38bb6861a886c82 - languageName: node - linkType: hard - -"react@npm:18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8 - languageName: node - linkType: hard - -"readable-stream@npm:^2.3.3, readable-stream@npm:^2.3.8": - version: 2.3.8 - resolution: "readable-stream@npm:2.3.8" - dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.3" - isarray: "npm:~1.0.0" - process-nextick-args: "npm:~2.0.0" - safe-buffer: "npm:~5.1.1" - string_decoder: "npm:~1.1.1" - util-deprecate: "npm:~1.0.1" - checksum: 10c0/7efdb01f3853bc35ac62ea25493567bf588773213f5f4a79f9c365e1ad13bab845ac0dae7bc946270dc40c3929483228415e92a3fc600cc7e4548992f41ee3fa - languageName: node - linkType: hard - -"readable-stream@npm:^3.1.1, readable-stream@npm:^3.6.0": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 - languageName: node - linkType: hard - -"readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" - dependencies: - picomatch: "npm:^2.2.1" - checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b - languageName: node - linkType: hard - -"readonly-date@npm:^1.0.0": - version: 1.0.0 - resolution: "readonly-date@npm:1.0.0" - checksum: 10c0/7ab32bf19f6bfec102584a524fa79a289e6ede0bf20c80fd90ab309962e45b71d19dd0e3915dff6e81edf226f08fda65e890539b4aca74668921790b10471356 - languageName: node - linkType: hard - -"real-require@npm:^0.1.0": - version: 0.1.0 - resolution: "real-require@npm:0.1.0" - checksum: 10c0/c0f8ae531d1f51fe6343d47a2a1e5756e19b65a81b4a9642b9ebb4874e0d8b5f3799bc600bf4592838242477edc6f57778593f21b71d90f8ad0d8a317bbfae1c - languageName: node - linkType: hard - -"rechoir@npm:^0.6.2": - version: 0.6.2 - resolution: "rechoir@npm:0.6.2" - dependencies: - resolve: "npm:^1.1.6" - checksum: 10c0/22c4bb32f4934a9468468b608417194f7e3ceba9a508512125b16082c64f161915a28467562368eeb15dc16058eb5b7c13a20b9eb29ff9927d1ebb3b5aa83e84 - languageName: node - linkType: hard - -"reflect.getprototypeof@npm:^1.0.4": - version: 1.0.6 - resolution: "reflect.getprototypeof@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.1" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.3" - which-builtin-type: "npm:^1.1.3" - checksum: 10c0/baf4ef8ee6ff341600f4720b251cf5a6cb552d6a6ab0fdc036988c451bf16f920e5feb0d46bd4f530a5cce568f1f7aca2d77447ca798920749cfc52783c39b55 - languageName: node - linkType: hard - -"regenerate-unicode-properties@npm:^10.1.0": - version: 10.1.1 - resolution: "regenerate-unicode-properties@npm:10.1.1" - dependencies: - regenerate: "npm:^1.4.2" - checksum: 10c0/89adb5ee5ba081380c78f9057c02e156a8181969f6fcca72451efc45612e0c3df767b4333f8d8479c274d9c6fe52ec4854f0d8a22ef95dccbe87da8e5f2ac77d - languageName: node - linkType: hard - -"regenerate@npm:^1.4.2": - version: 1.4.2 - resolution: "regenerate@npm:1.4.2" - checksum: 10c0/f73c9eba5d398c818edc71d1c6979eaa05af7a808682749dd079f8df2a6d91a9b913db216c2c9b03e0a8ba2bba8701244a93f45211afbff691c32c7b275db1b8 - languageName: node - linkType: hard - -"regenerator-runtime@npm:^0.14.0": - version: 0.14.1 - resolution: "regenerator-runtime@npm:0.14.1" - checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4 - languageName: node - linkType: hard - -"regenerator-transform@npm:^0.15.2": - version: 0.15.2 - resolution: "regenerator-transform@npm:0.15.2" - dependencies: - "@babel/runtime": "npm:^7.8.4" - checksum: 10c0/7cfe6931ec793269701994a93bab89c0cc95379191fad866270a7fea2adfec67ea62bb5b374db77058b60ba4509319d9b608664d0d288bd9989ca8dbd08fae90 - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": - version: 1.5.2 - resolution: "regexp.prototype.flags@npm:1.5.2" - dependencies: - call-bind: "npm:^1.0.6" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - set-function-name: "npm:^2.0.1" - checksum: 10c0/0f3fc4f580d9c349f8b560b012725eb9c002f36daa0041b3fbf6f4238cb05932191a4d7d5db3b5e2caa336d5150ad0402ed2be81f711f9308fe7e1a9bf9bd552 - languageName: node - linkType: hard - -"regexpp@npm:^3.2.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: 10c0/d1da82385c8754a1681416b90b9cca0e21b4a2babef159099b88f640637d789c69011d0bc94705dacab85b81133e929d027d85210e8b8b03f8035164dbc14710 - languageName: node - linkType: hard - -"regexpu-core@npm:^5.3.1": - version: 5.3.2 - resolution: "regexpu-core@npm:5.3.2" - dependencies: - "@babel/regjsgen": "npm:^0.8.0" - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.1.0" - regjsparser: "npm:^0.9.1" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.1.0" - checksum: 10c0/7945d5ab10c8bbed3ca383d4274687ea825aee4ab93a9c51c6e31e1365edd5ea807f6908f800ba017b66c462944ba68011164e7055207747ab651f8111ef3770 - languageName: node - linkType: hard - -"regjsparser@npm:^0.9.1": - version: 0.9.1 - resolution: "regjsparser@npm:0.9.1" - dependencies: - jsesc: "npm:~0.5.0" - bin: - regjsparser: bin/parser - checksum: 10c0/fe44fcf19a99fe4f92809b0b6179530e5ef313ff7f87df143b08ce9a2eb3c4b6189b43735d645be6e8f4033bfb015ed1ca54f0583bc7561bed53fd379feb8225 - languageName: node - linkType: hard - -"remark-parse@npm:^10.0.0": - version: 10.0.2 - resolution: "remark-parse@npm:10.0.2" - dependencies: - "@types/mdast": "npm:^3.0.0" - mdast-util-from-markdown: "npm:^1.0.0" - unified: "npm:^10.0.0" - checksum: 10c0/30cb8f2790380b1c7370a1c66cda41f33a7dc196b9e440a00e2675037bca55aea868165a8204e0cdbacc27ef4a3bdb7d45879826bd6efa07d9fdf328cb67a332 - languageName: node - linkType: hard - -"remark-rehype@npm:^10.0.0": - version: 10.1.0 - resolution: "remark-rehype@npm:10.1.0" - dependencies: - "@types/hast": "npm:^2.0.0" - "@types/mdast": "npm:^3.0.0" - mdast-util-to-hast: "npm:^12.1.0" - unified: "npm:^10.0.0" - checksum: 10c0/803e658c9b51a9b53ee2ada42ff82e8e570444bb97c873e0d602c2d8dcb69a774fd22bd6f26643dfd5ab4c181059ea6c9fb9a99a2d7f9665f3f11bef1a1489bd - languageName: node - linkType: hard - -"resolve-from@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-from@npm:4.0.0" - checksum: 10c0/8408eec31a3112ef96e3746c37be7d64020cda07c03a920f5024e77290a218ea758b26ca9529fd7b1ad283947f34b2291c1c0f6aa0ed34acfdda9c6014c8d190 - languageName: node - linkType: hard - -"resolve-from@npm:^5.0.0": - version: 5.0.0 - resolution: "resolve-from@npm:5.0.0" - checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 - languageName: node - linkType: hard - -"resolve-pkg-maps@npm:^1.0.0": - version: 1.0.0 - resolution: "resolve-pkg-maps@npm:1.0.0" - checksum: 10c0/fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab - languageName: node - linkType: hard - -"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.22.4": - version: 1.22.8 - resolution: "resolve@npm:1.22.8" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/07e179f4375e1fd072cfb72ad66d78547f86e6196c4014b31cb0b8bb1db5f7ca871f922d08da0fbc05b94e9fd42206f819648fa3b5b873ebbc8e1dc68fec433a - languageName: node - linkType: hard - -"resolve@npm:^2.0.0-next.5": - version: 2.0.0-next.5 - resolution: "resolve@npm:2.0.0-next.5" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/a6c33555e3482ea2ec4c6e3d3bf0d78128abf69dca99ae468e64f1e30acaa318fd267fb66c8836b04d558d3e2d6ed875fe388067e7d8e0de647d3c21af21c43a - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": - version: 1.22.8 - resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": - version: 2.0.0-next.5 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/78ad6edb8309a2bfb720c2c1898f7907a37f858866ce11a5974643af1203a6a6e05b2fa9c53d8064a673a447b83d42569260c306d43628bff5bb101969708355 - languageName: node - linkType: hard - -"restore-cursor@npm:^2.0.0": - version: 2.0.0 - resolution: "restore-cursor@npm:2.0.0" - dependencies: - onetime: "npm:^2.0.0" - signal-exit: "npm:^3.0.2" - checksum: 10c0/f5b335bee06f440445e976a7031a3ef53691f9b7c4a9d42a469a0edaf8a5508158a0d561ff2b26a1f4f38783bcca2c0e5c3a44f927326f6694d5b44d7a4993e6 - languageName: node - linkType: hard - -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe - languageName: node - linkType: hard - -"reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 - languageName: node - linkType: hard - -"rimraf@npm:3.0.2, rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" - dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10c0/9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8 - languageName: node - linkType: hard - -"rimraf@npm:5.0.0": - version: 5.0.0 - resolution: "rimraf@npm:5.0.0" - dependencies: - glob: "npm:^10.0.0" - bin: - rimraf: dist/cjs/src/bin.js - checksum: 10c0/965dcd7928334a86eeb02dc59874c6d1bf1a1361da4f55561083e5d216bfc52b933c14dae69450bea6943e52d0f704445e8f80c428c3390bd905f15daefdb0f7 - languageName: node - linkType: hard - -"ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": - version: 2.0.2 - resolution: "ripemd160@npm:2.0.2" - dependencies: - hash-base: "npm:^3.0.0" - inherits: "npm:^2.0.1" - checksum: 10c0/f6f0df78817e78287c766687aed4d5accbebc308a8e7e673fb085b9977473c1f139f0c5335d353f172a915bb288098430755d2ad3c4f30612f4dd0c901cd2c3a - languageName: node - linkType: hard - -"run-async@npm:^2.2.0, run-async@npm:^2.3.0": - version: 2.4.1 - resolution: "run-async@npm:2.4.1" - checksum: 10c0/35a68c8f1d9664f6c7c2e153877ca1d6e4f886e5ca067c25cdd895a6891ff3a1466ee07c63d6a9be306e9619ff7d509494e6d9c129516a36b9fd82263d579ee1 - languageName: node - linkType: hard - -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - -"rx-lite-aggregates@npm:^4.0.8": - version: 4.0.8 - resolution: "rx-lite-aggregates@npm:4.0.8" - dependencies: - rx-lite: "npm:*" - checksum: 10c0/e21f95feca7e63b861fd711a980924cbaa9cb8ebc4786c7cbc287e153d5e96fbd48c0a8a978e53594174d4a68d5d2263b823a2b975c80a955f5748eb59cdec60 - languageName: node - linkType: hard - -"rx-lite@npm:*, rx-lite@npm:^4.0.8": - version: 4.0.8 - resolution: "rx-lite@npm:4.0.8" - checksum: 10c0/a3e76e3a6471347855196e30450bc500f7b1becfdbb0f3d58b1f1d5d6f89165a159e8549b4403084023de99938d67f43a3319c92b1b46c3fd8d7318ecce42c79 - languageName: node - linkType: hard - -"rxjs@npm:^6.4.0": - version: 6.6.7 - resolution: "rxjs@npm:6.6.7" - dependencies: - tslib: "npm:^1.9.0" - checksum: 10c0/e556a13a9aa89395e5c9d825eabcfa325568d9c9990af720f3f29f04a888a3b854f25845c2b55875d875381abcae2d8100af9cacdc57576e7ed6be030a01d2fe - languageName: node - linkType: hard - -"rxjs@npm:^7.8.1": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" - dependencies: - tslib: "npm:^2.1.0" - checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 - languageName: node - linkType: hard - -"sade@npm:^1.7.3": - version: 1.8.1 - resolution: "sade@npm:1.8.1" - dependencies: - mri: "npm:^1.1.0" - checksum: 10c0/da8a3a5d667ad5ce3bf6d4f054bbb9f711103e5df21003c5a5c1a8a77ce12b640ed4017dd423b13c2307ea7e645adee7c2ae3afe8051b9db16a6f6d3da3f90b1 - languageName: node - linkType: hard - -"safe-array-concat@npm:^1.1.2": - version: 1.1.2 - resolution: "safe-array-concat@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.7" - get-intrinsic: "npm:^1.2.4" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10c0/12f9fdb01c8585e199a347eacc3bae7b5164ae805cdc8c6707199dbad5b9e30001a50a43c4ee24dc9ea32dbb7279397850e9208a7e217f4d8b1cf5d90129dec9 - languageName: node - linkType: hard - -"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 - languageName: node - linkType: hard - -"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": - version: 5.1.2 - resolution: "safe-buffer@npm:5.1.2" - checksum: 10c0/780ba6b5d99cc9a40f7b951d47152297d0e260f0df01472a1b99d4889679a4b94a13d644f7dbc4f022572f09ae9005fa2fbb93bbbd83643316f365a3e9a45b21 - languageName: node - linkType: hard - -"safe-regex-test@npm:^1.0.3": - version: 1.0.3 - resolution: "safe-regex-test@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.1.4" - checksum: 10c0/900bf7c98dc58f08d8523b7012b468e4eb757afa624f198902c0643d7008ba777b0bdc35810ba0b758671ce887617295fb742b3f3968991b178ceca54cb07603 - languageName: node - linkType: hard - -"safe-stable-stringify@npm:^2.1.0": - version: 2.5.0 - resolution: "safe-stable-stringify@npm:2.5.0" - checksum: 10c0/baea14971858cadd65df23894a40588ed791769db21bafb7fd7608397dbdce9c5aac60748abae9995e0fc37e15f2061980501e012cd48859740796bea2987f49 - languageName: node - linkType: hard - -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 - languageName: node - linkType: hard - -"scheduler@npm:^0.23.0": - version: 0.23.2 - resolution: "scheduler@npm:0.23.2" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78 - languageName: node - linkType: hard - -"scrypt-js@npm:3.0.1": - version: 3.0.1 - resolution: "scrypt-js@npm:3.0.1" - checksum: 10c0/e2941e1c8b5c84c7f3732b0153fee624f5329fc4e772a06270ee337d4d2df4174b8abb5e6ad53804a29f53890ecbc78f3775a319323568c0313040c0e55f5b10 - languageName: node - linkType: hard - -"secp256k1@npm:^4.0.2": - version: 4.0.3 - resolution: "secp256k1@npm:4.0.3" - dependencies: - elliptic: "npm:^6.5.4" - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - checksum: 10c0/de0a0e525a6f8eb2daf199b338f0797dbfe5392874285a145bb005a72cabacb9d42c0197d0de129a1a0f6094d2cc4504d1f87acb6a8bbfb7770d4293f252c401 - languageName: node - linkType: hard - -"semver@npm:^6.1.1, semver@npm:^6.1.2, semver@npm:^6.3.0, semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d - languageName: node - linkType: hard - -"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.0, semver@npm:^7.6.3": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"set-function-length@npm:^1.2.1": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c - languageName: node - linkType: hard - -"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 - languageName: node - linkType: hard - -"sha.js@npm:^2.4.0, sha.js@npm:^2.4.11, sha.js@npm:^2.4.8": - version: 2.4.11 - resolution: "sha.js@npm:2.4.11" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - bin: - sha.js: ./bin.js - checksum: 10c0/b7a371bca8821c9cc98a0aeff67444a03d48d745cb103f17228b96793f455f0eb0a691941b89ea1e60f6359207e36081d9be193252b0f128e0daf9cfea2815a5 - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"shelljs@npm:0.8.5": - version: 0.8.5 - resolution: "shelljs@npm:0.8.5" - dependencies: - glob: "npm:^7.0.0" - interpret: "npm:^1.0.0" - rechoir: "npm:^0.6.2" - bin: - shjs: bin/shjs - checksum: 10c0/feb25289a12e4bcd04c40ddfab51aff98a3729f5c2602d5b1a1b95f6819ec7804ac8147ebd8d9a85dfab69d501bcf92d7acef03247320f51c1552cec8d8e2382 - languageName: node - linkType: hard - -"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": - version: 1.0.6 - resolution: "side-channel@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - object-inspect: "npm:^1.13.1" - checksum: 10c0/d2afd163dc733cc0a39aa6f7e39bf0c436293510dbccbff446733daeaf295857dbccf94297092ec8c53e2503acac30f0b78830876f0485991d62a90e9cad305f - languageName: node - linkType: hard - -"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7": - version: 3.0.7 - resolution: "signal-exit@npm:3.0.7" - checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 - languageName: node - linkType: hard - -"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 - languageName: node - linkType: hard - -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b - languageName: node - linkType: hard - -"smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.3": - version: 8.0.4 - resolution: "socks-proxy-agent@npm:8.0.4" - dependencies: - agent-base: "npm:^7.1.1" - debug: "npm:^4.3.4" - socks: "npm:^2.8.3" - checksum: 10c0/345593bb21b95b0508e63e703c84da11549f0a2657d6b4e3ee3612c312cb3a907eac10e53b23ede3557c6601d63252103494caa306b66560f43af7b98f53957a - languageName: node - linkType: hard - -"socks@npm:^2.8.3": - version: 2.8.3 - resolution: "socks@npm:2.8.3" - dependencies: - ip-address: "npm:^9.0.5" - smart-buffer: "npm:^4.2.0" - checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 - languageName: node - linkType: hard - -"sonic-boom@npm:^2.2.1": - version: 2.8.0 - resolution: "sonic-boom@npm:2.8.0" - dependencies: - atomic-sleep: "npm:^1.0.0" - checksum: 10c0/6b40f2e91a999819b1dc24018a5d1c8b74e66e5d019eabad17d5b43fc309b32255b7c405ed6ec885693c8f2b969099ce96aeefde027180928bc58c034234a86d - languageName: node - linkType: hard - -"source-map-js@npm:^1.0.2": - version: 1.2.0 - resolution: "source-map-js@npm:1.2.0" - checksum: 10c0/7e5f896ac10a3a50fe2898e5009c58ff0dc102dcb056ed27a354623a0ece8954d4b2649e1a1b2b52ef2e161d26f8859c7710350930751640e71e374fe2d321a4 - languageName: node - linkType: hard - -"source-map@npm:^0.5.7": - version: 0.5.7 - resolution: "source-map@npm:0.5.7" - checksum: 10c0/904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599 - languageName: node - linkType: hard - -"space-separated-tokens@npm:^2.0.0": - version: 2.0.2 - resolution: "space-separated-tokens@npm:2.0.2" - checksum: 10c0/6173e1d903dca41dcab6a2deed8b4caf61bd13b6d7af8374713500570aa929ff9414ae09a0519f4f8772df993300305a395d4871f35bc4ca72b6db57e1f30af8 - languageName: node - linkType: hard - -"split-on-first@npm:^1.0.0": - version: 1.1.0 - resolution: "split-on-first@npm:1.1.0" - checksum: 10c0/56df8344f5a5de8521898a5c090023df1d8b8c75be6228f56c52491e0fc1617a5236f2ac3a066adb67a73231eac216ccea7b5b4a2423a543c277cb2f48d24c29 - languageName: node - linkType: hard - -"split2@npm:^4.0.0": - version: 4.2.0 - resolution: "split2@npm:4.2.0" - checksum: 10c0/b292beb8ce9215f8c642bb68be6249c5a4c7f332fc8ecadae7be5cbdf1ea95addc95f0459ef2e7ad9d45fd1064698a097e4eb211c83e772b49bc0ee423e91534 - languageName: node - linkType: hard - -"sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - -"sprintf-js@npm:~1.0.2": - version: 1.0.3 - resolution: "sprintf-js@npm:1.0.3" - checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb - languageName: node - linkType: hard - -"ssri@npm:^10.0.0": - version: 10.0.6 - resolution: "ssri@npm:10.0.6" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/e5a1e23a4057a86a97971465418f22ea89bd439ac36ade88812dd920e4e61873e8abd6a9b72a03a67ef50faa00a2daf1ab745c5a15b46d03e0544a0296354227 - languageName: node - linkType: hard - -"std-env@npm:^3.7.0": - version: 3.7.0 - resolution: "std-env@npm:3.7.0" - checksum: 10c0/60edf2d130a4feb7002974af3d5a5f3343558d1ccf8d9b9934d225c638606884db4a20d2fe6440a09605bca282af6b042ae8070a10490c0800d69e82e478f41e - languageName: node - linkType: hard - -"stop-iteration-iterator@npm:^1.0.0": - version: 1.0.0 - resolution: "stop-iteration-iterator@npm:1.0.0" - dependencies: - internal-slot: "npm:^1.0.4" - checksum: 10c0/c4158d6188aac510d9e92925b58709207bd94699e9c31186a040c80932a687f84a51356b5895e6dc72710aad83addb9411c22171832c9ae0e6e11b7d61b0dfb9 - languageName: node - linkType: hard - -"stream-shift@npm:^1.0.2": - version: 1.0.3 - resolution: "stream-shift@npm:1.0.3" - checksum: 10c0/939cd1051ca750d240a0625b106a2b988c45fb5a3be0cebe9a9858cb01bc1955e8c7b9fac17a9462976bea4a7b704e317c5c2200c70f0ca715a3363b9aa4fd3b - languageName: node - linkType: hard - -"streamsearch@npm:^1.1.0": - version: 1.1.0 - resolution: "streamsearch@npm:1.1.0" - checksum: 10c0/fbd9aecc2621364384d157f7e59426f4bfd385e8b424b5aaa79c83a6f5a1c8fd2e4e3289e95de1eb3511cb96bb333d6281a9919fafce760e4edb35b2cd2facab - languageName: node - linkType: hard - -"strict-uri-encode@npm:^2.0.0": - version: 2.0.0 - resolution: "strict-uri-encode@npm:2.0.0" - checksum: 10c0/010cbc78da0e2cf833b0f5dc769e21ae74cdc5d5f5bd555f14a4a4876c8ad2c85ab8b5bdf9a722dc71a11dcd3184085e1c3c0bd50ec6bb85fffc0f28cf82597d - languageName: node - linkType: hard - -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b - languageName: node - linkType: hard - -"string-width@npm:^2.0.0, string-width@npm:^2.1.0": - version: 2.1.1 - resolution: "string-width@npm:2.1.1" - dependencies: - is-fullwidth-code-point: "npm:^2.0.0" - strip-ansi: "npm:^4.0.0" - checksum: 10c0/e5f2b169fcf8a4257a399f95d069522f056e92ec97dbdcb9b0cdf14d688b7ca0b1b1439a1c7b9773cd79446cbafd582727279d6bfdd9f8edd306ea5e90e5b610 - languageName: node - linkType: hard - -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - -"string.prototype.includes@npm:^2.0.0": - version: 2.0.0 - resolution: "string.prototype.includes@npm:2.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10c0/32dff118c9e9dcc87e240b05462fa8ee7248d9e335c0015c1442fe18152261508a2146d9bb87ddae56abab69148a83c61dfaea33f53853812a6a2db737689ed2 - languageName: node - linkType: hard - -"string.prototype.matchall@npm:^4.0.11": - version: 4.0.11 - resolution: "string.prototype.matchall@npm:4.0.11" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - regexp.prototype.flags: "npm:^1.5.2" - set-function-name: "npm:^2.0.2" - side-channel: "npm:^1.0.6" - checksum: 10c0/915a2562ac9ab5e01b7be6fd8baa0b2b233a0a9aa975fcb2ec13cc26f08fb9a3e85d5abdaa533c99c6fc4c5b65b914eba3d80c4aff9792a4c9fed403f28f7d9d - languageName: node - linkType: hard - -"string.prototype.repeat@npm:^1.0.0": - version: 1.0.0 - resolution: "string.prototype.repeat@npm:1.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10c0/94c7978566cffa1327d470fd924366438af9b04b497c43a9805e476e2e908aa37a1fd34cc0911156c17556dab62159d12c7b92b3cc304c3e1281fe4c8e668f40 - languageName: node - linkType: hard - -"string.prototype.trim@npm:^1.2.9": - version: 1.2.9 - resolution: "string.prototype.trim@npm:1.2.9" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.0" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/dcef1a0fb61d255778155006b372dff8cc6c4394bc39869117e4241f41a2c52899c0d263ffc7738a1f9e61488c490b05c0427faa15151efad721e1a9fb2663c2 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimend@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/0a0b54c17c070551b38e756ae271865ac6cc5f60dabf2e7e343cceae7d9b02e1a1120a824e090e79da1b041a74464e8477e2da43e2775c85392be30a6f60963c - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 - languageName: node - linkType: hard - -"string_decoder@npm:^1.1.1": - version: 1.3.0 - resolution: "string_decoder@npm:1.3.0" - dependencies: - safe-buffer: "npm:~5.2.0" - checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d - languageName: node - linkType: hard - -"string_decoder@npm:~1.1.1": - version: 1.1.1 - resolution: "string_decoder@npm:1.1.1" - dependencies: - safe-buffer: "npm:~5.1.0" - checksum: 10c0/b4f89f3a92fd101b5653ca3c99550e07bdf9e13b35037e9e2a1c7b47cec4e55e06ff3fc468e314a0b5e80bfbaf65c1ca5a84978764884ae9413bec1fc6ca924e - languageName: node - linkType: hard - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - -"strip-ansi@npm:^3.0.0": - version: 3.0.1 - resolution: "strip-ansi@npm:3.0.1" - dependencies: - ansi-regex: "npm:^2.0.0" - checksum: 10c0/f6e7fbe8e700105dccf7102eae20e4f03477537c74b286fd22cfc970f139002ed6f0d9c10d0e21aa9ed9245e0fa3c9275930e8795c5b947da136e4ecb644a70f - languageName: node - linkType: hard - -"strip-ansi@npm:^4.0.0": - version: 4.0.0 - resolution: "strip-ansi@npm:4.0.0" - dependencies: - ansi-regex: "npm:^3.0.0" - checksum: 10c0/d75d9681e0637ea316ddbd7d4d3be010b1895a17e885155e0ed6a39755ae0fd7ef46e14b22162e66a62db122d3a98ab7917794e255532ab461bb0a04feb03e7d - languageName: node - linkType: hard - -"strip-ansi@npm:^5.1.0": - version: 5.2.0 - resolution: "strip-ansi@npm:5.2.0" - dependencies: - ansi-regex: "npm:^4.1.0" - checksum: 10c0/de4658c8a097ce3b15955bc6008f67c0790f85748bdc025b7bc8c52c7aee94bc4f9e50624516150ed173c3db72d851826cd57e7a85fe4e4bb6dbbebd5d297fdf - languageName: node - linkType: hard - -"strip-ansi@npm:^7.0.1": - version: 7.1.0 - resolution: "strip-ansi@npm:7.1.0" - dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 - languageName: node - linkType: hard - -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 10c0/51201f50e021ef16672593d7434ca239441b7b760e905d9f33df6e4f3954ff54ec0e0a06f100d028af0982d6f25c35cd5cda2ce34eaebccd0250b8befb90d8f1 - languageName: node - linkType: hard - -"strip-final-newline@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-final-newline@npm:3.0.0" - checksum: 10c0/a771a17901427bac6293fd416db7577e2bc1c34a19d38351e9d5478c3c415f523f391003b42ed475f27e33a78233035df183525395f731d3bfb8cdcbd4da08ce - languageName: node - linkType: hard - -"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - -"style-to-object@npm:^0.4.0": - version: 0.4.4 - resolution: "style-to-object@npm:0.4.4" - dependencies: - inline-style-parser: "npm:0.1.1" - checksum: 10c0/3a733080da66952881175b17d65f92985cf94c1ca358a92cf21b114b1260d49b94a404ed79476047fb95698d64c7e366ca7443f0225939e2fb34c38bbc9c7639 - languageName: node - linkType: hard - -"styled-jsx@npm:5.1.1": - version: 5.1.1 - resolution: "styled-jsx@npm:5.1.1" - dependencies: - client-only: "npm:0.0.1" - peerDependencies: - react: ">= 16.8.0 || 17.x.x || ^18.0.0-0" - peerDependenciesMeta: - "@babel/core": - optional: true - babel-plugin-macros: - optional: true - checksum: 10c0/42655cdadfa5388f8a48bb282d6b450df7d7b8cf066ac37038bd0499d3c9f084815ebd9ff9dfa12a218fd4441338851db79603498d7557207009c1cf4d609835 - languageName: node - linkType: hard - -"stylis@npm:4.2.0": - version: 4.2.0 - resolution: "stylis@npm:4.2.0" - checksum: 10c0/a7128ad5a8ed72652c6eba46bed4f416521bc9745a460ef5741edc725252cebf36ee45e33a8615a7057403c93df0866ab9ee955960792db210bb80abd5ac6543 - languageName: node - linkType: hard - -"supports-color@npm:^2.0.0": - version: 2.0.0 - resolution: "supports-color@npm:2.0.0" - checksum: 10c0/570e0b63be36cccdd25186350a6cb2eaad332a95ff162fa06d9499982315f2fe4217e69dd98e862fbcd9c81eaff300a825a1fe7bf5cc752e5b84dfed042b0dda - languageName: node - linkType: hard - -"supports-color@npm:^5.3.0": - version: 5.5.0 - resolution: "supports-color@npm:5.5.0" - dependencies: - has-flag: "npm:^3.0.0" - checksum: 10c0/6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 - languageName: node - linkType: hard - -"supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 - languageName: node - linkType: hard - -"supports-color@npm:^8.0.0": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 - languageName: node - linkType: hard - -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 - languageName: node - linkType: hard - -"symbol-observable@npm:^2.0.3": - version: 2.0.3 - resolution: "symbol-observable@npm:2.0.3" - checksum: 10c0/03fb8766b75bfa65a3c7d68ae1e51a13a5ff71b40d6d53b17a0c9c77b1685c20a3bfbf45547ab36214a079665c3f551e250798f6b2f83a2a40762d864ed87f78 - languageName: node - linkType: hard - -"system-architecture@npm:^0.1.0": - version: 0.1.0 - resolution: "system-architecture@npm:0.1.0" - checksum: 10c0/1969974ea5d31a9ac7c38f2657cfe8255b36f9e1d5ba3c58cb84c24fbeedf562778b8511f18a0abe6d70ae90148cfcaf145ecf26e37c0a53a3829076f3238cbb - languageName: node - linkType: hard - -"tabbable@npm:^6.0.0": - version: 6.2.0 - resolution: "tabbable@npm:6.2.0" - checksum: 10c0/ced8b38f05f2de62cd46836d77c2646c42b8c9713f5bd265daf0e78ff5ac73d3ba48a7ca45f348bafeef29b23da7187c72250742d37627883ef89cbd7fa76898 - languageName: node - linkType: hard - -"tapable@npm:^2.2.0": - version: 2.2.1 - resolution: "tapable@npm:2.2.1" - checksum: 10c0/bc40e6efe1e554d075469cedaba69a30eeb373552aaf41caeaaa45bf56ffacc2674261b106245bd566b35d8f3329b52d838e851ee0a852120acae26e622925c9 - languageName: node - linkType: hard - -"tar@npm:^6.1.11, tar@npm:^6.2.1": - version: 6.2.1 - resolution: "tar@npm:6.2.1" - dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^5.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10c0/a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 - languageName: node - linkType: hard - -"test-exclude@npm:^6.0.0": - version: 6.0.0 - resolution: "test-exclude@npm:6.0.0" - dependencies: - "@istanbuljs/schema": "npm:^0.1.2" - glob: "npm:^7.1.4" - minimatch: "npm:^3.0.4" - checksum: 10c0/019d33d81adff3f9f1bfcff18125fb2d3c65564f437d9be539270ee74b994986abb8260c7c2ce90e8f30162178b09dbbce33c6389273afac4f36069c48521f57 - languageName: node - linkType: hard - -"text-table@npm:^0.2.0": - version: 0.2.0 - resolution: "text-table@npm:0.2.0" - checksum: 10c0/02805740c12851ea5982686810702e2f14369a5f4c5c40a836821e3eefc65ffeec3131ba324692a37608294b0fd8c1e55a2dd571ffed4909822787668ddbee5c - languageName: node - linkType: hard - -"thenify-all@npm:^1.0.0": - version: 1.6.0 - resolution: "thenify-all@npm:1.6.0" - dependencies: - thenify: "npm:>= 3.1.0 < 4" - checksum: 10c0/9b896a22735e8122754fe70f1d65f7ee691c1d70b1f116fda04fea103d0f9b356e3676cb789506e3909ae0486a79a476e4914b0f92472c2e093d206aed4b7d6b - languageName: node - linkType: hard - -"thenify@npm:>= 3.1.0 < 4": - version: 3.3.1 - resolution: "thenify@npm:3.3.1" - dependencies: - any-promise: "npm:^1.0.0" - checksum: 10c0/f375aeb2b05c100a456a30bc3ed07ef03a39cbdefe02e0403fb714b8c7e57eeaad1a2f5c4ecfb9ce554ce3db9c2b024eba144843cd9e344566d9fcee73b04767 - languageName: node - linkType: hard - -"thread-stream@npm:^0.15.1": - version: 0.15.2 - resolution: "thread-stream@npm:0.15.2" - dependencies: - real-require: "npm:^0.1.0" - checksum: 10c0/f92f1b5a9f3f35a72c374e3fecbde6f14d69d5325ad9ce88930af6ed9c7c1ec814367716b712205fa4f06242ae5dd97321ae2c00b43586590ed4fa861f3c29ae - languageName: node - linkType: hard - -"through@npm:^2.3.6": - version: 2.3.8 - resolution: "through@npm:2.3.8" - checksum: 10c0/4b09f3774099de0d4df26d95c5821a62faee32c7e96fb1f4ebd54a2d7c11c57fe88b0a0d49cf375de5fee5ae6bf4eb56dbbf29d07366864e2ee805349970d3cc - languageName: node - linkType: hard - -"timers-ext@npm:^0.1.7": - version: 0.1.8 - resolution: "timers-ext@npm:0.1.8" - dependencies: - es5-ext: "npm:^0.10.64" - next-tick: "npm:^1.1.0" - checksum: 10c0/d0222d0c171d08df69e51462e3fa2085744d13f8ac82b27597db05db1a09bc4244e03ea3cebe89ba279fd43f45daa39156acbe5b6ae5a9b9d62d300543312533 - languageName: node - linkType: hard - -"tiny-inflate@npm:^1.0.0": - version: 1.0.3 - resolution: "tiny-inflate@npm:1.0.3" - checksum: 10c0/fab687537254f6ec44c9a2e880048fe70da3542aba28f73cda3e74c95cabf342a339372f2a6c032e322324f01accc03ca26c04ba2bad9b3eb8cf3ee99bba7f9b - languageName: node - linkType: hard - -"tiny-invariant@npm:^1.0.6": - version: 1.3.3 - resolution: "tiny-invariant@npm:1.3.3" - checksum: 10c0/65af4a07324b591a059b35269cd696aba21bef2107f29b9f5894d83cc143159a204b299553435b03874ebb5b94d019afa8b8eff241c8a4cfee95872c2e1c1c4a - languageName: node - linkType: hard - -"tiny-secp256k1@npm:^1.1.3": - version: 1.1.6 - resolution: "tiny-secp256k1@npm:1.1.6" - dependencies: - bindings: "npm:^1.3.0" - bn.js: "npm:^4.11.8" - create-hmac: "npm:^1.1.7" - elliptic: "npm:^6.4.0" - nan: "npm:^2.13.2" - node-gyp: "npm:latest" - checksum: 10c0/b47ceada38f6fa65190906e8a98b58d1584b0640383f04db8196a7098c726e926cfba6271a53e97d98d4c67e2b364618d7b3d7e402f63e44f0e07a4aca82ac8b - languageName: node - linkType: hard - -"tmp@npm:^0.0.33": - version: 0.0.33 - resolution: "tmp@npm:0.0.33" - dependencies: - os-tmpdir: "npm:~1.0.2" - checksum: 10c0/69863947b8c29cabad43fe0ce65cec5bb4b481d15d4b4b21e036b060b3edbf3bc7a5541de1bacb437bb3f7c4538f669752627fdf9b4aaf034cebd172ba373408 - languageName: node - linkType: hard - -"tmp@npm:^0.2.1": - version: 0.2.3 - resolution: "tmp@npm:0.2.3" - checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125 - languageName: node - linkType: hard - -"tmpl@npm:1.0.5": - version: 1.0.5 - resolution: "tmpl@npm:1.0.5" - checksum: 10c0/f935537799c2d1922cb5d6d3805f594388f75338fe7a4a9dac41504dd539704ca4db45b883b52e7b0aa5b2fd5ddadb1452bf95cd23a69da2f793a843f9451cc9 - languageName: node - linkType: hard - -"to-fast-properties@npm:^2.0.0": - version: 2.0.0 - resolution: "to-fast-properties@npm:2.0.0" - checksum: 10c0/b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 - languageName: node - linkType: hard - -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"toggle-selection@npm:^1.0.6": - version: 1.0.6 - resolution: "toggle-selection@npm:1.0.6" - checksum: 10c0/f2cf1f2c70f374fd87b0cdc8007453ba9e981c4305a8bf4eac10a30e62ecdfd28bca7d18f8f15b15a506bf8a7bfb20dbe3539f0fcf2a2c8396c1a78d53e1f179 - languageName: node - linkType: hard - -"tr46@npm:~0.0.3": - version: 0.0.3 - resolution: "tr46@npm:0.0.3" - checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 - languageName: node - linkType: hard - -"trim-lines@npm:^3.0.0": - version: 3.0.1 - resolution: "trim-lines@npm:3.0.1" - checksum: 10c0/3a1611fa9e52aa56a94c69951a9ea15b8aaad760eaa26c56a65330dc8adf99cb282fc07cc9d94968b7d4d88003beba220a7278bbe2063328eb23fb56f9509e94 - languageName: node - linkType: hard - -"trough@npm:^2.0.0": - version: 2.2.0 - resolution: "trough@npm:2.2.0" - checksum: 10c0/58b671fc970e7867a48514168894396dd94e6d9d6456aca427cc299c004fe67f35ed7172a36449086b2edde10e78a71a284ec0076809add6834fb8f857ccb9b0 - languageName: node - linkType: hard - -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10c0/5b4f301a2b7a3766a986baf8fc0e177eb80bdba6e396792ff92dc23b5bca8bb279fc96517dcaaef63a3b49bebc6c4c833653ec58155780bc906bdbcf7dda0ef5 - languageName: node - linkType: hard - -"tslib@npm:1.14.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0": - version: 1.14.1 - resolution: "tslib@npm:1.14.1" - checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2 - languageName: node - linkType: hard - -"tslib@npm:2.4.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 10c0/eb19bda3ae545b03caea6a244b34593468e23d53b26bf8649fbc20fce43e9b21a71127fd6d2b9662c0fe48ee6ff668ead48fd00d3b88b2b716b1c12edae25b5d - languageName: node - linkType: hard - -"tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0": - version: 2.7.0 - resolution: "tslib@npm:2.7.0" - checksum: 10c0/469e1d5bf1af585742128827000711efa61010b699cb040ab1800bcd3ccdd37f63ec30642c9e07c4439c1db6e46345582614275daca3e0f4abae29b0083f04a6 - languageName: node - linkType: hard - -"tsutils@npm:^3.21.0": - version: 3.21.0 - resolution: "tsutils@npm:3.21.0" - dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - checksum: 10c0/02f19e458ec78ead8fffbf711f834ad8ecd2cc6ade4ec0320790713dccc0a412b99e7fd907c4cda2a1dc602c75db6f12e0108e87a5afad4b2f9e90a24cabd5a2 - languageName: node - linkType: hard - -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - -"type-fest@npm:^0.20.2": - version: 0.20.2 - resolution: "type-fest@npm:0.20.2" - checksum: 10c0/dea9df45ea1f0aaa4e2d3bed3f9a0bfe9e5b2592bddb92eb1bf06e50bcf98dbb78189668cd8bc31a0511d3fc25539b4cd5c704497e53e93e2d40ca764b10bfc3 - languageName: node - linkType: hard - -"type@npm:^2.7.2": - version: 2.7.3 - resolution: "type@npm:2.7.3" - checksum: 10c0/dec6902c2c42fcb86e3adf8cdabdf80e5ef9de280872b5fd547351e9cca2fe58dd2aa6d2547626ddff174145db272f62d95c7aa7038e27c11315657d781a688d - languageName: node - linkType: hard - -"typed-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-buffer@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/9e043eb38e1b4df4ddf9dde1aa64919ae8bb909571c1cc4490ba777d55d23a0c74c7d73afcdd29ec98616d91bb3ae0f705fad4421ea147e1daf9528200b562da - languageName: node - linkType: hard - -"typed-array-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "typed-array-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/fcebeffb2436c9f355e91bd19e2368273b88c11d1acc0948a2a306792f1ab672bce4cfe524ab9f51a0505c9d7cd1c98eff4235c4f6bfef6a198f6cfc4ff3d4f3 - languageName: node - linkType: hard - -"typed-array-byte-offset@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-byte-offset@npm:1.0.2" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/d2628bc739732072e39269389a758025f75339de2ed40c4f91357023c5512d237f255b633e3106c461ced41907c1bf9a533c7e8578066b0163690ca8bc61b22f - languageName: node - linkType: hard - -"typed-array-length@npm:^1.0.6": - version: 1.0.6 - resolution: "typed-array-length@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/74253d7dc488eb28b6b2711cf31f5a9dcefc9c41b0681fd1c178ed0a1681b4468581a3626d39cd4df7aee3d3927ab62be06aa9ca74e5baf81827f61641445b77 - languageName: node - linkType: hard - -"typeforce@npm:^1.11.5": - version: 1.18.0 - resolution: "typeforce@npm:1.18.0" - checksum: 10c0/011f57effd9ae6d3dd8bb249e09b4ecadb2c2a3f803b27f977ac8b7782834855930bff971ba549bcd5a8cedc8136d8a977c0b7e050cc67deded948181b7ba3e8 - languageName: node - linkType: hard - -"typescript@npm:^5.1.6": - version: 5.5.4 - resolution: "typescript@npm:5.5.4" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.1.6#optional!builtin": - version: 5.5.4 - resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=b45daf" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/10dd9881baba22763de859e8050d6cb6e2db854197495c6f1929b08d1eb2b2b00d0b5d9b0bcee8472f1c3f4a7ef6a5d7ebe0cfd703f853aa5ae465b8404bc1ba - languageName: node - linkType: hard - -"ufo@npm:^1.4.0, ufo@npm:^1.5.3": - version: 1.5.4 - resolution: "ufo@npm:1.5.4" - checksum: 10c0/b5dc4dc435c49c9ef8890f1b280a19ee4d0954d1d6f9ab66ce62ce64dd04c7be476781531f952a07c678d51638d02ad4b98e16237be29149295b0f7c09cda765 - languageName: node - linkType: hard - -"uint8arrays@npm:3.1.0": - version: 3.1.0 - resolution: "uint8arrays@npm:3.1.0" - dependencies: - multiformats: "npm:^9.4.2" - checksum: 10c0/e54e64593a76541330f0fea97b1b5dea6becbbec3572b9bb88863d064f2630bede4d42eafd457f19c6ef9125f50bfc61053d519c4d71b59c3b7566a0691e3ba2 - languageName: node - linkType: hard - -"uint8arrays@npm:^3.0.0": - version: 3.1.1 - resolution: "uint8arrays@npm:3.1.1" - dependencies: - multiformats: "npm:^9.4.2" - checksum: 10c0/9946668e04f29b46bbb73cca3d190f63a2fbfe5452f8e6551ef4257d9d597b72da48fa895c15ef2ef772808a5335b3305f69da5f13a09f8c2924896b409565ff - languageName: node - linkType: hard - -"unbox-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "unbox-primitive@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.0.3" - which-boxed-primitive: "npm:^1.0.2" - checksum: 10c0/81ca2e81134167cc8f75fa79fbcc8a94379d6c61de67090986a2273850989dd3bae8440c163121b77434b68263e34787a675cbdcb34bb2f764c6b9c843a11b66 - languageName: node - linkType: hard - -"uncrypto@npm:^0.1.3": - version: 0.1.3 - resolution: "uncrypto@npm:0.1.3" - checksum: 10c0/74a29afefd76d5b77bedc983559ceb33f5bbc8dada84ff33755d1e3355da55a4e03a10e7ce717918c436b4dfafde1782e799ebaf2aadd775612b49f7b5b2998e - languageName: node - linkType: hard - -"undici-types@npm:~6.19.2": - version: 6.19.8 - resolution: "undici-types@npm:6.19.8" - checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 - languageName: node - linkType: hard - -"unenv@npm:^1.9.0": - version: 1.10.0 - resolution: "unenv@npm:1.10.0" - dependencies: - consola: "npm:^3.2.3" - defu: "npm:^6.1.4" - mime: "npm:^3.0.0" - node-fetch-native: "npm:^1.6.4" - pathe: "npm:^1.1.2" - checksum: 10c0/354180647e21204b6c303339e7364b920baadb2672b540a88af267bc827636593e0bf79f59753dcc6b7ab5d4c83e71d69a9171a3596befb8bf77e0bb3c7612b9 - languageName: node - linkType: hard - -"unicode-canonical-property-names-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" - checksum: 10c0/0fe812641bcfa3ae433025178a64afb5d9afebc21a922dafa7cba971deebb5e4a37350423890750132a85c936c290fb988146d0b1bd86838ad4897f4fc5bd0de - languageName: node - linkType: hard - -"unicode-match-property-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-ecmascript@npm:2.0.0" - dependencies: - unicode-canonical-property-names-ecmascript: "npm:^2.0.0" - unicode-property-aliases-ecmascript: "npm:^2.0.0" - checksum: 10c0/4d05252cecaf5c8e36d78dc5332e03b334c6242faf7cf16b3658525441386c0a03b5f603d42cbec0f09bb63b9fd25c9b3b09667aee75463cac3efadae2cd17ec - languageName: node - linkType: hard - -"unicode-match-property-value-ecmascript@npm:^2.1.0": - version: 2.1.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" - checksum: 10c0/f5b9499b9e0ffdc6027b744d528f17ec27dd7c15da03254ed06851feec47e0531f20d410910c8a49af4a6a190f4978413794c8d75ce112950b56d583b5d5c7f2 - languageName: node - linkType: hard - -"unicode-property-aliases-ecmascript@npm:^2.0.0": - version: 2.1.0 - resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" - checksum: 10c0/50ded3f8c963c7785e48c510a3b7c6bc4e08a579551489aa0349680a35b1ceceec122e33b2b6c1b579d0be2250f34bb163ac35f5f8695fe10bbc67fb757f0af8 - languageName: node - linkType: hard - -"unicode-trie@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-trie@npm:2.0.0" - dependencies: - pako: "npm:^0.2.5" - tiny-inflate: "npm:^1.0.0" - checksum: 10c0/2422368645249f315640a1c9e9506046aa7738fc9c5d59e15c207cdd6ec66101c35b0b9f75dc3ac28fe7be19aaf1efc898bbea074fa1e8e295ef736aeb7904bb - languageName: node - linkType: hard - -"unified@npm:^10.0.0": - version: 10.1.2 - resolution: "unified@npm:10.1.2" - dependencies: - "@types/unist": "npm:^2.0.0" - bail: "npm:^2.0.0" - extend: "npm:^3.0.0" - is-buffer: "npm:^2.0.0" - is-plain-obj: "npm:^4.0.0" - trough: "npm:^2.0.0" - vfile: "npm:^5.0.0" - checksum: 10c0/da9195e3375a74ab861a65e1d7b0454225d17a61646697911eb6b3e97de41091930ed3d167eb11881d4097c51deac407091d39ddd1ee8bf1fde3f946844a17a7 - languageName: node - linkType: hard - -"unique-filename@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-filename@npm:3.0.0" - dependencies: - unique-slug: "npm:^4.0.0" - checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f - languageName: node - linkType: hard - -"unique-slug@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-slug@npm:4.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 - languageName: node - linkType: hard - -"unist-util-generated@npm:^2.0.0": - version: 2.0.1 - resolution: "unist-util-generated@npm:2.0.1" - checksum: 10c0/6f052dd47a7280785f3787f52cdfe8819e1de50317a1bcf7c9346c63268cf2cebc61a5980e7ca734a54735e27dbb73091aa0361a98504ab7f9409fb75f1b16bb - languageName: node - linkType: hard - -"unist-util-is@npm:^5.0.0": - version: 5.2.1 - resolution: "unist-util-is@npm:5.2.1" - dependencies: - "@types/unist": "npm:^2.0.0" - checksum: 10c0/a2376910b832bb10653d2167c3cd85b3610a5fd53f5169834c08b3c3a720fae9043d75ad32d727eedfc611491966c26a9501d428ec62467edc17f270feb5410b - languageName: node - linkType: hard - -"unist-util-position@npm:^4.0.0": - version: 4.0.4 - resolution: "unist-util-position@npm:4.0.4" - dependencies: - "@types/unist": "npm:^2.0.0" - checksum: 10c0/e506d702e25a0fb47a64502054f709a6ff5db98993bf139eec868cd11eb7de34392b781c6c2002e2c24d97aa398c14b32a47076129f36e4b894a2c1351200888 - languageName: node - linkType: hard - -"unist-util-stringify-position@npm:^3.0.0": - version: 3.0.3 - resolution: "unist-util-stringify-position@npm:3.0.3" - dependencies: - "@types/unist": "npm:^2.0.0" - checksum: 10c0/14550027825230528f6437dad7f2579a841780318569851291be6c8a970bae6f65a7feb24dabbcfce0e5e68cacae85bf12cbda3f360f7c873b4db602bdf7bb21 - languageName: node - linkType: hard - -"unist-util-visit-parents@npm:^5.1.1": - version: 5.1.3 - resolution: "unist-util-visit-parents@npm:5.1.3" - dependencies: - "@types/unist": "npm:^2.0.0" - unist-util-is: "npm:^5.0.0" - checksum: 10c0/f6829bfd8f2eddf63a32e2c302cd50978ef0c194b792c6fe60c2b71dfd7232415a3c5941903972543e9d34e6a8ea69dee9ccd95811f4a795495ed2ae855d28d0 - languageName: node - linkType: hard - -"unist-util-visit@npm:^4.0.0": - version: 4.1.2 - resolution: "unist-util-visit@npm:4.1.2" - dependencies: - "@types/unist": "npm:^2.0.0" - unist-util-is: "npm:^5.0.0" - unist-util-visit-parents: "npm:^5.1.1" - checksum: 10c0/56a1f49a4d8e321e75b3c7821d540a45165a031dd06324bb0e8c75e7737bc8d73bdddbf0b0ca82000f9708a4c36861c6ebe88d01f7cf00e925f5d75f13a3a017 - languageName: node - linkType: hard - -"unstorage@npm:^1.9.0": - version: 1.10.2 - resolution: "unstorage@npm:1.10.2" - dependencies: - anymatch: "npm:^3.1.3" - chokidar: "npm:^3.6.0" - destr: "npm:^2.0.3" - h3: "npm:^1.11.1" - listhen: "npm:^1.7.2" - lru-cache: "npm:^10.2.0" - mri: "npm:^1.2.0" - node-fetch-native: "npm:^1.6.2" - ofetch: "npm:^1.3.3" - ufo: "npm:^1.4.0" - peerDependencies: - "@azure/app-configuration": ^1.5.0 - "@azure/cosmos": ^4.0.0 - "@azure/data-tables": ^13.2.2 - "@azure/identity": ^4.0.1 - "@azure/keyvault-secrets": ^4.8.0 - "@azure/storage-blob": ^12.17.0 - "@capacitor/preferences": ^5.0.7 - "@netlify/blobs": ^6.5.0 || ^7.0.0 - "@planetscale/database": ^1.16.0 - "@upstash/redis": ^1.28.4 - "@vercel/kv": ^1.0.1 - idb-keyval: ^6.2.1 - ioredis: ^5.3.2 - peerDependenciesMeta: - "@azure/app-configuration": - optional: true - "@azure/cosmos": - optional: true - "@azure/data-tables": - optional: true - "@azure/identity": - optional: true - "@azure/keyvault-secrets": - optional: true - "@azure/storage-blob": - optional: true - "@capacitor/preferences": - optional: true - "@netlify/blobs": - optional: true - "@planetscale/database": - optional: true - "@upstash/redis": - optional: true - "@vercel/kv": - optional: true - idb-keyval: - optional: true - ioredis: - optional: true - checksum: 10c0/89d61e6b2165ddc78005b8a4a340576877b56b70ec0b318f7cf2e74ee7ab19006036267ba28587100fa7256c573db3bd720700daf6586bbdcad4ed60b64c4284 - languageName: node - linkType: hard - -"untun@npm:^0.1.3": - version: 0.1.3 - resolution: "untun@npm:0.1.3" - dependencies: - citty: "npm:^0.1.5" - consola: "npm:^3.2.3" - pathe: "npm:^1.1.1" - bin: - untun: bin/untun.mjs - checksum: 10c0/2b44a4cc84a5c21994f43b9f55348e5a8d9dd5fd0ad8fb5cd091b6f6b53d506b1cdb90e89cc238d61b46d488f7a89ab0d1a5c735bfc835581c7b22a236381295 - languageName: node - linkType: hard - -"update-browserslist-db@npm:^1.1.0": - version: 1.1.0 - resolution: "update-browserslist-db@npm:1.1.0" - dependencies: - escalade: "npm:^3.1.2" - picocolors: "npm:^1.0.1" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10c0/a7452de47785842736fb71547651c5bbe5b4dc1e3722ccf48a704b7b34e4dcf633991eaa8e4a6a517ffb738b3252eede3773bef673ef9021baa26b056d63a5b9 - languageName: node - linkType: hard - -"uqr@npm:^0.1.2": - version: 0.1.2 - resolution: "uqr@npm:0.1.2" - checksum: 10c0/40cd81b4c13f1764d52ec28da2d58e60816e6fae54d4eb75b32fbf3137937f438eff16c766139fb0faec5d248a5314591f5a0dbd694e569d419eed6f3bd80242 - languageName: node - linkType: hard - -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - -"use-callback-ref@npm:^1.3.0, use-callback-ref@npm:^1.3.2": - version: 1.3.2 - resolution: "use-callback-ref@npm:1.3.2" - dependencies: - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/d232c37160fe3970c99255da19b5fb5299fb5926a5d6141d928a87feb47732c323d29be2f8137d3b1e5499c70d284cd1d9cfad703cc58179db8be24d7dd8f1f2 - languageName: node - linkType: hard - -"use-isomorphic-layout-effect@npm:^1.1.2": - version: 1.1.2 - resolution: "use-isomorphic-layout-effect@npm:1.1.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/d8deea8b85e55ac6daba237a889630bfdbf0ebf60e9e22b6a78a78c26fabe6025e04ada7abef1e444e6786227d921e648b2707db8b3564daf757264a148a6e23 - languageName: node - linkType: hard - -"use-sidecar@npm:^1.1.2": - version: 1.1.2 - resolution: "use-sidecar@npm:1.1.2" - dependencies: - detect-node-es: "npm:^1.1.0" - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": ^16.9.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/89f0018fd9aee1fc17c85ac18c4bf8944d460d453d0d0e04ddbc8eaddf3fa591e9c74a1f8a438a1bff368a7a2417fab380bdb3df899d2194c4375b0982736de0 - languageName: node - linkType: hard - -"use-sync-external-store@npm:1.2.2, use-sync-external-store@npm:^1.2.0": - version: 1.2.2 - resolution: "use-sync-external-store@npm:1.2.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/23b1597c10adf15b26ade9e8c318d8cc0abc9ec0ab5fc7ca7338da92e89c2536abd150a5891bf076836c352fdfa104fc7231fb48f806fd9960e0cbe03601abaf - languageName: node - linkType: hard - -"utf-8-validate@npm:^5.0.5": - version: 5.0.10 - resolution: "utf-8-validate@npm:5.0.10" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10c0/23cd6adc29e6901aa37ff97ce4b81be9238d0023c5e217515b34792f3c3edb01470c3bd6b264096dd73d0b01a1690b57468de3a24167dd83004ff71c51cc025f - languageName: node - linkType: hard - -"util-deprecate@npm:^1.0.1, util-deprecate@npm:~1.0.1": - version: 1.0.2 - resolution: "util-deprecate@npm:1.0.2" - checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 - languageName: node - linkType: hard - -"util@npm:^0.10.3": - version: 0.10.4 - resolution: "util@npm:0.10.4" - dependencies: - inherits: "npm:2.0.3" - checksum: 10c0/d29f6893e406b63b088ce9924da03201df89b31490d4d011f1c07a386ea4b3dbe907464c274023c237da470258e1805d806c7e4009a5974cd6b1d474b675852a - languageName: node - linkType: hard - -"util@npm:^0.12.5": - version: 0.12.5 - resolution: "util@npm:0.12.5" - dependencies: - inherits: "npm:^2.0.3" - is-arguments: "npm:^1.0.4" - is-generator-function: "npm:^1.0.7" - is-typed-array: "npm:^1.1.3" - which-typed-array: "npm:^1.1.2" - checksum: 10c0/c27054de2cea2229a66c09522d0fa1415fb12d861d08523a8846bf2e4cbf0079d4c3f725f09dcb87493549bcbf05f5798dce1688b53c6c17201a45759e7253f3 - languageName: node - linkType: hard - -"utility-types@npm:^3.10.0": - version: 3.11.0 - resolution: "utility-types@npm:3.11.0" - checksum: 10c0/2f1580137b0c3e6cf5405f37aaa8f5249961a76d26f1ca8efc0ff49a2fc0e0b2db56de8e521a174d075758e0c7eb3e590edec0832eb44478b958f09914920f19 - languageName: node - linkType: hard - -"uuid@npm:^9.0.1": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10c0/1607dd32ac7fc22f2d8f77051e6a64845c9bce5cd3dd8aa0070c074ec73e666a1f63c7b4e0f4bf2bc8b9d59dc85a15e17807446d9d2b17c8485fbc2147b27f9b - languageName: node - linkType: hard - -"uvu@npm:^0.5.0": - version: 0.5.6 - resolution: "uvu@npm:0.5.6" - dependencies: - dequal: "npm:^2.0.0" - diff: "npm:^5.0.0" - kleur: "npm:^4.0.3" - sade: "npm:^1.7.3" - bin: - uvu: bin.js - checksum: 10c0/ad32eb5f7d94bdeb71f80d073003f0138e24f61ed68cecc8e15d2f30838f44c9670577bb1775c8fac894bf93d1bc1583d470a9195e49bfa6efa14cc6f4942bff - languageName: node - linkType: hard - -"vfile-message@npm:^3.0.0": - version: 3.1.4 - resolution: "vfile-message@npm:3.1.4" - dependencies: - "@types/unist": "npm:^2.0.0" - unist-util-stringify-position: "npm:^3.0.0" - checksum: 10c0/c4ccf9c0ced92d657846fd067fefcf91c5832cdbe2ecc431bb67886e8c959bf7fc05a9dbbca5551bc34c9c87a0a73854b4249f65c64ddfebc4d59ea24a18b996 - languageName: node - linkType: hard - -"vfile@npm:^5.0.0": - version: 5.3.7 - resolution: "vfile@npm:5.3.7" - dependencies: - "@types/unist": "npm:^2.0.0" - is-buffer: "npm:^2.0.0" - unist-util-stringify-position: "npm:^3.0.0" - vfile-message: "npm:^3.0.0" - checksum: 10c0/c36bd4c3f16ec0c6cbad0711ca99200316bbf849d6b07aa4cb5d9062cc18ae89249fe62af9521926e9659c0e6bc5c2c1da0fe26b41fb71e757438297e1a41da4 - languageName: node - linkType: hard - -"walker@npm:^1.0.8": - version: 1.0.8 - resolution: "walker@npm:1.0.8" - dependencies: - makeerror: "npm:1.0.12" - checksum: 10c0/a17e037bccd3ca8a25a80cb850903facdfed0de4864bd8728f1782370715d679fa72e0a0f5da7c1c1379365159901e5935f35be531229da53bbfc0efdabdb48e - languageName: node - linkType: hard - -"wasm-ast-types@npm:^0.25.0": - version: 0.25.0 - resolution: "wasm-ast-types@npm:0.25.0" - dependencies: - "@babel/runtime": "npm:^7.18.9" - "@babel/types": "npm:7.18.10" - "@jest/transform": "npm:28.1.3" - ast-stringify: "npm:0.1.0" - case: "npm:1.6.3" - deepmerge: "npm:4.2.2" - checksum: 10c0/93daea91e4854e67fd378076eaf256de2f335a3b7a7106f88eeb9989e62365bc6828a9475f9fea9e045f6c6fcacb91761b63240633838dfebd3e2cf0cf4a8ddb - languageName: node - linkType: hard - -"wasm-ast-types@npm:^0.3.7": - version: 0.3.7 - resolution: "wasm-ast-types@npm:0.3.7" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@babel/types": "npm:7.18.4" - ast-stringify: "npm:0.1.0" - case: "npm:1.6.3" - checksum: 10c0/72c5acf6176f7945868ae314389178a4194996788d96d0efa0eb49aaa6de7a60741366848227639c0d9ab28f9bf87b6e3c8455a86975d863fc816e2cf29c63b4 - languageName: node - linkType: hard - -"watchpack@npm:2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" - dependencies: - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.1.2" - checksum: 10c0/c5e35f9fb9338d31d2141d9835643c0f49b5f9c521440bb648181059e5940d93dd8ed856aa8a33fbcdd4e121dad63c7e8c15c063cf485429cd9d427be197fe62 - languageName: node - linkType: hard - -"webextension-polyfill@npm:>=0.10.0 <1.0": - version: 0.12.0 - resolution: "webextension-polyfill@npm:0.12.0" - checksum: 10c0/5ace2aaaf6a203515bdd2fb948622f186a5fbb50099b539ce9c0ad54896f9cc1fcc3c0e2a71d1f7071dd7236d7daebba1e0cbcf43bfdfe54361addf0333ee7d1 - languageName: node - linkType: hard - -"webextension-polyfill@npm:^0.10.0": - version: 0.10.0 - resolution: "webextension-polyfill@npm:0.10.0" - checksum: 10c0/6a45278f1fed8fbd5355f9b19a7b0b3fadc91fa3a6eef69125a1706bb3efa2181235eefbfb3f538443bb396cfcb97512361551888ce8465c08914431cb2d5b6d - languageName: node - linkType: hard - -"webidl-conversions@npm:^3.0.0": - version: 3.0.1 - resolution: "webidl-conversions@npm:3.0.1" - checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db - languageName: node - linkType: hard - -"whatwg-url@npm:^5.0.0": - version: 5.0.0 - resolution: "whatwg-url@npm:5.0.0" - dependencies: - tr46: "npm:~0.0.3" - webidl-conversions: "npm:^3.0.0" - checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 - languageName: node - linkType: hard - -"which-boxed-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "which-boxed-primitive@npm:1.0.2" - dependencies: - is-bigint: "npm:^1.0.1" - is-boolean-object: "npm:^1.1.0" - is-number-object: "npm:^1.0.4" - is-string: "npm:^1.0.5" - is-symbol: "npm:^1.0.3" - checksum: 10c0/0a62a03c00c91dd4fb1035b2f0733c341d805753b027eebd3a304b9cb70e8ce33e25317add2fe9b5fea6f53a175c0633ae701ff812e604410ddd049777cd435e - languageName: node - linkType: hard - -"which-builtin-type@npm:^1.1.3": - version: 1.1.4 - resolution: "which-builtin-type@npm:1.1.4" - dependencies: - function.prototype.name: "npm:^1.1.6" - has-tostringtag: "npm:^1.0.2" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.0.5" - is-finalizationregistry: "npm:^1.0.2" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.1.4" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.2" - which-typed-array: "npm:^1.1.15" - checksum: 10c0/a4a76d20d869a81b1dbb4adea31edc7e6c1a4466d3ab7c2cd757c9219d48d3723b04076c85583257b0f0f8e3ebe5af337248b8ceed57b9051cb97bce5bd881d1 - languageName: node - linkType: hard - -"which-collection@npm:^1.0.1, which-collection@npm:^1.0.2": - version: 1.0.2 - resolution: "which-collection@npm:1.0.2" - dependencies: - is-map: "npm:^2.0.3" - is-set: "npm:^2.0.3" - is-weakmap: "npm:^2.0.2" - is-weakset: "npm:^2.0.3" - checksum: 10c0/3345fde20964525a04cdf7c4a96821f85f0cc198f1b2ecb4576e08096746d129eb133571998fe121c77782ac8f21cbd67745a3d35ce100d26d4e684c142ea1f2 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2": - version: 1.1.15 - resolution: "which-typed-array@npm:1.1.15" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/4465d5348c044032032251be54d8988270e69c6b7154f8fcb2a47ff706fe36f7624b3a24246b8d9089435a8f4ec48c1c1025c5d6b499456b9e5eff4f48212983 - languageName: node - linkType: hard - -"which@npm:^2.0.1": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"which@npm:^4.0.0": - version: 4.0.0 - resolution: "which@npm:4.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/449fa5c44ed120ccecfe18c433296a4978a7583bf2391c50abce13f76878d2476defde04d0f79db8165bdf432853c1f8389d0485ca6e8ebce3bbcded513d5e6a - languageName: node - linkType: hard - -"wif@npm:^2.0.6": - version: 2.0.6 - resolution: "wif@npm:2.0.6" - dependencies: - bs58check: "npm:<3.0.0" - checksum: 10c0/9ff55fdde73226bbae6a08b68298b6d14bbc22fa4cefac11edaacb2317c217700f715b95dc4432917f73511ec983f1bc032d22c467703b136f4e6ca7dfa9f10b - languageName: node - linkType: hard - -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da - languageName: node - linkType: hard - -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - -"wrappy@npm:1": - version: 1.0.2 - resolution: "wrappy@npm:1.0.2" - checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 - languageName: node - linkType: hard - -"write-file-atomic@npm:^4.0.1": - version: 4.0.2 - resolution: "write-file-atomic@npm:4.0.2" - dependencies: - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^3.0.7" - checksum: 10c0/a2c282c95ef5d8e1c27b335ae897b5eca00e85590d92a3fd69a437919b7b93ff36a69ea04145da55829d2164e724bc62202cdb5f4b208b425aba0807889375c7 - languageName: node - linkType: hard - -"ws@npm:7.4.6": - version: 7.4.6 - resolution: "ws@npm:7.4.6" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/4b44b59bbc0549c852fb2f0cdb48e40e122a1b6078aeed3d65557cbeb7d37dda7a4f0027afba2e6a7a695de17701226d02b23bd15c97b0837808c16345c62f8e - languageName: node - linkType: hard - -"ws@npm:8.17.1": - version: 8.17.1 - resolution: "ws@npm:8.17.1" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/f4a49064afae4500be772abdc2211c8518f39e1c959640457dcee15d4488628620625c783902a52af2dd02f68558da2868fd06e6fd0e67ebcd09e6881b1b5bfe - languageName: node - linkType: hard - -"ws@npm:^7, ws@npm:^7.5.1, ws@npm:^7.5.9": - version: 7.5.10 - resolution: "ws@npm:7.5.10" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/bd7d5f4aaf04fae7960c23dcb6c6375d525e00f795dd20b9385902bd008c40a94d3db3ce97d878acc7573df852056ca546328b27b39f47609f80fb22a0a9b61d - languageName: node - linkType: hard - -"xstream@npm:^11.14.0": - version: 11.14.0 - resolution: "xstream@npm:11.14.0" - dependencies: - globalthis: "npm:^1.0.1" - symbol-observable: "npm:^2.0.3" - checksum: 10c0/7a28baedc64385dc17597d04c7130ec3135db298e66d6dcf33821eb1953d5ad1b83c5fa08f1ce4d36e75fd219f2e9ef81ee0721aa8d4ccf619acc1760ba37f71 - languageName: node - linkType: hard - -"yallist@npm:^3.0.2": - version: 3.1.1 - resolution: "yallist@npm:3.1.1" - checksum: 10c0/c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1 - languageName: node - linkType: hard - -"yallist@npm:^4.0.0": - version: 4.0.0 - resolution: "yallist@npm:4.0.0" - checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a - languageName: node - linkType: hard - -"yaml@npm:^1.10.0": - version: 1.10.2 - resolution: "yaml@npm:1.10.2" - checksum: 10c0/5c28b9eb7adc46544f28d9a8d20c5b3cb1215a886609a2fd41f51628d8aaa5878ccd628b755dbcd29f6bb4921bd04ffbc6dcc370689bb96e594e2f9813d2605f - languageName: node - linkType: hard - -"yocto-queue@npm:^0.1.0": - version: 0.1.0 - resolution: "yocto-queue@npm:0.1.0" - checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f - languageName: node - linkType: hard - -"zustand@npm:^4.5.4": - version: 4.5.5 - resolution: "zustand@npm:4.5.5" - dependencies: - use-sync-external-store: "npm:1.2.2" - peerDependencies: - "@types/react": ">=16.8" - immer: ">=9.0.6" - react: ">=16.8" - peerDependenciesMeta: - "@types/react": - optional: true - immer: - optional: true - react: - optional: true - checksum: 10c0/d04469d76b29c7e4070da269886de4efdadedd3d3824dc2a06ac4ff62e3b5877f925e927afe7382de651829872b99adec48082f1bd69fe486149be666345e626 - languageName: node - linkType: hard